...
 
Commits (66)
3.30.0
======
Stable release.
* Show Over-Amplification in the Pop session (Jeremy)
Contributors:
Jeremy Bicha
Translations:
Alan Mortensen [da], Fran Dieguez [gl], gogo [hr],
Balázs Meskó [hu], Rūdolfs Mazurs [lv],
3.29.92
=========
Development release.
* Fix too small window when unmaxizing (Bharat)
* Move General panel to the top of the sidebar (Danish)
* Minor adjustments to order in top bar panel (Jeremy)
* Don't show Over-Amplification when running the Ubuntu or Pop sessions
(Jeremy)
Contributors:
Jeremy Bicha, Bharat kalluri, Danish Prakash
Translations:
Yuras Shumovich [be], Marek Cernocky [cs], Efstathios Iosifidis [el],
Bruce Cowan [en_GB], Jiri Grönroos [fi], Claude Paroz [fr],
Hannie Dumoleyn [nl], Kukuh Syafaat [id], Seong-ho Cho [ko],
Rafael Fontenelle [pt_BR], Daniel Șerbănescu [ro], Cheng-Chia Tseng [zh_TW]
3.29.91.1
=========
Development release.
* Trivial URL updates (Jeremy)
Contributors:
Jeremy Bicha
Translations:
Mario Blättermann [de], Fabio Tomat [fur], Baurzhan Muftakhidinov [kk],
Piotr Drąg [pl], Aurimas Černius [lt], Emin Tufan Çetin [tr],
Yi-Jyun Pan [zh_TW]
3.29.90.1
=========
Development release.
* Add Weekday on/off switch for the clock in the top bar
NOTE: This feature requires gnome-desktop >= 3.29.90.1 to work correctly.
Contributors:
Jeremy Bicha
3.29.90
=======
Development release.
* Move Animations, Power, and Sound to new General panel (Jeremy, Emmanuele)
* Add Sound theme chooser to Appearance panel (Lukáš)
* Extend font labels for clarify ("Interface text" instead of "Interface",
etc.) (Jeremy)
* Rename "Sloppy" window focus to "Focus on Hover" (Jeremy)
* Drop custom handler and use new glib per-session overrides (Florian)
NOTE: This feature requires glib >= 2.57.2 to work correctly.
Contributors:
Emmanuele Bassi, Jeremy Bicha, Florian Müllner, Lukáš Tyrychtr
Translations:
Daniel Mustieles [es], Fabio Tomat [fur], Kukuh Syafaat [id],
Daniel Șerbănescu [ro], Mingcong Bai [zh_CN], Yi-Jyun Pan [zh_TW],
3.29.2
======
Development release.
......
......@@ -4,7 +4,7 @@ GNOME TWEAKS
BUILD
-----
The only build-time dependency is [meson](http://mesonbuild.com/).
The only build-time dependency is [meson](https://mesonbuild.com/).
meson builddir
ninja -C builddir
......@@ -17,15 +17,15 @@ RUNTIME DEPENDENCIES
* gnome-settings-daemon
* GIR files and libraries from:
- GLib
- GLib (>= 2.58)
- GTK+ 3 (>= 3.12)
- gnome-desktop
- gnome-desktop (>= 3.30)
- libsoup
- libnotify
- Pango
* GSettings Schemas from:
- gsettings-desktop-schemas (>= 3.27.90)
- gsettings-desktop-schemas (>= 3.28)
- gnome-shell (>= 3.24)
- mutter
......@@ -68,5 +68,5 @@ This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later version.
data/org.gnome.tweaks.appdata.xml.in is licensed under the Creative Commons
CC0-1.0 license.
data/org.gnome.tweaks.appdata.xml.in is licensed under the [Creative Commons
CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode) license.
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gnome-tweak-tool-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' inkscape:version='0.91 r13725' width='16.000002' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata90'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='68.681492' inkscape:cy='8.95441' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1376' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='32'>
<inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-222' originy='-362' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
</sodipodi:namedview>
<title id='title9167'>Gnome Symbolic Icon Theme</title>
<defs id='defs7386'>
<linearGradient id='linearGradient7212' osb:paint='solid'>
<stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
</defs>
<g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-463.0002,145)'>
<path inkscape:connector-curvature='0' d='m 464.96895,-144.96875 c -1.08949,0 -1.96875,0.87926 -1.96875,1.96875 l 0,12 c 0,1.08949 0.87926,1.96875 1.96875,1.96875 l 12.0625,0 c 1.08949,0 1.96875,-0.87926 1.96875,-1.96875 l 0,-12 c 0,-1.08949 -0.87926,-1.96875 -1.96875,-1.96875 l -12.0625,0 z m 0,1 12.0625,0 c 0.55278,0 0.96875,0.41597 0.96875,0.96875 l 0,11.03125 c 0,0.55278 -0.41597,0.96875 -0.96875,0.96875 l -12.0625,0 c -0.55278,0 -0.96875,-0.41597 -0.96875,-0.96875 l 0,-11.03125 c 0,-0.60207 0.35439,-0.96875 0.96875,-0.96875 z m 0.0312,0.96875 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 3,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m -11,2 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 3,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m 2,0 0,1 1,0 0,-1 -1,0 z m -2,2 0,1 -1,0 c -0.54535,0 -1,0.45465 -1,1 l 0,1 c 0,0.54535 0.45465,1 1,1 l 0.1875,0 0.8125,0 1,0 0.65625,0 0.34375,0 c 0.54535,0 1,-0.45465 1,-1 l 0,-1 c 0,-0.54535 -0.45465,-1 -1,-1 l -1,0 0,-1 -1,0 z m -6,1 c -1.65093,0 -3,1.34907 -3,3 0,1.65093 1.34907,3 3,3 1.65093,0 3,-1.34907 3,-3 0,-1.65093 -1.34907,-3 -3,-3 z m 0,1 c 1.11049,0 2,0.88951 2,2 0,1.11049 -0.88951,2 -2,2 -1.11049,0 -2,-0.88951 -2,-2 0,-1.11049 0.88951,-2 2,-2 z m 5,0 3,0 0,1 -3,0 0,-1 z m 1,3 0,2 1,0 0,-2 -1,0 z' id='rect6038-5-6' inkscape:label='gnome-tweak-tool' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:Sans;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;enable-background:accumulate'/>
</g>
</svg>
This diff is collapsed.
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<g fill="#2e3436">
<path d="M3 15c-1.108 0-2-.892-2-2V3c0-1.108.892-2 2-2h10c1.108 0 2 .892 2 2v10c0 1.108-.892 2-2 2zm.5-2h9c.277 0 .5-.223.5-.5v-3c0-.277-.223-.5-.5-.5h-9c-.277 0-.5.223-.5.5v3c0 .277.223.5.5.5zm0-6h9c.277 0 .5-.223.5-.5v-3c0-.277-.223-.5-.5-.5h-9c-.277 0-.5.223-.5.5v3c0 .277.223.5.5.5z"/>
<path d="M4 12h4v-2H4zM8 6h4V4H8z"/>
</g>
</svg>
This diff is collapsed.
......@@ -99,7 +99,7 @@ class GnomeTweaks(Gtk.Application):
aboutdialog.set_copyright("Copyright © 2011 - 2013 John Stowers.")
aboutdialog.set_logo_icon_name("org.gnome.tweaks")
aboutdialog.set_website("https://wiki.gnome.org/Apps/GnomeTweakTool")
aboutdialog.set_website("https://wiki.gnome.org/Apps/Tweaks")
aboutdialog.set_website_label(_("Homepage"))
aboutdialog.set_license_type(Gtk.License.GPL_3_0)
......
......@@ -33,17 +33,17 @@ tweak_sources = [
'tweaks/tweak_group_appearance.py',
'tweaks/tweak_group_desktop.py',
'tweaks/tweak_group_font.py',
'tweaks/tweak_group_general.py',
'tweaks/tweak_group_keymouse.py',
'tweaks/tweak_group_power.py',
'tweaks/tweak_group_shell_extensions.py',
'tweaks/tweak_group_sound.py',
'tweaks/tweak_group_startup.py',
'tweaks/tweak_group_test.py',
'tweaks/tweak_group_title_bar.py',
'tweaks/tweak_group_top_bar.py',
'tweaks/tweak_group_windows.py',
'tweaks/tweak_group_workspaces.py',
'tweaks/tweak_group_xkb.py',
'tweaks/tweak_wacom.py'
'tweaks/tweak_wacom.py',
]
install_data(shell_sources, install_dir: gtweakdir)
......
......@@ -2,12 +2,14 @@
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSES/GPL-3.0
import os
import os.path
import logging
import zipfile
import tempfile
import json
import pprint
import configparser
from gi.repository import Gtk
from gi.repository import GLib
......@@ -23,6 +25,29 @@ from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsCom
_shell = GnomeShellFactory().get_shell()
_shell_loaded = _shell is not None
def get_theme_name(index_path):
"""Given an index file path, gets the relevant sound theme's name."""
config = configparser.ConfigParser()
config.read(index_path)
return config["Sound Theme"]["Name"]
def get_sound_themes():
"""Gets the available sound themes as a (theme_directory_name, theme_display_name) tuple list."""
themes = []
seen = set()
for location in get_resource_dirs("sounds"):
for item in os.listdir(location):
candidate = os.path.join(location, item)
index_file = os.path.join(candidate, "index.theme")
if os.path.isdir(candidate) and os.path.exists(index_file):
theme_info = (os.path.basename(candidate), get_theme_name(index_file))
if theme_info[1] not in seen:
themes.append(theme_info)
seen.add(theme_info[1])
return themes
class GtkThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
GSettingsComboTweak.__init__(self,
......@@ -256,12 +281,13 @@ TWEAK_GROUPS = [
ListBoxTweakGroup(_("Appearance"),
#GSettingsSwitchTweak("Buttons Icons","org.gnome.desktop.interface", "buttons-have-icons"),
#GSettingsSwitchTweak("Menu Icons","org.gnome.desktop.interface", "menus-have-icons"),
GSettingsSwitchTweak(_("Animations"), "org.gnome.desktop.interface", "enable-animations"),
Title(_("Themes"), "", uid="title-theme"),
GtkThemeSwitcher(),
CursorThemeSwitcher(),
IconThemeSwitcher(),
ShellThemeTweak(loaded=_shell_loaded),
GSettingsComboTweak(_("Sound"), "org.gnome.desktop.sound", "theme-name", get_sound_themes(),
desc=_("Specifies which sound theme to use for sound events.")),
Title(_("Background"), "", uid="title-theme"),
GSettingsFileChooserButtonTweak(_("Image"),"org.gnome.desktop.background", "picture-uri",
......
......@@ -97,10 +97,10 @@ class FontXSettingsTweak(Gtk.Box, Tweak):
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Fonts"),
GSettingsFontButtonTweak(_("Interface"),"org.gnome.desktop.interface", "font-name"),
GSettingsFontButtonTweak(_("Document"), "org.gnome.desktop.interface", "document-font-name"),
GSettingsFontButtonTweak(_("Monospace"), "org.gnome.desktop.interface", "monospace-font-name"),
GSettingsFontButtonTweak(_("Legacy Window Title"),"org.gnome.desktop.wm.preferences", "titlebar-font"),
GSettingsFontButtonTweak(_("Interface Text"),"org.gnome.desktop.interface", "font-name"),
GSettingsFontButtonTweak(_("Document Text"), "org.gnome.desktop.interface", "document-font-name"),
GSettingsFontButtonTweak(_("Monospace Text"), "org.gnome.desktop.interface", "monospace-font-name"),
GSettingsFontButtonTweak(_("Legacy Window Titles"),"org.gnome.desktop.wm.preferences", "titlebar-font"),
FontXSettingsTweak(),
GSettingsSpinButtonTweak(_("Scaling Factor"),
"org.gnome.desktop.interface", "text-scaling-factor",
......
......@@ -5,10 +5,13 @@
from gi.repository import Gio, GLib, Gtk
import gtweak
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import Tweak
from gtweak.widgets import ListBoxTweakGroup, GetterSetterSwitchTweak
from gtweak.widgets import ListBoxTweakGroup, GetterSetterSwitchTweak, GSettingsSwitchTweak
from gtweak.utils import AutostartFile
_shell = GnomeShellFactory().get_shell()
_shell_not_ubuntu = _shell.mode != 'ubuntu'
class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
def __init__(self, **options):
......@@ -42,8 +45,13 @@ class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
None, 0, -1, None)
return False
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Power"),
ListBoxTweakGroup(_("General"),
GSettingsSwitchTweak(_("Animations"), "org.gnome.desktop.interface", "enable-animations"),
IgnoreLidSwitchTweak(),
# Don't show this setting in the Ubuntu session since this setting is in gnome-control-center there
GSettingsSwitchTweak(_("Over-Amplification"), "org.gnome.desktop.sound", "allow-volume-above-100-percent",
desc=_("Allows raising the volume above 100%. This can result in a loss of audio quality; it is better to increase application volume settings, if possible."), loaded=_shell_not_ubuntu),
),
]
......@@ -7,7 +7,6 @@ import os.path
from gi.repository import Gio, GLib, Gtk, Gdk
import gtweak
from gtweak.gsettings import GSettingsSetting
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweaks.tweak_group_xkb import TypingTweakGroup
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsSwitchTweakValue, _GSettingsTweak, Title, GSettingsComboEnumTweak, build_label_beside_widget, Tweak, UI_BOX_SPACING
......
# Copyright (c) 2017 Canonical
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSES/GPL-3.0
from gi.repository import Gio, GLib, Gtk
import gtweak
from gtweak.tweakmodel import Tweak
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Sound"),
GSettingsSwitchTweak(_("Over-Amplification"), "org.gnome.desktop.sound", "allow-volume-above-100-percent",
desc=_("Allows raising the volume above 100%. This can result in a loss of audio quality; it is better to increase application volume settings, if possible.")),
)
]
......@@ -57,11 +57,12 @@ class ApplicationMenuTweak(GetterSetterSwitchTweak):
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Top Bar"),
ApplicationMenuTweak(),
GSettingsSwitchTweak(_("Battery Percentage"),"org.gnome.desktop.interface", "show-battery-percentage", loaded=_shell_loaded),
# Requires patch from https://bugzilla.gnome.org/688320
GSettingsSwitchTweak(_("Activities Overview Hot Corner"),"org.gnome.shell", "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),
GSettingsSwitchTweak(_("Weekday"),"org.gnome.desktop.interface", "clock-show-weekday", loaded=_shell_loaded),
GSettingsSwitchTweak(_("Date"),"org.gnome.desktop.interface", "clock-show-date", loaded=_shell_loaded),
GSettingsSwitchTweak(_("Seconds"), "org.gnome.desktop.interface", "clock-show-seconds", loaded=_shell_loaded),
Title(_("Calendar"),"", loaded=_shell_loaded),
......
......@@ -59,7 +59,7 @@ class Focus(Gtk.ListBox, Tweak):
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
lbl = Gtk.Label(_("Sloppy"), xalign=0)
lbl = Gtk.Label(_("Focus on Hover"), xalign=0)
lbl.props.xalign = 0.0
desc = _("Window is focused when hovered with the pointer. Windows remain focused when the desktop is hovered.")
lbl_desc = Gtk.Label()
......
......@@ -3,14 +3,11 @@
# License-Filename: LICENSES/GPL-3.0
import os.path
import logging
import datetime
from gi.repository import Gtk, Gdk, GObject
import gtweak.tweakmodel
from gtweak.tweakmodel import TweakModel, string_for_search
from gtweak.widgets import Title
from gtweak.tweakmodel import string_for_search
class Window(Gtk.ApplicationWindow):
......@@ -18,11 +15,7 @@ class Window(Gtk.ApplicationWindow):
Gtk.ApplicationWindow.__init__(self,
application=app,
show_menubar=False)
if Gdk.Screen.get_default().get_height() < 800:
self.maximize()
else:
self.set_size_request(950, 700)
self.set_size_request(950, 700)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("org.gnome.tweaks")
......@@ -46,7 +39,7 @@ class Window(Gtk.ApplicationWindow):
self.load_model_data()
Gtk.Settings.get_default().connect("notify::gtk-decoration-layout",
self._update_decorations);
self._update_decorations)
self.connect("key-press-event", self._on_key_press)
self.connect_after("key-press-event", self._after_key_press)
......@@ -61,15 +54,15 @@ class Window(Gtk.ApplicationWindow):
right_header = Gtk.HeaderBar()
right_header.props.show_close_button = True
self._left_header = left_header;
self._right_header = right_header;
self._left_header = left_header
self._right_header = right_header
left_header.get_style_context().add_class("titlebar")
left_header.get_style_context().add_class("tweak-titlebar-left")
right_header.get_style_context().add_class("titlebar")
right_header.get_style_context().add_class("tweak-titlebar-right")
self._update_decorations (Gtk.Settings.get_default(), None)
self._update_decorations(Gtk.Settings.get_default(), None)
self._group_titlebar_widget = None
......@@ -78,7 +71,7 @@ class Window(Gtk.ApplicationWindow):
right_header.set_custom_title(self.title)
icon = Gtk.Image()
icon.set_from_icon_name("edit-find-symbolic",Gtk.IconSize.MENU)
icon.set_from_icon_name("edit-find-symbolic", Gtk.IconSize.MENU)
self.button = Gtk.ToggleButton()
self.button.add(icon)
self.button.connect("toggled", self._on_find_toggled)
......@@ -103,7 +96,7 @@ class Window(Gtk.ApplicationWindow):
left_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.entry = Gtk.SearchEntry(placeholder_text=_("Search Tweaks…"))
if (Gtk.check_version(3, 22, 20) == None):
if (Gtk.check_version(3, 22, 20) is None):
self.entry.set_input_hints(Gtk.InputHints.NO_EMOJI)
self.entry.connect("search-changed", self._on_search)
......@@ -113,7 +106,7 @@ class Window(Gtk.ApplicationWindow):
self.listbox = Gtk.ListBox()
self.listbox.get_style_context().add_class("tweak-categories")
self.listbox.set_size_request(200,-1)
self.listbox.set_size_request(200, -1)
self.listbox.connect("row-selected", self._on_select_row)
self.listbox.set_header_func(self._list_header_func, None)
scroll = Gtk.ScrolledWindow()
......@@ -141,11 +134,11 @@ class Window(Gtk.ApplicationWindow):
def load_css(self):
css_provider = Gtk.CssProvider()
css_provider.load_from_path(
os.path.join(gtweak.PKG_DATA_DIR, 'shell.css'))
os.path.join(gtweak.PKG_DATA_DIR, 'shell.css'))
screen = Gdk.Screen.get_default()
context = Gtk.StyleContext()
context.add_provider_for_screen(screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER)
Gtk.STYLE_PROVIDER_PRIORITY_USER)
def load_model_data(self):
......@@ -159,19 +152,21 @@ class Window(Gtk.ApplicationWindow):
groups = list(self._model._tweak_group_names.keys())
groups = sorted(groups)
# "General" needs to be first item in sidebar
groups.insert(0, groups.pop(groups.index(_("General"))))
for g in groups:
row = _make_items_listbox(g)
self.listbox.add(row)
tweakgroup = self._model.get_value(
self._model.get_tweakgroup_iter(g),
self._model.COLUMN_TWEAK)
self._model.get_tweakgroup_iter(g),
self._model.COLUMN_TWEAK)
scroll = Gtk.ScrolledWindow()
scroll.add(tweakgroup)
self.stack.add_named(scroll, g)
widget = self.listbox.get_row_at_index(0)
self.listbox.select_row (widget)
self.listbox.select_row(widget)
def _list_filter_func(self, row, user_data):
lbl = row.get_child()
......@@ -180,10 +175,10 @@ class Window(Gtk.ApplicationWindow):
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))
row.set_header(Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL))
def _update_decorations(self, settings, pspec):
layout_desc = settings.props.gtk_decoration_layout;
layout_desc = settings.props.gtk_decoration_layout
tokens = layout_desc.split(":", 1)
if len(tokens) > 1:
self._right_header.props.decoration_layout = ":" + tokens[1]
......@@ -195,7 +190,7 @@ class Window(Gtk.ApplicationWindow):
if not self.button.get_active() or not self.entry.is_focus():
if self.entry.im_context_filter_keypress(event):
self.button.set_active(True)
self.entry.grab_focus ()
self.entry.grab_focus()
# Text in entry is selected, deselect it
l = self.entry.get_text_length()
......@@ -226,7 +221,7 @@ class Window(Gtk.ApplicationWindow):
self.listbox.set_filter_func(self._list_filter_func, group)
selected = self.listbox.get_selected_row().get_child().get_text()
if group and not selected in group:
index = sorted(self._model._tweak_group_names.keys()).index(group[0])
index = sorted(self._model._tweak_group_names.keys()).index(group[0])
row = self.listbox.get_row_at_index(index)
self.listbox.select_row(row)
......@@ -242,8 +237,8 @@ class Window(Gtk.ApplicationWindow):
self.stack.set_visible_child_name(group)
self.title.set_text(group)
tweakgroup = self._model.get_value(
self._model.get_tweakgroup_iter(group),
self._model.COLUMN_TWEAK)
self._model.get_tweakgroup_iter(group),
self._model.COLUMN_TWEAK)
if self._group_titlebar_widget:
self._right_header.remove(self._group_titlebar_widget)
self._group_titlebar_widget = tweakgroup.titlebar_widget
......
......@@ -10,9 +10,6 @@ import subprocess
import glob
import itertools
import gtweak
from gtweak.gsettings import GSettingsSetting
import gi
gi.require_version("Notify", "0.7")
from gi.repository import GObject
......@@ -20,6 +17,8 @@ from gi.repository import GLib
from gi.repository import Gio
from gi.repository import Notify
import gtweak
def singleton(cls):
"""
Singleton decorator that works with GObject derived types. The 'recommended'
......
......@@ -116,32 +116,9 @@ def build_tight_button(stock_id):
button.get_style_context().add_provider(provider, 600)
return button
def adjust_schema_for_overrides(originalSchema, key, options):
if (_shell is None):
return originalSchema
if (_shell.mode == 'user'):
overridesSchema = "org.gnome.shell.overrides"
overridesFile = "org.gnome.shell.gschema.xml"
elif (_shell.mode == 'classic'):
overridesSchema = "org.gnome.shell.extensions.classic-overrides"
overridesFile = None
else:
return originalSchema
try:
if (key in GSettingsSetting(overridesSchema, schema_filename=overridesFile).list_keys()):
options['schema_filename'] = overridesFile
return overridesSchema
except GSettingsMissingError as e:
logging.info("GSetting missing %s", e)
return originalSchema
class _GSettingsTweak(Tweak):
def __init__(self, name, schema_name, key_name, **options):
schema_name = adjust_schema_for_overrides(schema_name, key_name, options)
self.schema_name = schema_name
self.key_name = key_name
self._extra_info = None
......
logo.png

25.8 KB | W: | H:

logo.png

7.92 KB | W: | H:

logo.png
logo.png
logo.png
logo.png
  • 2-up
  • Swipe
  • Onion skin
project('gnome-tweaks',
version: '3.29.2',
version: '3.30.0',
meson_version: '>= 0.40.0'
)
......
......@@ -8,10 +8,9 @@ gtweak/tweakview.py
gtweak/tweaks/tweak_group_appearance.py
gtweak/tweaks/tweak_group_desktop.py
gtweak/tweaks/tweak_group_font.py
gtweak/tweaks/tweak_group_general.py
gtweak/tweaks/tweak_group_keymouse.py
gtweak/tweaks/tweak_group_power.py
gtweak/tweaks/tweak_group_shell_extensions.py
gtweak/tweaks/tweak_group_sound.py
gtweak/tweaks/tweak_group_startup.py
gtweak/tweaks/tweak_group_title_bar.py
gtweak/tweaks/tweak_group_top_bar.py
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.