// creates the exception window public WarningWindow(Window transient, StatusBar status) : base(transient, "Error Log") { this.status = status; tree.Model = status.ErrorLog; tree.HeadersVisible = false; tree.AppendColumn (null, new CellRendererText (), new TreeCellDataFunc (render_error)); message.Selectable = true; message.Xalign = 0; message.Yalign = 0; message.WidthChars = -1; Label tree_title = new Label (); Label message_title = new Label (); tree_title.Xalign = 0; tree_title.Markup = "<b>Error Log:</b>"; message_title.Xalign = 0; message_title.Markup = "<b>Error Message:</b>"; VBox box = new VBox (false, 0); Button remove_button = new Button (Stock.Remove); ScrolledWindow tree_scroll = new ScrolledWindow (); ScrolledWindow message_scroll = new ScrolledWindow (); tree_scroll.Add (tree); message_scroll.AddWithViewport (message); tree_scroll.ShadowType = ShadowType.In; message_scroll.ShadowType = ShadowType.In; tree.Selection.Changed += tree_selected; remove_button.Clicked += remove_clicked; box.PackStart (tree_title, false, false, 5); box.PackStart (tree_scroll, false, false, 0); box.PackStart (message_title, false, false, 5); box.PackStart (message_scroll, true, true, 0); box.PackStart (remove_button, false, true, 5); box.BorderWidth = 5; this.Resize (600, 400); this.Add (box); }
// loads the application public FuseApp(string[] args) { AppDomain.CurrentDomain.UnhandledException += unhandled_exception; // read the command line arguments CommandLineParser parser = new CommandLineParser (args); data_dir = parser.DataDir; if (string.IsNullOrEmpty (data_dir)) { Console.WriteLine ("No data directory specified. Using the default directory"); data_dir = Environment.GetFolderPath (System.Environment.SpecialFolder.ApplicationData); data_dir = System.IO.Path.Combine (data_dir, "Fuse"); } config_dir = System.IO.Path.Combine (data_dir, "config"); config = new Config (config_dir); // load the application interface controls = new Controls (this); menu = new MainMenu (this); window = new MainWindow (this); status = new StatusBar (this, window.BottomBox); communicator = new Communicator (); loadSettings (); menu.LoadEngine (); if (controls.Engine == null) ThrowError ("Could not load a media engine.\nGo to Options -> Media Engines to select a working engine"); menu.LoadPluginList (); //switch to the last opened tab string opened_tab = config.Window.Get ("Opened Tab", ""); window.SwitchToTab (opened_tab); this.Quiting += on_quit; window.ShowAll (); }