[libhandy/msvc: 7/11] hdy-settings.c: Don't build portal bits on Windows




commit 6078d4e77a40b7d38f57969324bea1c992375de9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jan 19 16:16:02 2022 +0800

    hdy-settings.c: Don't build portal bits on Windows
    
    portal is not supported on Windows, so don't try to build these items.

 src/hdy-settings.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/hdy-settings.c b/src/hdy-settings.c
index 4f655158..7e177efe 100644
--- a/src/hdy-settings.c
+++ b/src/hdy-settings.c
@@ -114,6 +114,7 @@ init_debug (HdySettings *self)
   }
 }
 
+#ifndef G_OS_WIN32
 /* Settings portal */
 
 static gboolean
@@ -326,6 +327,7 @@ is_running_in_flatpak (void)
 {
   return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
 }
+#endif /* !G_OS_WIN32 */
 
 static void
 gsettings_color_scheme_changed_cb (HdySettings *self)
@@ -346,10 +348,12 @@ init_gsettings (HdySettings *self)
   g_autoptr (GSettingsSchema) schema = NULL;
   g_autoptr (GSettingsSchema) a11y_schema = NULL;
 
+#ifndef G_OS_WIN32
   /* While we can access gsettings in flatpak, we can't do anything useful with
    * them as they aren't propagated from the system. */
   if (is_running_in_flatpak ())
     return;
+#endif
 
   source = g_settings_schema_source_get_default ();
 
@@ -435,10 +439,12 @@ hdy_settings_constructed (GObject *object)
 
   G_OBJECT_CLASS (hdy_settings_parent_class)->constructed (object);
 
+#ifndef G_OS_WIN32
   init_debug (self);
 
   if (!self->has_color_scheme || !self->has_high_contrast)
     init_portal (self);
+#endif
 
   if (!self->has_color_scheme || !self->has_high_contrast)
     init_gsettings (self);


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