pidgin/pidgin

6a3b63c6d6c3
Parents bdbd0668fb7f
Children 61c0f0d9b632
Fix the windows build where gtk_widget_get_visible is not available

Testing Done:
Compiled on windows.

Reviewed at https://reviews.imfreedom.org/r/2975/
--- a/pidgin/gtkblist.c Fri Feb 23 02:39:11 2024 -0600
+++ b/pidgin/gtkblist.c Fri Feb 23 02:39:28 2024 -0600
@@ -5737,7 +5737,14 @@
static gboolean
pidgin_blist_collapse_all_search_groups_timer_cb(gpointer user_data)
{
- if(!gtk_widget_get_visible(user_data)) {
+ gboolean visible = FALSE;
+
+ /* gtk_widget_get_visible was added in gtk 2.18.0 but we need to support
+ * 2.16.0 for our windows build. Luckily the property existed in 2.16.0, so
+ * we just pull it out via g_object_get.
+ */
+ g_object_get(user_data, "visible", &visible, NULL);
+ if(!visible) {
collapse_all_groups_expanded_by_search(GTK_TREE_MODEL(gtkblist->treemodel),
NULL);
}