mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
rbutil: limit the mountpoint selection to /Media on linux and /Volumes on Mac.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14688 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d9bf26a127
commit
b775101260
3 changed files with 10 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ void BrowseDirtree::setDir(QDir &dir)
|
|||
}
|
||||
}
|
||||
|
||||
void BrowseDirtree::setRoot(QString dir)
|
||||
{
|
||||
ui.tree->setRootIndex(model.index(dir));
|
||||
}
|
||||
|
||||
void BrowseDirtree::setFilter(QDir::Filters filters)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class BrowseDirtree : public QDialog
|
|||
void setFilter(QDir::Filters);
|
||||
void setDir(QDir&);
|
||||
QString getSelected();
|
||||
void setRoot(QString dir);
|
||||
|
||||
signals:
|
||||
void itemChanged(QString);
|
||||
|
|
|
|||
|
|
@ -494,6 +494,11 @@ void Config::browseFolder()
|
|||
#endif
|
||||
QDir d(ui.mountPoint->text());
|
||||
browser->setDir(d);
|
||||
#if defined(Q_OS_MACX)
|
||||
browser->setRoot("/Volumes");
|
||||
#elif defined(Q_OS_LINUX)
|
||||
browser->setRoot("/Media");
|
||||
#endif
|
||||
browser->show();
|
||||
connect(browser, SIGNAL(itemChanged(QString)), this, SLOT(setMountpoint(QString)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue