Moved search result title to navipane. Fixed but 1832
authorteknolog
Sun, 28 Feb 2010 19:35:33 +0000
changeset 24 ca50ea154990
parent 23 cf4b850bbffb
child 25 ae65906c4347
Moved search result title to navipane. Fixed but 1832
application/data/PodcastClient_english.rls
application/data/PodcastShowsView.ra
application/inc/PodcastAppui.h
application/sis/podcatcher_udeb.sis
application/sis/podcatcher_udeb_signed.sis
application/sis/podcatcher_urel.sis
application/sis/podcatcher_urel_signed.sis
application/src/PodcastAppui.cpp
application/src/PodcastFeedView.cpp
application/src/PodcastListView.cpp
application/src/PodcastSearchView.cpp
application/src/PodcastShowsView.cpp
--- a/application/data/PodcastClient_english.rls	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/data/PodcastClient_english.rls	Sun Feb 28 19:35:33 2010 +0000
@@ -155,7 +155,7 @@
 
 rls_string STRING_r_add_feed_replace "All existing shows in this feed will be deleted! Continue?" // shown when changing an existing feed URL
 rls_string STRING_r_add_feed_replace_title "Warning" // title to dialog
-rls_string STRING_r_view_export_feeds_cmd "Export Feeds" // Export feeds cmd in feedview
+rls_string STRING_r_view_export_feeds_cmd "Export feeds" // Export feeds cmd in feedview
 rls_string STRING_r_view_export_feeds_cmd_short "Export"
 
 rls_string STRING_r_catchup_feed "Mark all shows as played?" // shown when first updating a new feed
--- a/application/data/PodcastShowsView.ra	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/data/PodcastShowsView.ra	Sun Feb 28 19:35:33 2010 +0000
@@ -213,30 +213,6 @@
 		};
 	}
 
-/*
-RESOURCE DIALOG r_show_info_note
-    {
-    flags = EEikDialogFlagNoDrag |
-            EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons |
-            EEikDialogFlagFillAppClientRect;
-
-    buttons = R_AVKON_SOFTKEYS_OK_EMPTY ;
-    items =
-		{    	
-        DLG_LINE
-            {
-            type = EAknCtNote;
-            id = EGeneralNote;
-            control = AVKON_NOTE
-                {
-                layout = ENotificationWithGraphicsLayout;                                
-                };
-            }        
-        };
-
-    }*/
-
 RESOURCE DIALOG r_show_info_note
 {
    flags = EAknDialogGenericQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
@@ -262,17 +238,7 @@
          {
           
          };
-      }  ,      
-      DLG_LINE
-    	  {
-    	  itemflags = EEikDlgItemNonFocusing;
-    	  type = EEikCtImage;
-    	  id = EPodcastShowInfoImage;
-    	  control = IMAGE
-    		  {
-    		  
-    		  };
-    	  }
+      }
    };
 }
 
--- a/application/inc/PodcastAppui.h	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/inc/PodcastAppui.h	Sun Feb 28 19:35:33 2010 +0000
@@ -46,6 +46,13 @@
 
 const TInt KTimeoutPrio = CActive::EPriorityStandard;
 
+enum TNaviStyle
+	{
+	ENaviEmpty,
+	ENaviText,
+	ENaviTabGroup
+	};
+
 class CTimeout;
 
 class MTimeoutObserver
@@ -111,15 +118,15 @@
        void UpdateQueueTab(TInt aQueueLength);
        void TabLeft();
        void TabRight();
-       void SetTabsVisibleL(TBool aVisible);
+       void NaviSetTextL(TInt aResourceId);
+       void NaviShowTabGroupL();
+       
     private:
         // From MEikMenuObserver
         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
         void TabChangedL (TInt aIndex);
         CArrayFix<TCoeHelpContext>* HelpContextL() const;
-    private:
         void HandleCommandL(TInt aCommand);
-        void NaviShowTabGroupL();
     protected:
     	void HandleTimeout(const CTimeout& aId, TInt aError);
 
@@ -141,10 +148,11 @@
 		
 		CPodcastModel* iPodcastModel;
 
-		CAknNavigationDecorator* iNaviDecorator;
+		CAknNavigationDecorator* iNaviTabGroup;
+		CAknNavigationDecorator* iNaviText;
 		CAknTabGroup* iTabGroup;
 		CAknNavigationControlContainer* iNaviPane;
