public DirectoryView(ExploreView exploreView) { this.exploreView = exploreView; menu = new DirectoryMenu(exploreView); store = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(ItemType)); Model = store; sortableColumns = new SortableColumns(this, store); #if HAVE_ATLEAST_GTK_210 EnableGridLines = TreeViewGridLines.Vertical; #endif // setup main column with image/text data TreeViewColumn column = new TreeViewColumn (); CellRendererText crt = new CellRendererText(); CellRendererPixbuf crp = new CellRendererPixbuf(); column.Title = "Name"; column.PackStart(crp, false); column.PackStart(crt, true); column.AddAttribute(crp, "pixbuf", 0); column.AddAttribute(crt, "text", 1); AppendColumn(column); AppendColumn("Status", ColumnIndex.Status); AppendColumn("Owner", ColumnIndex.Owner); AppendColumn("Latest", ColumnIndex.Latest); Selection.Mode = SelectionMode.Multiple; KeyReleaseEvent += MyKeyReleaseEventHandler; ButtonPressEvent += MyButtonPressEventHandler; }
public DirectoryView(ExploreView exploreView) { this.exploreView = exploreView; menu = new DirectoryMenu(exploreView); store = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(ItemType)); Model = store; sortableColumns = new SortableColumns(this, store); #if HAVE_ATLEAST_GTK_210 EnableGridLines = TreeViewGridLines.Vertical; #endif // setup main column with image/text data TreeViewColumn column = new TreeViewColumn(); CellRendererText crt = new CellRendererText(); CellRendererPixbuf crp = new CellRendererPixbuf(); column.Title = "Name"; column.PackStart(crp, false); column.PackStart(crt, true); column.AddAttribute(crp, "pixbuf", 0); column.AddAttribute(crt, "text", 1); AppendColumn(column); AppendColumn("Status", ColumnIndex.Status); AppendColumn("Owner", ColumnIndex.Owner); AppendColumn("Latest", ColumnIndex.Latest); Selection.Mode = SelectionMode.Multiple; KeyReleaseEvent += MyKeyReleaseEventHandler; ButtonPressEvent += MyButtonPressEventHandler; }