aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@gnome.org>2010-07-21 00:00:06 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-26 09:30:01 +0800
commit21f5bfa2ab51f1b05a8583264d7460cbd54c351f (patch)
tree6fadec8d07f10877e6be09486b0124e7b0b4dbb0 /modules/mail
parent0d51f6658348f8a8c33326f5ad11dad76d6d1642 (diff)
downloadgsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar.gz
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar.bz2
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar.lz
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar.xz
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.tar.zst
gsoc2013-evolution-21f5bfa2ab51f1b05a8583264d7460cbd54c351f.zip
Fix right click issues.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view-private.c71
1 files changed, 63 insertions, 8 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 688dcd8a78..2cfcf9fb72 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -249,14 +249,6 @@ mail_shell_view_popup_event_cb (EMailShellView *mail_shell_view,
}
static void
-mail_shell_view_reader_changed_cb (EMailShellView *mail_shell_view,
- EMailReader *reader)
-{
- e_shell_view_update_actions (E_SHELL_VIEW (mail_shell_view));
- e_mail_shell_view_update_sidebar (mail_shell_view);
-}
-
-static void
mail_shell_view_scroll_cb (EMailShellView *mail_shell_view,
GtkOrientation orientation,
GtkScrollType scroll_type,
@@ -307,6 +299,69 @@ mail_shell_view_scroll_cb (EMailShellView *mail_shell_view,
}
static void
+mail_shell_view_reader_changed_cb (EMailShellView *mail_shell_view,
+ EMailReader *reader)
+{
+ GtkWidget *message_list;
+ EMFormatHTML *formatter;
+ EWebView *web_view;
+ EShellView *shell_view;
+ EShellTaskbar *shell_taskbar;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_taskbar = e_shell_view_get_shell_taskbar (shell_view);
+
+ formatter = e_mail_reader_get_formatter (reader);
+ message_list = e_mail_reader_get_message_list (reader);
+ web_view = em_format_html_get_web_view (formatter);
+
+ e_shell_view_update_actions (E_SHELL_VIEW (mail_shell_view));
+ e_mail_shell_view_update_sidebar (mail_shell_view);
+
+ /* Connect if its not connected already */
+ if (g_signal_handler_find (message_list, G_SIGNAL_MATCH_FUNC,
+ 0, 0, NULL,
+ mail_shell_view_message_list_key_press_cb,
+ NULL))
+ return;
+ g_signal_connect_swapped (
+ message_list, "key-press",
+ G_CALLBACK (mail_shell_view_message_list_key_press_cb),
+ mail_shell_view);
+
+ g_signal_connect_swapped (
+ message_list, "popup-menu",
+ G_CALLBACK (mail_shell_view_message_list_popup_menu_cb),
+ mail_shell_view);
+
+ g_signal_connect_swapped (
+ message_list, "right-click",
+ G_CALLBACK (mail_shell_view_message_list_right_click_cb),
+ mail_shell_view);
+
+ g_signal_connect_swapped (
+ web_view, "key-press-event",
+ G_CALLBACK (mail_shell_view_key_press_event_cb),
+ mail_shell_view);
+
+ g_signal_connect_swapped (
+ web_view, "popup-event",
+ G_CALLBACK (mail_shell_view_popup_event_cb),
+ mail_shell_view);
+
+ g_signal_connect_data (
+ web_view, "scroll",
+ G_CALLBACK (mail_shell_view_scroll_cb),
+ mail_shell_view, (GClosureNotify) NULL,
+ G_CONNECT_AFTER | G_CONNECT_SWAPPED);
+
+ g_signal_connect_swapped (
+ web_view, "status-message",
+ G_CALLBACK (e_shell_taskbar_set_message),
+ shell_taskbar);
+}
+
+static void
mail_shell_view_prepare_for_quit_done_cb (CamelFolder *folder,
gpointer user_data)
{