Fixed N_SE-38563, N_SE-38552
[apps/osp/Settings.git] / src / StWallpaperAlbumListDetailForm.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                StWallpaperAlbumListDetailForm.cpp
19  * @brief               This is the implementation file for WallpaperAlbumListDetailForm class.
20  */
21
22 #include <FIo.h>
23 #include <FSystem.h>
24 #include "StSettingScenesList.h"
25 #include "StTypes.h"
26 #include "StWallpaperAlbumListDetailForm.h"
27
28 using namespace Tizen::App;
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
31 using namespace Tizen::Content;
32 using namespace Tizen::Graphics;
33 using namespace Tizen::Io;
34 using namespace Tizen::System;
35 using namespace Tizen::Ui;
36 using namespace Tizen::Ui::Controls;
37 using namespace Tizen::Ui::Scenes;
38
39 static const int MAX_UNDER_FILE_SIZE = 334;
40 static const int MAX_OVER_FILE_SIZE = 158;
41 static const int FOLDER_BITMAP_MAX = 6;
42 static const int W_LARGE_SIZE_TEXT_GAP = 110;
43 static const int W_HUGE_SIZE_PORTRAIT_TEXT_GAP = 90;
44 static const int W_HUGE_SIZE_LANDSCAPE_TEXT_GAP = 220;
45 static const int LINE_COUNT_DEFAULT = 1;
46
47 static const int BASE_FORM_DEFAULT_MARGIN = 32;
48
49 static const String IMAGE_VIEWER_APP_ID = L"tizen.imageviewer";
50 static const String IMAGE_VIEWER_CROP_OPERATION_ID = L"http://tizen.org/appcontrol/operation/image/crop";
51
52 WallpaperAlbumListDetailForm::WallpaperAlbumListDetailForm(void)
53         : __isRunningAppControl(false)
54         , __itemCount(0)
55         , __pContentId(null)
56         , __pPresentationModel(null)
57         , __pIconListView(null)
58         , __pAlbumPathList(null)
59 {
60 }
61
62 WallpaperAlbumListDetailForm::~WallpaperAlbumListDetailForm(void)
63 {
64 }
65
66 result
67 WallpaperAlbumListDetailForm::Initialize(void)
68 {
69         AppLogDebug("ENTER");
70         Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
71         SetOrientationAutoMode();
72         AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
73         return GetLastResult();
74 }
75
76 void
77 WallpaperAlbumListDetailForm::SetOrientationAutoMode(void)
78 {
79         this->SetOrientation(ORIENTATION_AUTOMATIC_FOUR_DIRECTION);
80         this->AddOrientationEventListener(*this);
81 }
82
83 void
84 WallpaperAlbumListDetailForm::UpdateIconListView(void)
85 {
86         bool createIconListView = true;
87         if (__itemCount == 0)
88         {
89                 createIconListView = false;
90         }
91         if (__pIconListView != null)
92         {
93                 if (createIconListView)
94                 {
95                         __pIconListView->UpdateList();
96                         return;
97                 }
98         }
99
100         int controlCount = GetControlCount();
101         for (int i = 0; i < controlCount; i++)
102         {
103                 RemoveControl(GetControl(0));
104         }
105 //      RemoveAllControls();
106
107         if (createIconListView)
108         {
109                 CreateIconListView();
110         }
111         else
112         {
113                 Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
114                 if (pLabel == null)
115                 {
116                         Rectangle clientRect = GetClientAreaBounds();
117                         Bitmap* pBitmp = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
118
119                         int bitmapWidth = pBitmp->GetWidth();
120                         int bitmapHeight = pBitmp->GetHeight();
121                         String labelText = ResourceManager::GetString(L"IDS_ST_BODY_NO_CONTENT");
122                         Color textColor = COLOR_HELP_TEXT_TYPE_03_NORMAL;
123                         int noContentTextHeight = GetHeightForStringArea(labelText, bitmapWidth, 32);
124
125                         int xPos = (clientRect.width / LINE_COUNT_2) - (bitmapWidth / DIVIDE_BY_TWO);
126                         int yPos = (clientRect.height / LINE_COUNT_2) - ((bitmapHeight + noContentTextHeight) / DIVIDE_BY_TWO);
127
128                         Label* pLabel = new (std::nothrow) Label();
129                         pLabel->Construct(Rectangle(xPos, yPos, bitmapWidth, bitmapHeight), L"");
130                         pLabel->SetName(NO_CONTENTS);
131                         pLabel->SetBackgroundBitmap(*pBitmp);
132
133                         yPos = yPos + bitmapHeight;
134
135                         Label* pLabelNoContents = new (std::nothrow) Label();
136                         pLabelNoContents->Construct(Rectangle(0, yPos, clientRect.width, noContentTextHeight), L"");
137                         pLabelNoContents->SetName(NO_CONTENTS_TEXT);
138                         pLabelNoContents->SetTextColor(textColor);
139                         pLabelNoContents->SetText(labelText);
140
141                         AddControl(pLabel);
142                         AddControl(pLabelNoContents);
143                 }
144         }
145 }
146
147 int
148 WallpaperAlbumListDetailForm::GetHeightForStringArea(const Tizen::Base::String source, int width, int fontSize) const
149 {
150         Font font;
151         Dimension dim;
152         String temp;
153
154         int lineCount = LINE_COUNT_DEFAULT;
155         int margin = BASE_FORM_DEFAULT_MARGIN + RELATIVE_LAYOUT_RIGHT_MARGIN;
156         if (fontSize > FONT_MAIN_TEXT_SIZE_LARGE)
157         {
158                 OrientationStatus orientationStatus = GetOrientationStatus();
159                 if (((orientationStatus == ORIENTATION_STATUS_PORTRAIT)
160                         || (orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE))
161                         && (fontSize == FONT_MAIN_TEXT_SIZE_HUGE))
162                 {
163                         width -= W_HUGE_SIZE_PORTRAIT_TEXT_GAP;
164                 }
165                 else if (((orientationStatus == ORIENTATION_STATUS_LANDSCAPE)
166                                 || (orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
167                                 && (fontSize == FONT_MAIN_TEXT_SIZE_HUGE))
168                 {
169                         width -= W_HUGE_SIZE_LANDSCAPE_TEXT_GAP;
170                 }
171                 width -= W_LARGE_SIZE_TEXT_GAP;
172         }
173         int boudwidth = width - margin;
174         font.Construct(FONT_STYLE_PLAIN, fontSize);
175
176         for (int i = 0; i < source.GetLength(); i++)
177         {
178                 temp.Append(source[i]);
179                 font.GetTextExtent(temp, temp.GetLength(), dim);
180                 if (dim.width > boudwidth)
181                 {
182                         temp.Clear();
183                         temp.Append(source[i]);
184                         lineCount++;
185                 }
186         }
187
188         return dim.height * lineCount;
189 }
190
191 void
192 WallpaperAlbumListDetailForm::CreateHeader(const Tizen::Base::String& textTitle)
193 {
194         Header* pHeader = GetHeader();
195
196         pHeader->SetStyle(HEADER_STYLE_TITLE);
197         pHeader->SetTitleText(textTitle);
198 }
199
200 void
201 WallpaperAlbumListDetailForm::CreateFooter(void)
202 {
203         Footer* pFooter = GetFooter();
204         AppAssert(pFooter);
205
206         pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
207         pFooter->SetBackButton();
208
209         SetFormBackEventListener(this);
210 }
211
212 result
213 WallpaperAlbumListDetailForm::OnInitializing(void)
214 {
215         __pPresentationModel = WallpaperAlbumListPresentationModel::GetInstance();
216
217         AddFocusEventListener(*this);
218
219         return E_SUCCESS;
220 }
221
222 result
223 WallpaperAlbumListDetailForm::OnTerminating(void)
224 {
225         AppLogDebug("ENTER");
226
227         if (__pPresentationModel != null)
228         {
229                 __pPresentationModel = null;
230         }
231
232         if (__pIconListView != null)
233         {
234                 __pIconListView = null;
235         }
236
237         if (__pAlbumPathList != null)
238         {
239                 delete __pAlbumPathList;
240                 __pAlbumPathList = null;
241         }
242
243         return E_SUCCESS;
244 }
245
246 int
247 WallpaperAlbumListDetailForm::GetItemCount(void)
248 {
249         return __itemCount;
250 }
251
252 IconListViewItem*
253 WallpaperAlbumListDetailForm::CreateItem(int index)
254 {
255         AppLogDebug("ENTER : index(%d)", index);
256
257         Bitmap* pBitmap = __pPresentationModel->CreateDetailMergeBitmapN(index);
258
259         if (pBitmap != null)
260         {
261                 IconListViewItem* pIconListview = new (std::nothrow) IconListViewItem();
262                 pIconListview->Construct(*pBitmap);
263                 delete pBitmap;
264                 pBitmap = null;
265
266                 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
267                 return pIconListview;
268         }
269
270         AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
271         return null;
272 }
273
274 bool
275 WallpaperAlbumListDetailForm::DeleteItem(int index, IconListViewItem* pItem)
276 {
277         delete pItem;
278         return true;
279 }
280
281 void
282 WallpaperAlbumListDetailForm::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status)
283 {
284         AppLogDebug("ENTER");
285
286         if (__isRunningAppControl)
287         {
288                 AppLogDebug("busy status");
289                 return;
290         }
291
292         if (status == ICON_LIST_VIEW_ITEM_SELECTED)
293         {
294                 IList* pContentIdList = __pPresentationModel->GetContentIdList();
295                 __pContentId = static_cast<ContentId*>(pContentIdList->GetAt(index));
296                 HashMap extraData;
297                 extraData.Construct();
298                 String typeKey = L"http://tizen.org/appcontrol/data/image/crop_mode";
299                 String typeVal = L"fit_to_screen";
300                 extraData.Add(&typeKey, &typeVal);
301
302                 ContentManager pContentManager;
303                 pContentManager.Construct();
304                 ImageContentInfo* pImageContentInfo = static_cast<ImageContentInfo*>(pContentManager.GetContentInfoN(*__pContentId));
305
306                 Rectangle rect = GetClientAreaBounds();
307                 if (pImageContentInfo == null)
308                 {
309                         AppLogDebug("pImageContentInfo is null");
310                         return;
311                 }
312                 String uri = String(L"file://") + pImageContentInfo->GetContentPath();
313
314                 AppControl* pAc = AppManager::FindAppControlN(IMAGE_VIEWER_APP_ID, IMAGE_VIEWER_CROP_OPERATION_ID);
315                 if (pAc)
316                 {
317                         if (pAc->Start(&uri, null, &extraData, this) == E_SUCCESS)
318                         {
319                                 __isRunningAppControl = true;
320                         }
321                         delete pAc;
322                 }
323
324         }
325         AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
326 }
327
328 void
329 WallpaperAlbumListDetailForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
330 {
331         if (__isRunningAppControl)
332         {
333                 AppLogDebug("busy status");
334                 return;
335         }
336         SceneManager* pSceneManager = SceneManager::GetInstance();
337         AppAssert(pSceneManager);
338
339         pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
340 }
341
342 void
343 WallpaperAlbumListDetailForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
344 {
345         if (pArgs != null)
346         {
347                 __pAlbumPathList = static_cast<ArrayList*>(pArgs);
348         }
349
350         if (__pPresentationModel == null)
351         {
352                 __pPresentationModel = WallpaperAlbumListPresentationModel::GetInstance();
353         }
354         SetAllAlbumPathList();
355         __pPresentationModel->InitializeFileList(__pAlbumPathList);
356         __itemCount = __pPresentationModel->GetFileCount();
357
358         UpdateIconListView();
359         CreateHeader(ResourceManager::GetString(L"IDS_MP_BODY_ADD_IMAGE"));
360         CreateFooter();
361 }
362
363 void
364 WallpaperAlbumListDetailForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
365 {
366 }
367
368 void
369 WallpaperAlbumListDetailForm::CreateIconListView(void)
370 {
371         int itemRectLineSize = 0;
372
373         if (__itemCount < FOLDER_BITMAP_MAX)
374         {
375                 itemRectLineSize = MAX_UNDER_FILE_SIZE;
376         }
377         else
378         {
379                 itemRectLineSize = MAX_OVER_FILE_SIZE;
380         }
381         Dimension itemSize(itemRectLineSize, itemRectLineSize);
382
383         __pIconListView = new (std::nothrow) IconListView();
384         __pIconListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), itemSize);
385         __pIconListView->SetItemProvider(*this);
386         __pIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
387         __pIconListView->AddIconListViewItemEventListener(*this);
388
389         AddControl(__pIconListView);
390
391         Invalidate(true);
392 }
393
394 void
395 WallpaperAlbumListDetailForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
396 {
397         if (__pIconListView == null)
398         {
399                 Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
400                 if (pLabel != null)
401                 {
402                         Rectangle clientRect = GetClientAreaBounds();
403                         Rectangle labelBound = pLabel->GetBounds();
404
405                         int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
406                         int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
407
408                         pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
409                         yPos = yPos + pLabel->GetBounds().height;
410                         Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
411                         if (pTextLabel != null)
412                         {
413                                 pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
414                         }
415                 }
416         }
417         else
418         {
419                 __pIconListView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
420         }
421         Invalidate(true);
422 }
423
424 void
425 WallpaperAlbumListDetailForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
426 {
427         if (requestId == FRFRESH_REQUEST_EVENT)
428         {
429                 __pPresentationModel->InitializeAlbumInfoList();
430                 SetAllAlbumPathList();
431                 __pPresentationModel->InitializeFileList(__pAlbumPathList);
432                 __itemCount = __pPresentationModel->GetFileCount();
433                 UpdateIconListView();
434                 if (pArgs)
435                 {
436                         pArgs->RemoveAll(true);
437                         delete pArgs;
438                 }
439         }
440 }
441
442 void
443 WallpaperAlbumListDetailForm::OnAppControlCompleteResponseReceived(const AppId& appId, const Tizen::Base::String& operationId, AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData)
444 {
445         if (appId.Equals(IMAGE_VIEWER_APP_ID)
446                 && operationId.Equals(IMAGE_VIEWER_CROP_OPERATION_ID))
447         {
448                 if (appControlResult == APP_CTRL_RESULT_SUCCEEDED)
449                 {
450                         int argIndex = 0;
451                         AppLogDebug("Image crop succeeded.");
452                         String* pStr = WallpaperAlbumListPresentationModel::GetInstance()->GetHomeLockArgument();
453                         if (pStr->Equals(L"0", true))
454                         {
455                                 argIndex = 0;
456                         }
457                         else if (pStr->Equals(L"1", true))
458                         {
459                                 argIndex = 1;
460                         }
461                         else if (pStr->Equals(L"2", true))
462                         {
463                                 argIndex = 2;
464                         }
465                         if (pExtraData)
466                         {
467                                 IMapEnumerator* pEnum = pExtraData->GetMapEnumeratorN();
468                                 while (pEnum->MoveNext() == E_SUCCESS)
469                                 {
470                                         String* pKey = dynamic_cast<String*>(pEnum->GetKey());
471                                         if (pKey != null && *pKey == L"http://tizen.org/appcontrol/data/selected")
472                                         {
473                                                 IList* pValueList = dynamic_cast<IList*>(pEnum->GetValue());
474                                                 if (pValueList)
475                                                 {
476                                                         String dstPath = Application::GetInstance()->GetAppSharedPath() + PATH_DATA_DIRECTORY;
477                                                         String srcPath = L"";
478                                                         String srcFileExtention = L"";
479                                                         String* pSrcPath = dynamic_cast<String*>(pValueList->GetAt(0));
480                                                         if (pSrcPath != null)
481                                                         {
482                                                                 srcPath = *pSrcPath;
483                                                         }
484                                                         if (srcPath.IsEmpty() == false)
485                                                         {
486                                                                 srcFileExtention = File::GetFileExtension(srcPath);
487                                                         }
488
489                                                         switch (argIndex)
490                                                         {
491                                                         case 0:
492                                                         {
493                                                                 dstPath.Append(L"home.");
494                                                                 dstPath.Append(srcFileExtention);
495                                                                 File::Copy(srcPath, dstPath, false);
496                                                                 AppLog("FilePath = %S", dstPath.GetPointer());
497                                                                 if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
498                                                                 {
499                                                                         AppLogDebug("Wallpaper Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
500                                                                 }
501                                                         }
502                                                         break;
503
504                                                         case 1:
505                                                         {
506                                                                 dstPath.Append(L"/lock.");
507                                                                 dstPath.Append(srcFileExtention);
508                                                                 File::Copy(srcPath, dstPath, false);
509
510                                                                 if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
511                                                                 {
512                                                                         AppLogDebug("Wallpaper Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
513                                                                 }
514                                                         }
515                                                         break;
516
517                                                         case 2:
518                                                         {
519                                                                 dstPath.Append(L"homelock.");
520                                                                 dstPath.Append(srcFileExtention);
521                                                                 File::Copy(srcPath, dstPath, false);
522
523                                                                 if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN, dstPath) != E_SUCCESS)
524                                                                 {
525                                                                         AppLogDebug("Wallpaper Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
526                                                                 }
527
528                                                                 if (SettingInfo::SetValue(RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK, dstPath) != E_SUCCESS)
529                                                                 {
530                                                                         AppLogDebug("Wallpaper Lock Screen SetValue is Fail [%s]", GetErrorMessage(GetLastResult()));
531                                                                 }
532                                                         }
533                                                         break;
534
535                                                         default:
536                                                                 break;
537                                                         }
538                                                         SceneManager* pSceneManager = SceneManager::GetInstance();
539                                                         AppAssert(pSceneManager);
540                                                         IListT<SceneId>* sceneList = pSceneManager->GetSceneHistoryN();
541                                                         pSceneManager->ClearSceneHistory();
542                                                         int sceneIndex = 0;
543                                                         while (sceneIndex < sceneList->GetCount())
544                                                         {
545                                                                 String* pSceneId = new (std::nothrow) String();
546                                                                 sceneList->GetAt(sceneIndex++, *pSceneId);
547                                                                 if (pSceneId->Equals(IDSCN_WALLPAPER_ALBUM_LIST, true) == true)
548                                                                 {
549                                                                         if (pSceneManager->IsSceneAlive(*pSceneId) == true)
550                                                                         {
551                                                                                 pSceneManager->DestroyScene(*pSceneId);
552                                                                         }
553                                                                         delete pSceneId;
554                                                                         continue;
555                                                                 }
556
557                                                                 pSceneManager->AddToSceneHistory(*pSceneId);
558                                                                 delete pSceneId;
559                                                         }
560                                                         pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
561                                                 }
562                                         }
563                                 }
564                                 delete pEnum;
565                         }
566                         return;
567                 }
568                 else if (appControlResult == APP_CTRL_RESULT_FAILED)
569                 {
570                         AppLog("Image crop failed.");
571                 }
572                 else if (appControlResult == APP_CTRL_RESULT_CANCELED)
573                 {
574                         AppLog("Image crop was canceled.");
575                 }
576                 else if (appControlResult == APP_CTRL_RESULT_TERMINATED)
577                 {
578                         AppLog("Image crop was terminated.");
579                 }
580                 else if (appControlResult == APP_CTRL_RESULT_ABORTED)
581                 {
582                         AppLog("Image crop was aborted.");
583                 }
584
585                 __isRunningAppControl = false;
586
587                 __pPresentationModel->InitializeAlbumInfoList();
588                 SetAllAlbumPathList();
589                 __pPresentationModel->InitializeFileList(__pAlbumPathList);
590                 __itemCount = __pPresentationModel->GetFileCount();
591                 UpdateIconListView();
592         }
593 }
594
595 void
596 WallpaperAlbumListDetailForm::SetAllAlbumPathList(void)
597 {
598         String isAllAlbum = *static_cast<String*>(__pAlbumPathList->GetAt(0));
599
600         String allAlbumsString = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
601         if (isAllAlbum.Equals(allAlbumsString, true) == false)
602         {
603                 AppLogDebug("__pAlbumPathList is not AllAlbum");
604                 return;
605         }
606
607         delete __pAlbumPathList;
608         __pAlbumPathList = null;
609         IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
610         if (pAlbumInfoList == null)
611         {
612                 AppLogDebug("pAlbumInfoList is null");
613                 return;
614         }
615
616         AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(0));
617         if (pAlbumInfo == null)
618         {
619                 AppLogDebug("pAlbumInfo is null");
620                 return;
621         }
622
623         ArrayList* pAlbumPathList = new (std::nothrow) ArrayList(SingleObjectDeleter);
624         pAlbumPathList->Construct();
625         pAlbumPathList->Add(*(new (std::nothrow) String(allAlbumsString)));
626         for (int i = 0; i < pAlbumInfo->GetDirectoryCount(); i++)
627         {
628                 pAlbumPathList->Add(*(new (std::nothrow) String(pAlbumInfo->GetDirectory(i))));
629         }
630         __pAlbumPathList = pAlbumPathList;
631 }
632
633 void
634 WallpaperAlbumListDetailForm::OnFocusGained(const Tizen::Ui::Control& source)
635 {
636         __isRunningAppControl = false;
637 }
638
639 void
640 WallpaperAlbumListDetailForm::OnFocusLost(const Tizen::Ui::Control& source)
641 {
642 }