1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-08 23:04:15 +01:00

- Fixed userdefaults in WINGs not to synchronize on exit a domain that is

marked not to be synchronized.
- WMGLOBAL options can now be set in the WindowMaker configuration files
  to overwrite values in WMGLOBAL.
- You can now pass "SystemFont", "BoldSystemFont", "SystemFont-##" or
  "BoldSystemFont-##", with ## being the font size to any font creating
  function to create a font with the (bold) system font font specification.
- Replaced AA with Anitialiased in WINGs font creation function names
- Added WMCreateFontWithFlags(), WMHasAntialiasingSupport() and
  WMIsAntialiasingEnabled()
- Created a separate font cacahe for antialiased fonts
- Added test at startup if Xft supports rendering antialiased fonts (in case
  the application was compiled with Xft support, but is run on an X server
  without support for xft rendering (RENDER extension missing). If no Xft
  support antialiasing will be disabled even if it is enabled in the
  configuration file.
- Finished the Info Panel to work with antialiased fonts.
- Code cleanup in dialog.c. Remade part of Info Panel drawing the Window Maker
  logo.
- Fixed technical style drawing of window resizing.
This commit is contained in:
dan
2002-11-13 15:13:48 +00:00
parent d597c61cb7
commit c2ec1cfe8a
25 changed files with 434 additions and 303 deletions

View File

@@ -39,6 +39,7 @@ static UserDefaults *sharedUserDefaults = NULL;
char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification";
static void synchronizeUserDefaults(void *foo);
extern char *WMGetApplicationName();
@@ -93,19 +94,14 @@ wdefaultspathfordomain(char *domain)
static void
#ifndef HAVE_ATEXIT
saveDefaultsChanges(int foo, void *bar)
#else
#ifdef HAVE_ATEXIT
saveDefaultsChanges(void)
#else
saveDefaultsChanges(int foo, void *bar)
#endif
{
/* save the user defaults databases */
UserDefaults *tmp = sharedUserDefaults;
while (tmp) {
WMSynchronizeUserDefaults(tmp);
tmp = tmp->next;
}
synchronizeUserDefaults(NULL);
}
@@ -116,10 +112,10 @@ registerSaveOnExit(void)
static Bool registeredSaveOnExit = False;
if (!registeredSaveOnExit) {
#ifndef HAVE_ATEXIT
on_exit(saveDefaultsChanges, (void*)NULL);
#else
#ifdef HAVE_ATEXIT
atexit(saveDefaultsChanges);
#else
on_exit(saveDefaultsChanges, (void*)NULL);
#endif
registeredSaveOnExit = True;
}
@@ -136,7 +132,6 @@ synchronizeUserDefaults(void *foo)
WMSynchronizeUserDefaults(database);
database = database->next;
}
WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL);
}
@@ -146,7 +141,8 @@ addSynchronizeTimerHandler(void)
static Bool initialized = False;
if (!initialized) {
WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL);
WMAddPersistentTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults,
NULL);
initialized = True;
}
}
@@ -265,7 +261,7 @@ WMGetStandardUserDefaults(void)
if (sharedUserDefaults) {
defaults = sharedUserDefaults;
while (defaults) {
/* Trick, path == NULL only for StandardUserDefaults db */
/* path == NULL only for StandardUserDefaults db */
if (defaults->path == NULL)
return defaults;
defaults = defaults->next;
@@ -284,19 +280,18 @@ WMGetStandardUserDefaults(void)
key = WMCreatePLString(WMGetApplicationName());
defaults->searchList[0] = key;
/* temporary kluge */
/* temporary kluge. wmaker handles synchronization itself */
if (strcmp(WMGetApplicationName(), "WindowMaker")==0) {
domain = NULL;
path = NULL;
} else {
path = wdefaultspathfordomain(WMGetFromPLString(key));
if (stat(path, &stbuf) >= 0)
defaults->timestamp = stbuf.st_mtime;
domain = WMReadPropListFromFile(path);
defaults->dontSync = 1;
}
path = wdefaultspathfordomain(WMGetFromPLString(key));
if (stat(path, &stbuf) >= 0)
defaults->timestamp = stbuf.st_mtime;
domain = WMReadPropListFromFile(path);
if (!domain)
domain = WMCreatePLDictionary(NULL, NULL, NULL);
@@ -332,7 +327,7 @@ WMGetStandardUserDefaults(void)
i = 0;
while (defaults->searchList[i]) {
WMAddToPLArray(defaults->searchListArray,
defaults->searchList[i]);
defaults->searchList[i]);
i++;
}
@@ -409,7 +404,7 @@ WMGetDefaultsFromPath(char *path)
i = 0;
while (defaults->searchList[i]) {
WMAddToPLArray(defaults->searchListArray,
defaults->searchList[i]);
defaults->searchList[i]);
i++;
}
@@ -669,6 +664,7 @@ WMSetUDSearchList(WMUserDefaults *database, WMPropList *list)
for (i=0; i<c; i++) {
database->searchList[i] = WMGetFromPLArray(list, i);
}
database->searchList[c] = NULL;
database->searchListArray = WMDeepCopyPropList(list);
}