From ad22a909a31d63e65c75908d3789f8fd2125deae Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 19 Jun 2010 04:08:55 +0200 Subject: [PATCH] Cleaned up BrowseDialog class: removed unused methods and fields, restricted access where possible. --- src/browsedialog.cpp | 2 -- src/browsedialog.h | 28 ++++++++++------------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/browsedialog.cpp b/src/browsedialog.cpp index 4f24b70..69c188e 100644 --- a/src/browsedialog.cpp +++ b/src/browsedialog.cpp @@ -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++) { diff --git a/src/browsedialog.h b/src/browsedialog.h index 2a6a357..b97d117 100644 --- a/src/browsedialog.h +++ b/src/browsedialog.h @@ -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()