public WorkbenchView(WorkbenchController controller) { SplashWindow.Update ("Creating GUI"); XML gxml = new Glade.XML (null, WorkbenchSingleton.GLADEFILE, "Workbench", null); window = (Gtk.Window) gxml["Workbench"]; Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"]; editorNotebook = new EditorNotebook (); splitter.Pack1 (editorNotebook, true, false); ScrolledWindow sw = new ScrolledWindow (); console = new TextView (); console.Editable = false; console.WrapMode = WrapMode.Word; sw.Add (console); Notebook bottomNotebook = new Notebook (); bottomNotebook.AppendPage (sw, new Label ("Console")); splitter.Pack2 (bottomNotebook, true, false); window.Icon = icon; this.WindowTitle = ""; gxml.Autoconnect (controller); bottomNotebook.ShowAll (); editorNotebook.ShowAll (); SplashWindow.Update ("Simetron is ready!"); }
public NotebookEditorLabel(EditorNotebook parent_netbook, IEditor se) { this.CanFocus = false; this.BorderWidth = 1; string stockIcon = "home.png"; if (se.FileName != "StartPage") { stockIcon = MainClass.Tools.GetIconForExtension(System.IO.Path.GetExtension(se.Caption)); } image = new Gtk.Image(MainClass.Tools.GetIconFromStock(stockIcon, Gtk.IconSize.Menu)); image.SetPadding(2, 2); this.PackStart(image, false, false, 0); caption = se.Caption.Replace("_", "__"); lblDisplay.Text = caption; lblDisplay.CanFocus = false; this.PackStart(lblDisplay, false, false, 0); Pixbuf default_pixbuf = null; string file = System.IO.Path.Combine(MainClass.Paths.ResDir, "stock-close.png"); if (System.IO.File.Exists(file)) { default_pixbuf = new Pixbuf(file); Button btnClose = new Button(new Gtk.Image(default_pixbuf)); btnClose.TooltipText = MainClass.Languages.Translate("close"); btnClose.Relief = ReliefStyle.None; btnClose.CanFocus = false; btnClose.WidthRequest = btnClose.HeightRequest = 18; btnClose.Clicked += delegate { parent_netbook.ClosePage(se); }; this.PackEnd(btnClose, false, false, 0); } lblDisplay.TooltipText = se.FileName; this.ShowAll(); }