コード例 #1
0
        private void RemoveClutterFlow()
        {
            Clutter.Threads.Enter();
            music_library.Properties.Remove("Nereid.SourceContents");
            Clutter.Threads.Leave();
            clutter_flow_contents.Dispose();
            clutter_flow_contents = null;

            source_manager.ActiveSourceChanged -= HandleActiveSourceChanged;
            BrowserAction.Activated            -= OnToggleBrowser;
            BrowserAction.Active     = ClutterFlowSchemas.OldShowBrowser.Get();
            CfBrowsAction.Activated -= OnToggleClutterFlow;
            CfBrowsAction.Visible    = false;

            action_service.RemoveActionGroup("ClutterFlowView");
            action_service.UIManager.RemoveUi(ui_manager_id);
            clutterflow_actions = null;
            cfbrows_action      = null;

            preference_service = null;
            source_manager     = null;
            music_library      = null;
            action_service     = null;
            browser_action     = null;
            cfbrows_action     = null;
        }
コード例 #2
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            Banshee.Base.ThreadAssist.ProxyToMain(delegate {
                Gtk.Action fetch_action = action_service.GlobalActions["FetchCoverArtAction"];
                if (fetch_action != null)
                {
                    action_service.GlobalActions.Remove(fetch_action);
                }

                action_service.RemoveActionGroup("CoverArt");
                action_service.UIManager.RemoveUi(ui_manager_id);

                actions        = null;
                action_service = null;

                ServiceManager.SourceManager.MusicLibrary.TracksAdded   -= OnTracksAdded;
                ServiceManager.SourceManager.MusicLibrary.TracksChanged -= OnTracksChanged;

                disposed = true;
            });
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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;
        }
コード例 #5
0
        public void Dispose()
        {
            ServiceManager.PlayerEngine.DisconnectEvent(OnPlayerEngineEventChanged);
            ServiceManager.PlayerEngine.DisconnectEvent(window.OnPlayerEngineEventChanged);

            ServiceManager.SourceManager.MusicLibrary.TracksAdded -= OnTracksAdded;

            if (job != null)
            {
                ServiceManager.JobScheduler.Cancel(job);
            }
            InterfaceActionService actions_service = ServiceManager.Get <InterfaceActionService> ();

            actions_service.RemoveActionGroup(lyrics_action_group);
            actions_service.UIManager.RemoveUi(ui_manager_id);
            lyrics_action_group = null;

            this.window.Hide();
        }