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" >
|
||||
<string>&Device</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/rbutil.xpm</iconset>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="labelMountPoint" >
|
||||
|
|
@ -127,6 +130,9 @@
|
|||
<property name="text" >
|
||||
<string>&Autodetect</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/edit-find.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
@ -135,6 +141,9 @@
|
|||
<attribute name="title" >
|
||||
<string>&Proxy</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/network-idle.png</iconset>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="radioNoProxy" >
|
||||
|
|
@ -248,6 +257,9 @@
|
|||
<attribute name="title" >
|
||||
<string>&Language</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/preferences-desktop-locale.png</iconset>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<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.radioCurrent, SIGNAL(toggled(bool)), this, SLOT(setDetailsCurrent(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()
|
||||
{
|
||||
logger = new ProgressLoggerGui(this);
|
||||
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
|
||||
if(QFileInfo(ui.lineMountPoint->text()).isDir()) {
|
||||
mountPoint = ui.lineMountPoint->text();
|
||||
userSettings->setValue("defaults/mountpoint", mountPoint);
|
||||
}
|
||||
else {
|
||||
if(!QFileInfo(mountPoint).isDir()) {
|
||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class Install : public QDialog
|
|||
Install(QWidget *parent = 0);
|
||||
void setProxy(QUrl);
|
||||
void setReleased(QString);
|
||||
void setMountPoint(QString);
|
||||
void setUserSettings(QSettings*);
|
||||
void setDeviceSettings(QSettings*);
|
||||
void setArchivedString(QString);
|
||||
|
|
@ -54,13 +53,11 @@ class Install : public QDialog
|
|||
QFile *target;
|
||||
QString file;
|
||||
QString fileName;
|
||||
QString mountPoint;
|
||||
QString archived;
|
||||
ZipInstaller* installer;
|
||||
|
||||
private slots:
|
||||
void setCached(bool);
|
||||
void browseFolder(void);
|
||||
void setDetailsCurrent(bool);
|
||||
void setDetailsStable(bool);
|
||||
void setDetailsArchived(bool);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<string>Install Rockbox</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item rowspan="8" row="0" column="0" >
|
||||
<item rowspan="6" row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
|
|
@ -29,27 +29,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3" >
|
||||
<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" >
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Please select the Rockbox version you want to install on your player:</string>
|
||||
|
|
@ -59,7 +39,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3" >
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>Version</string>
|
||||
|
|
@ -89,7 +69,7 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="3" >
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="title" >
|
||||
<string>Details</string>
|
||||
|
|
@ -118,7 +98,7 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<item row="3" column="1" >
|
||||
<widget class="QCheckBox" name="checkBoxCache" >
|
||||
<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>
|
||||
|
|
@ -128,7 +108,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2" >
|
||||
<item row="4" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
|
@ -141,7 +121,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="1" >
|
||||
<item row="5" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
|
@ -154,7 +134,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2" colspan="2" >
|
||||
<item row="5" column="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOk" >
|
||||
|
|
|
|||
|
|
@ -253,7 +253,6 @@ void RbUtilQt::install()
|
|||
else if(userSettings->value("defaults/proxytype") == "system")
|
||||
installWindow->setProxy(QUrl(getenv("http_proxy")));
|
||||
#endif
|
||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||
|
||||
buildInfo.open();
|
||||
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
||||
|
|
|
|||
|
|
@ -9,8 +9,11 @@
|
|||
<file>icons/dialog-information.png</file>
|
||||
<file>icons/dialog-warning.png</file>
|
||||
<file>icons/doom_btn.png</file>
|
||||
<file>icons/edit-find.png</file>
|
||||
<file>icons/font_btn.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/rbinstall_btn.png</file>
|
||||
<file>icons/rblogo.xpm</file>
|
||||
|
|
@ -24,5 +27,4 @@
|
|||
<qresource prefix="/ini" >
|
||||
<file>rbutil.ini</file>
|
||||
</qresource>
|
||||
<qresource prefix="/lang" />
|
||||
</RCC>
|
||||
|
|
|
|||
|
|
@ -119,6 +119,9 @@ p, li { white-space: pre-wrap; }
|
|||
<property name="text" >
|
||||
<string>&Change</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/edit-find.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue