diff --git a/files/0001-Don-t-show-extensions-notice.patch b/files/0001-Don-t-show-extensions-notice.patch new file mode 100644 --- /dev/null +++ b/files/0001-Don-t-show-extensions-notice.patch @@ -0,0 +1,31 @@ +From a9f630a5fae6a5ea1eb346708184e15548fa8d5c Mon Sep 17 00:00:00 2001 +From: Reilly Brogan +Date: Fri, 4 Mar 2022 19:28:39 -0600 +Subject: [PATCH] Don't show extensions notice + +Versions of gnome-tweaks prior to 40.x supported managing extensions, however this was removed in 40.0 and +a message stating that "Extensions support has moved" now pops up on the first launch of all versions >= 40.0. + +Solus however has always disabled extensions support in gnome-tweaks and therefore our users gain nothing from +seeing this message. + +--- + data/org.gnome.tweaks.gschema.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/org.gnome.tweaks.gschema.xml b/data/org.gnome.tweaks.gschema.xml +index 1fe0237..bf6950a 100644 +--- a/data/org.gnome.tweaks.gschema.xml ++++ b/data/org.gnome.tweaks.gschema.xml +@@ -2,7 +2,7 @@ + + + +- true ++ false + Show Extensions Notice + When first installed the user should be notified that extensions support has moved to a dedicated app, Extensions. + +-- +2.35.1 + diff --git a/files/0001-Ensure-support-for-GNOME-40-drop-Extensions-support-d.patch b/files/0001-Ensure-support-for-GNOME-40-drop-Extensions-support-d.patch deleted file mode 100644 --- a/files/0001-Ensure-support-for-GNOME-40-drop-Extensions-support-d.patch +++ /dev/null @@ -1,801 +0,0 @@ -From ece0ed9c64c1a5f5f6aa8064ee228b64806fdae5 Mon Sep 17 00:00:00 2001 -From: Joshua Strobl -Date: Fri, 16 Apr 2021 04:05:26 +0300 -Subject: [PATCH 1/1] Ensure support for GNOME 40, drop Extensions support due - to dedicated app. - ---- - data/shell.ui | 4 - - gtweak/app.py | 9 - - gtweak/egowrapper.py | 105 ------- - gtweak/gshellwrapper.py | 104 +------ - gtweak/meson.build | 2 - - gtweak/tweaks/tweak_group_font.py | 30 +- - gtweak/tweaks/tweak_group_keymouse.py | 3 +- - gtweak/tweaks/tweak_group_shell_extensions.py | 285 ------------------ - gtweak/tweaks/tweak_group_top_bar.py | 2 +- - gtweak/utils.py | 14 - - 10 files changed, 26 insertions(+), 532 deletions(-) - delete mode 100644 gtweak/egowrapper.py - delete mode 100644 gtweak/tweaks/tweak_group_shell_extensions.py - -diff --git a/data/shell.ui b/data/shell.ui -index 3501513..d9a88dd 100644 ---- a/data/shell.ui -+++ b/data/shell.ui -@@ -7,10 +7,6 @@ - _Reset to Defaults - app.reset - -- -- Disable All Shell Extensions -- app.disable_extension -- - -
- -diff --git a/gtweak/app.py b/gtweak/app.py -index 9435c9d..882e649 100644 ---- a/gtweak/app.py -+++ b/gtweak/app.py -@@ -14,7 +14,6 @@ from gtweak.tweakmodel import TweakModel - from gtweak.tweakview import Window - from gtweak.utils import SchemaList - from gtweak.gshellwrapper import GnomeShellFactory --from gtweak.utils import DisableExtension - - - class GnomeTweaks(Gtk.Application): -@@ -38,10 +37,6 @@ class GnomeTweaks(Gtk.Application): - reset_action.connect("activate", self.reset_cb) - self.add_action(reset_action) - -- disable_extension_action = Gio.SimpleAction.new("disable_extension", None) -- disable_extension_action.connect("activate", self.disable_cb) -- self.add_action(disable_extension_action) -- - help_action = Gio.SimpleAction.new("help", None) - help_action.connect("activate", self.help_cb) - self.add_action(help_action) -@@ -63,10 +58,6 @@ class GnomeTweaks(Gtk.Application): - def help_cb(self, action, parameter): - print("This does nothing. It is only a demonstration.") - -- def disable_cb(self, action, parameter): -- ds = DisableExtension() -- ds.disable() -- - def about_cb(self, action, parameter): - aboutdialog = Gtk.AboutDialog(modal=True, transient_for=self.win) - aboutdialog.set_program_name(aboutdialog.get_program_name() + " %s" % VERSION) -diff --git a/gtweak/egowrapper.py b/gtweak/egowrapper.py -deleted file mode 100644 -index 9fed605..0000000 ---- a/gtweak/egowrapper.py -+++ /dev/null -@@ -1,105 +0,0 @@ --# Copyright (c) 2011 John Stowers --# SPDX-License-Identifier: GPL-3.0+ --# License-Filename: LICENSES/GPL-3.0 -- --import json --import logging -- --import gi --gi.require_version("Soup", "2.4") --from gi.repository import GObject --from gi.repository import Soup -- -- --class ExtensionsDotGnomeDotOrg(GObject.GObject): -- -- __gsignals__ = { -- "got-extensions": (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE, -- (GObject.TYPE_PYOBJECT,)), -- "got-extension-info": (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE, -- (GObject.TYPE_PYOBJECT, GObject.TYPE_STRING)), -- } -- -- def __init__(self, shell_version_tuple): -- GObject.GObject.__init__(self) -- self._session = Soup.Session.new() -- -- self._shell_version_tuple = shell_version_tuple -- self._extensions = {} -- -- def _query_extensions_finished(self, msg, url): -- if msg.status_code == 200: -- # server returns a list of extensions which may contain duplicates, dont know -- resp = json.loads(msg.response_body.data) -- print(resp) -- for e in resp["extensions"]: -- self._extensions[e["uuid"]] = e -- self.emit("got-extensions", self._extensions) -- -- def _query_extension_info_finished(self, msg, uuid): -- if msg.status_code == 200: -- self.emit("got-extension-info", json.loads(msg.response_body.data), uuid) -- -- def query_extensions(self): -- url = "https://extensions.gnome.org/extension-query/?" -- -- ver = self._shell_version_tuple -- if ver[1] % 2: -- # if this is a development version (odd) then query the full version -- url += "shell_version=%d.%d.%d&" % ver -- else: -- # else query in point releases up to the current version -- # and filter duplicates from the reply -- url += "shell_version=%d.%d&" % (ver[0], ver[1]) -- for i in range(1, ver[2]+1): -- url += "shell_version=%d.%d.%d&" % (ver[0], ver[1], i) -- # non-paginated -- url += "n_per_page=-1" -- -- logging.debug("Query URL: %s" % url) -- message = Soup.Message.new('GET', url) -- message.connect("finished", self._query_extensions_finished, url) -- self._session.queue_message(message, None, None) -- -- def query_extension_info(self, extension_uuid): -- if extension_uuid in self._extensions: -- print("CACHED") -- self.emit("got-extension-info", self._extensions[extension_uuid]) -- return -- -- url = "https://extensions.gnome.org/extension-info/?uuid=%s" % extension_uuid -- logging.debug("Query URL: %s" % url) -- message = Soup.Message.new('GET', url) -- message.connect("finished", self._query_extension_info_finished, extension_uuid) -- self._session.queue_message(message, None, None) -- -- def get_download_url(self, extinfo): -- url = "https://extensions.gnome.org/download-extension/%s.shell-extension.zip?version_tag=%d" -- # version tag is the pk in the shell_version_map -- # url = url % (extinfo["uuid"], -- -- --if __name__ == "__main__": -- import pprint -- from gi.repository import Gtk -- -- def _got_ext(ego, extensions): -- print("="*80) -- pprint.pprint(list(extensions.values())) -- -- def _got_ext_info(ego, extension): -- pprint.pprint(extension) -- -- logging.basicConfig(format="%(levelname)-8s: %(message)s", level=logging.DEBUG) -- -- e = ExtensionsDotGnomeDotOrg((3, 4, 1)) -- -- e.connect("got-extensions", _got_ext) -- e.connect("got-extension-info", _got_ext_info) -- -- e.query_extensions() -- # e.query_extensions((3, 4, 0)) -- # e.query_extensions((3, 3, 2)) -- e.query_extension_info("user-theme@gnome-shell-extensions.gcampax.github.com") -- -- Gtk.main() -diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py -index 1673657..676a6b5 100644 ---- a/gtweak/gshellwrapper.py -+++ b/gtweak/gshellwrapper.py -@@ -24,7 +24,6 @@ class _ShellProxy: - 'org.gnome.Shell', - None) - -- # GNOME Shell > 3.5 added a separate extension interface - self.proxy_extensions = Gio.DBusProxy.new_sync( - d, 0, None, - 'org.gnome.Shell', -@@ -32,31 +31,19 @@ class _ShellProxy: - 'org.gnome.Shell.Extensions', - None) - -- # GNOME Shell > 3.7.2 added the Mode to the DBus API - val = self.proxy.get_cached_property("Mode") - if val is not None: - self._mode = val.unpack() - else: -- js = 'global.session_mode' -- result, output = self.proxy.Eval('(s)', js) -- if result and output: -- self._mode = json.loads(output) -- else: -- logging.warning("Error getting shell mode via Eval JS") -- self._mode = "user" -- -- # GNOME Shell > 3.3 added the Version to the DBus API and disabled execute_js -+ logging.warning("Error getting shell mode") -+ self._mode = "user" -+ - val = self.proxy.get_cached_property("ShellVersion") - if val is not None: - self._version = val.unpack() - else: -- js = 'const Config = imports.misc.config; Config.PACKAGE_VERSION' -- result, output = self.proxy.Eval('(s)', js) -- if result and output: -- self._version = json.loads(output) -- else: -- logging.critical("Error getting shell version via Eval JS") -- self._version = "0.0.0" -+ logging.critical("Error getting shell version") -+ self._version = "0.0.0" - - @property - def mode(self): -@@ -69,23 +56,6 @@ class _ShellProxy: - - class GnomeShell: - -- EXTENSION_STATE = { -- "ENABLED" : 1, -- "DISABLED" : 2, -- "ERROR" : 3, -- "OUT_OF_DATE" : 4, -- "DOWNLOADING" : 5, -- "INITIALIZED" : 6, -- } -- -- EXTENSION_TYPE = { -- "SYSTEM" : 1, -- "PER_USER" : 2 -- } -- -- DATA_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell") -- EXTENSION_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell", "extensions") -- - def __init__(self, shellproxy, shellsettings): - self._proxy = shellproxy - self._settings = shellsettings -@@ -102,8 +72,8 @@ class GnomeShell: - def reload_theme(self): - self._execute_js('const Main = imports.ui.main; Main.loadTheme();') - -- def uninstall_extension(self, uuid): -- pass -+ def list_extensions(self): -+ return self._proxy.proxy_extensions.ListExtensions() - - @property - def mode(self): -@@ -114,72 +84,16 @@ class GnomeShell: - return self._proxy.version - - --class GnomeShell32(GnomeShell): -- -- EXTENSION_ENABLED_KEY = "enabled-extensions" -- SUPPORTS_EXTENSION_PREFS = False -- -- def list_extensions(self): -- return self._proxy.proxy.ListExtensions() -- -- def extension_is_active(self, state, uuid): -- return state == GnomeShell.EXTENSION_STATE["ENABLED"] and \ -- self._settings.setting_is_in_list(self.EXTENSION_ENABLED_KEY, uuid) -- -- def enable_extension(self, uuid): -- self._settings.setting_add_to_list(self.EXTENSION_ENABLED_KEY, uuid) -- -- def disable_extension(self, uuid): -- self._settings.setting_remove_from_list(self.EXTENSION_ENABLED_KEY, uuid) -- -- --class GnomeShell34(GnomeShell32): -- -- SUPPORTS_EXTENSION_PREFS = True -- -- def restart(self): -- logging.warning("Restarting Shell Not Supported") -- -- def reload_theme(self): -- logging.warning("Reloading Theme Not Supported") -- -- def uninstall_extension(self, uuid): -- return self._proxy.proxy.UninstallExtension('(s)', uuid) -- -- --class GnomeShell36(GnomeShell34): -- -- def list_extensions(self): -- return self._proxy.proxy_extensions.ListExtensions() -- -- def uninstall_extension(self, uuid): -- return self._proxy.proxy_extensions.UninstallExtension('(s)', uuid) -- -- def install_remote_extension(self, uuid, reply_handler, error_handler, user_data): -- self._proxy.proxy_extensions.InstallRemoteExtension('(s)', uuid, -- result_handler=reply_handler, error_handler=error_handler, user_data=user_data) -- -- - @gtweak.utils.singleton - class GnomeShellFactory: - def __init__(self): - try: - proxy = _ShellProxy() - settings = GSettingsSetting("org.gnome.shell") -- v = list(map(int, proxy.version.split("."))) -- -- if v >= [3, 5, 0]: -- self.shell = GnomeShell36(proxy, settings) -- elif v >= [3, 3, 2]: -- self.shell = GnomeShell34(proxy, settings) -- elif v >= [3, 1, 4]: -- self.shell = GnomeShell32(proxy, settings) - -- else: -- logging.warn("Shell version not supported") -- self.shell = None -+ self.shell = GnomeShell(proxy, settings) - -- logging.debug("Shell version: %s", str(v)) -+ logging.debug("Shell version: %s", str(proxy.version)) - except: - self.shell = None - logging.warn("Shell not installed or running") -diff --git a/gtweak/meson.build b/gtweak/meson.build -index 3d9a743..052b7cb 100644 ---- a/gtweak/meson.build -+++ b/gtweak/meson.build -@@ -17,7 +17,6 @@ configure_file( - - shell_sources = [ - 'app.py', -- 'egowrapper.py', - 'gsettings.py', - 'gshellwrapper.py', - 'gtksettings.py', -@@ -35,7 +34,6 @@ tweak_sources = [ - 'tweaks/tweak_group_font.py', - 'tweaks/tweak_group_general.py', - 'tweaks/tweak_group_keymouse.py', -- 'tweaks/tweak_group_shell_extensions.py', - 'tweaks/tweak_group_startup.py', - 'tweaks/tweak_group_test.py', - 'tweaks/tweak_group_title_bar.py', -diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py -index 3d7d61e..a1d5152 100644 ---- a/gtweak/tweaks/tweak_group_font.py -+++ b/gtweak/tweaks/tweak_group_font.py -@@ -14,7 +14,7 @@ class FontXSettingsTweak(Gtk.Box, Tweak): - Gtk.Box.__init__(self) - Tweak.__init__(self, _("Hinting"), _("Antialiasing")) - -- self.settings = Gio.Settings("org.gnome.settings-daemon.plugins.xsettings") -+ self.settings = Gio.Settings("org.gnome.desktop.interface") - - self.set_spacing(12) - self.props.margin_top = 12 -@@ -29,25 +29,25 @@ class FontXSettingsTweak(Gtk.Box, Tweak): - - self.btn_full = Gtk.RadioButton.new_from_widget(None) - self.btn_full.set_label(_("Full")) -- self.btn_full.set_active(self.settings["hinting"] == "full") -+ self.btn_full.set_active(self.settings["font-hinting"] == "full") - self.btn_full.connect("toggled", self.on_hint_button_toggled) - hint_box.pack_start(self.btn_full, False, False, 0) - - self.btn_med = Gtk.RadioButton.new_from_widget(self.btn_full) - self.btn_med.set_label(_("Medium")) -- self.btn_med.set_active(self.settings["hinting"] == "medium") -+ self.btn_med.set_active(self.settings["font-hinting"] == "medium") - self.btn_med.connect("toggled", self.on_hint_button_toggled) - hint_box.pack_start(self.btn_med, False, False, 0) - - self.btn_slight = Gtk.RadioButton.new_from_widget(self.btn_full) - self.btn_slight.set_label(_("Slight")) -- self.btn_slight.set_active(self.settings["hinting"] == "slight") -+ self.btn_slight.set_active(self.settings["font-hinting"] == "slight") - self.btn_slight.connect("toggled", self.on_hint_button_toggled) - hint_box.pack_start(self.btn_slight, False, False, 0) - - self.btn_hnone = Gtk.RadioButton.new_from_widget(self.btn_full) - self.btn_hnone.set_label(_("None")) -- self.btn_hnone.set_active(self.settings["hinting"] == "none") -+ self.btn_hnone.set_active(self.settings["font-hinting"] == "none") - self.btn_hnone.connect("toggled", self.on_hint_button_toggled) - hint_box.pack_start(self.btn_hnone, False, False, 0) - -@@ -60,40 +60,40 @@ class FontXSettingsTweak(Gtk.Box, Tweak): - - self.btn_rgba = Gtk.RadioButton.new_from_widget(None) - self.btn_rgba.set_label(_("Subpixel (for LCD screens)")) -- self.btn_rgba.set_active(self.settings["antialiasing"] == "rgba") -+ self.btn_rgba.set_active(self.settings["font-antialiasing"] == "rgba") - self.btn_rgba.connect("toggled", self.on_aa_button_toggled) - aa_box.pack_start(self.btn_rgba, False, False, 0) - - self.btn_gray = Gtk.RadioButton.new_from_widget(self.btn_rgba) - self.btn_gray.set_label(_("Standard (grayscale)")) -- self.btn_gray.set_active(self.settings["antialiasing"] == "grayscale") -+ self.btn_gray.set_active(self.settings["font-antialiasing"] == "grayscale") - self.btn_gray.connect("toggled", self.on_aa_button_toggled) - aa_box.pack_start(self.btn_gray, False, False, 0) - - self.btn_anone = Gtk.RadioButton.new_from_widget(self.btn_rgba) - self.btn_anone.set_label(_("None")) -- self.btn_anone.set_active(self.settings["antialiasing"] == "none") -+ self.btn_anone.set_active(self.settings["font-antialiasing"] == "none") - self.btn_anone.connect("toggled", self.on_aa_button_toggled) - aa_box.pack_start(self.btn_anone, False, False, 0) - - def on_hint_button_toggled(self, button): - if self.btn_full.get_active(): -- self.settings["hinting"] ="full" -+ self.settings["font-hinting"] ="full" - elif self.btn_med.get_active(): -- self.settings["hinting"] = "medium" -+ self.settings["font-hinting"] = "medium" - elif self.btn_slight.get_active(): -- self.settings["hinting"] = "slight" -+ self.settings["font-hinting"] = "slight" - else: - print("none") -- self.settings["hinting"] = "none" -+ self.settings["font-hinting"] = "none" - - def on_aa_button_toggled(self, button): - if self.btn_rgba.get_active(): -- self.settings["antialiasing"] = "rgba" -+ self.settings["font-antialiasing"] = "rgba" - elif self.btn_gray.get_active(): -- self.settings["antialiasing"] = "grayscale" -+ self.settings["font-antialiasing"] = "grayscale" - else: -- self.settings["antialiasing"] = "none" -+ self.settings["font-antialiasing"] = "none" - - TWEAK_GROUPS = [ - ListBoxTweakGroup(_("Fonts"), -diff --git a/gtweak/tweaks/tweak_group_keymouse.py b/gtweak/tweaks/tweak_group_keymouse.py -index 4933991..02da8bc 100644 ---- a/gtweak/tweaks/tweak_group_keymouse.py -+++ b/gtweak/tweaks/tweak_group_keymouse.py -@@ -376,9 +376,8 @@ TWEAK_GROUPS = [ - "accel-profile", - schema_filename="org.gnome.desktop.peripherals.gschema.xml"), - GSettingsSwitchTweak(_("Pointer Location"), -- "org.gnome.settings-daemon.peripherals.mouse", -+ "org.gnome.desktop.interface", - "locate-pointer", -- schema_filename="org.gnome.settings-daemon.peripherals.gschema.xml", - desc=_("Press the Ctrl key to highlight the pointer.")), - GSettingsSwitchTweak(_("Middle Click Paste"), - "org.gnome.desktop.interface", -diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py -deleted file mode 100644 -index 47854a7..0000000 ---- a/gtweak/tweaks/tweak_group_shell_extensions.py -+++ /dev/null -@@ -1,285 +0,0 @@ --# SPDX-License-Identifier: GPL-3.0+ --# License-Filename: LICENSES/GPL-3.0 -- --import os.path --import zipfile --import tempfile --import logging --import json -- --from gi.repository import Gtk --from gi.repository import GLib --from gi.repository import Gio --from gi.repository import Pango -- --from operator import itemgetter --from gtweak.utils import extract_zip_file, execute_subprocess --from gtweak.gshellwrapper import GnomeShell, GnomeShellFactory --from gtweak.tweakmodel import Tweak --from gtweak.widgets import FileChooserButton, build_label_beside_widget, build_horizontal_sizegroup, build_tight_button, ListBoxTweakGroup --from gtweak.egowrapper import ExtensionsDotGnomeDotOrg --from gtweak.utils import DisableExtension -- --def N_(x): return x -- --def _fix_shell_version_for_ego(version): -- #extensions.gnome.org uses a weird versioning system, -- #3.10.0 is 3.10, 3.10.0.x (x is ignored) -- #drop the pico? release -- version = '.'.join(version.split('.')[0:3]) -- if version[-1] == '0': -- #if it is .0, drop that too -- return _get_shell_major_minor_version(version) -- else: -- return version -- --def _get_shell_major_minor_version(version): -- return '.'.join(version.split('.')[0:2]) -- --class _ExtensionsBlankState(Gtk.Box, Tweak): -- -- def __init__(self): -- Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=18, -- valign=Gtk.Align.CENTER) -- Tweak.__init__(self, 'extensions', '') -- -- self.add(Gtk.Image(icon_name="org.gnome.tweaks-symbolic", -- pixel_size=128, opacity=0.3)) -- -- self.add(Gtk.Label(label="" + _("No Extensions Installed") + "", -- use_markup=True, opacity=0.3)) -- -- try: -- self._swInfo = Gio.DesktopAppInfo.new("org.gnome.Software.desktop") -- -- if self._swInfo: -- btn = Gtk.Button(label=_("Browse in Software"), -- always_show_image=True, halign=Gtk.Align.CENTER, -- image=Gtk.Image(icon_name="org.gnome.Software-symbolic")) -- btn.connect("clicked", self._on_browse_clicked) -- self.add(btn) -- -- except: -- logging.warning("Error detecting shell", exc_info=True) -- -- self.show_all() -- -- def _on_browse_clicked(self, btn): -- self._swInfo.launch([], None) -- --class _ExtensionDescriptionLabel(Gtk.Label): -- -- def do_get_preferred_height_for_width(self, width): -- # Hack: Request the maximum height allowed by the line limit -- if self.get_lines() > 0: -- return Gtk.Label.do_get_preferred_height_for_width(self, 0) -- return Gtk.Label.do_get_preferred_height_for_width(self, width) -- --class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak): -- -- def __init__(self, shell, ext, **options): -- Gtk.ListBoxRow.__init__(self) -- Tweak.__init__(self, ext["name"], ext.get("description",""), **options) -- -- self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) -- self.hbox.props.border_width = 10 -- self.hbox.props.spacing = 12 -- -- self._shell = shell -- state = ext.get("state") -- uuid = ext["uuid"] -- self._app_id = "user/*/extensions-web/shell-extension/" + uuid.replace('@', '_') + "/*" -- -- shell._settings.bind("disable-user-extensions", self, -- "sensitive", Gio.SettingsBindFlags.INVERT_BOOLEAN) -- -- vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) -- lbl_name = Gtk.Label(xalign=0.0) -- name_markup = GLib.markup_escape_text(ext["name"].lower().capitalize()) -- lbl_name.set_markup(""+name_markup+"") -- lbl_desc = _ExtensionDescriptionLabel(xalign=0.0, yalign=0.0, wrap=True, lines=2) -- desc = GLib.markup_escape_text(ext["description"].lower().capitalize().split('\n')[0]) -- lbl_desc.set_markup(""+desc+"") -- lbl_desc.get_style_context().add_class("dim-label") -- lbl_desc.props.ellipsize = Pango.EllipsizeMode.END -- -- vbox.pack_start(lbl_name, False, False, 0) -- vbox.pack_start(lbl_desc, False, False, 0) -- -- self.hbox.pack_start(vbox, True, True, 10) -- -- info = None -- warning = None -- sensitive = False -- if state == GnomeShell.EXTENSION_STATE["ENABLED"] or \ -- state == GnomeShell.EXTENSION_STATE["DISABLED"] or \ -- state == GnomeShell.EXTENSION_STATE["INITIALIZED"]: -- sensitive = True -- elif state == GnomeShell.EXTENSION_STATE["DOWNLOADING"]: -- info = _("Extension downloading") -- elif state == GnomeShell.EXTENSION_STATE["ERROR"]: -- warning = _("Error loading extension") -- elif state == GnomeShell.EXTENSION_STATE["OUT_OF_DATE"]: -- warning = _("Extension does not support shell version") -- else: -- warning = _("Unknown extension error") -- logging.critical(warning) -- -- -- if info: -- inf = self.make_image("dialog-information-symbolic", info) -- self.hbox.pack_start(inf, False, False, 0) -- -- if warning: -- wg = self.make_image("dialog-warning-symbolic", warning) -- self.hbox.pack_start(wg, False, False, 0) -- -- if self._shell.SUPPORTS_EXTENSION_PREFS: -- prefs = os.path.join(ext['path'], "prefs.js") -- if os.path.exists(prefs): -- btn = Gtk.Button.new_from_icon_name("emblem-system-symbolic", Gtk.IconSize.BUTTON) -- btn.props.valign = Gtk.Align.CENTER -- btn.connect("clicked", self._on_configure_clicked, uuid) -- self.hbox.pack_start(btn, False, False, 0) -- -- sw = Gtk.Switch(sensitive=sensitive) -- sw.props.vexpand = False -- sw.props.valign = Gtk.Align.CENTER -- sw.set_active(self._shell.extension_is_active(state, uuid)) -- sw.connect('notify::active', self._on_extension_toggled, uuid) -- self.hbox.pack_start(sw, False, False, 0) -- -- de = DisableExtension() -- de.connect('disable-extension', self._on_disable_extension, sw) -- -- self.add(self.hbox) -- self.widget_for_size_group = None -- -- def _on_disable_extension(self, de, sw): -- sw.set_active(False) -- -- def _on_configure_clicked(self, btn, uuid): -- execute_subprocess(['gnome-shell-extension-prefs', uuid], block=False) -- -- def _on_extension_toggled(self, sw, active, uuid): -- if not sw.get_active(): -- self._shell.disable_extension(uuid) -- else: -- self._shell.enable_extension(uuid) -- -- def _on_extension_update(self, btn, uuid): -- self._shell.uninstall_extension(uuid) -- btn.get_style_context().remove_class("suggested-action") -- btn.set_label(_("Updating")) -- self.set_sensitive(False) -- self._shell.install_remote_extension(uuid,self.reply_handler, self.error_handler, btn) -- -- def do_activate(self): -- bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) -- bus.call('org.gnome.Software', -- '/org/gnome/Software', -- 'org.freedesktop.Application', -- 'ActivateAction', -- GLib.Variant('(sava{sv})', -- ('details', [GLib.Variant('(ss)', (self._app_id, ''))], {})), -- None, 0, -1, None) -- -- def reply_handler(self, proxy_object, result, user_data): -- if result == 's': -- user_data.hide() -- self.set_sensitive(True) -- -- def error_handler(self, proxy_object, result, user_data): -- user_data.set_label(_("Error")) -- print(result) -- -- def add_update_button(self, uuid): -- updateButton = Gtk.Button(_("Update")) -- updateButton.get_style_context().add_class("suggested-action") -- updateButton.connect("clicked", self._on_extension_update, uuid) -- updateButton.show() -- self.hbox.pack_end(updateButton, False, False, 0) -- -- def make_image(self, icon, tip): -- image = Gtk.Image.new_from_icon_name(icon, Gtk.IconSize.MENU) -- image.set_tooltip_text(tip) -- return image -- --class ShellExtensionTweakGroup(ListBoxTweakGroup): -- def __init__(self): -- extension_tweaks = [] -- sg = build_horizontal_sizegroup() -- -- #check the shell is running -- try: -- shell = GnomeShellFactory().get_shell() -- if shell is None: -- raise Exception("Shell not running or DBus service not available") -- -- version = tuple(shell.version.split(".")) -- ego = ExtensionsDotGnomeDotOrg(version) -- try: -- #add a tweak for each installed extension -- extensions = sorted(list(shell.list_extensions().values()), key=itemgetter("name")) -- for extension in extensions: -- try: -- extension_widget = _ShellExtensionTweak(shell, extension, size_group=sg) -- extension_tweaks.append(extension_widget) -- if extension.get("type") == GnomeShell.EXTENSION_TYPE["PER_USER"]: -- ego.connect("got-extension-info", self._got_info, extension, extension_widget) -- ego.query_extension_info(extension["uuid"]) -- except: -- logging.warning("Invalid extension", exc_info=True) -- except: -- logging.warning("Error listing extensions", exc_info=True) -- except: -- logging.warning("Error detecting shell", exc_info=True) -- -- ListBoxTweakGroup.__init__(self, -- _("Extensions"), -- *extension_tweaks, -- activatable=True) -- -- if shell is None: -- return # we're done -- -- self.props.valign = Gtk.Align.FILL -- -- self.titlebar_widget = Gtk.Switch(visible=True) -- shell._settings.bind("disable-user-extensions", self.titlebar_widget, -- "active", Gio.SettingsBindFlags.INVERT_BOOLEAN) -- -- self.set_header_func(self._list_header_func, None) -- self.connect("row-activated", self._on_row_activated, None); -- -- if not len(extension_tweaks): -- placeholder = _ExtensionsBlankState() -- self.set_placeholder(placeholder) -- self.tweaks.append(placeholder) -- -- def _got_info(self, ego, resp, uuid, extension, widget): -- if uuid == extension["uuid"]: -- resp = resp['shell_version_map'] -- shell = GnomeShellFactory().get_shell() -- version = _fix_shell_version_for_ego(shell.version) -- -- if version in resp: -- resp = resp[version] -- ext_version = extension["version"] if "version" in extension else 0 -- if int(resp["version"]) > ext_version: -- widget.add_update_button(uuid) -- else: -- ext_version = extension["version"] if "version" in extension else "unknown" -- logging.info("e.g.o no updates for %s (shell version %s extension version %s)" % ( -- uuid, version, ext_version)) -- -- def _list_header_func(self, row, before, user_data): -- if before and not row.get_header(): -- row.set_header (Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)) -- -- def _on_row_activated(self, list, row, user_data): -- row.activate() -- --TWEAK_GROUPS = [ -- ShellExtensionTweakGroup(), --] -diff --git a/gtweak/tweaks/tweak_group_top_bar.py b/gtweak/tweaks/tweak_group_top_bar.py -index 1175db3..fc6d8f0 100644 ---- a/gtweak/tweaks/tweak_group_top_bar.py -+++ b/gtweak/tweaks/tweak_group_top_bar.py -@@ -58,7 +58,7 @@ class ApplicationMenuTweak(GetterSetterSwitchTweak): - TWEAK_GROUPS = [ - ListBoxTweakGroup(_("Top Bar"), - # Requires patch from https://bugzilla.gnome.org/688320 -- GSettingsSwitchTweak(_("Activities Overview Hot Corner"),"org.gnome.shell", "enable-hot-corners", loaded=_shell_loaded), -+ GSettingsSwitchTweak(_("Activities Overview Hot Corner"),"org.gnome.desktop.interface", "enable-hot-corners", loaded=_shell_loaded), - ApplicationMenuTweak(), - GSettingsSwitchTweak(_("Battery Percentage"),"org.gnome.desktop.interface", "show-battery-percentage", loaded=_shell_loaded), - Title(_("Clock"),"", loaded=_shell_loaded), -diff --git a/gtweak/utils.py b/gtweak/utils.py -index ae47004..af5fcf3 100644 ---- a/gtweak/utils.py -+++ b/gtweak/utils.py -@@ -251,20 +251,6 @@ class SchemaList: - s = Gio.Settings(i[1]) - s.reset(i[0]) - --@singleton --class DisableExtension(GObject.GObject): -- -- __gsignals__ = { -- "disable-extension": (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE,()), -- } -- -- def __init__(self): -- GObject.GObject.__init__(self) -- -- def disable(self): -- self.emit("disable-extension") -- -- - @singleton - class XSettingsOverrides: - --- -2.30.2 - diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,8 +1,8 @@ name : gnome-tweaks -version : 3.32.0 -release : 33 +version : 40.0 +release : 34 source : - - https://download.gnome.org/sources/gnome-tweaks/3.32/gnome-tweaks-3.32.0.tar.xz : a54061b2c9150567ff22874c0c3a9e36c04ab6b0093b738c662e92c15919f90c + - https://download.gnome.org/sources/gnome-tweaks/40/gnome-tweaks-40.0.tar.xz : f95f3fe031b0b01c02f79a1659f889152d3772ae3e44df8403d1460ba5eec36a homepage : https://wiki.gnome.org/action/show/Apps/GnomeTweakTool license : GPL-3.0-or-later component : desktop.gnome @@ -17,9 +17,10 @@ - pkgconfig(gtk+-3.0) - pkgconfig(python3) rundeps : + - libhandy - python-gobject setup : | - %patch -p1 < $pkgfiles/0001-Ensure-support-for-GNOME-40-drop-Extensions-support-d.patch + %patch -p1 < $pkgfiles/0001-Don-t-show-extensions-notice.patch %meson_configure build : | %ninja_build diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -3,8 +3,8 @@ gnome-tweaks https://wiki.gnome.org/action/show/Apps/GnomeTweakTool - Joey Riches - josephriches@gmail.com + Reilly Brogan + solus@reillybrogan.com GPL-3.0-or-later desktop.gnome @@ -71,6 +71,7 @@ /usr/lib/python3.9/site-packages/gtweak/widgets.py /usr/lib64/gnome-tweaks/gnome-tweak-tool-lid-inhibitor /usr/share/applications/org.gnome.tweaks.desktop + /usr/share/glib-2.0/schemas/org.gnome.tweaks.gschema.xml /usr/share/gnome-tweaks/shell.css /usr/share/gnome-tweaks/shell.ui /usr/share/icons/hicolor/scalable/apps/org.gnome.tweaks.svg @@ -83,6 +84,7 @@ /usr/share/locale/bs/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/ca/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/ca@valencia/LC_MESSAGES/gnome-tweaks.mo + /usr/share/locale/ckb/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/cs/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/da/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/de/LC_MESSAGES/gnome-tweaks.mo @@ -108,7 +110,9 @@ /usr/share/locale/ky/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/lt/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/lv/LC_MESSAGES/gnome-tweaks.mo + /usr/share/locale/mjw/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/ml/LC_MESSAGES/gnome-tweaks.mo + /usr/share/locale/ms/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/my/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/nb/LC_MESSAGES/gnome-tweaks.mo /usr/share/locale/ne/LC_MESSAGES/gnome-tweaks.mo @@ -141,12 +145,12 @@ - - 2021-11-19 - 3.32.0 + + 2022-03-05 + 40.0 Packaging update - Joey Riches - josephriches@gmail.com + Reilly Brogan + solus@reillybrogan.com \ No newline at end of file