diff --git a/.gitignore b/.gitignore index 0b978c4..c229326 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-tweak-tool-3.22.0.tar.xz +SOURCES/gnome-tweaks-3.28.1.tar.xz diff --git a/.gnome-tweak-tool.metadata b/.gnome-tweak-tool.metadata index 0eb409d..2e52ebf 100644 --- a/.gnome-tweak-tool.metadata +++ b/.gnome-tweak-tool.metadata @@ -1 +1 @@ -5643b4156572fe41dc1b2990ead95e7697e9ee72 SOURCES/gnome-tweak-tool-3.22.0.tar.xz +4b73d3e4a9a8f67f8b65bcb7a2d169183e5e0640 SOURCES/gnome-tweaks-3.28.1.tar.xz diff --git a/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch b/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch deleted file mode 100644 index cbc447a..0000000 --- a/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 699ec2491e3ada4a36da912af2b51c0059e7ea3d Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 7 Apr 2015 20:43:23 +0200 -Subject: [PATCH 1/8] gshellwrapper: Add missing extension state and type - ---- - gtweak/gshellwrapper.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py -index ca7e7c0..9d0ccdd 100644 ---- a/gtweak/gshellwrapper.py -+++ b/gtweak/gshellwrapper.py -@@ -87,11 +87,13 @@ class GnomeShell: - "OUT_OF_DATE" : 4, - "DOWNLOADING" : 5, - "INITIALIZED" : 6, -+ "UNINSTALLED" : 99, - } - - EXTENSION_TYPE = { - "SYSTEM" : 1, -- "PER_USER" : 2 -+ "PER_USER" : 2, -+ "SESSION_MODE" : 3, - } - - DATA_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell") --- -2.9.3 - diff --git a/SOURCES/0002-gshellwrapper-Proxy-the-extension-status-changed-sig.patch b/SOURCES/0002-gshellwrapper-Proxy-the-extension-status-changed-sig.patch deleted file mode 100644 index 267d119..0000000 --- a/SOURCES/0002-gshellwrapper-Proxy-the-extension-status-changed-sig.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 00687ebe04f495e1386f13d1a497c6191b0188d4 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 7 Apr 2015 20:12:47 +0200 -Subject: [PATCH 2/8] gshellwrapper: Proxy the extension-status-changed signal - ---- - gtweak/gshellwrapper.py | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py -index 9d0ccdd..22725df 100644 ---- a/gtweak/gshellwrapper.py -+++ b/gtweak/gshellwrapper.py -@@ -21,6 +21,7 @@ import logging - - from gi.repository import Gio - from gi.repository import GLib -+from gi.repository import GObject - - import gtweak.utils - from gtweak.gsettings import GSettingsSetting -@@ -78,7 +79,7 @@ class _ShellProxy: - def version(self): - return self._version - --class GnomeShell: -+class GnomeShell(GObject.GObject): - - EXTENSION_STATE = { - "ENABLED" : 1, -@@ -99,7 +100,13 @@ class GnomeShell: - 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") - -+ __gsignals__ = { -+ "extension-status-changed": (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, -+ (GObject.TYPE_STRING, GObject.TYPE_INT, GObject.TYPE_STRING)), -+ } -+ - def __init__(self, shellproxy, shellsettings): -+ GObject.GObject.__init__(self) - self._proxy = shellproxy - self._settings = shellsettings - -@@ -159,6 +166,15 @@ class GnomeShell34(GnomeShell32): - - class GnomeShell36(GnomeShell34): - -+ def __init__(self, *args): -+ super(GnomeShell36, self).__init__(*args) -+ -+ self._proxy.proxy_extensions.connect('g-signal', self._on_proxy_extensions_signal) -+ -+ def _on_proxy_extensions_signal(self, proxy, sender, signal, params): -+ if signal == 'ExtensionStatusChanged': -+ self.emit('extension-status-changed', params[0], params[1], params[2]) -+ - def list_extensions(self): - return self._proxy.proxy_extensions.ListExtensions() - --- -2.9.3 - diff --git a/SOURCES/0003-shell_extensions-Add-remove-tweaks-as-extensions-are.patch b/SOURCES/0003-shell_extensions-Add-remove-tweaks-as-extensions-are.patch deleted file mode 100644 index 6c9dba6..0000000 --- a/SOURCES/0003-shell_extensions-Add-remove-tweaks-as-extensions-are.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b6497ea5d0e099c27b7699b936f61c257403e535 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Thu, 7 Nov 2013 13:06:23 +0100 -Subject: [PATCH 3/8] shell_extensions: Add/remove tweaks as extensions are - added/removed - ---- - gtweak/gshellwrapper.py | 3 +++ - gtweak/tweaks/tweak_group_shell_extensions.py | 33 ++++++++++++++++++++++++++- - 2 files changed, 35 insertions(+), 1 deletion(-) - -diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py -index 22725df..8c7e2ac 100644 ---- a/gtweak/gshellwrapper.py -+++ b/gtweak/gshellwrapper.py -@@ -184,6 +184,9 @@ class GnomeShell36(GnomeShell34): - 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) - -+ def get_extension_info(self, uuid): -+ return self._proxy.proxy_extensions.GetExtensionInfo('(s)', uuid) -+ - @gtweak.utils.singleton - class GnomeShellFactory: - def __init__(self): -diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py -index e33966f..fce8abf 100644 ---- a/gtweak/tweaks/tweak_group_shell_extensions.py -+++ b/gtweak/tweaks/tweak_group_shell_extensions.py -@@ -155,7 +155,7 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak): - btn.set_label(_("Updating")) - self.set_sensitive(False) - self._shell.install_remote_extension(uuid,self.reply_handler, self.error_handler, btn) -- -+ - def reply_handler(self, proxy_object, result, user_data): - if result == 's': - self.deleteButton.show() -@@ -265,14 +265,22 @@ class _ShellExtensionInstallerTweak(Gtk.Box, Tweak): - - class ShellExtensionTweakGroup(ListBoxTweakGroup): - def __init__(self): -+ self._shell = None -+ self._uuids = dict() -+ - extension_tweaks = [] - sg = build_horizontal_sizegroup() -+ self._sg = sg - - #check the shell is running - try: - shell = GnomeShellFactory().get_shell() - if shell is None: - raise Exception("Shell not running or DBus service not available") -+ else: -+ self._shell = shell -+ -+ shell.connect('extension-status-changed', self._on_extension_status_changed) - - version = tuple(shell.version.split(".")) - ego = ExtensionsDotGnomeDotOrg(version) -@@ -283,6 +291,7 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): - try: - extension_widget = _ShellExtensionTweak(shell, extension, size_group=sg) - extension_tweaks.append(extension_widget) -+ self._uuids[extension["uuid"]] = 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"]) -@@ -323,6 +332,28 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): - if before and not row.get_header(): - row.set_header (Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)) - -+ def _on_extension_status_changed(self, shell, uuid, state, error): -+ if uuid not in self._uuids: -+ self._add_extension(uuid) -+ return -+ -+ if state == GnomeShell.EXTENSION_STATE["UNINSTALLED"]: -+ self.remove(self._uuids[uuid]) -+ del self._uuids[uuid] -+ -+ def _add_extension(self, uuid): -+ try: -+ extension = self._shell.get_extension_info(uuid) -+ except: -+ logging.warning("Error getting extension info", exc_info=True) -+ return -+ -+ t = _ShellExtensionTweak(self._shell, extension, size_group=self._sg) -+ t.show_all() -+ self.add_tweak_row(t) -+ self._uuids[uuid] = t -+ -+ - TWEAK_GROUPS = [ - ShellExtensionTweakGroup(), - ] --- -2.9.3 - diff --git a/SOURCES/0004-shell_extensions-Add-a-sort-func-to-keep-the-list-or.patch b/SOURCES/0004-shell_extensions-Add-a-sort-func-to-keep-the-list-or.patch deleted file mode 100644 index 86e2522..0000000 --- a/SOURCES/0004-shell_extensions-Add-a-sort-func-to-keep-the-list-or.patch +++ /dev/null @@ -1,53 +0,0 @@ -From eb13e65fbd898fca6c4e8f49c278d014a492bbe5 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Wed, 8 Apr 2015 11:52:36 +0200 -Subject: [PATCH 4/8] shell_extensions: Add a sort func to keep the list - ordered - ---- - gtweak/tweaks/tweak_group_shell_extensions.py | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py -index fce8abf..c1f41d9 100644 ---- a/gtweak/tweaks/tweak_group_shell_extensions.py -+++ b/gtweak/tweaks/tweak_group_shell_extensions.py -@@ -301,16 +301,17 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): - logging.warning("Error listing extensions", exc_info=True) - except: - logging.warning("Error detecting shell", exc_info=True) -- -+ - #add the extension installer - extension_tweaks.append( - _ShellExtensionInstallerTweak(shell, size_group=sg)) -- -+ - ListBoxTweakGroup.__init__(self, - _("Extensions"), - *extension_tweaks) -- -+ - self.set_header_func(self._list_header_func, None) -+ self.set_sort_func(self._list_sort_func, None) - - def _got_info(self, ego, resp, uuid, extension, widget): - if uuid == extension["uuid"]: -@@ -332,6 +333,14 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): - if before and not row.get_header(): - row.set_header (Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)) - -+ def _list_sort_func(self, row1, row2, user_data): -+ if isinstance(row1.get_child(), _ShellExtensionInstallerTweak): -+ return 1 -+ if isinstance(row2.get_child(), _ShellExtensionInstallerTweak): -+ return -1 -+ -+ return cmp(row1.name, row2.name) -+ - def _on_extension_status_changed(self, shell, uuid, state, error): - if uuid not in self._uuids: - self._add_extension(uuid) --- -2.9.3 - diff --git a/SOURCES/0005-ExtensionInstaller-load-extension-after-installing-i.patch b/SOURCES/0005-ExtensionInstaller-load-extension-after-installing-i.patch deleted file mode 100644 index bbfce6b..0000000 --- a/SOURCES/0005-ExtensionInstaller-load-extension-after-installing-i.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d4681a4c8a7833b773dfef32f56a70ee57fbc478 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 7 Apr 2015 16:20:26 +0200 -Subject: [PATCH 5/8] ExtensionInstaller: load extension after installing it - ---- - gtweak/gshellwrapper.py | 3 +++ - gtweak/tweaks/tweak_group_shell_extensions.py | 9 +-------- - 2 files changed, 4 insertions(+), 8 deletions(-) - -diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py -index 8c7e2ac..3212803 100644 ---- a/gtweak/gshellwrapper.py -+++ b/gtweak/gshellwrapper.py -@@ -184,6 +184,9 @@ class GnomeShell36(GnomeShell34): - 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) - -+ def load_user_extension(self, uuid): -+ return self._proxy.proxy_extensions.LoadUserExtension('(s)', uuid) -+ - def get_extension_info(self, uuid): - return self._proxy.proxy_extensions.GetExtensionInfo('(s)', uuid) - -diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py -index c1f41d9..b791e4a 100644 ---- a/gtweak/tweaks/tweak_group_shell_extensions.py -+++ b/gtweak/tweaks/tweak_group_shell_extensions.py -@@ -244,17 +244,10 @@ class _ShellExtensionInstallerTweak(Gtk.Box, Tweak): - os.path.join(self._shell.EXTENSION_DIR, extension_uuid)) - - if ok: -- if updated: -- verb = _("%s extension updated successfully") % extension_uuid -- else: -- verb = _("%s extension installed successfully") % extension_uuid -- -- self.notify_logout() -- -+ self._shell.load_user_extension(extension_uuid) - else: - self.notify_information(_("Error installing extension")) - -- - except: - #does not look like a valid theme - self.notify_information(_("Invalid extension")) --- -2.9.3 - diff --git a/SOURCES/0006-shell_extensions-SESSION_MODE-extensions-can-t-be-en.patch b/SOURCES/0006-shell_extensions-SESSION_MODE-extensions-can-t-be-en.patch deleted file mode 100644 index 5115c28..0000000 --- a/SOURCES/0006-shell_extensions-SESSION_MODE-extensions-can-t-be-en.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5c2027d08a008fc63ebd0b8f162931cf3fcc393d Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Wed, 8 Apr 2015 15:08:16 +0200 -Subject: [PATCH 6/8] shell_extensions: SESSION_MODE extensions can't be - enabled/disabled - -gnome-shell always enables this kind of extensions and doesn't allow -disabling them so reflect that in the UI. ---- - gtweak/tweaks/tweak_group_shell_extensions.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py -index b791e4a..855ffe7 100644 ---- a/gtweak/tweaks/tweak_group_shell_extensions.py -+++ b/gtweak/tweaks/tweak_group_shell_extensions.py -@@ -49,7 +49,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak): - sw = Gtk.Switch() - sw.props.vexpand = False - sw.props.valign = Gtk.Align.CENTER -- sw.set_active(self._shell.extension_is_active(state, uuid)) -+ sw.set_active(self._shell.extension_is_active(state, uuid) or -+ ext.get("type") == GnomeShell.EXTENSION_TYPE["SESSION_MODE"]) - sw.connect('notify::active', self._on_extension_toggled, uuid) - self.hbox.pack_start(sw, False, False, 0) - -@@ -73,7 +74,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak): - if state == GnomeShell.EXTENSION_STATE["ENABLED"] or \ - state == GnomeShell.EXTENSION_STATE["DISABLED"] or \ - state == GnomeShell.EXTENSION_STATE["INITIALIZED"]: -- sensitive = True -+ if ext.get("type") != GnomeShell.EXTENSION_TYPE["SESSION_MODE"]: -+ sensitive = True - elif state == GnomeShell.EXTENSION_STATE["DOWNLOADING"]: - info = _("Extension downloading") - elif state == GnomeShell.EXTENSION_STATE["ERROR"]: --- -2.9.3 - diff --git a/SOURCES/0007-GSettingsFontButtonTweak-filter-out-fonts-that-gtk-3.patch b/SOURCES/0007-GSettingsFontButtonTweak-filter-out-fonts-that-gtk-3.patch deleted file mode 100644 index bcb747c..0000000 --- a/SOURCES/0007-GSettingsFontButtonTweak-filter-out-fonts-that-gtk-3.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ee8fd31e73104313a4c564e55fd1a74e7000e0cc Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Thu, 5 Dec 2013 23:07:41 +0100 -Subject: [PATCH 7/8] GSettingsFontButtonTweak: filter out fonts that gtk+ 3 - doesn't honor - ---- - gtweak/widgets.py | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/gtweak/widgets.py b/gtweak/widgets.py -index 3c8b6a3..0b75279 100644 ---- a/gtweak/widgets.py -+++ b/gtweak/widgets.py -@@ -288,8 +288,20 @@ class GSettingsFontButtonTweak(Gtk.Box, _GSettingsTweak, _DependableMixin): - Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL) - _GSettingsTweak.__init__(self, name, schema_name, key_name, **options) - -+ def font_filter(family, face, data): -+ desc = face.describe() -+ if (desc.get_style() != Pango.Style.NORMAL or -+ desc.get_variant() != Pango.Variant.NORMAL or -+ desc.get_weight() != Pango.Weight.NORMAL or -+ desc.get_stretch() != Pango.Stretch.NORMAL): -+ return False -+ else: -+ return True -+ - w = Gtk.FontButton() - w.set_use_font(True) -+ if key_name == "font-name": -+ w.set_filter_func(font_filter, None) - self.settings.bind(key_name, w, "font-name", Gio.SettingsBindFlags.DEFAULT) - build_label_beside_widget(name, w, hbox=self) - self.widget_for_size_group = w --- -2.9.3 - diff --git a/SOURCES/0008-font-Remove-document-font-tweak-since-nothing-honors.patch b/SOURCES/0008-font-Remove-document-font-tweak-since-nothing-honors.patch deleted file mode 100644 index 7d75f5a..0000000 --- a/SOURCES/0008-font-Remove-document-font-tweak-since-nothing-honors.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 940c6860b74d332850b539d6d9f654b1471dcb0a Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Fri, 6 Dec 2013 14:43:23 +0100 -Subject: [PATCH 8/8] font: Remove document font tweak since nothing honors it - ---- - gtweak/tweaks/tweak_group_font.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py -index eebd5c8..28dbecf 100644 ---- a/gtweak/tweaks/tweak_group_font.py -+++ b/gtweak/tweaks/tweak_group_font.py -@@ -24,7 +24,6 @@ TWEAK_GROUPS = [ - ListBoxTweakGroup(TWEAK_GROUP_FONTS, - GSettingsFontButtonTweak(_("Window Titles"),"org.gnome.desktop.wm.preferences", "titlebar-font"), - GSettingsFontButtonTweak(_("Interface"),"org.gnome.desktop.interface", "font-name"), -- GSettingsFontButtonTweak(_("Documents"), "org.gnome.desktop.interface", "document-font-name"), - GSettingsFontButtonTweak(_("Monospace"), "org.gnome.desktop.interface", "monospace-font-name"), - GSettingsComboTweak(_("Hinting"),"org.gnome.settings-daemon.plugins.xsettings", "hinting", - [(i, i.title()) for i in ("none", "slight", "medium", "full")]), --- -2.9.3 - diff --git a/SOURCES/gnome-tweak-tool-remove-scaling-factor.patch b/SOURCES/gnome-tweak-tool-remove-scaling-factor.patch deleted file mode 100644 index 21f0349..0000000 --- a/SOURCES/gnome-tweak-tool-remove-scaling-factor.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome-tweak-tool-3.22.0/gtweak/tweaks/tweak_group_windows.py.orig 2018-04-13 12:42:27.193024555 +0200 -+++ gnome-tweak-tool-3.22.0/gtweak/tweaks/tweak_group_windows.py 2018-04-13 12:42:43.881023015 +0200 -@@ -149,8 +149,6 @@ - Title(_("Titlebar Buttons"), "", uid="title-theme"), - ShowWindowButtons(_("Maximize"), "maximize"), - ShowWindowButtons(_("Minimize"), "minimize"), -- Title(_("HiDPI"), "", uid="title-hidpi"), -- WindowScalingFactorTweak(), - ) - ] - diff --git a/SOURCES/port-to-python2.patch b/SOURCES/port-to-python2.patch new file mode 100644 index 0000000..bd40d22 --- /dev/null +++ b/SOURCES/port-to-python2.patch @@ -0,0 +1,496 @@ +From e8c6a7acc24799450801d581a37c2d803e676cf9 Mon Sep 17 00:00:00 2001 +From: Carlos Soriano +Date: Thu, 14 Jun 2018 11:51:06 +0200 +Subject: [PATCH] general: Port to python2 + +RHEL 7.6 doesn't have python3... +--- + gnome-tweak-tool-lid-inhibitor | 2 +- + gnome-tweaks | 2 +- + gtweak/app.py | 1 + + gtweak/egowrapper.py | 1 + + gtweak/gsettings.py | 1 + + gtweak/gshellwrapper.py | 3 ++- + gtweak/gtksettings.py | 13 +++++++++++-- + gtweak/tweakmodel.py | 5 +++-- + gtweak/tweaks/tweak_group_appearance.py | 1 + + gtweak/tweaks/tweak_group_desktop.py | 1 + + gtweak/tweaks/tweak_group_font.py | 1 + + gtweak/tweaks/tweak_group_keymouse.py | 1 + + gtweak/tweaks/tweak_group_power.py | 1 + + gtweak/tweaks/tweak_group_shell_extensions.py | 5 +++-- + gtweak/tweaks/tweak_group_sound.py | 1 + + gtweak/tweaks/tweak_group_startup.py | 5 ++++- + gtweak/tweaks/tweak_group_test.py | 3 +++ + gtweak/tweaks/tweak_group_top_bar.py | 3 ++- + gtweak/tweaks/tweak_group_windows.py | 1 + + gtweak/tweaks/tweak_group_workspaces.py | 3 ++- + gtweak/tweaks/tweak_group_xkb.py | 3 ++- + gtweak/tweaks/tweak_wacom.py | 9 +++++---- + gtweak/tweakview.py | 5 +++-- + gtweak/utils.py | 11 ++++++++--- + gtweak/widgets.py | 1 + + meson-postinstall.py | 4 ++-- + meson.build | 3 +-- + 27 files changed, 64 insertions(+), 26 deletions(-) + +diff --git a/gnome-tweak-tool-lid-inhibitor b/gnome-tweak-tool-lid-inhibitor +index f9d18db..499e9eb 100755 +--- a/gnome-tweak-tool-lid-inhibitor ++++ b/gnome-tweak-tool-lid-inhibitor +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + +diff --git a/gnome-tweaks b/gnome-tweaks +index 596d8ab..038bb9d 100755 +--- a/gnome-tweaks ++++ b/gnome-tweaks +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + +diff --git a/gtweak/app.py b/gtweak/app.py +index bc5b5f4..03dc99d 100644 +--- a/gtweak/app.py ++++ b/gtweak/app.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/egowrapper.py b/gtweak/egowrapper.py +index 7a60f71..11caee3 100644 +--- a/gtweak/egowrapper.py ++++ b/gtweak/egowrapper.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py +index e0116e9..96d58e3 100644 +--- a/gtweak/gsettings.py ++++ b/gtweak/gsettings.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py +index 0e4a49b..d654f88 100644 +--- a/gtweak/gshellwrapper.py ++++ b/gtweak/gshellwrapper.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -164,7 +165,7 @@ class GnomeShellFactory: + try: + proxy = _ShellProxy() + settings = GSettingsSetting("org.gnome.shell") +- v = list(map(int, proxy.version.split("."))) ++ v = map(int, proxy.version.split(".")) + + if v >= [3, 5, 0]: + self.shell = GnomeShell36(proxy, settings) +diff --git a/gtweak/gtksettings.py b/gtweak/gtksettings.py +index ce09842..8d557b2 100644 +--- a/gtweak/gtksettings.py ++++ b/gtweak/gtksettings.py +@@ -1,9 +1,11 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2012 Cosimo Cecchi + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + + import os.path + import logging ++import errno + + from gi.repository import GLib + +@@ -18,7 +20,14 @@ class GtkSettingsManager: + self._path = os.path.join(GLib.get_user_config_dir(), + "gtk-" + version, + "settings.ini") +- os.makedirs(os.path.dirname(self._path), exist_ok=True) ++ try: ++ os.makedirs(os.path.dirname(self._path)) ++ except OSError, e: ++ if e.errno is not errno.EEXIST: ++ raise ++ except: ++ raise ++ + + def _get_keyfile(self): + keyfile = None +@@ -47,4 +56,4 @@ class GtkSettingsManager: + data = keyfile.to_data() + GLib.file_set_contents(self._path, data[0].encode()) + except: +- raise ++ raise +\ No newline at end of file +diff --git a/gtweak/tweakmodel.py b/gtweak/tweakmodel.py +index 2e9fb16..f8a9c18 100644 +--- a/gtweak/tweakmodel.py ++++ b/gtweak/tweakmodel.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -66,7 +67,7 @@ class TweakGroup(object): + + class TweakModel(Gtk.ListStore): + (COLUMN_NAME, +- COLUMN_TWEAK) = list(range(2)) ++ COLUMN_TWEAK) = range(2) + + def __init__(self): + super(TweakModel, self).__init__(str, object) +@@ -140,4 +141,4 @@ class TweakModel(Gtk.ListStore): + return tweaks, groups + + def get_tweakgroup_iter(self, name): +- return self._tweak_group_iters[name] ++ return self._tweak_group_iters[name] +\ No newline at end of file +diff --git a/gtweak/tweaks/tweak_group_appearance.py b/gtweak/tweaks/tweak_group_appearance.py +index ff78735..e8b40a7 100644 +--- a/gtweak/tweaks/tweak_group_appearance.py ++++ b/gtweak/tweaks/tweak_group_appearance.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_desktop.py b/gtweak/tweaks/tweak_group_desktop.py +index f55c696..d7239bd 100644 +--- a/gtweak/tweaks/tweak_group_desktop.py ++++ b/gtweak/tweaks/tweak_group_desktop.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py +index 43f4d09..89986b6 100644 +--- a/gtweak/tweaks/tweak_group_font.py ++++ b/gtweak/tweaks/tweak_group_font.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_keymouse.py b/gtweak/tweaks/tweak_group_keymouse.py +index 577d5cc..9553566 100644 +--- a/gtweak/tweaks/tweak_group_keymouse.py ++++ b/gtweak/tweaks/tweak_group_keymouse.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_power.py b/gtweak/tweaks/tweak_group_power.py +index 305877f..b6c82c5 100644 +--- a/gtweak/tweaks/tweak_group_power.py ++++ b/gtweak/tweaks/tweak_group_power.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py +index 8ef4bf8..82c754b 100644 +--- a/gtweak/tweaks/tweak_group_shell_extensions.py ++++ b/gtweak/tweaks/tweak_group_shell_extensions.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + +@@ -219,7 +220,7 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): + ego = ExtensionsDotGnomeDotOrg(version) + try: + #add a tweak for each installed extension +- extensions = sorted(list(shell.list_extensions().values()), key=itemgetter("name")) ++ extensions = sorted(shell.list_extensions().values(), key=itemgetter("name")) + for extension in extensions: + try: + extension_widget = _ShellExtensionTweak(shell, extension, size_group=sg) +@@ -280,4 +281,4 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup): + + TWEAK_GROUPS = [ + ShellExtensionTweakGroup(), +-] ++] +\ No newline at end of file +diff --git a/gtweak/tweaks/tweak_group_sound.py b/gtweak/tweaks/tweak_group_sound.py +index 78705ef..cd35f58 100644 +--- a/gtweak/tweaks/tweak_group_sound.py ++++ b/gtweak/tweaks/tweak_group_sound.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2017 Canonical + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py +index 05f7022..ba1288c 100644 +--- a/gtweak/tweaks/tweak_group_startup.py ++++ b/gtweak/tweaks/tweak_group_startup.py +@@ -1,7 +1,10 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + ++from __future__ import print_function ++ + import os.path + import subprocess + import logging +@@ -339,7 +342,7 @@ class AutostartListBoxTweakGroup(ListBoxTweakGroup): + str(os.getuid()),'-o','cmd'], + stdout=subprocess.PIPE) + out = cmd.communicate()[0] +- for l in out.decode('utf8').split('\n'): ++ for l in out.split('\n'): + exe = l.split(' ')[0] + if exe and exe[0] != '[': #kernel process + exes.append( os.path.basename(exe) ) +diff --git a/gtweak/tweaks/tweak_group_test.py b/gtweak/tweaks/tweak_group_test.py +index f056111..004815b 100644 +--- a/gtweak/tweaks/tweak_group_test.py ++++ b/gtweak/tweaks/tweak_group_test.py +@@ -1,7 +1,10 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 + ++from __future__ import print_function ++ + from gi.repository import Gtk, Gdk + + from gtweak.tweakmodel import Tweak +diff --git a/gtweak/tweaks/tweak_group_top_bar.py b/gtweak/tweaks/tweak_group_top_bar.py +index 0979720..05a3d31 100644 +--- a/gtweak/tweaks/tweak_group_top_bar.py ++++ b/gtweak/tweaks/tweak_group_top_bar.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -10,7 +11,7 @@ from gtweak.utils import XSettingsOverrides + _shell = GnomeShellFactory().get_shell() + _shell_loaded = _shell is not None + +-class ApplicationMenuTweak(GetterSetterSwitchTweak): ++class ApplicationMenuTweak(GetterSetterSwitchTweak, _GSettingsTweak): + def __init__(self, **options): + self._xsettings = XSettingsOverrides() + name = _("Application Menu") +diff --git a/gtweak/tweaks/tweak_group_windows.py b/gtweak/tweaks/tweak_group_windows.py +index 3ac8964..0743689 100644 +--- a/gtweak/tweaks/tweak_group_windows.py ++++ b/gtweak/tweaks/tweak_group_windows.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/gtweak/tweaks/tweak_group_workspaces.py b/gtweak/tweaks/tweak_group_workspaces.py +index 1805861..dd28b4c 100644 +--- a/gtweak/tweaks/tweak_group_workspaces.py ++++ b/gtweak/tweaks/tweak_group_workspaces.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -89,7 +90,7 @@ class StaticWorkspaceTweak(Gtk.ListBox, _GSettingsTweak): + self.check1.hide() + self.check2.show() + +-class PrimaryWorkspaceTweak(Gtk.ListBox, Tweak): ++class PrimaryWorkspaceTweak(Gtk.ListBox, _GSettingsTweak): + + def __init__(self, **options): + name = _("Workspaces") +diff --git a/gtweak/tweaks/tweak_group_xkb.py b/gtweak/tweaks/tweak_group_xkb.py +index 9cb3670..c681474 100644 +--- a/gtweak/tweaks/tweak_group_xkb.py ++++ b/gtweak/tweaks/tweak_group_xkb.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2012 Red Hat, Inc. + # Authors: + # Rui Matos +@@ -117,7 +118,7 @@ class _XkbOption(Gtk.Expander, Tweak): + if w: + _set_active(w, True) + else: +- for w in list(self._widgets.values()): ++ for w in self._widgets.values(): + if w._val in self._values: + _set_active(w, True) + else: +diff --git a/gtweak/tweaks/tweak_wacom.py b/gtweak/tweaks/tweak_wacom.py +index ed227ca..2e89246 100644 +--- a/gtweak/tweaks/tweak_wacom.py ++++ b/gtweak/tweaks/tweak_wacom.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2013 Red Hat, Inc. + # Author: Joaquim Rocha + # SPDX-License-Identifier: GPL-3.0+ +@@ -6,7 +7,7 @@ + from gtweak.tweakmodel import TweakGroup + from gtweak.widgets import GSettingsSwitchTweak + import subprocess +-import configparser ++import ConfigParser + import io + + def N_(x): return x +@@ -88,10 +89,10 @@ class WacomConfigs(object): + match_id = config.get(DEVICE_SECTION, DEVICE_MATCH_LINE) + # Use a dict to discard possible repeated devices + configs_dict[match_id] = config +- return list(configs_dict.values()) ++ return configs_dict.values() + + def _text_to_config(self, text): +- config = configparser.RawConfigParser(allow_no_value=True) ++ config = ConfigParser.RawConfigParser(allow_no_value=True) + config.readfp(io.BytesIO(text)) + return config + +@@ -108,4 +109,4 @@ class WacomSwitchTweak(GSettingsSwitchTweak): + **options) + wg = WacomGroup() + if wg.tweaks: +- TWEAK_GROUPS = (wg,) ++ TWEAK_GROUPS = (wg,) +\ No newline at end of file +diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py +index a130fea..6c640ba 100644 +--- a/gtweak/tweakview.py ++++ b/gtweak/tweakview.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -157,7 +158,7 @@ class Window(Gtk.ApplicationWindow): + row.add(lbl) + return row + +- groups = list(self._model._tweak_group_names.keys()) ++ groups = self._model._tweak_group_names.keys() + groups = sorted(groups) + + for g in groups: +@@ -263,4 +264,4 @@ class Window(Gtk.ApplicationWindow): + if t in tweaks: + t.show_all() + else: +- t.hide() ++ t.hide() +\ No newline at end of file +diff --git a/gtweak/utils.py b/gtweak/utils.py +index 6f0c25c..258acf4 100644 +--- a/gtweak/utils.py ++++ b/gtweak/utils.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +@@ -161,7 +162,11 @@ class AutostartFile: + self._extra_exec_args = "\n" + + user_autostart_dir = os.path.join(GLib.get_user_config_dir(), "autostart") +- os.makedirs(user_autostart_dir, exist_ok=True) ++ if not os.path.isdir(user_autostart_dir): ++ try: ++ os.makedirs(user_autostart_dir) ++ except: ++ logging.critical("Could not create autostart dir: %s" % user_autostart_dir) + + self._user_autostart_file = os.path.join(user_autostart_dir, self._autostart_desktop_filename) + +@@ -269,7 +274,7 @@ class XSettingsOverrides: + + def _dup_variant_as_dict(self): + items = {} +- for k in list(self._variant.keys()): ++ for k in self._variant.keys(): + try: + #variant override doesnt support .items() + v = self._variant[k] +@@ -352,4 +357,4 @@ class LogoutNotification: + '/org/gnome/SessionManager', + 'org.gnome.SessionManager', + None) +- proxy.Logout('(u)', 0) ++ proxy.Logout('(u)', 0) +\ No newline at end of file +diff --git a/gtweak/widgets.py b/gtweak/widgets.py +index 3d48a51..11cd557 100644 +--- a/gtweak/widgets.py ++++ b/gtweak/widgets.py +@@ -1,3 +1,4 @@ ++# -*- coding: utf-8 -*- + # Copyright (c) 2011 John Stowers + # SPDX-License-Identifier: GPL-3.0+ + # License-Filename: LICENSES/GPL-3.0 +diff --git a/meson-postinstall.py b/meson-postinstall.py +index 115d8e0..3b41cc4 100755 +--- a/meson-postinstall.py ++++ b/meson-postinstall.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + import sysconfig + from compileall import compile_dir +@@ -16,4 +16,4 @@ if not destdir: + + print('Compiling python bytecode...') + moduledir = sysconfig.get_path('purelib', vars={'base': str(prefix)}) +-compile_dir(destdir + path.join(moduledir, 'gtweak'), optimize=2) ++compile_dir(destdir + path.join(moduledir, 'gtweak')) +diff --git a/meson.build b/meson.build +index 4d24fa5..f5ea92d 100644 +--- a/meson.build ++++ b/meson.build +@@ -5,7 +5,6 @@ project('gnome-tweaks', + + gnome = import('gnome') + i18n = import('i18n') +-python3 = import('python3') + + prefix = get_option('prefix') + +@@ -13,7 +12,7 @@ bindir = join_paths(prefix, get_option('bindir')) + datadir = join_paths(prefix, get_option('datadir')) + libexecdir = join_paths(prefix, get_option('libexecdir')) + localedir = join_paths(prefix, get_option('localedir')) +-pythondir = join_paths(prefix, python3.sysconfig_path('purelib')) ++pythondir = join_paths(prefix, '/usr/lib/python2.7/site-packages') + + pkgdatadir = join_paths(datadir, meson.project_name()) + +-- +libgit2 0.27.1 + diff --git a/SPECS/gnome-tweak-tool.spec b/SPECS/gnome-tweak-tool.spec index 0ca5b0d..0a0a3b5 100644 --- a/SPECS/gnome-tweak-tool.spec +++ b/SPECS/gnome-tweak-tool.spec @@ -1,84 +1,58 @@ %global gsettings_desktop_schemas_version 3.21.2 +%global name_new gnome-tweaks %global major_version %%(cut -d "." -f 1-2 <<<%{version}) Name: gnome-tweak-tool -Version: 3.22.0 +Version: 3.28.1 Release: 2%{?dist} -Summary: A tool to customize advanced GNOME 3 options - -License: GPLv3 -URL: https://wiki.gnome.org/Apps/GnomeTweakTool -Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{version}.tar.xz - -Patch0: 0001-gshellwrapper-Add-missing-extension-state-and-type.patch -Patch1: 0002-gshellwrapper-Proxy-the-extension-status-changed-sig.patch -Patch2: 0003-shell_extensions-Add-remove-tweaks-as-extensions-are.patch -Patch3: 0004-shell_extensions-Add-a-sort-func-to-keep-the-list-or.patch -Patch4: 0005-ExtensionInstaller-load-extension-after-installing-i.patch -Patch5: 0006-shell_extensions-SESSION_MODE-extensions-can-t-be-en.patch -Patch6: 0007-GSettingsFontButtonTweak-filter-out-fonts-that-gtk-3.patch -Patch7: 0008-font-Remove-document-font-tweak-since-nothing-honors.patch -# https://gitlab.gnome.org/GNOME/gnome-tweaks/commit/34d6d451d7c25482c65c09220ef979aae8101d9d -Patch8: gnome-tweak-tool-remove-scaling-factor.patch +Summary: Customize advanced GNOME 3 options + +# Software is GPLv3, Appdata file is CC0-1.0 +License: GPLv3 and CC0 +URL: https://wiki.gnome.org/action/show/Apps/Tweaks +Source0: https://download.gnome.org/sources/%{name_new}/%{majorversion}/%{name_new}-%{version}.tar.xz +Patch0: port-to-python2.patch -BuildArch: noarch -BuildRequires: intltool -BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version} -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: desktop-file-utils +BuildRequires: gettext BuildRequires: libappstream-glib -Requires: gnome-shell +BuildRequires: meson +Requires: gnome-desktop3 +Requires: gnome-settings-daemon +Requires: gnome-shell >= 3.24 Requires: gnome-shell-extension-user-theme -Requires: gsettings-desktop-schemas >= %{gsettings_desktop_schemas_version} -Requires: pygobject3 +Requires: gobject-introspection +Requires: gsettings-desktop-schemas >= 3.27.90 +Requires: gtk3 >= 3.12 +Requires: libnotify +Requires: libsoup +Requires: mutter +Requires: pango +Provides: gnome-tweak-tool = %{version}.%{release} +Obsoletes: gnome-tweak-tool < 3.27.3-4 +BuildArch: noarch %description -GNOME Tweak Tool is an application for changing the advanced settings -of GNOME 3. - -Features: -* Install and switch gnome-shell themes -* Switch gtk/icon/cursor themes -* Switch window manager themes -* Change: - * The user-interface and titlebar fonts - * Icons in menus and buttons - * Behavior on laptop lid close - * Shell font size - * File manager desktop icons - * Titlebar click action - * Shell clock to show date - * Font hinting and antialiasing +GNOME Tweaks allows adjusting advanced configuration settings in GNOME 3. This +includes things like the fonts used in user interface elements, alternative user +interface themes, changes in window management behavior, GNOME Shell appearance +and extension, etc. + %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 - -autoreconf -i -f +%setup -q -n gnome-tweaks-%{version} +%patch0 -p1 -b .py3 %build -PYTHON=%{__python} -export PYTHON -%configure -make %{?_smp_mflags} +%meson +%meson_build %install -PYTHON=%{__python} -export PYTHON -%make_install +%meson_install -sed -i '1s|^#!/usr/bin/env python|#!%{__python}|' $RPM_BUILD_ROOT%{_bindir}/%{name} +sed -i '1s|^#!/usr/bin/env python|#!%{__python}|' $RPM_BUILD_ROOT%{_bindir}/%{name_new} # Update the screenshot shown in the software center # @@ -86,18 +60,18 @@ sed -i '1s|^#!/usr/bin/env python|#!%{__python}|' $RPM_BUILD_ROOT%{_bindir}/%{na # # See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. # -appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/gnome-tweak-tool.appdata.xml \ +appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.tweaks.appdata.xml \ https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnome-tweak-tool/a.png \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnome-tweak-tool/b.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnome-tweak-tool/b.png -%find_lang %{name} +%find_lang %{name_new} %check # Leave the desktop file validation, but don't return an error value ("Phanteon" # value not supported yet by validator in "OnlyShowIn" key) -desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop || true - +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop || true +appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.appdata.xml %post /bin/touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null || : @@ -114,20 +88,28 @@ fi /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : -%files -f %{name}.lang -%license COPYING -%doc AUTHORS NEWS README -%{_bindir}/%{name} +%files -f %{name_new}.lang +%doc AUTHORS NEWS README.md +%license LICENSES/ +%{_bindir}/%{name_new} %{_libexecdir}/gnome-tweak-tool-lid-inhibitor %{python_sitelib}/gtweak/ -%{_datadir}/appdata/%{name}.appdata.xml -%{_datadir}/applications/%{name}.desktop -%{_datadir}/%{name}/ -%{_datadir}/icons/hicolor/*/apps/%{name}.png -%{_datadir}/icons/hicolor/scalable/apps/gnome-tweak-tool-symbolic.svg +%{_datadir}/metainfo/*.appdata.xml +%{_datadir}/applications/*.desktop +%{_datadir}/%{name_new}/ +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg %changelog +* Thu Jun 14 2018 Carlos Soriano - 3.28.1-2 +- Port to python2 +- Resolves: #1590848 + +* Fri Jun 08 2018 Richard Hughes - 3.28.1-1 +- Update to 3.28.1 +- Resolves: #1568638 + * Fri Apr 13 2018 Kalev Lember - 3.22.0-2 - Remove scaling factor setting, moved to control-center in RHEL 7.5 - Resolves: #1567040