Initial revision
[wmaker-crm.git] / WINGs / configuration.c
blob776ec363324df313c0cd280bf8e71f0a0136be64
3 #include "WINGsP.h"
5 #include <proplist.h>
8 _WINGsConfiguration WINGsConfiguration;
12 #define SYSTEM_FONT "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*"
14 #define BOLD_SYSTEM_FONT "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*"
19 void
20 W_ReadConfigurations(void)
22 WMUserDefaults *defaults;
24 memset(&WINGsConfiguration, 0, sizeof(_WINGsConfiguration));
26 defaults = WMGetStandardUserDefaults();
28 if (defaults) {
29 WINGsConfiguration.systemFont =
30 WMGetUDStringForKey(defaults, "SystemFont");
32 WINGsConfiguration.boldSystemFont =
33 WMGetUDStringForKey(defaults, "BoldSystemFont");
35 WINGsConfiguration.doubleClickDelay =
36 WMGetUDIntegerForKey(defaults, "DoubleClickTime");
39 if (!WINGsConfiguration.systemFont) {
40 WINGsConfiguration.systemFont = SYSTEM_FONT;
42 if (!WINGsConfiguration.boldSystemFont) {
43 WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
45 if (WINGsConfiguration.doubleClickDelay == 0) {
46 WINGsConfiguration.doubleClickDelay = 250;