aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/modules
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
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')
-rw-r--r--calendar/modules/e-cal-shell-view-actions.c66
-rw-r--r--calendar/modules/e-cal-shell-view-memopad.c24
-rw-r--r--calendar/modules/e-cal-shell-view-taskpad.c24
-rw-r--r--calendar/modules/e-memo-shell-view-actions.c66
-rw-r--r--calendar/modules/e-task-shell-view-actions.c66
5 files changed, 157 insertions, 89 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);
diff --git a/calendar/modules/e-cal-shell-view-memopad.c b/calendar/modules/e-cal-shell-view-memopad.c
index c30d3cfa5c..dc3c384888 100644
--- a/calendar/modules/e-cal-shell-view-memopad.c
+++ b/calendar/modules/e-cal-shell-view-memopad.c
@@ -317,13 +317,6 @@ static GtkActionEntry calendar_memopad_entries[] = {
NULL, /* XXX Add a tooltip! */
G_CALLBACK (action_calendar_memopad_open_url_cb) },
- { "calendar-memopad-print",
- GTK_STOCK_PRINT,
- NULL,
- NULL,
- N_("Print the selected memo"),
- G_CALLBACK (action_calendar_memopad_print_cb) },
-
{ "calendar-memopad-save-as",
GTK_STOCK_SAVE_AS,
NULL,
@@ -332,6 +325,16 @@ static GtkActionEntry calendar_memopad_entries[] = {
G_CALLBACK (action_calendar_memopad_save_as_cb) }
};
+static GtkActionEntry lockdown_printing_entries[] = {
+
+ { "calendar-memopad-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ NULL,
+ N_("Print the selected memo"),
+ G_CALLBACK (action_calendar_memopad_print_cb) }
+};
+
void
e_cal_shell_view_memopad_actions_init (ECalShellView *cal_shell_view)
{
@@ -344,10 +347,17 @@ e_cal_shell_view_memopad_actions_init (ECalShellView *cal_shell_view)
shell_window = e_shell_view_get_shell_window (shell_view);
ui_manager = e_shell_window_get_ui_manager (shell_window);
+ /* Calendar Actions */
action_group = cal_shell_view->priv->calendar_actions;
gtk_action_group_add_actions (
action_group, calendar_memopad_entries,
G_N_ELEMENTS (calendar_memopad_entries), cal_shell_view);
+
+ /* 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);
}
void
diff --git a/calendar/modules/e-cal-shell-view-taskpad.c b/calendar/modules/e-cal-shell-view-taskpad.c
index c04ce2c6d1..9962ed62b0 100644
--- a/calendar/modules/e-cal-shell-view-taskpad.c
+++ b/calendar/modules/e-cal-shell-view-taskpad.c
@@ -405,13 +405,6 @@ static GtkActionEntry calendar_taskpad_entries[] = {
NULL, /* XXX Add a tooltip! */
G_CALLBACK (action_calendar_taskpad_open_url_cb) },
- { "calendar-taskpad-print",
- GTK_STOCK_PRINT,
- NULL,
- NULL,
- N_("Print the selected task"),
- G_CALLBACK (action_calendar_taskpad_print_cb) },
-
{ "calendar-taskpad-save-as",
GTK_STOCK_SAVE_AS,
N_("_Save as iCalendar..."),
@@ -420,6 +413,16 @@ static GtkActionEntry calendar_taskpad_entries[] = {
G_CALLBACK (action_calendar_taskpad_save_as_cb) }
};
+static GtkActionEntry lockdown_printing_entries[] = {
+
+ { "calendar-taskpad-print",
+ GTK_STOCK_PRINT,
+ NULL,
+ NULL,
+ N_("Print the selected task"),
+ G_CALLBACK (action_calendar_taskpad_print_cb) }
+};
+
void
e_cal_shell_view_taskpad_actions_init (ECalShellView *cal_shell_view)
{
@@ -432,10 +435,17 @@ e_cal_shell_view_taskpad_actions_init (ECalShellView *cal_shell_view)
shell_window = e_shell_view_get_shell_window (shell_view);
ui_manager = e_shell_window_get_ui_manager (shell_window);
+ /* Calendar Actions */
action_group = cal_shell_view->priv->calendar_actions;
gtk_action_group_add_actions (
action_group, calendar_taskpad_entries,
G_N_ELEMENTS (calendar_taskpad_entries), cal_shell_view);
+
+ /* 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);
}
void
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 ();
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 ();