aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-01-17 02:52:22 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-17 02:52:22 +0800
commit716a7195c0ba559bea3afe14117f8789a0a33872 (patch)
treee32d7386735425389c29b99d4be8dc4d74fc29a7 /addressbook/gui/component/addressbook.c
parent3177b2e3cc6631d86270d3ac12e2863866b1667c (diff)
downloadgsoc2013-evolution-716a7195c0ba559bea3afe14117f8789a0a33872.tar.gz
gsoc2013-evolution-716a7195c0ba559bea3afe14117f8789a0a33872.tar.zst
gsoc2013-evolution-716a7195c0ba559bea3afe14117f8789a0a33872.zip
only set the menus and command state if we actually are already displayed,
2004-01-16 JP Rosevear <jpr@ximian.com> * 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
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r--addressbook/gui/component/addressbook.c8
1 files changed, 5 insertions, 3 deletions
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);