Fixed Jira issue and applied multilanguage and changed to refresh when returing from...
authorMyunkyu <mk70.kang@partner.samsung.com>
Mon, 22 Apr 2013 06:08:58 +0000 (15:08 +0900)
committerMyunkyu <mk70.kang@partner.samsung.com>
Mon, 22 Apr 2013 06:08:58 +0000 (15:08 +0900)
Change-Id: I0080691bd2aa1649b2e18c9ca073ddb3459755fa

src/StAppSettingForm.cpp
src/StDateTimeForm.cpp
src/StDeveloperOptionForm.cpp
src/StDisplayForm.cpp
src/StHomeAndLockScreenForm.cpp
src/StMainMenuForm.cpp
src/StScreenTypeForm.cpp
src/StWallpaperAlbumListDetailForm.cpp
src/StWallpaperAlbumListForm.cpp
src/StWallpaperAlbumListPresentationModel.cpp

index 5daf7d0..0d34888 100644 (file)
@@ -957,6 +957,7 @@ AppSettingForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
                }
                else if (pCurrent->GetType().Equals(ID_APPSETTING_ITEM_TYPE_EXPAND_LIST, false))
                {
+                       int itemSelect = 0;
                        ElementNode* pExpandListItem = dynamic_cast<ElementNode*>(pCurrent);
                        if (pExpandListItem == null)
                        {
@@ -976,6 +977,7 @@ AppSettingForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
                                        delete pExpandItemValue;
                                        continue;
                                }
+                               itemSelect++;
                                unsigned int hashCode = pElementLeaf->GetId().GetHashCode();
                                ItemTag* itemTag = GetTranslateTableHashCodeToItemTag(hashCode);
                                if (itemTag == null)
@@ -986,6 +988,24 @@ AppSettingForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen
                                delete pExpandItemValue;
                        }
                        delete pExpandListValue;
+
+                       if (itemSelect == 0)
+                       {
+                               ElementLeaf* pElementLeaf = dynamic_cast<ElementLeaf*>(pExpandListItem->GetChild(0));
+                               unsigned int hashCode = pElementLeaf->GetId().GetHashCode();
+                               String* value = pElementLeaf->GetAttributeN(ID_APPSETTING_ATTRIBUTE_TYPE_TITLE);
+
+                               AppLogDebug("value[%ls]", value->GetPointer());
+                               ItemTag* itemTag = GetTranslateTableHashCodeToItemTag(hashCode);
+                               if (itemTag == null)
+                               {
+                                       AppLogDebug("itemTag == null");
+                               }
+                               __pTableView->SetItemChecked(itemTag->GetGroupIndex(), itemTag->GetItemIndex(), true);
+                               pExpandListItem->SetAttribute(ID_APPSETTING_ATTRIBUTE_TYPE_VALUE, *value);
+                               RefreshExpandListItem(itemTag->GetGroupIndex());
+                               delete value;
+                       }
                }
        }
        delete pEnum;
@@ -1623,6 +1643,12 @@ AppSettingForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedT
                        }
                }
                __pTableView->RefreshItem(itemTag->GetGroupIndex(), itemTag->GetItemIndex(), TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+
+               if (__pIOAppSetting != null)
+               {
+                       __pIOAppSetting->UpdateChangedValue();
+               }
+
                Invalidate(true);
        }
        else if (pItemNode->GetType().Equals(ID_APPSETTING_ITEM_TYPE_BOOL, false))
@@ -1635,6 +1661,11 @@ AppSettingForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedT
                }
                tableView.SetItemChecked(groupIndex, itemIndex, itemSelectStatus);
                pItemNode->SetAttribute(ID_APPSETTING_ATTRIBUTE_TYPE_VALUE, Boolean::ToString(itemSelectStatus));
