mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 17:12:29 +02:00
Cleaned up BrowseDialog class: removed unused methods and fields, restricted access where possible.
This commit is contained in:
parent
3efa602af0
commit
ad22a909a3
@ -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++) {
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user