/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: Curtis Hovey
  • Date: 2011-08-29 14:12:30 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110829141230-6nv7h0oxjrojb1y1
Updated hacking doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.revision import NULL_REVISION, CURRENT_REVISION
28
28
 
29
29
from bzrlib.plugins.gtk.annotate.colormap import AnnotateColorSaturation
30
 
from bzrlib.plugins.gtk.i18n import _i18n
31
30
from bzrlib.plugins.gtk.revisionview import RevisionView
32
31
from bzrlib.plugins.gtk.window import Window
33
32
 
50
49
        self.plain = plain
51
50
        self._branch = branch
52
51
 
53
 
        super(GAnnotateWindow, self).__init__(parent=parent)
 
52
        Window.__init__(self, parent)
54
53
 
55
54
        self.set_icon(
56
55
            self.render_icon_pixbuf(Gtk.STOCK_FIND, Gtk.IconSize.BUTTON))
134
133
        self.annoview.set_cursor(tree_path, None, False)
135
134
        self.annoview.scroll_to_cell(tree_path, use_align=True)
136
135
 
 
136
 
137
137
    def _annotate(self, tree, file_id):
138
138
        current_revision = FakeRevision(CURRENT_REVISION)
139
139
        current_revision.committer = self.branch.get_config().username()
221
221
        hbox.show()
222
222
        vbox.pack_start(hbox, False, True, 0)
223
223
 
224
 
        self.pane = pane = Gtk.Paned.new(Gtk.Orientation.VERTICAL)
 
224
        self.pane = pane = Gtk.VPaned()
225
225
        pane.add1(swbox)
226
226
        pane.add2(self.revisionview)
227
227
        pane.show()
457
457
            self.__cache[revision_id] = revision
458
458
        return self.__cache[revision_id]
459
459
 
460
 
 
461
460
class SearchBox(Gtk.HBox):
462
461
    """A button box for searching in text or lines of annotations"""
463
462
    def __init__(self):
464
 
        super(SearchBox, self).__init__(homogeneous=False, spacing=6)
 
463
        Gtk.HBox.__init__(self, homogeneous=False, spacing=6)
465
464
 
466
465
        # Close button
467
466
        button = Gtk.Button()
484
483
        self.pack_start(entry, False, False, 0)
485
484
 
486
485
        # Next/previous buttons
487
 
        button = Gtk.Button(_i18n('_Next'), use_underline=True)
 
486
        button = Gtk.Button('_Next')
488
487
        image = Gtk.Image()
489
488
        image.set_from_stock('gtk-go-forward', Gtk.IconSize.BUTTON)
490
489
        button.set_image(image)
492
491
                       'forward')
493
492
        self.pack_start(button, False, False, 0)
494
493
 
495
 
        button = Gtk.Button(_i18n('_Previous'), use_underline=True)
 
494
        button = Gtk.Button('_Previous')
496
495
        image = Gtk.Image()
497
496
        image.set_from_stock('gtk-go-back', Gtk.IconSize.BUTTON)
498
497
        button.set_image(image)