Merge lp:~mbp/bzr-gtk/201956-help into lp:bzr-gtk/gtk2

Proposed by Martin Pool
Status: Merged
Approved by: Robert Collins
Approved revision: 693
Merged at revision: 689
Proposed branch: lp:~mbp/bzr-gtk/201956-help
Merge into: lp:bzr-gtk/gtk2
Diff against target: 84 lines (+33/-2)
3 files modified
NEWS (+3/-0)
annotate/gannotate.py (+27/-2)
commands.py (+3/-0)
To merge this branch: bzr merge lp:~mbp/bzr-gtk/201956-help
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+26114@code.launchpad.net

This proposal supersedes a proposal from 2010-05-27.

Commit message

add buttons for find and goto-line, and also mention in help text

Description of the change

This has a very low-hanging fix for bug 201956, which is just to mention the search commands in the help.

... actually slightly higher fruit, to add discoverable buttons to open the search bar.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote : Posted in a previous version of this proposal

Just land it!

Revision history for this message
Robert Collins (lifeless) wrote :

looks fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2010-03-18 09:20:09 +0000
+++ NEWS 2010-05-27 02:30:45 +0000
@@ -12,6 +12,9 @@
1212
13FEATURES13FEATURES
1414
15 * Add 'Find' button to start text search.
16 (Martin Pool, #556347)
17
15 * Add 'glog' as an alias for visualize (aka viz) as too many18 * Add 'glog' as an alias for visualize (aka viz) as too many
16 people are still confused.19 people are still confused.
17 (Vincent Ladeuil)20 (Vincent Ladeuil)
1821
=== modified file 'annotate/gannotate.py'
--- annotate/gannotate.py 2009-06-05 12:18:50 +0000
+++ annotate/gannotate.py 2010-05-27 02:30:45 +0000
@@ -212,6 +212,10 @@
212 hbox.pack_start(self.back_button, expand=False, fill=True)212 hbox.pack_start(self.back_button, expand=False, fill=True)
213 self.forward_button = self._create_forward_button()213 self.forward_button = self._create_forward_button()
214 hbox.pack_start(self.forward_button, expand=False, fill=True)214 hbox.pack_start(self.forward_button, expand=False, fill=True)
215 self.find_button = self._create_find_button()
216 hbox.pack_start(self.find_button, expand=False, fill=True)
217 self.goto_button = self._create_goto_button()
218 hbox.pack_start(self.goto_button, expand=False, fill=True)
215 hbox.show()219 hbox.show()
216 vbox.pack_start(hbox, expand=False, fill=True)220 vbox.pack_start(hbox, expand=False, fill=True)
217 221
@@ -234,11 +238,11 @@
234238
235 self.add(vbox)239 self.add(vbox)
236240
237 def _search_by_text(self, accel_group, window, key, modifiers):241 def _search_by_text(self, *ignored): # (accel_group, window, key, modifiers):
238 self._search.show_for('text')242 self._search.show_for('text')
239 self._search.set_target(self.annoview, TEXT_LINE_COL)243 self._search.set_target(self.annoview, TEXT_LINE_COL)
240244
241 def _search_by_line(self, accel_group, window, key, modifiers):245 def _search_by_line(self, *ignored): # accel_group, window, key, modifiers):
242 self._search.show_for('line')246 self._search.show_for('line')
243 self._search.set_target(self.annoview, LINE_NUM_COL)247 self._search.set_target(self.annoview, LINE_NUM_COL)
244248
@@ -344,6 +348,27 @@
344 button.set_sensitive(False)348 button.set_sensitive(False)
345 return button349 return button
346350
351 def _create_find_button(self):
352 button = gtk.Button()
353 button.set_use_stock(True)
354 button.set_label("gtk-find")
355 button.set_tooltip_text("Search for text (Ctrl+F)")
356 button.connect("clicked", self._search_by_text)
357 button.set_relief(gtk.RELIEF_NONE)
358 button.show()
359 button.set_sensitive(True)
360 return button
361
362 def _create_goto_button(self):
363 button = gtk.Button()
364 button.set_label("Goto Line")
365 button.set_tooltip_text("Scroll to a line by entering its number (Ctrl+G)")
366 button.connect("clicked", self._search_by_line)
367 button.set_relief(gtk.RELIEF_NONE)
368 button.show()
369 button.set_sensitive(True)
370 return button
371
347 def go_back(self):372 def go_back(self):
348 last_tree = self.tree373 last_tree = self.tree
349 rev_id = self._selected_revision()374 rev_id = self._selected_revision()
350375
=== modified file 'commands.py'
--- commands.py 2010-01-26 16:54:44 +0000
+++ commands.py 2010-05-27 02:30:45 +0000
@@ -199,6 +199,9 @@
199 """GTK+ annotate.199 """GTK+ annotate.
200 200
201 Browse changes to FILENAME line by line in a GTK+ window.201 Browse changes to FILENAME line by line in a GTK+ window.
202
203 Within the annotate window, you can use Ctrl-F to search for text, and
204 Ctrl-G to jump to a line by number.
202 """205 """
203206
204 takes_args = ["filename", "line?"]207 takes_args = ["filename", "line?"]

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: