[gnome-tweaks/alatiera/flatpak-manifest] Adapt flatpak manifest to new dependencies.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks/alatiera/flatpak-manifest] Adapt flatpak manifest to new dependencies.
- Date: Wed, 20 Jan 2021 05:28:46 +0000 (UTC)
commit 74676d2a89346ea2a5e59c3578ed6fc76a39dff6
Author: Evan Welsh <contact evanwelsh com>
Date: Tue Jan 19 21:16:09 2021 -0800
Adapt flatpak manifest to new dependencies.
Also prevent crashes for schemas which aren't available in Flatpak.
gtweak/gsettings.py | 3 ++
gtweak/tweaks/tweak_group_font.py | 15 +++++--
gtweak/utils.py | 14 +++++--
org.gnome.Tweaks.json | 82 +++++++++++++++++++++++++--------------
4 files changed, 79 insertions(+), 35 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..4869aba 100644
--- a/gtweak/tweaks/tweak_group_font.py
+++ b/gtweak/tweaks/tweak_group_font.py
@@ -2,19 +2,28 @@
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSES/GPL-3.0
+import logging
+
from gi.repository import Gio, Gtk
from gtweak.tweakmodel import Tweak
from gtweak.widgets import ListBoxTweakGroup, GSettingsSpinButtonTweak, GSettingsFontButtonTweak
-
+from gtweak.gsettings import GSettingsSetting
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..64d07cc 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -9,6 +9,7 @@ import shutil
import subprocess
import glob
import itertools
+import logging
import gi
gi.require_version("Notify", "0.7")
@@ -18,7 +19,7 @@ from gi.repository import Gio
from gi.repository import Notify
import gtweak
-
+from gtweak.gsettings import GSettingsSetting
def singleton(cls):
"""
@@ -261,8 +262,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/org.gnome.Tweaks.json b/org.gnome.Tweaks.json
index 4611a5b..931d567 100644
--- a/org.gnome.Tweaks.json
+++ b/org.gnome.Tweaks.json
@@ -1,53 +1,77 @@
{
- "app-id" : "org.gnome.Tweaks",
- "runtime" : "org.gnome.Platform",
- "runtime-version" : "master",
- "sdk" : "org.gnome.Sdk",
- "command" : "gnome-tweaks",
- "tags" : [
- "nightly"
+ "app-id": "org.gnome.Tweaks",
+ "runtime": "org.gnome.Platform",
+ "runtime-version": "master",
+ "sdk": "org.gnome.Sdk",
+ "command": "gnome-tweaks",
+ "tags": [
+ "devel"
],
- "desktop-file-name-prefix" : "(Nightly) ",
- "finish-args" : [
- "--share=ipc",
- "--socket=x11",
- "--socket=wayland",
- "--talk-name=org.gnome.Shell",
- "--filesystem=/usr/share/glib-2.0/schemas:ro",
+ "desktop-file-name-prefix": "(Development) ",
+ "finish-args": [
+ "--device=dri",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:rw",
"--talk-name=ca.desrt.dconf",
- "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
+ "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
+ "--filesystem=host",
+ "--own-name=org.gnome.tweaks",
+ "--socket=session-bus",
+ "--socket=system-bus",
+ "--share=ipc",
+ "--socket=x11",
+ "--socket=wayland",
+ "--socket=system-bus",
+ "--talk-name=org.gnome.Shell"
],
- "cleanup" : [
+ "cleanup": [
"/include",
"/lib/*.la",
"/lib/*.a",
"/lib/pkgconfig",
"/share/gir-1.0"
],
- "modules" : [
+ "modules": [
+ {
+ "name": "gnome-desktop",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/gnome-desktop.git"
+ }
+ ]
+ },
{
- "name" : "gnome-desktop",
- "buildsystem" : "meson",
- "sources" : [
+ "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/gnome-desktop.git"
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/libhandy.git"
}
]
},
{
- "name" : "gnome-tweaks",
- "buildsystem" : "meson",
- "sources" : [
+ "name": "gnome-tweaks",
+ "buildsystem": "meson",
+ "sources": [
{
- "type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/gnome-tweaks.git"
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/gnome-tweaks.git"
},
{
- "type" : "patch",
- "path" : "gtweak-hardcode-system-dirs.patch"
+ "type": "patch",
+ "path": "gtweak-hardcode-system-dirs.patch"
}
]
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]