From ad2e6ddbeb68624537f2dfd13219e969d3db18dd Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 18 May 2006 03:11:15 +0000 Subject: [PATCH] 2006-05-17 Alex Roitman * src/ViewManager.py: Reorder calls to make work with ArgHandler. svn: r6702 --- ChangeLog | 3 +++ src/ViewManager.py | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e2f53a5d..9e504f66a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-05-17 Alex Roitman + * src/ViewManager.py: Reorder calls to make work with ArgHandler. + 2006-05-17 Don Allingham * src/GrampsCfg.py: pychecker fixes * src/GrampsWidgets.py: pychecker fixes diff --git a/src/ViewManager.py b/src/ViewManager.py index 5f08ec760..736003cc7 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -192,6 +192,7 @@ class ViewManager: self.file_loaded = False self._build_main_window() self._connect_signals() + self.do_load_plugins() def _build_main_window(self): """ @@ -280,8 +281,6 @@ class ViewManager: self.db_loader = DbLoader(self.state,self.uistate) - self.window.show() - if self.show_sidebar: self.ebox.show() self.notebook.set_show_tabs(False) @@ -294,6 +293,11 @@ class ViewManager: else: 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): """ connects the signals needed @@ -408,12 +412,15 @@ class ViewManager: if not self.file_loaded: self.actiongroup.set_visible(False) self.fileactions.set_sensitive(False) - self.do_load_plugins() self.build_tools_menu() self.build_report_menu() self.fileactions.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): self.uistate.status_text(_('Loading document formats...')) error = load_plugins(const.docgenDir)