mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +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:
committed by
Carlos R. Mafra
parent
73d75fa848
commit
b9caaa8729
@@ -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
|
||||
}
|
||||
|
||||
@@ -125,3 +125,8 @@ unsigned W_getconf_mouseWheelDown(void)
|
||||
{
|
||||
return WINGsConfiguration.mouseWheelDown;
|
||||
}
|
||||
|
||||
void W_setconf_doubleClickDelay(int value)
|
||||
{
|
||||
WINGsConfiguration.doubleClickDelay = value;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user