From 11de06a775a47ed6eae672b82e1fbf143550af29 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 30 Oct 2001 01:33:03 +0000 Subject: Check that our BonoboUIComponent has a container so we don't get a lot of 2001-10-29 Jon Trowbridge * 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 --- addressbook/gui/component/addressbook.c | 137 ++++++++++++++++---------------- addressbook/gui/widgets/e-minicard.c | 2 +- 2 files changed, 71 insertions(+), 68 deletions(-) (limited to 'addressbook/gui') 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); } diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 8991d8c757..db111b4ac7 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -812,7 +812,7 @@ remodel( EMinicard *e_minicard ) g_free(file_as); } - if ( e_card_evolution_list (e_minicard->card) ) { + if (e_minicard->card && e_card_evolution_list (e_minicard->card) ) { gnome_canvas_item_show (e_minicard->list_icon); } else { -- cgit