aboutsummaryrefslogtreecommitdiffstats
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
parentb14590968a2d3fe382797c608046afdeb93538b8 (diff)
downloadgsoc2013-evolution-11de06a775a47ed6eae672b82e1fbf143550af29.tar.gz
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
-rw-r--r--addressbook/ChangeLog18
-rw-r--r--addressbook/gui/component/addressbook.c137
-rw-r--r--addressbook/gui/widgets/e-minicard.c2
-rw-r--r--addressbook/printing/e-contact-print.c2
-rw-r--r--addressbook/printing/medbook.ecps2
-rw-r--r--addressbook/printing/phonelist.ecps2
-rw-r--r--addressbook/printing/smallbook.ecps2
7 files changed, 93 insertions, 72 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 238e55a82f..439418d246 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,23 @@
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.
+
+2001-10-29 Jon Trowbridge <trow@ximian.com>
+
* gui/component/select-names/e-select-names-completion.c
(e_select_names_completion_destroy): We were using
book_data->book_view immediately after unrefing it. Reordered the
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 @@
<blank_forms>2</blank_forms>
<letter_tabs>TRUE</letter_tabs>
<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 12</headings_font>
+<headings_font>Helvetica Bold 12</headings_font>
<body_font>Helvetica 8</body_font>
<print_using_grey>TRUE</print_using_grey>
<paper_width>8.5</paper_width>
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 @@
<num_columns>2</num_columns>
<letter_tabs>FALSE</letter_tabs>
<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 10</headings_font>
+<headings_font>Helvetica Bold 10</headings_font>
<body_font>Helvetica 8</body_font>
<print_using_grey>TRUE</print_using_grey>
<paper_width>8.5</paper_width>
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 @@
<blank_forms>2</blank_forms>
<letter_tabs>TRUE</letter_tabs>
<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 8</headings_font>
+<headings_font>Helvetica Bold 8</headings_font>
<body_font>Helvetica 6</body_font>
<print_using_grey>TRUE</print_using_grey>
<paper_width>8.5</paper_width>