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

  • Committer: Vincent Ladeuil
  • Date: 2009-05-28 15:14:14 UTC
  • mto: This revision was merged to the branch mainline in revision 640.
  • Revision ID: v.ladeuil+lp@free.fr-20090528151414-q5rlh8kaicx2hgqo
Implement commit message saving without modifying bzrlib.

* tests/test_commit.py:
(TestSavedCommitMessages.setUp): Install the post_uncommit hook
for all relevant tests.
(TestUncommitHook.setUp): Use explicit rev-ids to ease debugging.

* commit.py: 
Fix imports. Integrate SavedCommitMessagesManager so that we don't
need to modify bzrlib anymore.
(CommitDialog.__init__, CommitDialog._fill_in_files,
CommitDialog._construct_global_message, CommitDialog._do_cancel,
CommitDialog._do_commit): Stop testing can_save_commit_messages,
SavedCommitMessagesManager is always available now.
(SavedCommitMessagesManager): Borrowed from Anne Mohsen's patch.
(save_commit_messages): Implement the post_uncommit hook.

* __init__.py:
Install a lazy hook.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
class BranchSelectionBox(gtk.HBox):
31
31
    def __init__(self, path=None):
32
 
        super(BranchSelectionBox, self).__init__()
 
32
        gobject.GObject.__init__(self)
33
33
        self._combo = gtk.ComboBoxEntry()
34
34
        self._combo.child.connect('focus-out-event', self._on_combo_changed)
35
35
        
39
39
 
40
40
        self.add(self._combo)
41
41
 
42
 
        gobject.signal_new('branch-changed', BranchSelectionBox, 
43
 
                           gobject.SIGNAL_RUN_LAST,
44
 
                           gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
45
 
 
46
42
        if path is not None:
47
43
            self.set_url(path)
48
44
 
71
67
 
72
68
    def _on_combo_changed(self, widget, event):
73
69
        self.emit('branch-changed', widget)
74
 
    
 
70
 
 
71
gobject.signal_new('branch-changed', BranchSelectionBox, 
 
72
                   gobject.SIGNAL_RUN_LAST,
 
73
                   gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
 
74
gobject.type_register(BranchSelectionBox)