diff options
author | Gary Kramlich <grim@reaperworld.com> | 2017-10-20 04:31:39 +0000 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2017-10-20 04:31:39 +0000 |
commit | d2439cd8bc535651586e67af28573575aeb2a7fd (patch) | |
tree | 46e4afb8750dee818f96480cca0c0166608012ed | |
parent | 2c57430fe0d6e64dca6cbe5367fb8703b1aa9101 (diff) | |
parent | 6b5e75dda5573d18af7b4df3edad8951536ca101 (diff) | |
download | pidgin-d2439cd8bc535651586e67af28573575aeb2a7fd.tar.gz |
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>
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | finch/gntnotify.c | 13 |
2 files changed, 12 insertions, 4 deletions
@@ -26,6 +26,9 @@ version 2.12.1 (??/??/????): * 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. diff --git a/finch/gntnotify.c b/finch/gntnotify.c index f32650d2b5..1ee752ee16 100644 --- a/finch/gntnotify.c +++ b/finch/gntnotify.c @@ -388,10 +388,11 @@ static void 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 @@ finch_notify_searchresults(PurpleConnection *gc, const char *title, 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 * |