Nabi issue resolution N_SE-37526, N_SE-37531, N_SE-37492, N_SE-37552
authorchitta ranjan <chitta.rs@samsung.com>
Tue, 7 May 2013 07:02:50 +0000 (16:02 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Tue, 7 May 2013 07:02:50 +0000 (16:02 +0900)
Change-Id: I83e5989d00a05d27ae6b9e47e673c3583f08befa
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/StDateTimeForm.cpp
src/StManageApplicationInfoForm.cpp
src/StSoundsForm.cpp
src/StWallpaperAlbumListDetailForm.cpp

index 364440d..8850080 100644 (file)
@@ -24,6 +24,7 @@
 #include "StSettingScenesList.h"
 #include "StTypes.h"
 
+using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Locales;
@@ -68,11 +69,14 @@ static const int H_TIME_FIELD = 150;
 
 static const int SECOND_CONTROL_ITEM = 1;
 static const int SECOND_TEXT_ITEM = 2;
-static const int MIN_YEAR = 1970;
-static const int MAX_YEAR = 2037;
+static int MIN_YEAR = 1980;
+static int MAX_YEAR = 2035;
 static const float RESIZE_RATE = 5.5;
 static const int DIVIDE_BY_TEN = 10;
 
+const String MinYearKey("MinYearKey");
+const String MaxYearKey("MaxYearKey");
+
 DateTimeForm::DateTimeForm(void)
 {
 }
@@ -100,6 +104,27 @@ DateTimeForm::OnInitializing(void)
        CreateHeader(ResourceManager::GetString(L"IDS_ST_BODY_DATE_AND_TIME"));
        CreateFooter();
        CreateTableView();
+       result r = E_FAILURE;
+       Tizen::App::AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
+
+       r = pAppRegistry->Get(MinYearKey, MIN_YEAR);
+       if (r == E_KEY_NOT_FOUND)
+       {
+               pAppRegistry->Add(MinYearKey, MIN_YEAR);
+       }
+
+       r = pAppRegistry->Get(MaxYearKey, MAX_YEAR);
+       if (r == E_KEY_NOT_FOUND)
+       {
+               pAppRegistry->Add(MaxYearKey, MAX_YEAR);
+       }
+       r = pAppRegistry->Save();
+       if (IsFailed(r))
+       {
+               // Failed to save data to registry
+               AppLogDebug("OnInitialized failed to save data to registry with %s", GetErrorMessage(r));
+               return E_FAILURE;
+       }
 
        AppLogDebug("ENTER");
 
@@ -527,9 +552,27 @@ DateTimeForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
 
                bool hourFormat = false;
+
+               Tizen::App::AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
+
                EditDate* pEditDate = new (std::nothrow) EditDate();
                pEditDate->Construct(Point(0, 0), itemMainText);
                pEditDate->SetCurrentDate();
+
+               if (pEditDate->GetYear() < MIN_YEAR)
+               {
+                       MIN_YEAR--;
+                       pAppRegistry->Set(MinYearKey, MIN_YEAR);
+                       pAppRegistry->Save();
+               }
+
+               if (pEditDate->GetYear() > MAX_YEAR)
+               {
+                       MAX_YEAR++;
+                       pAppRegistry->Set(MaxYearKey, MAX_YEAR);
+                       pAppRegistry->Save();
+               }
+
                pEditDate->SetYearRange(MIN_YEAR, MAX_YEAR);
                pEditDate->AddDateChangeEventListener(*this);
                pEditDate->SetName(L"EditDate");
index 7edb936..6d55182 100644 (file)
@@ -813,7 +813,7 @@ ManageApplicationInfoForm::CreateUninstallPopup(void)
 
        __uninstallConfirmPopup->AddControl(*pLabel);
 
-       buttonText = ResourceManager::GetString(L"IDS_ST_BODY_DELETE");
+       buttonText = ResourceManager::GetString(L"IDS_ST_BUTTON_UNINSTALL");
        pOkButton = new (std::nothrow) Button();
        pOkButton->Construct(itemRectLhsButton, buttonText);
        pOkButton->SetActionId(IDA_UNINSTALL_CONFIRM_OK);
@@ -905,4 +905,4 @@ ManageApplicationInfoForm::DeleteUninstallPopup(void)
                delete __pProgressPopup;
                __pProgressPopup = null;
        }
-}
\ No newline at end of file
+}
index 0b6d97f..8e10177 100644 (file)
@@ -156,16 +156,16 @@ SoundsForm::OnInitializing(void)
 result
 SoundsForm::OnTerminating(void)
 {
-       PlayerState estate = __pSoundPlay->GetState();
-       if ((estate == PLAYER_STATE_OPENED) || (estate == PLAYER_STATE_PAUSED)
-               || (estate == PLAYER_STATE_PLAYING)
-               || (estate == PLAYER_STATE_ENDOFCLIP) || (estate == PLAYER_STATE_STOPPED))
-       {
-               __pSoundPlay->Stop();
-               __pSoundPlay->Close();
-       }
        if (__pSoundPlay != null)
        {
+               PlayerState estate = __pSoundPlay->GetState();
+               if ((estate == PLAYER_STATE_OPENED) || (estate == PLAYER_STATE_PAUSED)
+                       || (estate == PLAYER_STATE_PLAYING)
+                       || (estate == PLAYER_STATE_ENDOFCLIP) || (estate == PLAYER_STATE_STOPPED))
+               {
+                       __pSoundPlay->Stop();
+                       __pSoundPlay->Close();
+               }
                delete __pSoundPlay;
        }
 
index 23a5122..b63e313 100644 (file)
@@ -471,10 +471,10 @@ WallpaperAlbumListDetailForm::OnAppControlCompleteResponseReceived(const AppId&
                                                        {
                                                        case 0:
                                                        {
-                                                               dstPath.Append(L"/home.");
+                                                               dstPath.Append(L"home.");
                                                                dstPath.Append(srcFileExtention);
                                                                File::Copy(srcPath, dstPath, false);
-
+                                                               AppLog("FilePath = %S", dstPath.GetPointer());
                                                                if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
                                                                {
                                                                        AppLogDebug("Wallpaper Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
@@ -497,7 +497,7 @@ WallpaperAlbumListDetailForm::OnAppControlCompleteResponseReceived(const AppId&
 
                                                        case 2:
                                                        {
-                                                               dstPath.Append(L"/homelock.");
+                                                               dstPath.Append(L"homelock.");
                                                                dstPath.Append(srcFileExtention);
                                                                File::Copy(srcPath, dstPath, false);