/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: Jelmer Vernooij
  • Date: 2007-03-09 17:47:28 UTC
  • Revision ID: jelmer@samba.org-20070309174728-gljlmt9b7fu0rrn9
Add simple test for tortoise_bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from dialog import error_dialog
33
33
 
34
34
from history import UrlHistory
35
 
from olive import Preferences
36
35
 
37
36
class CheckoutDialog(gtk.Dialog):
38
37
    """ New implementation of the Checkout dialog. """
39
 
    def __init__(self, path=None, parent=None, remote_path=None):
 
38
    def __init__(self, path=None, parent=None):
40
39
        """ Initialize the Checkout dialog. """
41
40
        gtk.Dialog.__init__(self, title="Checkout - Olive",
42
41
                                  parent=parent,
65
64
        # Set callbacks
66
65
        self._button_checkout.connect('clicked', self._on_checkout_clicked)
67
66
        self._button_revision.connect('clicked', self._on_revision_clicked)
68
 
        self._combo.child.connect('focus-out-event', self._on_combo_changed)
 
67
        self._combo.connect('changed', self._on_combo_changed)
69
68
        
70
69
        # Create the table and pack the widgets into it
71
70
        self._table = gtk.Table(rows=3, columns=2)
93
92
        self.vbox.set_spacing(3)
94
93
        if self.path is not None:
95
94
            self._filechooser.set_filename(self.path)
96
 
        if remote_path is not None:
97
 
            self._combo.child.set_text(remote_path)
98
95
        
99
96
        # Pack some widgets
100
97
        self._hbox_revision.pack_start(self._entry_revision, True, True)
112
109
    def _build_history(self):
113
110
        """ Build up the checkout history. """
114
111
        self._combo_model = gtk.ListStore(str)
115
 
        
116
112
        for item in self._history.get_entries():
117
113
            self._combo_model.append([ item ])
118
 
        
119
 
        pref = Preferences()
120
 
        for item in pref.get_bookmarks():
121
 
            self._combo_model.append([ item ])
122
 
        
123
114
        self._combo.set_model(self._combo_model)
124
115
        self._combo.set_text_column(0)
125
116
    
188
179
        
189
180
        self.response(gtk.RESPONSE_OK)
190
181
    
191
 
    def _on_combo_changed(self, widget, event):
 
182
    def _on_combo_changed(self, widget):
192
183
        """ We try to get the last revision if focus lost. """
193
184
        rev = self._get_last_revno()
194
185
        if rev is None: