Skip to content

Commit

Permalink
prefs update see changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithDHedger committed Jan 12, 2024
1 parent 6dc186a commit b758b2b
Show file tree
Hide file tree
Showing 34 changed files with 816 additions and 817 deletions.
16 changes: 8 additions & 8 deletions LFSApplications/LFSApplications/src/lfsbackdropprefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ bool buttonCB(void *p,void* ud)
{
prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop",mainBackdropEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("colour"),{TYPESTRING,"colour",rootColourEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,backdropMode}},
{prefs.LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",multipleMonitors->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop",mainBackdropEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("colour"),{TYPESTRING,"colour",rootColourEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,backdropMode}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",multipleMonitors->LFSTK_getValue(),0}},
};
prefs.LFSTK_saveVarsToFile(mainPrefs);
fd=fopen(monitorPrefs,"w");
Expand Down Expand Up @@ -303,10 +303,10 @@ int main(int argc, char **argv)

prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop","",false,0}},
{prefs.LFSTK_hashFromKey("colour"),{TYPESTRING,"colour","#404040",false,0}},
{prefs.LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,0}},
{prefs.LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("backdrop"),{TYPESTRING,"backdrop","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("colour"),{TYPESTRING,"colour","#404040",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("mainmode"),{TYPEINT,"mainmode","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("multimode"),{TYPEBOOL,"multimode","",false,0}},
};

prefs.LFSTK_loadVarsFromFile(mainPrefs);
Expand Down
64 changes: 32 additions & 32 deletions LFSApplications/LFSApplications/src/lfsdesktopprefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,22 @@ bool buttonCB(void *p,void* ud)

prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme",themeEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,atoi(iconSizeEditBox->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,atoi(gridSizeEditBox->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,atoi(borderLeftEditBox->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,atoi(borderRightEditBox->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,atoi(refreshEditBox->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommandEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",showSuffixCheck->LFSTK_getValue(),0}},
{prefs.LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface",fontEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground",labelColurFEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground",labelColurBEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha",labelAlphaColurEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist",includeEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist",excludeEditBox->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",clickExeCheck->LFSTK_getValue(),0}},
{prefs.LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames",desktopNamesEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme",themeEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,atoi(iconSizeEditBox->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,atoi(gridSizeEditBox->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,atoi(borderLeftEditBox->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,atoi(borderRightEditBox->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,atoi(refreshEditBox->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommandEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",showSuffixCheck->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface",fontEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground",labelColurFEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground",labelColurBEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha",labelAlphaColurEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist",includeEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist",excludeEditBox->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",clickExeCheck->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames",desktopNamesEdit->LFSTK_getCStr(),false,0}},
};

prefs.LFSTK_saveVarsToFile(envFile);
Expand Down Expand Up @@ -237,22 +237,22 @@ int main(int argc, char **argv)

prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme","gnome",false,0}},
{prefs.LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,32}},
{prefs.LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,64}},
{prefs.LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,2}},
{prefs.LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,16}},
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,2}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","xterm -e ",false,0}},
{prefs.LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",false,0}},
{prefs.LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface","",false,0}},
{prefs.LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground","",false,0}},
{prefs.LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground","",false,0}},
{prefs.LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha","1.0",false,0}},
{prefs.LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist","",false,0}},
{prefs.LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist","",false,0}},
{prefs.LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",false,0}},
{prefs.LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames","Desktop 1,Desktop 2,Desktop 3,Desktop 4,Desktop 5,Desktop 6",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("icontheme"),{TYPESTRING,"icontheme","gnome",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("iconsize"),{TYPEINT,"iconsize","",false,32}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridsize"),{TYPEINT,"gridsize","",false,64}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderleft"),{TYPEINT,"gridborderleft","",false,2}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gridborderrite"),{TYPEINT,"gridborderrite","",false,16}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPEINT,"refreshrate","",false,2}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","xterm -e ",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("showextension"),{TYPEBOOL,"showextension","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("fontface"),{TYPESTRING,"fontface","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelforeground"),{TYPESTRING,"labelforeground","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelbackground"),{TYPESTRING,"labelbackground","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("labelalpha"),{TYPESTRING,"labelalpha","1.0",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("includelist"),{TYPESTRING,"includelist","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("excludelist"),{TYPESTRING,"excludelist","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("doubleclickexe"),{TYPEBOOL,"doubleclickexe","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("desknames"),{TYPESTRING,"desknames","Desktop 1,Desktop 2,Desktop 3,Desktop 4,Desktop 5,Desktop 6",false,0}},
};

asprintf(&envFile,"%s/lfsdesktop.rc",apc->configDir.c_str());
Expand Down
40 changes: 20 additions & 20 deletions LFSApplications/LFSApplications/src/lfsdockprefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ void getEdits(void)
{
prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(dockOnMonitor->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,dockGravityPref}},
{prefs.LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,dockSizePref}},
{prefs.LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour",dockBGColourEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",dockTextColourEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",dockGadgets->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("font"),{TYPESTRING,"font",fontEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate",dockRefreshEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",dockUseMicro->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(dockOnMonitor->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,dockGravityPref}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,dockSizePref}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour",dockBGColourEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",dockTextColourEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",dockGadgets->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("font"),{TYPESTRING,"font",fontEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate",dockRefreshEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",dockUseMicro->LFSTK_getValue(),0}},
};
}

Expand Down Expand Up @@ -209,16 +209,16 @@ void getPrefs(void)

prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,3}},
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
{prefs.LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,2}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","kkterminal -m -l -e ",false,0}},
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","LCSD",false,0}},
{prefs.LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour","#00000000",false,0}},
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
{prefs.LFSTK_hashFromKey("font"),{TYPESTRING,"font","Liberation Mono:size=12",false,0}},
{prefs.LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate","1",false,0}},
{prefs.LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("docksize"),{TYPEINT,"docksize","",false,3}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockgrav"),{TYPEINT,"dockgrav","",false,2}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","kkterminal -m -l -e ",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","LCSD",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("dockbgcolour"),{TYPESTRING,"dockbgcolour","#00000000",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("font"),{TYPESTRING,"font","Liberation Mono:size=12",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("refreshrate"),{TYPESTRING,"refreshrate","1",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("usemicroseconds"),{TYPEBOOL,"usemicroseconds","",false,0}},
};

asprintf(&env,"%s/%s",apc->configDir.c_str(),dockName.c_str());
Expand Down
66 changes: 31 additions & 35 deletions LFSApplications/LFSApplications/src/lfspanelprefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,26 @@ void getEdits(void)
{
prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,atoi(panelHeightEdit->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,panelWidthPref}},
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(panelOnMonitor->LFSTK_getCStr())}},
{prefs.LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,panelPosPref}},
{prefs.LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,panelGravityPref}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand",logout->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand",restart->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand",shutdown->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright",panelrightGadgets->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",panelLeftGadgets->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",useTheme->LFSTK_getValue(),0}},
{prefs.LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",noButtons->LFSTK_getValue(),0}},
{prefs.LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour",panelColourEdit->LFSTK_getCStr(),false,0}},
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",panelTextColourEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,atoi(panelHeightEdit->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,panelWidthPref}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,atoi(panelOnMonitor->LFSTK_getCStr())}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,panelPosPref}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,panelGravityPref}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand",termCommand->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand",logout->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand",restart->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand",shutdown->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright",panelrightGadgets->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft",panelLeftGadgets->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",useTheme->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",noButtons->LFSTK_getValue(),0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour",panelColourEdit->LFSTK_getCStr(),false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour",panelTextColourEdit->LFSTK_getCStr(),false,0}},
};
}

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

