[gnome-tweak-tool/gnome-3-22] Make Gtk/EnablePrimaryPaste configurable through gsettings
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool/gnome-3-22] Make Gtk/EnablePrimaryPaste configurable through gsettings
- Date: Fri, 9 Dec 2016 16:24:37 +0000 (UTC)
commit 2f9b1b3bd57a77e05fd3c15d1d3ea32af9ca17c5
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Dec 8 18:15:16 2016 +0100
Make Gtk/EnablePrimaryPaste configurable through gsettings
Instead of relying on xsettings overrides, let's make use of a proper
gsetting newly added for this purpose that can also be used by gtk+ on
the wayland backend.
https://bugzilla.gnome.org/show_bug.cgi?id=775847
gtweak/tweaks/tweak_group_keymouse.py | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_keymouse.py b/gtweak/tweaks/tweak_group_keymouse.py
index 28a965f..8e939ed 100644
--- a/gtweak/tweaks/tweak_group_keymouse.py
+++ b/gtweak/tweaks/tweak_group_keymouse.py
@@ -23,17 +23,6 @@ import gtweak
from gtweak.utils import XSettingsOverrides, walk_directories, make_combo_list_with_default
from gtweak.widgets import ListBoxTweakGroup, GSettingsComboTweak, GSettingsSwitchTweak,
GetterSetterSwitchTweak, Title, GSettingsComboEnumTweak
-class PrimaryPasteTweak(GetterSetterSwitchTweak):
- def __init__(self, **options):
- self._xsettings = XSettingsOverrides()
- GetterSetterSwitchTweak.__init__(self, _("Middle-click Paste"), **options)
-
- def get_active(self):
- return self._xsettings.get_enable_primary_paste()
-
- def set_active(self, v):
- self._xsettings.set_enable_primary_paste(v)
-
class KeyThemeSwitcher(GSettingsComboTweak):
def __init__(self, **options):
GSettingsComboTweak.__init__(self,
@@ -77,7 +66,9 @@ TWEAK_GROUPS = [
"org.gnome.settings-daemon.peripherals.mouse",
"locate-pointer",
schema_filename="org.gnome.settings-daemon.peripherals.gschema.xml"),
- PrimaryPasteTweak(),
+ GSettingsSwitchTweak(_("Middle-click Paste"),
+ "org.gnome.desktop.interface",
+ "gtk-enable-primary-paste"),
Title(_("Touchpad"), ""),
GSettingsComboEnumTweak(_("Click method"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]