Fix TDIS-5756 submit/tizen_2.1/20130514.051144
authorHyukSoon Choi <hs619.choi@samsung.com>
Mon, 13 May 2013 15:11:27 +0000 (00:11 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Mon, 13 May 2013 15:11:27 +0000 (00:11 +0900)
Change-Id: Ie17d7bf3c9472e0df98a42c4d994a772e39511e8
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
inc/IvTypes.h
src/IvImageCropForm.cpp
src/IvImageViewerForm.cpp
src/IvSettingPresentationModel.cpp
src/IvTypes.cpp

index 84e2572..699f7f1 100644 (file)
@@ -138,6 +138,7 @@ extern const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER;
 extern const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER;
 
 extern const wchar_t* FOLDER_PATH_DOWNLOADS;
+extern const wchar_t* PATH_DATA_DIRECTORY;
 
 extern const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
 extern const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
index 1c2a5f1..cfdf9a3 100644 (file)
@@ -147,7 +147,6 @@ void
 ImageCropForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER pArgs(%x)", pArgs);
-
        if (pArgs != null)
        {
                __sourceFilePath = *(static_cast<String*>(pArgs->GetAt(0)));
@@ -286,7 +285,8 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                int count = 1;
                                int index = 0;
                                String destFilePath;
-                               destFilePath.Append(App::GetInstance()->GetAppDataPath());
+                               destFilePath.Append(App::GetInstance()->GetAppSharedPath());
+                               destFilePath.Append(PATH_DATA_DIRECTORY);
                                destFilePath.Append(__pPresentationModel->GetFileName(__sourceFilePath));
                                destFilePath.Reverse();
                                destFilePath.IndexOf(FILE_EXT_SEPARATOR, 0, index);
@@ -298,7 +298,8 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                {
                                        count++;
                                        destFilePath.Clear();
-                                       destFilePath.Append(App::GetInstance()->GetAppDataPath());
+                                       destFilePath.Append(App::GetInstance()->GetAppSharedPath());
+                                       destFilePath.Append(PATH_DATA_DIRECTORY);
                                        destFilePath.Append(__pPresentationModel->GetFileName(__sourceFilePath));
                                        destFilePath.Insert(FILE_NAME_SEPARATOR, destFilePath.GetLength() - index - 1);
                                        destFilePath.Insert(count, destFilePath.GetLength() - index - 1);
@@ -362,7 +363,7 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                                        if (__statusValue == SET_AT_TYPE_HOME_SCREEN_WALLPAPER)
                                        {
-                                               String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
+                                               String destPath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
                                                r = pCropBuffer->EncodeToFile(destPath, IMG_FORMAT_JPG, true, 100);
                                                if (r == E_SUCCESS)
                                                {
@@ -371,7 +372,7 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                        }
                                        else if (__statusValue == SET_AT_TYPE_LOCK_SCREEN_WALLPAPER)
                                        {
-                                               String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
+                                               String destPath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
                                                r = pCropBuffer->EncodeToFile(destPath, IMG_FORMAT_JPG, true, 100);
                                                if (r == E_SUCCESS)
                                                {
@@ -380,8 +381,8 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                        }
                                        else if (__statusValue == SET_AT_TYPE_HOME_AND_LOCK_SCREEN_WALLPAPER)
                                        {
-                                               String destPath = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
-                                               String destPathHome = App::GetInstance()->GetAppDataPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
+                                               String destPath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
+                                               String destPathHome = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
                                                r = pCropBuffer->EncodeToFile(destPath, IMG_FORMAT_JPG, true, 100);
                                                r = pCropBuffer->EncodeToFile(destPathHome, IMG_FORMAT_JPG, true, 100);
                                                if (r == E_SUCCESS)
@@ -396,7 +397,7 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                                                if (__sourceFilePath.IsEmpty() == false)
                                                {
-                                                       destFilePath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_CONTACT_IMAGE;
+                                                       destFilePath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_CONTACT_IMAGE;
                                                        r = pCropBuffer->EncodeToFile(destFilePath, IMG_FORMAT_JPG, true, 100);
                                                        Contact* pContact = null;
                                                        AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
index 3f44086..bf56b89 100644 (file)
@@ -1107,7 +1107,7 @@ void
 ImageViewerForm::DownloadFile(void)
 {
        AppLogDebug("ENTER");
-       String DestPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_WEB_FILE;
+       String DestPath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_WEB_FILE;
        if (File::IsFileExist(DestPath) == false)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
@@ -2156,7 +2156,7 @@ ImageViewerForm::OnImageDecodeUrlReceived (RequestId reqId, Bitmap *pBitmap,
        Image* pImage = new (std::nothrow) Image();
        pImage->Construct();
 
-       String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_WEB_FILE;
+       String destPath = App::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY + TEMP_FILE_PATH_WEB_FILE;
        r = pImage->EncodeToFile(*pBitmap, IMG_FORMAT_JPG, destPath, true);
 
        if (r == E_SUCCESS)
index 89d9437..d3af368 100644 (file)
 #include <FApp.h>
 #include <FIo.h>
 #include "IvSettingPresentationModel.h"
+#include "IvTypes.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Io;
 
 const wchar_t* GALLERY_APP_ID = L"ijudt7w61q.Gallery";
-const wchar_t* PATH_DATA_DIRECTORY = L"data/";
 const wchar_t* PATH_GALLERY_SETTINGS = L"GalleryDefaultSettings.ini";
 
 const wchar_t* SECTION_GALLERY = L"GALLRY_SETTING";
index 0b6f41d..9b42da1 100644 (file)
@@ -81,6 +81,7 @@ const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER = L"http://tizen.org/setting/
 const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper.lock";
 
 const wchar_t* FOLDER_PATH_DOWNLOADS = L"Downloads/";
+const wchar_t* PATH_DATA_DIRECTORY = L"data/";
 
 const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER = L"home.jpg";
 const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER = L"lock.jpg";