/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: Curtis Hovey
  • Date: 2011-09-08 03:11:06 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110908031106-c0s7grzmctdyghcm
Fixed packing args.

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.Paned.new(Gtk.Orientation.HORIZONTAL)
 
137
            self.paned = Gtk.HPaned()
138
138
        else:
139
 
            self.paned = Gtk.Paned.new(Gtk.Orientation.VERTICAL)
 
139
            self.paned = Gtk.VPaned()
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.Paned.new(Gtk.Orientation.VERTICAL)
 
374
            self.diff_paned = Gtk.VPaned()
375
375
        else:
376
 
            self.diff_paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)
 
376
            self.diff_paned = Gtk.HPaned()
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
 
        if revision is not None:
482
 
            self.show_diff(revision.revision_id, parent_id)
483
 
        else:
484
 
            self.show_diff(NULL_REVISION)
 
481
        self.show_diff(revision.revision_id, parent_id)
485
482
        self.treeview.grab_focus()
486
483
 
487
484
    def _back_clicked_cb(self, *args):
545
542
        dialog = SearchDialog(index)
546
543
 
547
544
        if dialog.run() == Gtk.ResponseType.OK:
548
 
            revid = dialog.get_revision()
549
 
            if revid is not None:
550
 
                self.set_revision(revid)
 
545
            self.set_revision(dialog.get_revision())
551
546
 
552
547
        dialog.destroy()
553
548
 
657
652
            return width, height
658
653
        return None
659
654
 
660
 
    def show_diff(self, revid, parentid=NULL_REVISION):
 
655
    def show_diff(self, revid=None, parentid=NULL_REVISION):
661
656
        """Open a new window to show a diff between the given revisions."""
662
657
        from bzrlib.plugins.gtk.diff import DiffWindow
663
658
        window = DiffWindow(parent=self)