[calls/wip/cdavis/dark-style-preference: 1/2] application: Check libhandy version at compilation
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls/wip/cdavis/dark-style-preference: 1/2] application: Check libhandy version at compilation
- Date: Tue, 30 Nov 2021 21:04:17 +0000 (UTC)
commit fb23d42075ec6d3175fd2e604a0c9bb99963d17b
Author: Christopher Davis <christopherdavis gnome org>
Date: Tue Nov 30 12:04:11 2021 -0800
application: Check libhandy version at compilation
This only enables the dark style preference if we have
a libhandy version of 1.5.0 or newer.
src/calls-application.c | 4 ++++
src/meson.build | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/calls-application.c b/src/calls-application.c
index a56d4653..cedd7cdb 100644
--- a/src/calls-application.c
+++ b/src/calls-application.c
@@ -358,15 +358,19 @@ startup (GApplication *application)
{
g_autoptr (GtkCssProvider) provider = NULL;
g_autoptr (GError) error = NULL;
+#if HDY_CHECK_VERSION(1, 5, 0)
HdyStyleManager *style_manager;
+#endif
G_APPLICATION_CLASS (calls_application_parent_class)->startup (application);
hdy_init ();
+#if HDY_CHECK_VERSION(1, 5, 0)
style_manager = hdy_style_manager_get_default ();
hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_PREFER_LIGHT);
+#endif
if (!call_audio_init (&error))
{
diff --git a/src/meson.build b/src/meson.build
index 18e02ad2..1b68e80d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -31,7 +31,7 @@ calls_includes = [ top_include, src_include ]
calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'),
dependency('gtk+-3.0'),
- dependency('libhandy-1', version: '>= 1.5.0'),
+ dependency('libhandy-1', version: '>= 1.4.0'),
dependency('libfeedback-0.0'),
dependency('libpeas-1.0'),
dependency('gom-1.0'),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]