diff -r 478bc57ad291 -r 64e38f08e49c emailuis/nmsettingui/src/nmsettingsviewfactory.cpp --- a/emailuis/nmsettingui/src/nmsettingsviewfactory.cpp Thu Sep 02 20:15:00 2010 +0300 +++ b/emailuis/nmsettingui/src/nmsettingsviewfactory.cpp Fri Sep 17 08:27:21 2010 +0300 @@ -20,7 +20,6 @@ #include #include #include -#include #include "nmsettingsviewfactory.h" #include "nmmailboxsettingsmanager.h" @@ -31,9 +30,6 @@ #include "nmsettingsviewlauncher.h" #include "nmsettingscommon.h" -static const QString mailWizardStartExe = "mailwizard.exe"; -static const QString mailWizardStartArgs = "from:controlpanel"; - /*! \class NmSettingsViewFactory @@ -61,12 +57,9 @@ const HbIcon &icon, const HbDataFormModelItem *parent) : CpSettingFormEntryItemData(itemDataHelper, text, description, icon, parent), - mSettingsManager(new NmMailboxSettingsManager()), mSettingsViewLauncher(0),mPrevView(0), - mMessageBox(0) + mSettingsManager(new NmMailboxSettingsManager()), mSettingsViewLauncher(0),mPrevView(0) { NM_FUNCTION; - - createMessageBox(); } @@ -90,11 +83,9 @@ const HbDataFormModelItem *parent) : CpSettingFormEntryItemData(itemDataHelper, text, description, icon, parent), mSettingsManager(new NmMailboxSettingsManager()), mSettingsViewLauncher(viewLauncher), - mPrevView(0), mMessageBox(0) + mPrevView(0) { NM_FUNCTION; - - createMessageBox(); } @@ -106,7 +97,6 @@ NM_FUNCTION; delete mSettingsManager; - delete mMessageBox; } @@ -131,9 +121,7 @@ switch(mailboxCount) { case 0: { - // Query the user whether to launch the wizard or not. - mMessageBox->open(const_cast(this), - SLOT(launchWizard(HbAction *))); + // Mailbox doesn't exist, we can't open settings break; } case 1: { @@ -270,36 +258,5 @@ } } -/*! - Handles user selection from "No mailboxes defined" dialog. Launches the Mail Wizard if \a action - is the dialog's primary action ("Yes"). Otherwise does nothing. - \param action. Action selected by the user. -*/ -void NmSettingsViewFactory::launchWizard(HbAction *action) -{ - NM_FUNCTION; - - if (action == mMessageBox->primaryAction()) { - // Launch mail wizard. - NM_COMMENT(QString("NmSettingsViewFactory::launchWizard(): launching the mail wizard")); - QStringList args; - args << mailWizardStartArgs; - QProcess::startDetached(mailWizardStartExe, args); - } -} - -/*! - Creates the "No mailboxes defined" dialog. Called from the constructors. -*/ -void NmSettingsViewFactory::createMessageBox() -{ - NM_FUNCTION; - - mMessageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion); - mMessageBox->setText(hbTrId("txt_mail_dialog_no_mailboxes_create_new")); - mMessageBox->setTimeout(HbMessageBox::NoTimeout); - mMessageBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); -} - // End of file.