From d16734a4e42587392ceefe9359dcebf7ae76592e Mon Sep 17 00:00:00 2001 From: Simon Budig Date: Sat, 20 May 2023 21:46:17 +0200 Subject: [PATCH] plug-ins: fix some glib related deprecations --- plug-ins/common/animation-play.c | 4 ++++ plug-ins/common/colormap-remap.c | 4 ++++ plug-ins/common/unit-editor.c | 4 ++++ plug-ins/gfig/gfig.c | 4 ++++ plug-ins/help-browser/help-browser.c | 4 ++++ plug-ins/ifs-compose/ifs-compose.c | 4 ++++ plug-ins/imagemap/imap_main.c | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c index 77e892ee17..af9bd76409 100644 --- a/plug-ins/common/animation-play.c +++ b/plug-ins/common/animation-play.c @@ -358,7 +358,11 @@ play_run (GimpProcedure *procedure, GimpPlay *play; play = GIMP_PLAY (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + play->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else play->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif play->builder = gtk_builder_new_from_string ( "" diff --git a/plug-ins/common/colormap-remap.c b/plug-ins/common/colormap-remap.c index 3880a84725..b191e1250e 100644 --- a/plug-ins/common/colormap-remap.c +++ b/plug-ins/common/colormap-remap.c @@ -269,7 +269,11 @@ remap_run (GimpProcedure *procedure, GimpRemap *remap = GIMP_REMAP (run_data); remap = GIMP_REMAP (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + remap->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else remap->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif remap->image = image; remap->builder = gtk_builder_new_from_string ( diff --git a/plug-ins/common/unit-editor.c b/plug-ins/common/unit-editor.c index 0184cc17a8..bd06d90075 100644 --- a/plug-ins/common/unit-editor.c +++ b/plug-ins/common/unit-editor.c @@ -399,7 +399,11 @@ editor_run (GimpProcedure *procedure, gimp_ui_init (PLUG_IN_BINARY); +#if GLIB_CHECK_VERSION(2,74,0) + editor->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else editor->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif g_signal_connect (editor->app, "activate", G_CALLBACK (on_app_activate), editor); g_application_run (G_APPLICATION (editor->app), 0, NULL); diff --git a/plug-ins/gfig/gfig.c b/plug-ins/gfig/gfig.c index dd32be34e3..d58060024f 100644 --- a/plug-ins/gfig/gfig.c +++ b/plug-ins/gfig/gfig.c @@ -225,7 +225,11 @@ gfig_run (GimpProcedure *procedure, } gfig = GIMP_GFIG (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + gfig->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else gfig->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif gfig->success = FALSE; gfig->builder = gtk_builder_new_from_string ( diff --git a/plug-ins/help-browser/help-browser.c b/plug-ins/help-browser/help-browser.c index 21a995b565..1dcb7aa0a5 100644 --- a/plug-ins/help-browser/help-browser.c +++ b/plug-ins/help-browser/help-browser.c @@ -167,7 +167,11 @@ help_browser_run (GimpProcedure *procedure, gimp_procedure_extension_ready (procedure); gimp_plug_in_extension_enable (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + browser->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else browser->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif g_signal_connect (browser->app, "activate", G_CALLBACK (on_app_activate), browser); g_application_run (G_APPLICATION (browser->app), 0, NULL); diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c index 8b04a1e3de..edf9a70d9b 100644 --- a/plug-ins/ifs-compose/ifs-compose.c +++ b/plug-ins/ifs-compose/ifs-compose.c @@ -469,7 +469,11 @@ ifs_run (GimpProcedure *procedure, gboolean found_parasite = FALSE; ifs = GIMP_IFS (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + ifs->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else ifs->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif ifs->builder = gtk_builder_new_from_string ( "" diff --git a/plug-ins/imagemap/imap_main.c b/plug-ins/imagemap/imap_main.c index 9d92fcf0aa..208d30eab4 100644 --- a/plug-ins/imagemap/imap_main.c +++ b/plug-ins/imagemap/imap_main.c @@ -247,7 +247,11 @@ imap_run (GimpProcedure *procedure, gegl_init (NULL, NULL); imap = GIMP_IMAP (gimp_procedure_get_plug_in (procedure)); +#if GLIB_CHECK_VERSION(2,74,0) + imap->app = gtk_application_new (NULL, G_APPLICATION_DEFAULT_FLAGS); +#else imap->app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE); +#endif imap->success = FALSE; imap->builder = gtk_builder_new_from_string (