diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-08-02 22:27:51 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-08-02 22:27:51 +0000 |
commit | e4d0f0e6383bdf8f654177fd0036537de88cd021 (patch) | |
tree | 701fb2267d610c726272b58d7676b52c9b42061b /rbutil | |
parent | a12c591ac3bcd4670332d5fe3230f1edbe6c3310 (diff) |
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
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/configurefrm.ui | 12 | ||||
-rw-r--r-- | rbutil/rbutilqt/icons/edit-find.png | bin | 0 -> 617 bytes | |||
-rw-r--r-- | rbutil/rbutilqt/icons/network-idle.png | bin | 0 -> 393 bytes | |||
-rw-r--r-- | rbutil/rbutilqt/icons/preferences-desktop-locale.png | bin | 0 -> 567 bytes | |||
-rw-r--r-- | rbutil/rbutilqt/install.cpp | 38 | ||||
-rw-r--r-- | rbutil/rbutilqt/install.h | 3 | ||||
-rw-r--r-- | rbutil/rbutilqt/installfrm.ui | 36 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.qrc | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqtfrm.ui | 3 |
10 files changed, 30 insertions, 67 deletions
diff --git a/rbutil/rbutilqt/configurefrm.ui b/rbutil/rbutilqt/configurefrm.ui index da0a1c1574..006661ba08 100644 --- a/rbutil/rbutilqt/configurefrm.ui +++ b/rbutil/rbutilqt/configurefrm.ui @@ -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" /> diff --git a/rbutil/rbutilqt/icons/edit-find.png b/rbutil/rbutilqt/icons/edit-find.png Binary files differnew file mode 100644 index 0000000000..d072d3cbe2 --- /dev/null +++ b/rbutil/rbutilqt/icons/edit-find.png diff --git a/rbutil/rbutilqt/icons/network-idle.png b/rbutil/rbutilqt/icons/network-idle.png Binary files differnew file mode 100644 index 0000000000..0efee57e59 --- /dev/null +++ b/rbutil/rbutilqt/icons/network-idle.png diff --git a/rbutil/rbutilqt/icons/preferences-desktop-locale.png b/rbutil/rbutilqt/icons/preferences-desktop-locale.png Binary files differnew file mode 100644 index 0000000000..5b9e46112d --- /dev/null +++ b/rbutil/rbutilqt/icons/preferences-desktop-locale.png diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp index 2818d1af61..6a240f4807 100644 --- a/rbutil/rbutilqt/install.cpp +++ b/rbutil/rbutilqt/install.cpp @@ -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; @@ -147,7 +117,7 @@ void Install::accept() installer->setMountPoint(mountPoint); installer->install(logger); - connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool))); + connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool))); } diff --git a/rbutil/rbutilqt/install.h b/rbutil/rbutilqt/install.h index 002963f75a..ec60601e70 100644 --- a/rbutil/rbutilqt/install.h +++ b/rbutil/rbutilqt/install.h @@ -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); diff --git a/rbutil/rbutilqt/installfrm.ui b/rbutil/rbutilqt/installfrm.ui index 5edb5bb09c..2a2c99daa9 100644 --- a/rbutil/rbutilqt/installfrm.ui +++ b/rbutil/rbutilqt/installfrm.ui @@ -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" > diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 2e82b31335..d709b66acd 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -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); diff --git a/rbutil/rbutilqt/rbutilqt.qrc b/rbutil/rbutilqt/rbutilqt.qrc index 862d7df20c..e1ba2a2093 100644 --- a/rbutil/rbutilqt/rbutilqt.qrc +++ b/rbutil/rbutilqt/rbutilqt.qrc @@ -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> diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui index 0d4cf7f7fe..c8135de184 100644 --- a/rbutil/rbutilqt/rbutilqtfrm.ui +++ b/rbutil/rbutilqt/rbutilqtfrm.ui @@ -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> |