tasque r179 - in trunk: . src



Author: sharm
Date: Tue Dec 23 15:24:17 2008
New Revision: 179
URL: http://svn.gnome.org/viewvc/tasque?rev=179&view=rev

Log:
* tasque/src/RemoteControl.cs: Simplify and uncomment
  MarkTaskAsCompleteById.  Complete task immediately, without timeout
  or other fancy GUI stuff.  Fixes bug #555028.  Many thanks to Alex
  Launi for expanding our DBus interface.

Modified:
   trunk/ChangeLog
   trunk/src/RemoteControl.cs

Modified: trunk/src/RemoteControl.cs
==============================================================================
--- trunk/src/RemoteControl.cs	(original)
+++ trunk/src/RemoteControl.cs	Tue Dec 23 15:24:17 2008
@@ -263,26 +263,24 @@
 			return task != null ? (int) task.State : -1;
 		}
 
-		// TODO: Review this, see bug #555028.
-//		/// <summary>
-//		/// Marks a task complete
-//		/// </summary>
-//		/// <param name="id">
-//		/// A <see cref="System.String"/> for the ID of the task
-//		/// </param>
-//		public void MarkTaskAsCompleteById (string id)
-//		{
-//			ITask task = GetTaskById (id);
-//			if (task == null)
-//				return;
-//				
-//			if (task.State == TaskState.Active) {
-//				if (Application.Preferences.GetBool (Preferences.ShowCompletedTasksKey))
-//					task.Complete ();
-//				else
-//					task.Inactivate ();
-//			}
-//		}
+		/// <summary>
+		/// Marks a task complete
+		/// </summary>
+		/// <param name="id">
+		/// A <see cref="System.String"/> for the ID of the task
+		/// </param>
+		public void MarkTaskAsCompleteById (string id)
+		{
+			ITask task = GetTaskById (id);
+			if (task == null)
+				return;
+				
+			if (task.State == TaskState.Active) {
+				// Complete immediately; no timeout or fancy
+				// GUI stuff.
+				task.Complete ();
+			}
+		}
 		
 		/// <summary>
 		/// Looks up a task by ID in the backend



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