aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/component/addressbook.c8
2 files changed, 11 insertions, 3 deletions
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 <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
+
2004-01-15 Hans Petter Jansson <hpj@ximian.com>
* 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);