pantheon.switchboard-plug-mouse-touchpad: 2.2.0 -> 2.3.0
Don't need pkgconfig override because of
* e35153425f
https://github.com/elementary/switchboard-plug-mouse-touchpad/releases/tag/2.3.0
This commit is contained in:
parent
692942b4c8
commit
b8c90535c3
@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "switchboard-plug-mouse-touchpad";
|
pname = "switchboard-plug-mouse-touchpad";
|
||||||
version = "2.2.0";
|
version = "2.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "elementary";
|
owner = "elementary";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0mr25p7j5hl8zmvz5i3g30s4xbdhk6d22lw2akch3si40il9q5fv";
|
sha256 = "1cg69nbdf4mcr16mi71aw9j8877lyj8yxjfk9bd3sml8f4fh7mmr";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/Views/General.vala \
|
substituteInPlace src/Views/Clicking.vala \
|
||||||
--subst-var-by GSD_GSETTINGS ${glib.getSchemaPath elementary-settings-daemon}
|
--subst-var-by GSD_GSETTINGS ${glib.getSchemaPath elementary-settings-daemon}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -54,8 +54,6 @@ stdenv.mkDerivation rec {
|
|||||||
switchboard
|
switchboard
|
||||||
];
|
];
|
||||||
|
|
||||||
PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder "out"}/lib/switchboard";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Switchboard Mouse & Touchpad Plug";
|
description = "Switchboard Mouse & Touchpad Plug";
|
||||||
homepage = https://github.com/elementary/switchboard-plug-mouse-touchpad;
|
homepage = https://github.com/elementary/switchboard-plug-mouse-touchpad;
|
||||||
|
@ -1,63 +1,76 @@
|
|||||||
diff --git a/src/Views/General.vala b/src/Views/General.vala
|
diff --git a/src/Views/Clicking.vala b/src/Views/Clicking.vala
|
||||||
index 4b19b73..dfa3d4d 100644
|
index cc4431b..d12ddfe 100644
|
||||||
--- a/src/Views/General.vala
|
--- a/src/Views/Clicking.vala
|
||||||
+++ b/src/Views/General.vala
|
+++ b/src/Views/Clicking.vala
|
||||||
@@ -138,32 +138,34 @@ public class MouseTouchpad.GeneralView : Gtk.Grid {
|
@@ -123,42 +123,39 @@ public class MouseTouchpad.ClickingView : Granite.SimpleSettingsPage {
|
||||||
attach (pointer_speed_scale, 3, 8);
|
content_area.attach (hold_scale, 3, 3);
|
||||||
attach (pointer_speed_help, 1, 9, 3);
|
content_area. attach (hold_help, 1, 4, 3);
|
||||||
|
|
||||||
- var xsettings_schema = SettingsSchemaSource.get_default ().lookup ("org.gnome.settings-daemon.plugins.xsettings", false);
|
- var xsettings_schema = SettingsSchemaSource.get_default ().lookup (
|
||||||
|
- "org.gnome.settings-daemon.plugins.xsettings",
|
||||||
|
- true
|
||||||
|
- );
|
||||||
|
-
|
||||||
- if (xsettings_schema != null) {
|
- if (xsettings_schema != null) {
|
||||||
- var primary_paste_switch = new Gtk.Switch ();
|
- var primary_paste_switch = new Gtk.Switch ();
|
||||||
- primary_paste_switch.halign = Gtk.Align.START;
|
- primary_paste_switch.halign = Gtk.Align.START;
|
||||||
-
|
+ SettingsSchemaSource daemon_schema_source = new SettingsSchemaSource.from_directory ("@GSD_GSETTINGS@", null, true);
|
||||||
- var primary_paste_help = new Gtk.Label (_("Middle or three-finger clicking on an input will paste any selected text"));
|
+ SettingsSchema xsettings_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.plugins.xsettings", false);
|
||||||
|
|
||||||
|
- var primary_paste_help = new Gtk.Label (
|
||||||
|
- _("Middle or three-finger clicking on an input will paste any selected text")
|
||||||
|
- );
|
||||||
- primary_paste_help.margin_bottom = 18;
|
- primary_paste_help.margin_bottom = 18;
|
||||||
- primary_paste_help.wrap = true;
|
- primary_paste_help.wrap = true;
|
||||||
- primary_paste_help.xalign = 0;
|
- primary_paste_help.xalign = 0;
|
||||||
- primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
|
- primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
|
||||||
-
|
-
|
||||||
- attach (new SettingLabel (_("Middle click paste:")), 0, 4);
|
- content_area.attach (new SettingLabel (_("Middle click paste:")), 0, 5);
|
||||||
- attach (primary_paste_switch, 1, 4);
|
- content_area.attach (primary_paste_switch, 1, 5);
|
||||||
- attach (primary_paste_help, 1, 5, 3);
|
- content_area.attach (primary_paste_help, 1, 6, 3);
|
||||||
-
|
-
|
||||||
- var xsettings = new GLib.Settings ("org.gnome.settings-daemon.plugins.xsettings");
|
- var xsettings = new GLib.Settings ("org.gnome.settings-daemon.plugins.xsettings");
|
||||||
- primary_paste_switch.notify["active"].connect (() => on_primary_paste_switch_changed (primary_paste_switch, xsettings));
|
- primary_paste_switch.notify["active"].connect (() => {
|
||||||
-
|
- on_primary_paste_switch_changed (primary_paste_switch, xsettings);
|
||||||
- var current_value = xsettings.get_value ("overrides").lookup_value ("Gtk/EnablePrimaryPaste", VariantType.INT32);
|
- });
|
||||||
|
+ var primary_paste_switch = new Gtk.Switch ();
|
||||||
|
+ primary_paste_switch.halign = Gtk.Align.START;
|
||||||
|
|
||||||
|
- var current_value = xsettings.get_value ("overrides").lookup_value (
|
||||||
|
- "Gtk/EnablePrimaryPaste",
|
||||||
|
- VariantType.INT32
|
||||||
|
- );
|
||||||
- if (current_value != null) {
|
- if (current_value != null) {
|
||||||
- primary_paste_switch.active = current_value.get_int32 () == 1;
|
- primary_paste_switch.active = current_value.get_int32 () == 1;
|
||||||
- }
|
- }
|
||||||
+ var primary_paste_switch = new Gtk.Switch ();
|
+ var primary_paste_help = new Gtk.Label (
|
||||||
+ primary_paste_switch.halign = Gtk.Align.START;
|
+ _("Middle or three-finger clicking on an input will paste any selected text")
|
||||||
+
|
+ );
|
||||||
+ var primary_paste_help = new Gtk.Label (_("Middle or three-finger clicking on an input will paste any selected text"));
|
|
||||||
+ primary_paste_help.margin_bottom = 18;
|
+ primary_paste_help.margin_bottom = 18;
|
||||||
+ primary_paste_help.wrap = true;
|
+ primary_paste_help.wrap = true;
|
||||||
+ primary_paste_help.xalign = 0;
|
+ primary_paste_help.xalign = 0;
|
||||||
+ primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
|
+ primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
|
||||||
+
|
+
|
||||||
+ attach (new SettingLabel (_("Middle click paste:")), 0, 4);
|
+ content_area.attach (new SettingLabel (_("Middle click paste:")), 0, 5);
|
||||||
+ attach (primary_paste_switch, 1, 4);
|
+ content_area.attach (primary_paste_switch, 1, 5);
|
||||||
+ attach (primary_paste_help, 1, 5, 3);
|
+ content_area.attach (primary_paste_help, 1, 6, 3);
|
||||||
+
|
|
||||||
+ SettingsSchemaSource daemon_schema_source = new SettingsSchemaSource.from_directory ("@GSD_GSETTINGS@", null, true);
|
|
||||||
+ SettingsSchema xsettings_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.plugins.xsettings", false);
|
|
||||||
+
|
+
|
||||||
+ var xsettings = new GLib.Settings.full (xsettings_schema, null, null);
|
+ var xsettings = new GLib.Settings.full (xsettings_schema, null, null);
|
||||||
+ primary_paste_switch.notify["active"].connect (() => on_primary_paste_switch_changed (primary_paste_switch, xsettings));
|
+ primary_paste_switch.notify["active"].connect (() => {
|
||||||
|
+ on_primary_paste_switch_changed (primary_paste_switch, xsettings);
|
||||||
|
+ });
|
||||||
+
|
+
|
||||||
+ var current_value = xsettings.get_value ("overrides").lookup_value ("Gtk/EnablePrimaryPaste", VariantType.INT32);
|
+ var current_value = xsettings.get_value ("overrides").lookup_value (
|
||||||
|
+ "Gtk/EnablePrimaryPaste",
|
||||||
|
+ VariantType.INT32
|
||||||
|
+ );
|
||||||
+ if (current_value != null) {
|
+ if (current_value != null) {
|
||||||
+ primary_paste_switch.active = current_value.get_int32 () == 1;
|
+ primary_paste_switch.active = current_value.get_int32 () == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- var daemon_settings = new GLib.Settings ("org.gnome.settings-daemon.peripherals.mouse");
|
- var daemon_settings = new GLib.Settings ("org.gnome.settings-daemon.peripherals.mouse");
|
||||||
- daemon_settings.bind ("locate-pointer", reveal_pointer_switch, "active", GLib.SettingsBindFlags.DEFAULT);
|
+ SettingsSchema daemon_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.peripherals.mouse", false);
|
||||||
+ SettingsSchema daemon_mouse_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.peripherals.mouse", false);
|
+ var daemon_settings = new GLib.Settings.full (daemon_schema, null, null);
|
||||||
+
|
daemon_settings.bind ("double-click", double_click_speed_adjustment, "value", SettingsBindFlags.DEFAULT);
|
||||||
+ var daemon_mouse_settings = new GLib.Settings.full (daemon_mouse_schema, null, null);
|
|
||||||
+ daemon_mouse_settings.bind ("locate-pointer", reveal_pointer_switch, "active", GLib.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
var a11y_mouse_settings = new GLib.Settings ("org.gnome.desktop.a11y.mouse");
|
var a11y_mouse_settings = new GLib.Settings ("org.gnome.desktop.a11y.mouse");
|
||||||
a11y_mouse_settings.bind ("secondary-click-enabled", hold_switch, "active", GLib.SettingsBindFlags.DEFAULT);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user