forked from vitrine/wmaker
Reimplement the PropList data structure in Rust.
While this large change has some unit tests, it has not been integration tested thoroughly. Removing the global case insensitivity flag may be an issue in particular. A few of PropList API functions have been modified (mostly to get rid of varargs). The definition of one such function has been left in C for cleanup later.
This commit is contained in:
@@ -2228,7 +2228,7 @@ static void prepareForClose(_Panel * panel)
|
||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||
int i;
|
||||
|
||||
textureList = WMCreatePLArray(NULL, NULL);
|
||||
textureList = WMCreateEmptyPLArray();
|
||||
|
||||
/* store list of textures */
|
||||
for (i = 8; i < WMGetListNumberOfRows(panel->texLs); i++) {
|
||||
@@ -2250,7 +2250,7 @@ static void prepareForClose(_Panel * panel)
|
||||
WMReleasePropList(textureList);
|
||||
|
||||
/* store list of colors */
|
||||
textureList = WMCreatePLArray(NULL, NULL);
|
||||
textureList = WMCreateEmptyPLArray();
|
||||
for (i = 0; i < wlengthof(sample_colors); i++) {
|
||||
WMColor *color;
|
||||
char *str;
|
||||
|
||||
@@ -151,7 +151,7 @@ static void storeData(_Panel * panel)
|
||||
|
||||
SetIntegerForKey(WMGetSliderValue(panel->hceS), "HotCornerEdge");
|
||||
|
||||
list = WMCreatePLArray(NULL, NULL);
|
||||
list = WMCreateEmptyPLArray();
|
||||
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++) {
|
||||
str = WMGetTextFieldText(panel->hcactionsT[i]);
|
||||
if (strlen(str) == 0)
|
||||
|
||||
+2
-2
@@ -203,7 +203,7 @@ static void storeData(_Panel * panel)
|
||||
int i;
|
||||
char *p;
|
||||
|
||||
list = WMCreatePLArray(NULL, NULL);
|
||||
list = WMCreateEmptyPLArray();
|
||||
for (i = 0; i < WMGetListNumberOfRows(panel->icoL); i++) {
|
||||
p = WMGetListItem(panel->icoL, i)->text;
|
||||
tmp = WMCreatePLString(p);
|
||||
@@ -211,7 +211,7 @@ static void storeData(_Panel * panel)
|
||||
}
|
||||
SetObjectForKey(list, "IconPath");
|
||||
|
||||
list = WMCreatePLArray(NULL, NULL);
|
||||
list = WMCreateEmptyPLArray();
|
||||
for (i = 0; i < WMGetListNumberOfRows(panel->pixL); i++) {
|
||||
p = WMGetListItem(panel->pixL, i)->text;
|
||||
tmp = WMCreatePLString(p);
|
||||
|
||||
+2
-2
@@ -705,10 +705,10 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
|
||||
}
|
||||
|
||||
if (!db) {
|
||||
db = WMCreatePLDictionary(NULL, NULL);
|
||||
db = WMCreateEmptyPLDictionary();
|
||||
}
|
||||
if (!gdb) {
|
||||
gdb = WMCreatePLDictionary(NULL, NULL);
|
||||
gdb = WMCreateEmptyPLDictionary();
|
||||
}
|
||||
|
||||
GlobalDB = gdb;
|
||||
|
||||
+6
-1
@@ -153,7 +153,12 @@ int main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
WMPLSetCaseSensitive(False);
|
||||
/*
|
||||
* Rust rewrite note: this API surface has been removed, but we leave in
|
||||
* a record of where it was invoked to set a value other than the
|
||||
* default, in case it helps to track down bugs in the future.
|
||||
*/
|
||||
/* WMPLSetCaseSensitive(False); */
|
||||
|
||||
Initialize(scr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user