Mercurial > dwindows
comparison gtk/dw.c @ 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 | 07f1366a724c |
children | 8ee74cf778cb |
comparison
equal
deleted
inserted
replaced
2197:b818a32f7790 | 2198:e66bc47eec34 |
---|---|
1998 if(func) | 1998 if(func) |
1999 func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data); | 1999 func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data); |
2000 } | 2000 } |
2001 #endif | 2001 #endif |
2002 | 2002 |
2003 #if GLIB_CHECK_VERSION(2,28,0) | |
2004 static void _dw_app_activate(GApplication *app, gpointer user_data) | |
2005 { | |
2006 /* Not sure why this signal is required, but GLib gives warnings | |
2007 * when this signal is not connected, so putting this here to | |
2008 * quell the warning and can be used at a later point if needed. | |
2009 */ | |
2010 } | |
2011 #endif | |
2012 | |
2003 /* | 2013 /* |
2004 * Initializes the Dynamic Windows engine. | 2014 * Initializes the Dynamic Windows engine. |
2005 * Parameters: | 2015 * Parameters: |
2006 * newthread: True if this is the only thread. | 2016 * newthread: True if this is the only thread. |
2007 * False if there is already a message loop running. | 2017 * False if there is already a message loop running. |
2144 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); | 2154 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); |
2145 | 2155 |
2146 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL); | 2156 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL); |
2147 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action)); | 2157 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action)); |
2148 #endif | 2158 #endif |
2159 g_signal_connect(_DWApp, "activate", G_CALLBACK(_dw_app_activate), NULL); | |
2149 g_application_activate(_DWApp); | 2160 g_application_activate(_DWApp); |
2150 } | 2161 } |
2151 #endif | 2162 #endif |
2152 return TRUE; | 2163 return TRUE; |
2153 } | 2164 } |