summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2017-10-06 22:30:02 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2017-10-06 22:30:02 +0100
commit6b5e75dda5573d18af7b4df3edad8951536ca101 (patch)
tree7665555ec9f37372b695b80f993d4596cf5c885d
parent4e0d38dec2c9bd84cd88ff2039c93522af884974 (diff)
downloadpidgin-6b5e75dda5573d18af7b4df3edad8951536ca101.tar.gz
Fix Finch search results display (#17238)
-rw-r--r--ChangeLog3
-rw-r--r--finch/gntnotify.c13
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f07c908f85..55fcc742f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 *