From: "Rodolfo García Peñas (kix)" <[email protected]>
The new function W_setconf_doubleClickDelay() sets the value for
WPreferences.W_setconf_doubleClickDelay(), therefore the private
data of WPreferences struct is not used.
This call is used at defaults.c to set the doubleClickDelay().
---
WINGs/WINGs/WINGs.h | 1 +
WINGs/configuration.c | 5 +++++
src/defaults.c | 14 ++------------
3 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/WINGs/WINGs/WINGs.h b/WINGs/WINGs/WINGs.h
index d9aba8c..5682dfa 100644
--- a/WINGs/WINGs/WINGs.h
+++ b/WINGs/WINGs/WINGs.h
@@ -1833,6 +1833,7 @@ WMFont* WMGetFontPanelFont(WMFontPanel *panel);
/* ---[ WINGs/configuration.c ]------------------------------------------- */
unsigned W_getconf_mouseWheelUp(void);
unsigned W_getconf_mouseWheelDown(void);
+void W_setconf_doubleClickDelay(int value);
#ifdef __cplusplus
}
diff --git a/WINGs/configuration.c b/WINGs/configuration.c
index 2f56aa8..8e53ba6 100644
--- a/WINGs/configuration.c
+++ b/WINGs/configuration.c
@@ -125,3 +125,8 @@ unsigned W_getconf_mouseWheelDown(void)
{
return WINGsConfiguration.mouseWheelDown;
}
+
+void W_setconf_doubleClickDelay(int value)
+{
+ WINGsConfiguration.doubleClickDelay = value;
+}
diff --git a/src/defaults.c b/src/defaults.c
index 2ab83bc..e618723 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -2984,22 +2984,12 @@ static int setModifierKeyLabels(WScreen * scr,
WDefaultEntry * entry, WMPropList
return 0;
}
-/*
- * Very ugly kluge.
- * Need access to the double click variables, so that all widgets in
- * wmaker panels will have the same dbl-click values.
- * TODO: figure a better way of dealing with it.
- */
-#include <WINGs/WINGsP.h>
-
-static int setDoubleClick(WScreen * scr, WDefaultEntry * entry, int *value,
void *foo)
+static int setDoubleClick(WScreen *scr, WDefaultEntry *entry, int *value, void
*foo)
{
- extern _WINGsConfiguration WINGsConfiguration;
-
if (*value <= 0)
*(int *)foo = 1;
- WINGsConfiguration.doubleClickDelay = *value;
+ W_setconf_doubleClickDelay(*value);
return 0;
}
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].