diff options
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index b0118fc9e6..55d5f550f8 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,13 @@ 2004-03-24 Chris Toshok <toshok@ximian.com> + * gui/component/addressbook-component.c + (fill_popup_menu_callback): don't let the user delete their + Personal addressbook. This is just a nice UI thingy.. A similar + fix needs to be made to e-d-s. so that attempts that circumvent a + nice UI will also fail. + +2004-03-24 Chris Toshok <toshok@ximian.com> + * gui/widgets/eab-gui-util.c (eab_show_multiple_contacts): don't know what I was thinking approving this change. the _() was only used in the plural case (in fact where n > 5), so a singular case diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 48aef349b3..8109c1e4e6 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -302,11 +302,16 @@ static void fill_popup_menu_callback (ESourceSelector *selector, GtkMenu *menu, AddressbookComponent *comp) { gboolean sensitive; + gboolean local_addressbook; + ESource *selected_source; - sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (comp->priv->source_selector)) ? TRUE : FALSE; + selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (comp->priv->source_selector)); + sensitive = selected_source ? TRUE : FALSE; + local_addressbook = (!strcmp ("system", e_source_peek_relative_uri (selected_source))); + add_popup_menu_item (menu, _("New Address Book"), NULL, G_CALLBACK (new_addressbook_cb), comp, TRUE); - add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_addressbook_cb), comp, sensitive); + add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_addressbook_cb), comp, sensitive && !local_addressbook); add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_addressbook_cb), comp, sensitive); } |