diff options
Diffstat (limited to 'rbutil/rbutilqt/uninstallwindow.cpp')
-rw-r--r-- | rbutil/rbutilqt/uninstallwindow.cpp | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/rbutil/rbutilqt/uninstallwindow.cpp b/rbutil/rbutilqt/uninstallwindow.cpp index 7d70f46170..4abfe93b1e 100644 --- a/rbutil/rbutilqt/uninstallwindow.cpp +++ b/rbutil/rbutilqt/uninstallwindow.cpp | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include "uninstallwindow.h" | 20 | #include "uninstallwindow.h" |
21 | #include "ui_uninstallfrm.h" | 21 | #include "ui_uninstallfrm.h" |
22 | 22 | #include "rbsettings.h" | |
23 | 23 | ||
24 | UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent) | 24 | UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent) |
25 | { | 25 | { |
@@ -27,6 +27,24 @@ UninstallWindow::UninstallWindow(QWidget *parent) : QDialog(parent) | |||
27 | ui.UninstalllistWidget->setAlternatingRowColors(true); | 27 | ui.UninstalllistWidget->setAlternatingRowColors(true); |
28 | connect(ui.UninstalllistWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged())); | 28 | connect(ui.UninstalllistWidget,SIGNAL(itemSelectionChanged()),this,SLOT(selectionChanged())); |
29 | connect(ui.CompleteRadioBtn,SIGNAL(toggled(bool)),this,SLOT(UninstallMethodChanged(bool))); | 29 | connect(ui.CompleteRadioBtn,SIGNAL(toggled(bool)),this,SLOT(UninstallMethodChanged(bool))); |
30 | |||
31 | QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); | ||
32 | |||
33 | uninstaller = new Uninstaller(this,mountpoint); | ||
34 | |||
35 | // disable smart uninstall, if not possible | ||
36 | if(!uninstaller->uninstallPossible()) | ||
37 | { | ||
38 | ui.smartRadioButton->setEnabled(false); | ||
39 | ui.smartGroupBox->setEnabled(false); | ||
40 | ui.CompleteRadioBtn->setChecked(true); | ||
41 | } | ||
42 | else // fill in installed parts | ||
43 | { | ||
44 | ui.smartRadioButton->setChecked(true); | ||
45 | ui.UninstalllistWidget->addItems(uninstaller->getAllSections()); | ||
46 | } | ||
47 | |||
30 | } | 48 | } |
31 | 49 | ||
32 | 50 | ||
@@ -68,24 +86,3 @@ void UninstallWindow::UninstallMethodChanged(bool complete) | |||
68 | ui.smartGroupBox->setEnabled(true); | 86 | ui.smartGroupBox->setEnabled(true); |
69 | } | 87 | } |
70 | 88 | ||
71 | |||
72 | void UninstallWindow::setSettings(RbSettings *sett) | ||
73 | { | ||
74 | settings = sett; | ||
75 | |||
76 | QString mountpoint = settings->value(RbSettings::Mountpoint).toString(); | ||
77 | uninstaller = new Uninstaller(this,mountpoint); | ||
78 | |||
79 | // disable smart uninstall, if not possible | ||
80 | if(!uninstaller->uninstallPossible()) | ||
81 | { | ||
82 | ui.smartRadioButton->setEnabled(false); | ||
83 | ui.smartGroupBox->setEnabled(false); | ||
84 | ui.CompleteRadioBtn->setChecked(true); | ||
85 | } | ||
86 | else // fill in installed parts | ||
87 | { | ||
88 | ui.smartRadioButton->setChecked(true); | ||
89 | ui.UninstalllistWidget->addItems(uninstaller->getAllSections()); | ||
90 | } | ||
91 | } | ||