/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 viz/branchwin.py

Move viz loading msg from branchwin to treeview.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
 
101
101
        vbox.pack_start(self.construct_menubar(), expand=False, fill=True)
102
102
        vbox.pack_start(self.construct_navigation(), expand=False, fill=True)
103
 
        vbox.pack_start(self.construct_loading_msg(), expand=False, fill=True)
104
103
        
105
104
        vbox.pack_start(self.paned, expand=True, fill=True)
106
105
        vbox.set_focus_child(self.paned)
218
217
        menubar.show_all()
219
218
 
220
219
        return menubar
221
 
    
222
 
    def construct_loading_msg(self):
223
 
        image_loading = gtk.image_new_from_stock(gtk.STOCK_REFRESH,
224
 
                                                 gtk.ICON_SIZE_BUTTON)
225
 
        image_loading.show()
226
 
        
227
 
        label_loading = gtk.Label(_("Please wait, loading ancestral graph..."))
228
 
        label_loading.set_alignment(0.0, 0.5)
229
 
        label_loading.show()
230
 
        
231
 
        self.loading_msg_box = gtk.HBox()
232
 
        self.loading_msg_box.set_spacing(5)
233
 
        self.loading_msg_box.set_border_width(5)        
234
 
        self.loading_msg_box.pack_start(image_loading, False, False)
235
 
        self.loading_msg_box.pack_start(label_loading, True, True)
236
 
        self.loading_msg_box.show()
237
 
        
238
 
        return self.loading_msg_box
239
220
 
240
221
    def construct_top(self):
241
222
        """Construct the top-half of the window."""
246
227
        self.treeview.connect('revision-selected',
247
228
                self._treeselection_changed_cb)
248
229
 
249
 
        self.treeview.connect('revisions-loaded', 
250
 
                lambda x: self.loading_msg_box.hide())
251
 
 
252
230
        self.treeview.connect('tag-added', lambda w, t, r: self._update_tags())
253
231
 
254
232
        for col in ["revno", "date"]:
421
399
        dialog.run()
422
400
 
423
401
    def _refresh_clicked(self, w):
424
 
        self.treeview.update()
 
402
        self.treeview.refresh()
425
403
 
426
404
    def _update_tags(self):
427
405
        menu = gtk.Menu()