aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/modules/e-task-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-task-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-task-shell-view-actions.c')
-rw-r--r--calendar/modules/e-task-shell-view-actions.c66
1 files changed, 41 insertions, 25 deletions
diff --git a/calendar/modules/e-task-shell-view-actions.c b/calendar/modules/e-task-shell-view-actions.c
index c59c55bd17..35c4ccbacf 100644
--- a/calendar/modules/e-task-shell-view-actions.c
+++ b/calendar/modules/e-task-shell-view-actions.c
@@ -701,20 +701,6 @@ static GtkActionEntry task_entries[] = {
N_("Create a new task list"),
G_CALLBACK (action_task_list_new_cb) },
- { "task-list-print",
- GTK_STOCK_PRINT,
- NULL,
- "<Control>p",
- N_("Print the list of tasks"),
- G_CALLBACK (action_task_list_print_cb) },
-
- { "task-list-print-preview",
- GTK_STOCK_PRINT_PREVIEW,
- NULL,
- NULL,
- N_("Preview the list of tasks to be printed"),
- G_CALLBACK (action_task_list_print_preview_cb) },
-
{ "task-list-properties",
GTK_STOCK_PROPERTIES,
NULL,
@@ -771,13 +757,6 @@ static GtkActionEntry task_entries[] = {
NULL, /* XXX Add a tooltip! */
G_CALLBACK (action_task_open_url_cb) },
- { "task-print",
- GTK_STOCK_PRINT,
- NULL,
- NULL,
- N_("Print the selected task"),
- G_CALLBACK (action_task_print_cb) },
-
{ "task-purge",
NULL,
N_("Purg_e"),
@@ -864,10 +843,6 @@ static EPopupActionEntry task_popup_entries[] = {
NULL,
"task-open-url" },
- { "task-popup-print",
- NULL,
- "task-print" },
-
{ "task-popup-save-as",
NULL,
"task-save-as" },
@@ -960,6 +935,37 @@ static GtkRadioActionEntry task_search_entries[] = {
TASK_SEARCH_SUMMARY_CONTAINS }
};
+static GtkActionEntry lockdown_printing_entries[] = {
+
+ { "task-list-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ "<Control>p",
+ N_("Print the list of tasks"),
+ G_CALLBACK (action_task_list_print_cb) },
+
+ { "task-list-print-preview",
+ GTK_STOCK_PRINT_PREVIEW,
+ NULL,
+ NULL,
+ N_("Preview the list of tasks to be printed"),
+ G_CALLBACK (action_task_list_print_preview_cb) },
+
+ { "task-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ NULL,
+ N_("Print the selected task"),
+ G_CALLBACK (action_task_print_cb) }
+};
+
+static EPopupActionEntry lockdown_printing_popup_entries[] = {
+
+ { "task-popup-print",
+ NULL,
+ "task-print" }
+};
+
void
e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
{
@@ -978,6 +984,7 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
ui_manager = e_shell_window_get_ui_manager (shell_window);
domain = GETTEXT_PACKAGE;
+ /* Task Actions */
action_group = task_shell_view->priv->task_actions;
gtk_action_group_set_translation_domain (action_group, domain);
gtk_action_group_add_actions (
@@ -996,6 +1003,15 @@ e_task_shell_view_actions_init (ETaskShellView *task_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), task_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 ();