Remove ini file
authorHyukSoon Choi <hs619.choi@samsung.com>
Sun, 24 Mar 2013 06:23:19 +0000 (15:23 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Sun, 24 Mar 2013 06:23:19 +0000 (15:23 +0900)
Change-Id: I0de412a2f208e132e650417569757332142ed717
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
18 files changed:
inc/GlSettingPresentationModel.h
src/GlAlbumInfo.cpp
src/GlAlbumListForm.cpp
src/GlAlbumNameEditorForm.cpp
src/GlAllListEditorPanel.cpp
src/GlAllListPanel.cpp
src/GlAllListSelectionPanel.cpp
src/GlBaseForm.cpp
src/GlDropDownCustomItem.cpp
src/GlFileListEditorForm.cpp
src/GlFileListPresentationModel.cpp
src/GlGalleryApp.cpp
src/GlImageListEditorPanel.cpp
src/GlProgressBar.cpp
src/GlRadioCustomItem.cpp
src/GlSettingMainForm.cpp
src/GlSettingPresentationModel.cpp
src/GlVideoListEditorPanel.cpp

index fd4451e..615aba1 100644 (file)
@@ -39,13 +39,12 @@ public:
        result SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, int value);
        result SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName,
                        const Tizen::Base::String& value);
-       result ResetGallerySettingsRegistry(void);
 
 private:
        SettingPresentationModel(void);
        virtual ~SettingPresentationModel(void);
        SettingPresentationModel(SettingPresentationModel& value);
-       SettingPresentationModel& operator = (SettingPresentationModel&);
+       SettingPresentationModel& operator=(SettingPresentationModel&);
 
        result Construct(void);
        static void CreateInstance(void);
@@ -54,9 +53,8 @@ private:
        result CreateDefaultRegistry(void);
 
 private:
-       static SettingPresentationModel* __pPresentationModelInstance;
        Tizen::Io::Registry* __pDefaultGalleryRegistry;
-       Tizen::Io::Registry* __pAppGalleryRegistry;
+       static SettingPresentationModel* __pPresentationModelInstance;
 };
 
 #endif /* _GL_SETTING_PRESENTATION_MODEL_H_ */
index 61863df..299394d 100644 (file)
@@ -102,7 +102,6 @@ AlbumInfo::GetDirectoryListN(void) const
                pDirectoryFullPathList->Add(pItem);
        }
        delete pEnum;
-       pEnum = null;
 
        return pDirectoryFullPathList;
 }
index 36c1196..e869739 100644 (file)
@@ -180,7 +180,6 @@ AlbumListForm::InitializeFooter(void)
                }
                pFooter->AddItem(itemCamera);
                delete pBitmap1;
-               pBitmap1 = null;
 
                ButtonItem footerMore;
                footerMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE);
index 997522a..45a88a8 100644 (file)
@@ -459,7 +459,7 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
                }
        }
 
-       ifpArgs != NULL)
+       if (pArgs != NULL)
        {
                __pMoveIndexList = pArgs;
        }
index 70055d6..909b25e 100644 (file)
@@ -144,7 +144,7 @@ AllListEditorPanel::OnInitializing(void)
        __pLabelSelectCnt->Construct(
                        Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), strTmp);
        __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
-       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
        __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
        __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
        AddControl(*__pLabelSelectCnt);
index 623a1c0..dd51b10 100644 (file)
@@ -122,7 +122,6 @@ AllListPanel::OnInitializing(void)
        {
                __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                delete pBitmapEmpty;
-               pBitmapEmpty = null;
        }
        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN);
@@ -137,7 +136,7 @@ AllListPanel::OnInitializing(void)
        result r = AddControl(*__pContentIconListView);
        __pContentIconListView->SetShowState(true);
 
-       __itemCount=0;
+       __itemCount = 0;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
index 5e02573..3bed0bf 100644 (file)
@@ -100,7 +100,6 @@ AllListSelectionPanel::OnInitializing(void)
        {
                __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                delete pBitmapEmpty;
-               pBitmapEmpty = null;
        }
        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
        __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN);
@@ -115,7 +114,7 @@ AllListSelectionPanel::OnInitializing(void)
        AddControl(*__pContentIconListView);
        __pContentIconListView->SetShowState(true);
 
