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

Proposed by Martin Pool
Status: Superseded
Proposed branch: lp:~mbp/bzr-gtk/201956-help
Merge into: lp:bzr-gtk/gtk2
Diff against target: 82 lines (+31/-2)
3 files modified
NEWS (+3/-0)
annotate/gannotate.py (+25/-2)
commands.py (+3/-0)
To merge this branch: bzr merge lp:~mbp/bzr-gtk/201956-help
Reviewer Review Type Date Requested Status
Bazaar GTK maintainers Pending
Review via email: mp+26111@code.launchpad.net

This proposal has been superseded by a proposal from 2010-05-27.

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.

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

Just land it!

lp:~mbp/bzr-gtk/201956-help updated
690. By Martin Pool

Describe what Ctrl-G actually does

691. By Martin Pool

Add 'Find' button to start text search

692. By Martin Pool

Add button to goto-line too

693. By Martin Pool

Also show tooltips on find/goto buttons

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-03-18 09:20:09 +0000
3+++ NEWS 2010-05-27 02:15:35 +0000
4@@ -12,6 +12,9 @@
5
6 FEATURES
7
8+ * Add 'Find' button to start text search.
9+ (Martin Pool, #556347)
10+
11 * Add 'glog' as an alias for visualize (aka viz) as too many
12 people are still confused.
13 (Vincent Ladeuil)
14
15=== modified file 'annotate/gannotate.py'
16--- annotate/gannotate.py 2009-06-05 12:18:50 +0000
17+++ annotate/gannotate.py 2010-05-27 02:15:35 +0000
18@@ -212,6 +212,10 @@
19 hbox.pack_start(self.back_button, expand=False, fill=True)
20 self.forward_button = self._create_forward_button()
21 hbox.pack_start(self.forward_button, expand=False, fill=True)
22+ self.find_button = self._create_find_button()
23+ hbox.pack_start(self.find_button, expand=False, fill=True)
24+ self.goto_button = self._create_goto_button()
25+ hbox.pack_start(self.goto_button, expand=False, fill=True)
26 hbox.show()
27 vbox.pack_start(hbox, expand=False, fill=True)
28
29@@ -234,11 +238,11 @@
30
31 self.add(vbox)
32
33- def _search_by_text(self, accel_group, window, key, modifiers):
34+ def _search_by_text(self, *ignored): # (accel_group, window, key, modifiers):
35 self._search.show_for('text')
36 self._search.set_target(self.annoview, TEXT_LINE_COL)
37
38- def _search_by_line(self, accel_group, window, key, modifiers):
39+ def _search_by_line(self, *ignored): # accel_group, window, key, modifiers):
40 self._search.show_for('line')
41 self._search.set_target(self.annoview, LINE_NUM_COL)
42
43@@ -344,6 +348,25 @@
44 button.set_sensitive(False)
45 return button
46
47+ def _create_find_button(self):
48+ button = gtk.Button()
49+ button.set_use_stock(True)
50+ button.set_label("gtk-find")
51+ button.connect("clicked", self._search_by_text)
52+ button.set_relief(gtk.RELIEF_NONE)
53+ button.show()
54+ button.set_sensitive(True)
55+ return button
56+
57+ def _create_goto_button(self):
58+ button = gtk.Button()
59+ button.set_label("Goto Line")
60+ button.connect("clicked", self._search_by_line)
61+ button.set_relief(gtk.RELIEF_NONE)
62+ button.show()
63+ button.set_sensitive(True)
64+ return button
65+
66 def go_back(self):
67 last_tree = self.tree
68 rev_id = self._selected_revision()
69
70=== modified file 'commands.py'
71--- commands.py 2010-01-26 16:54:44 +0000
72+++ commands.py 2010-05-27 02:15:35 +0000
73@@ -199,6 +199,9 @@
74 """GTK+ annotate.
75
76 Browse changes to FILENAME line by line in a GTK+ window.
77+
78+ Within the annotate window, you can use Ctrl-F to search for text, and
79+ Ctrl-G to jump to a line by number.
80 """
81
82 takes_args = ["filename", "line?"]

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: