aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-31 20:54:01 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-31 20:54:01 +0800
commit78fd379aa7c17c60c4b5fc07e5243b32ec4a2639 (patch)
tree55a5c29dfb02f27e094b1fcf3e324904008aa5ad /addressbook
parent9c9e85d286fe61ed11e457c737bd26e2732119ab (diff)
downloadgsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.gz
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.bz2
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.lz
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.xz
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.zst
gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.zip
Support inline renaming of sources in the source selector, with help
from evolution-data-server (see bug #558322). Kill another frivolous plugin: select-one-source svn path=/branches/kill-bonobo/; revision=36705
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c20
-rw-r--r--addressbook/gui/component/e-book-shell-view.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 6085bc5d82..15838f96bc 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -173,6 +173,19 @@ action_address_book_properties_cb (GtkAction *action,
}
static void
+action_address_book_rename_cb (GtkAction *action,
+ EBookShellView *book_shell_view)
+{
+ EBookShellSidebar *book_shell_sidebar;
+ ESourceSelector *selector;
+
+ book_shell_sidebar = book_shell_view->priv->book_shell_sidebar;
+ selector = e_book_shell_sidebar_get_selector (book_shell_sidebar);
+
+ e_source_selector_edit_primary_selection (selector);
+}
+
+static void
action_address_book_save_as_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
@@ -523,6 +536,13 @@ static GtkActionEntry contact_entries[] = {
N_("Show properties of the selected address book"),
G_CALLBACK (action_address_book_properties_cb) },
+ { "address-book-rename",
+ NULL,
+ N_("_Rename..."),
+ "F2",
+ N_("Rename the selected address book"),
+ G_CALLBACK (action_address_book_rename_cb) },
+
{ "address-book-save-as",
GTK_STOCK_SAVE_AS,
N_("S_ave Address Book as vCard"),
diff --git a/addressbook/gui/component/e-book-shell-view.c b/addressbook/gui/component/e-book-shell-view.c
index fc5c6d7a7f..601ce3b596 100644
--- a/addressbook/gui/component/e-book-shell-view.c
+++ b/addressbook/gui/component/e-book-shell-view.c
@@ -197,6 +197,10 @@ book_shell_view_update_actions (EShellView *shell_view)
sensitive = has_primary_source && !primary_source_is_system;
gtk_action_set_sensitive (action, sensitive);
+ action = ACTION (ADDRESS_BOOK_RENAME);
+ sensitive = has_primary_source;
+ gtk_action_set_sensitive (action, sensitive);
+
action = ACTION (ADDRESS_BOOK_STOP);
sensitive = source_is_busy;
gtk_action_set_sensitive (action, sensitive);