-		TBool iTabsVisible;
+		TNaviStyle iNaviStyle;
 		CTimeout* iStartTimer;
     };
 
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
Binary file application/sis/podcatcher_urel.sis has changed
Binary file application/sis/podcatcher_urel_signed.sis has changed
--- a/application/src/PodcastAppui.cpp	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/src/PodcastAppui.cpp	Sun Feb 28 19:35:33 2010 +0000
@@ -79,11 +79,21 @@
 
 CPodcastAppUi::~CPodcastAppUi()
     {
-    if(iNaviDecorator)
+    if (iNaviStyle != ENaviEmpty)
+    	{
+    	iNaviPane->Pop();
+    	}
+
+    if(iNaviTabGroup)
     	{
-    	iNaviPane->Pop(iNaviDecorator);
-    	delete iNaviDecorator;
+    	delete iNaviTabGroup;
     	}
+    
+    if (iNaviText)
+    	{
+    	delete iNaviText;
+    	}
+    
 	delete iStartTimer;
     }
 
@@ -149,11 +159,32 @@
     return array;
 	}
 
+void CPodcastAppUi::NaviSetTextL(TInt aResourceId)
+	{
+	
+	if (iNaviStyle != ENaviEmpty) {
+		iNaviPane->Pop();
+	}
+
+	HBufC* naviText =  iEikonEnv->AllocReadResourceLC(aResourceId);
+	iNaviText  = iNaviPane->CreateNavigationLabelL(*naviText);
+	
+	iNaviPane->PushL(*iNaviText);
+
+	CleanupStack::PopAndDestroy(naviText);	
+	
+	iNaviStyle = ENaviText;
+	}
+
 void CPodcastAppUi::NaviShowTabGroupL()
 	{
-	iNaviDecorator = iNaviPane->CreateTabGroupL();
+	if (iNaviStyle != ENaviEmpty) {
+		iNaviPane->Pop();
+	}
 	
-	iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviDecorator->DecoratedControl());
+	iNaviTabGroup = iNaviPane->CreateTabGroupL();
+	
+	iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviTabGroup->DecoratedControl());
 	iTabGroup->SetTabFixedWidthL(EAknTabWidthWithTwoTabs);
 
 	HBufC *label1 = iEikonEnv->AllocReadResourceLC(R_TABGROUP_FEEDS);
@@ -168,9 +199,9 @@
 	iTabGroup->SetActiveTabByIndex(0);
 	iTabGroup->SetObserver(this);
 
-	iNaviPane->Pop();
-	SetTabsVisibleL(ETrue);
-	
+	iNaviPane->PushL(*iNaviTabGroup);
+	iNaviStyle = ENaviTabGroup;
+
 	UpdateQueueTab(iPodcastModel->ShowEngine().GetNumDownloadingShows());
 	}
 
