aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/modules/e-memo-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-27 11:50:19 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-27 11:50:19 +0800
commit98d262b594caefd053a2d075e2d8482b2d8a12c8 (patch)
tree1474ebf4401477049436bf89a1432447995d0b00 /calendar/modules/e-memo-shell-view-actions.c
parente0f414941dd4e13ea074996d10606b0dae7e494b (diff)
downloadgsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.gz
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.bz2
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.lz
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.xz
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.zst
gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.zip
Add action groups to support lockdown, starting with printing.
Other categories to follow. Editors still need lockdown support. svn path=/branches/kill-bonobo/; revision=37136
Diffstat (limited to 'calendar/modules/e-memo-shell-view-actions.c')
-rw-r--r--calendar/modules/e-memo-shell-view-actions.c66
1 files changed, 41 insertions, 25 deletions
diff --git a/calendar/modules/e-memo-shell-view-actions.c b/calendar/modules/e-memo-shell-view-actions.c
index 228de43651..d5ae8c967d 100644
--- a/calendar/modules/e-memo-shell-view-actions.c
+++ b/calendar/modules/e-memo-shell-view-actions.c
@@ -576,20 +576,6 @@ static GtkActionEntry memo_entries[] = {
N_("Create a new memo list"),
G_CALLBACK (action_memo_list_new_cb) },
- { "memo-list-print",
- GTK_STOCK_PRINT,
- NULL,
- "<Control>p",
- N_("Print the list of memos"),
- G_CALLBACK (action_memo_list_print_cb) },
-
- { "memo-list-print-preview",
- GTK_STOCK_PRINT_PREVIEW,
- NULL,
- NULL,
- N_("Preview the list of memos to be printed"),
- G_CALLBACK (action_memo_list_print_preview_cb) },
-
{ "memo-list-properties",
GTK_STOCK_PROPERTIES,
NULL,
@@ -632,13 +618,6 @@ static GtkActionEntry memo_entries[] = {
NULL, /* XXX Add a tooltip! */
G_CALLBACK (action_memo_open_url_cb) },
- { "memo-print",
- GTK_STOCK_PRINT,
- NULL,
- NULL,
- N_("Print the selected memo"),
- G_CALLBACK (action_memo_print_cb) },
-
{ "memo-save-as",
GTK_STOCK_SAVE_AS,
N_("_Save as iCalendar..."),
@@ -697,10 +676,6 @@ static EPopupActionEntry memo_popup_entries[] = {
NULL,
"memo-open-url" },
- { "memo-popup-print",
- NULL,
- "memo-print" },
-
{ "memo-popup-save-as",
NULL,
"memo-save-as" }
@@ -758,6 +733,37 @@ static GtkRadioActionEntry memo_search_entries[] = {
MEMO_SEARCH_SUMMARY_CONTAINS }
};
+static GtkActionEntry lockdown_printing_entries[] = {
+
+ { "memo-list-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ "<Control>p",
+ N_("Print the list of memos"),
+ G_CALLBACK (action_memo_list_print_cb) },
+
+ { "memo-list-print-preview",
+ GTK_STOCK_PRINT_PREVIEW,
+ NULL,
+ NULL,
+ N_("Preview the list of memos to be printed"),
+ G_CALLBACK (action_memo_list_print_preview_cb) },
+
+ { "memo-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ NULL,
+ N_("Print the selected memo"),
+ G_CALLBACK (action_memo_print_cb) }
+};
+
+static EPopupActionEntry lockdown_printing_popup_entries[] = {
+
+ { "memo-popup-print",
+ NULL,
+ "memo-print" }
+};
+
void
e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
{
@@ -776,6 +782,7 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
ui_manager = e_shell_window_get_ui_manager (shell_window);
domain = GETTEXT_PACKAGE;
+ /* Memo Actions */
action_group = memo_shell_view->priv->memo_actions;
gtk_action_group_set_translation_domain (action_group, domain);
gtk_action_group_add_actions (
@@ -794,6 +801,15 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
NULL, NULL);
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+ /* Lockdown Printing Actions */
+ action_group = ACTION_GROUP (LOCKDOWN_PRINTING);
+ gtk_action_group_add_actions (
+ action_group, lockdown_printing_entries,
+ G_N_ELEMENTS (lockdown_printing_entries), memo_shell_view);
+ e_action_group_add_popup_actions (
+ action_group, lockdown_printing_popup_entries,
+ G_N_ELEMENTS (lockdown_printing_popup_entries));
+
/* Bind GObject properties to GConf keys. */
bridge = gconf_bridge_get ();