--- a/emailuis/nmailui/src/main.cpp Fri Jun 11 16:23:29 2010 +0100
+++ b/emailuis/nmailui/src/main.cpp Thu Jul 22 16:30:28 2010 +0100
@@ -1,49 +1,53 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#include "nmuiheaders.h"
+const QString NmActivityName("EmailInboxView");
+
/*!
- int main
-*/
+ The main function.
+ */
int main(int argc, char *argv[])
{
- HbApplication app(argc, argv);
-
+ HbApplication app(argc,argv,Hb::NoSplash);
+
// Load the translation file.
QTranslator translator;
-
-#ifdef Q_OS_SYMBIAN
QString lang = QLocale::system().name();
QString appName = "mail_";
QString path = "Z:/resource/qt/translations/";
-#else
- QString lang;
- QString appName = "mail";
- QString path = ":/translations";
-#endif
translator.load(appName + lang, path);
app.installTranslator(&translator);
-
+
app.setApplicationName(hbTrId("txt_mail_title_mail"));
-
- NmApplication *nmApplication = new NmApplication(&app);
-
+
+ NmApplication *nmApplication = NULL;
+ quint32 accountId = 0;
+ if (app.activateReason() == Hb::ActivationReasonActivity &&
+ app.activateId() == NmActivityName) {
+ QVariant data = app.activateParams().take("accountId");
+ QString accountIdString = data.toString();
+ accountId = accountIdString.toULongLong();
+ nmApplication = new NmApplication(&app,accountId);
+ } else {
+ nmApplication = new NmApplication(&app);
+ }
+
int ret = app.exec();
delete nmApplication;
return ret;