/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 branchview/treeview.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-15 14:02:08 UTC
  • mto: This revision was merged to the branch mainline in revision 649.
  • Revision ID: v.ladeuil+lp@free.fr-20090615140208-k5zg9c0vttrr9se8
Integrater Jelmer patch and implement a more robust solution.

* ui.py:
(GtkUIFactory._progress_all_finished): *Don't* uninstall the
widget.

* branchview/treeview.py:
(TreeView.__init__): Unconditionally install the progress widget
that will remain active until someone else install one or the
TreeView is destroyed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
 
113
113
        self.progress_widget = ProgressPanel()
114
114
        self.pack_start(self.progress_widget, expand=False, fill=True)
 
115
        if getattr(ui.ui_factory, "set_progress_bar_widget", None) is not None:
 
116
            # We'are using our own ui, let's tell it to use our widget.
 
117
            ui.ui_factory.set_progress_bar_widget(self.progress_widget)
115
118
 
116
119
        self.scrolled_window = gtk.ScrolledWindow()
117
120
        self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
133
136
 
134
137
        gobject.idle_add(self.populate)
135
138
 
136
 
        self.connect("destroy", lambda x: self.branch.unlock())
 
139
        self.connect("destroy", self._on_destroy)
 
140
 
 
141
    def _on_destroy(self, *ignored):
 
142
        self.branch.unlock()
 
143
        if getattr(ui.ui_factory, "set_progress_bar_widget", None) is not None:
 
144
            # We'are using our own ui, let's tell it to stop using our widget.
 
145
            ui.ui_factory.set_progress_bar_widget(None)
137
146
 
138
147
    def do_get_property(self, property):
139
148
        if property.name == 'revno-column-visible':