summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-09-15 22:57:07 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-09-15 22:57:07 +0000
commit1464c9b5d03c105d985320083fd36788036a0dd6 (patch)
treeeaa039f5632d5d8eb5065fb81fe462a95031c149 /rbutil
parent76ea412d5f8ea786b60aaf773e44b997f36aaa01 (diff)
downloadrockbox-1464c9b5d03c105d985320083fd36788036a0dd6.tar.gz
rockbox-1464c9b5d03c105d985320083fd36788036a0dd6.tar.bz2
rockbox-1464c9b5d03c105d985320083fd36788036a0dd6.zip
Cosmetics: remove trailing spaces.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14723 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp12
-rw-r--r--rbutil/rbutilqt/autodetection.h6
-rw-r--r--rbutil/rbutilqt/browseof.cpp8
-rw-r--r--rbutil/rbutilqt/browseof.h4
-rw-r--r--rbutil/rbutilqt/configure.cpp26
-rw-r--r--rbutil/rbutilqt/configure.h4
-rw-r--r--rbutil/rbutilqt/install.cpp8
-rw-r--r--rbutil/rbutilqt/installbootloader.cpp364
-rw-r--r--rbutil/rbutilqt/installbootloader.h36
-rw-r--r--rbutil/rbutilqt/installtalkwindow.cpp24
-rw-r--r--rbutil/rbutilqt/installthemes.cpp12
-rw-r--r--rbutil/rbutilqt/installzip.cpp12
-rw-r--r--rbutil/rbutilqt/installzip.h22
-rw-r--r--rbutil/rbutilqt/preview.cpp14
-rw-r--r--rbutil/rbutilqt/preview.h16
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp76
-rw-r--r--rbutil/rbutilqt/rbutilqt.h14
-rw-r--r--rbutil/rbutilqt/talkfile.cpp22
-rw-r--r--rbutil/rbutilqt/talkfile.h8
-rw-r--r--rbutil/rbutilqt/uninstall.h26
-rw-r--r--rbutil/rbutilqt/uninstallwindow.cpp18
21 files changed, 366 insertions, 366 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index c16b6976cc..dc1bb72428 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -155,22 +155,22 @@ QStringList Autodetection::getMountpoints()
tempList << list.at(i).absolutePath();
}
return tempList;
-
+
#elif defined(Q_OS_MACX)
QDir dir("/Volumes");
- return dir.entryList();
+ return dir.entryList();
#elif defined(Q_OS_LINUX)
QStringList tempList;
FILE *mn = setmntent("/etc/mtab", "r");
if(!mn)
return QStringList("");
-
+
struct mntent *ent;
while((ent = getmntent(mn)))
tempList << QString(ent->mnt_dir);
endmntent(mn);
-
+
return tempList;
#else
#error Unknown Plattform
@@ -185,7 +185,7 @@ QString Autodetection::resolveMountPoint(QString device)
FILE *mn = setmntent("/etc/mtab", "r");
if(!mn)
return QString("");
-
+
struct mntent *ent;
while((ent = getmntent(mn))) {
if(QString(ent->mnt_fsname).startsWith(device)
@@ -221,7 +221,7 @@ bool Autodetection::detectUsb()
// the ini file needs to hold the IDs as hex values.
QMap<int, QString> usbids;
QMap<int, QString> usberror;
-
+
for(int i = 0; i < platforms.size(); i++) {
dev.beginGroup("platforms");
QString target = dev.value(platforms.at(i)).toString();
diff --git a/rbutil/rbutilqt/autodetection.h b/rbutil/rbutilqt/autodetection.h
index 85b69045ef..83eb3979fe 100644
--- a/rbutil/rbutilqt/autodetection.h
+++ b/rbutil/rbutilqt/autodetection.h
@@ -35,9 +35,9 @@ class Autodetection :public QObject
public:
Autodetection(QObject* parent=0);
-
+
bool detect();
-
+
QString getDevice() {return m_device;}
QString getMountPoint() {return m_mountpoint;}
QString errdev(void) { return m_errdev; }
@@ -46,7 +46,7 @@ private:
QStringList getMountpoints(void);
QString resolveMountPoint(QString);
bool detectUsb(void);
-
+
QString m_device;
QString m_mountpoint;
QString m_errdev;
diff --git a/rbutil/rbutilqt/browseof.cpp b/rbutil/rbutilqt/browseof.cpp
index 93b768c263..28cde9c6fe 100644
--- a/rbutil/rbutilqt/browseof.cpp
+++ b/rbutil/rbutilqt/browseof.cpp
@@ -27,25 +27,25 @@ BrowseOF::BrowseOF(QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
this->setModal(true);
-
+
connect(ui.browseOFButton,SIGNAL(clicked()),this,SLOT(onBrowse()));
}
void BrowseOF::setFile(QString file)
{
- ui.OFlineEdit->setText(file);
+ ui.OFlineEdit->setText(file);
}
void BrowseOF::onBrowse()
{
BrowseDirtree browser(this);
browser.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
-
+
if(QFileInfo(ui.OFlineEdit->text()).exists())
{
browser.setDir(ui.OFlineEdit->text());
}
-
+
if(browser.exec() == QDialog::Accepted)
{
qDebug() << browser.getSelected();
diff --git a/rbutil/rbutilqt/browseof.h b/rbutil/rbutilqt/browseof.h
index b76b3fb8b4..1e92023e99 100644
--- a/rbutil/rbutilqt/browseof.h
+++ b/rbutil/rbutilqt/browseof.h
@@ -31,11 +31,11 @@ class BrowseOF : public QDialog
BrowseOF(QWidget *parent = 0);
void setFile(QString file);
QString getFile();
-
+
private slots:
void onBrowse();
-
+
private:
Ui::BrowseOFFrm ui;
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 07947691e5..eaa68a2a1c 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -57,7 +57,7 @@ Config::Config(QWidget *parent) : QDialog(parent)
ui.listLanguages->setAlternatingRowColors(true);
this->setModal(true);
-
+
connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(abort()));
connect(ui.radioNoProxy, SIGNAL(toggled(bool)), this, SLOT(setNoProxy(bool)));
@@ -212,7 +212,7 @@ void Config::setDevices(QSettings *dev)
devices->beginGroup("platforms");
QStringList a = devices->childKeys();
devices->endGroup();
-
+
QMap <QString, QString> manuf;
QMap <QString, QString> devcs;
for(int it = 0; it < a.size(); it++) {
@@ -249,7 +249,7 @@ void Config::setDevices(QSettings *dev)
w->setFlags(Qt::ItemIsEnabled);
w->setText(0, brands.at(c));
items.append(w);
-
+
// go through platforms again for sake of order
for(int it = 0; it < a.size(); it++) {
QString curdev;
@@ -284,7 +284,7 @@ void Config::setDevices(QSettings *dev)
// tts / encoder tab
QStringList keys;
-
+
devices->beginGroup("encoders");
keys = devices->allKeys();
for(int i=0; i < keys.size();i++)
@@ -542,7 +542,7 @@ void Config::autodetect()
for(int a = 0; a < ui.treeDevices->topLevelItemCount(); a++)
ui.treeDevices->topLevelItem(a)->setExpanded(false);
//deselect the selected item(s)
- for(int a = 0; a < ui.treeDevices->selectedItems().size(); a++)
+ for(int a = 0; a < ui.treeDevices->selectedItems().size(); a++)
ui.treeDevices->selectedItems().at(a)->setSelected(false);
// find the new item
@@ -554,7 +554,7 @@ void Config::autodetect()
for(int j=0;j < itmList.at(i)->childCount();j++)
{
QString data = itmList.at(i)->child(j)->data(0, Qt::UserRole).toString();
-
+
if(devicename == data) // item found
{
itmList.at(i)->child(j)->setSelected(true); //select the item
@@ -578,7 +578,7 @@ void Config::autodetect()
QMessageBox::critical(this, tr("Fatal error"), text, QMessageBox::Ok);
return;
}
-
+
if(detector.getMountPoint() != "" )
{
ui.mountPoint->setText(detector.getMountPoint());
@@ -597,7 +597,7 @@ void Config::autodetect()
tr("Could not detect a device.\n"
"Select your device and Mountpoint manually."),
QMessageBox::Ok ,QMessageBox::Ok);
-
+
}
}
@@ -609,7 +609,7 @@ void Config::cacheClear()
"remove <b>all</b> files in this folder!").arg(ui.cachePath->text()),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return;
-
+
QString cache = ui.cachePath->text() + "/rbutil-cache/";
if(!QFileInfo(cache).isDir()) {
QMessageBox::critical(this, tr("Path wrong!"),
@@ -633,7 +633,7 @@ void Config::browseTts()
{
BrowseDirtree browser(this);
browser.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
-
+
if(QFileInfo(ui.ttsExecutable->text()).isDir())
{
browser.setDir(ui.ttsExecutable->text());
@@ -646,7 +646,7 @@ void Config::browseTts()
return;
ui.ttsExecutable->setText(exe);
}
-
+
}
@@ -654,7 +654,7 @@ void Config::browseEnc()
{
BrowseDirtree browser(this);
browser.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
-
+
if(QFileInfo(ui.encoderExecutable->text()).isDir())
{
browser.setDir(ui.encoderExecutable->text());
@@ -667,5 +667,5 @@ void Config::browseEnc()
return;
ui.encoderExecutable->setText(exe);
}
-
+
}
diff --git a/rbutil/rbutilqt/configure.h b/rbutil/rbutilqt/configure.h
index f0bb20f418..40ffb79fe7 100644
--- a/rbutil/rbutilqt/configure.h
+++ b/rbutil/rbutilqt/configure.h
@@ -49,10 +49,10 @@ class Config : public QDialog
QString language;
QString programPath;
QUrl proxy;
-
+
BrowseDirtree *browser;
BrowseDirtree *cbrowser;
-
+
private slots:
void setNoProxy(bool);
void setSystemProxy(bool);
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index f6e4509e38..fe5f6830f5 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -106,9 +106,9 @@ void Install::accept()
installer->setLogVersion(myversion);
installer->setMountPoint(mountPoint);
installer->install(logger);
-
+
connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
-
+
}
// Zip installer has finished
@@ -193,12 +193,12 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
// rel_rev release version revision id
// rel_date release version release date
// same for arch_* and bleed_*
-
+
if(version.value("arch_rev").isEmpty()) {
ui.radioArchived->setEnabled(false);
qDebug() << "no information about archived version available!";
}
-
+
if(!version.value("rel_rev").isEmpty()) {
ui.radioStable->setChecked(true);
ui.radioStable->setEnabled(true);
diff --git a/rbutil/rbutilqt/installbootloader.cpp b/rbutil/rbutilqt/installbootloader.cpp
index 5e743cb8dd..6265f519f9 100644
--- a/rbutil/rbutilqt/installbootloader.cpp
+++ b/rbutil/rbutilqt/installbootloader.cpp
@@ -16,13 +16,13 @@
* KIND, either express or implied.
*
****************************************************************************/
-
+
#include "installbootloader.h"
#include "irivertools/checksums.h"
-BootloaderInstaller::BootloaderInstaller(QObject* parent): QObject(parent)
+BootloaderInstaller::BootloaderInstaller(QObject* parent): QObject(parent)
{
-
+
}
void BootloaderInstaller::install(ProgressloggerInterface* dp)
@@ -31,50 +31,50 @@ void BootloaderInstaller::install(ProgressloggerInterface* dp)
m_install = true;
m_dp->addItem(tr("Starting bootloader installation"),LOGINFO);
connect(this, SIGNAL(done(bool)), this, SLOT(installEnded(bool)));
-
+
if(m_bootloadermethod == "gigabeatf")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(gigabeatPrepare()));
- connect(this,SIGNAL(finish()),this,SLOT(gigabeatFinish()));
+ connect(this,SIGNAL(prepare()),this,SLOT(gigabeatPrepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(gigabeatFinish()));
}
else if(m_bootloadermethod == "iaudio")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(iaudioPrepare()));
- connect(this,SIGNAL(finish()),this,SLOT(iaudioFinish()));
+ connect(this,SIGNAL(prepare()),this,SLOT(iaudioPrepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(iaudioFinish()));
}
else if(m_bootloadermethod == "h10")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(h10Prepare()));
- connect(this,SIGNAL(finish()),this,SLOT(h10Finish()));
+ connect(this,SIGNAL(prepare()),this,SLOT(h10Prepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(h10Finish()));
}
else if(m_bootloadermethod == "ipodpatcher")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(ipodPrepare()));
- connect(this,SIGNAL(finish()),this,SLOT(ipodFinish()));
- }
+ connect(this,SIGNAL(prepare()),this,SLOT(ipodPrepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(ipodFinish()));
+ }
else if(m_bootloadermethod == "sansapatcher")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
- connect(this,SIGNAL(finish()),this,SLOT(sansaFinish()));
- }
+ connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(sansaFinish()));
+ }
else if(m_bootloadermethod == "fwpatcher")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(iriverPrepare()));
- connect(this,SIGNAL(finish()),this,SLOT(iriverFinish()));
- }
+ connect(this,SIGNAL(prepare()),this,SLOT(iriverPrepare()));
+ connect(this,SIGNAL(finish()),this,SLOT(iriverFinish()));
+ }
else
{
m_dp->addItem(tr("unsupported install Method"),LOGERROR);
emit done(true);
return;
}
-
+
emit prepare();
}
@@ -84,38 +84,38 @@ void BootloaderInstaller::uninstall(ProgressloggerInterface* dp)
m_install = false;
m_dp->addItem(tr("Starting bootloader uninstallation"),LOGINFO);
connect(this, SIGNAL(done(bool)), this, SLOT(installEnded(bool)));
-
+
if(m_bootloadermethod == "gigabeatf")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(gigabeatPrepare()));
+ connect(this,SIGNAL(prepare()),this,SLOT(gigabeatPrepare()));
}
else if(m_bootloadermethod == "iaudio")
{
m_dp->addItem(tr("No uninstallation possible"),LOGWARNING);
emit done(true);
- return;
+ return;
}
else if(m_bootloadermethod == "iaudio")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(h10Prepare()));
+ connect(this,SIGNAL(prepare()),this,SLOT(h10Prepare()));
}
else if(m_bootloadermethod == "ipodpatcher")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(ipodPrepare()));
+ connect(this,SIGNAL(prepare()),this,SLOT(ipodPrepare()));
}
else if(m_bootloadermethod == "sansapatcher")
{
// connect internal signal
- connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
+ connect(this,SIGNAL(prepare()),this,SLOT(sansaPrepare()));
}
else if(m_bootloadermethod == "fwpatcher")
{
m_dp->addItem(tr("No uninstallation possible"),LOGWARNING);
emit done(true);
- return;
+ return;
}
else
{
@@ -123,7 +123,7 @@ void BootloaderInstaller::uninstall(ProgressloggerInterface* dp)
emit done(true);
return;
}
-
+
emit prepare();
}
@@ -138,9 +138,9 @@ void BootloaderInstaller::downloadRequestFinished(int id, bool error)
void BootloaderInstaller::downloadDone(bool error)
{
qDebug() << "Install::downloadDone, error:" << error;
-
+
// update progress bar
-
+
int max = m_dp->getProgressMax();
if(max == 0) {
max = 100;
@@ -160,9 +160,9 @@ void BootloaderInstaller::downloadDone(bool error)
return;
}
else m_dp->addItem(tr("Download finished."),LOGOK);
-
+
emit finish();
-
+
}
void BootloaderInstaller::updateDataReadProgress(int read, int total)
@@ -183,7 +183,7 @@ bool BootloaderInstaller::downloadInfo()
{
// try to get the current build information
infodownloader = new HttpGet(this);
-
+
connect(infodownloader, SIGNAL(done(bool)), this, SLOT(infoDownloadDone(bool)));
connect(infodownloader, SIGNAL(requestFinished(int, bool)), this, SLOT(infoRequestFinished(int, bool)));
@@ -192,7 +192,7 @@ bool BootloaderInstaller::downloadInfo()
qDebug() << "downloading bootloader info";
infodownloader->setFile(&bootloaderInfo);
infodownloader->getFile(QUrl(m_bootloaderinfoUrl));
-
+
// block until its downloaded
qDebug() << "Waiting for Download finished";
infoDownloaded=false;
@@ -204,27 +204,27 @@ bool BootloaderInstaller::downloadInfo()
void BootloaderInstaller::infoDownloadDone(bool error)
{
- if(error)
+ if(error)
{
qDebug() << "network error:" << infodownloader->error();
return;
}
qDebug() << "network status:" << infodownloader->error();
-
+
infoDownloaded = true;
}
void BootloaderInstaller::infoRequestFinished(int id, bool error)
{
-
+
if(error)
- {
+ {
QString errorString;
errorString = tr("Network error: %1. Please check your network and proxy settings.")
.arg(infodownloader->errorString());
if(error) QMessageBox::about(NULL, "Network Error", errorString);
qDebug() << "downloadDone:" << id << error;
-
+
infoError = true;
infoDownloaded = true;
}
@@ -241,7 +241,7 @@ void BootloaderInstaller::createInstallLog()
QSettings info(bootloaderInfo.fileName(), QSettings::IniFormat, this);
bootloaderInfo.close();
info.beginGroup(m_device);
-
+
installlog.beginGroup("Bootloader");
installlog.setValue("md5sum",info.value("md5sum").toString());
installlog.endGroup();
@@ -263,19 +263,19 @@ bool BootloaderInstaller::uptodate()
{
QString installedMd5;
QString serverMd5;
-
+
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
installlog.beginGroup("Bootloader");
installedMd5 = installlog.value("md5sum").toString();
installlog.endGroup();
-
+
bootloaderInfo.open();
QSettings info(bootloaderInfo.fileName(), QSettings::IniFormat, this);
bootloaderInfo.close();
info.beginGroup(m_device);
serverMd5 = info.value("md5sum").toString();
info.endGroup();
-
+
if(installedMd5 != serverMd5)
return false;
else
@@ -283,7 +283,7 @@ bool BootloaderInstaller::uptodate()
}
/**************************************************
-*** gigabeat secific code
+*** gigabeat secific code
***************************************************/
void BootloaderInstaller::gigabeatPrepare()
@@ -291,7 +291,7 @@ void BootloaderInstaller::gigabeatPrepare()
if(m_install) // Installation
{
QString url = m_bootloaderUrlBase + "/gigabeat/" + m_bootloadername;
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -307,75 +307,75 @@ void BootloaderInstaller::gigabeatPrepare()
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
}
else //UnInstallation
{
QString firmware = m_mountpoint + "/GBSYSTEM/FWIMG/FWIMG01.DAT";
QString firmwareOrig = firmware.append(".ORIG");
-
+
QFileInfo firmwareOrigFI(firmwareOrig);
-
+
// check if original firmware exists
if(!firmwareOrigFI.exists())
{
m_dp->addItem(tr("Could not find the Original Firmware at: %1")
.arg(firmwareOrig),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
QFile firmwareFile(firmware);
QFile firmwareOrigFile(firmwareOrig);
-
+
//remove modified firmware
if(!firmwareFile.remove())
{
m_dp->addItem(tr("Could not remove the Firmware at: %1")
.arg(firmware),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
//copy original firmware
- if(!firmwareOrigFile.copy(firmware))
+ if(!firmwareOrigFile.copy(firmware))
{
m_dp->addItem(tr("Could not copy the Firmware from: %1 to %2")
.arg(firmwareOrig,firmware),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
removeInstallLog();
-
+
emit done(false); //success
}
-
+
}
-void BootloaderInstaller::gigabeatFinish()
+void BootloaderInstaller::gigabeatFinish()
{
// this step is only need for installation, so no code for uninstall here
m_dp->addItem(tr("Finishing bootloader install"),LOGINFO);
QString firmware = m_mountpoint + "/GBSYSTEM/FWIMG/" + m_bootloadername;
-
+
QFileInfo firmwareFI(firmware);
-
+
// check if firmware exists
if(!firmwareFI.exists())
{
m_dp->addItem(tr("Could not find the Firmware at: %1")
.arg(firmware),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
QString firmwareOrig = firmware;
firmwareOrig.append(".ORIG");
QFileInfo firmwareOrigFI(firmwareOrig);
-
+
// rename the firmware, if there is no original firmware there
if(!firmwareOrigFI.exists())
{
@@ -393,7 +393,7 @@ void BootloaderInstaller::gigabeatFinish()
QFile firmwareFile(firmware);
firmwareFile.remove();
}
-
+
//copy the firmware
if(!downloadFile.copy(firmware))
{
@@ -402,11 +402,11 @@ void BootloaderInstaller::gigabeatFinish()
emit done(true);
return;
}
-
+
downloadFile.remove();
createInstallLog();
-
+
m_dp->addItem(tr("Bootloader install finished successfully."),LOGOK);
m_dp->addItem(tr("To finish the Bootloader installation, follow the steps below."),LOGINFO);
m_dp->addItem(tr("1. Eject/Unmount your Device."),LOGINFO);
@@ -414,22 +414,22 @@ void BootloaderInstaller::gigabeatFinish()
m_dp->addItem(tr("3. Hold POWER to turn the Device off."),LOGINFO);
m_dp->addItem(tr("4. Toggle the Battery switch on the Device."),LOGINFO);
m_dp->addItem(tr("5. Hold POWER to boot the Rockbox bootloader."),LOGINFO);
-
-
+
+
m_dp->abort();
-
+
emit done(false); // success
}
/**************************************************
-*** iaudio secific code
+*** iaudio secific code
***************************************************/
void BootloaderInstaller::iaudioPrepare()
{
QString url = m_bootloaderUrlBase + "/iaudio/" + m_bootloadername;
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -444,14 +444,14 @@ void BootloaderInstaller::iaudioPrepare()
getter->getFile(QUrl(url));
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
- connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
-}
+ connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+}
void BootloaderInstaller::iaudioFinish()
{
QString firmware = m_mountpoint + "/FIRMWARE/" + m_bootloadername;
-
+
//copy the firmware
if(!downloadFile.copy(firmware))
{
@@ -460,33 +460,33 @@ void BootloaderInstaller::iaudioFinish()
emit done(true);
return;
}
-
+
downloadFile.remove();
createInstallLog();
-
+
m_dp->addItem(tr("Bootloader install finished successfully."),LOGOK);
m_dp->addItem(tr("To finish the Bootloader installation, follow the steps below."),LOGINFO);
m_dp->addItem(tr("1. Eject/Unmount your Device."),LOGINFO);
m_dp->addItem(tr("2. Turn you Device OFF."),LOGINFO);
m_dp->addItem(tr("3. Insert Charger."),LOGINFO);
-
+
m_dp->abort();
-
+
emit done(false); // success
-
-}
+
+}
/**************************************************
-*** h10 secific code
+*** h10 secific code
***************************************************/
void BootloaderInstaller::h10Prepare()
{
if(m_install) // Installation
{
QString url = m_bootloaderUrlBase + "/iriver/" + m_bootloadername;
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -501,17 +501,17 @@ void BootloaderInstaller::h10Prepare()
getter->getFile(QUrl(url));
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
- connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+ connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
}
else // Uninstallation
{
-
+
QString firmwarename = m_bootloadername.section('/', -1);
QString firmware = m_mountpoint + "/SYSTEM/" + firmwarename;
QString firmwareOrig = m_mountpoint + "/SYSTEM/Original.mi4";
-
+
QFileInfo firmwareFI(firmware);
if(!firmwareFI.exists()) //Firmware dosent exists on player
{
@@ -525,7 +525,7 @@ void BootloaderInstaller::h10Prepare()
return;
}
}
-
+
QFileInfo firmwareOrigFI(firmwareOrig);
if(!firmwareOrigFI.exists()) //Original Firmware dosent exists on player
{
@@ -534,32 +534,32 @@ void BootloaderInstaller::h10Prepare()
emit done(true);
return;
}
-
+
QFile firmwareFile(firmware);
QFile firmwareOrigFile(firmwareOrig);
-
+
//remove modified firmware
if(!firmwareFile.remove())
{
m_dp->addItem(tr("Could not remove the Firmware at: %1")
.arg(firmware),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
//copy original firmware
- if(!firmwareOrigFile.copy(firmware))
+ if(!firmwareOrigFile.copy(firmware))
{
m_dp->addItem(tr("Could not copy the Firmware from: %1 to %2")
.arg(firmwareOrig,firmware),LOGERROR);
emit done(true);
- return;
+ return;
}
-
+
removeInstallLog();
-
+
emit done(false); //success
-
+
}
}
@@ -569,9 +569,9 @@ void BootloaderInstaller::h10Finish()
QString firmware = m_mountpoint + "/SYSTEM/" + firmwarename;
QString firmwareOrig = m_mountpoint + "/SYSTEM/Original.mi4";
-
+
QFileInfo firmwareFI(firmware);
-
+
if(!firmwareFI.exists()) //Firmware dosent exists on player
{
firmware = m_mountpoint + "/SYSTEM/H10EMP.mi4"; //attempt other firmwarename
@@ -584,9 +584,9 @@ void BootloaderInstaller::h10Finish()
return;
}
}
-
+
QFileInfo firmwareOrigFI(firmwareOrig);
-
+
if(!firmwareOrigFI.exists()) //there is already a original firmware
{
QFile firmwareFile(firmware);
@@ -611,20 +611,20 @@ void BootloaderInstaller::h10Finish()
emit done(true);
return;
}
-
+
downloadFile.remove();
-
+
createInstallLog();
-
+
m_dp->addItem(tr("Bootloader install finished successfully."),LOGOK);
m_dp->abort();
-
+
emit done(false); // success
}
/**************************************************
-*** ipod secific code
+*** ipod secific code
***************************************************/
int verbose =0;
// reserves memory for ipodpatcher
@@ -651,12 +651,12 @@ void BootloaderInstaller::ipodPrepare()
m_dp->addItem(tr("Too many Ipods found"),LOGERROR);
emit done(true);
}
-
+
if(m_install) // Installation
{
-
+
QString url = m_bootloaderUrlBase + "/ipod/bootloader-" + m_bootloadername + ".ipod";
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -671,8 +671,8 @@ void BootloaderInstaller::ipodPrepare()
getter->getFile(QUrl(url));
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
- connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+ connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
}
else // Uninstallation
{
@@ -693,13 +693,13 @@ void BootloaderInstaller::ipodPrepare()
if (ipod.pinfo[0].start==0)
{
m_dp->addItem(tr("No partition 0 on disk"),LOGERROR);
-
+
int i;
double sectors_per_MB = (1024.0*1024.0)/ipod.sector_size;
m_dp->addItem(tr("[INFO] Part Start Sector End Sector Size (MB) Type\n"),LOGINFO);
- for ( i = 0; i < 4; i++ )
+ for ( i = 0; i < 4; i++ )
{
- if (ipod.pinfo[i].start != 0)
+ if (ipod.pinfo[i].start != 0)
{
m_dp->addItem(tr("[INFO] %1 %2 %3 %4 %5 (%6)").arg(
i).arg(
@@ -734,43 +734,43 @@ void BootloaderInstaller::ipodPrepare()
{
m_dp->addItem(tr("Warning this is a MacPod, Rockbox doesnt work on this. Convert it to WinPod"),LOGWARNING);
}
-
- if (ipod_reopen_rw(&ipod) < 0)
+
+ if (ipod_reopen_rw(&ipod) < 0)
{
m_dp->addItem(tr("Could not open Ipod in RW mode"),LOGERROR);
emit done(true);
return;
}
-
+
if (ipod.ipod_directory[0].entryOffset==0) {
m_dp->addItem(tr("No bootloader detected."),LOGERROR);
emit done(true);
return;
}
-
- if (delete_bootloader(&ipod)==0)
+
+ if (delete_bootloader(&ipod)==0)
{
m_dp->addItem(tr("Successfully removed Bootloader"),LOGOK);
removeInstallLog();
emit done(false);
ipod_close(&ipod);
- return;
+ return;
}
- else
+ else
{
m_dp->addItem(tr("--delete-bootloader failed."),LOGERROR);
emit done(true);
ipod_close(&ipod);
- return;
- }
- }
+ return;
+ }
+ }
}
void BootloaderInstaller::ipodFinish()
{
struct ipod_t ipod;
ipod_scan(&ipod);
-
+
if (ipod_open(&ipod, 0) < 0)
{
m_dp->addItem(tr("could not open ipod"),LOGERROR);
@@ -788,15 +788,15 @@ void BootloaderInstaller::ipodFinish()
if (ipod.pinfo[0].start==0)
{
m_dp->addItem(tr("No partition 0 on disk"),LOGERROR);
-
+
int i;
double sectors_per_MB = (1024.0*1024.0)/ipod.sector_size;
m_dp->addItem(tr("[INFO] Part Start Sector End Sector Size (MB) Type\n"),LOGINFO);
-
- for ( i = 0; i < 4; i++ )
+
+ for ( i = 0; i < 4; i++ )
{
- if (ipod.pinfo[i].start != 0)
+ if (ipod.pinfo[i].start != 0)
{
m_dp->addItem(tr("[INFO] %1 %2 %3 %4 %5 (%6)").arg(
i).arg(
@@ -832,32 +832,32 @@ void BootloaderInstaller::ipodFinish()
m_dp->addItem(tr("Warning this is a MacPod, Rockbox doesnt work on this. Convert it to WinPod"),LOGWARNING);
}
- if (ipod_reopen_rw(&ipod) < 0)
+ if (ipod_reopen_rw(&ipod) < 0)
{
m_dp->addItem(tr("Could not open Ipod in RW mode"),LOGERROR);
emit done(true);
return;
}
- if (add_bootloader(&ipod, m_tempfilename.toLatin1().data(), FILETYPE_DOT_IPOD)==0)
+ if (add_bootloader(&ipod, m_tempfilename.toLatin1().data(), FILETYPE_DOT_IPOD)==0)
{
m_dp->addItem(tr("Successfully added Bootloader"),LOGOK);
createInstallLog();
emit done(false);
ipod_close(&ipod);
- return;
+ return;
}
- else
+ else
{
m_dp->addItem(tr("failed to add Bootloader"),LOGERROR);
ipod_close(&ipod);
emit done(true);
- return;
- }
+ return;
+ }
}
/**************************************************
-*** sansa secific code
+*** sansa secific code
***************************************************/
// reserves memory for sansapatcher
bool initSansapatcher()
@@ -884,11 +884,11 @@ void BootloaderInstaller::sansaPrepare()
m_dp->addItem(tr("Too many Sansas found"),LOGERROR);
emit done(true);
}
-
+
if(m_install) // Installation
{
QString url = m_bootloaderUrlBase + "/sandisk-sansa/e200/" + m_bootloadername;
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -903,19 +903,19 @@ void BootloaderInstaller::sansaPrepare()
getter->getFile(QUrl(url));
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
- connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+ connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
}
else // Uninstallation
{
-
+
if (sansa_open(&sansa, 0) < 0)
{
m_dp->addItem(tr("could not open Sansa"),LOGERROR);
emit done(true);
return;
}
-
+
if (sansa_read_partinfo(&sansa,0) < 0)
{
m_dp->addItem(tr("could not read partitiontable"),LOGERROR);
@@ -941,45 +941,45 @@ void BootloaderInstaller::sansaPrepare()
emit done(true);
return;
}
-
- if (sansa_reopen_rw(&sansa) < 0)
+
+ if (sansa_reopen_rw(&sansa) < 0)
{
m_dp->addItem(tr("Could not open Sansa in RW mode"),LOGERROR);
emit done(true);
return;
}
-
- if (sansa_delete_bootloader(&sansa)==0)
+
+ if (sansa_delete_bootloader(&sansa)==0)
{
m_dp->addItem(tr("Successfully removed Bootloader"),LOGOK);
removeInstallLog();
emit done(false);
sansa_close(&sansa);
- return;
+ return;
}
- else
+ else
{
m_dp->addItem(tr("--delete-bootloader failed."),LOGERROR);
emit done(true);
sansa_close(&sansa);
- return;
- }
- }
+ return;
+ }
+ }
}
void BootloaderInstaller::sansaFinish()
{
struct sansa_t sansa;
sansa_scan(&sansa);
-
+
if (sansa_open(&sansa, 0) < 0)
{
m_dp->addItem(tr("could not open Sansa"),LOGERROR);
emit done(true);
return;
}
-
+
if (sansa_read_partinfo(&sansa,0) < 0)
{
m_dp->addItem(tr("could not read partitiontable"),LOGERROR);
@@ -990,7 +990,7 @@ void BootloaderInstaller::sansaFinish()
int i = is_e200(&sansa);
if (i < 0) {
-
+
m_dp->addItem(tr("Disk is not an E200 (%1), aborting.").arg(i),LOGERROR);
emit done(true);
return;
@@ -1008,33 +1008,33 @@ void BootloaderInstaller::sansaFinish()
return;
}
- if (sansa_reopen_rw(&sansa) < 0)
+ if (sansa_reopen_rw(&sansa) < 0)
{
m_dp->addItem(tr("Could not open Sansa in RW mode"),LOGERROR);
emit done(true);
return;
}
- if (sansa_add_bootloader(&sansa, m_tempfilename.toLatin1().data(), FILETYPE_MI4)==0)
+ if (sansa_add_bootloader(&sansa, m_tempfilename.toLatin1().data(), FILETYPE_MI4)==0)
{
m_dp->addItem(tr("Successfully added Bootloader"),LOGOK);
createInstallLog();
emit done(false);
sansa_close(&sansa);
- return;
+ return;
}
- else
+ else
{
m_dp->addItem(tr("failed to add Bootloader"),LOGERROR);
sansa_close(&sansa);
emit done(true);
- return;
- }
+ return;
+ }
}
/**************************************************
-*** iriver /fwpatcher secific code
+*** iriver /fwpatcher secific code
***************************************************/
void BootloaderInstaller::iriverPrepare()
@@ -1045,7 +1045,7 @@ void BootloaderInstaller::iriverPrepare()
emit done(true);
return;
}
-
+
/* Check firmware against md5sums in h120sums and h100sums */
series = 0;
table_entry = intable(md5sum_str, &h120pairs[0],
@@ -1053,15 +1053,15 @@ void BootloaderInstaller::iriverPrepare()
if (table_entry >= 0) {
series = 120;
}
- else
+ else
{
table_entry = intable(md5sum_str, &h100pairs[0],
sizeof(h100pairs)/sizeof(struct sumpairs));
- if (table_entry >= 0)
+ if (table_entry >= 0)
{
series = 100;
}
- else
+ else
{
table_entry = intable(md5sum_str, &h300pairs[0],
sizeof(h300pairs)/sizeof(struct sumpairs));
@@ -1075,9 +1075,9 @@ void BootloaderInstaller::iriverPrepare()
emit done(true);
return;
}
-
+
QString url = m_bootloaderUrlBase + "/iriver/" + m_bootloadername;
-
+
m_dp->addItem(tr("Downloading file %1.%2")
.arg(QFileInfo(url).baseName(), QFileInfo(url).completeSuffix()),LOGINFO);
@@ -1092,8 +1092,8 @@ void BootloaderInstaller::iriverPrepare()
getter->getFile(QUrl(url));
// connect signals from HttpGet
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
- connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
- connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
+ connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
+ connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
}
void BootloaderInstaller::iriverFinish()
@@ -1118,7 +1118,7 @@ void BootloaderInstaller::iriverFinish()
origin = 0x3f0000;
break;
}
-
+
// temporary files needs to be opened to get the filename
QTemporaryFile firmwareBin, newBin, newHex;
firmwareBin.open();
@@ -1130,9 +1130,9 @@ void BootloaderInstaller::iriverFinish()
firmwareBin.close();
newBin.close();
newHex.close();
-
+
// iriver decode
- if (iriver_decode(m_origfirmware, firmwareBinName, FALSE, STRIP_NONE,m_dp) == -1)
+ if (iriver_decode(m_origfirmware, firmwareBinName, FALSE, STRIP_NONE,m_dp) == -1)
{
m_dp->addItem(tr("Error in descramble"),LOGERROR);
firmwareBin.remove();
@@ -1142,7 +1142,7 @@ void BootloaderInstaller::iriverFinish()
return;
}
// mkboot
- if (!mkboot(firmwareBinName, newBinName, m_tempfilename, origin,m_dp))
+ if (!mkboot(firmwareBinName, newBinName, m_tempfilename, origin,m_dp))
{
m_dp->addItem(tr("Error in patching"),LOGERROR);
firmwareBin.remove();
@@ -1152,7 +1152,7 @@ void BootloaderInstaller::iriverFinish()
return;
}
// iriver_encode
- if (iriver_encode(newBinName, newHexName, FALSE,m_dp) == -1)
+ if (iriver_encode(newBinName, newHexName, FALSE,m_dp) == -1)
{
m_dp->addItem(tr("Error in scramble"),LOGERROR);
firmwareBin.remove();
@@ -1161,9 +1161,9 @@ void BootloaderInstaller::iriverFinish()
emit done(true);
return;
}
-
+
/* now md5sum it */
- if (!FileMD5(newHexName, md5sum_str))
+ if (!FileMD5(newHexName, md5sum_str))
{
m_dp->addItem(tr("Error in checksumming"),LOGERROR);
firmwareBin.remove();
@@ -1177,7 +1177,7 @@ void BootloaderInstaller::iriverFinish()
firmwareBin.remove();
newBin.remove();
}
-
+
// Load patched Firmware to player
QString dest;
if(series == 100)
@@ -1186,7 +1186,7 @@ void BootloaderInstaller::iriverFinish()
dest = m_mountpoint + "/ihp_120.hex";
else if(series == 300)
dest = m_mountpoint + "/H300.hex";
-
+
// copy file
QFile destfile(dest);
if(destfile.exists()) destfile.remove();
@@ -1197,12 +1197,12 @@ void BootloaderInstaller::iriverFinish()
emit done(true);
return;
}
-
+
downloadFile.remove();
newHex.remove();
createInstallLog();
-
+
m_dp->addItem(tr("Bootloader install finished successfully."),LOGOK);
m_dp->addItem(tr("To finish the Bootloader installation, follow the steps below."),LOGINFO);
m_dp->addItem(tr("1. Eject/Unmount your Device."),LOGINFO);
@@ -1210,7 +1210,7 @@ void BootloaderInstaller::iriverFinish()
m_dp->addItem(tr("3. Use the Firmware flash option in the Original Firmware."),LOGINFO);
m_dp->addItem(tr("4. Reboot."),LOGINFO);
m_dp->abort();
-
+
emit done(false); // success
diff --git a/rbutil/rbutilqt/installbootloader.h b/rbutil/rbutilqt/installbootloader.h
index 496389e9dc..03b715c15e 100644
--- a/rbutil/rbutilqt/installbootloader.h
+++ b/rbutil/rbutilqt/installbootloader.h
@@ -16,7 +16,7 @@
* KIND, either express or implied.
*
****************************************************************************/
-
+
#ifndef INSTALLBOOTLOADER_H
#define INSTALLBOOTLOADER_H
@@ -38,14 +38,14 @@ bool initSansapatcher();
class BootloaderInstaller : public QObject
{
Q_OBJECT
-
+
public:
BootloaderInstaller(QObject* parent);
~BootloaderInstaller() {}
void install(ProgressloggerInterface* dp);
void uninstall(ProgressloggerInterface* dp);
-
+
void setMountPoint(QString mountpoint) {m_mountpoint = mountpoint;}
void setProxy(QUrl proxy) {m_proxy= proxy;}
void setDevice(QString device) {m_device= device;} //!< the current plattform
@@ -56,14 +56,14 @@ public:
void setBootloaderInfoUrl(QString url) {m_bootloaderinfoUrl =url; } //!< the url for the info file
bool downloadInfo(); //!< should be called before install/uninstall, blocks until downloaded.
bool uptodate(); //!< returns wether the bootloader is uptodate
-
+
signals:
void done(bool error); //installation finished.
-
+
signals: // internal signals. Dont use this from out side.
void prepare();
- void finish();
-
+ void finish();
+
private slots:
void createInstallLog(); // adds the bootloader entry to the log
void removeInstallLog(); // removes the bootloader entry from the log
@@ -74,23 +74,23 @@ private slots:
void infoDownloadDone(bool);
void infoRequestFinished(int, bool);
void installEnded(bool);
-
+
// gigabeat specific routines
void gigabeatPrepare();
void gigabeatFinish();
-
+
//iaudio specific routines
void iaudioPrepare();
void iaudioFinish();
-
+
//h10 specific routines
void h10Prepare();
void h10Finish();
-
+
//ipod specific routines
void ipodPrepare();
void ipodFinish();
-
+
//sansa specific routines
void sansaPrepare();
void sansaFinish();
@@ -98,25 +98,25 @@ private slots:
//iriver specific routines
void iriverPrepare();
void iriverFinish();
-
+
private:
-
+
HttpGet *infodownloader;
QTemporaryFile bootloaderInfo;
volatile bool infoDownloaded;
volatile bool infoError;
-
+
QString m_mountpoint, m_device,m_bootloadermethod,m_bootloadername;
QString m_bootloaderUrlBase,m_tempfilename,m_origfirmware;
QUrl m_proxy;
QString m_bootloaderinfoUrl;
bool m_install;
-
+
int series,table_entry; // for fwpatcher
-
+
HttpGet *getter;
QTemporaryFile downloadFile;
-
+
ProgressloggerInterface* m_dp;
};
diff --git a/rbutil/rbutilqt/installtalkwindow.cpp b/rbutil/rbutilqt/installtalkwindow.cpp
index f273721437..4324f693a9 100644
--- a/rbutil/rbutilqt/installtalkwindow.cpp
+++ b/rbutil/rbutilqt/installtalkwindow.cpp
@@ -26,7 +26,7 @@ InstallTalkWindow::InstallTalkWindow(QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
talkcreator = new TalkFileCreator(this);
-
+
connect(ui.buttonBrowse, SIGNAL(clicked()), this, SLOT(browseFolder()));
ui.OverwriteWav->setChecked(true);
@@ -40,7 +40,7 @@ void InstallTalkWindow::browseFolder()
{
BrowseDirtree browser(this);
browser.setFilter(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);
-
+
if(QFileInfo(ui.lineTalkFolder->text()).isDir())
{
browser.setDir(ui.lineTalkFolder->text());
@@ -67,7 +67,7 @@ void InstallTalkWindow::accept()
logger = new ProgressLoggerGui(this);
logger->show();
connect(logger,SIGNAL(closed()),this,SLOT(close()));
-
+
QString folderToTalk = ui.lineTalkFolder->text();
QString pathEncoder = userSettings->value("encbin").toString();
QString pathTTS = userSettings->value("ttsbin").toString();
@@ -78,23 +78,23 @@ void InstallTalkWindow::accept()
logger->abort();
return;
}
-
+
if(!QFileInfo(pathEncoder).isExecutable())
{
logger->addItem(tr("Path to Encoder is wrong!"),LOGERROR);
logger->abort();
return;
}
-
+
if(!QFileInfo(pathTTS).isExecutable())
{
logger->addItem(tr("Path to TTS is wrong!"),LOGERROR);
logger->abort();
return;
}
-
+
userSettings->setValue("last_talked_folder", folderToTalk);
-
+
userSettings->sync();
talkcreator->setDir(folderToTalk);
@@ -102,7 +102,7 @@ void InstallTalkWindow::accept()
talkcreator->setEncexe(pathEncoder);
talkcreator->setEncOpts(userSettings->value("encopts").toString());
talkcreator->setTTsOpts(userSettings->value("ttsopts").toString());
-
+
devices->beginGroup(userSettings->value("ttspreset").toString());
talkcreator->setTTsType(devices->value("tts").toString());
talkcreator->setTTsOpts(devices->value("options").toString());
@@ -113,7 +113,7 @@ void InstallTalkWindow::accept()
talkcreator->setEncOpts(devices->value("options").toString());
talkcreator->setEncTemplate(devices->value("template").toString());
devices->endGroup();
-
+
talkcreator->setOverwriteTalk(ui.OverwriteTalk->isChecked());
talkcreator->setOverwriteWav(ui.OverwriteWav->isChecked());
talkcreator->setRemoveWav(ui.RemoveWav->isChecked());
@@ -128,7 +128,7 @@ void InstallTalkWindow::setDeviceSettings(QSettings *dev)
{
devices = dev;
qDebug() << "Install::setDeviceSettings:" << devices;
-
+
QString profile;
profile = userSettings->value("ttspreset", "none").toString();
@@ -151,9 +151,9 @@ void InstallTalkWindow::setDeviceSettings(QSettings *dev)
void InstallTalkWindow::setUserSettings(QSettings *user)
{
userSettings = user;
-
+
talkcreator->setMountPoint(userSettings->value("mountpoint").toString());
-
+
setTalkFolder(userSettings->value("last_talked_folder").toString());
}
diff --git a/rbutil/rbutilqt/installthemes.cpp b/rbutil/rbutilqt/installthemes.cpp
index 9c98ede32a..cf04280654 100644
--- a/rbutil/rbutilqt/installthemes.cpp
+++ b/rbutil/rbutilqt/installthemes.cpp
@@ -153,7 +153,7 @@ void ThemesInstallWindow::downloadDone(bool error)
void ThemesInstallWindow::updateDetails(int row)
{
if(row == currentItem) return;
-
+
currentItem = row;
qDebug() << "updateDetails(int) =" << row;
QSettings iniDetails(themesInfo.fileName(), QSettings::IniFormat, this);
@@ -161,7 +161,7 @@ void ThemesInstallWindow::updateDetails(int row)
.arg(ui.listThemes->item(row)->data(Qt::DisplayRole).toString()));
ui.themePreview->clear();
ui.themePreview->setText(tr("fetching preview ..."));
-
+
int size = 0;
iniDetails.beginGroup(ui.listThemes->item(row)->data(Qt::UserRole).toString());
@@ -184,7 +184,7 @@ void ThemesInstallWindow::updateDetails(int row)
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();
@@ -211,7 +211,7 @@ void ThemesInstallWindow::updateImage(bool error)
{
qDebug() << "updateImage(bool) =" << error;
if(error) return;
-
+
QPixmap p;
if(!error) {
imgData = igetter.readAll();
@@ -221,7 +221,7 @@ void ThemesInstallWindow::updateImage(bool error)
ui.themePreview->clear();
ui.themePreview->setText(tr("no theme preview"));
}
- else
+ else
ui.themePreview->setPixmap(p);
}
}
@@ -302,7 +302,7 @@ void ThemesInstallWindow::accept()
iniDetails.endGroup();
}
qDebug() << "installing themes:" << themes;
-
+
logger = new ProgressLoggerGui(this);
logger->show();
QString mountPoint = userSettings->value("mountpoint").toString();
diff --git a/rbutil/rbutilqt/installzip.cpp b/rbutil/rbutilqt/installzip.cpp
index 68bbdc02a9..41f88171c5 100644
--- a/rbutil/rbutilqt/installzip.cpp
+++ b/rbutil/rbutilqt/installzip.cpp
@@ -16,13 +16,13 @@
* KIND, either express or implied.
*
****************************************************************************/
-
+
#include "installzip.h"
#include "zip/zip.h"
#include "zip/unzip.h"
-ZipInstaller::ZipInstaller(QObject* parent): QObject(parent)
+ZipInstaller::ZipInstaller(QObject* parent): QObject(parent)
{
m_unzip = true;
m_cache = "";
@@ -46,7 +46,7 @@ void ZipInstaller::install(ProgressloggerInterface *dp)
void ZipInstaller::installContinue()
{
qDebug() << "installContinue()";
-
+
runner++; // this gets called when a install finished, so increase first.
qDebug() << "runner is now at" << runner << "size is" << m_urllist.size();
if(runner < m_urllist.size()) {
@@ -115,7 +115,7 @@ void ZipInstaller::downloadDone(bool error)
qDebug() << "Install::downloadDone, error:" << error;
QStringList zipContents; // needed later
// update progress bar
-
+
int max = m_dp->getProgressMax();
if(max == 0) {
max = 100;
@@ -155,7 +155,7 @@ void ZipInstaller::downloadDone(bool error)
emit done(false);
return;
}
-
+
ec = uz.extractAll(m_mountpoint);
if(ec != UnZip::Ok) {
m_dp->addItem(tr("Extracting failed: %1.")
@@ -185,7 +185,7 @@ void ZipInstaller::downloadDone(bool error)
emit done(false);
return;
}
-
+
// add file to log
zipContents.append( m_target);
}
diff --git a/rbutil/rbutilqt/installzip.h b/rbutil/rbutilqt/installzip.h
index 629445d28f..9becbb1b8e 100644
--- a/rbutil/rbutilqt/installzip.h
+++ b/rbutil/rbutilqt/installzip.h
@@ -16,11 +16,11 @@
* KIND, either express or implied.
*
****************************************************************************/
-
-
+
+
#ifndef INSTALLZIP_H
#define INSTALLZIP_H
-
+
#include <QtGui>
@@ -28,9 +28,9 @@
#include "progressloggerinterface.h"
#include "httpget.h"
-
+
class ZipInstaller : public QObject
-{
+{
Q_OBJECT
public:
ZipInstaller(QObject* parent) ;
@@ -48,11 +48,11 @@ public:
void setTarget(QString t) { m_target = t; }
void setCache(QDir c) { m_cache = c; };
void setCache(QString c) { m_cache = QDir(c);}
-
+
signals:
void done(bool error);
void cont();
-
+
private slots:
void updateDataReadProgress(int, int);
void downloadDone(bool);
@@ -69,14 +69,14 @@ private:
QString m_target;
int runner;
QDir m_cache;
-
+
HttpGet *getter;
QTemporaryFile *downloadFile;
-
+
ProgressloggerInterface* m_dp;
};
-
-
+
+
#endif
diff --git a/rbutil/rbutilqt/preview.cpp b/rbutil/rbutilqt/preview.cpp
index 21e0711851..be1430c6a1 100644
--- a/rbutil/rbutilqt/preview.cpp
+++ b/rbutil/rbutilqt/preview.cpp
@@ -27,7 +27,7 @@ PreviewDlg::PreviewDlg(QWidget *parent) : QDialog(parent)
this->setModal(true);
this->setMouseTracking(true);
this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
-
+
}
void PreviewDlg::setText(QString text)
@@ -39,7 +39,7 @@ void PreviewDlg::setPixmap(QPixmap p)
{
ui.themePreview->setFixedSize(p.size());
this->resize(QSize(10,10));
- ui.themePreview->setPixmap(p);
+ ui.themePreview->setPixmap(p);
}
void PreviewDlg::mouseMoveEvent(QMouseEvent * event)
@@ -58,9 +58,9 @@ PreviewLabel::PreviewLabel(QWidget * parent, Qt::WindowFlags f)
:QLabel(parent,f)
{
this->setMouseTracking(true);
-
+
preview = new PreviewDlg(parent);
-
+
hovertimer.setInterval(1500); // wait for 1.5 seconds before showing the Fullsize Preview
hovertimer.setSingleShot(true);
connect(&hovertimer,SIGNAL(timeout ()),this,SLOT(timeout()));
@@ -89,11 +89,11 @@ void PreviewLabel::timeout()
preview->setVisible(true);
}
-void PreviewLabel::setPixmap(QPixmap p)
+void PreviewLabel::setPixmap(QPixmap p)
{
// set the image for the Fullsize Preview
- preview->setPixmap(p);
-
+ preview->setPixmap(p);
+
//scale the image for use in the label
QSize img;
img.setHeight(this->height());
diff --git a/rbutil/rbutilqt/preview.h b/rbutil/rbutilqt/preview.h
index c84a02a764..f46ca5e8a5 100644
--- a/rbutil/rbutilqt/preview.h
+++ b/rbutil/rbutilqt/preview.h
@@ -30,27 +30,27 @@ class PreviewDlg : public QDialog
public:
PreviewDlg(QWidget *parent = 0);
- void setPixmap(QPixmap p);
+ void setPixmap(QPixmap p);
void setText(QString text);
-
+
private slots:
void mouseMoveEvent(QMouseEvent * event);
void leaveEvent(QEvent * event);
-
+
private:
Ui::PreviewFrm ui;
-
-
+
+
};
class PreviewLabel : public QLabel
{
Q_OBJECT
-
+
public:
PreviewLabel(QWidget * parent = 0, Qt::WindowFlags f = 0);
-
+
void setPixmap(QPixmap p);
void setText(QString text);
private slots:
@@ -58,7 +58,7 @@ private slots:
void enterEvent(QEvent * event);
void leaveEvent(QEvent * event);
void timeout();
-
+
private:
QTimer hovertimer;
int mousex;
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index a2ac2b73ea..f06669d5c5 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -96,7 +96,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
connect(ui.buttonDownloadManual, SIGNAL(clicked()), this, SLOT(downloadManual()));
connect(ui.buttonSmall, SIGNAL(clicked()), this, SLOT(smallInstall()));
connect(ui.buttonComplete, SIGNAL(clicked()), this, SLOT(completeInstall()));
-
+
#if !defined(STATIC)
ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false);
#else
@@ -145,7 +145,7 @@ void RbUtilQt::downloadDone(bool error)
return;
}
qDebug() << "network status:" << daily->error();
-
+
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
@@ -195,7 +195,7 @@ void RbUtilQt::about()
Ui::aboutBox about;
about.setupUi(window);
window->setModal(true);
-
+
QFile licence(":/docs/gpl-2.0.html");
licence.open(QIODevice::ReadOnly);
QTextStream c(&licence);
@@ -288,7 +288,7 @@ void RbUtilQt::updateManual()
devices->beginGroup(userSettings->value("platform").toString());
QString manual;
manual = devices->value("manualname", "").toString();
-
+
if(manual == "")
manual = "rockbox-" + devices->value("platform").toString();
devices->endGroup();
@@ -314,18 +314,18 @@ void RbUtilQt::completeInstall()
if(QMessageBox::question(this, tr("Confirm Installation"),
tr("Do you really want to make a complete Installation?"),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
-
+
// create logger
logger = new ProgressLoggerGui(this);
logger->show();
-
+
QString mountpoint = userSettings->value("mountpoint").toString();
// show dialog with error if mount point is wrong
if(!QFileInfo(mountpoint).isDir()) {
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
logger->abort();
return;
- }
+ }
// Bootloader
devices->beginGroup(userSettings->value("platform").toString());
if(devices->value("needsbootloader", "") == "yes") {
@@ -357,7 +357,7 @@ void RbUtilQt::completeInstall()
}
if(m_error) return;
logger->undoAbort();
-
+
// Fonts
m_error = false;
m_installed = false;
@@ -371,7 +371,7 @@ void RbUtilQt::completeInstall()
}
if(m_error) return;
logger->undoAbort();
-
+
// Doom
if(hasDoom())
{
@@ -393,7 +393,7 @@ void RbUtilQt::completeInstall()
// it has its own logger window,so close our.
logger->close();
installThemes();
-
+
}
void RbUtilQt::smallInstall()
@@ -401,7 +401,7 @@ void RbUtilQt::smallInstall()
if(QMessageBox::question(this, tr("Confirm Installation"),
tr("Do you really want to make a small Installation?"),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
-
+
// create logger
logger = new ProgressLoggerGui(this);
logger->show();
@@ -412,7 +412,7 @@ void RbUtilQt::smallInstall()
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
logger->abort();
return;
- }
+ }
// Bootloader
devices->beginGroup(userSettings->value("platform").toString());
if(devices->value("needsbootloader", "") == "yes") {
@@ -461,7 +461,7 @@ bool RbUtilQt::installAuto()
QString file = QString("%1%2/rockbox.zip")
.arg(devices->value("bleeding_url").toString(),
userSettings->value("platform").toString());
-
+
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
@@ -475,9 +475,9 @@ bool RbUtilQt::installAuto()
versmap.insert("rel_rev", devices->value("last_release").toString());
versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
}
-
+
QString myversion = "r" + versmap.value("bleed_rev");
-
+
ZipInstaller* installer = new ZipInstaller(this);
installer->setUrl(file);
installer->setProxy(proxy());
@@ -487,9 +487,9 @@ bool RbUtilQt::installAuto()
installer->setCache(userSettings->value("cachepath", QDir::tempPath()).toString());
installer->setMountPoint(userSettings->value("mountpoint").toString());
installer->install(logger);
-
+
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
-
+
return true;
}
@@ -530,23 +530,23 @@ void RbUtilQt::installBootloaderBtn()
if(QMessageBox::question(this, tr("Confirm Installation"),
tr("Do you really want to install the Bootloader?"),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
-
+
// create logger
logger = new ProgressLoggerGui(this);
logger->show();
-
+
installBootloader();
}
void RbUtilQt::installBootloader()
-{
+{
QString platform = userSettings->value("platform").toString();
// create installer
blinstaller = new BootloaderInstaller(this);
-
+
blinstaller->setMountPoint(userSettings->value("mountpoint").toString());
-
+
blinstaller->setProxy(proxy());
blinstaller->setDevice(platform);
blinstaller->setBootloaderMethod(devices->value(platform + "/bootloadermethod").toString());
@@ -560,7 +560,7 @@ void RbUtilQt::installBootloader()
m_error = true;
return;
}
-
+
if(blinstaller->uptodate())
{
int ret = QMessageBox::question(this, tr("Bootloader Installation"),
@@ -583,7 +583,7 @@ void RbUtilQt::installBootloader()
return;
}
}
-
+
// if fwpatcher , ask for extra file
QString offirmware;
if(devices->value(platform + "/bootloadermethod").toString() == "fwpatcher")
@@ -616,7 +616,7 @@ void RbUtilQt::installBootloader()
}
}
blinstaller->setOrigFirmwarePath(offirmware);
-
+
blinstaller->install(logger);
}
@@ -642,7 +642,7 @@ void RbUtilQt::installFonts()
{
// create zip installer
installer = new ZipInstaller(this);
-
+
installer->setUrl(devices->value("font_url").toString());
installer->setProxy(proxy());
installer->setLogSection("Fonts");
@@ -650,7 +650,7 @@ void RbUtilQt::installFonts()
installer->setMountPoint(userSettings->value("mountpoint").toString());
if(!userSettings->value("cachedisable").toBool())
installer->setCache(userSettings->value("cachepath", QDir::tempPath()).toString());
- installer->install(logger);
+ installer->install(logger);
}
@@ -666,7 +666,7 @@ void RbUtilQt::installVoice()
// create zip installer
installer = new ZipInstaller(this);
installer->setUnzip(false);
-
+
QString voiceurl = devices->value("voice_url").toString() + "/" +
userSettings->value("platform").toString() + "-" +
versmap.value("arch_date") + "-english.voice";
@@ -681,7 +681,7 @@ void RbUtilQt::installVoice()
if(!userSettings->value("cachedisable").toBool())
installer->setCache(userSettings->value("cachepath", QDir::tempPath()).toString());
installer->install(logger);
-
+
//connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
}
@@ -718,7 +718,7 @@ void RbUtilQt::installDoom()
{
// create zip installer
installer = new ZipInstaller(this);
-
+
installer->setUrl(devices->value("doom_url").toString());
installer->setProxy(proxy());
installer->setLogSection("Game Addons");
@@ -767,7 +767,7 @@ void RbUtilQt::uninstallBootloader(void)
// create logger
ProgressLoggerGui* logger = new ProgressLoggerGui(this);
logger->show();
-
+
QString plattform = userSettings->value("platform").toString();
BootloaderInstaller blinstaller(this);
blinstaller.setMountPoint(userSettings->value("mountpoint").toString());
@@ -782,9 +782,9 @@ void RbUtilQt::uninstallBootloader(void)
logger->abort();
return;
}
-
+
blinstaller.uninstall(logger);
-
+
}
@@ -795,18 +795,18 @@ void RbUtilQt::downloadManual(void)
"to the root folder of your player."),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return;
-
+
buildInfo.open();
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
buildInfo.close();
-
+
devices->beginGroup(userSettings->value("platform").toString());
QString manual;
manual = devices->value("manualname", "rockbox-" + devices->value("platform").toString()).toString();
devices->endGroup();
QString date = (info.value("dailies/date").toString());
-
+
QString manualurl;
QString target;
QString section;
@@ -872,7 +872,7 @@ void RbUtilQt::installPortable(void)
}
logger->addItem(tr("Successfully installed Rockbox Utility."), LOGOK);
logger->abort();
-
+
}
@@ -913,7 +913,7 @@ void RbUtilQt::updateInfo()
if(log.value(keys.at(b)).toString() < min)
min = log.value(keys.at(b)).toString();
}
-
+
for(int b = 0; b < keys.size(); b++) {
QString file;
file = userSettings->value("mountpoint").toString() + "/" + keys.at(b);
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index d30732bb99..087152db3c 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -56,7 +56,7 @@ class RbUtilQt : public QMainWindow
BootloaderInstaller* blinstaller;
QUrl proxy(void);
QMap<QString, QString> versmap;
-
+
volatile bool m_installed;
volatile bool m_error;
@@ -66,28 +66,28 @@ class RbUtilQt : public QMainWindow
void configDialog(void);
void updateDevice(void);
void updateSettings(void);
-
+
void completeInstall(void);
void smallInstall(void);
void installdone(bool error);
-
+
void installBtn(void);
bool installAuto(void);
void install(void);
-
+
void installBootloaderBtn(void);
bool installBootloaderAuto(void);
void installBootloader(void);
-
+
void installFontsBtn(void);
bool installFontsAuto(void);
void installFonts(void);
-
+
bool hasDoom(void);
void installDoomBtn(void);
bool installDoomAuto(void);
void installDoom(void);
-
+
void createTalkFiles(void);
void downloadDone(bool);
void downloadDone(int, bool);
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp
index 5b8bb3f175..2096c8150b 100644
--- a/rbutil/rbutilqt/talkfile.cpp
+++ b/rbutil/rbutilqt/talkfile.cpp
@@ -41,7 +41,7 @@ bool TalkFileCreator::initEncoder()
bool TalkFileCreator::initTTS()
{
QFileInfo tts(m_TTSexec);
-
+
if(tts.exists())
{
return true;
@@ -68,14 +68,14 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
return false;
}
QApplication::processEvents();
-
+
connect(logger,SIGNAL(aborted()),this,SLOT(abort()));
m_logger->setProgressMax(0);
QDirIterator it(m_dir,QDirIterator::Subdirectories);
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
installlog.beginGroup("talkfiles");
// iterate over all entrys
- while (it.hasNext())
+ while (it.hasNext())
{
if(m_abort)
{
@@ -88,7 +88,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
QString toSpeak;
QString filename;
QString wavfilename;
-
+
if(fileInf.fileName() == "." || fileInf.fileName() == ".." || fileInf.suffix() == "talk")
{
it.next();
@@ -108,10 +108,10 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
filename = fileInf.absoluteFilePath() + ".talk";
}
wavfilename = filename + ".wav";
-
+
QFileInfo filenameInf(filename);
QFileInfo wavfilenameInf(wavfilename);
-
+
if(!filenameInf.exists() || m_overwriteTalk)
{
if(!wavfilenameInf.exists() || m_overwriteWav)
@@ -132,7 +132,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
return false;
}
}
-
+
QString now = QDate::currentDate().toString("yyyyMMdd");
if(m_removeWav)
{
@@ -142,18 +142,18 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
}
else
installlog.setValue(wavfilename.remove(m_mountpoint),now);
-
+
installlog.setValue(filename.remove(m_mountpoint),now);
it.next();
}
-
+
installlog.endGroup();
m_logger->addItem("Finished creating Talkfiles",LOGOK);
m_logger->setProgressMax(1);
m_logger->setProgressValue(1);
m_logger->abort();
-
- return true;
+
+ return true;
}
diff --git a/rbutil/rbutilqt/talkfile.h b/rbutil/rbutilqt/talkfile.h
index dfdf8ae033..f2119bc447 100644
--- a/rbutil/rbutilqt/talkfile.h
+++ b/rbutil/rbutilqt/talkfile.h
@@ -38,7 +38,7 @@ public:
void setTTsType(QString tts) { m_curTTS = tts; }
void setTTsOpts(QString opts) {m_TTSOpts=opts;}
void setTTsTemplate(QString t) { m_curTTSTemplate = t; }
-
+
void setEncType(QString enc) { m_curEnc = enc; }
void setEncOpts(QString opts) {m_EncOpts=opts;}
void setEncTemplate(QString t) { m_curEncTemplate = t; }
@@ -75,15 +75,15 @@ private:
QString m_EncExec;
QString m_EncOpts;
QString m_curEncTemplate;
-
+
bool m_overwriteTalk;
bool m_overwriteWav;
bool m_removeWav;
bool m_recursive;
bool m_stripExtensions;
-
+
ProgressloggerInterface* m_logger;
-
+
bool m_abort;
};
diff --git a/rbutil/rbutilqt/uninstall.h b/rbutil/rbutilqt/uninstall.h
index 4c774876e3..b4aa49a77b 100644
--- a/rbutil/rbutilqt/uninstall.h
+++ b/rbutil/rbutilqt/uninstall.h
@@ -16,11 +16,11 @@
* KIND, either express or implied.
*
****************************************************************************/
-
-
+
+
#ifndef UNINSTALL_H
#define UNINSTALL_H
-
+
#include <QtGui>
@@ -28,36 +28,36 @@
#include "progressloggerinterface.h"
-
+
class Uninstaller : public QObject
-{
+{
Q_OBJECT
public:
Uninstaller(QObject* parent,QString mountpoint) ;
~Uninstaller(){}
-
+
void deleteAll(ProgressloggerInterface* dp);
void uninstall(ProgressloggerInterface* dp);
-
+
bool uninstallPossible();
-
+
QStringList getAllSections();
void setSections(QStringList sections) {uninstallSections = sections;}
-
-
+
+
private slots:
private:
QString m_mountpoint;
-
+
QStringList uninstallSections;
ProgressloggerInterface* m_dp;
};
-
-
+
+
#endif
diff --git a/rbutil/rbutilqt/uninstallwindow.cpp b/rbutil/rbutilqt/uninstallwindow.cpp
index 5dcfbb894b..61ca8410be 100644
--- a/rbutil/rbutilqt/uninstallwindow.cpp
+++ b/rbutil/rbutilqt/uninstallwindow.cpp
@@ -24,7 +24,7 @@
UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
- ui.UninstalllistWidget->setAlternatingRowColors(true);
+ ui.UninstalllistWidget->setAlternatingRowColors(true);
connect(ui.UninstalllistWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged()));
connect(ui.CompleteRadioBtn,SIGNAL(toggled(bool)),this,SLOT(UninstallMethodChanged(bool)));
}
@@ -43,7 +43,7 @@ void UninstallWindow::accept()
{
uninstaller->uninstall(logger);
}
- connect(logger,SIGNAL(closed()),this,SLOT(close()));
+ connect(logger,SIGNAL(closed()),this,SLOT(close()));
}
@@ -55,7 +55,7 @@ void UninstallWindow::selectionChanged()
{
seletedStrings << itemlist.at(i)->text();
}
-
+
uninstaller->setSections(seletedStrings);
}
@@ -64,7 +64,7 @@ void UninstallWindow::UninstallMethodChanged(bool complete)
if(complete)
ui.smartGroupBox->setEnabled(false);
else
- ui.smartGroupBox->setEnabled(true);
+ ui.smartGroupBox->setEnabled(true);
}
void UninstallWindow::setDeviceSettings(QSettings *dev)
@@ -77,12 +77,12 @@ void UninstallWindow::setDeviceSettings(QSettings *dev)
void UninstallWindow::setUserSettings(QSettings *user)
{
userSettings = user;
-
+
QString mountpoint =userSettings->value("mountpoint").toString();
uninstaller = new Uninstaller(this,mountpoint);
-
+
// disable smart uninstall, if not possible
- if(!uninstaller->uninstallPossible())
+ if(!uninstaller->uninstallPossible())
{
ui.smartRadioButton->setEnabled(false);
ui.smartGroupBox->setEnabled(false);
@@ -90,7 +90,7 @@ void UninstallWindow::setUserSettings(QSettings *user)
}
else // fill in installed parts
{
- ui.smartRadioButton->setChecked(true);
- ui.UninstalllistWidget->addItems(uninstaller->getAllSections());
+ ui.smartRadioButton->setChecked(true);
+ ui.UninstalllistWidget->addItems(uninstaller->getAllSections());
}
}