Inheritance: Banshee.Gui.BansheeActionGroup
        public void Initialize()
        {
            AddActionGroup(global_actions   = new GlobalActions());
            AddActionGroup(view_actions     = new ViewActions());
            AddActionGroup(playback_actions = new PlaybackActions());
            AddActionGroup(track_actions    = new TrackActions());
            AddActionGroup(source_actions   = new SourceActions());
            ui_manager.AddUiFromResource("core-ui-actions-layout.xml");

            AddinManager.AddExtensionNodeHandler("/Banshee/ThickClient/ActionGroup", OnExtensionChanged);
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            AddActionGroup(global_actions   = new GlobalActions());
            AddActionGroup(view_actions     = new ViewActions());
            AddActionGroup(playback_actions = new PlaybackActions());
            AddActionGroup(track_actions    = new TrackActions());
            AddActionGroup(source_actions   = new SourceActions());
            UIManager.AddUiFromResource("core-ui-actions-layout.xml");

            AddinManager.AddExtensionNodeHandler("/Banshee/ThickClient/ActionGroup", OnExtensionChanged);

            ServiceManager.DBusServiceManager.RegisterObject(global_actions);
        }
Exemplo n.º 3
0
        public override void Initialize ()
        {
            AddActionGroup (global_actions      = new GlobalActions ());
            AddActionGroup (view_actions        = new ViewActions ());
            AddActionGroup (playback_actions    = new PlaybackActions ());
            AddActionGroup (track_actions       = new TrackActions ());
            AddActionGroup (source_actions      = new SourceActions ());
            UIManager.AddUiFromResource ("core-ui-actions-layout.xml");

            AddinManager.AddExtensionNodeHandler ("/Banshee/ThickClient/ActionGroup", OnExtensionChanged);

            ServiceManager.DBusServiceManager.RegisterObject (global_actions);
        }
Exemplo n.º 4
0
        public PlaybackShuffleActions(InterfaceActionService actionService, PlaybackActions playbackActions)
            : base(actionService, "PlaybackShuffle")
        {
            playback_actions = playbackActions;
            Actions.AddActionGroup(this);

            Add(new ActionEntry [] {
                new ActionEntry("ShuffleMenuAction", null,
                                Catalog.GetString("Shuffle"), null,
                                Catalog.GetString("Shuffle"), null)
            });

            ServiceManager.PlaybackController.ShuffleModeChanged += OnShuffleModeChanged;
            ServiceManager.PlaybackController.SourceChanged      += OnPlaybackSourceChanged;

            SetShuffler(Banshee.Collection.Database.Shuffler.Playback);
        }
        public PlaybackShuffleActions(InterfaceActionService actionService, PlaybackActions playbackActions)
            : base(actionService, "PlaybackShuffle")
        {
            playback_actions = playbackActions;
            Actions.AddActionGroup(this);

            Add(new ActionEntry [] {
                new ActionEntry("ShuffleMenuAction", null,
                                Catalog.GetString("Shuffle"), null,
                                Catalog.GetString("Shuffle"), null)
            });

            Add(new RadioActionEntry [] {
                new RadioActionEntry("ShuffleOffAction", null,
                                     Catalog.GetString("Shuffle _Off"), null,
                                     Catalog.GetString("Do not shuffle playlist"),
                                     (int)PlaybackShuffleMode.Linear),

                new RadioActionEntry("ShuffleSongAction", null,
                                     Catalog.GetString("Shuffle by _Song"), null,
                                     Catalog.GetString("Play songs randomly from the playlist"),
                                     (int)PlaybackShuffleMode.Song),

                new RadioActionEntry("ShuffleArtistAction", null,
                                     Catalog.GetString("Shuffle by A_rtist"), null,
                                     Catalog.GetString("Play all songs by an artist, then randomly choose another artist"),
                                     (int)PlaybackShuffleMode.Artist),

                new RadioActionEntry("ShuffleAlbumAction", null,
                                     Catalog.GetString("Shuffle by A_lbum"), null,
                                     Catalog.GetString("Play all songs from an album, then randomly choose another album"),
                                     (int)PlaybackShuffleMode.Album),

                new RadioActionEntry("ShuffleRatingAction", null,
                                     Catalog.GetString("Shuffle by _Rating"), null,
                                     Catalog.GetString("Play songs randomly, prefer higher rated songs"),
                                     (int)PlaybackShuffleMode.Rating),

                new RadioActionEntry("ShuffleScoreAction", null,
                                     Catalog.GetString("Shuffle by S_core"), null,
                                     Catalog.GetString("Play songs randomly, prefer higher scored songs"),
                                     (int)PlaybackShuffleMode.Score)
            }, 0, OnActionChanged);

            this["ShuffleOffAction"].StockId     = Gtk.Stock.MediaNext;
            this["ShuffleSongAction"].IconName   = "media-playlist-shuffle";
            this["ShuffleArtistAction"].IconName = "media-playlist-shuffle";
            this["ShuffleAlbumAction"].IconName  = "media-playlist-shuffle";
            this["ShuffleRatingAction"].IconName = "media-playlist-shuffle";
            this["ShuffleScoreAction"].IconName  = "media-playlist-shuffle";

            ServiceManager.PlaybackController.ShuffleModeChanged += OnShuffleModeChanged;
            ServiceManager.PlaybackController.SourceChanged      += OnPlaybackSourceChanged;

            Gtk.Action action = this[ConfigIdToActionName(ShuffleMode.Get())];
            if (action is RadioAction)
            {
                active_action = (RadioAction)action;
            }
            else
            {
                Active = (RadioAction)this["ShuffleOffAction"];
            }

            Active.Activate();
        }