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

  • Committer: Curtis Hovey
  • Date: 2011-08-01 20:28:54 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110801202854-eybt6inxyjg7shz6
Added a very rough fix to see gannontation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
    def __init__(self, path=None, parent=None, remote_path=None):
35
35
        """ Initialize the Checkout dialog. """
36
 
        super(CheckoutDialog, self).__init__(
37
 
            title="Checkout - Olive", parent=parent, flags=0,
38
 
            buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
 
36
        GObject.GObject.__init__(self, title="Checkout - Olive",
 
37
                                  parent=parent,
 
38
                                  flags=0,
 
39
                                  buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
39
40
 
40
41
        # Get arguments
41
42
        self.path = path
45
46
        self._button_revision = Gtk.Button('')
46
47
        self._image_browse = Gtk.Image()
47
48
        self._filechooser = Gtk.FileChooserButton(_i18n("Please select a folder"))
48
 
        self._combo = Gtk.ComboBox.new_with_entry()
 
49
        self._combo = Gtk.ComboBoxEntry()
49
50
        self._label_location = Gtk.Label(label=_i18n("Branch location:"))
50
51
        self._label_destination = Gtk.Label(label=_i18n("Destination:"))
51
52
        self._label_nick = Gtk.Label(label=_i18n("Branch nick:"))
84
85
        self._label_revision.set_alignment(0, 0.5)
85
86
        self._table.set_row_spacings(3)
86
87
        self._table.set_col_spacings(3)
87
 
        self.get_content_area().set_spacing(3)
 
88
        self.vbox.set_spacing(3)
88
89
        if self.path is not None:
89
90
            self._filechooser.set_filename(self.path)
90
91
        if remote_path is not None:
91
92
            self._combo.get_child().set_text(remote_path)
92
93
 
93
94
        # Pack some widgets
94
 
        self._hbox_revision.pack_start(self._entry_revision, True, True, 0)
95
 
        self._hbox_revision.pack_start(self._button_revision, False, False, 0)
96
 
        self.get_content_area().add(self._table)
97
 
        self.action_area.pack_end(self._button_checkout, False, False, 0)
 
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_checkout)
98
99
 
99
100
        # Show the dialog
100
 
        self.get_content_area().show_all()
 
101
        self.vbox.show_all()
101
102
 
102
103
        # Build checkout history
103
104
        self._history = UrlHistory(GlobalConfig(), 'branch_history')
111
112
            self._combo_model.append([ item ])
112
113
 
113
114
        self._combo.set_model(self._combo_model)
114
 
        self._combo.set_entry_text_column(0)
 
115
        self._combo.set_text_column(0)
115
116
 
116
117
    def _get_last_revno(self):
117
118
        """ Get the revno of the last revision (if any). """