Delete new gallery control
authorHyukSoon Choi <hs619.choi@samsung.com>
Sun, 14 Apr 2013 07:27:13 +0000 (16:27 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Sun, 14 Apr 2013 07:27:13 +0000 (16:27 +0900)
Change-Id: I2c707d79f5a6e23749d7ef780fa0b6ca0a483965
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
src/IvImageViewerForm.cpp

index 7298489..4eff1d8 100644 (file)
@@ -559,14 +559,12 @@ ImageViewerForm::CreateGallery(void)
        Rectangle clientRect = GetClientAreaBounds();
        Rectangle rect = GetBounds();
 
-       __pGallery = new (std::nothrow) Gallery();
-       __pGallery->Construct(Rectangle(0, clientRect.y, rect.width, rect.height));
-       __pGallery->SetName(L"GalleryControl");
+       __pGallery = static_cast<Gallery*>(GetControl(L"IDC_GALLERY"));
+       AppAssert(__pGallery);
+
        __pGallery->SetItemProvider(*this);
        __pGallery->AddGalleryEventListener(*this);
        __pGallery->SetBackgroundColor(COLOR_GALLERY_BG);
-       AddControl(*__pGallery);
-       __pGallery->SetTextOfEmptyGallery(ResourceManager::GetString(L"IDS_COM_BODY_LOADING"));
 
        SlideShowTransitionEffect effect = __pPresentationModel->GetTransitionEffectOfSlideShow();