private void BuildPanel() { try { ToolbarPanel = new PanelGtk("media", "media", null, "media-button", true); ParentContainer = ToolbarPanel.Window; ParentContainer.ModifyBg(StateType.Normal, ParentContainer.Style.White); ToolbarPanel.SetSizeEvent += (o, e) => { ToolbarPanelWidth = e.Width; ToolbarPanelHeight = e.Height; }; } catch (Exception e) { Log.Exception("Could not bind to Moblin panel", e); var window = new Gtk.Window("Moblin Media Panel"); window.SetDefaultSize(1000, 500); window.WindowPosition = Gtk.WindowPosition.Center; ParentContainer = window; } ParentContainer.ShowAll(); }
public MeeGoPanel() { if (Instance != null) { throw new InvalidOperationException("Only one Netbook Panel (MeegoPanel) instance should exist"); } Instance = this; var timer = Log.DebugTimerStart(); try { Log.Debug("Attempting to create Netbook toolbar panel"); embedded_panel = new PanelGtk("banshee", Catalog.GetString("media"), null, "media-button", true); embedded_panel.ShowBeginEvent += (o, e) => { ServiceManager.SourceManager.SetActiveSource(ServiceManager.SourceManager.MusicLibrary); if (Contents != null) { Contents.SyncSearchEntry(); } }; while (Gtk.Application.EventsPending()) { Gtk.Application.RunIteration(); } } catch (Exception e) { if (!(e is DllNotFoundException)) { Log.Exception("Could not bind to Netbook panel", e); } window_panel = new Gtk.Window("Netbook Media Panel"); } Log.DebugTimerPrint(timer, "Netbook panel created: {0}"); }