public PlaybackActions () : base ("Playback")
{
ImportantByDefault = false;
play_tooltip = Catalog.GetString ("Play the current item");
Add (new ActionEntry [] {
new ActionEntry ("PlayPauseAction", null,
Catalog.GetString ("_Play"), "space",
play_tooltip, OnPlayPauseAction),
new ActionEntry ("NextAction", null,
Catalog.GetString ("_Next"), "N",
Catalog.GetString ("Play the next item"), OnNextAction),
new ActionEntry ("PreviousAction", null,
Catalog.GetString ("Pre_vious"), "B",
Catalog.GetString ("Play the previous item"), OnPreviousAction),
new ActionEntry ("SeekToAction", null,
Catalog.GetString ("Seek _To..."), "T",
Catalog.GetString ("Seek to a specific location in current item"), OnSeekToAction),
new ActionEntry ("JumpToPlayingTrackAction", null,
Catalog.GetString("_Jump to Playing Song"), "<control>J",
Catalog.GetString ("Jump to the currently playing item"), OnJumpToPlayingTrack),
new ActionEntry ("RestartSongAction", null,
Catalog.GetString ("_Restart Song"), "R",
Catalog.GetString ("Restart the current item"), OnRestartSongAction)
});
Add (new ToggleActionEntry [] {
new ToggleActionEntry ("StopWhenFinishedAction", null,
Catalog.GetString ("_Stop When Finished"), "<Shift>space",
Catalog.GetString ("Stop playback after the current item finishes playing"),
OnStopWhenFinishedAction, false)
});
Actions.GlobalActions.Add (new ActionEntry [] {
new ActionEntry ("PlaybackMenuAction", null,
Catalog.GetString ("_Playback"), null, null, null),
});
this["JumpToPlayingTrackAction"].Sensitive = false;
this["RestartSongAction"].Sensitive = false;
this["SeekToAction"].Sensitive = false;
this["PlayPauseAction"].StockId = Gtk.Stock.MediaPlay;
this["NextAction"].StockId = Gtk.Stock.MediaNext;
this["PreviousAction"].StockId = Gtk.Stock.MediaPrevious;
ServiceManager.PlayerEngine.ConnectEvent (OnPlayerEvent,
PlayerEvent.Error |
PlayerEvent.EndOfStream |
PlayerEvent.StateChange);
repeat_actions = new PlaybackRepeatActions (Actions);
shuffle_actions = new PlaybackShuffleActions (Actions, this);
subtitle_actions = new PlaybackSubtitleActions (Actions) { Sensitive = false };
}