Fixed N_SE-38563, N_SE-38552
[apps/osp/Settings.git] / src / StMainMenuForm.cpp
index 2e8f8bf..2772160 100644 (file)
@@ -342,8 +342,8 @@ MainMenuForm::CreateGroupItem(int groupIndex, int itemWidth)
 
        pItem->AddControl(pLabel);
        relativeLayout.SetMargin(*pLabel, itemRectangle.x, 0, 0, 0);
-       relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
-       relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+       relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+       relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
        pItem->SetEnabled(false);
 
        return pItem;
@@ -626,8 +626,8 @@ MainMenuForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                {
                        relativeLayout.SetMargin(*pLabel, itemMainRectangle.x, MAIN_RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
                }
-               relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
-               relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+               relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+               relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
        }
 
        return pItem;
@@ -658,6 +658,12 @@ MainMenuForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
 void
 MainMenuForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
 {
+       if (__isRunningAppControl)
+       {
+               AppLogDebug("busy status");
+               return;
+       }
+
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
@@ -695,7 +701,10 @@ MainMenuForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab
 
                                pExtraData->Add(new (std::nothrow) String(L"caller"), new (std::nothrow) String(L"osp-setting"));
 
-                               pAppControl->Start(null, null, pExtraData, null);
+                               if (pAppControl->Start(null, null, pExtraData, null) == E_SUCCESS)
+                               {
+                                       __isRunningAppControl = true;
+                               }
 
                                delete pAppControl;
                                delete pExtraData;
@@ -1034,10 +1043,11 @@ MainMenuForm::FindAppControlScene(int itemIndex)
 
                if (pAppControl)
                {
-                       pAppControl->Start(pDataList, null);
+                       if (pAppControl->Start(pDataList, null) == E_SUCCESS)
+                       {
+                               __isRunningAppControl = true;
+                       }
                        delete pAppControl;
-
-                       __isRunningAppControl = true;
                }
        }
 
@@ -1104,4 +1114,4 @@ MainMenuForm::OnFocusGained(const Tizen::Ui::Control& source)
 void
 MainMenuForm::OnFocusLost(const Tizen::Ui::Control& source)
 {
-}
\ No newline at end of file
+}