aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-08-24 15:12:06 +0800
committerMilan Crha <mcrha@redhat.com>2010-08-24 15:12:06 +0800
commit48e4f1de4f0794cae60190b79b3bc9141f57bcd6 (patch)
tree5ea297148c37987c14a760ce9e73f1bce8b8a32e
parent336000a2d7b27698e2e5c102a9ceeaab12202a12 (diff)
downloadgsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar.gz
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar.bz2
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar.lz
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar.xz
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.tar.zst
gsoc2013-evolution-48e4f1de4f0794cae60190b79b3bc9141f57bcd6.zip
Bug #627734 - Double-click a message opens it twice
-rw-r--r--mail/e-mail-reader.c49
1 files changed, 9 insertions, 40 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index fe76e3e7c4..e19c53d4d7 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -3193,44 +3193,7 @@ e_mail_reader_init (EMailReader *reader)
action, "active",
web_view, "caret-mode");
- /* Connect signals. */
-
- g_signal_connect_swapped (
- web_view, "key-press-event",
- G_CALLBACK (mail_reader_key_press_event_cb), reader);
-
- g_signal_connect_swapped (
- message_list, "message-selected",
- G_CALLBACK (mail_reader_message_selected_cb), reader);
-
- g_signal_connect_swapped (
- message_list, "message-list-built",
- G_CALLBACK (mail_reader_emit_folder_loaded), reader);
-
- g_signal_connect_swapped (
- message_list, "double-click",
- G_CALLBACK (mail_reader_double_click_cb), reader);
-
- g_signal_connect_swapped (
- message_list, "key-press",
- G_CALLBACK (mail_reader_key_press_cb), reader);
-
- g_signal_connect_swapped (
- message_list, "selection-change",
- G_CALLBACK (e_mail_reader_changed), reader);
-
- /* Install a private struct for storing things like flags and
- * timeout and asynchronous operation IDs. We delete it when
- * the EMailReader is destroyed rather than finalized so that
- * asynchronous callbacks holding a reference can detect that
- * the reader has been destroyed and drop their reference. */
- g_object_set_qdata_full (
- G_OBJECT (reader), quark_private,
- g_slice_new0 (EMailReaderPrivate),
- (GDestroyNotify) mail_reader_private_free);
- g_signal_connect (
- reader, "destroy",
- G_CALLBACK (mail_reader_destroy), NULL);
+ e_mail_reader_init_private (reader);
}
void
@@ -3247,10 +3210,16 @@ e_mail_reader_init_private (EMailReader *reader)
web_view = em_format_html_get_web_view (formatter);
- quark_private = g_quark_from_static_string ("EMailReader-private");
+ /* Disconnect signals, if any, to not be connected twice */
+ g_signal_handlers_disconnect_by_func (web_view, mail_reader_key_press_event_cb, reader);
+ g_signal_handlers_disconnect_by_func (message_list, mail_reader_message_selected_cb, reader);
+ g_signal_handlers_disconnect_by_func (message_list, mail_reader_emit_folder_loaded, reader);
+ g_signal_handlers_disconnect_by_func (message_list, mail_reader_double_click_cb, reader);
+ g_signal_handlers_disconnect_by_func (message_list, mail_reader_key_press_cb, reader);
+ g_signal_handlers_disconnect_by_func (message_list, e_mail_reader_changed, reader);
+ g_signal_handlers_disconnect_by_func (reader, mail_reader_destroy, NULL);
/* Connect signals. */
-
g_signal_connect_swapped (
web_view, "key-press-event",
G_CALLBACK (mail_reader_key_press_event_cb), reader);