diff options
author | Chris Toshok <toshok@ximian.com> | 2004-03-25 12:13:39 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-03-25 12:13:39 +0800 |
commit | 8630605ee31e4ce214d82b8fef8455314c63c5f3 (patch) | |
tree | 58115bbe32b57f04cc71c31c87279bcf00f6a61b /addressbook | |
parent | eae413f6b215a1526588e98e2aa087e0c9323ec5 (diff) | |
download | gsoc2013-evolution-8630605ee31e4ce214d82b8fef8455314c63c5f3.tar.gz gsoc2013-evolution-8630605ee31e4ce214d82b8fef8455314c63c5f3.tar.zst gsoc2013-evolution-8630605ee31e4ce214d82b8fef8455314c63c5f3.zip |
don't let the user delete their Personal addressbook. This is just a nice
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.
svn path=/trunk/; revision=25181
Diffstat (limited to 'addressbook')
-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); } |