mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
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
This commit is contained in:
parent
4c881e2c91
commit
974eb5deaf
3 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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&);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue