1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 17:41:52 +02:00

Cleaned up BrowseDialog class: removed unused methods and fields, restricted access where possible.

This commit is contained in:
Maarten ter Huurne 2010-06-19 04:08:55 +02:00
parent 3efa602af0
commit ad22a909a3
2 changed files with 10 additions and 20 deletions

View File

@ -215,8 +215,6 @@ void BrowseDialog::paint()
offsetY = gmenu2x->skinConfInt["topBarHeight"]+1;
beforeFileList();
//Files & Directories
gmenu2x->s->setClipRect(clipRect);
for (i = firstElement; i < lastElement; i++) {

View File

@ -34,6 +34,16 @@ using std::vector;
class BrowseDialog : protected Dialog {
protected:
BrowseDialog(GMenu2X *gmenu2x, const string &title, const string &subtitle);
void setPath(const string &path) {
fl->setPath(path);
}
FileLister *fl;
unsigned int selected;
private:
enum Action {
ACT_NONE,
ACT_SELECT,
@ -46,28 +56,11 @@ protected:
ACT_CONFIRM,
};
BrowseDialog(GMenu2X *gmenu2x, const string &title, const string &subtitle);
virtual void beforeFileList() {};
virtual void onChangeDir() {};
void setPath(const string &path) {
fl->setPath(path);
onChangeDir();
}
FileLister *fl;
unsigned int selected;
private:
int selRow;
bool close, result;
string title;
string subtitle;
IconButton *btnUp, *btnEnter, *btnConfirm;
SDL_Rect clipRect;
SDL_Rect touchRect;
@ -92,7 +85,6 @@ private:
void confirm();
public:
bool exec();
const std::string &getPath()