-       __itemCount=0;
+       __itemCount = 0;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -210,7 +209,6 @@ AllListSelectionPanel::CreateItem(int index)
                        pIconListviewItem = new (std::nothrow) IconListViewItem();
                        pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap);
                        delete pSelectedBitmap;
-                       pSelectedBitmap = null;
                }
                else
                {
@@ -228,12 +226,10 @@ AllListSelectionPanel::CreateItem(int index)
        if (pBitmap != null)
        {
                delete pBitmap;
-               pBitmap = null;
        }
        if (pItemText != null)
        {
                delete pItemText;
-               pItemText = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -628,9 +624,7 @@ AllListSelectionPanel::OnRequestSlideShow(void)
        if (r != E_SUCCESS)
        {
                delete pDataList;
-               pDataList = null;
                delete pIndexList;
-               pIndexList = null;
                AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
 
                return E_FAILURE;
@@ -667,7 +661,6 @@ AllListSelectionPanel::OnRequestSlideShow(void)
        }
 
        delete pIndexList;
-       pIndexList = null;
 
        __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
                        APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
index fe2d430..6b51687 100644 (file)
@@ -94,7 +94,7 @@ IList* BaseForm::GetMoveFileIndexList(String& moveDir, IList* pMoveIndexList,
                                        int innerLoopCount = pMoveIndexList->GetCount();
                                        for (int j = 0; j < innerLoopCount; ++j)
                                        {
-                                               if(collisionIndex == (const_cast<Integer*>(static_cast<const Integer*>
+                                               if (collisionIndex == (const_cast<Integer*>(static_cast<const Integer*>
                                                (pMoveIndexList->GetAt(j))))->ToInt())
                                                {
                                                        pMoveIndexList->RemoveAt(j, true);
index 330034a..83d752b 100644 (file)
@@ -97,7 +97,7 @@ DropDownCustomItem::Make()
 
        pMainEnText = new(std::nothrow) EnrichedText();
        r = pMainEnText->Construct(Dimension(__width - 80, 54));
-       if(IsFailed(r))
+       if (IsFailed(r))
        {
                delete pMainEnText;
                return E_FAILURE;
@@ -116,7 +116,7 @@ DropDownCustomItem::Make()
        pSubEnText = new(std::nothrow) EnrichedText();
        r = pSubEnText->Construct(Dimension(__width - 80, 42));
 
-       if(IsFailed(r))
+       if (IsFailed(r))
        {
                pMainEnText->RemoveAll(true);
                delete pMainEnText;
@@ -135,7 +135,7 @@ DropDownCustomItem::Make()
 
        r = AddElement(Rectangle(26, 22, __width - 126, 54), IDA_FORMAT_MAIN_STRING, *pMainEnText);
        r = AddElement(Rectangle(26, 76, __width - 126, 42), IDA_FORMAT_SUB_STRING, *pSubEnText);
-       if(IsFailed(r))
+       if (IsFailed(r))
        {
                pMainEnText->RemoveAll(true);
                pSubEnText->RemoveAll(true);
index 79d8d3b..c541fe5 100644 (file)
@@ -224,7 +224,7 @@ FileListEditorForm::InitializeFooter(void)
 
                AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
 
-               if(__pContextMenuMore != null)
+               if (__pContextMenuMore != null)
                {
                        delete __pContextMenuMore;
                        __pContextMenuMore = null;
@@ -865,7 +865,6 @@ FileListEditorForm::RefreshFolderList(void)
        if (__pContentDirectoryList != null)
        {
                delete __pContentDirectoryList;
-               __pContentDirectoryList = null;
        }
        __pContentDirectoryList = contentDirectory.GetContentDirectoryPathListN(SORT_ORDER_NONE);
        __pContentDirectoryNameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
index a99acd9..d43ae05 100644 (file)
@@ -329,7 +329,6 @@ FileListPresentationModel::IsContainContentInDirectory(const String& directoryPa
        if (pContentTypeList != null)
        {
                delete pContentTypeList;
-               pContentTypeList = null;
        }
        TryReturn(r == E_SUCCESS, false, "[%s] Unable to construct ContentDirectory", GetErrorMessage(r));
 
@@ -352,7 +351,6 @@ FileListPresentationModel::IsContainContentInDirectory(const String& directoryPa
        if (pContentList != null)
        {
                delete pContentList;
-               pContentList = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -396,7 +394,6 @@ FileListPresentationModel::GetThumbnailInSyncCacheN(const int index, String*& pN
                {
                        pDstBitmap = CoverVideoOverlayedImageOnThumbnailN(*pOrgBitmap, *pThumbnailInfo);
                        delete pOrgBitmap;
-                       pOrgBitmap = null;
                }
        }
        else
@@ -415,9 +412,7 @@ FileListPresentationModel::GetThumbnailInSyncCacheN(const int index, String*& pN
                        pThumbnailBgBitmap->Scale(DIMENSION_REAL_ICON);
                        pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pDstBitmap, thumbnailRect);
                        delete pThumbnailBgBitmap;
-                       pThumbnailBgBitmap = null;
                        delete pDstBitmap;
-                       pDstBitmap = null;
                }
                else
                {
@@ -432,7 +427,6 @@ FileListPresentationModel::GetThumbnailInSyncCacheN(const int index, String*& pN
        if (pThumbnailInfo != null)
        {
                delete pThumbnailInfo;
-               pThumbnailInfo = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -485,10 +479,8 @@ FileListPresentationModel::GetThumbnailVideoInSyncCacheN(const int index, String
                        pThumbnailBgBitmap->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL));
                        pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pOrgBitmap, thumbnailRect);
                        delete pThumbnailBgBitmap;
-                       pThumbnailBgBitmap = null;
                }
                delete pOrgBitmap;
-               pOrgBitmap = null;
        }
        else
        {
@@ -503,7 +495,6 @@ FileListPresentationModel::GetThumbnailVideoInSyncCacheN(const int index, String
        if (pThumbnailInfo != null)
        {
                delete pThumbnailInfo;
-               pThumbnailInfo = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -611,7 +602,6 @@ FileListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
                                        pTempThumbnailInfo->SetContentType(pThumbnailInfo->GetContentType());
                                        pTempThumbnailInfo->SetDuration(pThumbnailInfo->GetDuration());
                                        delete pThumbnailInfo;
-                                       pThumbnailInfo = null;
                                        isMatch = true;
                                        break;
                                }
@@ -648,7 +638,6 @@ FileListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg)
                        pInterface->OnThumbnailDecoded(index);
                }
                delete pEventEnum;
-               pEventEnum = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -952,7 +941,6 @@ FileListPresentationModel::MoveToContentFile(const ContentId& contentId, const S
                }
                CATCH:
                delete pContentInfo;
-               pContentInfo = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -1354,7 +1342,6 @@ FileListPresentationModel::CoverVideoOverlayedImageOnThumbnailN(Bitmap& thumbnai
                {
                        mainCanvas.DrawBitmap(playRect, *playBitmap);
                        delete playBitmap;
-                       playBitmap = null;
                }
 
                Canvas durCanvas;
index da30a26..223f92b 100644 (file)
@@ -183,7 +183,7 @@ GalleryApp::OnForeground(void)
        BasePanel* pBasePanel = dynamic_cast<BasePanel*>(pScene->GetPanel());
        BaseForm* pBaseForm = dynamic_cast<BaseForm*>(pScene->GetForm());
 
-       if(pBasePanel != null  )
+       if (pBasePanel != null)
        {
                pBasePanel->OnUpdateContentList();
        }
@@ -254,7 +254,7 @@ GalleryApp::OnDeviceStateChanged(DeviceType deviceType, const Tizen::Base::Strin
                BasePanel* pBasePanel = dynamic_cast<BasePanel*>(pScene->GetPanel());
                BaseForm* pBaseForm = dynamic_cast<BaseForm*>(pScene->GetForm());
 
-               if(pBasePanel != null  )
+               if (pBasePanel != null  )
                {
                        pBasePanel->OnUpdateContentList();
                }
index c3802f9..deed793 100644 (file)
@@ -110,7 +110,6 @@ ImageListEditorPanel::OnInitializing(void)
                        {
                                __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
-                               pBitmapEmpty = null;
                        }
                        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
@@ -125,7 +124,7 @@ ImageListEditorPanel::OnInitializing(void)
                        __pLabelSelectCnt->Construct(Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL,
                                        clientAreaBounds.width, H_COUNT_LABEL), ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                        __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
-                       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+                       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                        __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                        __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                        AddControl(*__pLabelSelectCnt);
@@ -140,7 +139,6 @@ ImageListEditorPanel::OnInitializing(void)
                        {
                                __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
-                               pBitmapEmpty = null;
                        }
                        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
@@ -174,7 +172,6 @@ ImageListEditorPanel::OnInitializing(void)
                {
                        __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                        delete pBitmapEmpty;
-                       pBitmapEmpty = null;
                }
                __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
@@ -190,7 +187,7 @@ ImageListEditorPanel::OnInitializing(void)
                                Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
                                ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
-               __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+               __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                AddControl(*__pLabelSelectCnt);
@@ -351,7 +348,6 @@ ImageListEditorPanel::CreateItem(int index)
                        pSelectedBitmap->Construct(canvas, canvas.GetBounds());
                        pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap);
                        delete pSelectedBitmap;
-                       pSelectedBitmap = null;
                }
                else
                {
@@ -368,12 +364,10 @@ ImageListEditorPanel::CreateItem(int index)
        if (pBitmap != null)
        {
                delete pBitmap;
-               pBitmap = null;
        }
        if (pItemText != null)
        {
                delete pItemText;
-               pItemText = null;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -473,13 +467,11 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
                                else
                                {
                                        delete map;
-                                       map = null;
                                }
                        }
                        else
                        {
                                delete map;
-                               map = null;
                        }
                }
        }
@@ -777,10 +769,9 @@ ImageListEditorPanel::OnRequestMoveTo(String& destDirectory)
 
                return;
        }
-       //TODO TO rework this, update to use the FileMoveTimer, When this func is used..
+
        result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory);
        delete pIndexList;
-       pIndexList = null;
        TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction");
 
        __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
index ac0bd1b..3c16530 100644 (file)
@@ -137,7 +137,7 @@ GlProgressBar::ShowFileProgressingPopup(int val, enum FileActionMode action)
        {
                if (__pFileProgressingHeaderLabel != null)
                {
-                       switch(action)
+                       switch (action)
                        {
                        case FILE_MOVE_ACTION:
                                __pFileProgressingHeaderLabel->SetText(ResourceManager::GetString(L"IDS_COM_POP_MOVING"));
index 3333516..d6f0a9d 100644 (file)
@@ -102,7 +102,7 @@ RadioCustomItem::Make(void)
        r = SetElementSelectionEnabled(IDA_FORMAT_STRING, true);
        TryCatch(!IsFailed(r),,"RadioCustomItem::the value is %s",GetErrorMessage(r));
 
-       CATCH:
+CATCH:
        return r;
 }
 
index 6bb5876..d28aa6e 100644 (file)
@@ -169,8 +169,6 @@ SettingMainForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, in
        int effectiveIndex = 0;
        int inputValue = 0 ;
 
-       //              for (int i = 0; i < groupIndex; i++)
-       //              effectiveIndex = effectiveIndex + pGroupItemCount[i];
        effectiveIndex = effectiveIndex + itemIndex;
 
        if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_DROPDOWN)
@@ -180,7 +178,7 @@ SettingMainForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, in
                {
                        settingInfo[effectiveIndex].isOpen = true;
                        settingInfo[effectiveIndex].childCount = 0;
-                       for (int iter = effectiveIndex + 1; iter < SETTING_MAX; iter++)
+                       for (int iter = effectiveIndex + 1; iter < SETTING_MAX; ++iter)
                        {
                                if (settingInfo[iter].itemType == ITEM_TYPE_RADIO)
                                {
@@ -211,7 +209,7 @@ SettingMainForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, in
                }
                settingInfo[parentIndex].subText = settingInfo[effectiveIndex].titleText;
 
-               for (int iter = 0; iter < settingInfo[parentIndex].childCount; iter++)
+               for (int iter = 0; iter < settingInfo[parentIndex].childCount; ++iter)
                {
                        if (parentIndex + iter + 1 != effectiveIndex)
                        {
@@ -422,8 +420,6 @@ SettingMainForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        const Color ITEM_BACKGROUND_COLOR = CUSTOM_COLOR_SETTINGS_LISTITEM_BACKGROUND;
        const Color ITEM_RADIO_ITEM_BACKGROUND_COLOR = CUSTOM_COLOR_SETTINGS_LISTITEM_RADIO_BACKGROUND;
 
-       //      for (int i = 0; i < groupIndex; i++)
-       //              effectiveIndex = effectiveIndex + pGroupItemCount[i];
        effectiveIndex = effectiveIndex + itemIndex;
        AppLogDebug("SettingMainForm::CreateItem --> groupIndex : %d, itemIndex: %d itemWidth: %d effectiveIndex %d", groupIndex, itemIndex, itemWidth, effectiveIndex);
 
@@ -575,7 +571,7 @@ SettingMainForm::InitializeSettingValues(void)
 
        if (r == E_SUCCESS)
        {
-               switch(interval)
+               switch (interval)
                {
                case 2:
                {
index 74f94ce..32890b1 100644 (file)
@@ -36,7 +36,6 @@ const wchar_t* GALLERY_APP_ID = L"ijudt7w61q.Gallery";
 
 const wchar_t* PATH_DATA_DIRECTORY = L"data/";
 const wchar_t* PATH_GALLERY_DEFAULT_SETTINGS = L"GalleryDefaultSettings.ini";
-const wchar_t* PATH_GALLERY_SETTINGS = L"GalleryUserSettings.ini";
 
 const wchar_t* SECTION_GALLERY = L"GALLRY_SETTING";
 const wchar_t* SECTION_IMAGE_VIEWER = L"IMAGE_VIEWER_SETTING";
@@ -51,7 +50,6 @@ SettingPresentationModel* SettingPresentationModel::__pPresentationModelInstance
 
 SettingPresentationModel::SettingPresentationModel(void)
        : __pDefaultGalleryRegistry(null)
-       , __pAppGalleryRegistry(null)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -80,71 +78,14 @@ result
 SettingPresentationModel::Construct(void)
 {
        AppLogDebug("ENTER");
-       int valueRegistryNumber = 0;
-       String valueRegistryString = L"";
-       AppManager* pAppManager = AppManager::GetInstance();
-       TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager");
-       String pathGallerySetting =
-                       pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_SETTINGS;
-       AppLogDebug("pathGallerySetting(%ls)", pathGallerySetting.GetPointer());
-
-       __pDefaultGalleryRegistry = new (std::nothrow) Registry();
-       __pAppGalleryRegistry = new (std::nothrow) Registry();
-
        result r = CreateDefaultRegistry();
        TryCatch(r == E_SUCCESS, , "CreateDefaultRegistry() failed[%s]", GetErrorMessage(r));
 
-       if (File::IsFileExist(pathGallerySetting) == true)
-       {
-               AppLogDebug("Already exist camcorder settings file");
-
-               __pAppGalleryRegistry->Construct(pathGallerySetting, "r+");
-       }
-       else
-       {
-               __pAppGalleryRegistry->Construct(pathGallerySetting, "w+");
-               r = __pAppGalleryRegistry->AddSection(SECTION_IMAGE_VIEWER);
-               TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r));
-
-               r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, SLIDESHOW_INTERVAL_VALUE,
-                               valueRegistryNumber);
-               TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
-               r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, SLIDESHOW_INTERVAL_VALUE, valueRegistryNumber);
-               TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
-
-               r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, TRANSITION_EFFECT_VALUE,
-                               valueRegistryString);
-               TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
-               r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, TRANSITION_EFFECT_VALUE, valueRegistryString);
-               TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
-
-               r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, REPEAT_VALUE,
-                               valueRegistryNumber);
-               TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
-               r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, REPEAT_VALUE, valueRegistryNumber);
-               TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
-
-               r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, SHUFFLE_VALUE,
-                               valueRegistryString);
-               TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
-               r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, SHUFFLE_VALUE, valueRegistryNumber);
-               TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
-
-               r = __pAppGalleryRegistry->Flush();
-               TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r));
-               r = __pDefaultGalleryRegistry->Flush();
-               TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r));
-       }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
 
-       CATCH:
-       delete __pDefaultGalleryRegistry;
-       __pDefaultGalleryRegistry = null;
-
-       delete __pAppGalleryRegistry;
-       __pAppGalleryRegistry = null;
+CATCH:
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -184,13 +125,13 @@ result
 SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, int& value) const
 {
        AppLogDebug("ENTER");
-       result r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value);
+       result r = __pDefaultGalleryRegistry->GetValue(strSectionName, entryName, value);
        TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
 
-       CATCH:
+CATCH:
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -200,13 +141,13 @@ result
 SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, String& value) const
 {
        AppLogDebug("ENTER");
-       result r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value);
+       result r = __pDefaultGalleryRegistry->GetValue(strSectionName, entryName, value);
        TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
 
-       CATCH:
+CATCH:
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -216,14 +157,14 @@ result
 SettingPresentationModel::SetValue(const String& strSectionName, const String& entryName, const int value)
 {
        AppLogDebug("ENTER");
-       result r= __pAppGalleryRegistry->SetValue(strSectionName, entryName, value);
+       result r= __pDefaultGalleryRegistry->SetValue(strSectionName, entryName, value);
        TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
-       r = __pAppGalleryRegistry->Flush();
+       r = __pDefaultGalleryRegistry->Flush();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
 
-       CATCH:
+CATCH:
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -233,14 +174,14 @@ result
 SettingPresentationModel::SetValue(const String& strSectionName, const String& entryName, const String& value)
 {
        AppLogDebug("ENTER");
-       result r = __pAppGalleryRegistry->SetValue(strSectionName, entryName, value);
+       result r = __pDefaultGalleryRegistry->SetValue(strSectionName, entryName, value);
        TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
-       r = __pAppGalleryRegistry->Flush();
+       r = __pDefaultGalleryRegistry->Flush();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
 
-       CATCH:
+CATCH:
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -257,6 +198,7 @@ SettingPresentationModel::CreateDefaultRegistry(void)
                        pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_DEFAULT_SETTINGS;
        AppLogDebug("pathGalleryDefaultSetting(%ls)", pathGalleryDefaultSetting.GetPointer());
 
+       __pDefaultGalleryRegistry = new (std::nothrow) Registry();
        if (File::IsFileExist(pathGalleryDefaultSetting))
        {
                AppLogDebug("Already exist default settings file");
@@ -294,33 +236,9 @@ SettingPresentationModel::CreateDefaultRegistry(void)
 
        return r;
 
-       CATCH:
-       AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
-
-       return r;
-}
-
-result
-SettingPresentationModel::ResetGallerySettingsRegistry(void)
-{
-       AppLogDebug("ENTER");
-       AppManager* pAppManager = AppManager::GetInstance();
-       TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager");
-       String pathGallerySetting =
-                       pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_SETTINGS;
-
-       if (File::IsFileExist(pathGallerySetting))
-       {
-               File::Remove(pathGallerySetting);
-       }
-
-       result r = Construct();
-       TryCatch(r == E_SUCCESS, , "CameraSettingsPresentationModel::Construct() failed[%s]", GetErrorMessage(r));
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
-       return r;
-
-       CATCH:
+CATCH:
+       delete __pDefaultGalleryRegistry;
+       __pDefaultGalleryRegistry = null;
        AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
index def9ef2..32c26cd 100644 (file)
@@ -121,7 +121,6 @@ VideoListEditorPanel::OnInitializing(void)
                        {
                                __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
-                               pBitmapEmpty = null;
                        }
                        __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentListView->SetItemProvider(*this);
@@ -134,7 +133,7 @@ VideoListEditorPanel::OnInitializing(void)
                                        Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
                                        ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                        __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
-                       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+                       __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                        __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                        __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                        AddControl(*__pLabelSelectCnt);
@@ -147,7 +146,6 @@ VideoListEditorPanel::OnInitializing(void)
                        {
                                __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
-                               pBitmapEmpty = null;
                        }
                        __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentListView->SetItemProvider(*this);
@@ -178,7 +176,6 @@ VideoListEditorPanel::OnInitializing(void)
                {
                        __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
                        delete pBitmapEmpty;
-                       pBitmapEmpty = null;
                }
                __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                __pContentListView->SetItemProvider(*this);
@@ -191,7 +188,7 @@ VideoListEditorPanel::OnInitializing(void)
                                Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
                                ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
-               __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+               __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                AddControl(*__pLabelSelectCnt);
@@ -367,7 +364,6 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                                        pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap,
                                                        pSelectedBitmap);
                                        delete pSelectedBitmap;
-                                       pSelectedBitmap = null;
                                }
                                else
                                {
@@ -446,7 +442,6 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                                pSelectedBitmap->Construct(canvas, canvas.GetBounds());
                                pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
                                delete pSelectedBitmap;
-                               pSelectedBitmap = null;
                        }
                        else
                        {
@@ -909,10 +904,9 @@ VideoListEditorPanel::OnRequestMoveTo(String& destDirectory)
 
                return;
        }
-       //TODO TO rework this, update to use the FileMoveTimer, When this func is used..
+
        result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory);
        delete pIndexList;
-       pIndexList = null;
        TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction");
 
        __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);