tasque r38 - in branches/cache: . src src/Backends/Rtm



Author: calvinrg
Date: Tue Mar 18 22:27:23 2008
New Revision: 38
URL: http://svn.gnome.org/viewvc/tasque?rev=38&view=rev

Log:
* src/Backends/Rtm/RtmBackend.cs, src/SyncManager.cs: Fixed up
  SyncManager to actually get the categories and tasks from backend

Modified:
   branches/cache/ChangeLog
   branches/cache/src/Backends/Rtm/RtmBackend.cs
   branches/cache/src/SyncManager.cs

Modified: branches/cache/src/Backends/Rtm/RtmBackend.cs
==============================================================================
--- branches/cache/src/Backends/Rtm/RtmBackend.cs	(original)
+++ branches/cache/src/Backends/Rtm/RtmBackend.cs	Tue Mar 18 22:27:23 2008
@@ -141,12 +141,8 @@
 		
 		public void Refresh()
 		{
-			Logger.Debug("RtmBackend Refreshing data...");
-
 			UpdateCategories();			
 			UpdateTasks();
-
-			Logger.Debug("RtmBackend refreshing data!");
 		}
 
 		public void Initialize()
@@ -418,8 +414,6 @@
 		/// </summary>		
 		private void UpdateCategories()
 		{
-			Logger.Debug("RtmBackend.UpdateCategories was called");
-			
 			categories.Clear();
 			
 			try {
@@ -433,7 +427,6 @@
 			} catch (Exception e) {
 				Logger.Debug("Exception in fetch " + e.Message);
 			}
-			Logger.Debug("RtmBackend.UpdateCategories is done");			
 		}
 
 		/// <summary>
@@ -442,8 +435,6 @@
 		/// </summary>		
 		private void UpdateTasks()
 		{
-			Logger.Debug("RtmBackend.UpdateTasks was called");
-			
 			tasks.Clear();
 
 			try {
@@ -474,7 +465,6 @@
 				Logger.Debug("Exception in fetch " + e.Message);
 				Logger.Debug(e.ToString());
 			}
-			Logger.Debug("RtmBackend.UpdateTasks is done");			
 		}
 
 		

Modified: branches/cache/src/SyncManager.cs
==============================================================================
--- branches/cache/src/SyncManager.cs	(original)
+++ branches/cache/src/SyncManager.cs	Tue Mar 18 22:27:23 2008
@@ -62,12 +62,25 @@
 					(Application.Backend.Configured) &&
 					(Application.Backend.Initialized) )
 				{
+					Dictionary<string, ITask> tasks;
+					Dictionary<string, ICategory> categories;
+					
 					// Refresh the tasks
 					Application.Backend.Refresh();
 
 					// Read Categories and populate them in the localCache
+					categories = Application.Backend.Categories;
+					foreach(ICategory cat in categories.Values)
+					{
+						Logger.Debug("Category: {0}", cat.Name);
+					}
 					
 					// Read Tasks and populate them into the localCache
+					tasks = Application.Backend.Tasks;
+					foreach(ITask task in tasks.Values)
+					{
+						Logger.Debug("Task: {0}", task.Name);
+					}
 				}
 			
 				Logger.Debug("SyncThreadLoop done!");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]