diff --git a/src/gui/FileListWidget.cxx b/src/gui/FileListWidget.cxx index 3ec144d1d..fcbaaca76 100644 --- a/src/gui/FileListWidget.cxx +++ b/src/gui/FileListWidget.cxx @@ -325,6 +325,21 @@ void FileListWidget::handleCommand(CommandSender* sender, int cmd, int data, int { switch (cmd) { + case FileListWidget::kHomeDirCmd: + // Do not let the boss know + selectHomeDir(); + return; + + case FileListWidget::kPrevDirCmd: + // Do not let the boss know + selectPrevHistory(); + return; + + case FileListWidget::kNextDirCmd: + // Do not let the boss know + selectNextHistory(); + return; + case ListWidget::kParentDirCmd: selectParent(); // Do not let the boss know diff --git a/src/gui/FileListWidget.hxx b/src/gui/FileListWidget.hxx index e3f47bf4a..2faeef4d8 100644 --- a/src/gui/FileListWidget.hxx +++ b/src/gui/FileListWidget.hxx @@ -86,12 +86,6 @@ class FileListWidget : public StringListWidget virtual void selectDirectory(); /** Select parent directory (if applicable) */ void selectParent(); - /** Select to home directory */ - void selectHomeDir(); - /** Select previous directory in history (if applicable) */ - void selectPrevHistory(); - /** Select next directory in history (if applicable) */ - void selectNextHistory(); /** Check if the there is a previous directory in history */ bool hasPrevHistory(); /** Check if the there is a next directory in history */ @@ -145,6 +139,12 @@ class FileListWidget : public StringListWidget protected: /** Very similar to setDirectory(), but also updates the history */ void setLocation(const FilesystemNode& node, const string select); + /** Select to home directory */ + void selectHomeDir(); + /** Select previous directory in history (if applicable) */ + void selectPrevHistory(); + /** Select next directory in history (if applicable) */ + void selectNextHistory(); virtual bool isDirectory(const FilesystemNode& node) const; virtual void getChildren(const FilesystemNode::CancelCheck& isCancelled); virtual void extendLists(StringList& list) { } diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index ed8da8231..ca13363b3 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -1008,19 +1008,19 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, break; case FileListWidget::kHomeDirCmd: - myList->selectHomeDir(); + myList->sendCommand(FileListWidget::kHomeDirCmd, 0, 0); break; case FileListWidget::kPrevDirCmd: - myList->selectPrevHistory(); + myList->sendCommand(FileListWidget::kPrevDirCmd, 0, 0); break; case FileListWidget::kNextDirCmd: - myList->selectNextHistory(); + myList->sendCommand(FileListWidget::kNextDirCmd, 0, 0); break; case ListWidget::kParentDirCmd: - myList->selectParent(); + myList->sendCommand(ListWidget::kParentDirCmd, 0, 0); break; case kLoadROMCmd: