aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/modules/e-cal-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-cal-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-cal-shell-view-actions.c')
-rw-r--r--calendar/modules/e-cal-shell-view-actions.c66
1 files changed, 41 insertions, 25 deletions
diff --git a/calendar/modules/e-cal-shell-view-actions.c b/calendar/modules/e-cal-shell-view-actions.c
index bc2f38e5bd..105b4a3e7d 100644
--- a/calendar/modules/e-cal-shell-view-actions.c
+++ b/calendar/modules/e-cal-shell-view-actions.c
@@ -630,20 +630,6 @@ static GtkActionEntry calendar_entries[] = {
N_("Create a new calendar"),
G_CALLBACK (action_calendar_new_cb) },
- { "calendar-print",
- GTK_STOCK_PRINT,
- NULL,
- "<Control>p",
- N_("Print this calendar"),
- G_CALLBACK (action_calendar_print_cb) },
-
- { "calendar-print-preview",
- GTK_STOCK_PRINT_PREVIEW,
- NULL,
- NULL,
- N_("Preview the calendar to be printed"),
- G_CALLBACK (action_calendar_print_preview_cb) },
-
{ "calendar-properties",
GTK_STOCK_PROPERTIES,
NULL,
@@ -777,13 +763,6 @@ static GtkActionEntry calendar_entries[] = {
N_("View the current appointment"),
G_CALLBACK (action_event_open_cb) },
- { "event-print",
- GTK_STOCK_PRINT,
- NULL,
- NULL,
- NULL, /* XXX Add a tooltip! */
- G_CALLBACK (action_event_print_cb) },
-
{ "event-reply",
"mail-reply-sender",
N_("_Reply"),
@@ -904,10 +883,6 @@ static EPopupActionEntry calendar_popup_entries[] = {
NULL,
"event-open" },
- { "event-popup-print",
- NULL,
- "event-print" },
-
{ "event-popup-reply",
NULL,
"event-reply" },
@@ -1018,6 +993,37 @@ static GtkRadioActionEntry calendar_search_entries[] = {
CALENDAR_SEARCH_SUMMARY_CONTAINS }
};
+static GtkActionEntry lockdown_printing_entries[] = {
+
+ { "calendar-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ "<Control>p",
+ N_("Print this calendar"),
+ G_CALLBACK (action_calendar_print_cb) },
+
+ { "calendar-print-preview",
+ GTK_STOCK_PRINT_PREVIEW,
+ NULL,
+ NULL,
+ N_("Preview the calendar to be printed"),
+ G_CALLBACK (action_calendar_print_preview_cb) },
+
+ { "event-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ G_CALLBACK (action_event_print_cb) }
+};
+
+static EPopupActionEntry lockdown_printing_popup_entries[] = {
+
+ { "event-popup-print",
+ NULL,
+ "event-print" }
+};
+
void
e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
{
@@ -1033,6 +1039,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
ui_manager = e_shell_window_get_ui_manager (shell_window);
domain = GETTEXT_PACKAGE;
+ /* Calendar Actions */
action_group = cal_shell_view->priv->calendar_actions;
gtk_action_group_set_translation_domain (action_group, domain);
gtk_action_group_add_actions (
@@ -1052,6 +1059,15 @@ e_cal_shell_view_actions_init (ECalShellView *cal_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), cal_shell_view);
+ e_action_group_add_popup_actions (
+ action_group, lockdown_printing_popup_entries,
+ G_N_ELEMENTS (lockdown_printing_popup_entries));
+
/* Fine tuning. */
action = ACTION (CALENDAR_GO_TODAY);