void OnDirChanged(string path) { filelister.Clear(); bool ignoreHidden = !PropertyService.Get("MonoDevelop.Core.Gui.FileScout.ShowHidden", false); fb.IgnoreHidden = ignoreHidden; foreach (string f in fb.Files) { try { if (System.IO.File.Exists(f)) { if (!(System.IO.Path.GetFileName(f)).StartsWith(".")) { FileListItem it = new FileListItem(f); filelister.ItemAdded(it); } else { if (!ignoreHidden) { FileListItem it = new FileListItem(f); filelister.ItemAdded(it); } } } } catch (IOException) {} // Avoid crash on file existence check error } }
void OnSelectionChanged(object o, EventArgs args) { Gtk.TreeIter iter; Gtk.TreeModel model; if (this.Selection.GetSelected(out model, out iter)) { selectedItem = (FileListItem)model.GetValue(iter, 3); selectedIter = iter; } }
void FileSelected(object sender, Gtk.RowActivatedArgs e) { Gtk.TreeIter iter; Gtk.TreeModel model; // we are not using SelectMultiple // nor can more than one be activated here if (filelister.Selection.GetSelected(out model, out iter)) { FileListItem item = (FileListItem)filelister.Model.GetValue(iter, 3); //FIXME: use mimetypes not extensions // also change to Project tab when its a project if (Services.ProjectService.IsWorkspaceItemFile(item.FullName)) { IdeApp.Workspace.OpenWorkspaceItem(item.FullName); } else { IdeApp.Workbench.OpenDocument(item.FullName); } } }
void ItemRemoved(FileListItem item) { store.Remove(ref selectedIter); }
internal void ItemAdded(FileListItem item) { store.AppendValues(item.Text, item.Size, item.LastModified, item, item.Icon); }
void OnDirChanged (string path) { filelister.Clear (); bool ignoreHidden = !PropertyService.Get ("MonoDevelop.Core.Gui.FileScout.ShowHidden", false); fb.IgnoreHidden = ignoreHidden; foreach (string f in fb.Files) { try { if (System.IO.File.Exists(f)) { if (!(System.IO.Path.GetFileName (f)).StartsWith (".")) { FileListItem it = new FileListItem (f); filelister.ItemAdded (it); } else { if (!ignoreHidden) { FileListItem it = new FileListItem (f); filelister.ItemAdded (it); } } } } catch (IOException) {} // Avoid crash on file existence check error } }
void OnSelectionChanged (object o, EventArgs args) { Gtk.TreeIter iter; Gtk.TreeModel model; if (this.Selection.GetSelected (out model, out iter)) { selectedItem = (FileListItem) model.GetValue (iter, 3); selectedIter = iter; } }
void ItemRemoved (FileListItem item) { store.Remove (ref selectedIter); }