Change delete string
[apps/osp/ImageViewer.git] / src / IvImageViewerForm.cpp
index e3078b2..3dcd141 100644 (file)
@@ -44,7 +44,8 @@ using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-static const unsigned int COLOR_HEADER_CONTORL_PANEL = Color32<0, 0, 0, 100>::Value;
+static const unsigned int COLOR_HEADER_CONTROL_LABEL = Color32<0, 0, 0, 0>::Value;
+static const unsigned int COLOR_HEADER_CONTROL_PANEL = Color32<0, 0, 0, 100>::Value;
 static const unsigned int COLOR_HEADER_BUTTON1 = Color32<0, 0, 0, 100>::Value;
 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<208, 82, 82>::Value;
 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
@@ -202,7 +203,7 @@ ImageViewerForm::OnInitializing(void)
        {
                return E_FAILURE;
        }
-       __pLabel->SetBackgroundColor(COLOR_HEADER_CONTORL_PANEL);
+       __pLabel->SetBackgroundColor(COLOR_HEADER_CONTROL_LABEL);
        SetControlAlwaysOnTop(*__pLabel,true);
        int allCount = __pPresentationModel->GetFileCount();
        int index = 1 ;
@@ -517,6 +518,8 @@ ImageViewerForm::DeleteImageFile()
 
        GetLabelText(__pGallery->GetCurrentItemIndex(), strItemIdxText);
 
+       __pLabel->SetText(strItemIdxText);
+
        if (__visible == true)
        {
                ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath);
@@ -575,7 +578,8 @@ ImageViewerForm::CreateGallery(void)
        case SLIDE_SHOW_TRANSITION_EFFECT_ZOOM:
                __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_ZOOM);
                break;
-       case SLIDE_SHOW_TRANSITION_EFFECT_SLIDE:
+       case SLIDE_SHOW_TRANSITION_EFFECT_PAGE:
+               __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_PAGE);
                break;
        }
 
@@ -660,7 +664,7 @@ ImageViewerForm::InitializePanelDetail()
                __pDetail_FileInfo_Value_Label[i]->SetTextConfig(DETAIL_MAIN_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
        }
 
-       __pScrollPanel->SetBackgroundColor(COLOR_HEADER_CONTORL_PANEL);
+       __pScrollPanel->SetBackgroundColor(COLOR_HEADER_CONTROL_PANEL);
        __pScrollPanel->SetShowState(false);
 
        __pRenameButton = new (std::nothrow) Button();
@@ -715,7 +719,7 @@ ImageViewerForm::InitializePopup(void)
 
                Label* pLabel = new (std::nothrow) Label();
                pLabel->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL),
-                               ResourceManager::GetString(L"IDS_COM_BODY_DELETE") + L"?");
+                               ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
 
                Button* pDeleteButton = new (std::nothrow) Button();
                pDeleteButton->Construct(
@@ -809,7 +813,7 @@ ImageViewerForm::InitializeContextMenuSetAs(void)
                        ACTION_ID_CONTEXTMENU_HOME);
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"),
                        ACTION_ID_CONTEXTMENU_LOCK);
-       __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"),
+       __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_HOME_AND_LOCK_SCREENS"),
                        ACTION_ID_CONTEXTMENU_HOME_AND_LOCK);
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CALLER_IMAGE"),
                        ACTION_ID_CONTEXTMENU_CALLER);
@@ -869,7 +873,6 @@ ImageViewerForm::SetDetailInfo(void)
 
        Rectangle clientRect = GetClientAreaBounds();
        __pScrollPanel->SetBounds(0,__pLabel->GetHeight(), clientRect.width, clientRect.height - __pLabel->GetHeight());
-
        int currentIndex = __pGallery->GetCurrentItemIndex();
        String strFilePath = __pPresentationModel->GetFilePathAt(currentIndex);
 
@@ -983,7 +986,23 @@ ImageViewerForm::SetDetailInfo(void)
        for (int i = 0; i < DETAIL_COUNT_MAX; ++i)
        {
                __pDetail_FileInfo_Value_Label[i]->SetText(strResult[i]);
-               __pDetail_FileInfo_Value_Label[i]->RequestRedraw();
+
+               if (i == DETAIL_COUNT_MAX - 1)
+               {
+                       __pDetail_FileInfo_Value_Label[i]->SetBounds(
+                                       Rectangle(X_DETAIL_FILEINFO_LABEL,
+                                                       GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1),
+                                                       clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL * 3));
+               }
+               else
+               {
+                       __pDetail_FileInfo_Value_Label[i]->SetBounds(
+                                       Rectangle(X_DETAIL_FILEINFO_LABEL,
+                                                       GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1),
+                                                       clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL));
+               }
+
+               __pDetail_FileInfo_Value_Label[i]->Invalidate(true);
        }
 
        if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK)
