public VisualizationDisplayWidget() { visualizationMenu = new Menu(); noVisualizationsMenuItem = new MenuItem( AddinManager.CurrentLocalizer.GetString ("No visualizations installed")); noVisualizationsMenuItem.Sensitive = false; noVisualizationsMenuItem.Show(); visualizationMenu.Add(noVisualizationsMenuItem); glWidget = new GLWidget(); glWidget.DoubleBuffered = true; glWidget.Render += OnRender; glWidget.SizeAllocated += OnGlSizeAllocated; glWidget.Show(); Add(glWidget); Show(); playerData = new BansheePlayerData(ServiceManager.PlayerEngine.ActiveEngine); playerData.Active = false; glWidget.Realized += delegate { if (!loopRunning) { loopRunning = true; renderThread = new Thread(RenderLoop); renderThread.Start(); } ConnectVisualization(); }; glWidget.Unrealized += delegate { DisposeRenderer(); }; AddinManager.AddExtensionNodeHandler("/Banshee/OpenVP/Visualization", OnVisualizationChanged); InterfaceActionService ias = ServiceManager.Get<InterfaceActionService>(); ias.GlobalActions.AddImportant(new ActionEntry(SELECT_VIS_ACTION, null, AddinManager.CurrentLocalizer.GetString ("Select visualization"), null, null, OnSelectVisualizationClicked)); ias.GlobalActions.AddImportant(new ToggleActionEntry(LOW_RES_ACTION, null, AddinManager.CurrentLocalizer.GetString ("Low resolution"), null, null, OnHalfResolutionToggled, false)); ias.GlobalActions.UpdateAction(SELECT_VIS_ACTION, false); ias.GlobalActions.UpdateAction(LOW_RES_ACTION, false); global_ui_id = ias.UIManager.AddUiFromResource("ActiveSourceUI.xml"); }