summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-03-22 08:33:39 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-03-22 08:33:39 +0000
commitb9e07aded2357dbfca3e83ce5e86881135e454d0 (patch)
treed69b95a58c67d566a4e30e69a14c3c12d7dc3107 /rbutil
parente48cece75cc0ab3b0ebe970cb5603f8452931bd2 (diff)
Don't connect updateImage slot during update but statically. Fixes the slot getting an additional coonection upon each image update. Remove an unneeded function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20445 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/installthemes.cpp35
-rw-r--r--rbutil/rbutilqt/installthemes.h1
2 files changed, 18 insertions, 18 deletions
diff --git a/rbutil/rbutilqt/installthemes.cpp b/rbutil/rbutilqt/installthemes.cpp
index fe225b81b4..6e15ae0b51 100644
--- a/rbutil/rbutilqt/installthemes.cpp
+++ b/rbutil/rbutilqt/installthemes.cpp
@@ -35,6 +35,9 @@ ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent)
connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(close()));
connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(ui.listThemes, SIGNAL(currentRowChanged(int)),
+ this, SLOT(updateDetails(int)));
+ connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool)));
}
ThemesInstallWindow::~ThemesInstallWindow()
@@ -43,11 +46,6 @@ ThemesInstallWindow::~ThemesInstallWindow()
recRmdir(infocachedir);
}
-QString ThemesInstallWindow::resolution()
-{
- return settings->curResolution();
-}
-
void ThemesInstallWindow::downloadInfo()
{
@@ -60,13 +58,14 @@ void ThemesInstallWindow::downloadInfo()
themesInfo.close();
QUrl url;
- url = QUrl(settings->themeUrl() + "/rbutilqt.php?res=" + resolution());
+ url = QUrl(settings->themeUrl() + "/rbutilqt.php?res="
+ + settings->curResolution());
qDebug() << "downloadInfo()" << url;
qDebug() << url.queryItems();
if(settings->cacheOffline())
getter->setCache(true);
getter->setFile(&themesInfo);
-
+
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
connect(logger, SIGNAL(aborted()), getter, SLOT(abort()));
getter->getFile(url);
@@ -129,7 +128,6 @@ void ThemesInstallWindow::downloadDone(bool error)
iniDetails.endGroup();
}
- connect(ui.listThemes, SIGNAL(currentRowChanged(int)), this, SLOT(updateDetails(int)));
}
@@ -164,9 +162,12 @@ void ThemesInstallWindow::updateDetails(int row)
qDebug() << "img:" << img;
QString text;
- text = tr("<b>Author:</b> %1<hr/>").arg(iniDetails.value("author", tr("unknown")).toString());
- text += tr("<b>Version:</b> %1<hr/>").arg(iniDetails.value("version", tr("unknown")).toString());
- text += tr("<b>Description:</b> %1<hr/>").arg(iniDetails.value("about", tr("no description")).toString());
+ text = tr("<b>Author:</b> %1<hr/>").arg(iniDetails.value("author",
+ tr("unknown")).toString());
+ text += tr("<b>Version:</b> %1<hr/>").arg(iniDetails.value("version",
+ tr("unknown")).toString());
+ text += tr("<b>Description:</b> %1<hr/>").arg(iniDetails.value("about",
+ tr("no description")).toString());
ui.themeDescription->setHtml(text);
iniDetails.endGroup();
@@ -184,7 +185,7 @@ void ThemesInstallWindow::updateDetails(int row)
}
igetter.setCache(infocachedir);
}
- connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool)));
+
igetter.getFile(img);
}
@@ -234,8 +235,8 @@ void ThemesInstallWindow::show()
logger = new ProgressLoggerGui(this);
logger->show();
logger->addItem(tr("getting themes information ..."), LOGINFO);
-
- connect(logger, SIGNAL(aborted()), this, SLOT(close()));
+
+ connect(logger, SIGNAL(aborted()), this, SLOT(close()));
downloadInfo();
@@ -293,9 +294,9 @@ void ThemesInstallWindow::accept()
installer->setMountPoint(mountPoint);
if(!settings->cacheDisabled())
installer->setCache(true);
-
- connect(logger, SIGNAL(closed()), this, SLOT(close()));
+
+ connect(logger, SIGNAL(closed()), this, SLOT(close()));
installer->install(logger);
-
+
}
diff --git a/rbutil/rbutilqt/installthemes.h b/rbutil/rbutilqt/installthemes.h
index 036647f224..c20c17f738 100644
--- a/rbutil/rbutilqt/installthemes.h
+++ b/rbutil/rbutilqt/installthemes.h
@@ -51,7 +51,6 @@ class ThemesInstallWindow : public QDialog
HttpGet *getter;
HttpGet igetter;
QTemporaryFile themesInfo;
- QString resolution(void);
int currentItem;
void resizeEvent(QResizeEvent*);
QByteArray imgData;