Archive / / / / / Echo.UI.Widgets.BrowserPane.vala
2008-11-27 23:48:48 UTC
previous next
/* vim: set noexpandtab tabstop=4 shiftwidth=4 nowrap textwidth=100 * * Echo Media Player * Copyright (C) 2008 Shane O'Connell * * [ The original file includes a copyright header in this location describing * the file as being released under the terms of the GNU General Public * License. It has been removed in order to display the file as part of the * archive. ] */ public class Echo.UI.Widgets.BrowserPane : Gtk.Notebook { Gtk.VBox vbox; Gtk.ComboBox combobox; Gtk.Toolbar toolbar; Gtk.ScrolledWindow scrolled_window; Gtk.TreeView treeview; construct { this.vbox = new Gtk.VBox(false, 3); this.combobox = new Gtk.ComboBox(); this.toolbar = new Gtk.Toolbar(); this.scrolled_window = new Gtk.ScrolledWindow(null, null); this.treeview = new Gtk.TreeView(); this.append_page(this.vbox, null); this.set_show_tabs(false); this.toolbar.insert(new Gtk.ToolButton.from_stock("gtk-go-back"), 0); this.toolbar.insert(new Gtk.ToolButton.from_stock("gtk-go-forward"), 1); this.toolbar.insert(new Gtk.ToolButton.from_stock("gtk-go-up"), 2); this.toolbar.insert(new Gtk.SeparatorToolItem(), 3); this.toolbar.insert(new Gtk.ToolButton.from_stock("gtk-refresh"), 4); this.toolbar.set_style(Gtk.ToolbarStyle.ICONS); this.toolbar.set_icon_size(Gtk.IconSize.MENU); this.vbox.pack_start(this.toolbar, false, true, 0); this.vbox.pack_start(this.combobox, false, true, 0); this.treeview.set_headers_visible(false); this.scrolled_window.add(this.treeview); this.scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC); this.scrolled_window.set_shadow_type(Gtk.ShadowType.IN); this.vbox.pack_start(this.scrolled_window, true, true, 0); } }