Mercurial > dwindows
comparison gtk/dw.c @ 2860:9daee9d58956
GTK2/3/4: Handle deprecations in GLIB 2.74 and GTK 4.8.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 23 Nov 2022 02:17:12 +0000 |
parents | b5cd3242b5e7 |
children | 761b7a12b079 |
comparison
equal
deleted
inserted
replaced
2859:b5cd3242b5e7 | 2860:9daee9d58956 |
---|---|
2245 | 2245 |
2246 /* Initialize the application subsystem on supported versions... | 2246 /* Initialize the application subsystem on supported versions... |
2247 * we generate an application ID based on the binary name or PID | 2247 * we generate an application ID based on the binary name or PID |
2248 * instead of passing NULL to enable full application support. | 2248 * instead of passing NULL to enable full application support. |
2249 */ | 2249 */ |
2250 #if GLIB_CHECK_VERSION(2,74,0) | |
2251 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_DEFAULT_FLAGS); | |
2252 #else | |
2250 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE); | 2253 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE); |
2254 #endif | |
2251 if(g_application_register(_DWApp, NULL, NULL)) | 2255 if(g_application_register(_DWApp, NULL, NULL)) |
2252 { | 2256 { |
2253 #if GLIB_CHECK_VERSION(2,40,0) | 2257 #if GLIB_CHECK_VERSION(2,40,0) |
2254 /* Creat our notification handler for any notifications */ | 2258 /* Creat our notification handler for any notifications */ |
2255 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); | 2259 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); |