Mercurial > dwindows
comparison gtk3/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 |
---|---|
2137 | 2137 |
2138 /* Initialize the application subsystem on supported versions... | 2138 /* Initialize the application subsystem on supported versions... |
2139 * we generate an application ID based on the binary name or PID | 2139 * we generate an application ID based on the binary name or PID |
2140 * instead of passing NULL to enable full application support. | 2140 * instead of passing NULL to enable full application support. |
2141 */ | 2141 */ |
2142 #if GLIB_CHECK_VERSION(2,74,0) | |
2143 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_DEFAULT_FLAGS); | |
2144 #else | |
2142 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE); | 2145 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE); |
2146 #endif | |
2143 if(_DWApp && g_application_register(_DWApp, NULL, NULL)) | 2147 if(_DWApp && g_application_register(_DWApp, NULL, NULL)) |
2144 { | 2148 { |
2145 #if GLIB_CHECK_VERSION(2,40,0) | 2149 #if GLIB_CHECK_VERSION(2,40,0) |
2146 /* Creat our notification handler for any notifications */ | 2150 /* Creat our notification handler for any notifications */ |
2147 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); | 2151 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); |