[balsa/gtk4] ab-main: Replace deprecated macro



commit 39d9060b649e5b9eedefe7469c743a8acb4ff173
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jul 26 20:51:56 2022 -0400

    ab-main: Replace deprecated macro
    
    In glib-2.74, ‘G_APPLICATION_FLAGS_NONE’ is deprecated for 'G_APPLICATION_DEFAULT_FLAGS'.

 src/ab-main.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/ab-main.c b/src/ab-main.c
index a5cb81b27..dca134893 100644
--- a/src/ab-main.c
+++ b/src/ab-main.c
@@ -1122,8 +1122,13 @@ main(int argc, char *argv[])
     GError *error = NULL;
     int retval;
 
+#if GLIB_CHECK_VERSION(2, 74, 0)
+    application =
+        gtk_application_new("org.desktop.BalsaAb", G_APPLICATION_DEFAULT_FLAGS);
+#else  /* GLIB_CHECK_VERSION(2, 74, 0) */
     application =
         gtk_application_new("org.desktop.BalsaAb", G_APPLICATION_FLAGS_NONE);
+#endif /* GLIB_CHECK_VERSION(2, 74, 0) */
     if (!g_application_register(G_APPLICATION(application), NULL, &error)) {
         g_warning("Could not register address book editor: %s", error->message);
         g_error_free(error);


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