/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 branch.py

  • Committer: Curtis Hovey
  • Date: 2011-09-05 03:44:26 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110905034426-p98pxnay9rmzkr99
Fix the initializer for many classes.
Replace Gtk.Dialog.vbox with .get_content_area().

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import os
18
18
 
19
 
from gi.repository import GObject
20
19
from gi.repository import Gtk
21
20
 
22
21
from bzrlib import (
36
35
 
37
36
    def __init__(self, path=None, parent=None, remote_path=None):
38
37
        """ Initialize the Branch dialog. """
39
 
        GObject.GObject.__init__(self, title="Branch - Olive",
40
 
                                  parent=parent,
41
 
                                  flags=0,
42
 
                                  buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
 
38
        super(BranchDialog, self).__init__(
 
39
            title="Branch - Olive", parent=parent, flags=0,
 
40
            buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
43
41
 
44
42
        # Get arguments
45
43
        self.path = path
85
83
        self._label_revision.set_alignment(0, 0.5)
86
84
        self._table.set_row_spacings(3)
87
85
        self._table.set_col_spacings(3)
88
 
        self.vbox.set_spacing(3)
 
86
        self.get_content_area().set_spacing(3)
89
87
        if remote_path is not None:
90
88
            self._remote_branch.set_url(remote_path)
91
89
        if self.path is not None:
92
90
            self._filechooser.set_filename(self.path)
93
91
 
94
92
        # Pack some widgets
95
 
        self._hbox_revision.pack_start(self._entry_revision, True, True)
96
 
        self._hbox_revision.pack_start(self._button_revision, False, False)
97
 
        self.vbox.add(self._table)
98
 
        self.action_area.pack_end(self._button_branch)
 
93
        self._hbox_revision.pack_start(self._entry_revision, True, True, 0)
 
94
        self._hbox_revision.pack_start(self._button_revision, False, False, 0)
 
95
        self.get_content_area().add(self._table)
 
96
        self.action_area.pack_end(self._button_branch, False, False, 0)
99
97
 
100
98
        # Show the dialog
101
 
        self.vbox.show_all()
 
99
        self.get_content_area().show_all()
102
100
 
103
101
    def _get_last_revno(self):
104
102
        """ Get the revno of the last revision (if any). """