diff --git a/src/Makefile.am b/src/Makefile.am index 7d09b62..40b928b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,7 @@ gmenu2x_SOURCES = asfont.cpp button.cpp cpu.cpp dirdialog.cpp filedialog.cpp \ menu.cpp menusettingbool.cpp menusetting.cpp menusettingdir.cpp \ menusettingfile.cpp menusettingimage.cpp menusettingint.cpp \ menusettingmultistring.cpp menusettingrgba.cpp menusettingstring.cpp \ - messagebox.cpp selector.cpp selectordetector.cpp \ + messagebox.cpp selector.cpp \ settingsdialog.cpp sfontplus.cpp surfacecollection.cpp surface.cpp \ textdialog.cpp textmanualdialog.cpp touchscreen.cpp translator.cpp \ utilities.cpp wallpaperdialog.cpp \ @@ -18,7 +18,7 @@ noinst_HEADERS = asfont.h button.h cpu.h dirdialog.h FastDelegate.h \ menu.h menusettingbool.h menusettingdir.h \ menusettingfile.h menusetting.h menusettingimage.h menusettingint.h \ menusettingmultistring.h menusettingrgba.h menusettingstring.h \ - messagebox.h selectordetector.h selector.h settingsdialog.h \ + messagebox.h selector.h settingsdialog.h \ sfontplus.h surfacecollection.h surface.h textdialog.h textmanualdialog.h \ touchscreen.h translator.h utilities.h wallpaperdialog.h \ browsedialog.h buttonbox.h dialog.h diff --git a/src/selectordetector.cpp b/src/selectordetector.cpp deleted file mode 100644 index 67a44d0..0000000 --- a/src/selectordetector.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -#include "selectordetector.h" -#include "utilities.h" - -using namespace std; - -SelectorDetector::SelectorDetector() { - //ctor - useSelectorBackground = false; -} - -SelectorDetector::SelectorDetector(const string &config) { - useSelectorBackground = false; - readSelectorConfig(config); -} - -SelectorDetector::~SelectorDetector() { - //dtor -} - -bool SelectorDetector::readSelectorConfig(const string &config) { - if (fileExists(config)) { - ifstream inf(config.c_str(), ios_base::in); - if (inf.is_open()) { - string line; - while (getline(inf, line, '\n')) { - string::size_type pos = line.find("="); - string name = trim(line.substr(0,pos)); - string value = trim(line.substr(pos+1,line.length())); - - if (name=="cmdLine") application = value; - else if (name=="baseDir") filePath = value; - else if (name=="fileFilter"){ - if(filters.empty()) - filters = value; - else - filters += ("," + value); - } - } - inf.close(); - return true; - } - } - return false; -} diff --git a/src/selectordetector.h b/src/selectordetector.h deleted file mode 100644 index dcabb35..0000000 --- a/src/selectordetector.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef SELECTORDETECTOR_H -#define SELECTORDETECTOR_H - -/* This class is for handling applications that use Kounch's Selector, to correctly import their settings to GMenu - * It provides interfaces to examine the dge file to detect Selector and from there, parse the config files. - */ - - - /* -#Selector configuration file -#Version 1.0 - -#selector-language english (and it doesn't work, crap) -langCode=EN // ignore -layoutCode=0 // ignore - -selectRectangle=2 // ignore - -#Full path to skin files -skinPath=./ // use possibly - -#command line -cmdLine=./race // USE - -#path to base directory for file explorer -baseDir=/boot/local/gmenu2x/roms/ngpc/ // USE - -#File filters // USE -fileFilter=ngp -fileFilter=ngc -fileFilter=npc - */ -#include - -using std::string; -class SelectorDetector -{ - public: - SelectorDetector(); - SelectorDetector(const string &config); - ~SelectorDetector(); - - bool readSelectorConfig(const string &config); - - string getApplication(){return application;} - string getFilePath(){return filePath;} - string getFilters(){return filters;} - - private: - bool useSelectorBackground; - string application; - string filePath; - string filters; - //bool isSelectorGPE(const string &gpe); - //string getSelectorConfig(const string &gpe); // Looks in the GPE for the location of the selectorconfig -}; - -#endif // SELECTORDETECTOR_H