/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: 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:
33
33
from dialog import error_dialog, info_dialog
34
34
 
35
35
from history import UrlHistory
36
 
from olive import Preferences
37
36
 
38
37
class BranchDialog(gtk.Dialog):
39
38
    """ New implementation of the Branch dialog. """
40
 
 
41
 
    def __init__(self, path=None, parent=None, remote_path=None):
 
39
    def __init__(self, path=None, parent=None):
42
40
        """ Initialize the Branch dialog. """
43
41
        gtk.Dialog.__init__(self, title="Branch - Olive",
44
42
                                  parent=parent,
65
63
        # Set callbacks
66
64
        self._button_branch.connect('clicked', self._on_branch_clicked)
67
65
        self._button_revision.connect('clicked', self._on_revision_clicked)
68
 
        self._combo.child.connect('focus-out-event', self._on_combo_changed)
 
66
        self._combo.connect('changed', self._on_combo_changed)
69
67
        
70
68
        # Create the table and pack the widgets into it
71
69
        self._table = gtk.Table(rows=3, columns=2)
92
90
        self.vbox.set_spacing(3)
93
91
        if self.path is not None:
94
92
            self._filechooser.set_filename(self.path)
95
 
        if remote_path is not None:
96
 
            self._combo.child.set_text(remote_path)
97
93
        
98
94
        # Pack some widgets
99
95
        self._hbox_revision.pack_start(self._entry_revision, True, True)
111
107
    def _build_history(self):
112
108
        """ Build up the branch history. """
113
109
        self._combo_model = gtk.ListStore(str)
114
 
        
115
110
        for item in self._history.get_entries():
116
111
            self._combo_model.append([ item ])
117
 
        
118
 
        pref = Preferences()
119
 
        for item in pref.get_bookmarks():
120
 
            self._combo_model.append([ item ])
121
 
        
122
112
        self._combo.set_model(self._combo_model)
123
113
        self._combo.set_text_column(0)
124
114
    
207
197
        
208
198
        self.response(gtk.RESPONSE_OK)
209
199
    
210
 
    def _on_combo_changed(self, widget, event):
 
200
    def _on_combo_changed(self, widget):
211
201
        """ We try to get the last revision if focus lost. """
212
202
        rev = self._get_last_revno()
213
203
        if rev is None: