diff options
Diffstat (limited to 'rbutil/rbutilqt/themesinstallwindow.cpp')
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index a112e6d748..8b525546b3 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "zipinstaller.h" | 24 | #include "zipinstaller.h" |
25 | #include "progressloggergui.h" | 25 | #include "progressloggergui.h" |
26 | #include "utils.h" | 26 | #include "utils.h" |
27 | #include "rbsettings.h" | ||
27 | 28 | ||
28 | ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) | 29 | ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) |
29 | { | 30 | { |
@@ -61,11 +62,11 @@ void ThemesInstallWindow::downloadInfo() | |||
61 | themesInfo.close(); | 62 | themesInfo.close(); |
62 | 63 | ||
63 | QUrl url; | 64 | QUrl url; |
64 | url = QUrl(settings->value(RbSettings::ThemesUrl).toString() + "/rbutilqt.php?target=" | 65 | url = QUrl(RbSettings::value(RbSettings::ThemesUrl).toString() + "/rbutilqt.php?target=" |
65 | + settings->value(RbSettings::CurConfigureModel).toString()); | 66 | + RbSettings::value(RbSettings::CurConfigureModel).toString()); |
66 | qDebug() << "downloadInfo()" << url; | 67 | qDebug() << "downloadInfo()" << url; |
67 | qDebug() << url.queryItems(); | 68 | qDebug() << url.queryItems(); |
68 | if(settings->value(RbSettings::CacheOffline).toBool()) | 69 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) |
69 | getter->setCache(true); | 70 | getter->setCache(true); |
70 | getter->setFile(&themesInfo); | 71 | getter->setFile(&themesInfo); |
71 | 72 | ||
@@ -144,7 +145,7 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
144 | // check if there's a themes "MOTD" available | 145 | // check if there's a themes "MOTD" available |
145 | if(iniDetails.contains("status/msg")) { | 146 | if(iniDetails.contains("status/msg")) { |
146 | // check if there's a localized msg available | 147 | // check if there's a localized msg available |
147 | QString lang = settings->value(RbSettings::Language).toString().split("_").at(0); | 148 | QString lang = RbSettings::value(RbSettings::Language).toString().split("_").at(0); |
148 | QString msg; | 149 | QString msg; |
149 | if(iniDetails.contains("status/msg." + lang)) | 150 | if(iniDetails.contains("status/msg." + lang)) |
150 | msg = iniDetails.value("status/msg." + lang).toString(); | 151 | msg = iniDetails.value("status/msg." + lang).toString(); |
@@ -191,9 +192,9 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p | |||
191 | iniDetails.beginGroup(cur->data(Qt::UserRole).toString()); | 192 | iniDetails.beginGroup(cur->data(Qt::UserRole).toString()); |
192 | 193 | ||
193 | QUrl img, txt; | 194 | QUrl img, txt; |
194 | txt = QUrl(QString(settings->value(RbSettings::ThemesUrl).toString() + "/" | 195 | txt = QUrl(QString(RbSettings::value(RbSettings::ThemesUrl).toString() + "/" |
195 | + iniDetails.value("descriptionfile").toString())); | 196 | + iniDetails.value("descriptionfile").toString())); |
196 | img = QUrl(QString(settings->value(RbSettings::ThemesUrl).toString() + "/" | 197 | img = QUrl(QString(RbSettings::value(RbSettings::ThemesUrl).toString() + "/" |
197 | + iniDetails.value("image").toString())); | 198 | + iniDetails.value("image").toString())); |
198 | 199 | ||
199 | QString text; | 200 | QString text; |
@@ -211,7 +212,7 @@ void ThemesInstallWindow::updateDetails(QListWidgetItem* cur, QListWidgetItem* p | |||
211 | iniDetails.endGroup(); | 212 | iniDetails.endGroup(); |
212 | 213 | ||
213 | igetter.abort(); | 214 | igetter.abort(); |
214 | if(!settings->value(RbSettings::CacheDisabled).toBool()) | 215 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
215 | igetter.setCache(true); | 216 | igetter.setCache(true); |
216 | else | 217 | else |
217 | { | 218 | { |
@@ -307,7 +308,7 @@ void ThemesInstallWindow::accept() | |||
307 | QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); | 308 | QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this); |
308 | for(int i = 0; i < ui.listThemes->selectedItems().size(); i++) { | 309 | for(int i = 0; i < ui.listThemes->selectedItems().size(); i++) { |
309 | iniDetails.beginGroup(ui.listThemes->selectedItems().at(i)->data(Qt::UserRole).toString()); | 310 | iniDetails.beginGroup(ui.listThemes->selectedItems().at(i)->data(Qt::UserRole).toString()); |
310 | zip = settings->value(RbSettings::ThemesUrl).toString() | 311 | zip = RbSettings::value(RbSettings::ThemesUrl).toString() |
311 | + "/" + iniDetails.value("archive").toString(); | 312 | + "/" + iniDetails.value("archive").toString(); |
312 | themes.append(zip); | 313 | themes.append(zip); |
313 | names.append("Theme: " + | 314 | names.append("Theme: " + |
@@ -321,7 +322,7 @@ void ThemesInstallWindow::accept() | |||
321 | 322 | ||
322 | logger = new ProgressLoggerGui(this); | 323 | logger = new ProgressLoggerGui(this); |
323 | logger->show(); | 324 | logger->show(); |
324 | QString mountPoint = settings->value(RbSettings::Mountpoint).toString(); | 325 | QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString(); |
325 | qDebug() << "mountpoint:" << mountPoint; | 326 | qDebug() << "mountpoint:" << mountPoint; |
326 | // show dialog with error if mount point is wrong | 327 | // show dialog with error if mount point is wrong |
327 | if(!QFileInfo(mountPoint).isDir()) { | 328 | if(!QFileInfo(mountPoint).isDir()) { |
@@ -335,7 +336,7 @@ void ThemesInstallWindow::accept() | |||
335 | installer->setLogSection(names); | 336 | installer->setLogSection(names); |
336 | installer->setLogVersion(version); | 337 | installer->setLogVersion(version); |
337 | installer->setMountPoint(mountPoint); | 338 | installer->setMountPoint(mountPoint); |
338 | if(!settings->value(RbSettings::CacheDisabled).toBool()) | 339 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
339 | installer->setCache(true); | 340 | installer->setCache(true); |
340 | 341 | ||
341 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 342 | connect(logger, SIGNAL(closed()), this, SLOT(close())); |