diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b978c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-tweak-tool-3.22.0.tar.xz diff --git a/.gnome-tweak-tool.metadata b/.gnome-tweak-tool.metadata new file mode 100644 index 0000000..0eb409d --- /dev/null +++ b/.gnome-tweak-tool.metadata @@ -0,0 +1 @@ +5643b4156572fe41dc1b2990ead95e7697e9ee72 SOURCES/gnome-tweak-tool-3.22.0.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch b/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch new file mode 100644 index 0000000..cbc447a --- /dev/null +++ b/SOURCES/0001-gshellwrapper-Add-missing-extension-state-and-type.patch @@ -0,0 +1,31 @@ +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 new file mode 100644 index 0000000..267d119 --- /dev/null +++ b/SOURCES/0002-gshellwrapper-Proxy-the-extension-status-changed-sig.patch @@ -0,0 +1,63 @@ +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 new file mode 100644 index 0000000..6c9dba6 --- /dev/null +++ b/SOURCES/0003-shell_extensions-Add-remove-tweaks-as-extensions-are.patch @@ -0,0 +1,101 @@ +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 new file mode 100644 index 0000000..86e2522 --- /dev/null +++ b/SOURCES/0004-shell_extensions-Add-a-sort-func-to-keep-the-list-or.patch @@ -0,0 +1,53 @@ +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 new file mode 100644 index 0000000..bbfce6b --- /dev/null +++ b/SOURCES/0005-ExtensionInstaller-load-extension-after-installing-i.patch @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..5115c28 --- /dev/null +++ b/SOURCES/0006-shell_extensions-SESSION_MODE-extensions-can-t-be-en.patch @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..bcb747c --- /dev/null +++ b/SOURCES/0007-GSettingsFontButtonTweak-filter-out-fonts-that-gtk-3.patch @@ -0,0 +1,38 @@ +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 new file mode 100644 index 0000000..7d75f5a --- /dev/null +++ b/SOURCES/0008-font-Remove-document-font-tweak-since-nothing-honors.patch @@ -0,0 +1,24 @@ +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 new file mode 100644 index 0000000..21f0349 --- /dev/null +++ b/SOURCES/gnome-tweak-tool-remove-scaling-factor.patch @@ -0,0 +1,11 @@ +--- 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/SPECS/gnome-tweak-tool.spec b/SPECS/gnome-tweak-tool.spec new file mode 100644 index 0000000..0ca5b0d --- /dev/null +++ b/SPECS/gnome-tweak-tool.spec @@ -0,0 +1,348 @@ +%global gsettings_desktop_schemas_version 3.21.2 + +%global major_version %%(cut -d "." -f 1-2 <<<%{version}) + +Name: gnome-tweak-tool +Version: 3.22.0 +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 + +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: libappstream-glib +Requires: gnome-shell +Requires: gnome-shell-extension-user-theme +Requires: gsettings-desktop-schemas >= %{gsettings_desktop_schemas_version} +Requires: pygobject3 + +%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 + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 + +autoreconf -i -f + +%build +PYTHON=%{__python} +export PYTHON +%configure +make %{?_smp_mflags} + + +%install +PYTHON=%{__python} +export PYTHON +%make_install + +sed -i '1s|^#!/usr/bin/env python|#!%{__python}|' $RPM_BUILD_ROOT%{_bindir}/%{name} + +# Update the screenshot shown in the software center +# +# NOTE: It would be *awesome* if this file was pushed upstream. +# +# 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 \ + 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 + +%find_lang %{name} + + +%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 + + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null || : + + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null + /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor/ &>/dev/null || : +fi + + +%posttrans +/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : + + +%files -f %{name}.lang +%license COPYING +%doc AUTHORS NEWS README +%{_bindir}/%{name} +%{_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 + + +%changelog +* Fri Apr 13 2018 Kalev Lember - 3.22.0-2 +- Remove scaling factor setting, moved to control-center in RHEL 7.5 +- Resolves: #1567040 + +* Thu Sep 22 2016 Kalev Lember - 3.22.0-1 +- Update to 3.22.0 + +* Tue Sep 06 2016 Kalev Lember - 3.21.91-1 +- Update to 3.21.91 +- Set minimum required gsettings-desktop-schemas version +- Update project URLs + +* Tue Jul 19 2016 Fedora Release Engineering - 3.20.1-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 03 2016 Kalev Lember - 3.20.1-1 +- Update to 3.20.1 + +* Wed Mar 23 2016 Kalev Lember - 3.20.0-1 +- Update to 3.20.0 + +* Wed Feb 17 2016 Richard Hughes - 3.19.90-1 +- Update to 3.19.90 + +* Wed Feb 03 2016 Fedora Release Engineering - 3.19.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Kalev Lember - 3.19.1-1 +- Update to 3.19.1 + +* Wed Nov 11 2015 Kalev Lember - 3.18.1-1 +- Update to 3.18.1 + +* Mon Sep 21 2015 Kalev Lember - 3.18.0-1 +- Update to 3.18.0 + +* Tue Aug 18 2015 Kalev Lember - 3.17.90-1 +- Update to 3.17.90 +- Use make_install macro + +* Wed Jun 17 2015 Fedora Release Engineering - 3.17.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Apr 30 2015 Kalev Lember - 3.17.1-1 +- Update to 3.17.1 + +* Thu Apr 16 2015 Kalev Lember - 3.16.1-1 +- Update to 3.16.1 + +* Mon Mar 30 2015 Richard Hughes - 3.16.0-2 +- Use better AppData screenshots + +* Tue Mar 24 2015 Kalev Lember - 3.16.0-1 +- Update to 3.16.0 + +* Tue Mar 17 2015 Kalev Lember - 3.15.92-1 +- Update to 3.15.92 +- Use license macro for the COPYING file + +* Tue Feb 17 2015 Richard Hughes - 3.15.90-1 +- Update to 3.15.90 + +* Fri Nov 14 2014 Kalev Lember - 3.14.2-1 +- Update to 3.14.2 + +* Tue Sep 23 2014 Kalev Lember - 3.14.0-1 +- Update to 3.14.0 + +* Wed Sep 17 2014 Kalev Lember - 3.13.92-1 +- Update to 3.13.92 + +* Sat Jun 07 2014 Fedora Release Engineering - 3.12.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Mar 27 2014 Mohamed El Morabity - 3.12.0-1 +- Update to 3.12.0 + +* Wed Nov 20 2013 Mohamed El Morabity - 3.10.1-2 +- Drop now useless dependency on Nautilus (RHBZ #1030449) + +* Wed Nov 13 2013 Richard Hughes - 3.10.1-1 +- Update to 3.10.1 + +* Sat Oct 19 2013 Mohamed El Morabity - 3.10.0-2 +- Fix extension update checks +- Fix RHBZ #1017801 + +* Wed Sep 25 2013 Mohamed El Morabity - 3.10.0-1 +- Update to 3.10.0 + +* Thu Sep 19 2013 Mohamed El Morabity - 3.9.92-1 +- Update to 3.9.92 + +* Wed Sep 04 2013 Mohamed El Morabity - 3.9.91-1 +- Update to 3.9.91 + +* Thu Aug 22 2013 Kalev Lember - 3.9.90.1-1 +- Update to 3.9.90.1 + +* Thu Aug 22 2013 Adam Williamson - 3.9.90-1 +- bump to latest version +- drop shell_themes.patch as #703760 is marked FIXED + +* Sat Aug 03 2013 Fedora Release Engineering - 3.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 23 2013 Mohamed El Morabity - 3.8.1-1 +- Update to 3.8.1 +- Drop gnome-tweak-tool-3.8.0-pref.js.patch patch (merged upstream) + +* Sun Jul 07 2013 Mohamed El Morabity - 3.8.0-3 +- Add patch to make gnome-tweak-tool look shell themes only in ~/.themes + +* Sat May 25 2013 Mohamed El Morabity - 3.8.0-2 +- Add patch to allow pref.js for system extensions (thanks to Ralph Bean) + +* Mon Apr 08 2013 Mohamed El Morabity - 3.8.0-1 +- Update to 3.8.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 3.7.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 16 2013 Mohamed El Morabity - 3.7.4-1 +- Update to 3.7.4 +- Drop remove_lid_close_settings patch, fixed upstream +- Spec cleanup + +* Fri Nov 2 2012 Michel Salim - 3.6.1-2 +- Drop lid close configuration options that are now handled by systemd + +* Tue Oct 16 2012 Kalev Lember - 3.6.1-1 +- Update to 3.6.1 + +* Wed Oct 3 2012 Matthias Clasen - 3.6.0-1 +- Update to 3.6.0 + +* Wed Aug 22 2012 Richard Hughes - 3.5.5-1 +- Update to 3.5.5 + +* Thu Aug 9 2012 Michel Salim - 3.5.4-1 +- Update to 3.5.4 + +* Sun Aug 5 2012 Michel Salim - 3.5.0-0.1.20120717git3869087 +- Update to 3.5.0 snapshot for GNOME 3.5.x compatibility + +* Thu Jul 19 2012 Fedora Release Engineering - 3.4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jun 4 2012 Michel Salim - 3.4.0.1-2 +- Add R: on user theme extension (# 826129) + +* Mon May 14 2012 Richard Hughes - 3.4.0.1-1 +- Update to 3.4.0.1 + +* Mon May 14 2012 Richard Hughes - 3.4.0-1 +- Update to 3.4.0 + +* Sat Jan 21 2012 Michel Salim - 3.3.4-1 +- Update to 3.3.4 + +* Fri Jan 13 2012 Fedora Release Engineering - 3.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 14 2011 Michel Salim - 3.2.1-1 +- Update to 3.2.1 + +* Wed Sep 28 2011 Ray - 3.2.0-1 +- Update to 3.2.0 + +* Thu Sep 1 2011 Michel Salim - 3.1.90-1 +- Update to 3.1.90 + +* Sun Aug 21 2011 Michel Salim - 3.1.0-1 +- Update to 3.1.0 + +* Tue Jul 19 2011 Michel Salim - 3.0.5-2 +- Depend on nautilus (# 722541) + +* Thu Jun 30 2011 Michel Salim - 3.0.5-1 +- Update to 3.0.5 +- upstream news: + http://ftp.gnome.org/pub/GNOME/sources/gnome-tweak-tool/3.0/gnome-tweak-tool-3.0.5.news + * autostart fixes + * appearance improvements + * focus follow mouse mode + * finer-grained desktop item visibility + * streamlined shell restart offer when enabling extensions + +* Mon Jun 13 2011 Rahul Sundaram - 3.0.4-1 +- Update to 3.0.4 +- Dropped redundant commented out lines in spec +- Updated description +- Dropped defattr since it is set by default in recent RPM +- http://ftp.gnome.org/pub/GNOME/sources/gnome-tweak-tool/3.0/gnome-tweak-tool-3.0.4.news + * Enables support for system wide themes + * Supports management of shell extensions + +* Wed May 4 2011 Michel Salim - 3.0.3-1 +- Update to 3.0.3 + +* Mon Apr 4 2011 Michel Salim - 3.0.0-1 +- Update to 3.0.0 + +* Fri Mar 25 2011 Michel Salim - 2.91.93-2 +- Enable icon theme selection + +* Fri Mar 25 2011 Michel Salim - 2.91.93-1 +- Update to 2.91.93 + +* Tue Mar 22 2011 Michel Salim - 2.91.92-3 +- Include license information + +* Tue Mar 22 2011 Michel Salim - 2.91.92-2 +- Use %%configure macro +- Validate desktop file + +* Mon Mar 21 2011 Michel Salim - 2.91.92-1 +- Initial package