aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-08 00:31:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-26 04:42:17 +0800
commitabc0e4c694fb3d9624e890384880def730769fa0 (patch)
tree8d411f90f4edb0859ffe0b260c85e02e7d273088 /mail/e-mail-reader.c
parent83dc7625983470bff4ce8b9070fbc23c3370c472 (diff)
downloadgsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.gz
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.zst
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.zip
Introduce ESelectable and EFocusTracker.
EFocusTracker tracks the input focus within a window and helps keep the sensitivity of "selectable" actions in the main menu up-to-date. Selectable actions include Cut, Copy, Paste, Select All and Delete. EFocusTracker has built-in support for widgets that implement the GtkEditable interface such as GtkEntry and GtkTextView. It also supports custom widgets that implement the ESelectable interface, which is a subset of GtkEditable and can apply to anything that displays selectable content (esp. tree views and ETables). This commit integrates EFocusTracker with EShellWindow, CompEditor, EMsgComposer, and ESignatureManager. It also bumps the GtkHTML requirement to 2.29.5 to utilize the new GtkhtmlEditor:html constructor property.
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 6dae4ded13..9b7cc4d887 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -166,19 +166,6 @@ action_mail_check_for_junk_cb (GtkAction *action,
}
static void
-action_mail_clipboard_copy_cb (GtkAction *action,
- EMailReader *reader)
-{
- EMFormatHTMLDisplay *html_display;
- EWebView *web_view;
-
- html_display = e_mail_reader_get_html_display (reader);
- web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
-
- e_web_view_clipboard_copy (web_view);
-}
-
-static void
action_mail_copy_cb (GtkAction *action,
EMailReader *reader)
{
@@ -875,26 +862,6 @@ action_mail_search_folder_from_subject_cb (GtkAction *action,
}
static void
-action_mail_select_all_cb (GtkAction *action,
- EMailReader *reader)
-{
- EMFormatHTMLDisplay *html_display;
- EWebView *web_view;
- const gchar *action_name;
- gboolean selection_active;
-
- html_display = e_mail_reader_get_html_display (reader);
- web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
-
- e_web_view_select_all (web_view);
-
- action_name = "mail-clipboard-copy";
- action = e_mail_reader_get_action (reader, action_name);
- selection_active = e_web_view_is_selection_active (web_view);
- gtk_action_set_sensitive (action, selection_active);
-}
-
-static void
action_mail_show_all_headers_cb (GtkToggleAction *action,
EMailReader *reader)
{
@@ -1112,13 +1079,6 @@ static GtkActionEntry mail_reader_entries[] = {
N_("Filter the selected messages for junk status"),
G_CALLBACK (action_mail_check_for_junk_cb) },
- { "mail-clipboard-copy",
- GTK_STOCK_COPY,
- NULL,
- NULL,
- N_("Copy selected messages to the clipboard"),
- G_CALLBACK (action_mail_clipboard_copy_cb) },
-
{ "mail-copy",
"mail-copy",
N_("_Copy to Folder..."),
@@ -1441,13 +1401,6 @@ static GtkActionEntry mail_reader_entries[] = {
N_("Create a search folder for this subject"),
G_CALLBACK (action_mail_search_folder_from_subject_cb) },
- { "mail-select-all",
- NULL,
- N_("Select _All Text"),
- "<Shift><Control>x",
- N_("Select all the text in a message"),
- G_CALLBACK (action_mail_select_all_cb) },
-
{ "mail-show-source",
NULL,
N_("_Message Source"),
@@ -1544,10 +1497,6 @@ static GtkActionEntry mail_reader_entries[] = {
static EPopupActionEntry mail_reader_popup_entries[] = {
- { "mail-popup-clipboard-copy",
- NULL,
- "mail-clipboard-copy" },
-
{ "mail-popup-copy",
NULL,
"mail-copy" },
@@ -1644,25 +1593,6 @@ static GtkToggleActionEntry mail_reader_toggle_entries[] = {
FALSE }
};
-static gboolean
-mail_reader_button_release_event_cb (EMailReader *reader,
- GdkEventButton *button,
- GtkHTML *html)
-{
- GtkAction *action;
- EWebView *web_view;
- const gchar *action_name;
- gboolean selection_active;
-
- web_view = E_WEB_VIEW (html);
- action_name = "mail-clipboard-copy";
- action = e_mail_reader_get_action (reader, action_name);
- selection_active = e_web_view_is_selection_active (web_view);
- gtk_action_set_sensitive (action, selection_active);
-
- return FALSE;
-}
-
static void
mail_reader_double_click_cb (EMailReader *reader,
gint row,
@@ -2377,11 +2307,6 @@ mail_reader_update_actions (EMailReader *reader)
action = e_mail_reader_get_action (reader, action_name);
gtk_action_set_sensitive (action, sensitive);
- action_name = "mail-select-all";
- sensitive = single_message_selected;
- action = e_mail_reader_get_action (reader, action_name);
- gtk_action_set_sensitive (action, sensitive);
-
action_name = "mail-show-source";
sensitive = single_message_selected;
action = e_mail_reader_get_action (reader, action_name);
@@ -2585,10 +2510,6 @@ e_mail_reader_init (EMailReader *reader)
/* Fine tuning. */
- action_name = "mail-clipboard-copy";
- action = e_mail_reader_get_action (reader, action_name);
- gtk_action_set_sensitive (action, FALSE);
-
action_name = "mail-delete";
action = e_mail_reader_get_action (reader, action_name);
g_object_set (action, "short-label", _("Delete"), NULL);
@@ -2661,10 +2582,6 @@ e_mail_reader_init (EMailReader *reader)
/* Connect signals. */
g_signal_connect_swapped (
- web_view, "button-release-event",
- G_CALLBACK (mail_reader_button_release_event_cb), reader);
-
- g_signal_connect_swapped (
web_view, "key-press-event",
G_CALLBACK (mail_reader_key_press_event_cb), reader);