[calls/wip/cdavis/dark-style-preference: 3/4] application: Check libhandy version at compilation




commit d8ced5c89d98e9df5a87903c1f3b4b26759adf81
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 ++++
 1 file changed, 4 insertions(+)
---
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))
     {


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