+
+               if (__pIOAppSetting != null)
+               {
+                       __pIOAppSetting->UpdateChangedValue();
+               }
        }
        else
        {
@@ -1782,6 +1813,11 @@ AppSettingForm::OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int a
 
        pNode->SetAttribute(ID_APPSETTING_ATTRIBUTE_TYPE_VALUE, Integer::ToString(adjustment));
        SetFocus();
+
+       if (__pIOAppSetting != null)
+       {
+               __pIOAppSetting->UpdateChangedValue();
+       }
 }
 
 void
@@ -1809,6 +1845,26 @@ AppSettingForm::OnTextValueChanged(const Tizen::Ui::Control& source)
        }
 
        pNode->SetAttribute(ID_APPSETTING_ATTRIBUTE_TYPE_VALUE, changedText);
+
+       String* pMin = pNode->GetAttributeN(ID_APPSETTING_ATTRIBUTE_TYPE_MIN_LENGTH);
+       String* pMax = pNode->GetAttributeN(ID_APPSETTING_ATTRIBUTE_TYPE_MAX_LENGTH);
+
+       int minLength = 0;
+       int maxLength = 0;
+       int currentLength = pEditField->GetTextLength();
+
+       Integer::Parse(*pMin, minLength);
+       Integer::Parse(*pMax, maxLength);
+
+       if ((minLength <= currentLength) && (maxLength >= currentLength))
+       {
+               if (__pIOAppSetting != null)
+               {
+                       AppLogDebug(" current[%d]  min [%d] max[%d]", currentLength, minLength, maxLength);
+                       __pIOAppSetting->UpdateChangedValue();
+                       return;
+               }
+       }
 }
 
 void
index f390f90..c4a29ee 100644 (file)
@@ -701,6 +701,7 @@ DateTimeForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab
                                tableView.SetItemChecked(groupIndex, itemIndex, automaticUpdateStatus);
                                tableView.SetItemEnabled(ID_GROUP_DATE_AND_TIME_LOCAL_TIME, ID_ITEM_DATE_AND_TIME_TIME_ZONE, !automaticUpdateStatus);
                                tableView.SetItemEnabled(ID_GROUP_DATE_AND_TIME_LOCAL_TIME, ID_ITEM_DATE_AND_TIME_DATE_AND_TIME, !automaticUpdateStatus);
+                               tableView.RefreshAllItems();
                        }
                        else
                        {
index 39d7839..035c12d 100644 (file)
@@ -410,7 +410,7 @@ DeveloperOptionForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::Gro
                                        itemSelectStatus = !itemSelectStatus;
                                }
 
-                               if(itemSelectStatus)
+                               if (itemSelectStatus)
                                {
                                        CreateAlertPopup();
                                        ShowAlertPopup();
index 42da8f3..3d5a2e8 100644 (file)
@@ -471,7 +471,6 @@ DisplayForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::Tabl
        int index = 0;
        String itemText;
        String subItemText;
-       Label* pLabel = null;
        Label* pSubLabel = null;
 
        switch (groupIndex)
@@ -638,37 +637,37 @@ DisplayForm::GetBackLightTimeIndexString(int itemIndex)
        {
        case ID_ITEM_BACKLIGHT_TIME_15_SECONDS:
                {
-                       itemText = L"15 seconds";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_15_SECONDS");
                }
                break;
 
        case ID_ITEM_BACKLIGHT_TIME_30_SECONDS:
                {
-                       itemText = L"30 seconds";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_30_SECONDS");
                }
                break;
 
        case ID_ITEM_BACKLIGHT_TIME_1_MINUTE:
                {
-                       itemText = L"1 minute";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_1_MINUTE");
                }
                break;
 
        case ID_ITEM_BACKLIGHT_TIME_2_MINUTES:
                {
-                       itemText = L"2 minutes";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_2_MINUTES");
                }
                break;
 
        case ID_ITEM_BACKLIGHT_TIME_5_MINUTES:
                {
-                       itemText = L"5 minutes";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_5_MINUTES");
                }
                break;
 
        case ID_ITEM_BACKLIGHT_TIME_10_MINUTES:
                {
-                       itemText = L"10 minutes";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_10_MINUTES");
                }
                break;
        }
index d9ccca9..2302f20 100644 (file)
@@ -101,6 +101,10 @@ HomeAndLockScreenForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ
 
                __pTableView->UpdateTableView();
        }
