Banshee.Gui.TrackActions.TrackActions C# (CSharp) Method

TrackActions() public method

public TrackActions ( ) : System
return System
        public TrackActions () : base ("Track")
        {
            Add (new ActionEntry [] {
                new ActionEntry("TrackContextMenuAction", null,
                    String.Empty, null, null, OnTrackContextMenu),

                new ActionEntry("SelectAllAction", null,
                    Catalog.GetString("Select _All"), "<control>A",
                    Catalog.GetString("Select all tracks"), OnSelectAll),

                new ActionEntry("SelectNoneAction", null,
                    Catalog.GetString("Select _None"), "<control><shift>A",
                    Catalog.GetString("Unselect all tracks"), OnSelectNone),

                new ActionEntry ("TrackEditorAction", Stock.Edit,
                    Catalog.GetString ("_Edit Track Information"), "E",
                    Catalog.GetString ("Edit information on selected tracks"), OnTrackEditor),

                new ActionEntry ("TrackPropertiesAction", Stock.Properties,
                    Catalog.GetString ("Properties"), null,
                    Catalog.GetString ("View information on selected tracks"), OnTrackProperties),

                new ActionEntry ("PlayTrack", null,
                    Catalog.GetString ("_Play"), null,
                    Catalog.GetString ("Play the selected item"), OnPlayTrack),

                new ActionEntry ("AddToPlaylistAction", null,
                    Catalog.GetString ("Add _to Playlist"), null,
                    Catalog.GetString ("Append selected items to playlist or create new playlist from selection"),
                    OnAddToPlaylistMenu),

                new ActionEntry ("AddToNewPlaylistAction", Stock.New,
                    Catalog.GetString ("New Playlist"), null,
                    Catalog.GetString ("Create new playlist from selected tracks"),
                    OnAddToNewPlaylist),

                new ActionEntry ("RemoveTracksAction", Stock.Remove,
                    Catalog.GetString ("_Remove"), "Delete",
                    Catalog.GetString ("Remove selected track(s) from this source"), OnRemoveTracks),

                new ActionEntry ("RemoveTracksFromLibraryAction", null,
                    Catalog.GetString ("Remove From _Library"), "",
                    Catalog.GetString ("Remove selected track(s) from library"), OnRemoveTracksFromLibrary),

                new ActionEntry ("OpenContainingFolderAction", null,
                    Catalog.GetString ("_Open Containing Folder"), null,
                    Catalog.GetString ("Open the folder that contains the selected item"), OnOpenContainingFolder),

                new ActionEntry ("DeleteTracksFromDriveAction", null,
                    Catalog.GetString ("_Delete From Drive"), null,
                    Catalog.GetString ("Permanently delete selected item(s) from medium"), OnDeleteTracksFromDrive),

                new ActionEntry ("RateTracksAction", null,
                    String.Empty, null, null, OnRateTracks),

                new ActionEntry ("SearchMenuAction", Stock.Find,
                    Catalog.GetString ("_Search"), null,
                    Catalog.GetString ("Search for items matching certain criteria"), null),

                new ActionEntry ("SearchForSameAlbumAction", null,
                    Catalog.GetString ("By Matching _Album"), null,
                    Catalog.GetString ("Search all songs of this album"), OnSearchForSameAlbum),

                new ActionEntry ("SearchForSameArtistAction", null,
                    Catalog.GetString ("By Matching A_rtist"), null,
                    Catalog.GetString ("Search all songs of this artist"), OnSearchForSameArtist),
            });

            Actions.UIManager.ActionsChanged += HandleActionsChanged;

            Actions.GlobalActions["EditMenuAction"].Activated += HandleEditMenuActivated;
            ServiceManager.SourceManager.ActiveSourceChanged += HandleActiveSourceChanged;

            this["AddToPlaylistAction"].HideIfEmpty = false;
            this["PlayTrack"].StockId = Gtk.Stock.MediaPlay;
        }