mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Remove mountpoint entry line from installation form and use config setting instead. Add some nice tango icons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14151 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a12c591ac3
commit
e4d0f0e638
10 changed files with 30 additions and 67 deletions
|
|
@ -62,6 +62,9 @@
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>&Device</string>
|
<string>&Device</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="icon" >
|
||||||
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/rbutil.xpm</iconset>
|
||||||
|
</attribute>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QLabel" name="labelMountPoint" >
|
<widget class="QLabel" name="labelMountPoint" >
|
||||||
|
|
@ -127,6 +130,9 @@
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Autodetect</string>
|
<string>&Autodetect</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/edit-find.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
@ -135,6 +141,9 @@
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>&Proxy</string>
|
<string>&Proxy</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="icon" >
|
||||||
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/network-idle.png</iconset>
|
||||||
|
</attribute>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QRadioButton" name="radioNoProxy" >
|
<widget class="QRadioButton" name="radioNoProxy" >
|
||||||
|
|
@ -248,6 +257,9 @@
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>&Language</string>
|
<string>&Language</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="icon" >
|
||||||
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/preferences-desktop-locale.png</iconset>
|
||||||
|
</attribute>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QListWidget" name="listLanguages" />
|
<widget class="QListWidget" name="listLanguages" />
|
||||||
|
|
|
||||||
BIN
rbutil/rbutilqt/icons/edit-find.png
Normal file
BIN
rbutil/rbutilqt/icons/edit-find.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 617 B |
BIN
rbutil/rbutilqt/icons/network-idle.png
Normal file
BIN
rbutil/rbutilqt/icons/network-idle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 393 B |
BIN
rbutil/rbutilqt/icons/preferences-desktop-locale.png
Normal file
BIN
rbutil/rbutilqt/icons/preferences-desktop-locale.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 567 B |
|
|
@ -28,7 +28,6 @@ Install::Install(QWidget *parent) : QDialog(parent)
|
||||||
connect(ui.radioStable, SIGNAL(toggled(bool)), this, SLOT(setDetailsStable(bool)));
|
connect(ui.radioStable, SIGNAL(toggled(bool)), this, SLOT(setDetailsStable(bool)));
|
||||||
connect(ui.radioCurrent, SIGNAL(toggled(bool)), this, SLOT(setDetailsCurrent(bool)));
|
connect(ui.radioCurrent, SIGNAL(toggled(bool)), this, SLOT(setDetailsCurrent(bool)));
|
||||||
connect(ui.radioArchived, SIGNAL(toggled(bool)), this, SLOT(setDetailsArchived(bool)));
|
connect(ui.radioArchived, SIGNAL(toggled(bool)), this, SLOT(setDetailsArchived(bool)));
|
||||||
connect(ui.buttonBrowse, SIGNAL(clicked()), this, SLOT(browseFolder()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -68,43 +67,14 @@ void Install::setProxy(QUrl proxy_url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Install::setMountPoint(QString mount)
|
|
||||||
{
|
|
||||||
QFileInfo m(mount);
|
|
||||||
if(m.isDir())
|
|
||||||
ui.lineMountPoint->setText(mount);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Install::browseFolder()
|
|
||||||
{
|
|
||||||
QFileDialog browser(this);
|
|
||||||
if(QFileInfo(ui.lineMountPoint->text()).isDir())
|
|
||||||
browser.setDirectory(ui.lineMountPoint->text());
|
|
||||||
else
|
|
||||||
browser.setDirectory("/media");
|
|
||||||
browser.setReadOnly(true);
|
|
||||||
browser.setFileMode(QFileDialog::DirectoryOnly);
|
|
||||||
browser.setAcceptMode(QFileDialog::AcceptOpen);
|
|
||||||
if(browser.exec()) {
|
|
||||||
qDebug() << browser.directory();
|
|
||||||
QStringList files = browser.selectedFiles();
|
|
||||||
setMountPoint(files.at(0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Install::accept()
|
void Install::accept()
|
||||||
{
|
{
|
||||||
logger = new ProgressLoggerGui(this);
|
logger = new ProgressLoggerGui(this);
|
||||||
logger->show();
|
logger->show();
|
||||||
|
QString mountPoint = userSettings->value("defaults/mountpoint").toString();
|
||||||
|
qDebug() << "mountpoint:" << userSettings->value("defaults/mountpoint").toString();
|
||||||
// show dialog with error if mount point is wrong
|
// show dialog with error if mount point is wrong
|
||||||
if(QFileInfo(ui.lineMountPoint->text()).isDir()) {
|
if(!QFileInfo(mountPoint).isDir()) {
|
||||||
mountPoint = ui.lineMountPoint->text();
|
|
||||||
userSettings->setValue("defaults/mountpoint", mountPoint);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||||
logger->abort();
|
logger->abort();
|
||||||
return;
|
return;
|
||||||
|
|
@ -147,7 +117,7 @@ void Install::accept()
|
||||||
installer->setMountPoint(mountPoint);
|
installer->setMountPoint(mountPoint);
|
||||||
installer->install(logger);
|
installer->install(logger);
|
||||||
|
|
||||||
connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ class Install : public QDialog
|
||||||
Install(QWidget *parent = 0);
|
Install(QWidget *parent = 0);
|
||||||
void setProxy(QUrl);
|
void setProxy(QUrl);
|
||||||
void setReleased(QString);
|
void setReleased(QString);
|
||||||
void setMountPoint(QString);
|
|
||||||
void setUserSettings(QSettings*);
|
void setUserSettings(QSettings*);
|
||||||
void setDeviceSettings(QSettings*);
|
void setDeviceSettings(QSettings*);
|
||||||
void setArchivedString(QString);
|
void setArchivedString(QString);
|
||||||
|
|
@ -54,13 +53,11 @@ class Install : public QDialog
|
||||||
QFile *target;
|
QFile *target;
|
||||||
QString file;
|
QString file;
|
||||||
QString fileName;
|
QString fileName;
|
||||||
QString mountPoint;
|
|
||||||
QString archived;
|
QString archived;
|
||||||
ZipInstaller* installer;
|
ZipInstaller* installer;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setCached(bool);
|
void setCached(bool);
|
||||||
void browseFolder(void);
|
|
||||||
void setDetailsCurrent(bool);
|
void setDetailsCurrent(bool);
|
||||||
void setDetailsStable(bool);
|
void setDetailsStable(bool);
|
||||||
void setDetailsArchived(bool);
|
void setDetailsArchived(bool);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<string>Install Rockbox</string>
|
<string>Install Rockbox</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item rowspan="8" row="0" column="0" >
|
<item rowspan="6" row="0" column="0" >
|
||||||
<widget class="QLabel" name="label" >
|
<widget class="QLabel" name="label" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
|
|
@ -29,27 +29,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" colspan="3" >
|
<item row="0" column="1" colspan="2" >
|
||||||
<widget class="QLabel" name="label_2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Select your device in the filesystem</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="2" >
|
|
||||||
<widget class="QLineEdit" name="lineMountPoint" />
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3" >
|
|
||||||
<widget class="QPushButton" name="buttonBrowse" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Browse</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon" >
|
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/system-search.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="3" >
|
|
||||||
<widget class="QLabel" name="label_4" >
|
<widget class="QLabel" name="label_4" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Please select the Rockbox version you want to install on your player:</string>
|
<string>Please select the Rockbox version you want to install on your player:</string>
|
||||||
|
|
@ -59,7 +39,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="3" >
|
<item row="1" column="1" colspan="2" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Version</string>
|
<string>Version</string>
|
||||||
|
|
@ -89,7 +69,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" colspan="3" >
|
<item row="2" column="1" colspan="2" >
|
||||||
<widget class="QGroupBox" name="groupBox_2" >
|
<widget class="QGroupBox" name="groupBox_2" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Details</string>
|
<string>Details</string>
|
||||||
|
|
@ -118,7 +98,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" >
|
<item row="3" column="1" >
|
||||||
<widget class="QCheckBox" name="checkBoxCache" >
|
<widget class="QCheckBox" name="checkBoxCache" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Rockbox Utility stores copies of Rockbox it has downloaded on the local hard disk to save network traffic. If your local copy is no longer working, tick this box to download a fresh copy.</string>
|
<string>Rockbox Utility stores copies of Rockbox it has downloaded on the local hard disk to save network traffic. If your local copy is no longer working, tick this box to download a fresh copy.</string>
|
||||||
|
|
@ -128,7 +108,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="2" colspan="2" >
|
<item row="4" column="2" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
@ -141,7 +121,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1" >
|
<item row="5" column="1" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
|
@ -154,7 +134,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="2" colspan="2" >
|
<item row="5" column="2" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="buttonOk" >
|
<widget class="QPushButton" name="buttonOk" >
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,6 @@ void RbUtilQt::install()
|
||||||
else if(userSettings->value("defaults/proxytype") == "system")
|
else if(userSettings->value("defaults/proxytype") == "system")
|
||||||
installWindow->setProxy(QUrl(getenv("http_proxy")));
|
installWindow->setProxy(QUrl(getenv("http_proxy")));
|
||||||
#endif
|
#endif
|
||||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
|
||||||
|
|
||||||
buildInfo.open();
|
buildInfo.open();
|
||||||
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,11 @@
|
||||||
<file>icons/dialog-information.png</file>
|
<file>icons/dialog-information.png</file>
|
||||||
<file>icons/dialog-warning.png</file>
|
<file>icons/dialog-warning.png</file>
|
||||||
<file>icons/doom_btn.png</file>
|
<file>icons/doom_btn.png</file>
|
||||||
|
<file>icons/edit-find.png</file>
|
||||||
<file>icons/font_btn.png</file>
|
<file>icons/font_btn.png</file>
|
||||||
<file>icons/go-next.png</file>
|
<file>icons/go-next.png</file>
|
||||||
|
<file>icons/network-idle.png</file>
|
||||||
|
<file>icons/preferences-desktop-locale.png</file>
|
||||||
<file>icons/process-stop.png</file>
|
<file>icons/process-stop.png</file>
|
||||||
<file>icons/rbinstall_btn.png</file>
|
<file>icons/rbinstall_btn.png</file>
|
||||||
<file>icons/rblogo.xpm</file>
|
<file>icons/rblogo.xpm</file>
|
||||||
|
|
@ -24,5 +27,4 @@
|
||||||
<qresource prefix="/ini" >
|
<qresource prefix="/ini" >
|
||||||
<file>rbutil.ini</file>
|
<file>rbutil.ini</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/lang" />
|
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,9 @@ p, li { white-space: pre-wrap; }
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Change</string>
|
<string>&Change</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/edit-find.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue