/* handle is, in all/most occasions, a GntWidget * */ static void finch_close_notify(PurpleNotifyType type, void *handle) { GntWidget *widget = handle; if (!widget) return; while (widget->parent) widget = widget->parent; if (type == PURPLE_NOTIFY_SEARCHRESULTS) purple_notify_searchresults_free(g_object_get_data(handle, "notify-results")); #if 1 /* This did not seem to be necessary */ g_signal_handlers_disconnect_by_func(G_OBJECT(widget), G_CALLBACK(notify_msg_window_destroy_cb), GINT_TO_POINTER(type)); #endif gnt_widget_destroy(widget); }
static void pidgin_close_notify(PurpleNotifyType type, void *ui_handle) { if (type == PURPLE_NOTIFY_EMAIL || type == PURPLE_NOTIFY_EMAILS) { PidginNotifyMailData *data = (PidginNotifyMailData *)ui_handle; g_free(data->url); g_free(data); } else if (type == PURPLE_NOTIFY_SEARCHRESULTS) { PidginNotifySearchResultsData *data = (PidginNotifySearchResultsData *)ui_handle; gtk_widget_destroy(data->window); purple_notify_searchresults_free(data->results); g_free(data); } else if (ui_handle != NULL) gtk_widget_destroy(GTK_WIDGET(ui_handle)); }