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

Put back check for root menu.

This commit is contained in:
dan
2000-11-10 18:20:34 +00:00
parent 7d463ca48d
commit cd57646835

View File

@@ -83,6 +83,7 @@ extern proplist_t ReadProplistFromFile(char *file);
extern WDDomain *WDWindowMaker;
extern WDDomain *WDWindowAttributes;
extern WDDomain *WDRootMenu;
extern int wScreenCount;
@@ -1151,6 +1152,33 @@ wDefaultsCheckDomains(void *foo)
WDWindowAttributes->timestamp = stbuf.st_mtime;
}
#ifndef LITE
if (stat(WDRootMenu->path, &stbuf)>=0
&& WDRootMenu->timestamp < stbuf.st_mtime) {
dict = ReadProplistFromFile(WDRootMenu->path);
#ifdef HEARTBEAT
puts("Checking WMRootMenu domain");
#endif
if (dict) {
if (!PLIsArray(dict) && !PLIsString(dict)) {
PLRelease(dict);
dict = NULL;
wwarning(_("Domain %s (%s) of defaults database is corrupted!"),
"WMRootMenu", WDRootMenu->path);
} else {
if (WDRootMenu->dictionary) {
PLRelease(WDRootMenu->dictionary);
}
WDRootMenu->dictionary = dict;
}
} else {
wwarning(_("could not load domain %s from user defaults database"),
"WMRootMenu");
}
WDRootMenu->timestamp = stbuf.st_mtime;
}
#endif /* !LITE */
if (!foo)
WMAddTimerHandler(DEFAULTS_CHECK_INTERVAL, wDefaultsCheckDomains, foo);
}