Nabi issue fix
authorchitta ranjan <chitta.rs@samsung.com>
Tue, 7 May 2013 12:26:33 +0000 (21:26 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Tue, 7 May 2013 12:26:33 +0000 (21:26 +0900)
Change-Id: I1471954d7315b21cdfc885ed4c11dee5f45e4951
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/IvTypes.h
src/IvImageCropForm.cpp
src/IvImageViewerForm.cpp
src/IvTypes.cpp

index 5bea673..c961b0c 100644 (file)
@@ -210,7 +210,6 @@ extern const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED;
 
 extern const wchar_t* MEDIA_ROOT_PHONE;
 
-extern const int H_FOOTER_PANEL;
 extern const int H_INDICATOR_BAR;
 extern const int H_CROP_RECTANGLE;
 extern const int CROP_BOX_OFFSET;
index 3f8549d..72e2e0b 100644 (file)
@@ -128,6 +128,7 @@ ImageCropForm::OnInitializing(void)
                        pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
                        delete pCancelButtonBitmap;
                }
+
                SetControlAlwaysOnTop(*pPanel, true);
                Label* pLabel = static_cast<Label*>(pPanel->GetControl(L"IDC_PANEL_LABEL"));
                if (pLabel != null)
@@ -413,14 +414,6 @@ ImageCropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                                        }
                                                        delete pAddressbook;
                                                }
-                                               delete pCropBuffer;
-
-                                               ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-                                               pList->Add(new (std::nothrow) String(destFilePath));
-                                               pSceneManager->GoBackward(BackwardSceneTransition(), pList);
-
-                                               AppLogDebug("EXIT(%s)1", GetErrorMessage(GetLastResult()));
-                                               return;
                                        }
                                        delete pCropBuffer;
                                        pSceneManager->GoBackward(BackwardSceneTransition());
@@ -934,6 +927,8 @@ ImageCropForm::SetValue(void)
        int prevWidth = __imageBox.width;
        int prevImageboxX = __imageBox.x;
        int prevImageBoxY = __imageBox.y;
+       Panel* pPanel = null;
+       pPanel = static_cast<Panel*>(GetControl(L"IDC_FOOTER_PANEL"));
 
        if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT)
        {
@@ -946,9 +941,9 @@ ImageCropForm::SetValue(void)
                __formWidth = Form::GetBounds().height;
        }
 
-       float clientAreaRatio = (GetClientAreaBoundsF().height - H_FOOTER_PANEL) / GetClientAreaBoundsF().width;
+       float clientAreaRatio = (GetClientAreaBoundsF().height - pPanel->GetBounds().height) / GetClientAreaBoundsF().width;
 
-       if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - H_FOOTER_PANEL))
+       if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - pPanel->GetBounds().height))
        {
                float imageRatio = __imageHeight / (float) __imageWidth;
                if (imageRatio < clientAreaRatio)
@@ -956,11 +951,11 @@ ImageCropForm::SetValue(void)
                        __imageBox.width = GetClientAreaBounds().width;
                        __imageBox.height = (__imageHeight * __imageBox.width) / __imageWidth;
                        __imageBox.x = GetClientAreaBounds().x;
-                       __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - H_FOOTER_PANEL) - __imageBox.height) / 2;
+                       __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - pPanel->GetBounds().height) - __imageBox.height) / 2;
                }
                else
                {
-                       __imageBox.height = GetClientAreaBounds().height - H_FOOTER_PANEL;
+                       __imageBox.height = GetClientAreaBounds().height - pPanel->GetBounds().height;
                        __imageBox.width = (__imageWidth * __imageBox.height) / __imageHeight;
                        __imageBox.x = (GetClientAreaBounds().width - __imageBox.width) / 2;
                        __imageBox.y = GetClientAreaBounds().y;
index 8848365..057e8ae 100644 (file)
@@ -1787,19 +1787,6 @@ ImageViewerForm::OnSceneActivatedN(const SceneId& previousSceneId,
                Invalidate(true);
        }
 
-       if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null)
-       {
-               String filePath;
-               filePath = *(static_cast<String*>(pArgs->GetAt(0)));
-               delete pArgs;
-               int count = __pPresentationModel->GetFileCount();
-               __pPresentationModel->AddImageCache(filePath);
-               __pGallery->UpdateGallery();
-               __pGallery->SetCurrentItemIndex(count);
-               __pPresentationModel->RequestImage(filePath);
-               ShowPanelDetail(false);
-       }
-
        if (__pGallery->GetCurrentItemIndex() < 0)
        {
                SetFooterItemState(false);
index 1962dd0..2748789 100644 (file)
@@ -152,7 +152,6 @@ const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED = L"Unmounted";
 
 const wchar_t* MEDIA_ROOT_PHONE = L"Phone/";
 
-const int H_FOOTER_PANEL = 98;
 const int H_INDICATOR_BAR = 60;
 const int H_CROP_RECTANGLE = 20;
 const int CROP_BOX_OFFSET = 20;