summaryrefslogtreecommitdiff
path: root/finch/gntnotify.c
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2011-12-22 05:45:40 +0000
committerHoward Chu <hyc@symas.com>2011-12-22 05:45:40 +0000
commit476fff3dd82429bf681bc18d3e4827f4728693f6 (patch)
tree66fb3f7ad6e8866ad94e293fd521b53c5f127e09 /finch/gntnotify.c
parent4cbb88b60c6e9bc9c3c5ce23c7ff052f539dd56f (diff)
downloadpidgin-476fff3dd82429bf681bc18d3e4827f4728693f6.tar.gz
Ensure that the user's close callback is invoked when search
results are closed in finch. Fixes #14820. committer: Elliott Sales de Andrade <qulogic@pidgin.im>
Diffstat (limited to 'finch/gntnotify.c')
-rw-r--r--finch/gntnotify.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/finch/gntnotify.c b/finch/gntnotify.c
index 8f01243c30..11b3a3e590 100644
--- a/finch/gntnotify.c
+++ b/finch/gntnotify.c
@@ -397,6 +397,12 @@ finch_notify_sr_new_rows(PurpleConnection *gc,
}
}
+static void
+notify_sr_destroy_cb(GntWidget *window, void *data)
+{
+ purple_notify_close(PURPLE_NOTIFY_SEARCHRESULTS, window);
+}
+
static void *
finch_notify_searchresults(PurpleConnection *gc, const char *title,
const char *primary, const char *secondary,
@@ -481,6 +487,8 @@ finch_notify_searchresults(PurpleConnection *gc, const char *title,
}
gnt_box_add_widget(GNT_BOX(window), box);
+ g_signal_connect(G_OBJECT(tree), "destroy",
+ G_CALLBACK(notify_sr_destroy_cb), NULL);
finch_notify_sr_new_rows(gc, results, tree);