From c6534a144cdf47f122048643673c40a83d83fa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 11 May 2022 18:46:41 +0200 Subject: build: Bump dependency on glib 2.38 It's almost 10 years old, so I think we can safely depend on that to support the features we're optionally depending on, plus the ones we're going to add --- libnotify/notification.c | 4 ---- libnotify/notify.c | 8 -------- meson.build | 2 +- tests/test-error.c | 4 ---- tests/test-replace.c | 4 ---- tools/notify-send.c | 4 ---- 6 files changed, 1 insertion(+), 25 deletions(-) diff --git a/libnotify/notification.c b/libnotify/notification.c index e81a9b9..f20414d 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -707,9 +707,7 @@ notify_notification_show (NotifyNotification *notification, GHashTableIter iter; gpointer key, data; GVariant *result; -#ifdef GLIB_VERSION_2_32 GApplication *application = NULL; -#endif g_return_val_if_fail (notification != NULL, FALSE); g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), FALSE); @@ -763,7 +761,6 @@ notify_notification_show (NotifyNotification *notification, g_variant_new_take_string (snap_desktop)); } -#ifdef GLIB_VERSION_2_32 if (!_notify_get_snap_app ()) { application = g_application_get_default (); } @@ -779,7 +776,6 @@ notify_notification_show (NotifyNotification *notification, g_variant_new_string (application_id)); } } -#endif /* TODO: make this nonblocking */ result = g_dbus_proxy_call_sync (proxy, diff --git a/libnotify/notify.c b/libnotify/notify.c index 601f8bd..e6214c7 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -166,28 +166,20 @@ notify_init (const char *app_name) return TRUE; if (app_name == NULL) { -#ifdef GLIB_VERSION_2_32 GApplication *application; -#endif app_name = _notify_get_snap_app (); -#ifdef GLIB_VERSION_2_32 if (app_name == NULL && (application = g_application_get_default ())) { app_name = g_application_get_application_id (application); } -#endif } if (!set_app_name (app_name)) { return FALSE; } -#ifndef GLIB_VERSION_2_36 - g_type_init (); -#endif - _initted = TRUE; return TRUE; diff --git a/meson.build b/meson.build index 7abea3b..a597da9 100644 --- a/meson.build +++ b/meson.build @@ -36,7 +36,7 @@ man1dir = join_paths(prefix, get_option('mandir'), 'man1') libnotify_deps = [] extra_deps = [] -glib_req_version = '>= 2.26.0' +glib_req_version = '>= 2.38.0' gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0') glib_dep = dependency('glib-2.0', version: glib_req_version) diff --git a/tests/test-error.c b/tests/test-error.c index 66d7675..e18428b 100644 --- a/tests/test-error.c +++ b/tests/test-error.c @@ -29,10 +29,6 @@ main () { NotifyNotification *n; -#ifndef GLIB_VERSION_2_36 - g_type_init (); -#endif - notify_init ("Error Handling"); n = notify_notification_new ("Summary", "Content", NULL); diff --git a/tests/test-replace.c b/tests/test-replace.c index 5af0c27..eea6409 100644 --- a/tests/test-replace.c +++ b/tests/test-replace.c @@ -28,10 +28,6 @@ main () GError *error; error = NULL; -#ifndef GLIB_VERSION_2_36 - g_type_init (); -#endif - notify_init ("Replace Test"); n = notify_notification_new ("Summary", diff --git a/tools/notify-send.c b/tools/notify-send.c index 667f9d5..367dfb0 100644 --- a/tools/notify-send.c +++ b/tools/notify-send.c @@ -283,10 +283,6 @@ main (int argc, char *argv[]) setlocale (LC_ALL, ""); -#ifndef GLIB_VERSION_2_36 - g_type_init (); -#endif - g_set_prgname (argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); -- cgit v1.2.1