void CreateResource()
 {
     StringEntry newEntry = new StringEntry (catalog, Name, Value, Comment, false);
     catalog.AddEntry (newEntry);
     Reset ();
     addEntryFunc (newEntry);
 }
 void AddEntry(StringEntry newEntry)
 {
     createdAfterSort.Add (newEntry);
     TreePath currentPath = null;
     TreePath [] paths = entriesTV.Selection.GetSelectedRows ();
     if (paths != null)
         currentPath = paths [0];
     //UpdateFromCatalog ();
     TreeIter tempIter = SelectedIter; //FIXME: by avoiding Update From Catalog, no scroll problem
     store.Remove (ref tempIter);
     store.AppendValues (newEntry);
     store.AppendValues (Inserter);
     rowSelect = currentPath;
     //if (currentPath != null)
         //GLib.Idle.Add (ReturnToRowSelect); // causes scroll downward revealing next blank entry
 }
        public bool ShouldFilter(StringEntry entry)
        {
            if (String.IsNullOrEmpty (filter))
                return false;

            if (DoSearchIn == SearchIn.Name || DoSearchIn == SearchIn.All) {
                if (IsMatch (entry.Name))
                    return false;
            }
            if (DoSearchIn == SearchIn.BaseValue || DoSearchIn == SearchIn.All) {
                if (IsMatch (entry.GetBaseString ()))
                    return false;
            }
            if (DoSearchIn == SearchIn.Value || DoSearchIn == SearchIn.All) {
                if (IsMatch (entry.Value))
                    return false;
            }
            if (DoSearchIn == SearchIn.Comment || DoSearchIn == SearchIn.All) {
                if (IsMatch (entry.Comment))
                    return false;
            }

            return true;
        }