[Xfce4-commits] r27098 - in xfce4-settings/trunk: dialogs dialogs/keyboard-settings po xfce4-settings-helper
Stephan Arts
stephan at xfce.org
Sat Jun 21 13:24:47 CEST 2008
Author: stephan
Date: 2008-06-21 11:24:47 +0000 (Sat, 21 Jun 2008)
New Revision: 27098
Added:
xfce4-settings/trunk/dialogs/display-settings/
Modified:
xfce4-settings/trunk/dialogs/keyboard-settings/keyboard-dialog.glade
xfce4-settings/trunk/po/nl.po
xfce4-settings/trunk/xfce4-settings-helper/main.c
xfce4-settings/trunk/xfce4-settings-helper/xkb.c
Log:
Fix the keyrepeat-stuff
Modified: xfce4-settings/trunk/dialogs/keyboard-settings/keyboard-dialog.glade
===================================================================
--- xfce4-settings/trunk/dialogs/keyboard-settings/keyboard-dialog.glade 2008-06-21 09:06:02 UTC (rev 27097)
+++ xfce4-settings/trunk/dialogs/keyboard-settings/keyboard-dialog.glade 2008-06-21 11:24:47 UTC (rev 27098)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Jun 15 23:48:00 2008 -->
+<!--Generated with glade3 3.4.5 on Sat Jun 21 13:21:41 2008 -->
<glade-interface>
<requires lib="xfce4"/>
<widget class="GtkDialog" id="keyboard-settings-dialog">
@@ -140,7 +140,8 @@
<widget class="GtkHScale" id="xkb_key_repeat_delay_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">10 0 100 1 10 10</property>
+ <property name="adjustment">100 100 2000 1 10 10</property>
+ <property name="digits">0</property>
<property name="draw_value">False</property>
</widget>
<packing>
@@ -196,7 +197,7 @@
<widget class="GtkHScale" id="xkb_key_repeat_rate_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">10 0 100 1 10 10</property>
+ <property name="adjustment">10 10 500 1 10 10</property>
<property name="draw_value">False</property>
</widget>
<packing>
Modified: xfce4-settings/trunk/po/nl.po
===================================================================
--- xfce4-settings/trunk/po/nl.po 2008-06-21 09:06:02 UTC (rev 27097)
+++ xfce4-settings/trunk/po/nl.po 2008-06-21 11:24:47 UTC (rev 27098)
@@ -144,7 +144,7 @@
#: ../dialogs/appearance-settings/appearance-dialog.glade.h:7
msgid "Change the looks of your XFCE desktop"
-msgstr "Verander de uistraling van jouw XFCE bureaublad"
+msgstr "Verander de uitstraling van jouw XFCE bureaublad"
#: ../dialogs/appearance-settings/appearance-dialog.glade.h:8
msgid "Custom DPI Settings"
Modified: xfce4-settings/trunk/xfce4-settings-helper/main.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/main.c 2008-06-21 09:06:02 UTC (rev 27097)
+++ xfce4-settings/trunk/xfce4-settings-helper/main.c 2008-06-21 11:24:47 UTC (rev 27098)
@@ -96,7 +96,7 @@
accessx_channel = xfconf_channel_new("accessx");
- if (xkb_notification_init(accessx_channel))
+ if (xkb_notification_init(xkb_channel))
accessx_notification_init(accessx_channel);
if(!debug) /* If not in debug mode, fork to background */
Modified: xfce4-settings/trunk/xfce4-settings-helper/xkb.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/xkb.c 2008-06-21 09:06:02 UTC (rev 27097)
+++ xfce4-settings/trunk/xfce4-settings-helper/xkb.c 2008-06-21 11:24:47 UTC (rev 27098)
@@ -56,6 +56,8 @@
static gboolean xkb_initialized = FALSE;
+#define ALL -1
+
static void
set_repeat (int key, int auto_repeat_mode)
{
@@ -64,7 +66,7 @@
gdk_flush ();
gdk_error_trap_push ();
- if (key != -1)
+ if (key != ALL)
{
values.key = key;
XChangeKeyboardControl (GDK_DISPLAY (), KBKey | KBAutoRepeatMode, &values);
@@ -84,19 +86,14 @@
XF86MiscKbdSettings values;
#endif
- g_return_if_fail (rate > 0);
- g_return_if_fail (delay > 0);
-
#ifdef HAVE_XF86MISC
if (miscpresent)
{
gdk_flush ();
gdk_error_trap_push ();
XF86MiscGetKbdSettings (GDK_DISPLAY (), &values);
- if (delay != -1)
- values.delay = delay;
- if (rate != -1)
- values.rate = rate;
+ values.delay = delay;
+ values.rate = rate;
XF86MiscSetKbdSettings (GDK_DISPLAY (), &values);
gdk_flush ();
gdk_error_trap_pop ();
@@ -111,10 +108,8 @@
{
gdk_error_trap_push ();
XkbGetControls (GDK_DISPLAY (), XkbRepeatKeysMask, xkb);
- if (delay != -1)
- xkb->ctrls->repeat_delay = delay;
- if (rate != -1)
- xkb->ctrls->repeat_interval = 1000 / rate;
+ xkb->ctrls->repeat_delay = delay;
+ xkb->ctrls->repeat_interval = 1000 / rate;
XkbSetControls (GDK_DISPLAY (), XkbRepeatKeysMask, xkb);
XFree (xkb);
gdk_flush ();
@@ -133,20 +128,23 @@
static void
cb_xkb_channel_property_changed(XfconfChannel *channel, const gchar *name, const GValue *value, gpointer user_data)
{
+ gint rate = 0;
if (!strcmp (name, "/Xkb/KeyRepeat"))
{
gboolean key_repeat = g_value_get_boolean (value);
- set_repeat (-1, key_repeat == TRUE?1:0);
+ set_repeat (ALL, key_repeat == TRUE?1:0);
}
/* TODO */
if (!strcmp (name, "/Xkb/KeyRepeat/Delay"))
{
- set_repeat_rate (g_value_get_int (value), -1);
+ rate = xfconf_channel_get_int (channel, "/Xkb/KeyRepeat/Rate", 0);
+ set_repeat_rate (g_value_get_int (value), rate);
}
if (!strcmp (name, "/Xkb/KeyRepeat/Rate"))
{
- set_repeat_rate (-1, g_value_get_int (value));
+ rate = xfconf_channel_get_int (channel, "/Xkb/KeyRepeat/Delay", 0);
+ set_repeat_rate (rate, g_value_get_int (value));
}
}
More information about the Xfce4-commits
mailing list