@@ -1007,11 +1026,15 @@ ImageViewerForm::ShowPanelDetail(bool showStatus)
        if (showStatus)
        {
                SetDetailInfo();
+               __pLabel->SetBackgroundColor(COLOR_HEADER_CONTROL_PANEL);
+               __pLabel->Invalidate(true);
                __pScrollPanel->SetShowState(true);
                __detail = false;
        }
        else
        {
+               __pLabel->SetBackgroundColor(COLOR_HEADER_CONTROL_LABEL);
+               __pLabel->Invalidate(true);
                __pScrollPanel->SetShowState(false);
                __detail = true;
        }
@@ -1094,7 +1117,7 @@ ImageViewerForm::CreateItem(int index)
 
        int curIndex = index;
 
-       if(__shuffle == true && __pShuffledList != null)
+       if (__shuffle == true && __pShuffledList != null)
        {
                curIndex = __pShuffledList[index];
        }
@@ -1417,9 +1440,28 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
        case ACTION_ID_FOOTER_BUTTON_CROP:
        {
                String filePath;
-               ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
                filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+               ImageBuffer imagebuffer;
+               result r = imagebuffer.Construct(filePath);
+               if (r != E_SUCCESS)
+               {
+                       return;
+               }
+               int imageWidth = imagebuffer.GetWidth();
+               int imageHeight = imagebuffer.GetHeight();
+               if (imageWidth <= (CROP_RECTANGLE_HEIGHT * 3) || imageHeight <= (CROP_RECTANGLE_HEIGHT * 3))
+               {
+                       MessageBox messageBox;
+                       String messageText = ResourceManager::GetString(L"IDS_IMGE_POP_IMAGE_IS_TOO_SMALL");
+                       messageBox.Construct(L"", messageText, MSGBOX_STYLE_OK, 3000);
+                       int modalResult = 0;
+                   messageBox.ShowAndWait(modalResult);
+                   return;
+               }
+               String cropMode = L"auto";
+               ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
                pList->Add(new (std::nothrow) String(filePath));
+               pList->Add(new (std::nothrow) String(cropMode));
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
        }
        break;
@@ -1428,10 +1470,8 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                int currentIndex = __pGallery->GetCurrentItemIndex();
                String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
                RotateMode rotateMode = ROTATE_MODE_RIGHT;
-               __pPresentationModel->SetImageRotateStatus(true);
                RotateImage(filePath, rotateMode);
                __pPresentationModel->RequestImage(filePath);
-               //Invalidate(true);
                ContentManager::ScanFile(filePath);
        }
        break;
@@ -1440,10 +1480,8 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                int currentIndex = __pGallery->GetCurrentItemIndex();
                String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
                RotateMode rotateMode = ROTATE_MODE_LEFT;
-               __pPresentationModel->SetImageRotateStatus(true);
                RotateImage(filePath, rotateMode);
                __pPresentationModel->RequestImage(filePath);
-               //Invalidate(true);
                ContentManager::ScanFile(filePath);
        }
        break;
@@ -1470,20 +1508,24 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
        }
        case ACTION_ID_CONTEXTMENU_HOME:
        {
+               String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+               String cropMode = "fit-to-screen";
                ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex()));
+               pList->Add(new (std::nothrow) String(filePath));
+               pList->Add(new (std::nothrow) String(cropMode));
                pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_HOME_SCREEN_WALLPAPER));
-               __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList);
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                break;
        }
        case ACTION_ID_CONTEXTMENU_LOCK:
        {
+               String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+               String cropMode = "fit-to-screen";
                ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex()));
+               pList->Add(new (std::nothrow) String(filePath));
+               pList->Add(new (std::nothrow) String(cropMode));
                pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_LOCK_SCREEN_WALLPAPER));
-               __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList);
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                break;
        }
        case ACTION_ID_CONTEXTMENU_CALLER:
@@ -1504,12 +1546,13 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
 
        case ACTION_ID_CONTEXTMENU_HOME_AND_LOCK:
        {
+               String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+               String cropMode = "fit-to-screen";
                ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex()));
