示例#1
0
        private void StoreSearch(string query)
        {
            Gtk.TreeIter iter;

            if (history.GetIterFirst(out iter))
            {
                string val;

                do
                {
                    val = (string)history.GetValue(iter, 0);

                    if (val == query)
                    {
                        history.Remove(ref iter);
                    }
                } while (val != query && history.IterNext(ref iter));
            }

            iter = history.Insert(0);
            history.SetValue(iter, 0, query);
        }