aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-10 05:17:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-11 00:33:53 +0800
commit611fda70547f7a5258a1eaf52691cb05f8b3ec63 (patch)
tree1a274adb039e9c07c4e539b7199874b7968e76fc /addressbook/gui
parentc073b9c6c1e45a3e80a47eec27b58f2b2e984811 (diff)
downloadgsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar.gz
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar.bz2
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar.lz
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar.xz
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.tar.zst
gsoc2013-evolution-611fda70547f7a5258a1eaf52691cb05f8b3ec63.zip
Cleanup delete actions in shell views.
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 37d1376340..bcf6ed6277 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -587,6 +587,12 @@ addressbook_view_update_actions (ESelectable *selectable,
gtk_action_set_sensitive (action, sensitive);
gtk_action_set_tooltip (action, tooltip);
+ action = e_focus_tracker_get_delete_selection_action (focus_tracker);
+ sensitive = source_is_editable && (n_selected > 0);
+ tooltip = _("Delete selected contacts");
+ gtk_action_set_sensitive (action, sensitive);
+ gtk_action_set_tooltip (action, tooltip);
+
action = e_focus_tracker_get_select_all_action (focus_tracker);
sensitive = (n_contacts > 0);
tooltip = _("Select all visible contacts");
@@ -660,6 +666,16 @@ addressbook_view_paste_clipboard (ESelectable *selectable)
}
static void
+addressbook_view_delete_selection (ESelectable *selectable)
+{
+ EAddressbookView *view;
+
+ view = E_ADDRESSBOOK_VIEW (selectable);
+
+ e_addressbook_view_delete_selection (view, TRUE);
+}
+
+static void
addressbook_view_select_all (ESelectable *selectable)
{
EAddressbookView *view;
@@ -782,6 +798,7 @@ addressbook_view_selectable_init (ESelectableInterface *interface)
interface->cut_clipboard = addressbook_view_cut_clipboard;
interface->copy_clipboard = addressbook_view_copy_clipboard;
interface->paste_clipboard = addressbook_view_paste_clipboard;
+ interface->delete_selection = addressbook_view_delete_selection;
interface->select_all = addressbook_view_select_all;
}