Inheritance: Gtk.VBox, ISourceContents
Beispiel #1
0
        public void Dispose()
        {
            ServiceManager.PlaybackController.Transition   -= OnPlaybackControllerTransition;
            ServiceManager.PlaybackController.TrackStarted -= OnPlaybackControllerTrackStarted;
            ServiceManager.PlayerEngine.DisconnectEvent(OnTrackInfoUpdated);

            if (now_playing_interface != null)
            {
                now_playing_interface.Destroy();
                now_playing_interface.Dispose();
                now_playing_interface = null;
            }
        }
Beispiel #2
0
        public NowPlayingSource() : base("now-playing-clutter", Catalog.GetString("Now Playing"), 10)
        {
            TypeUniqueId          = "cubano-now-playing";
            now_playing_interface = new NowPlayingInterface();

            Properties.SetString("Icon.Name", "applications-multimedia");
            Properties.Set <ISourceContents> ("Nereid.SourceContents", now_playing_interface);
            Properties.Set <bool> ("Nereid.SourceContents.HeaderVisible", false);
            //Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");

            ServiceManager.SourceManager.AddSource(this);

            ServiceManager.PlaybackController.Transition   += OnPlaybackControllerTransition;
            ServiceManager.PlaybackController.TrackStarted += OnPlaybackControllerTrackStarted;
            ServiceManager.PlayerEngine.ConnectEvent(OnTrackInfoUpdated, PlayerEvent.TrackInfoUpdated);
        }
        public NowPlayingSource()
            : base("now-playing-clutter", Catalog.GetString ("Now Playing"), 10)
        {
            TypeUniqueId = "cubano-now-playing";
            now_playing_interface = new NowPlayingInterface ();

            Properties.SetString ("Icon.Name", "applications-multimedia");
            Properties.Set<ISourceContents> ("Nereid.SourceContents", now_playing_interface);
            Properties.Set<bool> ("Nereid.SourceContents.HeaderVisible", false);
            //Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");

            ServiceManager.SourceManager.AddSource (this);

            ServiceManager.PlaybackController.Transition += OnPlaybackControllerTransition;
            ServiceManager.PlaybackController.TrackStarted += OnPlaybackControllerTrackStarted;
            ServiceManager.PlayerEngine.ConnectEvent (OnTrackInfoUpdated, PlayerEvent.TrackInfoUpdated);
        }
        public void Dispose()
        {
            ServiceManager.PlaybackController.Transition -= OnPlaybackControllerTransition;
            ServiceManager.PlaybackController.TrackStarted -= OnPlaybackControllerTrackStarted;
            ServiceManager.PlayerEngine.DisconnectEvent (OnTrackInfoUpdated);

            if (now_playing_interface != null) {
                now_playing_interface.Destroy ();
                now_playing_interface.Dispose ();
                now_playing_interface = null;
            }
        }