1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

WINGs: New function W_setconf_doubleClickDelay

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().
This commit is contained in:
Rodolfo García Peñas (kix)
2013-01-08 16:58:04 +01:00
committed by Carlos R. Mafra
parent 73d75fa848
commit b9caaa8729
3 changed files with 8 additions and 12 deletions

View File

@@ -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
}

View File

@@ -125,3 +125,8 @@ unsigned W_getconf_mouseWheelDown(void)
{
return WINGsConfiguration.mouseWheelDown;
}
void W_setconf_doubleClickDelay(int value)
{
WINGsConfiguration.doubleClickDelay = value;
}

View File

@@ -2985,22 +2985,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;
}