diff options
author | Gary Kramlich <grim@reaperworld.com> | 2017-11-03 01:22:04 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2017-11-03 01:22:04 -0500 |
commit | 042a4208b84bf9ab891737cb20658074356e4d2a (patch) | |
tree | 36a082d7e8e2d1f2350300334a7b34d1a572c70c /finch/gntnotify.c | |
parent | c9eee7099cb794fbbe735e6ab84def9f2ac2c07c (diff) | |
parent | eeb7e2ce538bb486e1f5222d838befae540d8872 (diff) | |
download | pidgin-042a4208b84bf9ab891737cb20658074356e4d2a.tar.gz |
Merged release-2.x.y into default
Diffstat (limited to 'finch/gntnotify.c')
-rw-r--r-- | finch/gntnotify.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/finch/gntnotify.c b/finch/gntnotify.c index 70940cb5e5..19d96da8a8 100644 --- a/finch/gntnotify.c +++ b/finch/gntnotify.c @@ -385,11 +385,12 @@ 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; GntTreeRow *prev = NULL; - /* XXX: Do I need to empty the tree here? */ + gnt_tree_remove_all(GNT_TREE(tree)); for (o = results->rows; o; o = o->next) { @@ -493,12 +494,16 @@ finch_notify_searchresults(PurpleConnection *gc, const char *title, g_signal_connect(G_OBJECT(tree), "destroy", G_CALLBACK(notify_sr_destroy_cb), NULL); - 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 * |