public void Initialize() { // TODO check for updates and other cool stuff version_updater.CheckForUpdates(false); elements_service = ServiceManager.Get <GtkElementsService> (); interface_action_service = ServiceManager.Get <InterfaceActionService> (); if (!ServiceStart()) { ServiceManager.ServiceStarted += OnServiceStarted; } // add check for updates action interface_action_service.GlobalActions.Add(new Gtk.ActionEntry[] { new Gtk.ActionEntry("CheckForUpdatesAction", null, Catalog.GetString("Check for Updates"), null, null, CheckForUpdatesEvent) }); // merge check for updates menu item interface_action_service.UIManager.AddUiFromString(@" <ui> <menubar name=""MainMenu""> <menu name=""HelpMenu"" action=""HelpMenuAction""> <placeholder name=""CheckForUpdatesPlaceholder""> <menuitem name=""CheckForUpdates"" action=""CheckForUpdatesAction""/> </placeholder> </menu> </menubar> </ui> "); }
public BansheeDialog(string title, Window parent) : base() { Title = title; BorderWidth = 5; Visible = false; HasSeparator = false; if (parent == null) { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); if (service != null) { TransientFor = service.PrimaryWindow; } } else { TransientFor = parent; } WindowPosition = WindowPosition.CenterOnParent; DestroyWithParent = true; accel_group = new AccelGroup(); AddAccelGroup(accel_group); }
void IExtensionService.Initialize() { elements_service = ServiceManager.Get <GtkElementsService> (); interface_action_service = ServiceManager.Get <InterfaceActionService> (); var notif_addin = AddinManager.Registry.GetAddin("Banshee.NotificationArea"); var ind_addin = AddinManager.Registry.GetAddin("Banshee.AppIndicator"); if (notif_addin != null && notif_addin.Enabled) { Log.Debug("NotificationArea conflicts with SoundMenu, disabling NotificationArea"); notif_addin.Enabled = false; } else if (ind_addin != null && ind_addin.Enabled) { Log.Debug("AppIndicator conflicts with SoundMenu, disabling AppIndicator"); ind_addin.Enabled = false; } AddinManager.AddinLoaded += OnAddinLoaded; if (!ServiceStartup()) { ServiceManager.ServiceStarted += OnServiceStarted; } }
public NowPlayingInterface() { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); primary_window = service.PrimaryWindow; Contents = new NowPlayingContents(); // This is my really sweet hack - it's where the video widget // is sent when the source is not active. This keeps the video // widget from being completely destroyed, causing problems with // its internal windowing and GstXOverlay. It's also conveniently // the window that is used to do fullscreen video. Sweeeeeeeeeet. video_window = new FullscreenWindow(service.PrimaryWindow); video_window.Hidden += OnFullscreenWindowHidden; video_window.Realize(); video_window.Add(Contents); frame = new Hyena.Widgets.RoundedFrame(); frame.SetFillColor(new Cairo.Color(0, 0, 0)); frame.DrawBorder = false; frame.Show(); PackStart(frame, true, true, 0); fullscreen_adapter = new FullscreenAdapter(); fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen; screensaver = new ScreensaverManager(); }
public void Dispose() { if (current_nf != null) { try { current_nf.Close(); } catch {} } UninstallPreferences(); ServiceManager.PlayerEngine.DisconnectEvent(OnPlayerEvent); elements_service.PrimaryWindowClose = null; interface_action_service.UIManager.RemoveUi(ui_manager_id); Gtk.Action close_action = interface_action_service.GlobalActions["CloseAction"]; if (close_action != null) { interface_action_service.GlobalActions.Remove(close_action); } interface_action_service.GlobalActions.UpdateAction("QuitAction", true); AddinManager.AddinLoaded -= OnAddinLoaded; sound_menu = null; elements_service = null; interface_action_service = null; }
public Window() : base("Bashee Media Panel") { _elements = ServiceManager.Get <GtkElementsService>(); WindowPosition = WindowPosition.Center; DefaultWidth = 1000; DefaultHeight = 500; }
public void Dispose() { if (MoblinPanel.Instance != null) { MoblinPanel.Instance.Dispose(); } interface_action_service = null; elements_service = null; }
void IExtensionService.Initialize() { elements_service = ServiceManager.Get <GtkElementsService> (); interface_action_service = ServiceManager.Get <InterfaceActionService> (); if (!ServiceStartup()) { ServiceManager.ServiceStarted += OnServiceStarted; } }
public void Dispose() { if (panel != null) { panel.Dispose(); panel = null; } interface_action_service = null; elements_service = null; }
protected void SetupFullscreenHandling() { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); fullscreen_adapter = new FullscreenAdapter(); screensaver = new ScreensaverManager(); video_window = new FullscreenWindow(service.PrimaryWindow); video_window.Hidden += OnFullscreenWindowHidden; video_window.Realize(); }
private void OnServiceStarted(ServiceStartedArgs args) { if (args.Service is Banshee.Gui.InterfaceActionService) { interface_action_service = (InterfaceActionService)args.Service; } else if (args.Service is GtkElementsService) { elements_service = (GtkElementsService)args.Service; } ServiceStartup(); }
void OnServiceStarted(ServiceStartedArgs args) { if (args.Service is GtkElementsService) { elements_service = (GtkElementsService)args.Service; ServiceStart(); } else if (args.Service is InterfaceActionService) { interface_action_service = (InterfaceActionService)args.Service; ServiceStart(); } }
public BansheeDialog(string title, Window parent) : base() { Title = title ?? String.Empty; // The BorderWidth situation here is a bit nuts b/c the // ActionArea's is set to 5. So we work everything else out // so it all totals to 12. // // WIDGET BorderWidth // Dialog 5 // VBox 2 // inner_vbox 5 => total = 12 // ActionArea 5 => total = 12 BorderWidth = 5; base.VBox.BorderWidth = 0; // This spacing is 2 b/c the inner_vbox and ActionArea should be // 12 apart, and they already have BorderWidth 5 each base.VBox.Spacing = 2; inner_vbox = new VBox() { Spacing = 12, BorderWidth = 5, Visible = true }; base.VBox.PackStart(inner_vbox, true, true, 0); Visible = false; HasSeparator = false; if (parent == null) { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); if (service != null) { TransientFor = service.PrimaryWindow; } } else { TransientFor = parent; } WindowPosition = TransientFor == null || !TransientFor.Visible ? WindowPosition.Center : WindowPosition.CenterOnParent; DestroyWithParent = true; accel_group = new AccelGroup(); AddAccelGroup(accel_group); }
public void Dispose() { if (view_menu != null && menu_item != null) { view_menu.Remove(menu_item); } if (panel != null) { panel.Dispose(); panel = null; } interface_action_service = null; elements_service = null; }
public void Dispose() { if (disposed) { return; } if (current_nf != null) { try { current_nf.Close(); } catch {} } if (notif_area != null) { notif_area.Dispose(); notif_area = null; } ServiceManager.PlayerEngine.DisconnectEvent(OnPlayerEvent); elements_service.PrimaryWindowClose = null; Gtk.Action close_action = interface_action_service.GlobalActions["CloseAction"]; if (close_action != null) { interface_action_service.GlobalActions.Remove(close_action); } if (ui_manager_id >= 0) { interface_action_service.RemoveActionGroup("NotificationArea"); interface_action_service.UIManager.RemoveUi((uint)ui_manager_id); ui_manager_id = -1; } actions = null; elements_service = null; interface_action_service = null; disposed = true; }
public void Dispose() { if (disposed) { return; } if (current_nf != null) { try { current_nf.Close(); } catch {} } // Hide the AppIndicator before disposing indicator.Status = Status.Passive; indicator.Dispose(); indicator = null; ServiceManager.PlayerEngine.DisconnectEvent(OnPlayerEvent); elements_service.PrimaryWindowClose = null; Gtk3.Action close_action = interface_action_service.GlobalActions["CloseAction"]; if (close_action != null) { interface_action_service.GlobalActions.Remove(close_action); } if (ui_manager_id >= 0) { interface_action_service.RemoveActionGroup("AppIndicator"); interface_action_service.UIManager.RemoveUi((uint)ui_manager_id); ui_manager_id = -1; } elements_service = null; interface_action_service = null; AddinManager.AddinLoaded -= OnAddinLoaded; disposed = true; }
private void OnServiceStarted(ServiceStartedArgs args) { if (args.Service is Banshee.Gui.InterfaceActionService) { interface_action_service = (InterfaceActionService)args.Service; } else if (args.Service is GtkElementsService) { elements_service = (GtkElementsService)args.Service; } else if (args.Service is SourceManager) { source_manager = ServiceManager.SourceManager; } else if (args.Service is PlayerEngineService) { player = ServiceManager.PlayerEngine; } ServiceStartup(); }
public NowPlayingInterface() { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); primary_window = service.PrimaryWindow; Contents = new NowPlayingContents(); Contents.ButtonPressEvent += (o, a) => { if (a.Event.Type == Gdk.EventType.TwoButtonPress) { var iaservice = ServiceManager.Get <InterfaceActionService> (); var action = iaservice.ViewActions["FullScreenAction"] as Gtk.ToggleAction; if (action != null && action.Sensitive) { action.Active = !action.Active; } } }; // This is my really sweet hack - it's where the video widget // is sent when the source is not active. This keeps the video // widget from being completely destroyed, causing problems with // its internal windowing and GstXOverlay. It's also conveniently // the window that is used to do fullscreen video. Sweeeeeeeeeet. video_window = new FullscreenWindow(service.PrimaryWindow); video_window.Hidden += OnFullscreenWindowHidden; video_window.Realize(); video_window.Add(Contents); frame = new Hyena.Widgets.RoundedFrame(); frame.SetFillColor(new Cairo.Color(0, 0, 0)); frame.DrawBorder = false; frame.Show(); PackStart(frame, true, true, 0); fullscreen_adapter = new FullscreenAdapter(); fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen; screensaver = new ScreensaverManager(); }
public NowPlayingInterface() { GtkElementsService service = ServiceManager.Get <GtkElementsService> (); primary_window = service.PrimaryWindow; Contents = new NowPlayingContents(); fullscreen_window = new FullscreenWindow(primary_window); fullscreen_window.Hidden += OnFullscreenWindowHidden; frame = new Hyena.Widgets.RoundedFrame(); frame.SetFillColor(new Cairo.Color(0, 0, 0)); frame.DrawBorder = false; frame.Child = Contents; frame.Show(); PackStart(frame, true, true, 0); fullscreen_adapter = new FullscreenAdapter(); fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen; screensaver = new ScreensaverManager(); }