aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-30 09:33:03 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-30 09:33:03 +0800
commit11de06a775a47ed6eae672b82e1fbf143550af29 (patch)
tree173f0c71d50d1ac5c239051233761ee51fbee640 /addressbook/gui/component/addressbook.c
parentb14590968a2d3fe382797c608046afdeb93538b8 (diff)
downloadgsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.gz
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.bz2
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.lz
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.xz
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.zst
gsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.zip
Check that our BonoboUIComponent has a container so we don't get a lot of
2001-10-29 Jon Trowbridge <trow@ximian.com> * gui/component/addressbook.c (update_command_state): Check that our BonoboUIComponent has a container so we don't get a lot of annoying debug spew. * printing/smallbook.ecps: Fixed fonts. * printing/phonelist.ecps: Fixed fonts. * printing/medbook.ecps: Fixed fonts. * printing/e-contact-print.c (e_contact_get_card_size): Commented out spew. * gui/widgets/e-minicard.c (remodel): Check that e_minicard->card != NULL. svn path=/trunk/; revision=14391
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r--addressbook/gui/component/addressbook.c137
1 files changed, 70 insertions, 67 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 4cc967276a..3826978f64 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -225,73 +225,76 @@ update_command_state (EAddressbookView *eav, AddressbookView *view)
uic = bonobo_control_get_ui_component (view->control);
-
- /* New Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactNew",
- "sensitive",
- e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactNewList",
- "sensitive",
- e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSaveAsVCard",
- "sensitive",
- e_addressbook_view_can_save_as (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrint",
- "sensitive",
- e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrintPreview",
- "sensitive",
- e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Delete Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactDelete",
- "sensitive",
- e_addressbook_view_can_delete (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCut",
- "sensitive",
- e_addressbook_view_can_cut (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCopy",
- "sensitive",
- e_addressbook_view_can_copy (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPaste",
- "sensitive",
- e_addressbook_view_can_paste (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSelectAll",
- "sensitive",
- e_addressbook_view_can_select_all (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendContactToOther",
- "sensitive",
- e_addressbook_view_can_send (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendMessageToContact",
- "sensitive",
- e_addressbook_view_can_send_to (view->view) ? "1" : "0", NULL);
-
-
- /* Stop */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactStop",
- "sensitive",
- e_addressbook_view_can_stop (view->view) ? "1" : "0", NULL);
+ if (bonobo_ui_component_get_container (uic) != CORBA_OBJECT_NIL) {
+
+ /* New Contact */
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactNew",
+ "sensitive",
+ e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactNewList",
+ "sensitive",
+ e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
+
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsSaveAsVCard",
+ "sensitive",
+ e_addressbook_view_can_save_as (view->view) ? "1" : "0", NULL);
+
+ /* Print Contact */
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsPrint",
+ "sensitive",
+ e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
+
+ /* Print Contact */
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsPrintPreview",
+ "sensitive",
+ e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
+
+ /* Delete Contact */
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactDelete",
+ "sensitive",
+ e_addressbook_view_can_delete (view->view) ? "1" : "0", NULL);
+
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsCut",
+ "sensitive",
+ e_addressbook_view_can_cut (view->view) ? "1" : "0", NULL);
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsCopy",
+ "sensitive",
+ e_addressbook_view_can_copy (view->view) ? "1" : "0", NULL);
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsPaste",
+ "sensitive",
+ e_addressbook_view_can_paste (view->view) ? "1" : "0", NULL);
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsSelectAll",
+ "sensitive",
+ e_addressbook_view_can_select_all (view->view) ? "1" : "0", NULL);
+
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsSendContactToOther",
+ "sensitive",
+ e_addressbook_view_can_send (view->view) ? "1" : "0", NULL);
+
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactsSendMessageToContact",
+ "sensitive",
+ e_addressbook_view_can_send_to (view->view) ? "1" : "0", NULL);
+
+
+ /* Stop */
+ bonobo_ui_component_set_prop (uic,
+ "/commands/ContactStop",
+ "sensitive",
+ e_addressbook_view_can_stop (view->view) ? "1" : "0", NULL);
+
+ }
addressbook_view_unref (view);
}