Mercurial > pidgin.yaz
changeset 11606:243dd81341a7
[gaim-migrate @ 13877]
Fix 2 things with notify.c, one was causing warnings about signal
instances, and the other a crash only sometimes on closing a tab.
Also randomly removed redundent if !NULL free() in conversation.c
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Tue, 04 Oct 2005 02:48:25 +0000 |
parents | f36471a3c258 |
children | cdab645d1ad6 |
files | plugins/notify.c src/conversation.c |
diffstat | 2 files changed, 22 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/notify.c Tue Oct 04 02:01:07 2005 +0000 +++ b/plugins/notify.c Tue Oct 04 02:48:25 2005 +0000 @@ -310,11 +310,11 @@ * gtkwin->notebook->container? */ id = g_signal_connect(G_OBJECT(gtkconv->entry), "focus-in-event", G_CALLBACK(unnotify_cb), conv); - window_ids = g_slist_append(window_ids, GUINT_TO_POINTER(id)); + entry_ids = g_slist_append(window_ids, GUINT_TO_POINTER(id)); id = g_signal_connect(G_OBJECT(gtkconv->imhtml), "focus-in-event", G_CALLBACK(unnotify_cb), conv); - window_ids = g_slist_append(window_ids, GUINT_TO_POINTER(id)); + imhtml_ids = g_slist_append(window_ids, GUINT_TO_POINTER(id)); } if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_click")) { @@ -347,7 +347,7 @@ { GaimGtkConversation *gtkconv = NULL; GaimGtkWindow *gtkwin = NULL; - GSList *ids = NULL; + GSList *ids = NULL, *l; gtkconv = GAIM_GTK_CONVERSATION(conv); if (!gtkconv) @@ -355,16 +355,19 @@ gtkwin = gtkconv->win; ids = gaim_conversation_get_data(conv, "notify-window-signals"); - for (; ids != NULL; ids = ids->next) - g_signal_handler_disconnect(gtkwin->window, GPOINTER_TO_INT(ids->data)); + for (l = ids; l != NULL; l = l->next) + g_signal_handler_disconnect(gtkwin->window, GPOINTER_TO_INT(l->data)); + g_slist_free(ids); ids = gaim_conversation_get_data(conv, "notify-imhtml-signals"); - for (; ids != NULL; ids = ids->next) - g_signal_handler_disconnect(gtkconv->imhtml, GPOINTER_TO_INT(ids->data)); + for (l = ids; l != NULL; l = l->next) + g_signal_handler_disconnect(gtkconv->imhtml, GPOINTER_TO_INT(l->data)); + g_slist_free(ids); ids = gaim_conversation_get_data(conv, "notify-entry-signals"); - for (; ids != NULL; ids = ids->next) - g_signal_handler_disconnect(gtkconv->entry, GPOINTER_TO_INT(ids->data)); + for (l = ids; l != NULL; l = l->next) + g_signal_handler_disconnect(gtkconv->entry, GPOINTER_TO_INT(l->data)); + g_slist_free(ids); gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); @@ -417,9 +420,15 @@ detach_signals(conv); - unnotify(conv, TRUE); + gaimwin = GAIM_GTK_CONVERSATION(conv)->win; + - gaimwin = GAIM_GTK_CONVERSATION(conv)->win; + handle_urgent(gaimwin, FALSE); + gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); + + + return; + #if 0 /* i think this line crashes */ if (count_messages(gaimwin))
--- a/src/conversation.c Tue Oct 04 02:01:07 2005 +0000 +++ b/src/conversation.c Tue Oct 04 02:48:25 2005 +0000 @@ -437,8 +437,8 @@ gaim_signal_emit(gaim_conversations_get_handle(), "deleting-conversation", conv); - if (conv->name != NULL) g_free(conv->name); - if (conv->title != NULL) g_free(conv->title); + g_free(conv->name); + g_free(conv->title); conv->name = NULL; conv->title = NULL;