2001-06-27 Richard Hestilow <hestilow@ximian.com:
* ChangeLog added. * mouse-properties.glade: New GUI by Anna Dirks. * mouse-left.png, mouse-right.png: Added. * Makefile.am: Install pixmaps. * prefs-widget.c (set_pixmap_file): Added function. (threshold_changed_cb, read_preferences): Call new macro THRESHOLD_CONVERT, as sensitivity is the reverse of threshold. (read_preferences, prefs_widget_init): Change "threshold_entry" to sensitivity_entry. (prefs_widget_init): Call set_pixmap_file for the new pixmaps.
This commit is contained in:
parent
f3d7412efd
commit
81cbb6d8b6
7 changed files with 349 additions and 220 deletions
16
capplets/mouse/ChangeLog
Normal file
16
capplets/mouse/ChangeLog
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
2001-06-27 Richard Hestilow <hestilow@ximian.com:
|
||||||
|
|
||||||
|
* ChangeLog added.
|
||||||
|
|
||||||
|
* mouse-properties.glade: New GUI by Anna Dirks.
|
||||||
|
|
||||||
|
* mouse-left.png, mouse-right.png: Added.
|
||||||
|
|
||||||
|
* Makefile.am: Install pixmaps.
|
||||||
|
|
||||||
|
* prefs-widget.c (set_pixmap_file): Added function.
|
||||||
|
(threshold_changed_cb, read_preferences): Call new macro
|
||||||
|
THRESHOLD_CONVERT, as sensitivity is the reverse of threshold.
|
||||||
|
(read_preferences, prefs_widget_init): Change "threshold_entry" to
|
||||||
|
sensitivity_entry.
|
||||||
|
(prefs_widget_init): Call set_pixmap_file for the new pixmaps.
|
|
@ -1,3 +1,9 @@
|
||||||
|
|
||||||
|
pixmapdir = $(datadir)/pixmaps
|
||||||
|
pixmap_DATA = \
|
||||||
|
mouse-left.png \
|
||||||
|
mouse-right.png
|
||||||
|
|
||||||
Applicationsdir = $(datadir)/control-center/Desktop
|
Applicationsdir = $(datadir)/control-center/Desktop
|
||||||
Applications_DATA = \
|
Applications_DATA = \
|
||||||
mouse-properties.desktop
|
mouse-properties.desktop
|
||||||
|
|
BIN
capplets/mouse/mouse-left.png
Normal file
BIN
capplets/mouse/mouse-left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
|
@ -2,11 +2,11 @@
|
||||||
<GTK-Interface>
|
<GTK-Interface>
|
||||||
|
|
||||||
<project>
|
<project>
|
||||||
<name>New-mouse-properties</name>
|
<name>New-mouse-properties-mockup </name>
|
||||||
<program_name>new-mouse-properties</program_name>
|
<program_name>new-mouse-properties-mockup-</program_name>
|
||||||
<directory></directory>
|
<directory></directory>
|
||||||
<source_directory>src</source_directory>
|
<source_directory>src</source_directory>
|
||||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
<pixmaps_directory></pixmaps_directory>
|
||||||
<language>C</language>
|
<language>C</language>
|
||||||
<gnome_support>True</gnome_support>
|
<gnome_support>True</gnome_support>
|
||||||
<gettext_support>True</gettext_support>
|
<gettext_support>True</gettext_support>
|
||||||
|
@ -15,77 +15,107 @@
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkWindow</class>
|
<class>GnomeDialog</class>
|
||||||
<name>window1</name>
|
<name>Mouse Configuration</name>
|
||||||
<title>window1</title>
|
<title>Mouse Configuration</title>
|
||||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||||
<position>GTK_WIN_POS_NONE</position>
|
<position>GTK_WIN_POS_NONE</position>
|
||||||
<modal>False</modal>
|
<modal>False</modal>
|
||||||
<allow_shrink>False</allow_shrink>
|
<default_width>448</default_width>
|
||||||
|
<default_height>272</default_height>
|
||||||
|
<allow_shrink>True</allow_shrink>
|
||||||
<allow_grow>True</allow_grow>
|
<allow_grow>True</allow_grow>
|
||||||
<auto_shrink>False</auto_shrink>
|
<auto_shrink>False</auto_shrink>
|
||||||
|
<auto_close>False</auto_close>
|
||||||
|
<hide_on_close>False</hide_on_close>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkVBox</class>
|
||||||
<name>prefs_widget</name>
|
<child_name>GnomeDialog:vbox</child_name>
|
||||||
<border_width>5</border_width>
|
<name>dialog-vbox1</name>
|
||||||
<rows>2</rows>
|
|
||||||
<columns>2</columns>
|
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>5</row_spacing>
|
<spacing>8</spacing>
|
||||||
<column_spacing>5</column_spacing>
|
<child>
|
||||||
|
<padding>4</padding>
|
||||||
|
<expand>True</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkPixmap</class>
|
<class>GtkHButtonBox</class>
|
||||||
<name>mouse_pixmap</name>
|
<child_name>GnomeDialog:action_area</child_name>
|
||||||
<xalign>0</xalign>
|
<name>dialog-action_area1</name>
|
||||||
<yalign>0.5</yalign>
|
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||||
<xpad>0</xpad>
|
<spacing>8</spacing>
|
||||||
<ypad>0</ypad>
|
<child_min_width>85</child_min_width>
|
||||||
<build_insensitive>True</build_insensitive>
|
<child_min_height>27</child_min_height>
|
||||||
|
<child_ipad_x>7</child_ipad_x>
|
||||||
|
<child_ipad_y>0</child_ipad_y>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<padding>0</padding>
|
||||||
<right_attach>2</right_attach>
|
<expand>False</expand>
|
||||||
<top_attach>0</top_attach>
|
<fill>True</fill>
|
||||||
<bottom_attach>1</bottom_attach>
|
<pack>GTK_PACK_END</pack>
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>True</xexpand>
|
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkFrame</class>
|
|
||||||
<name>frame1</name>
|
|
||||||
<label>Mouse buttons</label>
|
|
||||||
<label_xalign>0</label_xalign>
|
|
||||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
|
||||||
<child>
|
|
||||||
<left_attach>0</left_attach>
|
|
||||||
<right_attach>1</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkVBox</class>
|
<class>GtkButton</class>
|
||||||
<name>vbox1</name>
|
<name>button1</name>
|
||||||
<border_width>5</border_width>
|
<can_default>True</can_default>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkButton</class>
|
||||||
|
<name>button3</name>
|
||||||
|
<can_default>True</can_default>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkVBox</class>
|
||||||
|
<name>prefs_widget</name>
|
||||||
|
<homogeneous>False</homogeneous>
|
||||||
|
<spacing>0</spacing>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>True</expand>
|
||||||
|
<fill>True</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<name>label16</name>
|
||||||
|
<label>My mouse is:</label>
|
||||||
|
<justify>GTK_JUSTIFY_LEFT</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>7.45058e-09</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkTable</class>
|
||||||
|
<name>table3</name>
|
||||||
|
<rows>2</rows>
|
||||||
|
<columns>2</columns>
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<spacing>5</spacing>
|
<row_spacing>0</row_spacing>
|
||||||
|
<column_spacing>0</column_spacing>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkRadioButton</class>
|
<class>GtkRadioButton</class>
|
||||||
|
@ -94,16 +124,24 @@
|
||||||
<signal>
|
<signal>
|
||||||
<name>toggled</name>
|
<name>toggled</name>
|
||||||
<handler>left_handed_selected_cb</handler>
|
<handler>left_handed_selected_cb</handler>
|
||||||
<last_modification_time>Tue, 12 Sep 2000 15:07:52 GMT</last_modification_time>
|
<last_modification_time>Wed, 27 Jun 2001 15:46:37 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<label>Left handed</label>
|
<label>Left handed</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
<draw_indicator>True</draw_indicator>
|
<draw_indicator>True</draw_indicator>
|
||||||
<group>rtol_group</group>
|
|
||||||
<child>
|
<child>
|
||||||
<padding>0</padding>
|
<left_attach>0</left_attach>
|
||||||
<expand>False</expand>
|
<right_attach>1</right_attach>
|
||||||
<fill>False</fill>
|
<top_attach>1</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>False</xfill>
|
||||||
|
<yfill>False</yfill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
@ -114,64 +152,44 @@
|
||||||
<signal>
|
<signal>
|
||||||
<name>toggled</name>
|
<name>toggled</name>
|
||||||
<handler>right_handed_selected_cb</handler>
|
<handler>right_handed_selected_cb</handler>
|
||||||
<last_modification_time>Tue, 12 Sep 2000 15:08:05 GMT</last_modification_time>
|
<last_modification_time>Wed, 27 Jun 2001 15:47:00 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<label>Right handed</label>
|
<label>Right handed</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
<draw_indicator>True</draw_indicator>
|
<draw_indicator>True</draw_indicator>
|
||||||
<group>rtol_group</group>
|
|
||||||
<child>
|
<child>
|
||||||
<padding>0</padding>
|
<left_attach>1</left_attach>
|
||||||
<expand>False</expand>
|
<right_attach>2</right_attach>
|
||||||
<fill>False</fill>
|
<top_attach>1</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>False</xfill>
|
||||||
|
<yfill>False</yfill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkFrame</class>
|
|
||||||
<name>frame2</name>
|
|
||||||
<label>Mouse motion</label>
|
|
||||||
<label_xalign>0</label_xalign>
|
|
||||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
|
||||||
<child>
|
|
||||||
<left_attach>1</left_attach>
|
|
||||||
<right_attach>2</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkTable</class>
|
|
||||||
<name>table2</name>
|
|
||||||
<border_width>5</border_width>
|
|
||||||
<rows>5</rows>
|
|
||||||
<columns>3</columns>
|
|
||||||
<homogeneous>False</homogeneous>
|
|
||||||
<row_spacing>5</row_spacing>
|
|
||||||
<column_spacing>5</column_spacing>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkHSeparator</class>
|
<class>GtkPixmap</class>
|
||||||
<name>hseparator1</name>
|
<name>mouse_left_pixmap</name>
|
||||||
|
<xalign>0.5</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<build_insensitive>True</build_insensitive>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>0</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>1</right_attach>
|
||||||
<top_attach>2</top_attach>
|
<top_attach>0</top_attach>
|
||||||
<bottom_attach>3</bottom_attach>
|
<bottom_attach>1</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>True</xexpand>
|
<xexpand>True</xexpand>
|
||||||
<yexpand>True</yexpand>
|
<yexpand>False</yexpand>
|
||||||
<xshrink>False</xshrink>
|
<xshrink>False</xshrink>
|
||||||
<yshrink>False</yshrink>
|
<yshrink>False</yshrink>
|
||||||
<xfill>True</xfill>
|
<xfill>True</xfill>
|
||||||
|
@ -180,35 +198,59 @@
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkPixmap</class>
|
||||||
<name>label1</name>
|
<name>mouse_right_pixmap</name>
|
||||||
<label>Acceleration</label>
|
<xalign>0.5</xalign>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
|
||||||
<wrap>False</wrap>
|
|
||||||
<xalign>0</xalign>
|
|
||||||
<yalign>0.5</yalign>
|
<yalign>0.5</yalign>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
|
<build_insensitive>True</build_insensitive>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>1</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>2</right_attach>
|
||||||
<top_attach>0</top_attach>
|
<top_attach>0</top_attach>
|
||||||
<bottom_attach>1</bottom_attach>
|
<bottom_attach>1</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>True</xexpand>
|
||||||
<yexpand>False</yexpand>
|
<yexpand>False</yexpand>
|
||||||
<xshrink>False</xshrink>
|
<xshrink>False</xshrink>
|
||||||
<yshrink>False</yshrink>
|
<yshrink>False</yshrink>
|
||||||
<xfill>True</xfill>
|
<xfill>True</xfill>
|
||||||
<yfill>False</yfill>
|
<yfill>True</yfill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkHSeparator</class>
|
||||||
|
<name>hseparator1</name>
|
||||||
|
<child>
|
||||||
|
<padding>4</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkTable</class>
|
||||||
|
<name>table2</name>
|
||||||
|
<border_width>3</border_width>
|
||||||
|
<rows>2</rows>
|
||||||
|
<columns>7</columns>
|
||||||
|
<homogeneous>False</homogeneous>
|
||||||
|
<row_spacing>3</row_spacing>
|
||||||
|
<column_spacing>3</column_spacing>
|
||||||
|
<child>
|
||||||
|
<padding>0</padding>
|
||||||
|
<expand>False</expand>
|
||||||
|
<fill>False</fill>
|
||||||
|
</child>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label2</name>
|
<name>label10</name>
|
||||||
<label>Threshold</label>
|
<label>Slow</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0</xalign>
|
<xalign>0</xalign>
|
||||||
|
@ -217,9 +259,9 @@
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>0</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>1</right_attach>
|
||||||
<top_attach>3</top_attach>
|
<top_attach>1</top_attach>
|
||||||
<bottom_attach>4</bottom_attach>
|
<bottom_attach>2</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>False</xexpand>
|
||||||
|
@ -252,74 +294,18 @@
|
||||||
<bottom_attach>2</bottom_attach>
|
<bottom_attach>2</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>True</xexpand>
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkHScale</class>
|
|
||||||
<name>threshold_entry</name>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<draw_value>False</draw_value>
|
|
||||||
<value_pos>GTK_POS_TOP</value_pos>
|
|
||||||
<digits>1</digits>
|
|
||||||
<policy>GTK_UPDATE_CONTINUOUS</policy>
|
|
||||||
<value>0</value>
|
|
||||||
<lower>0</lower>
|
|
||||||
<upper>7</upper>
|
|
||||||
<step>0</step>
|
|
||||||
<page>0</page>
|
|
||||||
<page_size>0</page_size>
|
|
||||||
<child>
|
|
||||||
<left_attach>1</left_attach>
|
|
||||||
<right_attach>2</right_attach>
|
|
||||||
<top_attach>4</top_attach>
|
|
||||||
<bottom_attach>5</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>True</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>True</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkLabel</class>
|
|
||||||
<name>label3</name>
|
|
||||||
<label>Slow</label>
|
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
|
||||||
<wrap>False</wrap>
|
|
||||||
<xalign>1</xalign>
|
|
||||||
<yalign>0.5</yalign>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<child>
|
|
||||||
<left_attach>0</left_attach>
|
|
||||||
<right_attach>1</right_attach>
|
|
||||||
<top_attach>1</top_attach>
|
|
||||||
<bottom_attach>2</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
<yexpand>False</yexpand>
|
||||||
<xshrink>False</xshrink>
|
<xshrink>False</xshrink>
|
||||||
<yshrink>False</yshrink>
|
<yshrink>False</yshrink>
|
||||||
<xfill>True</xfill>
|
<xfill>True</xfill>
|
||||||
<yfill>False</yfill>
|
<yfill>True</yfill>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label5</name>
|
<name>label11</name>
|
||||||
<label>Fast</label>
|
<label>Fast</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
|
@ -345,8 +331,8 @@
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label6</name>
|
<name>label12</name>
|
||||||
<label>Large</label>
|
<label>Mouse speed:</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0</xalign>
|
<xalign>0</xalign>
|
||||||
|
@ -354,10 +340,10 @@
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>2</left_attach>
|
<left_attach>0</left_attach>
|
||||||
<right_attach>3</right_attach>
|
<right_attach>3</right_attach>
|
||||||
<top_attach>4</top_attach>
|
<top_attach>0</top_attach>
|
||||||
<bottom_attach>5</bottom_attach>
|
<bottom_attach>1</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>False</xexpand>
|
||||||
|
@ -371,19 +357,120 @@
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label4</name>
|
<name>label13</name>
|
||||||
<label>Small</label>
|
<label>Low</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>1</xalign>
|
<xalign>0</xalign>
|
||||||
<yalign>0.5</yalign>
|
<yalign>0.5</yalign>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<child>
|
<child>
|
||||||
<left_attach>0</left_attach>
|
<left_attach>4</left_attach>
|
||||||
<right_attach>1</right_attach>
|
<right_attach>5</right_attach>
|
||||||
<top_attach>4</top_attach>
|
<top_attach>1</top_attach>
|
||||||
<bottom_attach>5</bottom_attach>
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
|
<yfill>False</yfill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkHScale</class>
|
||||||
|
<name>sensitivity_entry</name>
|
||||||
|
<can_focus>True</can_focus>
|
||||||
|
<draw_value>False</draw_value>
|
||||||
|
<value_pos>GTK_POS_TOP</value_pos>
|
||||||
|
<digits>1</digits>
|
||||||
|
<policy>GTK_UPDATE_DISCONTINUOUS</policy>
|
||||||
|
<value>0</value>
|
||||||
|
<lower>0</lower>
|
||||||
|
<upper>7</upper>
|
||||||
|
<step>0</step>
|
||||||
|
<page>0</page>
|
||||||
|
<page_size>0</page_size>
|
||||||
|
<child>
|
||||||
|
<left_attach>5</left_attach>
|
||||||
|
<right_attach>6</right_attach>
|
||||||
|
<top_attach>1</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>True</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
|
<yfill>True</yfill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkVSeparator</class>
|
||||||
|
<name>vseparator1</name>
|
||||||
|
<child>
|
||||||
|
<left_attach>3</left_attach>
|
||||||
|
<right_attach>4</right_attach>
|
||||||
|
<top_attach>0</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>8</xpad>
|
||||||
|
<ypad>3</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
|
<yfill>True</yfill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<name>label14</name>
|
||||||
|
<label>High</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<child>
|
||||||
|
<left_attach>6</left_attach>
|
||||||
|
<right_attach>7</right_attach>
|
||||||
|
<top_attach>1</top_attach>
|
||||||
|
<bottom_attach>2</bottom_attach>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<xexpand>False</xexpand>
|
||||||
|
<yexpand>False</yexpand>
|
||||||
|
<xshrink>False</xshrink>
|
||||||
|
<yshrink>False</yshrink>
|
||||||
|
<xfill>True</xfill>
|
||||||
|
<yfill>False</yfill>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkLabel</class>
|
||||||
|
<name>label15</name>
|
||||||
|
<label>Sensitivity:</label>
|
||||||
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
|
<wrap>False</wrap>
|
||||||
|
<xalign>0</xalign>
|
||||||
|
<yalign>0.5</yalign>
|
||||||
|
<xpad>0</xpad>
|
||||||
|
<ypad>0</ypad>
|
||||||
|
<child>
|
||||||
|
<left_attach>4</left_attach>
|
||||||
|
<right_attach>7</right_attach>
|
||||||
|
<top_attach>0</top_attach>
|
||||||
|
<bottom_attach>1</bottom_attach>
|
||||||
<xpad>0</xpad>
|
<xpad>0</xpad>
|
||||||
<ypad>0</ypad>
|
<ypad>0</ypad>
|
||||||
<xexpand>False</xexpand>
|
<xexpand>False</xexpand>
|
||||||
|
|
|
@ -4,14 +4,13 @@
|
||||||
* DO NOT compile it as part of your application.
|
* DO NOT compile it as part of your application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gchar *s = N_("window1");
|
gchar *s = N_("Mouse Configuration");
|
||||||
gchar *s = N_("Mouse buttons");
|
gchar *s = N_("My mouse is:");
|
||||||
gchar *s = N_("Left handed");
|
gchar *s = N_("Left handed");
|
||||||
gchar *s = N_("Right handed");
|
gchar *s = N_("Right handed");
|
||||||
gchar *s = N_("Mouse motion");
|
|
||||||
gchar *s = N_("Acceleration");
|
|
||||||
gchar *s = N_("Threshold");
|
|
||||||
gchar *s = N_("Slow");
|
gchar *s = N_("Slow");
|
||||||
gchar *s = N_("Fast");
|
gchar *s = N_("Fast");
|
||||||
gchar *s = N_("Large");
|
gchar *s = N_("Mouse speed:");
|
||||||
gchar *s = N_("Small");
|
gchar *s = N_("Low");
|
||||||
|
gchar *s = N_("High");
|
||||||
|
gchar *s = N_("Sensitivity:");
|
||||||
|
|
BIN
capplets/mouse/mouse-right.png
Normal file
BIN
capplets/mouse/mouse-right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
|
@ -30,6 +30,7 @@
|
||||||
#include "prefs-widget.h"
|
#include "prefs-widget.h"
|
||||||
|
|
||||||
#define WID(str) (glade_xml_get_widget (prefs_widget->dialog_data, str))
|
#define WID(str) (glade_xml_get_widget (prefs_widget->dialog_data, str))
|
||||||
|
#define THRESHOLD_CONVERT(t) (7 - t)
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ARG_0,
|
ARG_0,
|
||||||
|
@ -61,6 +62,10 @@ static void acceleration_changed_cb (GtkAdjustment *adjustment,
|
||||||
static void threshold_changed_cb (GtkAdjustment *adjustment,
|
static void threshold_changed_cb (GtkAdjustment *adjustment,
|
||||||
PrefsWidget *prefs_widget);
|
PrefsWidget *prefs_widget);
|
||||||
|
|
||||||
|
static void set_pixmap_file (PrefsWidget *prefs_widget,
|
||||||
|
const gchar *widget_name,
|
||||||
|
const gchar *filename);
|
||||||
|
|
||||||
guint
|
guint
|
||||||
prefs_widget_get_type (void)
|
prefs_widget_get_type (void)
|
||||||
{
|
{
|
||||||
|
@ -90,10 +95,6 @@ prefs_widget_init (PrefsWidget *prefs_widget)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
GdkPixmap *pixmap;
|
|
||||||
GdkBitmap *mask;
|
|
||||||
char *filename;
|
|
||||||
|
|
||||||
prefs_widget->dialog_data =
|
prefs_widget->dialog_data =
|
||||||
glade_xml_new (GLADE_DATADIR "/mouse-properties.glade",
|
glade_xml_new (GLADE_DATADIR "/mouse-properties.glade",
|
||||||
|
@ -103,17 +104,8 @@ prefs_widget_init (PrefsWidget *prefs_widget)
|
||||||
"prefs_widget");
|
"prefs_widget");
|
||||||
gtk_container_add (GTK_CONTAINER (prefs_widget), widget);
|
gtk_container_add (GTK_CONTAINER (prefs_widget), widget);
|
||||||
|
|
||||||
filename = gnome_pixmap_file ("gnome-mouse.png");
|
set_pixmap_file (prefs_widget, "mouse_left_pixmap", "mouse-left.png");
|
||||||
pixbuf = gdk_pixbuf_new_from_file (filename);
|
set_pixmap_file (prefs_widget, "mouse_right_pixmap", "mouse-right.png");
|
||||||
g_free (filename);
|
|
||||||
|
|
||||||
if (pixbuf) {
|
|
||||||
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask,
|
|
||||||
100);
|
|
||||||
gtk_pixmap_set (GTK_PIXMAP (WID ("mouse_pixmap")),
|
|
||||||
pixmap, mask);
|
|
||||||
gdk_pixbuf_unref (pixbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
glade_xml_signal_connect_data
|
glade_xml_signal_connect_data
|
||||||
(prefs_widget->dialog_data, "left_handed_selected_cb",
|
(prefs_widget->dialog_data, "left_handed_selected_cb",
|
||||||
|
@ -129,7 +121,7 @@ prefs_widget_init (PrefsWidget *prefs_widget)
|
||||||
acceleration_changed_cb, prefs_widget);
|
acceleration_changed_cb, prefs_widget);
|
||||||
|
|
||||||
adjustment = gtk_range_get_adjustment
|
adjustment = gtk_range_get_adjustment
|
||||||
(GTK_RANGE (WID ("threshold_entry")));
|
(GTK_RANGE (WID ("sensitivity_entry")));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
threshold_changed_cb, prefs_widget);
|
threshold_changed_cb, prefs_widget);
|
||||||
}
|
}
|
||||||
|
@ -249,8 +241,8 @@ read_preferences (PrefsWidget *prefs_widget, Preferences *prefs)
|
||||||
gtk_adjustment_set_value (adjustment, prefs->acceleration);
|
gtk_adjustment_set_value (adjustment, prefs->acceleration);
|
||||||
|
|
||||||
adjustment = gtk_range_get_adjustment
|
adjustment = gtk_range_get_adjustment
|
||||||
(GTK_RANGE (WID ("threshold_entry")));
|
(GTK_RANGE (WID ("sensitivity_entry")));
|
||||||
gtk_adjustment_set_value (adjustment, prefs->threshold);
|
gtk_adjustment_set_value (adjustment, THRESHOLD_CONVERT (prefs->threshold));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -312,8 +304,37 @@ threshold_changed_cb (GtkAdjustment *adjustment, PrefsWidget *prefs_widget)
|
||||||
g_return_if_fail (adjustment != NULL);
|
g_return_if_fail (adjustment != NULL);
|
||||||
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
|
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
|
||||||
|
|
||||||
prefs_widget->prefs->threshold = adjustment->value;
|
prefs_widget->prefs->threshold = THRESHOLD_CONVERT (adjustment->value);
|
||||||
|
|
||||||
preferences_changed (prefs_widget->prefs);
|
preferences_changed (prefs_widget->prefs);
|
||||||
capplet_widget_state_changed (CAPPLET_WIDGET (prefs_widget), TRUE);
|
capplet_widget_state_changed (CAPPLET_WIDGET (prefs_widget), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_pixmap_file (PrefsWidget *prefs_widget, const gchar *widget_name, const gchar *filename)
|
||||||
|
{
|
||||||
|
GtkWidget *widget;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
GdkPixmap *pixmap;
|
||||||
|
GdkBitmap *mask;
|
||||||
|
gchar *path;
|
||||||
|
|
||||||
|
g_return_if_fail (IS_PREFS_WIDGET (prefs_widget));
|
||||||
|
g_return_if_fail (widget_name != NULL);
|
||||||
|
g_return_if_fail (filename != NULL);
|
||||||
|
|
||||||
|
widget = WID (widget_name);
|
||||||
|
g_return_if_fail (widget != NULL);
|
||||||
|
|
||||||
|
path = gnome_pixmap_file (filename);
|
||||||
|
pixbuf = gdk_pixbuf_new_from_file (path);
|
||||||
|
g_free (path);
|
||||||
|
|
||||||
|
if (pixbuf) {
|
||||||
|
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask,
|
||||||
|
100);
|
||||||
|
gtk_pixmap_set (GTK_PIXMAP (widget),
|
||||||
|
pixmap, mask);
|
||||||
|
gdk_pixbuf_unref (pixbuf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue