Move group warning to last stage of intial settings wizard.

This commit is contained in:
craig.p.drummond
2012-12-13 19:56:20 +00:00
committed by craig.p.drummond
parent 960b2daaa7
commit ef294dd899
3 changed files with 3 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
12. When collapse/expand, only adjust height and not width.
13. Add a 'Cache' page to settngs dialog, allowing cahce usage to be displayed
and cache items delete.
14. Move group warning to last stage of intial settings wizard.
0.9.1
-----

View File

@@ -26,7 +26,6 @@
#ifdef ENABLE_KDE_SUPPORT
#include <KDE/KCmdLineArgs>
#include <KDE/KStartupInfo>
#include <KDE/KMessageBox>
#include <KDE/Solid/PowerManagement>
#include "initialsettingswizard.h"
#else
@@ -89,16 +88,6 @@ int Application::newInstance() {
Settings::self()->save(true);
}
}
if (0==Utils::getGroupId() && KMessageBox::Cancel==KMessageBox::warningContinueCancel(0,
i18n("You are not currently a member of the \"users\" group. "
"Cantata will function better (saving of album covers, lyrics, etc. with the correct permissions) if you "
"(or your administrator) add yourself to this group.\n\n"
"Note, that if you do add yourself you will need to logout and back in for this to take effect.\n\n"
"Select \"Continue\" to start Cantata as is."),
QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), "groupWarning")) {
QApplication::exit(0);
return 0;
}
w=new MainWindow();
connect(w, SIGNAL(destroyed(QObject *)), this, SLOT(mwDestroyed(QObject *)));
}

View File

@@ -24,6 +24,7 @@
#include "initialsettingswizard.h"
#include "messagebox.h"
#include "settings.h"
#include "utils.h"
#include <QtCore/QDir>
InitialSettingsWizard::InitialSettingsWizard(QWidget *p)
@@ -43,6 +44,7 @@ InitialSettingsWizard::InitialSettingsWizard(QWidget *p)
port->setValue(det.port);
password->setText(det.password);
dir->setText(det.dir);
groupWarningLabel->setVisible(0==Utils::getGroupId());
}
InitialSettingsWizard::~InitialSettingsWizard()