Fri, 20 Oct 2017 04:31:39 +0000
Merged in dwmw2/pidgin/release-2.x.y (pull request #274)
Fix Finch search results display (#17238)
Approved-by: Eion Robb <eionrobb@gmail.com>
Approved-by: Gary Kramlich <grim@reaperworld.com>
--- a/ChangeLog Mon Oct 02 13:27:23 2017 +0200 +++ b/ChangeLog Fri Oct 20 04:31:39 2017 +0000 @@ -26,6 +26,9 @@ * Better support for dark themes. (#12572 Alyssa Rosenzweig and Gary Kramlich) * Fixed IPv6 links by not escaping []'s. (#16391 cyisfor) (PR #270 Daniel Kamil Kozar) + Finch: + * Fix handling of search results (#17238 David Woodhouse) + version 2.12.0 (03/09/2017): libpurple: * Fix an out of bounds memory write in purple_markup_unescape_entity.
--- a/finch/gntnotify.c Mon Oct 02 13:27:23 2017 +0200 +++ b/finch/gntnotify.c Fri Oct 20 04:31:39 2017 +0000 @@ -388,10 +388,11 @@ finch_notify_sr_new_rows(PurpleConnection *gc, PurpleNotifySearchResults *results, void *data) { - GntTree *tree = GNT_TREE(data); + GntWindow *window = GNT_WINDOW(data); + GntTree *tree = GNT_TREE(g_object_get_data(G_OBJECT(window), "tree-widget")); GList *o; - /* XXX: Do I need to empty the tree here? */ + gnt_tree_remove_all(GNT_TREE(tree)); for (o = results->rows; o; o = o->next) { @@ -483,12 +484,16 @@ gnt_box_add_widget(GNT_BOX(window), box); - finch_notify_sr_new_rows(gc, results, tree); + g_object_set_data(G_OBJECT(window), "tree-widget", tree); + finch_notify_sr_new_rows(gc, results, window); + + g_signal_connect(G_OBJECT(window), "destroy", + G_CALLBACK(notify_msg_window_destroy_cb), GINT_TO_POINTER(PURPLE_NOTIFY_SEARCHRESULTS)); gnt_widget_show(window); g_object_set_data(G_OBJECT(window), "notify-results", results); - return tree; + return window; } static void *