@@ -178,30 +209,31 @@
 	{
 	DP("CPodcastListView::TabChangedL ");
 	
-	if (!iTabsVisible)
+	if (iNaviStyle == ENaviTabGroup)
 		{
-		return;
+		TUid newview = TUid::Uid(0);
+		TUid messageUid = TUid::Uid(0);
+		
+		if (aIndex == KTabIdFeeds) {
+			newview = KUidPodcastFeedViewID;
+		} else if (aIndex == KTabIdQueue) {
+			newview = KUidPodcastQueueViewID;
+		} else {
+			User::Leave(KErrTooBig);
 		}
-	
-	TUid newview = TUid::Uid(0);
-	TUid messageUid = TUid::Uid(0);
-	
-	if (aIndex == KTabIdFeeds) {
-		newview = KUidPodcastFeedViewID;
-	} else if (aIndex == KTabIdQueue) {
-		newview = KUidPodcastQueueViewID;
-	} else {
-		User::Leave(KErrTooBig);
-	}
-	
-	if(newview.iUid != 0)
-		{			
-		ActivateLocalViewL(newview,  messageUid, KNullDesC8());
+		
+		if(newview.iUid != 0)
+			{			
+			ActivateLocalViewL(newview,  messageUid, KNullDesC8());
+			}
 		}
 	}
 
 void CPodcastAppUi::SetActiveTab(TInt aIndex) {
-	iTabGroup->SetActiveTabByIndex(aIndex);
+	if (iNaviStyle == ENaviTabGroup)
+		{
+		iTabGroup->SetActiveTabByIndex(aIndex);
+		}
 }
 
 void CPodcastAppUi::HandleTimeout(const CTimeout& /*aId*/, TInt /*aError*/)
@@ -211,66 +243,51 @@
 
 void CPodcastAppUi::UpdateQueueTab(TInt aQueueLength)
 	{
-	if (aQueueLength == 0)
-		{
-		HBufC *queue = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE);
-		iTabGroup->ReplaceTabL(KTabIdQueue, *queue);
-		CleanupStack::PopAndDestroy(queue);
-		}
-	else
+	if (iNaviStyle == ENaviTabGroup)
 		{
-		HBufC *queueTemplate = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE_COUNTER);
-		HBufC *queueCounter = HBufC::NewLC(queueTemplate->Length()+2);
-		queueCounter->Des().Format(*queueTemplate, aQueueLength);
-		
-		iTabGroup->ReplaceTabL(KTabIdQueue, *queueCounter);
-		CleanupStack::PopAndDestroy(queueCounter);
-		CleanupStack::PopAndDestroy(queueTemplate);	
+		if (aQueueLength == 0)
+			{
+			HBufC *queue = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE);
+			iTabGroup->ReplaceTabL(KTabIdQueue, *queue);
+			CleanupStack::PopAndDestroy(queue);
+			}
+		else
+			{
+			HBufC *queueTemplate = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE_COUNTER);
+			HBufC *queueCounter = HBufC::NewLC(queueTemplate->Length()+2);
+			queueCounter->Des().Format(*queueTemplate, aQueueLength);
+			
+			iTabGroup->ReplaceTabL(KTabIdQueue, *queueCounter);
+			CleanupStack::PopAndDestroy(queueCounter);
+			CleanupStack::PopAndDestroy(queueTemplate);	
+			}
 		}
 	}
 
 void CPodcastAppUi::TabLeft()
 	{
-	if (!iTabsVisible)
+	if (iNaviStyle == ENaviTabGroup) 
 		{
-		return;
+		TInt ati = iTabGroup->ActiveTabIndex();
+		if(ati > 0)
+			{
+			SetActiveTab(ati-1);
+			TabChangedL(ati-1);
+			}
 		}
-	
-	TInt ati = iTabGroup->ActiveTabIndex();
-	if(ati > 0) {
-		SetActiveTab(ati-1);
-		TabChangedL(ati-1);
-	}
 	}
 
 void CPodcastAppUi::TabRight()
 	{
-	if (!iTabsVisible)
+	if (iNaviStyle == ENaviTabGroup) 
 		{
-		return;
-		}
-	
-	TInt ati = iTabGroup->ActiveTabIndex();
-	if(ati < iTabGroup->TabCount()-1) {
-		SetActiveTab(ati+1);
-		TabChangedL(ati+1);
-	}
-	}
-
-void CPodcastAppUi::SetTabsVisibleL(TBool aVisible)
-	{
-	if (aVisible)
-		{
-		if(!iTabsVisible && iNaviDecorator)
+		TInt ati = iTabGroup->ActiveTabIndex();
+		if(ati < iTabGroup->TabCount()-1)
 			{
-			iNaviPane->PushL(*iNaviDecorator);
+			SetActiveTab(ati+1);
+			TabChangedL(ati+1);
 			}
 		}
-	else if (iTabsVisible) {
-		iNaviPane->Pop(iNaviDecorator);
-	}
-	
-	iTabsVisible=aVisible;
 	}
 
 void CPodcastAppUi::ConnectionSelectionStart()
--- a/application/src/PodcastFeedView.cpp	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/src/PodcastFeedView.cpp	Sun Feb 28 19:35:33 2010 +0000
@@ -921,7 +921,6 @@
 					}
 				else
 					{
-					((CPodcastAppUi*)AppUi())->SetTabsVisibleL(EFalse);
 					AppUi()->ActivateLocalViewL(KUidPodcastSearchViewID,  TUid::Uid(0), KNullDesC8());
 					}
 				iOpmlState = EOpmlIdle;
--- a/application/src/PodcastListView.cpp	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/src/PodcastListView.cpp	Sun Feb 28 19:35:33 2010 +0000
@@ -74,13 +74,11 @@
 	iListbox->MakeVisible(ETrue);
     MakeVisible(EFalse);
     
-
 //#ifndef SYMBIAN1_UI
 //	TInt flags = iListbox->View()->ItemDrawer()->Flags();
 //	flags |= CListItemDrawer::EDisableHighlight;
 //	iListbox->ItemDrawer()->SetFlags(flags);
 //#endif
-//	
 
 	// Activate the window, which makes it ready to be drawn
     ActivateL();   
--- a/application/src/PodcastSearchView.cpp	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/src/PodcastSearchView.cpp	Sun Feb 28 19:35:33 2010 +0000
@@ -132,11 +132,9 @@
 	
 	 CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
 		      ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-	
