Skip to content

Commit acbde95

Browse files
ericek111monsta
authored andcommitted
mouse: add middle button emulation switch
1 parent 3d3bb8b commit acbde95

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

capplets/mouse/mate-mouse-properties.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ setup_dialog (GtkBuilder *dialog)
267267
g_settings_bind (mouse_settings, "locate-pointer", WID ("locate_pointer_toggle"),
268268
"active", G_SETTINGS_BIND_DEFAULT);
269269

270+
/* Middle Button Emulation */
271+
g_settings_bind (mouse_settings, "middle-button-enabled", WID ("middle_button_emulation_toggle"),
272+
"active", G_SETTINGS_BIND_DEFAULT);
273+
270274
/* Double-click time */
271275
g_settings_bind (mouse_settings, DOUBLE_CLICK_KEY,
272276
gtk_range_get_adjustment (GTK_RANGE (WID ("delay_scale"))), "value",

capplets/mouse/mate-mouse-properties.ui

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Generated with glade 3.20.0 -->
2+
<!-- Generated with glade 3.22.1 -->
33
<interface>
44
<requires lib="gtk+" version="3.14"/>
55
<!-- interface-license-type gplv2 -->
@@ -57,6 +57,9 @@
5757
<property name="default_width">500</property>
5858
<property name="default_height">550</property>
5959
<property name="type_hint">dialog</property>
60+
<child>
61+
<placeholder/>
62+
</child>
6063
<child internal-child="vbox">
6164
<object class="GtkBox" id="dialog-vbox1">
6265
<property name="visible">True</property>
@@ -221,7 +224,7 @@
221224
<property name="can_focus">False</property>
222225
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
223226
<property name="halign">start</property>
224-
<property name="label" translatable="yes">Locate Pointer</property>
227+
<property name="label" translatable="yes">General</property>
225228
<attributes>
226229
<attribute name="weight" value="bold"/>
227230
</attributes>
@@ -258,6 +261,32 @@
258261
<property name="position">1</property>
259262
</packing>
260263
</child>
264+
<child>
265+
<object class="GtkAlignment" id="alignment19">
266+
<property name="visible">True</property>
267+
<property name="can_focus">False</property>
268+
<property name="top_padding">6</property>
269+
<property name="left_padding">12</property>
270+
<child>
271+
<object class="GtkCheckButton" id="middle_button_emulation_toggle">
272+
<property name="label" translatable="yes">Emulate middle button through simultaneous left and right click</property>
273+
<property name="visible">True</property>
274+
<property name="can_focus">True</property>
275+
<property name="receives_default">False</property>
276+
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
277+
<property name="halign">start</property>
278+
<property name="use_underline">True</property>
279+
<property name="active">True</property>
280+
<property name="draw_indicator">True</property>
281+
</object>
282+
</child>
283+
</object>
284+
<packing>
285+
<property name="expand">False</property>
286+
<property name="fill">True</property>
287+
<property name="position">2</property>
288+
</packing>
289+
</child>
261290
</object>
262291
<packing>
263292
<property name="expand">False</property>

0 commit comments

Comments
 (0)