+               pList->Add(new (std::nothrow) String(filePath));
+               pList->Add(new (std::nothrow) String(cropMode));
                pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_HOME_AND_LOCK_SCREEN_WALLPAPER));
-               __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList);
-               break;
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                break;
        }
 
@@ -1565,40 +1608,35 @@ void
 ImageViewerForm::RotateImage(String& filePath, RotateMode rotateMode)
 {
        result r = E_SUCCESS;
+       ImageBuffer rotateBuffer;
        ImageBuffer* pRotatedBuffer = null;
-       ImageBuffer* pRotatedBuffer1 = null;
        ImageFormat imageFormat;
-       int width = 0;
-       int height = 0;
-       pRotatedBuffer = new (std::nothrow) ImageBuffer();
-       r = pRotatedBuffer->Construct(filePath);
-       pRotatedBuffer->GetImageInfo(filePath, imageFormat, width, height);
+       Image img;
+       r = img.Construct();
+
+       if (r == E_SUCCESS)
+       {
+               imageFormat = img.GetImageFormat(filePath);
+       }
+
+       r = rotateBuffer.Construct(filePath);
        if (r == E_SUCCESS)
        {
                if (rotateMode == ROTATE_MODE_RIGHT)
                {
-                       pRotatedBuffer1 = pRotatedBuffer->RotateN(IMAGE_ROTATION_90);
+                       pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_90);
                }
                else
                {
-                       pRotatedBuffer1 = pRotatedBuffer->RotateN(IMAGE_ROTATION_270);
+                       pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_270);
                }
        }
-       TryCatch(pRotatedBuffer1 != null, r = GetLastResult(), "RotateN failed:%s", GetErrorMessage(GetLastResult()));
-       pRotatedBuffer1->EncodeToFile(filePath, imageFormat, true, 100);
-       delete pRotatedBuffer1;
-       delete pRotatedBuffer;
-       return;
 
-       CATCH:
-       if (pRotatedBuffer != null) //this buffer is no longer used
+       if (pRotatedBuffer != null)
        {
+               r = pRotatedBuffer->EncodeToFile(filePath, imageFormat, true, 100);
                delete pRotatedBuffer;
        }
-       if (pRotatedBuffer1 != null) //this buffer is no longer used
-       {
-               delete pRotatedBuffer1;
-       }
        return;
 }
 
@@ -1642,15 +1680,11 @@ ImageViewerForm::OnSceneActivatedN(const SceneId& previousSceneId,
 
        if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null)
        {
-               AppLog("Manish hello");
-               String* pFilePath = null;
-               pFilePath = static_cast<String*>(pArgs->GetAt(0));
-               delete pArgs;
-               AppLog("Manish %ls", pFilePath->GetPointer());
                String filePath;
-               filePath.Append(*pFilePath);
+               filePath = *(static_cast<String*>(pArgs->GetAt(0)));
+               delete pArgs;
                int count = __pPresentationModel->GetFileCount();
-               __pPresentationModel->SetImageCacheAt(count, filePath);
+               __pPresentationModel->AddImageCache(filePath);
                __pGallery->UpdateGallery();
                __pGallery->SetCurrentItemIndex(count);
                __pPresentationModel->RequestImage(filePath);
@@ -1709,15 +1743,15 @@ ImageViewerForm::OnAppControlCompleteResponseReceived(const AppId& appId,
                if (pContactId != null && pContactId->GetLength() > 0)
                {
                        LongLong::Parse(*pContactId, lresult);
-
+                       String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+                       String cropMode = "fit-to-screen";
                        ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-                       pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex()));
+                       pList->Add(new (std::nothrow) String(filePath));
+                       pList->Add(new (std::nothrow) String(cropMode));
                        pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_CALLER_IMAGE));
                        pList->Add(new (std::nothrow) LongLong(lresult));
-                       __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
-
                        SceneManager* pSceneManager = SceneManager::GetInstance();
-                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList);
+                       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                }
        }
 
@@ -1810,8 +1844,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                 __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
                                                        ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue);
 
-               
-               if(shuffleValue != 0)
+               if (shuffleValue != 0)
                {
                        __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
                        CreateShuffledList(__pPresentationModel->GetFileCount());
@@ -1823,7 +1856,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                        __shuffle = false;
                }
 
-               if( repeatValue == 0)
+               if ( repeatValue == 0)
                {
                        __pGallery->StartSlideShow(false);
                }
