aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-20 08:05:40 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-20 08:05:40 +0800
commit22d41a51fae2d18315887b05000cf7facc36e887 (patch)
tree044eaaa852ca31a11ea70ec8bfa33c6df8c01891 /addressbook/gui
parent8e546420df08f5fe243aa4227be44915fd79b86b (diff)
downloadgsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.tar.gz
gsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.tar.zst
gsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.zip
Formalize the "no disabled items in popup menus" policy in the form of a
GtkAction subclass called EPopupAction. Migrate all the modules over to using EPopupActions in their popup menus. Add sensitivity management of GtkActions to EMailReader. Not finished. svn path=/branches/kill-bonobo/; revision=37106
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c71
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.h6
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h1
-rw-r--r--addressbook/gui/component/e-book-shell-view.c4
4 files changed, 58 insertions, 24 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index ce044d08f1..016563845b 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -709,30 +709,70 @@ static GtkActionEntry contact_entries[] = {
N_("_Actions"),
NULL,
NULL,
- NULL },
+ NULL }
+};
- /*** Address Book Popup Actions ***/
+static EPopupActionEntry contact_popup_entries[] = {
{ "address-book-popup-delete",
- GTK_STOCK_DELETE,
- NULL,
- NULL,
- N_("Delete this address book"),
- G_CALLBACK (action_address_book_delete_cb) },
+ N_("_Delete"),
+ "address-book-delete" },
{ "address-book-popup-properties",
- GTK_STOCK_PROPERTIES,
- NULL,
+ N_("_Properties"),
+ "address-book-properties" },
+
+ { "address-book-popup-rename",
NULL,
- N_("Show properties of this address book"),
- G_CALLBACK (action_address_book_properties_cb) },
+ "address-book-rename" },
{ "address-book-popup-save-as",
- GTK_STOCK_SAVE_AS,
N_("_Save as vCard..."),
+ "address-book-save-as" },
+
+ { "contact-popup-clipboard-copy",
+ NULL,
+ "contact-clipboard-copy" },
+
+ { "contact-popup-clipboard-cut",
+ NULL,
+ "contact-clipboard-cut" },
+
+ { "contact-popup-clipboard-paste",
+ NULL,
+ "contact-clipboard-paste" },
+
+ { "contact-popup-copy",
+ NULL,
+ "contact-copy" },
+
+ { "contact-popup-delete",
+ NULL,
+ "contact-delete" },
+
+ { "contact-popup-forward",
+ NULL,
+ "contact-forward" },
+
+ { "contact-popup-move",
+ NULL,
+ "contact-move" },
+
+ { "contact-popup-open",
+ NULL,
+ "contact-open" },
+
+ { "contact-popup-print",
+ NULL,
+ "contact-print" },
+
+ { "contact-popup-save-as",
+ NULL,
+ "contact-save-as" },
+
+ { "contact-popup-send-message",
NULL,
- N_("Save the contents of this address book as a vCard"),
- G_CALLBACK (action_address_book_save_as_cb) }
+ "contact-send-message" },
};
static GtkToggleActionEntry contact_toggle_entries[] = {
@@ -811,6 +851,9 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
gtk_action_group_add_actions (
action_group, contact_entries,
G_N_ELEMENTS (contact_entries), book_shell_view);
+ e_action_group_add_popup_actions (
+ action_group, contact_popup_entries,
+ G_N_ELEMENTS (contact_popup_entries));
gtk_action_group_add_toggle_actions (
action_group, contact_toggle_entries,
G_N_ELEMENTS (contact_toggle_entries), book_shell_view);
diff --git a/addressbook/gui/component/e-book-shell-view-actions.h b/addressbook/gui/component/e-book-shell-view-actions.h
index bcb1606933..503855dda6 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.h
+++ b/addressbook/gui/component/e-book-shell-view-actions.h
@@ -31,12 +31,6 @@
E_SHELL_WINDOW_ACTION ((window), "address-book-delete")
#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_MOVE(window) \
E_SHELL_WINDOW_ACTION ((window), "address-book-move")
-#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_POPUP_DELETE(window) \
- E_SHELL_WINDOW_ACTION ((window), "address-book-popup-delete")
-#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_POPUP_PROPERTIES(window) \
- E_SHELL_WINDOW_ACTION ((window), "address-book-popup-properties")
-#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_POPUP_SAVE_AS(window) \
- E_SHELL_WINDOW_ACTION ((window), "address-book-popup-save-as")
#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_PROPERTIES(window) \
E_SHELL_WINDOW_ACTION ((window), "address-book-properties")
#define E_SHELL_WINDOW_ACTION_ADDRESS_BOOK_RENAME(window) \
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index 0079ca3ec2..050c13d6eb 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -35,6 +35,7 @@
#include "e-util/gconf-bridge.h"
#include "shell/e-shell-content.h"
#include "shell/e-shell-sidebar.h"
+#include "widgets/misc/e-popup-action.h"
#include "addressbook/gui/contact-editor/e-contact-editor.h"
#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
diff --git a/addressbook/gui/component/e-book-shell-view.c b/addressbook/gui/component/e-book-shell-view.c
index 601ce3b596..11cdaf6594 100644
--- a/addressbook/gui/component/e-book-shell-view.c
+++ b/addressbook/gui/component/e-book-shell-view.c
@@ -193,10 +193,6 @@ 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_POPUP_DELETE);
- 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);