browserui/browser/FavouritesSrc/BrowserBookmarksView.cpp
changeset 15 d6f226a5ad2c
parent 11 16a119033e3e
child 24 868cceedabd3
equal deleted inserted replaced
11:16a119033e3e 15:d6f226a5ad2c
  1481                 aMenuPane->SetItemDimmed( EWmlCmdAddBookmark, ETrue );
  1481                 aMenuPane->SetItemDimmed( EWmlCmdAddBookmark, ETrue );
  1482                 aMenuPane->SetItemDimmed( EWmlCmdCopyToBookmarks, ETrue );
  1482                 aMenuPane->SetItemDimmed( EWmlCmdCopyToBookmarks, ETrue );
  1483                 aMenuPane->SetItemDimmed( EWmlCmdSwitchToGotoActive, ETrue );
  1483                 aMenuPane->SetItemDimmed( EWmlCmdSwitchToGotoActive, ETrue );
  1484                 aMenuPane->SetItemDimmed( EWmlCmdNewFolder, ETrue );
  1484                 aMenuPane->SetItemDimmed( EWmlCmdNewFolder, ETrue );
  1485                 }
  1485                 }
       
  1486                 
       
  1487             if( iContainer && iContainer->Listbox() && !iContainer->Listbox()->AnyFoldersL() )
       
  1488                 {
       
  1489                 aMenuPane->SetItemDimmed( EWmlCmdMoveToFolder, ETrue );
       
  1490                 }
  1486             const CFavouritesItem* item =  TheContainer()->Listbox()->CurrentItem();
  1491             const CFavouritesItem* item =  TheContainer()->Listbox()->CurrentItem();
  1487             if  ( ( item ) &&
  1492             if  ( ( item ) &&
  1488                   ( ( item->Uid() == KFavouritesAdaptiveItemsFolderUid ) ||
  1493                   ( ( item->Uid() == KFavouritesAdaptiveItemsFolderUid ) ||
  1489                     ( item->ContextId() != NULL ) )
  1494                     ( item->ContextId() != NULL ) )
  1490                 )
  1495                 )
  1494                 aMenuPane->SetItemDimmed( EWmlCmdDelete, ETrue );
  1499                 aMenuPane->SetItemDimmed( EWmlCmdDelete, ETrue );
  1495                 aMenuPane->SetItemDimmed( EWmlCmdMoveToFolder, ETrue );
  1500                 aMenuPane->SetItemDimmed( EWmlCmdMoveToFolder, ETrue );
  1496                 }
  1501                 }
  1497                 
  1502                 
  1498             //Enable CopyToBookmarks option if you are in RecentlyVisitedUrl folder
  1503             //Enable CopyToBookmarks option if you are in RecentlyVisitedUrl folder
  1499 			if( iInAdaptiveBookmarksFolder )
  1504             if( iInAdaptiveBookmarksFolder )
  1500 				{
  1505             	{
  1501 				aMenuPane->SetItemDimmed( EWmlCmdCopyToBookmarks, EFalse );
  1506             	aMenuPane->SetItemDimmed( EWmlCmdCopyToBookmarks, EFalse );
  1502 				}
  1507             	}
       
  1508             //judge the selected items include RecentlyVisitedUrl folder or not, if include set "copy to bookmarks" dim
       
  1509             CArrayPtr<const CFavouritesItem>* items = Container()->Listbox()->SelectedItemsLC();
       
  1510             if (items->Count())
       
  1511                 {
       
  1512                 for (TInt i=0;i<items->Count();i++)
       
  1513 				    {
       
  1514 				    if((*items)[i]->Uid() == KFavouritesAdaptiveItemsFolderUid )
       
  1515 				        {
       
  1516 			            aMenuPane->SetItemDimmed( EWmlCmdCopyToBookmarks, ETrue );
       
  1517 			            }
       
  1518 			        }
       
  1519                 }
       
  1520             CleanupStack::PopAndDestroy();//items
  1503             break;
  1521             break;
  1504             }
  1522             }
  1505         default:
  1523         default:
  1506             {
  1524             {
  1507             break;
  1525             break;
  2750                                 || ( item->Uid() == KFavouritesAdaptiveItemsFolderUid )
  2768                                 || ( item->Uid() == KFavouritesAdaptiveItemsFolderUid )
  2751                                 || ( item->ContextId() != NULL )
  2769                                 || ( item->ContextId() != NULL )
  2752                                 || (!state.AnyDeletable());
  2770                                 || (!state.AnyDeletable());
  2753 
  2771 
  2754         Toolbar()->SetItemDimmed( EWmlCmdDelete, needToDimDeleteBtn, ETrue );
  2772         Toolbar()->SetItemDimmed( EWmlCmdDelete, needToDimDeleteBtn, ETrue );
       
  2773         //set EWmlCmdAddBookmark dim in RecentlyVisitedUrl Folder
       
  2774         Toolbar()->SetItemDimmed( EWmlCmdAddBookmark, iInAdaptiveBookmarksFolder, ETrue);
       
  2775        
       
  2776         
  2755         }
  2777         }
  2756     }
  2778     }
  2757 // End of File
  2779 // End of File