1
0
Fork 0
forked from len0rd/rockbox

rbutil: make RbSettings a static class. (FS#10183 with improvements)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20890 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2009-05-09 16:59:14 +00:00
parent 8e63df19cb
commit 33d9cf091a
28 changed files with 395 additions and 444 deletions

View file

@ -19,7 +19,7 @@
#include "uninstallwindow.h"
#include "ui_uninstallfrm.h"
#include "rbsettings.h"
UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent)
{
@ -27,6 +27,24 @@ UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent)
ui.UninstalllistWidget->setAlternatingRowColors(true);
connect(ui.UninstalllistWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged()));
connect(ui.CompleteRadioBtn,SIGNAL(toggled(bool)),this,SLOT(UninstallMethodChanged(bool)));
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
uninstaller = new Uninstaller(this,mountpoint);
// disable smart uninstall, if not possible
if(!uninstaller->uninstallPossible())
{
ui.smartRadioButton->setEnabled(false);
ui.smartGroupBox->setEnabled(false);
ui.CompleteRadioBtn->setChecked(true);
}
else // fill in installed parts
{
ui.smartRadioButton->setChecked(true);
ui.UninstalllistWidget->addItems(uninstaller->getAllSections());
}
}
@ -68,24 +86,3 @@ void UninstallWindow::UninstallMethodChanged(bool complete)
ui.smartGroupBox->setEnabled(true);
}
void UninstallWindow::setSettings(RbSettings *sett)
{
settings = sett;
QString mountpoint = settings->value(RbSettings::Mountpoint).toString();
uninstaller = new Uninstaller(this,mountpoint);
// disable smart uninstall, if not possible
if(!uninstaller->uninstallPossible())
{
ui.smartRadioButton->setEnabled(false);
ui.smartGroupBox->setEnabled(false);
ui.CompleteRadioBtn->setChecked(true);
}
else // fill in installed parts
{
ui.smartRadioButton->setChecked(true);
ui.UninstalllistWidget->addItems(uninstaller->getAllSections());
}
}