[gnome-tweaks/alatiera/flatpak-manifest: 40/41] Get Flatpakt




commit f863c695f6f76e8624ed09c7b1a442e7bb2a8701
Author: Evan Welsh <contact evanwelsh com>
Date:   Fri Oct 23 22:50:30 2020 -0500

    Get Flatpakt

 gtweak/gsettings.py               |  3 +++
 gtweak/tweaks/tweak_group_font.py | 14 +++++++++++---
 gtweak/utils.py                   | 15 +++++++++++----
 meson_options.txt                 |  9 +++++++++
 org.gnome.Tweaks.json             | 23 ++++++++++++++++++++++-
 5 files changed, 56 insertions(+), 8 deletions(-)
---
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index bcda918..57d2513 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -102,6 +102,9 @@ class GSettingsFakeSetting:
     def get_string(self, *args, **kwargs):
         return ""
 
+    def __getitem__(self, key):
+        return ""
+
     def __getattr__(self, name):
         def noop(*args, **kwargs):
             pass
diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py
index 3d7d61e..1700d27 100644
--- a/gtweak/tweaks/tweak_group_font.py
+++ b/gtweak/tweaks/tweak_group_font.py
@@ -6,15 +6,23 @@ from gi.repository import Gio, Gtk
 
 from gtweak.tweakmodel import Tweak
 from gtweak.widgets import ListBoxTweakGroup, GSettingsSpinButtonTweak, GSettingsFontButtonTweak
-
+from gtweak.gsettings import GSettingsSetting
+import logging
 
 class FontXSettingsTweak(Gtk.Box, Tweak):
 
     def __init__(self, **options):
         Gtk.Box.__init__(self)
         Tweak.__init__(self, _("Hinting"), _("Antialiasing"))
-
-        self.settings = Gio.Settings("org.gnome.settings-daemon.plugins.xsettings")
+        
+        try:
+            self.settings = GSettingsSetting("org.gnome.settings-daemon.plugins.xsettings")
+        except:
+            self.settings = None
+            logging.warn("org.gnome.settings-daemon.plugins.xsettings not installed or running")
+        
+        if not self.settings:
+            return
 
         self.set_spacing(12)
         self.props.margin_top = 12
diff --git a/gtweak/utils.py b/gtweak/utils.py
index af5fcf3..c2bc4fa 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -9,7 +9,7 @@ import shutil
 import subprocess
 import glob
 import itertools
-
+import logging
 import gi
 gi.require_version("Notify", "0.7")
 from gi.repository import GObject
@@ -18,7 +18,7 @@ from gi.repository import Gio
 from gi.repository import Notify
 
 import gtweak
-
+from gtweak.gsettings import GSettingsSetting
 
 def singleton(cls):
     """
@@ -261,8 +261,15 @@ class XSettingsOverrides:
     }
 
     def __init__(self):
-        self._settings = Gio.Settings(schema='org.gnome.settings-daemon.plugins.xsettings')
-        self._variant = self._settings.get_value("overrides")
+        # Ensure we don't error out
+        try:
+            self._settings = GSettingsSetting(schema='org.gnome.settings-daemon.plugins.xsettings')
+        except:
+            self._settings = None
+            logging.warn("org.gnome.settings-daemon.plugins.xsettings not installed or running")
+        
+        if self._settings:
+            self._variant = self._settings.get_value("overrides")
 
     def _dup_variant_as_dict(self):
         items = {}
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..a9e396d
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,9 @@
+option(
+  'profile',
+  type: 'combo',
+  choices: [
+    'default',
+    'development'
+  ],
+  value: 'default'
+)
diff --git a/org.gnome.Tweaks.json b/org.gnome.Tweaks.json
index 4611a5b..d151396 100644
--- a/org.gnome.Tweaks.json
+++ b/org.gnome.Tweaks.json
@@ -9,6 +9,8 @@
     ],
     "desktop-file-name-prefix" : "(Nightly) ",
     "finish-args" : [
+        "--socket=session-bus",
+        "--socket=system-bus",
         "--share=ipc",
         "--socket=x11",
         "--socket=wayland",
@@ -37,6 +39,25 @@
                 }
             ]
         },
+        {
+            "name" : "libhandy",
+            "buildsystem" : "meson",
+            "config-opts" : [
+                "-Dprofiling=false",
+                "-Dintrospection=enabled",
+                "-Dgtk_doc=false",
+                "-Dtests=false",
+                "-Dexamples=false",
+                "-Dvapi=false",
+                "-Dglade_catalog=disabled"
+            ],
+            "sources" : [
+                {
+                    "type" : "git",
+                    "url" : "https://gitlab.gnome.org/GNOME/libhandy.git";
+                }
+            ]
+        },
         {
             "name" : "gnome-tweaks",
             "buildsystem" : "meson",
@@ -52,4 +73,4 @@
             ]
         }
     ]
-}
\ No newline at end of file
+}


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