aboutsummaryrefslogtreecommitdiffstats
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
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
-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);