# HG changeset patch # User Tim Ringenbach # Date 1128394105 0 # Node ID 243dd81341a722340cc137370e70d177f075af46 # Parent f36471a3c2588d30c03fcad51088fce222d59c6c [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 diff -r f36471a3c258 -r 243dd81341a7 plugins/notify.c --- 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)) diff -r f36471a3c258 -r 243dd81341a7 src/conversation.c --- 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;