Change delete string
[apps/osp/ImageViewer.git] / src / IvImageViewerForm.cpp
index 78f1462..3dcd141 100644 (file)
@@ -719,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(
@@ -1117,7 +1117,7 @@ ImageViewerForm::CreateItem(int index)
 
        int curIndex = index;
 
-       if(__shuffle == true && __pShuffledList != null)
+       if (__shuffle == true && __pShuffledList != null)
        {
                curIndex = __pShuffledList[index];
        }
@@ -1440,9 +1440,26 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
        case ACTION_ID_FOOTER_BUTTON_CROP:
        {
                String filePath;
+               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);
-               filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
                pList->Add(new (std::nothrow) String(filePath));
                pList->Add(new (std::nothrow) String(cropMode));
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
@@ -2158,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);
                }