Tomboy.Note.QueueSave C# (CSharp) Method

QueueSave() public method

Set a timeout to execute the save. Possibly invalidate the text, which causes a re-serialize when the timeout is called...
public QueueSave ( ChangeType changeType ) : void
changeType ChangeType
return void
		public void QueueSave (ChangeType changeType)
		{
			DebugSave ("Got QueueSave");

			// Replace the existing save timeout.  Wait SAVE_TIMEOUT_MS milliseconds
			// before saving...
			save_timeout.Reset (SAVE_TIMEOUT_MS);
			if (!is_deleting)
				save_needed = true;
			
			switch (changeType)
			{
			case ChangeType.ContentChanged:
				// NOTE: Updating ChangeDate automatically updates MetdataChangeDate to match.
				data.Data.ChangeDate = DateTime.Now;
				break;
			case ChangeType.OtherDataChanged:
				// Only update MetadataChangeDate.  Used by sync/etc
				// to know when non-content note data has changed,
				// but order of notes in menu and search UI is
				// unaffected.
				data.Data.MetadataChangeDate = DateTime.Now;
				break;
			default:
				break;
			}
		}