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/ChangeLog | 18 +++++ addressbook/gui/component/addressbook.c | 137 ++++++++++++++++---------------- addressbook/gui/widgets/e-minicard.c | 2 +- addressbook/printing/e-contact-print.c | 2 +- addressbook/printing/medbook.ecps | 2 +- addressbook/printing/phonelist.ecps | 2 +- addressbook/printing/smallbook.ecps | 2 +- 7 files changed, 93 insertions(+), 72 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 238e55a82f..439418d246 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,21 @@ +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. + 2001-10-29 Jon Trowbridge * gui/component/select-names/e-select-names-completion.c 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 { diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index b386b3bd31..7f94cf05ec 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -439,7 +439,7 @@ e_contact_get_card_size(ECardSimple *simple, EContactPrintContext *ctxt) } height += gnome_font_get_size (ctxt->style->headings_font) * .4; - g_message ("%s %g", e_card_simple_get (simple, E_CARD_SIMPLE_FIELD_FILE_AS), height); + /* g_message ("%s %g", e_card_simple_get (simple, E_CARD_SIMPLE_FIELD_FILE_AS), height); */ return height; } diff --git a/addressbook/printing/medbook.ecps b/addressbook/printing/medbook.ecps index 72cca146dd..ef76c0b46e 100644 --- a/addressbook/printing/medbook.ecps +++ b/addressbook/printing/medbook.ecps @@ -6,7 +6,7 @@ 2 TRUE TRUE -Helvetica-Bold 12 +Helvetica Bold 12 Helvetica 8 TRUE 8.5 diff --git a/addressbook/printing/phonelist.ecps b/addressbook/printing/phonelist.ecps index 53ca294d36..980750a6b2 100644 --- a/addressbook/printing/phonelist.ecps +++ b/addressbook/printing/phonelist.ecps @@ -5,7 +5,7 @@ 2 FALSE TRUE -Helvetica-Bold 10 +Helvetica Bold 10 Helvetica 8 TRUE 8.5 diff --git a/addressbook/printing/smallbook.ecps b/addressbook/printing/smallbook.ecps index 5844851bfb..0bb19aa92e 100644 --- a/addressbook/printing/smallbook.ecps +++ b/addressbook/printing/smallbook.ecps @@ -6,7 +6,7 @@ 2 TRUE TRUE -Helvetica-Bold 8 +Helvetica Bold 8 Helvetica 6 TRUE 8.5 -- cgit v1.2.3