From 716a7195c0ba559bea3afe14117f8789a0a33872 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 16 Jan 2004 18:52:22 +0000 Subject: only set the menus and command state if we actually are already displayed, 2004-01-16 JP Rosevear * gui/component/addressbook.c (set_prop): only set the menus and command state if we actually are already displayed, otherwise wait for activation svn path=/trunk/; revision=24283 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/component/addressbook.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 0ff8e4dec2..5c7f028102 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-01-16 JP Rosevear + + * gui/component/addressbook.c (set_prop): only set the menus and + command state if we actually are already displayed, otherwise wait + for activation + 2004-01-15 Hans Petter Jansson * gui/widgets/e-addressbook-view.c (set_paned_position): Implement. diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index a553a2641a..b317e46c12 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -950,9 +950,11 @@ set_prop (BonoboPropertyBag *bag, gtk_notebook_page_num (GTK_NOTEBOOK (view->notebook), uid_view)); - /* change menus/toolbars to reflect the new view */ - eab_view_setup_menus (EAB_VIEW (uid_view), bonobo_control_get_ui_component (view->control)); - update_command_state (EAB_VIEW (uid_view), view); + /* change menus/toolbars to reflect the new view, assuming we are already displayed */ + if (bonobo_ui_component_get_container (bonobo_control_get_ui_component (view->control)) != CORBA_OBJECT_NIL) { + eab_view_setup_menus (EAB_VIEW (uid_view), bonobo_control_get_ui_component (view->control)); + update_command_state (EAB_VIEW (uid_view), view); + } } else { g_warning ("Could not find source by UID '%s'!", uid); -- cgit