[grilo/ebassi/subproject-variables: 6/8] tools: Avoid a deprecation warning with newer GLib




commit 08cba177340c001e619213c0033f84b20d13a118
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Sep 27 14:27:17 2022 +0100

    tools: Avoid a deprecation warning with newer GLib
    
    G_APPLICATION_FLAGS_NONE has been deprecated, and replaced with
    G_APPLICATION_DEFAULT_FLAGS in GLib 2.74. We can simply use zero to
    avoid a version check.

 tools/grilo-test-ui/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index eb6f343..b4e9255 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -2501,12 +2501,13 @@ main (int argc, char **argv)
   GtkApplication *app;
   int status;
   g_autofree char *app_id = NULL;
+  GApplicationFlags app_flags = 0;
 
   grl_init (&argc, &argv);
   GRL_LOG_DOMAIN_INIT (test_ui_log_domain, "test-ui");
 
   app_id = get_app_id ();
-  app = gtk_application_new (app_id, G_APPLICATION_FLAGS_NONE);
+  app = gtk_application_new (app_id, app_flags);
   g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
   status = g_application_run (G_APPLICATION (app), argc, argv);
   g_object_unref (app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]