aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-06-25 23:59:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-06-25 23:59:00 +0800
commitbd282c59ea6a83e5893be076965ad926128de702 (patch)
tree67bf26022092f4dcdbf138a0e8c283e20652b132 /mail
parentdd106e00205e0b29126bb583b694c649f6a36082 (diff)
downloadgsoc2013-evolution-bd282c59ea6a83e5893be076965ad926128de702.tar.gz
gsoc2013-evolution-bd282c59ea6a83e5893be076965ad926128de702.tar.zst
gsoc2013-evolution-bd282c59ea6a83e5893be076965ad926128de702.zip
Might fix bug #45368 but I wouldn't bet on it.
2003-06-24 Jeffrey Stedfast <fejj@ximian.com> Might fix bug #45368 but I wouldn't bet on it. * message-browser.c (message_browser_new): Record the signal id for folder_loaded. (message_browser_folder_loaded): disconnect by id rather than searching for the handler. Save the id of the message_list_built signal handler. (message_browser_message_list_built): Disconnect the handler by id. (message_browser_destroy): Disconnect the signal handlers by id. svn path=/trunk/; revision=21536
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/message-browser.c29
-rw-r--r--mail/message-browser.h2
-rw-r--r--mail/message-list.c4
4 files changed, 38 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 02e3db15f1..7e24b44ee9 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,16 @@
+2003-06-24 Jeffrey Stedfast <fejj@ximian.com>
+
+ Might fix bug #45368 but I wouldn't bet on it.
+
+ * message-browser.c (message_browser_new): Record the signal id
+ for folder_loaded.
+ (message_browser_folder_loaded): disconnect by id rather than
+ searching for the handler. Save the id of the message_list_built
+ signal handler.
+ (message_browser_message_list_built): Disconnect the handler by
+ id.
+ (message_browser_destroy): Disconnect the signal handlers by id.
+
2003-06-20 Not Zed <NotZed@Ximian.com>
** See bug #43887
diff --git a/mail/message-browser.c b/mail/message-browser.c
index 018fda670b..572cc2f5d1 100644
--- a/mail/message-browser.c
+++ b/mail/message-browser.c
@@ -69,8 +69,17 @@ message_browser_destroy (GtkObject *object)
message_browser = MESSAGE_BROWSER (object);
+ if (message_browser->ml_built_id) {
+ g_signal_handler_disconnect (message_browser->fb->message_list, message_browser->ml_built_id);
+ message_browser->ml_built_id = 0;
+ }
+
+ if (message_browser->loaded_id) {
+ g_signal_handler_disconnect (message_browser->fb, message_browser->loaded_id);
+ message_browser->loaded_id = 0;
+ }
+
if (message_browser->fb) {
- g_signal_handlers_disconnect_matched (message_browser->fb, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, message_browser);
g_object_unref (message_browser->fb);
message_browser->fb = NULL;
}
@@ -212,7 +221,7 @@ message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrows
CamelMimeMessage *message;
char *subject = NULL;
char *title;
-
+
folder_browser_ui_message_loaded(fb);
message = fb->mail_display->current_message;
@@ -234,17 +243,21 @@ static void
message_browser_message_list_built (MessageList *ml, MessageBrowser *mb)
{
const char *uid = g_object_get_data (G_OBJECT (mb), "uid");
-
- g_signal_handlers_disconnect_matched (ml, G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
- message_browser_message_list_built, mb);
+
+ g_signal_handler_disconnect (ml, mb->ml_built_id);
+ mb->ml_built_id = 0;
+
message_list_select_uid (ml, uid);
}
static void
message_browser_folder_loaded (FolderBrowser *fb, const char *uri, MessageBrowser *mb)
{
- g_signal_connect (fb->message_list, "message_list_built",
- G_CALLBACK (message_browser_message_list_built), mb);
+ g_signal_handler_disconnect (fb, mb->loaded_id);
+ mb->loaded_id = 0;
+
+ mb->ml_built_id = g_signal_connect (fb->message_list, "message_list_built",
+ G_CALLBACK (message_browser_message_list_built), mb);
}
static void
@@ -353,7 +366,7 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c
set_default_size (GTK_WIDGET (new));
/* more evil hackery... */
- g_signal_connect (fb, "folder_loaded", G_CALLBACK (message_browser_folder_loaded), new);
+ new->loaded_id = g_signal_connect (fb, "folder_loaded", G_CALLBACK (message_browser_folder_loaded), new);
g_signal_connect (fb, "message_loaded", G_CALLBACK (message_browser_message_loaded), new);
return GTK_WIDGET (new);
diff --git a/mail/message-browser.h b/mail/message-browser.h
index ebd50c07bc..297c90c895 100644
--- a/mail/message-browser.h
+++ b/mail/message-browser.h
@@ -44,6 +44,8 @@ struct _MessageBrowser {
* The current URI being displayed by the MessageBrowser
*/
FolderBrowser *fb;
+ gulong ml_built_id;
+ gulong loaded_id;
};
diff --git a/mail/message-list.c b/mail/message-list.c
index 6ac4acab9a..bb2d3e1464 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1309,12 +1309,12 @@ message_list_destroy(GtkObject *object)
}
if (message_list->extras) {
- g_object_unref((message_list->extras));
+ g_object_unref (message_list->extras);
message_list->extras = NULL;
}
if (message_list->model) {
- g_object_unref((message_list->model));
+ g_object_unref (message_list->model);
message_list->model = NULL;
}