@@ -1979,10 +2012,10 @@ ImageViewerForm::OnRequestEmailAction(void)
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
 
-       IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
        pList->Add(new (std::nothrow) String(filePath));
 
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pList);
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pList);
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
                        new (std::nothrow) String(APPCONTROL_URI_MAIL_TO), null, pDataList, this);
@@ -2005,12 +2038,13 @@ ImageViewerForm::OnRequestMessagesAction(void)
 
        HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
        pDataList->Construct();
-       IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
        pList->Add(new (std::nothrow) String(filePath));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pList);
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pList);
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGES, APPCONTROL_OPERATION_ID_COMPOSE,
-                       new (std::nothrow) String(APPCONTROL_URI_MMS_TO), null, pDataList, this);
+       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGES, APPCONTROL_OPERATION_ID_COMPOSE, null,
+                       null, pDataList, this);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -2141,7 +2175,7 @@ ImageViewerForm::GetQuickThumbnailN(String& filePath)
                {
                        Canvas mainCanvas;
                        mainCanvas.Construct(DUMMY_IMAGE_RECTANGLE);
-                       mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), DUMMY_IMAGE_RECTANGLE);
+                       mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), DUMMY_IMAGE_RECTANGLE);
                        pBitmap = new (std::nothrow) Bitmap();
                        pBitmap->Construct(mainCanvas, DUMMY_IMAGE_RECTANGLE);
                }
@@ -2153,35 +2187,30 @@ ImageViewerForm::GetQuickThumbnailN(String& filePath)
 void ImageViewerForm::OnFormFileEventOccuered(const int index, const unsigned long eventId)
 {
        AppLogDebug(" ENTER");
-       bool eventDelete = (eventId & FILE_EVENT_TYPE_DELETE_SELF);
-       bool eventMove = (eventId & 0x8000);// (eventId & FILE_EVENT_TYPE_MOVE_SELF);
 
        int currentIndex = __pGallery->GetCurrentItemIndex();
-       int countPath = __pPresentationModel->GetFileCount();
+       int fileCount = __pPresentationModel->GetFileCount();
 
-       if (countPath == 0 && eventDelete)
+       if (fileCount == 0 && eventId == IV_FILE_DELETE)
        {
                UiApp* pApp = UiApp::GetInstance();
                pApp->Terminate();
                AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
        }
-       AppLogDebug(" countPath is %d", countPath);
-       AppLogDebug(" currentIndex is %d", currentIndex);
 
-       if (countPath == currentIndex && eventDelete)
+       if (fileCount <= currentIndex && eventId == IV_FILE_DELETE)
        {
-               __pGallery->SetCurrentItemIndex(--currentIndex);
+               currentIndex = fileCount - 1;
        }
-       else if (eventMove)
+       else if (eventId == IV_FILE_CREATE)
        {
                currentIndex = index;
-               __pGallery->SetCurrentItemIndex(currentIndex);
        }
 
-       String strItemIdxText(EMPTY_SPACE);
 
+       String strItemIdxText(EMPTY_SPACE);
+       __pGallery->SetCurrentItemIndex(currentIndex);
        __pGallery->UpdateGallery();
-       AppLogDebug(" UpdateGallery is %d", currentIndex);
        String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
        __pPresentationModel->RequestImage(filePath);
 
@@ -2221,11 +2250,20 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
 
        if (index == 0)   // start slide show
        {
-               int repeatValue = 0;
+       int repeatValue = 0;
+               int interval = 0 ;
+               int transitioneffect = 0;
 
                if (__pPresentationModel->GetFileCount() > 1)
                {
                        int shuffleValue;
+                       __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
+                                                                       ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, interval);
+
+                               interval = interval * 1000;
+                       AppLogDebug("The slide interval is %d", interval);
+                               __pGallery->SetSlideShowViewDuration(interval);
+
 
                        __pGallery->UpdateGallery();
 
@@ -2240,6 +2278,22 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
                        __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
                                        ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue);
 
+                        __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
+                                   ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, transitioneffect);
+
+                        if (transitioneffect == 1)
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_DISSOLVE);
+                        }
+                        else if (transitioneffect == 2)
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_ZOOM);
+                        }
+                        else
+                        {
+                                __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_PAGE);
+                        }
+
                        if (shuffleValue != 0)
                        {
                                __shuffelStartIndex = __pGallery->GetCurrentItemIndex();