changeset 2198:e66bc47eec34

GTK2: Same GLib warning elimination for GTK2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 26 Oct 2020 00:58:44 +0000
parents b818a32f7790
children 8ee74cf778cb
files gtk/dw.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Mon Oct 26 00:38:54 2020 +0000
+++ b/gtk/dw.c	Mon Oct 26 00:58:44 2020 +0000
@@ -2000,6 +2000,16 @@
 }
 #endif
 
+#if GLIB_CHECK_VERSION(2,28,0)
+static void _dw_app_activate(GApplication *app, gpointer user_data)
+{
+   /* Not sure why this signal is required, but GLib gives warnings
+    * when this signal is not connected, so putting this here to
+    * quell the warning and can be used at a later point if needed.
+    */
+}
+#endif
+
 /*
  * Initializes the Dynamic Windows engine.
  * Parameters:
@@ -2146,6 +2156,7 @@
       g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL);
       g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action));
 #endif
+      g_signal_connect(_DWApp, "activate", G_CALLBACK(_dw_app_activate), NULL);
       g_application_activate(_DWApp);
    }
 #endif