THUMBNAIL_PROVIDER_SOURCEID_TOP_FOLDER_FILE_LIST_FORM = 0, /*!< Enum value SOURCE_TOP_LEVEL_FORM. */
THUMBNAIL_PROVIDER_SOURCEID_SUB_FOLDER_FILE_LIST_FORM = 1, /*!< Enum value SOURCE_SUB_LEVEL_FORM. */
THUMBNAIL_PROVIDER_SOURCEID_SUB_MOVE_COPY_FORM,
- THUMBNAIL_PROVIDER_SOURCEID_TOP_MOVE_COPY_FORM, /*!< Enum value SOURCE_TOP_MOVE_COPY_FORM. */
+ THUMBNAIL_PROVIDER_SOURCEID_TOP_MOVE_COPY_FORM,/*!< Enum value SOURCE_TOP_MOVE_COPY_FORM. */
+ THUMBNAIL_PROVIDER_SOURCEID_SHARE_FORM,
THUMBNAIL_PROVIDER_SOURCEID_FILE_MANAGE_FORM, /*!< Enum value SOUCE_FILE_MANAGE_FORM. */
THUMBNAIL_PROVIDER_SOURCEID_SPLIT_PANEL_FORM, /*!< Enum value SOURCE_SPLIT_PANEL_FORM. */
THUMBNAIL_PROVIDER_SOURCEID_SPLIT_PANEL_FILE_MANAGE_FORM,
int width = __itemWidth;\r
int w_Rename = W_RENAME_ICON;\r
int h_Rename = W_RENAME_ICON;\r
- int w_Title = width - (W_LISTVIEW_ITEM_BITMAP + (4 * X_LISTVIEW) + w_Rename + W_RENAME_ICON);\r
+ int w_Title = width - (W_LISTVIEW_ITEM_BITMAP + (4 * X_LISTVIEW) + W_RENAME_ICON);\r
int x_Rename = width - (W_RENAME_ICON + X_LISTVIEW);\r
GetItemSize(__itemHeight, titleHeight);\r
\r
SetElementTextVerticalAlignment(CONTENT_LIST_ITEM_TYPE_RENAME, ALIGNMENT_MIDDLE);\r
\r
__thumbnailRect.SetBounds(thumbnailX, thumbnailY, thumbnailWidth, thumbnailHeight); //right side width:20\r
- __titleRect.SetBounds(thumbnailX + thumbnailWidth + normalGap, Y_LISTVIEW, w_Title, H_LISTVIEW_ITEM_TITLE);\r
+ __titleRect.SetBounds((2 * thumbnailX) + thumbnailWidth, Y_LISTVIEW, w_Title, H_LISTVIEW_ITEM_TITLE);\r
__editRenameRect.SetBounds(x_Rename, (__itemHeight - W_RENAME_ICON) / 2, w_Rename, h_Rename);\r
__editDateRect.SetBounds(thumbnailX + thumbnailWidth + normalGap, H_LISTVIEW_ITEM_TITLE + Y_LISTVIEW, w_Title, H_LISTVIEW_ITEM_DESCRIPTION);\r
\r
int folderCount = 0;
int fileCount = 0;
+ int thumbnailItemSource = THUMBNAIL_PROVIDER_SOURCEID_FILE_MANAGE_FORM;
+
result r = E_SUCCESS;
_previousSceneId = previousSceneId;
if (_editOrShare == FILE_MANAGE_EDIT)
{
+ thumbnailItemSource = THUMBNAIL_PROVIDER_SOURCEID_FILE_MANAGE_FORM;
+
if (pAppResource != null)
{
pAppResource->GetString(L"IDS_MF_SK3_EDIT", headerText);
}
_pBaseItemProvider->SetSourceForm(CREATE_ITEM_SOURCE_FILE_MANAGE_FORM);
_pFolderEntryPM->SetSourceForm(CREATE_ITEM_SOURCE_FILE_MANAGE_FORM);
+ _pThumbnailItemProvider->SetCreateItemSource(thumbnailItemSource);
}
else
{
+ thumbnailItemSource = THUMBNAIL_PROVIDER_SOURCEID_SHARE_FORM;
+
if (pAppResource != null)
{
pAppResource->GetString(L"IDS_COM_BUTTON_SHARE", headerText);
}
_pBaseItemProvider->SetSourceForm(CREATE_ITEM_SOURCE_SHARE_FORM);
_pFolderEntryPM->SetSourceForm(CREATE_ITEM_SOURCE_SHARE_FORM);
+ _pThumbnailItemProvider->SetCreateItemSource(thumbnailItemSource);
+
}
_pEditListView->SetItemProvider(*_pBaseItemProvider);
RequestId reqId;
r = ContentManager::ScanDirectory(filePath,true,this,reqId);
AppLogDebug("Scan dir result %s",GetErrorMessage(r));
+ TryCatch(r == E_SUCCESS,,"Scan Dir Failed");
}
else
{
r = ContentManager::ScanFile(filePath);
AppLogDebug("scan file result %s",GetErrorMessage(r));
+ TryCatch(r == E_SUCCESS,,"Scan File Failed");
}
return r;
+CATCH:
+ AppLogDebug("Update content Failed");
+ return r;
}
result
{
r = ContentManager::ScanFile(__renameFilePath);
AppLogDebug("scan file result %s",GetErrorMessage(r));
+ TryCatch(r == E_SUCCESS,,"scan file failed");
r = ContentManager::ScanFile(__filePath);
AppLogDebug("scan file result %s",GetErrorMessage(r));
StringTokenizer strTok(filePath, delim);\r
result r = E_SUCCESS;\r
\r
- while (strTok.HasMoreTokens())\r
+ String displayPhone;\r
+ String displaySdCard;\r
+ String defMediaPath = BasePresentationModel::GetMediaPath();\r
+ String defSdCardPath = BasePresentationModel::GetSdCardPath();\r
+\r
+ AppResource* pAppResource = null;\r
+\r
+ pAppResource = UiApp::GetInstance()->GetAppResource();\r
+\r
+ if (pAppResource != null)\r
{\r
- strTok.GetNextToken(token);\r
+ pAppResource->GetString(L"IDS_MF_TAB_PHONE", displayPhone);\r
+ pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", displaySdCard);\r
+\r
+ displayPhone.Append("/");\r
+ displaySdCard.Append("/");\r
+ }\r
+\r
+ if(filePath == defMediaPath)\r
+ {\r
+ token = displayPhone;\r
+ token.Remove(token.GetLength()-1,1);\r
+ }\r
+ else if(filePath == defSdCardPath)\r
+ {\r
+ token = displaySdCard;\r
+ token.Remove(token.GetLength()-1,1);\r
+ }\r
+ else\r
+ {\r
+ while (strTok.HasMoreTokens())\r
+ {\r
+ strTok.GetNextToken(token);\r
+ }\r
}\r
\r
pFileName = new (std::nothrow) String;\r
String*\r
FolderEntryDetailPresentationModel::GetFileDisplayPath(const Tizen::Base::String& filePath)\r
{\r
+ AppLogDebug("Entry");\r
+ String previousParentPath(L"");\r
String fileDisplayPath;\r
- String* pUpdatedFilePath = null;\r
+ String delim(L"/");\r
+ String token(L"");\r
+ String *pParentPath;\r
+\r
String displayPhone;\r
String displaySdCard;\r
String defMediaPath = BasePresentationModel::GetMediaPath();\r
displaySdCard.Append("/");\r
}\r
\r
- fileDisplayPath = filePath;\r
-\r
- if (fileDisplayPath.IsEmpty() == false)\r
+ if (filePath.Equals(BasePresentationModel::GetMediaPath(), false) ||\r
+ filePath.Equals(BasePresentationModel::GetSdCardPath(), false) ||\r
+ filePath.Equals(BasePresentationModel::GetUsbPath(), false))\r
+ {\r
+ AppLogDebug("path sent is root path hence return");\r
+ pParentPath = new (std::nothrow) String(L"/");\r
+ return pParentPath;\r
+ }\r
+ else\r
{\r
- if (fileDisplayPath.StartsWith(defMediaPath, 0))\r
+ StringTokenizer strTok(filePath, delim);\r
+ while (strTok.HasMoreTokens())\r
{\r
- fileDisplayPath.Replace(defMediaPath, displayPhone);\r
+ strTok.GetNextToken(token);\r
+ previousParentPath.Append(L"/");\r
+ previousParentPath.Append(token);\r
+\r
+ if (strTok.GetTokenCount() == 1 /*||\r
+ token.Equals(BasePresentationModel::GetMediaPath(), false) ||\r
+ token.Equals(BasePresentationModel::GetSdCardPath(), false) ||\r
+ token.Equals(BasePresentationModel::GetUsbPath(), false)*/)\r
+ {\r
+ break;\r
+ }\r
}\r
- else if (fileDisplayPath.StartsWith(defSdCardPath, 0))\r
+ previousParentPath.Append(L"/");\r
+ fileDisplayPath = previousParentPath;\r
+\r
+ if (fileDisplayPath.IsEmpty() == false)\r
{\r
- fileDisplayPath.Replace(defSdCardPath, displaySdCard);\r
+ if (fileDisplayPath.StartsWith(defMediaPath, 0))\r
+ {\r
+ fileDisplayPath.Replace(defMediaPath, displayPhone);\r
+ }\r
+ else if (fileDisplayPath.StartsWith(defSdCardPath, 0))\r
+ {\r
+ fileDisplayPath.Replace(defSdCardPath, displaySdCard);\r
+ }\r
}\r
+ //previousParentPath.Append(L"/");\r
+ AppLogDebug("Display path is %ls",fileDisplayPath.GetPointer());\r
+ fileDisplayPath.Remove(fileDisplayPath.GetLength()-1,1);\r
+ pParentPath = new (std::nothrow) String(fileDisplayPath);\r
+ AppLogDebug("Exit %s", GetErrorMessage(GetLastResult()));\r
+ return pParentPath;\r
}\r
-\r
- pUpdatedFilePath = new (std::nothrow) String(fileDisplayPath);\r
- return pUpdatedFilePath;\r
}\r
\r
long long int\r
__ThumbnailRequestInProgress = false;
TryReturn(__pThumbnailManager != null, E_FAILURE, "Thumbnails could not be generated");
- TryCatch((__pFolderEntries != null) && (__pFolderEntries->GetCount() != 0) && (__requestId >= 0),r=E_FAILURE, "Invalid Arguments!");
+ TryReturn((__pFolderEntries != null) && (__pFolderEntries->GetCount() != 0) && (__requestId >= 0),E_FAILURE, "Invalid Arguments!");
pDirEntry = static_cast< DirectoryEntry* >(__pFolderEntries->GetAt(__requestId));
TryCatch(pDirEntry != null,r=E_FAILURE , "FileEntry list is empty!");
if (_pFileProgressingPopup != null && _pFileProgressingPopup->IsVisible())
{
_pFileProgressingPopup->SetShowState(false);
- _pFileProgressingPopup->Invalidate(true);
+ //_pFileProgressingPopup->Invalidate(true);
- _pFileProgressingPopup->RemoveAllControls();
+ //_pFileProgressingPopup->RemoveAllControls();
delete _pFileProgressingPopup;
_pFileProgressingPopup = null;
}
ArrayList* pArgs = null;\r
bool itemStatus = false;\r
Integer currentIndex = index;\r
+ RelativeLayout* pLayout = null;\r
\r
pArgs = new (std::nothrow) ArrayList();\r
pArgs->Construct();\r
if (_selectionMode == SELECTION_MODE_MULTIPLE) // start of MULTIPLE_MODE_SELECTION if\r
{\r
\r
- RelativeLayout* pLayout = dynamic_cast <RelativeLayout*> (Form::GetLayoutN());\r
- pLayout->SetRelation(*_pListView, _pLabelNumberOfItems,RECT_EDGE_RELATION_BOTTOM_TO_TOP);\r
+ pLayout = dynamic_cast <RelativeLayout*> (Form::GetLayoutN());\r
+ if (pLayout != null)\r
+ {\r
+ pLayout->SetRelation(*_pListView, _pLabelNumberOfItems,RECT_EDGE_RELATION_BOTTOM_TO_TOP);\r
+ }\r
\r
if (selectedItemsCount > 0)\r
{\r
const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)\r
{\r
\r
+ RelativeLayout* pLayout = null;\r
+\r
SceneManager::GetInstance()->AddSceneManagerEventListener(*this);\r
\r
if (_selectionMode == SELECTION_MODE_SINGE) // start of MULTIPLE_MODE_SELECTION if\r
{\r
- RelativeLayout* pLayout = dynamic_cast <RelativeLayout*> (Form::GetLayoutN());\r
- pLayout->SetRelation(*_pListView, this ,RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);\r
+ pLayout = dynamic_cast <RelativeLayout*> (Form::GetLayoutN());\r
+ if (pLayout != null)\r
+ {\r
+ pLayout->SetRelation(*_pListView, this ,RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);\r
+ }\r
\r
delete pLayout;\r
\r
DirectoryEntry* pDirStr = null;
IconListViewItem* pItem = null;
- CreateItemSource source;
+
ContentType contentType = CONTENT_TYPE_UNKNOWN;
AppRegistry* pAppRegistry = null;
pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();
{\r
case 0:\r
{\r
- pItem->AddElement(Rectangle(26, 19, 74, 74), IDA_FORMAT_BITMAP, *__pPhone, __pPhonePress, null);\r
+ pItem->AddElement(Rectangle(X_LISTVIEW, Y_LISTVIEW, W_LISTVIEW_ITEM_BITMAP, H_LISTVIEW_ITEM_BITMAP), IDA_FORMAT_BITMAP, *__pPhone, __pPhonePress, null);\r
\r
}\r
break;\r
case 1:\r
{\r
- pItem->AddElement(Rectangle(26, 19, 74, 74), IDA_FORMAT_BITMAP, *__pMemoryCard, __pMemoryCardPress, null);\r
+ pItem->AddElement(Rectangle(X_LISTVIEW, Y_LISTVIEW, W_LISTVIEW_ITEM_BITMAP, H_LISTVIEW_ITEM_BITMAP), IDA_FORMAT_BITMAP, *__pMemoryCard, __pMemoryCardPress, null);\r
\r
}\r
break;\r
case 2:\r
{\r
- pItem->AddElement(Rectangle(26, 19, 74, 74), IDA_FORMAT_BITMAP, *__pExternalStorage, __pExternalStoragePress, null);\r
+ pItem->AddElement(Rectangle(X_LISTVIEW, Y_LISTVIEW, W_LISTVIEW_ITEM_BITMAP, H_LISTVIEW_ITEM_BITMAP), IDA_FORMAT_BITMAP, *__pExternalStorage, __pExternalStoragePress, null);\r
}\r
break;\r
default:\r