2006-05-17 Alex Roitman <shura@gramps-project.org>

* src/ViewManager.py: Reorder calls to make work with ArgHandler.



svn: r6702
This commit is contained in:
Alex Roitman 2006-05-18 03:11:15 +00:00
parent ae6da05e4b
commit ad2e6ddbeb
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,6 @@
2006-05-17 Alex Roitman <shura@gramps-project.org>
* src/ViewManager.py: Reorder calls to make work with ArgHandler.
2006-05-17 Don Allingham <don@gramps-project.org> 2006-05-17 Don Allingham <don@gramps-project.org>
* src/GrampsCfg.py: pychecker fixes * src/GrampsCfg.py: pychecker fixes
* src/GrampsWidgets.py: pychecker fixes * src/GrampsWidgets.py: pychecker fixes

View File

@ -192,6 +192,7 @@ class ViewManager:
self.file_loaded = False self.file_loaded = False
self._build_main_window() self._build_main_window()
self._connect_signals() self._connect_signals()
self.do_load_plugins()
def _build_main_window(self): def _build_main_window(self):
""" """
@ -280,8 +281,6 @@ class ViewManager:
self.db_loader = DbLoader(self.state,self.uistate) self.db_loader = DbLoader(self.state,self.uistate)
self.window.show()
if self.show_sidebar: if self.show_sidebar:
self.ebox.show() self.ebox.show()
self.notebook.set_show_tabs(False) self.notebook.set_show_tabs(False)
@ -294,6 +293,11 @@ class ViewManager:
else: else:
self.toolbar.hide() self.toolbar.hide()
# Showing the main window is deferred so that
# ArgHandler can work without it always shown
# But we need to realize it here to have gtk.gdk.window handy
self.window.realize()
def _connect_signals(self): def _connect_signals(self):
""" """
connects the signals needed connects the signals needed
@ -408,12 +412,15 @@ class ViewManager:
if not self.file_loaded: if not self.file_loaded:
self.actiongroup.set_visible(False) self.actiongroup.set_visible(False)
self.fileactions.set_sensitive(False) self.fileactions.set_sensitive(False)
self.do_load_plugins()
self.build_tools_menu() self.build_tools_menu()
self.build_report_menu() self.build_report_menu()
self.fileactions.set_sensitive(True) self.fileactions.set_sensitive(True)
self.uistate.widget.set_sensitive(True) self.uistate.widget.set_sensitive(True)
# Showing the main window is deferred so that
# ArgHandler can work without it always shown
self.window.show()
def do_load_plugins(self): def do_load_plugins(self):
self.uistate.status_text(_('Loading document formats...')) self.uistate.status_text(_('Loading document formats...'))
error = load_plugins(const.docgenDir) error = load_plugins(const.docgenDir)