Tomboy.NoteRecentChanges.AddToPreviousSearches C# (CSharp) Method

AddToPreviousSearches() private method

private AddToPreviousSearches ( string text ) : void
text string
return void
		void AddToPreviousSearches (string text)
		{
			// Update previous searches, by adding a new term to the
			// list, or shuffling an existing term to the top...
			if (previous_searches == null)
				previous_searches = new List<string> ();

			bool repeat = false;

			string lower = text.ToLower();
			foreach (string prev in previous_searches) {
				if (prev.ToLower() == lower)
					repeat = true;
			}

			if (!repeat) {
				previous_searches.Insert (0, text);
				find_combo.PrependText (text);
			}
		}