fix the double click peditor.
Mon Aug 11 13:53:23 2003 Jonathan Blandford <jrb@redhat.com> * gnome-mouse-properties.c (delay_value_changed_cb): fix the double click peditor. Mon Aug 11 11:50:36 2003 Jonathan Blandford <jrb@redhat.com> * gnome-keyboard-properties.glade: Patch from Elijah Newren <newren@math.utah.edu> to bring the possible repeat range in sync with the a11y capplet. * gnome-keyboard-properties.c: Patch from Elijah Newren to deal with the change in the peditor code. Mon Aug 11 11:55:49 2003 Jonathan Blandford <jrb@redhat.com> * gnome-accessibility-keyboard-properties.glade: Patch from Elijah Newren <newren@math.utah.edu> to bring the possible repeat range in sync with the keyboard capplet.
This commit is contained in:
parent
0e3a015c04
commit
e33890f1be
8 changed files with 42 additions and 30 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Aug 11 11:55:49 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gnome-accessibility-keyboard-properties.glade: Patch from Elijah
|
||||||
|
Newren <newren@math.utah.edu> to bring the possible repeat range
|
||||||
|
in sync with the keyboard capplet.
|
||||||
|
|
||||||
2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
|
2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
|
||||||
|
|
||||||
* gnome-accessibility-keyboard-properties.glade: Patch to add
|
* gnome-accessibility-keyboard-properties.glade: Patch to add
|
||||||
|
|
|
@ -84,7 +84,7 @@ static struct {
|
||||||
} const ranges [] = {
|
} const ranges [] = {
|
||||||
{ "repeatkeys_delay_slide", "repeatkeys_delay_spin", 500, 100, 1500, 10,
|
{ "repeatkeys_delay_slide", "repeatkeys_delay_spin", 500, 100, 1500, 10,
|
||||||
"/desktop/gnome/peripherals/keyboard/delay" },
|
"/desktop/gnome/peripherals/keyboard/delay" },
|
||||||
{ "repeatkeys_rate_slide", "repeatkeys_rate_spin", 90, 10, 210, 10,
|
{ "repeatkeys_rate_slide", "repeatkeys_rate_spin", 90, 10, 110, 10,
|
||||||
"/desktop/gnome/peripherals/keyboard/rate" },
|
"/desktop/gnome/peripherals/keyboard/rate" },
|
||||||
{ "bouncekeys_delay_slide", "bouncekeys_delay_spin", 0, 0, 900, 10,
|
{ "bouncekeys_delay_slide", "bouncekeys_delay_spin", 0, 0, 900, 10,
|
||||||
CONFIG_ROOT "/bouncekeys_delay" },
|
CONFIG_ROOT "/bouncekeys_delay" },
|
||||||
|
@ -212,8 +212,6 @@ setup_ranges (GladeXML *dialog, GConfChangeSet *changeset)
|
||||||
ranges [i].step_size, 0);
|
ranges [i].step_size, 0);
|
||||||
peditor = gconf_peditor_new_numeric_range (changeset,
|
peditor = gconf_peditor_new_numeric_range (changeset,
|
||||||
(gchar *)ranges [i].gconf_key, slide,
|
(gchar *)ranges [i].gconf_key, slide,
|
||||||
"conv-to-widget-cb", gconf_value_int_to_float,
|
|
||||||
"conv-from-widget-cb", gconf_value_float_to_int,
|
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
Mon Aug 11 11:50:36 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gnome-keyboard-properties.glade: Patch from Elijah Newren
|
||||||
|
<newren@math.utah.edu> to bring the possible repeat range in sync
|
||||||
|
with the a11y capplet.
|
||||||
|
|
||||||
|
* gnome-keyboard-properties.c: Patch from Elijah Newren to deal
|
||||||
|
with the change in the peditor code.
|
||||||
|
|
||||||
Fri Aug 1 15:04:39 2003 Jonathan Blandford <jrb@redhat.com>
|
Fri Aug 1 15:04:39 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gnome-keyboard-properties.glade: Patch from Dennis Cranston
|
* gnome-keyboard-properties.glade: Patch from Dennis Cranston
|
||||||
|
|
|
@ -76,7 +76,7 @@ blink_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
|
||||||
GConfValue *new_value;
|
GConfValue *new_value;
|
||||||
|
|
||||||
new_value = gconf_value_new (GCONF_VALUE_INT);
|
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||||
gconf_value_set_int (new_value, 2600 - (int) gconf_value_get_float (value));
|
gconf_value_set_int (new_value, 2600 - gconf_value_get_int (value));
|
||||||
|
|
||||||
return new_value;
|
return new_value;
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ blink_to_widget (GConfPropertyEditor *peditor, const GConfValue *value)
|
||||||
gint current_rate;
|
gint current_rate;
|
||||||
|
|
||||||
current_rate = gconf_value_get_int (value);
|
current_rate = gconf_value_get_int (value);
|
||||||
new_value = gconf_value_new (GCONF_VALUE_FLOAT);
|
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||||
gconf_value_set_float (new_value, CLAMP (2600 - current_rate, 100, 2500));
|
gconf_value_set_int (new_value, CLAMP (2600 - current_rate, 100, 2500));
|
||||||
|
|
||||||
return new_value;
|
return new_value;
|
||||||
}
|
}
|
||||||
|
@ -138,14 +138,10 @@ setup_dialog (GladeXML *dialog,
|
||||||
|
|
||||||
gconf_peditor_new_numeric_range
|
gconf_peditor_new_numeric_range
|
||||||
(changeset, "/desktop/gnome/peripherals/keyboard/delay", WID ("repeat_delay_scale"),
|
(changeset, "/desktop/gnome/peripherals/keyboard/delay", WID ("repeat_delay_scale"),
|
||||||
"conv-to-widget-cb", gconf_value_int_to_float,
|
|
||||||
"conv-from-widget-cb", gconf_value_float_to_int,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gconf_peditor_new_numeric_range
|
gconf_peditor_new_numeric_range
|
||||||
(changeset, "/desktop/gnome/peripherals/keyboard/rate", WID ("repeat_speed_scale"),
|
(changeset, "/desktop/gnome/peripherals/keyboard/rate", WID ("repeat_speed_scale"),
|
||||||
"conv-to-widget-cb", gconf_value_int_to_float,
|
|
||||||
"conv-from-widget-cb", gconf_value_float_to_int,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
peditor = gconf_peditor_new_boolean
|
peditor = gconf_peditor_new_boolean
|
||||||
|
|
|
@ -354,7 +354,7 @@
|
||||||
<property name="digits">1</property>
|
<property name="digits">1</property>
|
||||||
<property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
|
<property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
|
||||||
<property name="inverted">False</property>
|
<property name="inverted">False</property>
|
||||||
<property name="adjustment">500 100 1510 10 10 0</property>
|
<property name="adjustment">500 100 1500 10 10 0</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Aug 11 13:53:23 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gnome-mouse-properties.c (delay_value_changed_cb): fix the
|
||||||
|
double click peditor.
|
||||||
|
|
||||||
2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
|
2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
|
||||||
|
|
||||||
* gnome-mouse-properties.glade: Patch to fix spacing between action
|
* gnome-mouse-properties.glade: Patch to fix spacing between action
|
||||||
|
|
|
@ -121,21 +121,19 @@ double_click_from_gconf (GConfPropertyEditor *peditor, const GConfValue *value)
|
||||||
{
|
{
|
||||||
GConfValue *new_value;
|
GConfValue *new_value;
|
||||||
|
|
||||||
new_value = gconf_value_new (GCONF_VALUE_FLOAT);
|
|
||||||
gconf_value_set_float (new_value, CLAMP (floor ((gconf_value_get_int (value) + 50) / 100) * 100, 0, 1000) / 1000.0);
|
|
||||||
return new_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GConfValue *
|
|
||||||
double_click_to_gconf (GConfPropertyEditor *peditor, const GConfValue *value)
|
|
||||||
{
|
|
||||||
GConfValue *new_value;
|
|
||||||
|
|
||||||
new_value = gconf_value_new (GCONF_VALUE_INT);
|
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||||
gconf_value_set_int (new_value, gconf_value_get_float (value) * 1000.0);
|
gconf_value_set_int (new_value, CLAMP ((int) floor ((gconf_value_get_int (value) + 50) / 100.0) * 100, 100, 1000));
|
||||||
return new_value;
|
return new_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
delay_value_changed_cb (GtkWidget *range,
|
||||||
|
gpointer dialog)
|
||||||
|
{
|
||||||
|
gchar *message = g_strdup_printf ("%.1f %s", gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))) / 1000.0, _("seconds"));
|
||||||
|
gtk_label_set_label (WID ("delay_label"), message);
|
||||||
|
g_free (message);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_default_mouse_info (int *default_numerator, int *default_denominator, int *default_threshold)
|
get_default_mouse_info (int *default_numerator, int *default_denominator, int *default_threshold)
|
||||||
|
@ -564,6 +562,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
|
||||||
gconf_value_free (value);
|
gconf_value_free (value);
|
||||||
|
|
||||||
/* Double-click time */
|
/* Double-click time */
|
||||||
|
gtk_widget_set_size_request (WID ("delay_scale"), 150, -1);
|
||||||
gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ());
|
gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ());
|
||||||
g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image"));
|
g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image"));
|
||||||
g_signal_connect (WID ("double_click_eventbox"), "button_press_event",
|
g_signal_connect (WID ("double_click_eventbox"), "button_press_event",
|
||||||
|
@ -696,12 +695,11 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
|
||||||
|
|
||||||
/* Motion page */
|
/* Motion page */
|
||||||
/* speed */
|
/* speed */
|
||||||
gconf_peditor_new_numeric_range
|
peditor = gconf_peditor_new_numeric_range
|
||||||
(changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"),
|
(changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"),
|
||||||
"conv-to-widget-cb", double_click_from_gconf,
|
"conv-to-widget-cb", double_click_from_gconf,
|
||||||
"conv-from-widget-cb", double_click_to_gconf,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
g_signal_connect (G_OBJECT (WID ("delay_scale")), "value_changed", delay_value_changed_cb, dialog);
|
||||||
gconf_peditor_new_numeric_range
|
gconf_peditor_new_numeric_range
|
||||||
(changeset, "/desktop/gnome/peripherals/mouse/motion_acceleration", WID ("accel_scale"),
|
(changeset, "/desktop/gnome/peripherals/mouse/motion_acceleration", WID ("accel_scale"),
|
||||||
"conv-to-widget-cb", motion_acceleration_from_gconf,
|
"conv-to-widget-cb", motion_acceleration_from_gconf,
|
||||||
|
@ -788,8 +786,8 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changes
|
||||||
{
|
{
|
||||||
if (response_id == GTK_RESPONSE_HELP)
|
if (response_id == GTK_RESPONSE_HELP)
|
||||||
capplet_help (GTK_WINDOW (dialog),
|
capplet_help (GTK_WINDOW (dialog),
|
||||||
"wgoscustdesk.xml",
|
"wgoscustdesk.xml",
|
||||||
"goscustperiph-5");
|
"goscustperiph-5");
|
||||||
else
|
else
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,12 +320,12 @@
|
||||||
<widget class="GtkHScale" id="delay_scale">
|
<widget class="GtkHScale" id="delay_scale">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="draw_value">True</property>
|
<property name="draw_value">False</property>
|
||||||
<property name="value_pos">GTK_POS_RIGHT</property>
|
<property name="value_pos">GTK_POS_RIGHT</property>
|
||||||
<property name="digits">1</property>
|
<property name="digits">1</property>
|
||||||
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
|
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
|
||||||
<property name="inverted">False</property>
|
<property name="inverted">False</property>
|
||||||
<property name="adjustment">0.4 0.1 1 0.1 0.1 0</property>
|
<property name="adjustment">400 100 1000 100 100 0</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
@ -335,7 +335,7 @@
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label14">
|
<widget class="GtkLabel" id="delay_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">seconds</property>
|
<property name="label" translatable="yes">seconds</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue