summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/installzipwindow.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-03 16:20:48 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-03 16:20:48 +0000
commitfbad89782d8418756416b406a8727c3842132309 (patch)
tree5d7751a23ca9a21d04bdaf60670e80442ca481bd /rbutil/rbutilqt/installzipwindow.cpp
parent33bceb2b975cdff678b9ff65b437e84ef59e0a81 (diff)
downloadrockbox-fbad89782d8418756416b406a8727c3842132309.tar.gz
rockbox-fbad89782d8418756416b406a8727c3842132309.zip
Remove zip installation window as it's not needed anymore. Use a simple confirmation dialog for installing fonts / game files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14159 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/installzipwindow.cpp')
-rw-r--r--rbutil/rbutilqt/installzipwindow.cpp126
1 files changed, 0 insertions, 126 deletions
diff --git a/rbutil/rbutilqt/installzipwindow.cpp b/rbutil/rbutilqt/installzipwindow.cpp
deleted file mode 100644
index 9e4381dce0..0000000000
--- a/rbutil/rbutilqt/installzipwindow.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- *
- * Copyright (C) 2007 by Dominik Wenger
- * $Id: installzipwindow.cpp 14027 2007-07-27 17:42:49Z domonoky $
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#include "installzipwindow.h"
-//#include "ui_installprogressfrm.h"
-
-
-InstallZipWindow::InstallZipWindow(QWidget *parent) : QDialog(parent)
-{
- ui.setupUi(this);
- connect(ui.buttonBrowse, SIGNAL(clicked()), this, SLOT(browseFolder()));
-}
-
-void InstallZipWindow::setProxy(QUrl proxy_url)
-{
- proxy = proxy_url;
- qDebug() << "Install::setProxy" << proxy;
-}
-
-void InstallZipWindow::setMountPoint(QString mount)
-{
- QFileInfo m(mount);
- if(m.isDir()) {
- ui.lineMountPoint->clear();
- ui.lineMountPoint->insert(mount);
- }
-}
-
-void InstallZipWindow::setUrl(QString path)
-{
- url = path;
-}
-
-void InstallZipWindow::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 InstallZipWindow::accept()
-{
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
-
- // 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 {
- logger->addItem(tr("Mount point is wrong!"),LOGERROR);
- logger->abort();
- return;
- }
-
- userSettings->sync();
-
- // create Zip installer
- installer = new ZipInstaller(this);
-
- QString fileName = url.section('/', -1);
- installer->setFilename(fileName);
- installer->setUrl(url);
- installer->setProxy(proxy);
- installer->setLogSection(logsection);
- installer->setMountPoint(mountPoint);
- installer->install(logger);
-
- connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
-
-
-}
-
-// we are done with Zip installing
-void InstallZipWindow::done(bool error)
-{
- qDebug() << "Install::done, error:" << error;
-
- if(error) // if there was an error
- {
- logger->abort();
- return;
- }
-
- // no error, close the window, when the logger is closed
- connect(logger,SIGNAL(closed()),this,SLOT(close()));
-}
-
-void InstallZipWindow::setDeviceSettings(QSettings *dev)
-{
- devices = dev;
- qDebug() << "Install::setDeviceSettings:" << devices;
-}
-
-void InstallZipWindow::setUserSettings(QSettings *user)
-{
- userSettings = user;
-}