/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to annotate/gannotate.py

  • Committer: Martin Pool
  • Date: 2010-05-27 02:13:27 UTC
  • mto: This revision was merged to the branch mainline in revision 689.
  • Revision ID: mbp@canonical.com-20100527021327-p6wc3eez5r8jdp5l
Add button to goto-line too

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
        hbox.pack_start(self.forward_button, expand=False, fill=True)
215
215
        self.find_button = self._create_find_button()
216
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)
217
219
        hbox.show()
218
220
        vbox.pack_start(hbox, expand=False, fill=True)
219
221
        
240
242
        self._search.show_for('text')
241
243
        self._search.set_target(self.annoview, TEXT_LINE_COL)
242
244
 
243
 
    def _search_by_line(self, accel_group, window, key, modifiers):
 
245
    def _search_by_line(self, *ignored): # accel_group, window, key, modifiers):
244
246
        self._search.show_for('line')
245
247
        self._search.set_target(self.annoview, LINE_NUM_COL)
246
248
 
356
358
        button.set_sensitive(True)
357
359
        return button
358
360
 
 
361
    def _create_goto_button(self):
 
362
        button = gtk.Button()
 
363
        button.set_label("Goto Line")
 
364
        button.connect("clicked", self._search_by_line)
 
365
        button.set_relief(gtk.RELIEF_NONE)
 
366
        button.show()
 
367
        button.set_sensitive(True)
 
368
        return button
 
369
 
359
370
    def go_back(self):
360
371
        last_tree = self.tree
361
372
        rev_id = self._selected_revision()