/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 viz/branchwin.py

  • Committer: Jelmer Vernooij
  • Date: 2012-07-09 15:23:26 UTC
  • mto: This revision was merged to the branch mainline in revision 794.
  • Revision ID: jelmer@samba.org-20120709152326-dzxb8zoz0btull7n
Remove bzr-notify.

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
    def construct_paned(self):
135
135
        """Construct the main HPaned/VPaned contents."""
136
136
        if self.config.get_user_option('viz-vertical') == 'True':
137
 
            self.paned = Gtk.HPaned()
 
137
            self.paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)
138
138
        else:
139
 
            self.paned = Gtk.VPaned()
 
139
            self.paned = Gtk.Paned.new(Gtk.Orientation.VERTICAL)
140
140
 
141
141
        self.paned.pack1(self.construct_top(), resize=False, shrink=True)
142
142
        self.paned.pack2(self.construct_bottom(), resize=True, shrink=False)
371
371
    def construct_bottom(self):
372
372
        """Construct the bottom half of the window."""
373
373
        if self.config.get_user_option('viz-wide-diffs') == 'True':
374
 
            self.diff_paned = Gtk.VPaned()
 
374
            self.diff_paned = Gtk.Paned.new(Gtk.Orientation.VERTICAL)
375
375
        else:
376
 
            self.diff_paned = Gtk.HPaned()
 
376
            self.diff_paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)
377
377
        (width, height) = self.get_size()
378
378
        self.diff_paned.set_size_request(20, 20) # shrinkable
379
379
 
478
478
        else:
479
479
            parent_id = parents[0]
480
480
 
481
 
        self.show_diff(revision.revision_id, parent_id)
 
481
        if revision is not None:
 
482
            self.show_diff(revision.revision_id, parent_id)
 
483
        else:
 
484
            self.show_diff(NULL_REVISION)
482
485
        self.treeview.grab_focus()
483
486
 
484
487
    def _back_clicked_cb(self, *args):
542
545
        dialog = SearchDialog(index)
543
546
 
544
547
        if dialog.run() == Gtk.ResponseType.OK:
545
 
            self.set_revision(dialog.get_revision())
 
548
            revid = dialog.get_revision()
 
549
            if revid is not None:
 
550
                self.set_revision(revid)
546
551
 
547
552
        dialog.destroy()
548
553
 
652
657
            return width, height
653
658
        return None
654
659
 
655
 
    def show_diff(self, revid=None, parentid=NULL_REVISION):
 
660
    def show_diff(self, revid, parentid=NULL_REVISION):
656
661
        """Open a new window to show a diff between the given revisions."""
657
662
        from bzrlib.plugins.gtk.diff import DiffWindow
658
663
        window = DiffWindow(parent=self)