summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-05-11 18:46:41 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-06-07 03:18:38 +0200
commitc6534a144cdf47f122048643673c40a83d83fa2b (patch)
tree92947cc01551947b9031a8fd120262dc76e5efff
parent543d6361533a2d95ac276b0c5163dfeb911e90e9 (diff)
downloadlibnotify-c6534a144cdf47f122048643673c40a83d83fa2b.tar.gz
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
-rw-r--r--libnotify/notification.c4
-rw-r--r--libnotify/notify.c8
-rw-r--r--meson.build2
-rw-r--r--tests/test-error.c4
-rw-r--r--tests/test-replace.c4
-rw-r--r--tools/notify-send.c4
6 files changed, 1 insertions, 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);