diff options
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-shell-content.c | 108 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-content.h | 7 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-actions.c | 63 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-actions.h | 18 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-memopad.c | 72 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-taskpad.c | 72 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view.c | 20 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 5 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.h | 3 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 72 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.h | 6 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view.c | 18 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 5 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.h | 3 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.c | 72 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.h | 6 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view.c | 18 |
17 files changed, 12 insertions, 556 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index c3112cf42c..4946972efd 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -721,114 +721,6 @@ e_cal_shell_content_get_view_instance (ECalShellContent *cal_shell_content) } void -e_cal_shell_content_copy_clipboard (ECalShellContent *cal_shell_content) -{ - GnomeCalendar *calendar; - EMemoTable *memo_table; - ECalendarTable *task_table; - GnomeCalendarViewType view_type; - ECalendarView *calendar_view; - - g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content)); - - calendar = e_cal_shell_content_get_calendar (cal_shell_content); - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - view_type = gnome_calendar_get_view (calendar); - calendar_view = gnome_calendar_get_calendar_view (calendar, view_type); - - switch (cal_shell_content_get_focus_location (cal_shell_content)) { - case FOCUS_CALENDAR: - e_calendar_view_copy_clipboard (calendar_view); - break; - - case FOCUS_MEMO_TABLE: - e_memo_table_copy_clipboard (memo_table); - break; - - case FOCUS_TASK_TABLE: - e_calendar_table_copy_clipboard (task_table); - break; - - default: - g_return_if_reached (); - } -} - -void -e_cal_shell_content_cut_clipboard (ECalShellContent *cal_shell_content) -{ - GnomeCalendar *calendar; - EMemoTable *memo_table; - ECalendarTable *task_table; - GnomeCalendarViewType view_type; - ECalendarView *calendar_view; - - g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content)); - - calendar = e_cal_shell_content_get_calendar (cal_shell_content); - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - view_type = gnome_calendar_get_view (calendar); - calendar_view = gnome_calendar_get_calendar_view (calendar, view_type); - - switch (cal_shell_content_get_focus_location (cal_shell_content)) { - case FOCUS_CALENDAR: - e_calendar_view_cut_clipboard (calendar_view); - break; - - case FOCUS_MEMO_TABLE: - e_memo_table_copy_clipboard (memo_table); - break; - - case FOCUS_TASK_TABLE: - e_calendar_table_copy_clipboard (task_table); - break; - - default: - g_return_if_reached (); - } -} - -void -e_cal_shell_content_paste_clipboard (ECalShellContent *cal_shell_content) -{ - GnomeCalendar *calendar; - EMemoTable *memo_table; - ECalendarTable *task_table; - GnomeCalendarViewType view_type; - ECalendarView *calendar_view; - - g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content)); - - calendar = e_cal_shell_content_get_calendar (cal_shell_content); - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - view_type = gnome_calendar_get_view (calendar); - calendar_view = gnome_calendar_get_calendar_view (calendar, view_type); - - switch (cal_shell_content_get_focus_location (cal_shell_content)) { - case FOCUS_CALENDAR: - e_calendar_view_paste_clipboard (calendar_view); - break; - - case FOCUS_MEMO_TABLE: - e_memo_table_paste_clipboard (memo_table); - break; - - case FOCUS_TASK_TABLE: - e_calendar_table_paste_clipboard (task_table); - break; - - default: - g_return_if_reached (); - } -} - -void e_cal_shell_content_delete_selection (ECalShellContent *cal_shell_content) { GnomeCalendar *calendar; diff --git a/modules/calendar/e-cal-shell-content.h b/modules/calendar/e-cal-shell-content.h index eae8bf3301..db82889eab 100644 --- a/modules/calendar/e-cal-shell-content.h +++ b/modules/calendar/e-cal-shell-content.h @@ -26,6 +26,7 @@ #include <shell/e-shell-searchbar.h> #include <shell/e-shell-view.h> +#include <calendar/gui/e-calendar-table.h> #include <calendar/gui/e-memo-table.h> #include <calendar/gui/gnome-cal.h> #include <menus/gal-view-instance.h> @@ -96,12 +97,6 @@ EShellSearchbar * GalViewInstance * e_cal_shell_content_get_view_instance (ECalShellContent *cal_shell_content); -void e_cal_shell_content_copy_clipboard - (ECalShellContent *cal_shell_content); -void e_cal_shell_content_cut_clipboard - (ECalShellContent *cal_shell_content); -void e_cal_shell_content_paste_clipboard - (ECalShellContent *cal_shell_content); void e_cal_shell_content_delete_selection (ECalShellContent *cal_shell_content); void e_cal_shell_content_delete_selected_occurrence diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 148cc4a426..117868d646 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -482,36 +482,6 @@ action_event_all_day_new_cb (GtkAction *action, } static void -action_event_clipboard_copy_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - e_cal_shell_content_copy_clipboard (cal_shell_content); -} - -static void -action_event_clipboard_cut_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - e_cal_shell_content_cut_clipboard (cal_shell_content); -} - -static void -action_event_clipboard_paste_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - e_cal_shell_content_paste_clipboard (cal_shell_content); -} - -static void action_event_copy_cb (GtkAction *action, ECalShellView *cal_shell_view) { @@ -1314,27 +1284,6 @@ static GtkActionEntry calendar_entries[] = { NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_calendar_select_one_cb) }, - { "event-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy the selection"), - G_CALLBACK (action_event_clipboard_copy_cb) }, - - { "event-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut the selection"), - G_CALLBACK (action_event_clipboard_cut_cb) }, - - { "event-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste the clipboard"), - G_CALLBACK (action_event_clipboard_paste_cb) }, - { "event-copy", NULL, N_("Cop_y to Calendar..."), @@ -1502,18 +1451,6 @@ static EPopupActionEntry calendar_popup_entries[] = { NULL, "calendar-select-one" }, - { "event-popup-clipboard-copy", - NULL, - "event-clipboard-copy" }, - - { "event-popup-clipboard-cut", - NULL, - "event-clipboard-cut" }, - - { "event-popup-clipboard-paste", - NULL, - "event-clipboard-paste" }, - { "event-popup-copy", NULL, "event-copy" }, diff --git a/modules/calendar/e-cal-shell-view-actions.h b/modules/calendar/e-cal-shell-view-actions.h index a6b1c3d01c..a1cb31398b 100644 --- a/modules/calendar/e-cal-shell-view-actions.h +++ b/modules/calendar/e-cal-shell-view-actions.h @@ -65,12 +65,6 @@ E_SHELL_WINDOW_ACTION ((window), "calendar-view-workweek") /* Event Actions */ -#define E_SHELL_WINDOW_ACTION_EVENT_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "event-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_EVENT_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "event-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_EVENT_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "event-clipboard-paste") #define E_SHELL_WINDOW_ACTION_EVENT_DELEGATE(window) \ E_SHELL_WINDOW_ACTION ((window), "event-delegate") #define E_SHELL_WINDOW_ACTION_EVENT_DELETE(window) \ @@ -97,12 +91,6 @@ E_SHELL_WINDOW_ACTION ((window), "event-occurrence-movable") /* Memo Pad Actions */ -#define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-memopad-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-memopad-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-memopad-clipboard-paste") #define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_DELETE(window) \ E_SHELL_WINDOW_ACTION ((window), "calendar-memopad-delete") #define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_FORWARD(window) \ @@ -121,12 +109,6 @@ /* Task Pad Actions */ #define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_ASSIGN(window) \ E_SHELL_WINDOW_ACTION ((window), "calendar-taskpad-assign") -#define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-taskpad-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-taskpad-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "calendar-taskpad-clipboard-paste") #define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_DELETE(window) \ E_SHELL_WINDOW_ACTION ((window), "calendar-taskpad-delete") #define E_SHELL_WINDOW_ACTION_CALENDAR_TASKPAD_FORWARD(window) \ diff --git a/modules/calendar/e-cal-shell-view-memopad.c b/modules/calendar/e-cal-shell-view-memopad.c index 3a92cbc777..a65bf82cdd 100644 --- a/modules/calendar/e-cal-shell-view-memopad.c +++ b/modules/calendar/e-cal-shell-view-memopad.c @@ -24,45 +24,6 @@ /* Much of this file is based on e-memo-shell-view-actions.c. */ static void -action_calendar_memopad_clipboard_copy_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - EMemoTable *memo_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - - e_memo_table_copy_clipboard (memo_table); -} - -static void -action_calendar_memopad_clipboard_cut_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - EMemoTable *memo_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - - e_memo_table_cut_clipboard (memo_table); -} - -static void -action_calendar_memopad_clipboard_paste_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - EMemoTable *memo_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); - - e_memo_table_paste_clipboard (memo_table); -} - -static void action_calendar_memopad_delete_cb (GtkAction *action, ECalShellView *cal_shell_view) { @@ -292,27 +253,6 @@ action_calendar_memopad_save_as_cb (GtkAction *action, static GtkActionEntry calendar_memopad_entries[] = { - { "calendar-memopad-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy selected memo"), - G_CALLBACK (action_calendar_memopad_clipboard_copy_cb) }, - - { "calendar-memopad-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut selected memo"), - G_CALLBACK (action_calendar_memopad_clipboard_cut_cb) }, - - { "calendar-memopad-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste memo from the clipboard"), - G_CALLBACK (action_calendar_memopad_clipboard_paste_cb) }, - { "calendar-memopad-delete", GTK_STOCK_DELETE, N_("_Delete Memo"), @@ -427,18 +367,6 @@ e_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view) } g_slist_free (list); - action = ACTION (CALENDAR_MEMOPAD_CLIPBOARD_COPY); - sensitive = (n_selected > 0); - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CALENDAR_MEMOPAD_CLIPBOARD_CUT); - sensitive = (n_selected > 0) && editable; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CALENDAR_MEMOPAD_CLIPBOARD_PASTE); - sensitive = editable; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (CALENDAR_MEMOPAD_DELETE); sensitive = (n_selected > 0) && editable; gtk_action_set_sensitive (action, sensitive); diff --git a/modules/calendar/e-cal-shell-view-taskpad.c b/modules/calendar/e-cal-shell-view-taskpad.c index c88dee0d4c..f73d5839d1 100644 --- a/modules/calendar/e-cal-shell-view-taskpad.c +++ b/modules/calendar/e-cal-shell-view-taskpad.c @@ -47,45 +47,6 @@ action_calendar_taskpad_assign_cb (GtkAction *action, } static void -action_calendar_taskpad_clipboard_copy_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - ECalendarTable *task_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - e_calendar_table_copy_clipboard (task_table); -} - -static void -action_calendar_taskpad_clipboard_cut_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - ECalendarTable *task_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - e_calendar_table_cut_clipboard (task_table); -} - -static void -action_calendar_taskpad_clipboard_paste_cb (GtkAction *action, - ECalShellView *cal_shell_view) -{ - ECalShellContent *cal_shell_content; - ECalendarTable *task_table; - - cal_shell_content = cal_shell_view->priv->cal_shell_content; - task_table = e_cal_shell_content_get_task_table (cal_shell_content); - - e_calendar_table_paste_clipboard (task_table); -} - -static void action_calendar_taskpad_delete_cb (GtkAction *action, ECalShellView *cal_shell_view) { @@ -366,27 +327,6 @@ static GtkActionEntry calendar_taskpad_entries[] = { NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_calendar_taskpad_assign_cb) }, - { "calendar-taskpad-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy selected tasks"), - G_CALLBACK (action_calendar_taskpad_clipboard_copy_cb) }, - - { "calendar-taskpad-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut selected tasks"), - G_CALLBACK (action_calendar_taskpad_clipboard_cut_cb) }, - - { "calendar-taskpad-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste tasks from the clipboard"), - G_CALLBACK (action_calendar_taskpad_clipboard_paste_cb) }, - { "calendar-taskpad-delete", GTK_STOCK_DELETE, N_("_Delete Task"), @@ -538,18 +478,6 @@ e_cal_shell_view_taskpad_actions_update (ECalShellView *cal_shell_view) sensitive = (n_selected == 1) && editable && assignable; gtk_action_set_sensitive (action, sensitive); - action = ACTION (CALENDAR_TASKPAD_CLIPBOARD_COPY); - sensitive = (n_selected > 0); - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CALENDAR_TASKPAD_CLIPBOARD_CUT); - sensitive = (n_selected > 0) && editable; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CALENDAR_TASKPAD_CLIPBOARD_PASTE); - sensitive = editable; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (CALENDAR_TASKPAD_DELETE); sensitive = (n_selected > 0) && editable; gtk_action_set_sensitive (action, sensitive); diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 262cd39246..5b9940b1dd 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -296,9 +296,11 @@ cal_shell_view_update_actions (EShellView *shell_view) gboolean is_instance = FALSE; gboolean is_meeting = FALSE; gboolean is_delegatable = FALSE; - gboolean clipboard_has_calendar; gboolean refresh_supported = FALSE; + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); + priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -361,10 +363,6 @@ cal_shell_view_update_actions (EShellView *shell_view) g_list_free (list); - clipboard_has_calendar = - e_clipboard_wait_is_calendar_available ( - gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); - shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); state = e_shell_sidebar_check_state (shell_sidebar); @@ -397,18 +395,6 @@ cal_shell_view_update_actions (EShellView *shell_view) sensitive = can_delete_primary_source; gtk_action_set_sensitive (action, sensitive); - action = ACTION (EVENT_CLIPBOARD_COPY); - sensitive = (n_selected > 0); - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (EVENT_CLIPBOARD_CUT); - sensitive = (n_selected > 0) && editable; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (EVENT_CLIPBOARD_PASTE); - sensitive = editable && clipboard_has_calendar; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (EVENT_DELEGATE); sensitive = (n_selected == 1) && editable && diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 4de685cd4b..709ae9a8e6 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -537,7 +537,6 @@ memo_shell_content_check_state (EShellContent *shell_content) EMemoShellContent *memo_shell_content; EMemoTable *memo_table; GSList *list, *iter; - GtkClipboard *clipboard; gboolean editable = TRUE; gboolean has_url = FALSE; gint n_selected; @@ -563,8 +562,6 @@ memo_shell_content_check_state (EShellContent *shell_content) } g_slist_free (list); - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - if (n_selected == 1) state |= E_MEMO_SHELL_CONTENT_SELECTION_SINGLE; if (n_selected > 1) @@ -573,8 +570,6 @@ memo_shell_content_check_state (EShellContent *shell_content) state |= E_MEMO_SHELL_CONTENT_SELECTION_CAN_EDIT; if (has_url) state |= E_MEMO_SHELL_CONTENT_SELECTION_HAS_URL; - if (e_clipboard_wait_is_calendar_available (clipboard)) - state |= E_MEMO_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR; return state; } diff --git a/modules/calendar/e-memo-shell-content.h b/modules/calendar/e-memo-shell-content.h index a923b27f0b..16aae229b2 100644 --- a/modules/calendar/e-memo-shell-content.h +++ b/modules/calendar/e-memo-shell-content.h @@ -60,8 +60,7 @@ enum { E_MEMO_SHELL_CONTENT_SELECTION_SINGLE = 1 << 0, E_MEMO_SHELL_CONTENT_SELECTION_MULTIPLE = 1 << 1, E_MEMO_SHELL_CONTENT_SELECTION_CAN_EDIT = 1 << 2, - E_MEMO_SHELL_CONTENT_SELECTION_HAS_URL = 1 << 3, - E_MEMO_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR = 1 << 4 + E_MEMO_SHELL_CONTENT_SELECTION_HAS_URL = 1 << 3 }; struct _EMemoShellContent { diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index baf90f5a73..7a0fdaf8af 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -43,45 +43,6 @@ action_gal_save_custom_view_cb (GtkAction *action, } static void -action_memo_clipboard_copy_cb (GtkAction *action, - EMemoShellView *memo_shell_view) -{ - EMemoShellContent *memo_shell_content; - EMemoTable *memo_table; - - memo_shell_content = memo_shell_view->priv->memo_shell_content; - memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - - e_memo_table_copy_clipboard (memo_table); -} - -static void -action_memo_clipboard_cut_cb (GtkAction *action, - EMemoShellView *memo_shell_view) -{ - EMemoShellContent *memo_shell_content; - EMemoTable *memo_table; - - memo_shell_content = memo_shell_view->priv->memo_shell_content; - memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - - e_memo_table_cut_clipboard (memo_table); -} - -static void -action_memo_clipboard_paste_cb (GtkAction *action, - EMemoShellView *memo_shell_view) -{ - EMemoShellContent *memo_shell_content; - EMemoTable *memo_table; - - memo_shell_content = memo_shell_view->priv->memo_shell_content; - memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); - - e_memo_table_paste_clipboard (memo_table); -} - -static void action_memo_delete_cb (GtkAction *action, EMemoShellView *memo_shell_view) { @@ -590,27 +551,6 @@ action_search_filter_cb (GtkRadioAction *action, static GtkActionEntry memo_entries[] = { - { "memo-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy selected memo"), - G_CALLBACK (action_memo_clipboard_copy_cb) }, - - { "memo-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut selected memo"), - G_CALLBACK (action_memo_clipboard_cut_cb) }, - - { "memo-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste memo from the clipboard"), - G_CALLBACK (action_memo_clipboard_paste_cb) }, - { "memo-delete", GTK_STOCK_DELETE, N_("_Delete Memo"), @@ -731,18 +671,6 @@ static EPopupActionEntry memo_popup_entries[] = { NULL, "memo-list-select-one" }, - { "memo-popup-clipboard-copy", - NULL, - "memo-clipboard-copy" }, - - { "memo-popup-clipboard-cut", - NULL, - "memo-clipboard-cut" }, - - { "memo-popup-clipboard-paste", - NULL, - "memo-clipboard-paste" }, - { "memo-popup-delete", NULL, "memo-delete" }, diff --git a/modules/calendar/e-memo-shell-view-actions.h b/modules/calendar/e-memo-shell-view-actions.h index cb4309c18a..5b49ca06b1 100644 --- a/modules/calendar/e-memo-shell-view-actions.h +++ b/modules/calendar/e-memo-shell-view-actions.h @@ -25,12 +25,6 @@ #include <shell/e-shell-window-actions.h> /* Memo Actions */ -#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_MEMO_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "memo-clipboard-paste") #define E_SHELL_WINDOW_ACTION_MEMO_DELETE(window) \ E_SHELL_WINDOW_ACTION ((window), "memo-delete") #define E_SHELL_WINDOW_ACTION_MEMO_FORWARD(window) \ diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c index 29a82524c4..0afbe18e77 100644 --- a/modules/calendar/e-memo-shell-view.c +++ b/modules/calendar/e-memo-shell-view.c @@ -175,7 +175,6 @@ memo_shell_view_update_actions (EShellView *shell_view) /* Be descriptive. */ gboolean any_memos_selected; gboolean can_delete_primary_source; - gboolean clipboard_has_calendar; gboolean has_primary_source; gboolean multiple_memos_selected; gboolean primary_source_is_system; @@ -184,6 +183,9 @@ memo_shell_view_update_actions (EShellView *shell_view) gboolean sources_are_editable; gboolean refresh_supported; + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); + priv = E_MEMO_SHELL_VIEW_GET_PRIVATE (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -199,8 +201,6 @@ memo_shell_view_update_actions (EShellView *shell_view) (state & E_MEMO_SHELL_CONTENT_SELECTION_CAN_EDIT); selection_has_url = (state & E_MEMO_SHELL_CONTENT_SELECTION_HAS_URL); - clipboard_has_calendar = - (state & E_MEMO_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); state = e_shell_sidebar_check_state (shell_sidebar); @@ -217,18 +217,6 @@ memo_shell_view_update_actions (EShellView *shell_view) any_memos_selected = (single_memo_selected || multiple_memos_selected); - action = ACTION (MEMO_CLIPBOARD_COPY); - sensitive = any_memos_selected; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (MEMO_CLIPBOARD_CUT); - sensitive = any_memos_selected && sources_are_editable; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (MEMO_CLIPBOARD_PASTE); - sensitive = sources_are_editable && clipboard_has_calendar; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (MEMO_DELETE); sensitive = any_memos_selected && sources_are_editable; gtk_action_set_sensitive (action, sensitive); diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 4692e7bf7e..e50b67bf5a 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -535,7 +535,6 @@ task_shell_content_check_state (EShellContent *shell_content) ETaskShellContent *task_shell_content; ECalendarTable *task_table; GSList *list, *iter; - GtkClipboard *clipboard; gboolean assignable = TRUE; gboolean editable = TRUE; gboolean has_url = FALSE; @@ -580,8 +579,6 @@ task_shell_content_check_state (EShellContent *shell_content) } g_slist_free (list); - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - if (n_selected == 1) state |= E_TASK_SHELL_CONTENT_SELECTION_SINGLE; if (n_selected > 1) @@ -596,8 +593,6 @@ task_shell_content_check_state (EShellContent *shell_content) state |= E_TASK_SHELL_CONTENT_SELECTION_HAS_INCOMPLETE; if (has_url) state |= E_TASK_SHELL_CONTENT_SELECTION_HAS_URL; - if (e_clipboard_wait_is_calendar_available (clipboard)) - state |= E_TASK_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR; return state; } diff --git a/modules/calendar/e-task-shell-content.h b/modules/calendar/e-task-shell-content.h index 971d46ad95..7a5e8efd81 100644 --- a/modules/calendar/e-task-shell-content.h +++ b/modules/calendar/e-task-shell-content.h @@ -64,8 +64,7 @@ enum { E_TASK_SHELL_CONTENT_SELECTION_CAN_EDIT = 1 << 3, E_TASK_SHELL_CONTENT_SELECTION_HAS_COMPLETE = 1 << 4, E_TASK_SHELL_CONTENT_SELECTION_HAS_INCOMPLETE = 1 << 5, - E_TASK_SHELL_CONTENT_SELECTION_HAS_URL = 1 << 6, - E_TASK_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR = 1 << 7 + E_TASK_SHELL_CONTENT_SELECTION_HAS_URL = 1 << 6 }; struct _ETaskShellContent { diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 8e28b55863..067bd48370 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -74,45 +74,6 @@ action_task_assign_cb (GtkAction *action, } static void -action_task_clipboard_copy_cb (GtkAction *action, - ETaskShellView *task_shell_view) -{ - ETaskShellContent *task_shell_content; - ECalendarTable *task_table; - - task_shell_content = task_shell_view->priv->task_shell_content; - task_table = e_task_shell_content_get_task_table (task_shell_content); - - e_calendar_table_copy_clipboard (task_table); -} - -static void -action_task_clipboard_cut_cb (GtkAction *action, - ETaskShellView *task_shell_view) -{ - ETaskShellContent *task_shell_content; - ECalendarTable *task_table; - - task_shell_content = task_shell_view->priv->task_shell_content; - task_table = e_task_shell_content_get_task_table (task_shell_content); - - e_calendar_table_cut_clipboard (task_table); -} - -static void -action_task_clipboard_paste_cb (GtkAction *action, - ETaskShellView *task_shell_view) -{ - ETaskShellContent *task_shell_content; - ECalendarTable *task_table; - - task_shell_content = task_shell_view->priv->task_shell_content; - task_table = e_task_shell_content_get_task_table (task_shell_content); - - e_calendar_table_paste_clipboard (task_table); -} - -static void action_task_delete_cb (GtkAction *action, ETaskShellView *task_shell_view) { @@ -714,27 +675,6 @@ static GtkActionEntry task_entries[] = { NULL, /* XXX Add a tooltip! */ G_CALLBACK (action_task_assign_cb) }, - { "task-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy selected tasks"), - G_CALLBACK (action_task_clipboard_copy_cb) }, - - { "task-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut selected tasks"), - G_CALLBACK (action_task_clipboard_cut_cb) }, - - { "task-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste tasks from the clipboard"), - G_CALLBACK (action_task_clipboard_paste_cb) }, - { "task-delete", GTK_STOCK_DELETE, N_("_Delete Task"), @@ -887,18 +827,6 @@ static EPopupActionEntry task_popup_entries[] = { NULL, "task-assign" }, - { "task-popup-clipboard-copy", - NULL, - "task-clipboard-copy" }, - - { "task-popup-clipboard-cut", - NULL, - "task-clipboard-cut" }, - - { "task-popup-clipboard-paste", - NULL, - "task-clipboard-paste" }, - { "task-popup-delete", NULL, "task-delete" }, diff --git a/modules/calendar/e-task-shell-view-actions.h b/modules/calendar/e-task-shell-view-actions.h index 3d49ff636e..f323fb38f9 100644 --- a/modules/calendar/e-task-shell-view-actions.h +++ b/modules/calendar/e-task-shell-view-actions.h @@ -27,12 +27,6 @@ /* Task Actions */ #define E_SHELL_WINDOW_ACTION_TASK_ASSIGN(window) \ E_SHELL_WINDOW_ACTION ((window), "task-assign") -#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "task-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "task-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_TASK_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "task-clipboard-paste") #define E_SHELL_WINDOW_ACTION_TASK_DELETE(window) \ E_SHELL_WINDOW_ACTION ((window), "task-delete") #define E_SHELL_WINDOW_ACTION_TASK_FORWARD(window) \ diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index a481356690..07fb12e369 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -297,9 +297,11 @@ task_shell_view_update_actions (EShellView *shell_view) gboolean some_tasks_complete; gboolean some_tasks_incomplete; gboolean sources_are_editable; - gboolean clipboard_has_calendar; gboolean refresh_supported; + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); + priv = E_TASK_SHELL_VIEW_GET_PRIVATE (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -321,8 +323,6 @@ task_shell_view_update_actions (EShellView *shell_view) (state & E_TASK_SHELL_CONTENT_SELECTION_HAS_INCOMPLETE); selection_has_url = (state & E_TASK_SHELL_CONTENT_SELECTION_HAS_URL); - clipboard_has_calendar = - (state & E_TASK_SHELL_CONTENT_CLIPBOARD_HAS_CALENDAR); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); state = e_shell_sidebar_check_state (shell_sidebar); @@ -345,18 +345,6 @@ task_shell_view_update_actions (EShellView *shell_view) selection_is_assignable; gtk_action_set_sensitive (action, sensitive); - action = ACTION (TASK_CLIPBOARD_COPY); - sensitive = any_tasks_selected; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (TASK_CLIPBOARD_CUT); - sensitive = any_tasks_selected && sources_are_editable; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (TASK_CLIPBOARD_PASTE); - sensitive = sources_are_editable && clipboard_has_calendar; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (TASK_DELETE); sensitive = any_tasks_selected && sources_are_editable; gtk_action_set_sensitive (action, sensitive); |