mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-31 00:38:59 +02:00
Made GMenu2X::menu private
There was only one outside use; turned that into a new public method on the GMenu2X class.
This commit is contained in:
parent
a18730ee13
commit
e4d78bee60
@ -539,6 +539,15 @@ void GMenu2X::readConfig(string conffile) {
|
|||||||
resY = constrain( confInt["resolutionY"], 240,1200 );
|
resY = constrain( confInt["resolutionY"], 240,1200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GMenu2X::saveSelection() {
|
||||||
|
if (confInt["saveSelection"] && (
|
||||||
|
confInt["section"] != menu->selSectionIndex()
|
||||||
|
|| confInt["link"] != menu->selLinkIndex()
|
||||||
|
)) {
|
||||||
|
writeConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GMenu2X::writeConfig() {
|
void GMenu2X::writeConfig() {
|
||||||
string conffile = getHome() + "/gmenu2x.conf";
|
string conffile = getHome() + "/gmenu2x.conf";
|
||||||
ofstream inf(conffile.c_str());
|
ofstream inf(conffile.c_str());
|
||||||
|
@ -65,6 +65,7 @@ typedef std::tr1::unordered_map<std::string, int, std::tr1::hash<std::string> >
|
|||||||
class GMenu2X {
|
class GMenu2X {
|
||||||
private:
|
private:
|
||||||
Touchscreen ts;
|
Touchscreen ts;
|
||||||
|
Menu *menu;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Retrieves the free disk space on the sd
|
Retrieves the free disk space on the sd
|
||||||
@ -170,6 +171,7 @@ public:
|
|||||||
|
|
||||||
void setInputSpeed();
|
void setInputSpeed();
|
||||||
|
|
||||||
|
void saveSelection();
|
||||||
void writeConfig();
|
void writeConfig();
|
||||||
void writeSkinConfig();
|
void writeSkinConfig();
|
||||||
void writeTmp(int selelem=-1, const std::string &selectordir="");
|
void writeTmp(int selelem=-1, const std::string &selectordir="");
|
||||||
@ -189,8 +191,6 @@ public:
|
|||||||
|
|
||||||
void drawTopBar(Surface *s=NULL);
|
void drawTopBar(Surface *s=NULL);
|
||||||
void drawBottomBar(Surface *s=NULL);
|
void drawBottomBar(Surface *s=NULL);
|
||||||
|
|
||||||
Menu *menu;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GMENU2X_H
|
#endif // GMENU2X_H
|
||||||
|
@ -632,12 +632,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
|||||||
if (dontleave) {
|
if (dontleave) {
|
||||||
system(command.c_str());
|
system(command.c_str());
|
||||||
} else {
|
} else {
|
||||||
if (gmenu2x->confInt["saveSelection"] && (
|
gmenu2x->saveSelection();
|
||||||
gmenu2x->confInt["section"]!=gmenu2x->menu->selSectionIndex()
|
|
||||||
|| gmenu2x->confInt["link"]!=gmenu2x->menu->selLinkIndex()
|
|
||||||
)) {
|
|
||||||
gmenu2x->writeConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedFile == "") {
|
if (selectedFile == "") {
|
||||||
gmenu2x->writeTmp();
|
gmenu2x->writeTmp();
|
||||||
|
Loading…
Reference in New Issue
Block a user