Fixed Nabi Issues
[apps/osp/Internet.git] / src / IntNotificationPanel.cpp
index 9be9179..9b68982 100644 (file)
@@ -2,7 +2,7 @@
 
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -78,13 +78,13 @@ NotificationPanel::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
 void
 NotificationPanel::ShowNotification(void)
 {
-       SceneManager* pSceneManager = null;
+       SceneManager* pSceneManager = SceneManager::GetInstance();
        if ( __pLabel != NULL)
        {
-               AddControl(*__pLabel);
+               AddControl(__pLabel);
                __pLabel->SetBackgroundColor(CUSTOM_COLOR_INFO_LABEL);
        }
-       __form.AddControl(*this);
+       __form.AddControl(this);
 
        SceneId sceneId = pSceneManager->GetInstance()->GetCurrentSceneId();
 
@@ -114,3 +114,22 @@ NotificationPanel::SetPositionDiff(int pos)
 {
        __position = pos ;
 }
+
+void
+NotificationPanel::OrientationChanged()
+{
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       SceneId sceneId = pSceneManager->GetInstance()->GetCurrentSceneId();
+
+       if (sceneId == IDSCN_EDIT_HISTORY_LIST || sceneId == IDSCN_EDIT_BOOKMARK_LIST /*|| sceneId == IDSCN_SETTINGS*/)
+       {
+               SetPosition(0,__form.GetClientAreaBounds().height - GetHeight());
+               SetSize(__form.GetWidth(),GetHeight());
+       }
+       else
+       {
+               // Since there is a footer panel for the Main form need to subtract __position which is equal to footer panel height.
+               SetPosition(0,__form.GetClientAreaBounds().height -__position - GetHeight());
+       }
+       Invalidate(true);
+}