Replaced the bluetooth menu with the EFL bluetooth UG
authorHongryeol Gil <hr.gil@samsung.com>
Tue, 23 Apr 2013 06:33:16 +0000 (15:33 +0900)
committerHongryeol Gil <hr.gil@samsung.com>
Tue, 23 Apr 2013 06:33:16 +0000 (15:33 +0900)
Change-Id: I20dcb94039cec4af374680b8315d817ad5198ba3
Signed-off-by: Hongryeol Gil <hr.gil@samsung.com>
src/StMainMenuForm.cpp

index c798b52..ca1aa3d 100644 (file)
@@ -82,8 +82,7 @@ static const int ID_ITEM_SYSTEM_MANAGE_APPLICATION = 0;
 static const int ID_ITEM_SYSTEM_DOWNLOADED_APPLICATION = 1;
 static const int ID_ITEM_SYSTEM_DEVELOPER_OPTION = 2;
 static const int ID_ITEM_SYSTEM_ABOUT_PHONE = 3;
-static const int ID_GROUP_SYSTEM_ITEM_COUNT = 3;
-static const int ID_GROUP_SYSTEM_DEVICE_ITEM_COUNT = 4;
+static const int ID_GROUP_SYSTEM_ITEM_COUNT = 4;
 
 static const int ID_GROUP_APPSETTING = 5;
 static const int ID_GROUP_NO_APPSETTING = 4;
@@ -228,14 +227,7 @@ MainMenuForm::GetItemCount(int groupIndex)
 
        case ID_GROUP_SYSTEM:
                {
-                       if (__isEmulator)
-                       {
-                               itemCount = ID_GROUP_SYSTEM_ITEM_COUNT;
-                       }
-                       else
-                       {
-                               itemCount = ID_GROUP_SYSTEM_DEVICE_ITEM_COUNT;
-                       }
+                       itemCount = ID_GROUP_SYSTEM_ITEM_COUNT;
                }
                break;
 
@@ -394,20 +386,30 @@ MainMenuForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                                {
                                        if (__isEmulator)
                                        {
-                                               return null;
+                                               itemHeight = 0;
+                                       }
+                                       else
+                                       {
+                                               pBitmap = ResourceManager::GetBitmapN(IDB_WIFI);
+                                               itemText = ResourceManager::GetString(L"IDS_ST_BODY_WI_FI");
                                        }
-                                       pBitmap = ResourceManager::GetBitmapN(IDB_WIFI);
-                                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_WI_FI");
                                }
                                break;
 
                        case ID_ITEM_CONNECTIVITY_BLUETOOTH:
                                {
-                                       ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel);
-                                       itemHeight = itemRectLabel.height;
+                                       if (__isEmulator)
+                                       {
+                                               itemHeight = 0;
+                                       }
+                                       else
+                                       {
+                                               ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel);
+                                               itemHeight = itemRectLabel.height;
 
-                                       pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
-                                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_BLUETOOTH");
+                                               pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
+                                               itemText = ResourceManager::GetString(L"IDS_ST_BODY_BLUETOOTH");
+                                       }
                                }
                                break;
 
@@ -562,8 +564,7 @@ MainMenuForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                                {
                                        if (__isEmulator)
                                        {
-                                               pBitmap = ResourceManager::GetBitmapN(IDB_ABOUT_PHONE);
-                                               itemText = ResourceManager::GetString(L"IDS_ST_BODY_ABOUT_PHONE");
+                                               itemHeight = 0;
                                        }
                                        else
                                        {
@@ -677,23 +678,29 @@ MainMenuForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab
                {
                        pSceneName = GroupConnectivitySceneConnect(__currentTableViewList, itemIndex, status);
 
+                       AppControl* pAppControl = null;
+
                        if (pSceneName == IDSCN_WIFI)
                        {
-                               AppControl* pAppControl = AppManager::GetInstance()->FindAppControlN(L"wifi-efl-ug", L"");
+                               pAppControl = AppManager::GetInstance()->FindAppControlN(L"wifi-efl-ug", L"");
+                       }
+                       else if (pSceneName == IDSCN_BLUETOOTH)
+                       {
+                               pAppControl = AppManager::GetInstance()->FindAppControlN(L"ug-bluetooth-efl", L"");
+                       }
 
-                               if (pAppControl)
-                               {
-                                       HashMap* pExtraData = new (std::nothrow) HashMap(SingleObjectDeleter);
-                                       pExtraData->Construct();
+                       if (pAppControl)
+                       {
+                               HashMap* pExtraData = new (std::nothrow) HashMap(SingleObjectDeleter);
+                               pExtraData->Construct();
 
-                                       pExtraData->Add(new (std::nothrow) String(L"caller"), new (std::nothrow) String(L"osp-setting"));
+                               pExtraData->Add(new (std::nothrow) String(L"caller"), new (std::nothrow) String(L"osp-setting"));
 
-                                       pAppControl->Start(null, null, pExtraData, null);
+                               pAppControl->Start(null, null, pExtraData, null);
 
-                                       delete pAppControl;
-                                       delete pExtraData;
-                                       return;
-                               }
+                               delete pAppControl;
+                               delete pExtraData;
+                               return;
                        }
                }
                break;
@@ -956,14 +963,7 @@ MainMenuForm::GroupSystemSceneConnect(int viewMode, int itemIndex, Tizen::Ui::Co
 
        case ID_ITEM_SYSTEM_DEVELOPER_OPTION:
                {
-                       if (__isEmulator)
-                       {
-                               pScene = IDSCN_PHONE_INFO;
-                       }
-                       else
-                       {
-                               pScene = IDSCN_DEVELOPER_OPTION;
-                       }
+                       pScene = IDSCN_DEVELOPER_OPTION;
                }
                break;