added a runtime disabling of multibyte text support
[wmaker-crm.git] / WINGs / configuration.c
blob384fdf0fd3cb93e1c767d888773723d85562ddd6
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.useMultiByte =
36 WMGetUDStringForKey(defaults, "MultiByteText");
38 WINGsConfiguration.doubleClickDelay =
39 WMGetUDIntegerForKey(defaults, "DoubleClickTime");
42 if (!WINGsConfiguration.systemFont) {
43 WINGsConfiguration.systemFont = SYSTEM_FONT;
45 if (!WINGsConfiguration.boldSystemFont) {
46 WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
48 if (WINGsConfiguration.doubleClickDelay == 0) {
49 WINGsConfiguration.doubleClickDelay = 250;