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

- Finished moving to the new proplist handling code in WINGs.

- Also tested the backward compatibility ability of the WINGs proplist code
  which seems to work quite well.

Starting with this moment, Window Maker no longer needs libPropList and is
now using the better and much more robust proplist code from WINGs. Also the
WINGs based proplist code is actively maintained while the old libPropList
code is practically dead and flawed by the fact that it borrowed concepts
from the UserDefaults which conflicted with the retain/release mechanism,
making some problems that libPropList had, practically unsolvable without a
complete redesign (which can be found in the more robust WINGs code).
This commit is contained in:
dan
2001-10-04 03:07:34 +00:00
parent 8bb50a6320
commit 33cc542e85
79 changed files with 2126 additions and 2638 deletions

View File

@@ -37,10 +37,10 @@
typedef struct PLMenuReaderData {
WRootMenuReader *reader;
proplist_t pl;
WMPropList *pl;
int curIndex;
proplist_t *submenu;
WMPropList **submenu;
int *curSubIndex;
int submenuDepth;
@@ -78,7 +78,7 @@ typedef struct GNOMEMenuReaderData {
static WRootMenuData *pl_openMenu(proplist_t pl);
static WRootMenuData *pl_openMenu(WMPropList *pl);
static Bool pl_hasMoreData(WRootMenuData *data);
static Bool pl_nextCommand(WRootMenuData *data,
char **title,
@@ -148,7 +148,7 @@ static char linebuf[LINESIZE];
/* ---------- proplist ---------- */
static WRootMenuData *pl_openMenuFile(proplist_t pl)
static WRootMenuData *pl_openMenuFile(WMPropList *pl)
{
PLRootMenuData *data = wmalloc(sizeof(PLRootMenuData));
@@ -186,7 +186,7 @@ static void pl_closeMenuFile(WRootMenuData *data)
if (data->curSubIndex)
wfree(data->curSubIndex);
PLRelease(data->pl);
WMReleasePropList(data->pl);
wfree(data);
}
@@ -354,8 +354,8 @@ WRootMenuData *OpenMenu(char *path, time_t *menuTime)
}
/* then check whether it's a proplist menu */
pl = ReadProplistFromFile(path);
if (pl && PLIsArray(pl)) {
pl = WMReadPropListFromFile(path);
if (pl && WMIsPLArray(pl)) {
*menuTime = stat_buf.st_mtime;
return pl_openMenu(pl);
}
@@ -392,19 +392,19 @@ WRootMenuData *ReopenRootMenu(time_t *checkTime,
*checkTime = stat_buf.st_mtime;
pl = ReadProplistFromFile(path);
pl = WMReadPropListFromFile(path);
if (!pl) {
wwarning(_("could not load domain %s from user defaults database"),
"WMRootMenu");
return NULL;
}
if (PLIsString(pl)) {
if (WMIsPLString(pl)) {
char *tmp;
char *path;
Bool menu_is_default = False;
tmp = wexpandpath(PLGetString(pl));
tmp = wexpandpath(WMGetFromPLString(pl));
path = getLocalizedMenuFile(tmp);
@@ -448,7 +448,7 @@ WRootMenuData *ReopenRootMenu(time_t *checkTime,
}
return OpenMenu(*menuPath, menuTimestamp);
} else if (PLIsArray(pl)) {
} else if (WMIsPLArray(pl)) {
*menuTimestamp = stat_buf.st_mtime;