summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-09-14 20:22:53 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-09-14 20:22:53 +0000
commit974eb5deaf2147ab05a923b6d62c8cd61012a9a2 (patch)
tree3396fee7e358a50996838e9b7ddbba3569893256 /rbutil
parent4c881e2c91891fede75663db3fd005438bb7d001 (diff)
downloadrockbox-974eb5deaf2147ab05a923b6d62c8cd61012a9a2.tar.gz
rockbox-974eb5deaf2147ab05a923b6d62c8cd61012a9a2.tar.bz2
rockbox-974eb5deaf2147ab05a923b6d62c8cd61012a9a2.zip
Make it possible to change the BrowseDirtree caption (and do so for the device selection dialog).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14695 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/browsedirtree.cpp5
-rw-r--r--rbutil/rbutilqt/browsedirtree.h2
-rw-r--r--rbutil/rbutilqt/configure.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/browsedirtree.cpp b/rbutil/rbutilqt/browsedirtree.cpp
index 59c4cef9f4..c2441f27cd 100644
--- a/rbutil/rbutilqt/browsedirtree.cpp
+++ b/rbutil/rbutilqt/browsedirtree.cpp
@@ -23,7 +23,7 @@
#include "ui_browsedirtreefrm.h"
-BrowseDirtree::BrowseDirtree(QWidget *parent) : QDialog(parent)
+BrowseDirtree::BrowseDirtree(QWidget *parent, const QString &caption) : QDialog(parent)
{
ui.setupUi(this);
this->setModal(true);
@@ -31,6 +31,9 @@ BrowseDirtree::BrowseDirtree(QWidget *parent) : QDialog(parent)
model.setReadOnly(true);
model.setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase);
+ if(caption!="")
+ setWindowTitle(caption);
+
// disable size / date / type columns
ui.tree->setColumnHidden(1, true);
ui.tree->setColumnHidden(2, true);
diff --git a/rbutil/rbutilqt/browsedirtree.h b/rbutil/rbutilqt/browsedirtree.h
index 2c349398a8..3c771c41f1 100644
--- a/rbutil/rbutilqt/browsedirtree.h
+++ b/rbutil/rbutilqt/browsedirtree.h
@@ -28,7 +28,7 @@ class BrowseDirtree : public QDialog
Q_OBJECT
public:
- BrowseDirtree(QWidget *parent = 0);
+ BrowseDirtree(QWidget *parent = 0, const QString &caption="");
void setFilter(const QDir::Filters&);
void setDir(const QDir&);
void setDir(const QString&);
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index c88b9857d8..b67d454e82 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -486,7 +486,7 @@ void Config::updateLanguage()
void Config::browseFolder()
{
- browser = new BrowseDirtree(this);
+ browser = new BrowseDirtree(this,tr("Select your device"));
#if defined(Q_OS_LINUX) || defined(Q_OS_MACX)
browser->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);
#elif defined(Q_OS_WIN32)