private bool BuildNotificationArea() { if (Environment.OSVersion.Platform == PlatformID.Unix) { try { notif_area = new X11NotificationAreaBox(); } catch { } } if (notif_area == null) { notif_area = new GtkNotificationAreaBox(elements_service.PrimaryWindow); } if (notif_area == null) { return(false); } notif_area.Disconnected += OnNotificationAreaDisconnected; notif_area.Activated += OnNotificationAreaActivated; notif_area.PopupMenuEvent += OnNotificationAreaPopupMenuEvent; if (!QuitOnCloseSchema.Get()) { RegisterCloseHandler(); } return(true); }
private bool BuildNotificationArea() { if (PersistenceSupported) { Log.Debug("Notification daemon supports persistence, no status icon needed"); return(true); } notif_area = new GtkNotificationAreaBox(elements_service.PrimaryWindow); if (notif_area == null) { return(false); } notif_area.Disconnected += OnNotificationAreaDisconnected; notif_area.Activated += OnNotificationAreaActivated; notif_area.PopupMenuEvent += OnNotificationAreaPopupMenuEvent; if (!QuitOnCloseSchema.Get()) { RegisterCloseHandler(); } return(true); }
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; }
private bool BuildNotificationArea() { if (PersistenceSupported) { Log.Debug ("Notification daemon supports persistence, no status icon needed"); return true; } notif_area = new GtkNotificationAreaBox (elements_service.PrimaryWindow); if (notif_area == null) { return false; } notif_area.Disconnected += OnNotificationAreaDisconnected; notif_area.Activated += OnNotificationAreaActivated; notif_area.PopupMenuEvent += OnNotificationAreaPopupMenuEvent; if (!QuitOnCloseSchema.Get ()) { RegisterCloseHandler (); } return true; }
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; }
private bool BuildNotificationArea () { if (Environment.OSVersion.Platform == PlatformID.Unix) { try { notif_area = new X11NotificationAreaBox (); } catch { } } if (notif_area == null) { notif_area = new GtkNotificationAreaBox (elements_service.PrimaryWindow); } if (notif_area == null) { return false; } notif_area.Disconnected += OnNotificationAreaDisconnected; notif_area.Activated += OnNotificationAreaActivated; notif_area.PopupMenuEvent += OnNotificationAreaPopupMenuEvent; if (!QuitOnCloseSchema.Get ()) { RegisterCloseHandler (); } return true; }