-	HBufC* title = iEikonEnv->AllocReadResourceLC(R_SEARCH_RESULTS);
-	titlePane->SetTextL( *title, ETrue );
-	CleanupStack::PopAndDestroy(title);
-    
+
+    ((CPodcastAppUi*)AppUi())->NaviSetTextL(R_SEARCH_RESULTS);
+
 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
 	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
 }
@@ -147,7 +145,7 @@
 	CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
 		     ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
 	titlePane->SetTextToDefaultL();
-	((CPodcastAppUi*)AppUi())->SetTabsVisibleL(ETrue);
+	((CPodcastAppUi*)AppUi())->NaviShowTabGroupL();
 }
 
 
--- a/application/src/PodcastShowsView.cpp	Sun Feb 28 12:06:30 2010 +0000
+++ b/application/src/PodcastShowsView.cpp	Sun Feb 28 19:35:33 2010 +0000
@@ -73,45 +73,6 @@
 			0
 	};
 
-/** 
- *  This is an interal class to display a message query dialog with an image at the bottm
- */
-class CPodcastImageMessageQueryDialog:public CAknMessageQueryDialog
-	{
-	public:
-		/**
-		 * C++ default constructor.
-		 *
-		 * @param aMessage Dialog box text.
-		 * @param aHeader Header for the dialog.
-		 * @deprecated 
-		 */ 
-		CPodcastImageMessageQueryDialog(TDesC* aMessage, TDesC* aHeader):CAknMessageQueryDialog(aMessage, aHeader)
-    		{
-
-    		}    
-
-		~CPodcastImageMessageQueryDialog()
-			{
-
-			}
-
-		void SetSizeAndPosition(const TSize& aSize)
-			{
-			CAknMessageQueryDialog::SetSizeAndPosition(aSize);
-
-			TPoint pos = Position();		 
-			TSize size = Size();
-
-			CAknDialog::SetSizeAndPosition(aSize);		 		 
-
-			pos.iY-=((aSize.iHeight-size.iHeight)-KPodcastDialogOffset);
-			SetPosition(pos);	
-			SetSize(aSize);
-			}
-
-	};
-
 CPodcastShowsView* CPodcastShowsView::NewL(CPodcastModel& aPodcastModel)
 	{
 	CPodcastShowsView* self = CPodcastShowsView::NewLC(aPodcastModel);
@@ -686,44 +647,14 @@
 	if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 		{
 		CShowInfo* info = iPodcastModel.ActiveShowList()[index];
-		TUint32 feedUid = info->FeedUid();							
-//		CFeedInfo* feedInfo = iPodcastModel.FeedEngine().GetFeedInfoByUid(feedUid);
+
+		HBufC *title = info->Title().AllocL();
+		HBufC *description = info->Description().AllocL();
 		
-		CPodcastImageMessageQueryDialog* note = new ( ELeave ) CPodcastImageMessageQueryDialog( (TDesC*)&info->Description(), (TDesC*)&info->Title() );
+		CAknMessageQueryDialog* note = new ( ELeave ) CAknMessageQueryDialog( description, title );
 							
 		note->PrepareLC( R_SHOW_INFO_NOTE ); // Adds to CleanupStack
-		
-//		if(feedInfo && feedInfo->ImageFileName().Length()>0)
-//			{
-//			CFbsBitmap * bitmap = new (ELeave) CFbsBitmap;
-//			CleanupStack::PushL(bitmap);
-//			
-//			TRAPD(loaderror, iPodcastModel.ImageHandler().LoadFileAndScaleL(bitmap, feedInfo->ImageFileName(), TSize(KPodcastImageWidth, KPodcastImageHeight), *this));
-//			
-//			if(loaderror == KErrNone)
-//				{
-//				CActiveScheduler::Start();
-//				if(iLastImageHandlerError == KErrNone)
-//					{	
-//					CEikImage* image = static_cast<CEikImage*>(note->ControlOrNull(EPodcastShowInfoImage));
-//					image->SetBitmap(bitmap);
-//					CleanupStack::Pop(bitmap);
-//					bitmap = NULL;
-//					}
-//				else
-//					{				
-//					CleanupStack::PopAndDestroy(bitmap);
-//					bitmap = NULL;
-//					}
-//				}
-//			else
-//				{
-//				CleanupStack::PopAndDestroy(bitmap);
-//				bitmap = NULL;
-//				}
-//			}												
-		
-		note->RunLD(); 
+		note->RunLD();
 		}
 	}