~bzr/bzr-gtk/credits.pickle-hack

« back to all changes in this revision

Viewing changes to annotate/gannotate.py

  • Committer: Jelmer Vernooij
  • Date: 2010-07-21 18:02:15 UTC
  • mfrom: (621.18.41 trunk)
  • Revision ID: jelmer@debian.org-20100721180215-c651psxtlatgthnp
* New upstream snapshot.
 + Copes with newer versions of gnomekeyring raising IOError.
   Closes: #581820
* Bump standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
        hbox.pack_start(self.back_button, expand=False, fill=True)
213
213
        self.forward_button = self._create_forward_button()
214
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
219
        hbox.show()
216
220
        vbox.pack_start(hbox, expand=False, fill=True)
217
221
        
234
238
 
235
239
        self.add(vbox)
236
240
 
237
 
    def _search_by_text(self, accel_group, window, key, modifiers):
 
241
    def _search_by_text(self, *ignored): # (accel_group, window, key, modifiers):
238
242
        self._search.show_for('text')
239
243
        self._search.set_target(self.annoview, TEXT_LINE_COL)
240
244
 
241
 
    def _search_by_line(self, accel_group, window, key, modifiers):
 
245
    def _search_by_line(self, *ignored): # accel_group, window, key, modifiers):
242
246
        self._search.show_for('line')
243
247
        self._search.set_target(self.annoview, LINE_NUM_COL)
244
248
 
344
348
        button.set_sensitive(False)
345
349
        return button
346
350
 
 
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
372
    def go_back(self):
348
373
        last_tree = self.tree
349
374
        rev_id = self._selected_revision()