/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

  • Committer: Gary van der Merwe
  • Date: 2007-09-24 10:50:52 UTC
  • mto: This revision was merged to the branch mainline in revision 293.
  • Revision ID: garyvdm@gmail.com-20070924105052-azwgxqmhtvl5z1qz
Add a message to the viz window to indicate that graph is still loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        self.add(vbox)
58
58
 
59
59
        vbox.pack_start(self.construct_navigation(), expand=False, fill=True)
60
 
 
 
60
        vbox.pack_start(self.construct_loading_msg(), expand=False, fill=True)
 
61
        
61
62
        paned = gtk.VPaned()
62
63
        paned.pack1(self.construct_top(), resize=True, shrink=False)
63
64
        paned.pack2(self.construct_bottom(), resize=False, shrink=True)
66
67
        vbox.set_focus_child(paned)
67
68
 
68
69
        vbox.show()
 
70
    
 
71
    def construct_loading_msg(self):
 
72
        image_loading = gtk.image_new_from_stock(gtk.STOCK_REFRESH,
 
73
                                                 gtk.ICON_SIZE_BUTTON)
 
74
        image_loading.show()
 
75
        
 
76
        label_loading = gtk.Label(_("Please wait, loading ancestral graph..."))
 
77
        label_loading.set_alignment(0.0, 0.5)        
 
78
        label_loading.show()
 
79
        
 
80
        self.loading_msg_box = gtk.HBox()
 
81
        self.loading_msg_box.set_spacing(5)
 
82
        self.loading_msg_box.set_border_width(5)        
 
83
        self.loading_msg_box.pack_start(image_loading, False, False)
 
84
        self.loading_msg_box.pack_start(label_loading, True, True)
 
85
        self.loading_msg_box.show()
 
86
        
 
87
        return self.loading_msg_box
69
88
 
70
89
    def construct_top(self):
71
90
        """Construct the top-half of the window."""
203
222
            if maxnum is not None and index > maxnum:
204
223
                break
205
224
        self.treeview.set_model(self.model)
 
225
        self.loading_msg_box.hide()
206
226
        return False
207
227
    
208
228
    def _on_key_pressed(self, widget, event):