app: fix some glib related deprecations

As in d16734a4, this checks the GLib version and conditionally uses 
G_APPLICATION_DEFAULT_FLAGS or G_APPLICATION_FLAGS_NONE for GimpApp.
This commit is contained in:
Alx Sa 2023-06-16 02:53:52 +00:00
parent bf1e125138
commit d4260449fb
2 changed files with 8 additions and 0 deletions

View File

@ -66,7 +66,11 @@ gimp_console_app_new (Gimp *gimp,
app = g_object_new (GIMP_TYPE_CONSOLE_APP,
"application-id", GIMP_APPLICATION_ID,
#if GLIB_CHECK_VERSION(2,74,0)
"flags", G_APPLICATION_DEFAULT_FLAGS | G_APPLICATION_NON_UNIQUE,
#else
"flags", G_APPLICATION_FLAGS_NONE | G_APPLICATION_NON_UNIQUE,
#endif
"gimp", gimp,
"filenames", filenames,
"as-new", as_new,

View File

@ -142,7 +142,11 @@ gimp_app_new (Gimp *gimp,
* remove our own code for uniqueness and batch command
* inter-process communication. This should be tested.
*/
#if GLIB_CHECK_VERSION(2,74,0)
"flags", G_APPLICATION_DEFAULT_FLAGS | G_APPLICATION_NON_UNIQUE,
#else
"flags", G_APPLICATION_FLAGS_NONE | G_APPLICATION_NON_UNIQUE,
#endif
"gimp", gimp,
"filenames", filenames,
"as-new", as_new,