/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: 2012-03-22 17:14:22 UTC
  • mto: This revision was merged to the branch mainline in revision 789.
  • Revision ID: sinzui.is@verizon.net-20120322171422-l7bq6muqqgr36nxr
Ensure that the per/file message widget fits at least one line.

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