NABI_SE issue fixes
authorchitta.rs <chitta.rs@samsung.com>
Sat, 20 Apr 2013 09:18:18 +0000 (14:48 +0530)
committerchitta.rs <chitta.rs@samsung.com>
Sat, 20 Apr 2013 09:18:18 +0000 (14:48 +0530)
Change-Id: Icc0f2d39fb55d98805bc55642aee2b96f0bef1fc

src/MfContentListItem.cpp
src/MfSubBaseFileManageForm.cpp
src/MfSubBaseFolderEntryForm.cpp
src/MfSubFolderFileListForm.cpp

index fd85b5b..a11240c 100644 (file)
@@ -819,29 +819,28 @@ ContentListItem::MakeSearchFormListItem(void)
        int normalGap = X_LISTVIEW;\r
        int thumbnailWidth = W_LISTVIEW_ITEM_BITMAP;\r
        int thumbnailHeight = H_LISTVIEW_ITEM_BITMAP;\r
+       int detailIconWidth = W_LISTVIEW_ITEM_BITMAP;\r
        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);\r
-//     int x_Rename = width - (W_RENAME_ICON + X_LISTVIEW);\r
+       int w_Title = 0;\r
+\r
        GetItemSize(__itemHeight, titleHeight);\r
 \r
        if (__currentListStyle == ANNEX_STYLE_DETAILED)\r
        {\r
+               w_Title = width - (W_LISTVIEW_ITEM_BITMAP + 4 * X_LISTVIEW) - detailIconWidth;\r
                Construct(Dimension(__itemWidth, __itemHeight), LIST_ANNEX_STYLE_DETAILED);\r
        }\r
        else\r
        {\r
+               w_Title = width - (W_LISTVIEW_ITEM_BITMAP + 3 * X_LISTVIEW);\r
                Construct(Dimension(__itemWidth, __itemHeight), LIST_ANNEX_STYLE_NORMAL);\r
        }\r
 \r
        SetElementTextVerticalAlignment(CONTENT_LIST_ITEM_TYPE_THUMBNAIL, ALIGNMENT_MIDDLE);\r
        SetElementTextVerticalAlignment(CONTENT_LIST_ITEM_TYPE_FILEPATH, ALIGNMENT_BOTTOM);\r
-//     SetElementTextVerticalAlignment(CONTENT_LIST_ITEM_TYPE_RENAME, ALIGNMENT_MIDDLE);\r
 \r
        __thumbnailRect.SetBounds(thumbnailX, thumbnailY, thumbnailWidth, thumbnailHeight); //right side width:20\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
        RefreshSearchFormListItem();\r
@@ -915,11 +914,6 @@ ContentListItem::RefreshSearchFormListItem(void)
        __pFtFilepath->SetTextWrap(TEXT_WRAP_NONE);\r
        __pFtFilepath->AddText(__filepath, FONT_SUB, COLOR_DATE);\r
        AddElement(__editDateRect, CONTENT_LIST_ITEM_TYPE_FILEPATH, *__pFtFilepath);\r
-\r
-//     if (__pRenameBitmap != null)\r
-//     {\r
-//             AddElement(__editRenameRect, CONTENT_LIST_ITEM_TYPE_RENAME, *__pRenameBitmap, __pRenamePressed, __pRenameBitmap);\r
-//     }\r
 }\r
 void\r
 ContentListItem::SetFilepath(const Tizen::Base::String& filePath)\r
index 3c462a4..98eafb5 100644 (file)
@@ -1060,9 +1060,10 @@ void
 SubBaseFileManageForm::SetFooterVisibility(int mode)
 {
        AppLogDebug("ENTRY mode = %d",mode);
+       int folderCount = 0, fileCount = 0;
        _pFooter = GetFooter();
 
-       if (mode == 0)
+       if (mode == DISABLE_FOOTER_ITEM)
        {
                _pFooter->SetItemEnabled(0, false);
                _pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
index beedd7e..8ddeed0 100644 (file)
@@ -2136,19 +2136,27 @@ void
 SubBaseFolderEntryForm::SetFooterVisibility(int mode)
 {
        AppLogDebug("Entry");
+       int folderCount=0, fileCount=0;
+
        _pFooter = GetFooter();
 
-       if (mode == 0)
+       if( _pFolderEntryPM )
+               _pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(), folderCount, fileCount);
+
+       if (mode == DISABLE_FOOTER_ITEM)
        {
-               _pFooter->SetItemEnabled(0, false);
-               _pFooter->SetItemEnabled(1, false);
+               if (folderCount ==0 )
+                       _pFooter->SetItemEnabled(0, false);
+               if (fileCount ==0 )
+                       _pFooter->SetItemEnabled(1, false);
        }
        else
        {
-               _pFooter->SetItemEnabled(0, true);
-               _pFooter->SetItemEnabled(1, true);
+               if(folderCount!=0)
+                       _pFooter->SetItemEnabled(0, true);
+               if (fileCount!=0)
+                       _pFooter->SetItemEnabled(1, true);
        }
-
        _pFooter->Invalidate(true);
 }
 
index c69fe71..7789ab4 100644 (file)
@@ -940,6 +940,10 @@ SubFolderFileListForm::ShowParentDirectoryView(void)
        {
                ParentPath = FolderNavigationPresentationModel::GetParentPath();
 
+               if(_pFileEventManager != null)
+               {
+                       _pFileEventManager->RemovePath(__currentDirectoryPath);
+               }
                __currentDirectoryPath.Clear();
                __currentDirectoryPath.Append(ParentPath);
 
@@ -1007,38 +1011,6 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList
        case FILE_MANAGING_RESULT_DELETING_SUCCESS:
        {
                AppLogDebug("FILE DELETION SUCCESSFULL");
-               if (_pFilenames != null)
-               {
-                       /*pCacheList = CacheManager::GetInstance()->GetCacheHashMap();
-
-                       if (pCacheList != null)
-                       {
-                               pCurrentEntry = static_cast<DirectoryEntry*>(_pFilenames->GetAt(_indexTracker));
-
-                               if (pCurrentEntry != null)
-                               {
-                                       cachePath = pCurrentEntry->GetFullFilePath();
-                               }
-
-                               cacheKeyStatus = pCacheList->ContainsKey(cachePath);
-
-                               if (cacheKeyStatus)
-                               {
-                                       CacheManager::GetInstance()->RemoveCacheEntry(cachePath);
-                               }
-                       }*/
-                       /*_pFilenames->RemoveAt(_indexTracker, true);
-                       //r = __pListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_REMOVE);
-                       if (_pListView != null)
-                       {
-                               //_pListView->UpdateList();
-                               _pListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE);
-                       }
-                       if (_pIconListView != null && _pIconListView->IsVisible())
-                       {
-                               _pIconListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE);
-                       }*/
-               }
                HideFileProgressingPopup();
        }
        break;
@@ -1059,7 +1031,9 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList
        }
        break;
        }
-       CATCH:
+
+       SetFooterVisibility(DISABLE_FOOTER_ITEM);
+CATCH:
        if (pArgs != null)
        {
                pArgs->RemoveAll(true);