From f205d7edd9bc09e565d49e0602649c68bda719e0 Mon Sep 17 00:00:00 2001 From: chitta ranjan Date: Thu, 4 Apr 2013 12:30:20 +0900 Subject: [PATCH] Added shffule option in settings form Change-Id: Icb54970cc1c060fe8b7529817f543f2de6a2ce3a Signed-off-by: chitta ranjan --- inc/GlSettingMainForm.h | 2 +- src/GlSettingMainForm.cpp | 72 +++++++++++++++++++++++------------------------ 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/inc/GlSettingMainForm.h b/inc/GlSettingMainForm.h index 3aa88d5..5cd091f 100644 --- a/inc/GlSettingMainForm.h +++ b/inc/GlSettingMainForm.h @@ -45,7 +45,7 @@ enum SETTING_INTERVAL_10, //5 SETTING_INTERVAL_20, //6 SETTING_REPEAT, //7 - //SETTING_SHUFFLE, //8 + SETTING_SHUFFLE, //8 SETTING_TRANSITION_EFFECT_TITLE, //9 SETTING_TRANSITION_SLIDE, //10 SETTING_TRANSITION_DISSOLVE, //11 diff --git a/src/GlSettingMainForm.cpp b/src/GlSettingMainForm.cpp index 647a026..73dcc39 100644 --- a/src/GlSettingMainForm.cpp +++ b/src/GlSettingMainForm.cpp @@ -345,26 +345,26 @@ SettingMainForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, in } break; -// case SETTING_SHUFFLE: -// { -// int shuffleValue = 0; -// -// __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, -// ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue); -// -// if (shuffleValue == 0) -// { -// inputValue = 1; -// } -// else -// { -// inputValue = 0; -// } -// -// __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, -// ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, inputValue); -// } -// break; + case SETTING_SHUFFLE: + { + int shuffleValue = 0; + + __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue); + + if (shuffleValue == 0) + { + inputValue = 1; + } + else + { + inputValue = 0; + } + + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, inputValue); + } + break; default: break; @@ -558,11 +558,11 @@ void SettingMainForm::InitializeSettingValues(void) { pGroupItemCount = new(std::nothrow) int[1]; - pGroupItemCount[0] = 12; + pGroupItemCount[0] = 13; int interval = 0; int transitionValue = 0; int repeatValue = 0; - //int shuffletValue = 0; + int shuffletValue = 0; String selectedInterval; String selectedTransition; @@ -689,20 +689,20 @@ SettingMainForm::InitializeSettingValues(void) settingInfo[SETTING_REPEAT].isSelected = true ; } -// r = __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, -// ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffletValue); -// -// settingInfo[SETTING_SHUFFLE].titleText = L"Shuffle"; -// settingInfo[SETTING_SHUFFLE].itemType = ITEM_TYPE_TOGGLE; -// -// if ( shuffletValue == 0) -// { -// settingInfo[SETTING_SHUFFLE].isSelected = false ; -// } -// else -// { -// settingInfo[SETTING_SHUFFLE].isSelected = true ; -// } + r = __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffletValue); + + settingInfo[SETTING_SHUFFLE].titleText = L"Shuffle"; + settingInfo[SETTING_SHUFFLE].itemType = ITEM_TYPE_TOGGLE; + + if ( shuffletValue == 0) + { + settingInfo[SETTING_SHUFFLE].isSelected = false ; + } + else + { + settingInfo[SETTING_SHUFFLE].isSelected = true ; + } settingInfo[SETTING_TRANSITION_EFFECT_TITLE].titleText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_TRANSITION_EFFECT"); settingInfo[SETTING_TRANSITION_EFFECT_TITLE].subText = selectedTransition; -- 2.7.4