summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-09-14 14:37:43 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-09-14 14:37:43 +0000
commitb775101260054c8bbd1ca2eb0e9ff92799379477 (patch)
tree2216e6a27efd8a0ee273d0f49ced048c1c9ed8be /rbutil
parentd9bf26a127ceb554263e9034bdb46e348df51d4c (diff)
downloadrockbox-b775101260054c8bbd1ca2eb0e9ff92799379477.tar.gz
rockbox-b775101260054c8bbd1ca2eb0e9ff92799379477.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/browsedirtree.cpp4
-rw-r--r--rbutil/rbutilqt/browsedirtree.h1
-rw-r--r--rbutil/rbutilqt/configure.cpp5
3 files changed, 10 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/browsedirtree.cpp b/rbutil/rbutilqt/browsedirtree.cpp
index b410a2d51b..2eabe75564 100644
--- a/rbutil/rbutilqt/browsedirtree.cpp
+++ b/rbutil/rbutilqt/browsedirtree.cpp
@@ -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)
{
diff --git a/rbutil/rbutilqt/browsedirtree.h b/rbutil/rbutilqt/browsedirtree.h
index 651817cbe2..4b9ae90a19 100644
--- a/rbutil/rbutilqt/browsedirtree.h
+++ b/rbutil/rbutilqt/browsedirtree.h
@@ -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);
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 527d3f8a15..038849811b 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -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)));
}