/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: Scott Scriven
  • Date: 2008-07-10 05:41:26 UTC
  • mto: This revision was merged to the branch mainline in revision 549.
  • Revision ID: ubuntu@toykeeper.net-20080710054126-710099ffvmhf5ud2
Made 'vis' save/load visibility of its toolbar.
(the menu had a working checkbox to hide the toolbar,
 but the value was never saved)

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        self.paned.pack2(self.construct_bottom(), resize=False, shrink=True)
109
109
        self.paned.show()
110
110
 
111
 
        vbox.pack_start(self.construct_menubar(), expand=False, fill=True)
112
 
        vbox.pack_start(self.construct_navigation(), expand=False, fill=True)
113
 
        
 
111
        nav = self.construct_navigation()
 
112
        menubar = self.construct_menubar()
 
113
        vbox.pack_start(menubar, expand=False, fill=True)
 
114
        vbox.pack_start(nav, expand=False, fill=True)
 
115
 
114
116
        vbox.pack_start(self.paned, expand=True, fill=True)
115
117
        vbox.set_focus_child(self.paned)
116
118
 
161
163
 
162
164
        view_menu_toolbar = gtk.CheckMenuItem("Show Toolbar")
163
165
        view_menu_toolbar.set_active(True)
 
166
        if self.config.get_user_option('viz-toolbar-visible') == 'False':
 
167
            view_menu_toolbar.set_active(False)
 
168
            self.toolbar.hide()
164
169
        view_menu_toolbar.connect('toggled', self._toolbar_visibility_changed)
165
170
 
166
171
        view_menu_compact = gtk.CheckMenuItem("Show Compact Graph")
468
473
 
469
474
    def _toolbar_visibility_changed(self, col):
470
475
        if col.get_active():
471
 
            self.toolbar.show() 
 
476
            self.toolbar.show()
472
477
        else:
473
478
            self.toolbar.hide()
 
479
        self.config.set_user_option('viz-toolbar-visible', col.get_active())
474
480
 
475
481
    def _show_about_cb(self, w):
476
482
        dialog = AboutDialog()