diff options
Diffstat (limited to 'modules')
25 files changed, 20 insertions, 767 deletions
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c index 5eb4459b7b..a7a616fc18 100644 --- a/modules/addressbook/e-book-shell-content.c +++ b/modules/addressbook/e-book-shell-content.c @@ -284,11 +284,9 @@ book_shell_content_check_state (EShellContent *shell_content) ESelectionModel *selection_model; EAddressbookModel *model; EAddressbookView *view; - GtkClipboard *clipboard; gboolean has_email = TRUE; gboolean is_contact_list = TRUE; guint32 state = 0; - gint n_contacts; gint n_selected; struct { @@ -301,8 +299,6 @@ book_shell_content_check_state (EShellContent *shell_content) model = e_addressbook_view_get_model (view); selection_model = e_addressbook_view_get_selection_model (view); - n_contacts = (selection_model != NULL) ? - e_selection_model_row_count (selection_model) : 0; n_selected = (selection_model != NULL) ? e_selection_model_selected_count (selection_model) : 0; @@ -333,8 +329,6 @@ book_shell_content_check_state (EShellContent *shell_content) foreach_data.list, foreach_data.list); } - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - if (n_selected == 1) state |= E_BOOK_SHELL_CONTENT_SELECTION_SINGLE; if (n_selected > 1) @@ -347,10 +341,6 @@ book_shell_content_check_state (EShellContent *shell_content) state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_BUSY; if (e_addressbook_model_get_editable (model)) state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE; - if (n_contacts == 0) - state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY; - if (e_clipboard_wait_is_directory_available (clipboard)) - state |= E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY; return state; } @@ -649,24 +639,3 @@ e_book_shell_content_get_searchbar (EBookShellContent *book_shell_content) return E_SHELL_SEARCHBAR (widget); } - -void -e_book_shell_content_clipboard_copy (EBookShellContent *book_shell_content) -{ - EAddressbookView *addressbook_view; - EWebView *web_view; - - g_return_if_fail (E_IS_BOOK_SHELL_CONTENT (book_shell_content)); - - web_view = E_WEB_VIEW (book_shell_content->priv->preview); - addressbook_view = - e_book_shell_content_get_current_view (book_shell_content); - g_return_if_fail (addressbook_view != NULL); - - if (!GTK_WIDGET_HAS_FOCUS (web_view)) { - e_addressbook_view_copy (addressbook_view); - return; - } - - e_web_view_clipboard_copy (web_view); -} diff --git a/modules/addressbook/e-book-shell-content.h b/modules/addressbook/e-book-shell-content.h index 62cc7bf80f..6ed5b38a62 100644 --- a/modules/addressbook/e-book-shell-content.h +++ b/modules/addressbook/e-book-shell-content.h @@ -62,9 +62,7 @@ enum { E_BOOK_SHELL_CONTENT_SELECTION_HAS_EMAIL = 1 << 2, E_BOOK_SHELL_CONTENT_SELECTION_IS_CONTACT_LIST = 1 << 3, E_BOOK_SHELL_CONTENT_SOURCE_IS_BUSY = 1 << 4, - E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE = 1 << 5, - E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY = 1 << 6, - E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY = 1 << 7 + E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE = 1 << 5 }; struct _EBookShellContent { @@ -108,8 +106,6 @@ void e_book_shell_content_set_preview_visible EShellSearchbar * e_book_shell_content_get_searchbar (EBookShellContent *book_shell_content); -void e_book_shell_content_clipboard_copy - (EBookShellContent *book_shell_content); G_END_DECLS diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index 904b777c8b..5cfdbd347d 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -312,44 +312,6 @@ action_address_book_stop_cb (GtkAction *action, } static void -action_contact_clipboard_copy_cb (GtkAction *action, - EBookShellView *book_shell_view) -{ - EBookShellContent *book_shell_content; - - book_shell_content = book_shell_view->priv->book_shell_content; - e_book_shell_content_clipboard_copy (book_shell_content); -} - -static void -action_contact_clipboard_cut_cb (GtkAction *action, - EBookShellView *book_shell_view) -{ - EBookShellContent *book_shell_content; - EAddressbookView *view; - - book_shell_content = book_shell_view->priv->book_shell_content; - view = e_book_shell_content_get_current_view (book_shell_content); - g_return_if_fail (view != NULL); - - e_addressbook_view_cut (view); -} - -static void -action_contact_clipboard_paste_cb (GtkAction *action, - EBookShellView *book_shell_view) -{ - EBookShellContent *book_shell_content; - EAddressbookView *view; - - book_shell_content = book_shell_view->priv->book_shell_content; - view = e_book_shell_content_get_current_view (book_shell_content); - g_return_if_fail (view != NULL); - - e_addressbook_view_paste (view); -} - -static void action_contact_copy_cb (GtkAction *action, EBookShellView *book_shell_view) { @@ -599,20 +561,6 @@ exit: } static void -action_contact_select_all_cb (GtkAction *action, - EBookShellView *book_shell_view) -{ - EBookShellContent *book_shell_content; - EAddressbookView *view; - - book_shell_content = book_shell_view->priv->book_shell_content; - view = e_book_shell_content_get_current_view (book_shell_content); - g_return_if_fail (view != NULL); - - e_addressbook_view_select_all (view); -} - -static void action_contact_send_message_cb (GtkAction *action, EBookShellView *book_shell_view) { @@ -758,27 +706,6 @@ static GtkActionEntry contact_entries[] = { N_("Stop loading"), G_CALLBACK (action_address_book_stop_cb) }, - { "contact-clipboard-copy", - GTK_STOCK_COPY, - NULL, - NULL, - N_("Copy the selection"), - G_CALLBACK (action_contact_clipboard_copy_cb) }, - - { "contact-clipboard-cut", - GTK_STOCK_CUT, - NULL, - NULL, - N_("Cut the selection"), - G_CALLBACK (action_contact_clipboard_cut_cb) }, - - { "contact-clipboard-paste", - GTK_STOCK_PASTE, - NULL, - NULL, - N_("Paste the clipboard"), - G_CALLBACK (action_contact_clipboard_paste_cb) }, - { "contact-copy", NULL, N_("_Copy Contact To..."), @@ -828,13 +755,6 @@ static GtkActionEntry contact_entries[] = { N_("View the current contact"), G_CALLBACK (action_contact_open_cb) }, - { "contact-select-all", - GTK_STOCK_SELECT_ALL, - NULL, - NULL, - N_("Select all contacts"), - G_CALLBACK (action_contact_select_all_cb) }, - { "contact-send-message", "mail-message-new", N_("_Send Message to Contact..."), @@ -877,18 +797,6 @@ static EPopupActionEntry contact_popup_entries[] = { N_("_Save as vCard..."), "address-book-save-as" }, - { "contact-popup-clipboard-copy", - NULL, - "contact-clipboard-copy" }, - - { "contact-popup-clipboard-cut", - NULL, - "contact-clipboard-cut" }, - - { "contact-popup-clipboard-paste", - NULL, - "contact-clipboard-paste" }, - { "contact-popup-copy", NULL, "contact-copy" }, diff --git a/modules/addressbook/e-book-shell-view-actions.h b/modules/addressbook/e-book-shell-view-actions.h index 98cd8b6689..250ec5fa99 100644 --- a/modules/addressbook/e-book-shell-view-actions.h +++ b/modules/addressbook/e-book-shell-view-actions.h @@ -45,12 +45,6 @@ E_SHELL_WINDOW_ACTION ((window), "address-book-stop") /* Contact Actions */ -#define E_SHELL_WINDOW_ACTION_CONTACT_CLIPBOARD_COPY(window) \ - E_SHELL_WINDOW_ACTION ((window), "contact-clipboard-copy") -#define E_SHELL_WINDOW_ACTION_CONTACT_CLIPBOARD_CUT(window) \ - E_SHELL_WINDOW_ACTION ((window), "contact-clipboard-cut") -#define E_SHELL_WINDOW_ACTION_CONTACT_CLIPBOARD_PASTE(window) \ - E_SHELL_WINDOW_ACTION ((window), "contact-clipboard-paste") #define E_SHELL_WINDOW_ACTION_CONTACT_COPY(window) \ E_SHELL_WINDOW_ACTION ((window), "contact-copy") #define E_SHELL_WINDOW_ACTION_CONTACT_DELETE(window) \ @@ -71,8 +65,6 @@ E_SHELL_WINDOW_ACTION ((window), "contact-print") #define E_SHELL_WINDOW_ACTION_CONTACT_SAVE_AS(window) \ E_SHELL_WINDOW_ACTION ((window), "contact-save-as") -#define E_SHELL_WINDOW_ACTION_CONTACT_SELECT_ALL(window) \ - E_SHELL_WINDOW_ACTION ((window), "contact-select-all") #define E_SHELL_WINDOW_ACTION_CONTACT_SEND_MESSAGE(window) \ E_SHELL_WINDOW_ACTION ((window), "contact-send-message") #define E_SHELL_WINDOW_ACTION_CONTACT_VIEW_CLASSIC(window) \ diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c index fa5e5bbe29..9ab9cb743a 100644 --- a/modules/addressbook/e-book-shell-view.c +++ b/modules/addressbook/e-book-shell-view.c @@ -268,8 +268,9 @@ book_shell_view_update_actions (EShellView *shell_view) gboolean selection_has_email; gboolean source_is_busy; gboolean source_is_editable; - gboolean source_is_empty; - gboolean clipboard_has_directory; + + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (shell_view); @@ -290,10 +291,6 @@ book_shell_view_update_actions (EShellView *shell_view) (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_BUSY); source_is_editable = (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE); - source_is_empty = - (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY); - clipboard_has_directory = - (state & E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); state = e_shell_sidebar_check_state (shell_sidebar); @@ -328,18 +325,6 @@ book_shell_view_update_actions (EShellView *shell_view) sensitive = source_is_busy; gtk_action_set_sensitive (action, sensitive); - action = ACTION (CONTACT_CLIPBOARD_COPY); - sensitive = any_contacts_selected; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CONTACT_CLIPBOARD_CUT); - sensitive = source_is_editable && any_contacts_selected; - gtk_action_set_sensitive (action, sensitive); - - action = ACTION (CONTACT_CLIPBOARD_PASTE); - sensitive = source_is_editable && clipboard_has_directory; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (CONTACT_COPY); sensitive = any_contacts_selected; gtk_action_set_sensitive (action, sensitive); @@ -381,10 +366,6 @@ book_shell_view_update_actions (EShellView *shell_view) sensitive = any_contacts_selected; gtk_action_set_sensitive (action, sensitive); - action = ACTION (CONTACT_SELECT_ALL); - sensitive = !(source_is_empty); - gtk_action_set_sensitive (action, sensitive); - action = ACTION (CONTACT_SEND_MESSAGE); sensitive = any_contacts_selected && selection_has_email; gtk_action_set_sensitive (action, sensitive); 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); diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 2ab36d46fb..139dd9474f 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -353,48 +353,6 @@ action_mail_folder_rename_cb (GtkAction *action, em_folder_tree_edit_selected (folder_tree); } -/* Helper for action_mail_folder_select_all_cb() */ -static gboolean -action_mail_folder_select_all_timeout_cb (GtkWidget *message_list) -{ - message_list_select_all (MESSAGE_LIST (message_list)); - gtk_widget_grab_focus (message_list); - - return FALSE; -} - -static void -action_mail_folder_select_all_cb (GtkAction *action, - EMailShellView *mail_shell_view) -{ - EMailReader *reader; - GtkWidget *message_list; - EShellWindow *shell_window; - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (mail_shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); - - reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content); - message_list = e_mail_reader_get_message_list (reader); - - if (MESSAGE_LIST (message_list)->threaded) { - gtk_action_activate (ACTION (MAIL_THREADS_EXPAND_ALL)); - - /* XXX The timeout below is added so that the execution - * thread to expand all conversation threads would - * have completed. The timeout 505 is just to ensure - * that the value is a small delta more than the - * timeout value in mail_regen_list(). */ - g_timeout_add ( - 505, (GSourceFunc) - action_mail_folder_select_all_timeout_cb, - message_list); - } else - /* If there is no threading, just select all immediately. */ - action_mail_folder_select_all_timeout_cb (message_list); -} - static void action_mail_folder_select_thread_cb (GtkAction *action, EMailShellView *mail_shell_view) @@ -1059,13 +1017,6 @@ static GtkActionEntry mail_entries[] = { N_("Change the name of this folder"), G_CALLBACK (action_mail_folder_rename_cb) }, - { "mail-folder-select-all", - NULL, - N_("Select _All Messages"), - "<Control>a", - N_("Select all visible messages"), - G_CALLBACK (action_mail_folder_select_all_cb) }, - { "mail-folder-select-thread", NULL, N_("Select Message _Thread"), diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index b198b69cd1..85395fd8ed 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -443,6 +443,7 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) shell_content = e_shell_view_get_shell_content (shell_view); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); + ui_manager = e_shell_window_get_ui_manager (shell_window); shell = e_shell_window_get_shell (shell_window); diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index de81e131c5..bd0b3cbe48 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -440,6 +440,9 @@ mail_shell_view_update_actions (EShellView *shell_view) gboolean folder_has_unread_rec = FALSE; gboolean folder_tree_and_message_list_agree = TRUE; + /* Chain up to parent's update_actions() method. */ + E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); + mail_shell_view = E_MAIL_SHELL_VIEW (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -554,10 +557,6 @@ mail_shell_view_update_actions (EShellView *shell_view) folder_tree_and_message_list_agree; gtk_action_set_sensitive (action, sensitive); - action = ACTION (MAIL_FOLDER_SELECT_ALL); - sensitive = !folder_is_store; - gtk_action_set_sensitive (action, sensitive); - action = ACTION (MAIL_FOLDER_SELECT_THREAD); sensitive = !folder_is_store; gtk_action_set_sensitive (action, sensitive); |