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
This commit is contained in:
parent
543d636153
commit
c6534a144c
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue