Skip to content

Commit b758b2b

Browse files
committed
prefs update see changelogs
1 parent 6dc186a commit b758b2b

34 files changed

+816
-817
lines changed

LFSApplications/LFSApplications/src/lfsbackdropprefs.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ bool buttonCB(void *p,void* ud)
143143
{
144144
prefs.prefsMap=
145145
{
146-
{prefs.LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop",mainBackdropEdit->LFSTK_getCStr(),false,0}},
147-
{prefs.LFSTK_hashFromKey("colour"),{TYPESTRING,"colour",rootColourEdit->LFSTK_getCStr(),false,0}},
148-
{prefs.LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,backdropMode}},
149-
{prefs.LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",multipleMonitors->LFSTK_getValue(),0}},
146+
{LFSTK_UtilityClass::LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop",mainBackdropEdit->LFSTK_getCStr(),false,0}},
147+
{LFSTK_UtilityClass::LFSTK_hashFromKey("colour"),{TYPESTRING,"colour",rootColourEdit->LFSTK_getCStr(),false,0}},
148+
{LFSTK_UtilityClass::LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,backdropMode}},
149+
{LFSTK_UtilityClass::LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",multipleMonitors->LFSTK_getValue(),0}},
150150
};
151151
prefs.LFSTK_saveVarsToFile(mainPrefs);
152152
fd=fopen(monitorPrefs,"w");
@@ -303,10 +303,10 @@ int main(int argc, char **argv)
303303

304304
prefs.prefsMap=
305305
{
306-
{prefs.LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop","",false,0}},
307-
{prefs.LFSTK_hashFromKey("colour"),{TYPESTRING,"colour","#404040",false,0}},
308-
{prefs.LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,0}},
309-
{prefs.LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",false,0}},
306+
{LFSTK_UtilityClass::LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop","",false,0}},
307+
{LFSTK_UtilityClass::LFSTK_hashFromKey("colour"),{TYPESTRING,"colour","#404040",false,0}},
308+
{LFSTK_UtilityClass::LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,0}},
309+
{LFSTK_UtilityClass::LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",false,0}},
310310
};
311311

312312
prefs.LFSTK_loadVarsFromFile(mainPrefs);

LFSApplications/LFSApplications/src/lfsdesktopprefs.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,22 @@ bool buttonCB(void *p,void* ud)
109109

110110
prefs.prefsMap=
111111
{
112-
{prefs.LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme",themeEditBox->LFSTK_getCStr(),false,0}},
113-
{prefs.LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,atoi(iconSizeEditBox->LFSTK_getCStr())}},
114-
{prefs.LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,atoi(gridSizeEditBox->LFSTK_getCStr())}},
115-
{prefs.LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,atoi(borderLeftEditBox->LFSTK_getCStr())}},
116-
{prefs.LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,atoi(borderRightEditBox->LFSTK_getCStr())}},
117-
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,atoi(refreshEditBox->LFSTK_getCStr())}},
118-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommandEditBox->LFSTK_getCStr(),false,0}},
119-
{prefs.LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",showSuffixCheck->LFSTK_getValue(),0}},
120-
{prefs.LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface",fontEditBox->LFSTK_getCStr(),false,0}},
121-
{prefs.LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground",labelColurFEditBox->LFSTK_getCStr(),false,0}},
122-
{prefs.LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground",labelColurBEditBox->LFSTK_getCStr(),false,0}},
123-
{prefs.LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha",labelAlphaColurEditBox->LFSTK_getCStr(),false,0}},
124-
{prefs.LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist",includeEditBox->LFSTK_getCStr(),false,0}},
125-
{prefs.LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist",excludeEditBox->LFSTK_getCStr(),false,0}},
126-
{prefs.LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",clickExeCheck->LFSTK_getValue(),0}},
127-
{prefs.LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames",desktopNamesEdit->LFSTK_getCStr(),false,0}},
112+
{LFSTK_UtilityClass::LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme",themeEditBox->LFSTK_getCStr(),false,0}},
113+
{LFSTK_UtilityClass::LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,atoi(iconSizeEditBox->LFSTK_getCStr())}},
114+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,atoi(gridSizeEditBox->LFSTK_getCStr())}},
115+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,atoi(borderLeftEditBox->LFSTK_getCStr())}},
116+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,atoi(borderRightEditBox->LFSTK_getCStr())}},
117+
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,atoi(refreshEditBox->LFSTK_getCStr())}},
118+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommandEditBox->LFSTK_getCStr(),false,0}},
119+
{LFSTK_UtilityClass::LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",showSuffixCheck->LFSTK_getValue(),0}},
120+
{LFSTK_UtilityClass::LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface",fontEditBox->LFSTK_getCStr(),false,0}},
121+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground",labelColurFEditBox->LFSTK_getCStr(),false,0}},
122+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground",labelColurBEditBox->LFSTK_getCStr(),false,0}},
123+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha",labelAlphaColurEditBox->LFSTK_getCStr(),false,0}},
124+
{LFSTK_UtilityClass::LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist",includeEditBox->LFSTK_getCStr(),false,0}},
125+
{LFSTK_UtilityClass::LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist",excludeEditBox->LFSTK_getCStr(),false,0}},
126+
{LFSTK_UtilityClass::LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",clickExeCheck->LFSTK_getValue(),0}},
127+
{LFSTK_UtilityClass::LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames",desktopNamesEdit->LFSTK_getCStr(),false,0}},
128128
};
129129

130130
prefs.LFSTK_saveVarsToFile(envFile);
@@ -237,22 +237,22 @@ int main(int argc, char **argv)
237237

238238
prefs.prefsMap=
239239
{
240-
{prefs.LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme","gnome",false,0}},
241-
{prefs.LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,32}},
242-
{prefs.LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,64}},
243-
{prefs.LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,2}},
244-
{prefs.LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,16}},
245-
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,2}},
246-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","xterm -e ",false,0}},
247-
{prefs.LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",false,0}},
248-
{prefs.LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface","",false,0}},
249-
{prefs.LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground","",false,0}},
250-
{prefs.LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground","",false,0}},
251-
{prefs.LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha","1.0",false,0}},
252-
{prefs.LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist","",false,0}},
253-
{prefs.LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist","",false,0}},
254-
{prefs.LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",false,0}},
255-
{prefs.LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames","Desktop 1,Desktop 2,Desktop 3,Desktop 4,Desktop 5,Desktop 6",false,0}},
240+
{LFSTK_UtilityClass::LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme","gnome",false,0}},
241+
{LFSTK_UtilityClass::LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,32}},
242+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,64}},
243+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,2}},
244+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,16}},
245+
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,2}},
246+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","xterm -e ",false,0}},
247+
{LFSTK_UtilityClass::LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",false,0}},
248+
{LFSTK_UtilityClass::LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface","",false,0}},
249+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground","",false,0}},
250+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground","",false,0}},
251+
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha","1.0",false,0}},
252+
{LFSTK_UtilityClass::LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist","",false,0}},
253+
{LFSTK_UtilityClass::LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist","",false,0}},
254+
{LFSTK_UtilityClass::LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",false,0}},
255+
{LFSTK_UtilityClass::LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames","Desktop 1,Desktop 2,Desktop 3,Desktop 4,Desktop 5,Desktop 6",false,0}},
256256
};
257257

258258
asprintf(&envFile,"%s/lfsdesktop.rc",apc->configDir.c_str());

LFSApplications/LFSApplications/src/lfsdockprefs.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ void getEdits(void)
132132
{
133133
prefs.prefsMap=
134134
{
135-
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(dockOnMonitor->LFSTK_getCStr())}},
136-
{prefs.LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,dockGravityPref}},
137-
{prefs.LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,dockSizePref}},
138-
{prefs.LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour",dockBGColourEdit->LFSTK_getCStr(),false,0}},
139-
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",dockTextColourEdit->LFSTK_getCStr(),false,0}},
140-
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",dockGadgets->LFSTK_getCStr(),false,0}},
141-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
142-
{prefs.LFSTK_hashFromKey("font"),{TYPESTRING,"font",fontEdit->LFSTK_getCStr(),false,0}},
143-
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate",dockRefreshEdit->LFSTK_getCStr(),false,0}},
144-
{prefs.LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",dockUseMicro->LFSTK_getValue(),0}},
135+
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(dockOnMonitor->LFSTK_getCStr())}},
136+
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,dockGravityPref}},
137+
{LFSTK_UtilityClass::LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,dockSizePref}},
138+
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour",dockBGColourEdit->LFSTK_getCStr(),false,0}},
139+
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",dockTextColourEdit->LFSTK_getCStr(),false,0}},
140+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",dockGadgets->LFSTK_getCStr(),false,0}},
141+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
142+
{LFSTK_UtilityClass::LFSTK_hashFromKey("font"),{TYPESTRING,"font",fontEdit->LFSTK_getCStr(),false,0}},
143+
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate",dockRefreshEdit->LFSTK_getCStr(),false,0}},
144+
{LFSTK_UtilityClass::LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",dockUseMicro->LFSTK_getValue(),0}},
145145
};
146146
}
147147

@@ -209,16 +209,16 @@ void getPrefs(void)
209209

210210
prefs.prefsMap=
211211
{
212-
{prefs.LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,3}},
213-
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
214-
{prefs.LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,2}},
215-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","kkterminal -m -l -e ",false,0}},
216-
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","LCSD",false,0}},
217-
{prefs.LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour","#00000000",false,0}},
218-
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
219-
{prefs.LFSTK_hashFromKey("font"),{TYPESTRING,"font","Liberation Mono:size=12",false,0}},
220-
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate","1",false,0}},
221-
{prefs.LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",false,0}},
212+
{LFSTK_UtilityClass::LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,3}},
213+
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
214+
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,2}},
215+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","kkterminal -m -l -e ",false,0}},
216+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","LCSD",false,0}},
217+
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour","#00000000",false,0}},
218+
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
219+
{LFSTK_UtilityClass::LFSTK_hashFromKey("font"),{TYPESTRING,"font","Liberation Mono:size=12",false,0}},
220+
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate","1",false,0}},
221+
{LFSTK_UtilityClass::LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",false,0}},
222222
};
223223

224224
asprintf(&env,"%s/%s",apc->configDir.c_str(),dockName.c_str());

LFSApplications/LFSApplications/src/lfspanelprefs.cpp

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,26 @@ void getEdits(void)
113113
{
114114
prefs.prefsMap=
115115
{
116-
{prefs.LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,atoi(panelHeightEdit->LFSTK_getCStr())}},
117-
{prefs.LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,panelWidthPref}},
118-
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(panelOnMonitor->LFSTK_getCStr())}},
119-
{prefs.LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,panelPosPref}},
120-
{prefs.LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,panelGravityPref}},
121-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
122-
{prefs.LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand",logout->LFSTK_getCStr(),false,0}},
123-
{prefs.LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand",restart->LFSTK_getCStr(),false,0}},
124-
{prefs.LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand",shutdown->LFSTK_getCStr(),false,0}},
125-
{prefs.LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright",panelrightGadgets->LFSTK_getCStr(),false,0}},
126-
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",panelLeftGadgets->LFSTK_getCStr(),false,0}},
127-
{prefs.LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",useTheme->LFSTK_getValue(),0}},
128-
{prefs.LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",noButtons->LFSTK_getValue(),0}},
129-
{prefs.LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour",panelColourEdit->LFSTK_getCStr(),false,0}},
130-
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",panelTextColourEdit->LFSTK_getCStr(),false,0}},
116+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,atoi(panelHeightEdit->LFSTK_getCStr())}},
117+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,panelWidthPref}},
118+
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(panelOnMonitor->LFSTK_getCStr())}},
119+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,panelPosPref}},
120+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,panelGravityPref}},
121+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
122+
{LFSTK_UtilityClass::LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand",logout->LFSTK_getCStr(),false,0}},
123+
{LFSTK_UtilityClass::LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand",restart->LFSTK_getCStr(),false,0}},
124+
{LFSTK_UtilityClass::LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand",shutdown->LFSTK_getCStr(),false,0}},
125+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright",panelrightGadgets->LFSTK_getCStr(),false,0}},
126+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",panelLeftGadgets->LFSTK_getCStr(),false,0}},
127+
{LFSTK_UtilityClass::LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",useTheme->LFSTK_getValue(),0}},
128+
{LFSTK_UtilityClass::LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",noButtons->LFSTK_getValue(),0}},
129+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour",panelColourEdit->LFSTK_getCStr(),false,0}},
130+
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",panelTextColourEdit->LFSTK_getCStr(),false,0}},
131131
};
132132
}
133133

134134
bool applyCB(void *p,void* ud)
135135
{
136-
char *env=NULL;
137136
std::map<int,const char*>::const_iterator it;
138137

139138
if(ud!=NULL)
@@ -179,11 +178,8 @@ bool applyCB(void *p,void* ud)
179178
}
180179

181180
getEdits();
182-
asprintf(&env,"%s/%s",apc->configDir.c_str(),panelNameEdit->LFSTK_getCStr());
183-
//wc->globalLib->LFSTK_saveVarsToFile(env,panelPrefs);
184-
prefs.LFSTK_saveVarsToFile(env);
181+
prefs.LFSTK_saveVarsToFile(apc->configDir+"/"+panelNameEdit->LFSTK_getBuffer());
185182
//prefs.LFSTK_saveVarsToFile("-");
186-
free(env);
187183
}
188184
return(true);
189185
}
@@ -213,21 +209,21 @@ void getPrefs(void)
213209

214210
prefs.prefsMap=
215211
{
216-
{prefs.LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,0}},
217-
{prefs.LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,0}},
218-
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
219-
{prefs.LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,0}},
220-
{prefs.LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,0}},
221-
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","",false,0}},
222-
{prefs.LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand","",false,0}},
223-
{prefs.LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand","",false,0}},
224-
{prefs.LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand","",false,0}},
225-
{prefs.LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright","",false,0}},
226-
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","",false,0}},
227-
{prefs.LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",true,0}},
228-
{prefs.LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",false,0}},
229-
{prefs.LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour","",false,0}},
230-
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
212+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,0}},
213+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,0}},
214+
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
215+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,0}},
216+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,0}},
217+
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","",false,0}},
218+
{LFSTK_UtilityClass::LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand","",false,0}},
219+
{LFSTK_UtilityClass::LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand","",false,0}},
220+
{LFSTK_UtilityClass::LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand","",false,0}},
221+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright","",false,0}},
222+
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","",false,0}},
223+
{LFSTK_UtilityClass::LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",true,0}},
224+
{LFSTK_UtilityClass::LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",false,0}},
225+
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour","",false,0}},
226+
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
231227
};
232228

233229
asprintf(&env,"%s/%s",apc->configDir.c_str(),panelNameEdit->LFSTK_getCStr());

0 commit comments

Comments
 (0)