summaryrefslogtreecommitdiff
path: root/capplets/mouse/mate-mouse-properties.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-08-24 00:17:16 -0400
committerlukefromdc <[email protected]>2018-08-24 00:17:16 -0400
commit19fdb3f9f84b9354c24d1ec58e43ea9d4d575c3f (patch)
tree7dbc92efb3502dc9f6156c92262efb6a8007ee74 /capplets/mouse/mate-mouse-properties.c
parentd5c82490950df12e2c0f6fd73024a10abd85cc13 (diff)
downloadmate-control-center-19fdb3f9f84b9354c24d1ec58e43ea9d4d575c3f.tar.bz2
mate-control-center-19fdb3f9f84b9354c24d1ec58e43ea9d4d575c3f.tar.xz
Mouse: include a toggle to enable or disable middlemouse paste
Defaults to ON so as not to change expected behavior until user changes it.
Diffstat (limited to 'capplets/mouse/mate-mouse-properties.c')
-rw-r--r--capplets/mouse/mate-mouse-properties.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c
index 5fc3fee8..d5fef831 100644
--- a/capplets/mouse/mate-mouse-properties.c
+++ b/capplets/mouse/mate-mouse-properties.c
@@ -51,6 +51,7 @@ enum
};
#define MOUSE_SCHEMA "org.mate.peripherals-mouse"
+#define INTERFACE_SCHEMA "org.mate.interface"
#define DOUBLE_CLICK_KEY "double-click"
#define TOUCHPAD_SCHEMA "org.mate.peripherals-touchpad"
@@ -61,6 +62,7 @@ enum
static gint double_click_state = DOUBLE_CLICK_TEST_OFF;
static GSettings *mouse_settings = NULL;
+static GSettings *interface_settings = NULL;
static GSettings *touchpad_settings = NULL;
/* Double Click handling */
@@ -273,6 +275,11 @@ setup_dialog (GtkBuilder *dialog)
g_settings_bind (mouse_settings, "middle-button-enabled", WID ("middle_button_emulation_toggle"),
"active", G_SETTINGS_BIND_DEFAULT);
+ /* Middle Button Paste */
+ g_settings_bind (interface_settings, "gtk-enable-primary-paste", WID ("middle_button_paste_toggle"),
+ "active", G_SETTINGS_BIND_DEFAULT);
+
+
/* Double-click time */
g_settings_bind (mouse_settings, DOUBLE_CLICK_KEY,
gtk_range_get_adjustment (GTK_RANGE (WID ("delay_scale"))), "value",
@@ -432,6 +439,7 @@ main (int argc, char **argv)
activate_settings_daemon ();
mouse_settings = g_settings_new (MOUSE_SCHEMA);
+ interface_settings = g_settings_new (INTERFACE_SCHEMA);
touchpad_settings = g_settings_new (TOUCHPAD_SCHEMA);
dialog = create_dialog ();
@@ -471,6 +479,7 @@ main (int argc, char **argv)
}
g_object_unref (mouse_settings);
+ g_object_unref (interface_settings);
g_object_unref (touchpad_settings);
return 0;