if(ud!=NULL)
Expand Down Expand Up @@ -179,11 +178,8 @@ bool applyCB(void *p,void* ud)
}

getEdits();
asprintf(&env,"%s/%s",apc->configDir.c_str(),panelNameEdit->LFSTK_getCStr());
//wc->globalLib->LFSTK_saveVarsToFile(env,panelPrefs);
prefs.LFSTK_saveVarsToFile(env);
prefs.LFSTK_saveVarsToFile(apc->configDir+"/"+panelNameEdit->LFSTK_getBuffer());
//prefs.LFSTK_saveVarsToFile("-");
free(env);
}
return(true);
}
Expand Down Expand Up @@ -213,21 +209,21 @@ void getPrefs(void)

prefs.prefsMap=
{
{prefs.LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,0}},
{prefs.LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,0}},
{prefs.LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
{prefs.LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,0}},
{prefs.LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,0}},
{prefs.LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","",false,0}},
{prefs.LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand","",false,0}},
{prefs.LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand","",false,0}},
{prefs.LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand","",false,0}},
{prefs.LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright","",false,0}},
{prefs.LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","",false,0}},
{prefs.LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",true,0}},
{prefs.LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",false,0}},
{prefs.LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour","",false,0}},
{prefs.LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelheight"),{TYPEINT,"panelheight","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelwidth"),{TYPEINT,"panelwidth","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("onmonitor"),{TYPEINT,"onmonitor","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelpos"),{TYPEINT,"panelpos","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelgrav"),{TYPEINT,"panelgrav","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("termcommand"),{TYPESTRING,"termcommand","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("logoutcommand"),{TYPESTRING,"logoutcommand","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("restartcommand"),{TYPESTRING,"restartcommand","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("shutdowncommand"),{TYPESTRING,"shutdowncommand","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsright"),{TYPESTRING,"gadgetsright","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("gadgetsleft"),{TYPESTRING,"gadgetsleft","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("usetheme"),{TYPEBOOL,"usetheme","",true,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("nobuttons"),{TYPEBOOL,"nobuttons","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("panelcolour"),{TYPESTRING,"panelcolour","",false,0}},
{LFSTK_UtilityClass::LFSTK_hashFromKey("textcolour"),{TYPESTRING,"textcolour","black",false,0}},
};

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

0 comments on commit b758b2b

Please sign in to comment.