Add the peditor arguments. (setup_dialog): Use locate_pointer instead of

2002-03-21  Dave Camp  <dave@ximian.com>

	* gnome-mouse-properties.c (*_{to|from}_gconf): Add the peditor
	arguments.
	(setup_dialog): Use locate_pointer instead of locate_pointer_id.
	(threshold_to_gconf): New function.
	(setup_dialog): Use threshold_to_gconf for motion_threshold and
	drag_threshold.
This commit is contained in:
Dave Camp 2002-03-21 15:24:20 +00:00 committed by Dave Camp
parent aa0987b305
commit e57703533e
2 changed files with 27 additions and 8 deletions

View file

@ -1,3 +1,12 @@
2002-03-21 Dave Camp <dave@ximian.com>
* gnome-mouse-properties.c (*_{to|from}_gconf): Add the peditor
arguments.
(setup_dialog): Use locate_pointer instead of locate_pointer_id.
(threshold_to_gconf): New function.
(setup_dialog): Use threshold_to_gconf for motion_threshold and
drag_threshold.
2002-03-11 Richard Hestilow <hestilow@ximian.com>
* gnome-mouse-properties.c (drawing_area_button_press_event):

View file

@ -79,7 +79,7 @@ gint double_click_state = DOUBLE_CLICK_TEST_OFF;
* have a few routines to convert from whatever the gconf key is to our range.
*/
static GConfValue *
double_click_from_gconf (const GConfValue *value)
double_click_from_gconf (GConfPropertyEditor *peditor, const GConfValue *value)
{
GConfValue *new_value;
@ -89,7 +89,7 @@ double_click_from_gconf (const GConfValue *value)
}
static GConfValue *
double_click_to_gconf (const GConfValue *value)
double_click_to_gconf (GConfPropertyEditor *peditor, const GConfValue *value)
{
GConfValue *new_value;
@ -99,7 +99,8 @@ double_click_to_gconf (const GConfValue *value)
}
static GConfValue *
motion_acceleration_from_gconf (const GConfValue *value)
motion_acceleration_from_gconf (GConfPropertyEditor *peditor,
const GConfValue *value)
{
GConfValue *new_value;
gfloat motion_acceleration;
@ -116,7 +117,8 @@ motion_acceleration_from_gconf (const GConfValue *value)
}
static GConfValue *
motion_acceleration_to_gconf (const GConfValue *value)
motion_acceleration_to_gconf (GConfPropertyEditor *peditor,
const GConfValue *value)
{
GConfValue *new_value;
gfloat motion_acceleration;
@ -133,7 +135,8 @@ motion_acceleration_to_gconf (const GConfValue *value)
}
static GConfValue *
threshold_from_gconf (const GConfValue *value)
threshold_from_gconf (GConfPropertyEditor *peditor,
const GConfValue *value)
{
GConfValue *new_value;
@ -142,6 +145,13 @@ threshold_from_gconf (const GConfValue *value)
return new_value;
}
static GConfValue *
threshold_to_gconf (GConfPropertyEditor *peditor,
const GConfValue *value)
{
return gconf_value_float_to_int (value);
}
/* Retrieve legacy settings */
static void
@ -584,7 +594,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
gconf_peditor_new_boolean
(changeset, "/desktop/gnome/peripherals/mouse/locate_pointer_id", WID ("locate_pointer_toggle"), NULL);
(changeset, "/desktop/gnome/peripherals/mouse/locate_pointer", WID ("locate_pointer_toggle"), NULL);
/* Motion page */
/* speed */
gconf_peditor_new_numeric_range
@ -602,14 +612,14 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
gconf_peditor_new_numeric_range
(changeset, "/desktop/gnome/peripherals/mouse/motion_threshold", WID ("sensitivity_scale"),
"conv-to-widget-cb", threshold_from_gconf,
"conv-from-widget-cb", gconf_value_float_to_int,
"conv-from-widget-cb", threshold_to_gconf,
NULL);
/* DnD threshold */
gconf_peditor_new_numeric_range
(changeset, "/desktop/gnome/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"),
"conv-to-widget-cb", threshold_from_gconf,
"conv-from-widget-cb", gconf_value_float_to_int,
"conv-from-widget-cb", threshold_to_gconf,
NULL);
/* listen to cursors changing */