From d4260449fb0d233da761ef8c5e2de39838517cbc Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Fri, 16 Jun 2023 02:53:52 +0000 Subject: [PATCH] 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. --- app/gimpconsoleapp.c | 4 ++++ app/gui/gimpapp.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/gimpconsoleapp.c b/app/gimpconsoleapp.c index 309d7263c4..1239b31c66 100644 --- a/app/gimpconsoleapp.c +++ b/app/gimpconsoleapp.c @@ -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, diff --git a/app/gui/gimpapp.c b/app/gui/gimpapp.c index f0c09e0aa7..214156ba1e 100644 --- a/app/gui/gimpapp.c +++ b/app/gui/gimpapp.c @@ -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,