Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method symbian1
authorteknolog
Mon, 07 Jun 2010 23:06:17 +0100
branchsymbian1
changeset 149 70b2f592a460
parent 148 e3f9b65d6910
child 154 fd105a5a9dad
Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
application/data/PodcastQueueView.ra
application/inc/buildno.h
application/sis/buildno.txt
application/sis/podcatcher_udeb.pkg
application/sis/podcatcher_udeb.sis
application/sis/podcatcher_udeb_signed.sis
application/sis/podcatcher_urel.pkg
application/src/PodcastQueueView.cpp
engine/src/ShowEngine.cpp
--- a/application/data/PodcastQueueView.ra	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/data/PodcastQueueView.ra	Mon Jun 07 23:06:17 2010 +0100
@@ -142,7 +142,7 @@
 				{
 					txt = STRING_r_view_remove_download_short_cmd;
 					command = EPodcastRemoveDownload;
-				}/*,
+				},
 			STYLUS_POPUP_MENU_ITEM
 				{
 					txt = STRING_r_view_move_up_short_cmd;
@@ -153,6 +153,5 @@
 					txt = STRING_r_view_move_down_short_cmd;
 					command = EPodcastMoveDownloadDown;
 				}
-				*/
 		};
 	}
--- a/application/inc/buildno.h	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/inc/buildno.h	Mon Jun 07 23:06:17 2010 +0100
@@ -1,2 +1,2 @@
 // Build number generated by increment_buildno.py, do not edit manually
-#define BUILD_NO 25
\ No newline at end of file
+#define BUILD_NO 26
\ No newline at end of file
--- a/application/sis/buildno.txt	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/sis/buildno.txt	Mon Jun 07 23:06:17 2010 +0100
@@ -1,1 +1,1 @@
-25
\ No newline at end of file
+26
\ No newline at end of file
--- a/application/sis/podcatcher_udeb.pkg	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/sis/podcatcher_udeb.pkg	Mon Jun 07 23:06:17 2010 +0100
@@ -1,7 +1,7 @@
 &EN
 :"Symbian Foundation"
 %{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 25, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 26, TYPE=SA
 
 ;Supports S60 3rd edition
 [0x101F7961], 0, 0, 0, {"Series60ProductID"}
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
--- a/application/sis/podcatcher_urel.pkg	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/sis/podcatcher_urel.pkg	Mon Jun 07 23:06:17 2010 +0100
@@ -1,7 +1,7 @@
 &EN
 :"Symbian Foundation"
 %{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 25, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 26, TYPE=SA
 
 ;Supports S60 3rd edition
 [0x101F7961], 0, 0, 0, {"Series60ProductID"}
--- a/application/src/PodcastQueueView.cpp	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/src/PodcastQueueView.cpp	Mon Jun 07 23:06:17 2010 +0100
@@ -255,25 +255,47 @@
 			break;
 		case EPodcastMoveDownloadUp:
 			{
-			//iPodcastModel.ShowEngine().SuspendDownloads();
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
+			TBool resumeAfterMove = EFalse;
+			if (index == 1 && !iPodcastModel.SettingsEngine().DownloadSuspended())
+				{
+				iPodcastModel.ShowEngine().SuspendDownloads();
+				resumeAfterMove = ETrue;
+				}
+			
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
 				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid()));
 				}
-			//iPodcastModel.ShowEngine().ResumeDownloadsL();
+			
+			if(resumeAfterMove)
+				{
+				iPodcastModel.ShowEngine().ResumeDownloadsL();
+				}
+				
 			UpdateListboxItemsL();
 			}
 			break;
 		case EPodcastMoveDownloadDown:
 			{
-			//iPodcastModel.ShowEngine().SuspendDownloads();			
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
+			TBool resumeAfterMove = EFalse;
+			if (index == 0 && !iPodcastModel.SettingsEngine().DownloadSuspended())
+				{
+				iPodcastModel.ShowEngine().SuspendDownloads();
+				resumeAfterMove = ETrue;
+				}
+			
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
 				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid()));
 				}
-			//iPodcastModel.ShowEngine().ResumeDownloadsL();
+			
+			if(resumeAfterMove)
+				{
+				iPodcastModel.ShowEngine().ResumeDownloadsL();
+				}
+			
 			UpdateListboxItemsL();
 			}
 			break;
--- a/engine/src/ShowEngine.cpp	Thu Jun 03 23:38:58 2010 +0100
+++ b/engine/src/ShowEngine.cpp	Mon Jun 07 23:06:17 2010 +0100
@@ -1045,7 +1045,7 @@
 void CShowEngine::DBSwapDownloadsL(TDownload aFirstDL, TDownload aSecondDL)
 	{
 	DP("CShowEngine::DBSwapDownloadsL");
-	_LIT(KSqlStatement, "update downloads set uid=%d where dl_index=%d");
+	_LIT(KSqlStatement, "update downloads set uid=%u where dl_index=%d");
 	
 	iSqlBuffer.Format(KSqlStatement, aFirstDL.iUid, aSecondDL.iIndex);
 	sqlite3_stmt *st;