comparison gtk3/dw.c @ 2197:b818a32f7790

GTK3: Eliminate GLib warning due to missing 'activate' signal.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 26 Oct 2020 00:38:54 +0000
parents 07f1366a724c
children 8ee74cf778cb
comparison
equal deleted inserted replaced
2196:f0611d5385f9 2197:b818a32f7790
1973 if(func) 1973 if(func)
1974 func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data); 1974 func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data);
1975 } 1975 }
1976 #endif 1976 #endif
1977 1977
1978 #if GLIB_CHECK_VERSION(2,28,0)
1979 static void _dw_app_activate(GApplication *app, gpointer user_data)
1980 {
1981 /* Not sure why this signal is required, but GLib gives warnings
1982 * when this signal is not connected, so putting this here to
1983 * quell the warning and can be used at a later point if needed.
1984 */
1985 }
1986 #endif
1987
1978 /* 1988 /*
1979 * Initializes the Dynamic Windows engine. 1989 * Initializes the Dynamic Windows engine.
1980 * Parameters: 1990 * Parameters:
1981 * newthread: True if this is the only thread. 1991 * newthread: True if this is the only thread.
1982 * False if there is already a message loop running. 1992 * False if there is already a message loop running.
2072 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); 2082 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64);
2073 2083
2074 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL); 2084 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL);
2075 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action)); 2085 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action));
2076 #endif 2086 #endif
2087 g_signal_connect(_DWApp, "activate", G_CALLBACK(_dw_app_activate), NULL);
2077 g_application_activate(_DWApp); 2088 g_application_activate(_DWApp);
2078 } 2089 }
2079 #endif 2090 #endif
2080 return TRUE; 2091 return TRUE;
2081 } 2092 }