mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 03:06:15 +02:00
Removed SelectorDetector class, since it is not used.
This commit is contained in:
parent
9c5799c842
commit
5db8ac8038
@ -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
|
||||
|
@ -1,47 +0,0 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#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;
|
||||
}
|
@ -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 <string>
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user