banshee r3641 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui src/Core/Banshee.ThickClient/Resources src/Extensions/Banshee.NotificationArea/Resources
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3641 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui src/Core/Banshee.ThickClient/Resources src/Extensions/Banshee.NotificationArea/Resources
- Date: Tue, 1 Apr 2008 23:06:24 +0100 (BST)
Author: gburt
Date: Tue Apr 1 23:06:24 2008
New Revision: 3641
URL: http://svn.gnome.org/viewvc/banshee?rev=3641&view=rev
Log:
2008-04-01 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs: Disable
actions that require a playing track when there is none. In restart
song action, check that the track is not null.
* src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs:
* src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml:
* src/Extensions/Banshee.NotificationArea/Resources/NotificationAreaMenu.xml:
Change the Music menu to the Media menu.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
trunk/banshee/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml
trunk/banshee/src/Extensions/Banshee.NotificationArea/Resources/NotificationAreaMenu.xml
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs Tue Apr 1 23:06:24 2008
@@ -45,9 +45,9 @@
public GlobalActions (InterfaceActionService actionService) : base ("Global")
{
Add (new ActionEntry [] {
- // Music Menu
- new ActionEntry ("MusicMenuAction", null,
- Catalog.GetString ("_Music"), null, null, null),
+ // Media Menu
+ new ActionEntry ("MediaMenuAction", null,
+ Catalog.GetString ("_Media"), null, null, null),
new ActionEntry ("ImportAction", Stock.Open,
Catalog.GetString ("Import _Media..."), "<control>I",
@@ -122,7 +122,7 @@
this["ExtensionsAction"].Visible = false;
}
-#region Music Menu Actions
+#region Media Menu Actions
private void OnImport (object o, EventArgs args)
{
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs Tue Apr 1 23:06:24 2008
@@ -103,6 +103,10 @@
ServiceManager.PlaybackController.ShuffleMode = ShuffleEnabled.Get ()
? PlaybackShuffleMode.Shuffle
: PlaybackShuffleMode.Linear;
+
+ this["JumpToPlayingTrackAction"].Sensitive = false;
+ this["RestartSongAction"].Sensitive = false;
+ this["SeekToAction"].Sensitive = false;
action_service = actionService;
ServiceManager.PlayerEngine.StateChanged += OnPlayerEngineStateChanged;
@@ -136,16 +140,25 @@
switch (args.Event) {
case PlayerEngineEvent.StartOfStream:
TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack;
- action_service["Playback.RestartSongAction"].Sensitive = !track.IsLive;
- action_service["Playback.RestartSongAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
+ this["SeekToAction"].Sensitive = !track.IsLive;
+ this["RestartSongAction"].Sensitive = !track.IsLive;
+ this["RestartSongAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
? Catalog.GetString ("_Restart Song")
: Catalog.GetString ("_Restart Video");
- action_service["Playback.JumpToPlayingTrackAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
+
+ this["JumpToPlayingTrackAction"].Sensitive = true;
+ this["JumpToPlayingTrackAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
? Catalog.GetString ("_Jump to Playing Song")
: Catalog.GetString ("_Jump to Playing Video");
break;
+
+ case PlayerEngineEvent.Error:
case PlayerEngineEvent.EndOfStream:
- ToggleAction stop_action = (ToggleAction)action_service["Playback.StopWhenFinishedAction"];
+ this["JumpToPlayingTrackAction"].Sensitive = false;
+ this["RestartSongAction"].Sensitive = false;
+ this["SeekToAction"].Sensitive = false;
+
+ ToggleAction stop_action = (ToggleAction) this["StopWhenFinishedAction"];
// Kinda lame, but we don't want to actually reset StopWhenFinished inside the controller
// since it is also listening to EOS and needs to actually stop playback; we listen here
// just to keep the UI in sync.
@@ -202,8 +215,10 @@
private void OnRestartSongAction (object o, EventArgs args)
{
TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack;
- ServiceManager.PlayerEngine.Close ();
- ServiceManager.PlayerEngine.OpenPlay (track);
+ if (track != null) {
+ ServiceManager.PlayerEngine.Close ();
+ ServiceManager.PlayerEngine.OpenPlay (track);
+ }
}
private void OnStopWhenFinishedAction (object o, EventArgs args)
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml Tue Apr 1 23:06:24 2008
@@ -16,7 +16,7 @@
</toolbar>
<menubar name="MainMenu">
- <menu name="MusicMenu" action="MusicMenuAction">
+ <menu name="MediaMenu" action="MediaMenuAction">
<menuitem name="NewPlaylist" action="NewPlaylistAction"/>
<menuitem name="NewSmartPlaylist" action="NewSmartPlaylistAction"/>
<!--<menuitem name="NewSmartPlaylistFromSearch" action="NewSmartPlaylistFromSearchAction"/>-->
Modified: trunk/banshee/src/Extensions/Banshee.NotificationArea/Resources/NotificationAreaMenu.xml
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NotificationArea/Resources/NotificationAreaMenu.xml (original)
+++ trunk/banshee/src/Extensions/Banshee.NotificationArea/Resources/NotificationAreaMenu.xml Tue Apr 1 23:06:24 2008
@@ -15,7 +15,7 @@
<menuitem name="Quit" action="QuitAction" />
</popup>
<menubar name="MainMenu">
- <menu name="MusicMenu" action="MusicMenuAction">
+ <menu name="MediaMenu" action="MediaMenuAction">
<placeholder name="ClosePlaceholder">
<menuitem name="Close" action="CloseAction" />
</placeholder>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]