+       else if (previousSceneId.Equals(IDSCN_SCREEN_TYPE, false))
+       {
+               __pTableView->RefreshItem(0,0,TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+       }
        else
        {
                AppLogDebug("pArgs Null");
@@ -321,6 +325,21 @@ HomeAndLockScreenForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::Tabl
 void
 HomeAndLockScreenForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
 {
+       switch (groupIndex)
+       {
+       case ID_GROUP_SCREEN_TYPE:
+               {
+                       String secondLineText;
+                       Label* pSecondLabel = static_cast<Label*>(pItem->GetControl(1));
+                       secondLineText = GetGroupItemSelectedText();
+                       pSecondLabel->SetText(secondLineText);
+                       pSecondLabel->Invalidate(false);
+               }
+               break;
+
+       default:
+               break;
+       }
        Invalidate(true);
 }
 
@@ -410,11 +429,11 @@ HomeAndLockScreenForm::GetGroupItemText(int groupIndex)
                {
                        if (GetWallpaperIndex())
                        {
-                               itemText = L"Lock screen type";
+                               itemText = ResourceManager::GetString(L"IDS_ST_BODY_SCREEN_LOCK_TYPE");
                        }
                        else
                        {
-                               itemText = L"Home screen type";
+                               itemText = ResourceManager::GetString(L"IDS_ST_BODY_HOME_SCREEN_TYPE");
                        }
                }
                break;
@@ -423,11 +442,11 @@ HomeAndLockScreenForm::GetGroupItemText(int groupIndex)
                {
                        if (GetWallpaperIndex())
                        {
-                               itemText = L"Lock screen wallpaper";
+                               itemText = ResourceManager::GetString(L"IDS_ST_MBODY_LOCK_SCREEN_WALLPAPER_M_NOUN");
                        }
                        else
                        {
-                               itemText = L"Home screen wallpaper";
+                               itemText = ResourceManager::GetString(L"IDS_ST_MBODY_HOME_SCREEN_WALLPAPER");
                        }
                }
                break;
@@ -462,12 +481,12 @@ HomeAndLockScreenForm::GetGroupItemSelectedText(void)
                if (applicationId.Equals(L"org.tizen.menu-screen", false))
                {
                        // Preloaded home
-                       itemText = L"Default HomeScreen";
+                       itemText = ResourceManager::GetString(L"IDS_ST_BODY_DEFAULT_HOME_SCREEN");
                }
                else if (applicationId.Equals(L"org.tizen.lockscreen", false))
                {
                        // Preloaded lock
-                       itemText = L"Default LockScreen";
+                       itemText = ResourceManager::GetString(L"IDS_ST_MBODY_SWIPE");
                }
                else
                {
index 7c465f5..881237b 100644 (file)
@@ -998,7 +998,11 @@ MainMenuForm::IsEmulator(void)
 void
 MainMenuForm::FindAppControlScene(int itemIndex)
 {
-       if (__isRunningAppControl) return;
+       if (__isRunningAppControl)
+       {
+               AppLogDebug("busy status");
+               return;
+       }
 
        String providerId;
        String operationId = APPCONTROL_OPERATION_ID_CONFIGURE;
@@ -1101,4 +1105,4 @@ MainMenuForm::OnFocusGained(const Tizen::Ui::Control& source)
 void
 MainMenuForm::OnFocusLost(const Tizen::Ui::Control& source)
 {
-}
+}
\ No newline at end of file
index b17886a..13a17a1 100644 (file)
@@ -293,13 +293,13 @@ ScreenTypeForm::GetTitleText(void)
        {
        case ID_INDEX_HOME_SCREEN_WALLPAPER:
                {
-                       headerText = L"Home screen type";
+                       headerText = ResourceManager::GetString(L"IDS_ST_BODY_HOME_SCREEN_TYPE");
                }
                break;
 
        case ID_INDEX_LOCK_SCREEN_WALLPAPER:
                {
-                       headerText = L"Lock screen type";
+                       headerText = ResourceManager::GetString(L"IDS_ST_BODY_SCREEN_LOCK_TYPE");
                }
                break;
        }
@@ -476,12 +476,12 @@ ScreenTypeForm::GetItemString(int itemIndex)
                        if (applicationId.Equals(L"org.tizen.menu-screen", false))
                        {
                                // Preloaded home
-                               returnValue = L"Default HomeScreen";
+                               returnValue = ResourceManager::GetString(L"IDS_ST_BODY_DEFAULT_HOME_SCREEN");
                        }
                        else if (applicationId.Equals(L"org.tizen.lockscreen", false))
                        {
                                // Preloaded lock
-                               returnValue = L"Default LockScreen";
+                               returnValue = ResourceManager::GetString(L"IDS_ST_MBODY_SWIPE");
                        }
                        else
                        {
index a378e90..5083524 100644 (file)
@@ -40,7 +40,6 @@ static const int W_HUGE_SIZE_LANDSCAPE_TEXT_GAP = 220;
 static const int LINE_COUNT_DEFAULT = 1;
 
 static const int BASE_FORM_DEFAULT_MARGIN = 32;
-static const wchar_t* ALBUM_NAME_ALL_ALBUMS = L"All albums";
 
 WallpaperAlbumListDetailForm::WallpaperAlbumListDetailForm(void)
        : __itemCount(0)
@@ -385,7 +384,8 @@ WallpaperAlbumListDetailForm::SetAllAlbumPathList(void)
 {
        String isAllAlbum = *static_cast<String*>(__pAlbumPathList->GetAt(0));
 
-       if (isAllAlbum.Equals(ALBUM_NAME_ALL_ALBUMS, true) == false)
+       String allAlbumsString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
+       if (isAllAlbum.Equals(allAlbumsString, true) == false)
        {
                AppLogDebug("__pAlbumPathList is not AllAlbum");
                return;
@@ -397,7 +397,7 @@ WallpaperAlbumListDetailForm::SetAllAlbumPathList(void)
        AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(0));
        ArrayList* pAlbumPathList = new (std::nothrow) ArrayList(SingleObjectDeleter);
        pAlbumPathList->Construct();
-       pAlbumPathList->Add(*(new (std::nothrow) String(ALBUM_NAME_ALL_ALBUMS)));
+       pAlbumPathList->Add(*(new (std::nothrow) String(allAlbumsString)));
        for (int i = 0; i < pAlbumInfo->GetDirectoryCount(); i++)
        {
                pAlbumPathList->Add(*(new (std::nothrow) String(pAlbumInfo->GetDirectory(i))));
index 5553c92..ddaef8d 100644 (file)
@@ -32,7 +32,6 @@ using namespace Tizen::Ui::Scenes;
 
 static const int W_FOLDER_SIZE = 334;
 static const int H_FOLDER_SIZE = 334;
-static const wchar_t* ALBUM_NAME_ALL_ALBUMS = L"All albums";
 
 static const int W_LARGE_SIZE_TEXT_GAP = 110;
 static const int W_HUGE_SIZE_PORTRAIT_TEXT_GAP = 90;
@@ -160,7 +159,8 @@ WallpaperAlbumListForm::OnIconListViewItemStateChanged(IconListView& view, int i
                pAlbumPathList->Construct();
                if (index == 0)
                {
-                       pAlbumPathList->Add(*(new (std::nothrow) String(ALBUM_NAME_ALL_ALBUMS)));
+                       String allAlbumsString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
+                       pAlbumPathList->Add(*(new (std::nothrow) String(allAlbumsString)));
                }
                for (int i = 0; i < pAlbumInfo->GetDirectoryCount(); i++)
                {
index f3f8bdd..a08813b 100644 (file)
@@ -69,10 +69,6 @@ static const int TRIPLE_NUMBER = 3;
 
 static const wchar_t* EMPTY_SPACE = L"";
 static const wchar_t* DIRECTORY_SEPARATOR = L"/";
-static const wchar_t* ALBUM_NAME_ALL_ALBUMS = L"All albums";
-static const wchar_t* ALBUM_NAME_CAMERA = L"Camera";
-static const wchar_t* ALBUM_NAME_DOWNLOADS = L"Downloads";
-static const wchar_t* ALBUM_NAME_NO_NAME = L"No name";
 
 static const int MAX_UNDER_FILE_SIZE = 334;
 static const int MAX_OVER_FILE_SIZE = 158;
@@ -235,10 +231,13 @@ WallpaperAlbumListPresentationModel::DrawFontImage(Canvas& canvas, AlbumInfo* pA
 
        String strFolderName = pAlbumInfo->GetAlbumName();
        Color colorBack = COLOR_BLACK;
+       String allAlbumsString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
+       String cameraString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB");
+       String downloadsString = ResourceManager::GetString(L"IDS_ST_BODY_DOWNLOADS");
 
-       if ((strFolderName == ALBUM_NAME_ALL_ALBUMS)
-               || (strFolderName == ALBUM_NAME_CAMERA)
-               || (strFolderName == ALBUM_NAME_DOWNLOADS))
+       if ((strFolderName == allAlbumsString)
+               || (strFolderName == cameraString)
+               || (strFolderName == downloadsString))
        {
                colorBack = COLOR_BLACK;
        }
@@ -585,7 +584,8 @@ WallpaperAlbumListPresentationModel::InitializeAlbumInfoList(void)
                return;
        }
 
-       pAllAlbumInfo->SetAlbumName(ALBUM_NAME_ALL_ALBUMS);
+       String allAlbumsString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
+       pAllAlbumInfo->SetAlbumName(allAlbumsString);
        AlbumInfo* pCameraAlbumInfo = new (std::nothrow) AlbumInfo();
        r = pCameraAlbumInfo->Construct();
        if (r != E_SUCCESS)
@@ -597,7 +597,8 @@ WallpaperAlbumListPresentationModel::InitializeAlbumInfoList(void)
                return;
        }
 
-       pCameraAlbumInfo->SetAlbumName(ALBUM_NAME_CAMERA);
+       String cameraString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB");
+       pCameraAlbumInfo->SetAlbumName(cameraString);
        AlbumInfo* pDownloadAlbumInfo = new (std::nothrow) AlbumInfo();
        r = pDownloadAlbumInfo->Construct();
        if (r != E_SUCCESS)
@@ -610,7 +611,8 @@ WallpaperAlbumListPresentationModel::InitializeAlbumInfoList(void)
                return;
        }
 
-       pDownloadAlbumInfo->SetAlbumName(ALBUM_NAME_DOWNLOADS);
+       String downloadsString = ResourceManager::GetString(L"IDS_ST_BODY_DOWNLOADS");
+       pDownloadAlbumInfo->SetAlbumName(downloadsString);
        AlbumInfo* pNoNameAlbumInfo = new (std::nothrow) AlbumInfo();
        r = pNoNameAlbumInfo->Construct();
        if (r != E_SUCCESS)
@@ -624,7 +626,8 @@ WallpaperAlbumListPresentationModel::InitializeAlbumInfoList(void)
                return;
        }
 
-       pNoNameAlbumInfo->SetAlbumName(ALBUM_NAME_NO_NAME);
+       String noNameString = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME");
+       pNoNameAlbumInfo->SetAlbumName(noNameString);
        if ((pContentDirectoryPathList == null) || (pContentDirectoryPathList->GetCount() <= 0))
        {
                delete pAllAlbumInfo;