src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 28 b7da29130b0e
--- a/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -81,6 +81,7 @@
         EIconVisible,
         ETimeout,
         EStandardButtons,
+        EShowLevel,
         EDismissPolicy,
         ELastIntProperty = EDismissPolicy,
         EFirstStringProperty,
@@ -385,7 +386,7 @@
             if (i == EAcceptText || i == ERejectText) {
                 HBufC *actionData = CreateActionDataLC(property.IsNullAction(), property.StringValue());
                 parameter = CHbSymbianVariant::NewL(actionData, CHbSymbianVariant::EDes);
-                CleanupStack::PopAndDestroy(actionData);
+                CleanupStack::PopAndDestroy(); // actionData
             } else if (property.Type() == TMessageBoxProperty::EIntProperty) {
                 TInt value = property.IntValue();
                 parameter = CHbSymbianVariant::NewL(&value, CHbSymbianVariant::EInt);
@@ -396,7 +397,7 @@
             CleanupStack::PushL(parameter);
             User::LeaveIfError(parameters->Add(
                 PropertyName(static_cast<TPropertyId>(i)), parameter));
-            CleanupStack::Pop(parameter);
+            CleanupStack::Pop(); // parameter
             property.SetModified(false);
         }
     }
@@ -416,7 +417,7 @@
             User::Leave(error); // error can be positive or negative
         }
     }
-    CleanupStack::PopAndDestroy(parameters);
+    CleanupStack::PopAndDestroy(); // parameters
 }
 
 // Close message box
@@ -446,6 +447,7 @@
         L"iconVisible",
         L"timeout",
         L"standardButtons",
+        L"showLevel",
         L"dismissPolicy",
         L"text",
         L"iconName",
@@ -538,6 +540,12 @@
     }
 }
 
+// Set dialog show level
+void SetShowLevel(CHbDeviceMessageBoxPrivate *aBox, TInt aLevel)
+{
+    aBox->SetPropertyValue(CHbDeviceMessageBoxPrivate::EShowLevel, aLevel);
+}
+
 /*!
     \class CHbDeviceMessageBoxSymbian
     \brief CHbDeviceMessageBoxSymbian is a Symbian implementation of HbDeviceMessageBox.
@@ -763,7 +771,7 @@
     CleanupStack::PushL(mboxPrivate);
     mboxPrivate->ConstructL(aType, aObserver);
     messageBox->d = mboxPrivate;
-    CleanupStack::Pop(2, messageBox); // mboxPrivate, messageBox
+    CleanupStack::Pop(2); // messageBox, mboxPrivate
     messageBox->SetObserver(aObserver);
     return messageBox;
 }
@@ -794,7 +802,7 @@
         messageBox->SetButtonTextL(ERejectButton, aRejectButtonText);
     }
     TButtonId buttonId = messageBox->ExecL();
-    CleanupStack::PopAndDestroy(messageBox);
+    CleanupStack::PopAndDestroy(); // messageBox
     return buttonId;
 }
 
@@ -821,7 +829,7 @@
     }
     messageBox->SetStandardButtons(aStandardButtons);
     TButtonId buttonId = messageBox->ExecL();
-    CleanupStack::PopAndDestroy(messageBox);
+    CleanupStack::PopAndDestroy(); // messageBox
     return buttonId;
 }
 
@@ -837,7 +845,7 @@
     CleanupStack::PushL(messageBox);
     messageBox->SetTextL(aText);
     messageBox->ShowL();
-    CleanupStack::PopAndDestroy(messageBox);
+    CleanupStack::PopAndDestroy(); // messageBox
 }
 
 /*!
@@ -852,7 +860,7 @@
     CleanupStack::PushL(messageBox);
     messageBox->SetTextL(aText);
     messageBox->ShowL();
-    CleanupStack::PopAndDestroy(messageBox);
+    CleanupStack::PopAndDestroy(); // messageBox
 }
 
 /*!
@@ -1000,7 +1008,7 @@
 */
 EXPORT_C void CHbDeviceMessageBoxSymbian::SetAnimationDefinitionL(const TDesC& aAnimationDefinition)
 {
-	d->SetPropertyValueL(CHbDeviceMessageBoxPrivate::EAnimationDefinition, aAnimationDefinition);
+    d->SetPropertyValueL(CHbDeviceMessageBoxPrivate::EAnimationDefinition, aAnimationDefinition);
 }
 
 /*!
@@ -1010,7 +1018,7 @@
 */
 EXPORT_C TPtrC CHbDeviceMessageBoxSymbian::AnimationDefinition() const
 {
-	return d->mProperties[CHbDeviceMessageBoxPrivate::EAnimationDefinition].StringValue();
+    return d->mProperties[CHbDeviceMessageBoxPrivate::EAnimationDefinition].StringValue();
 }
 
 /*!