Commit 60e1b7d3 authored by Dmitrii Petukhov's avatar Dmitrii Petukhov Committed by Andrés G. Aragoneses

ThickClient: add "Selected Track(s)" submenu (bgo#726338)

Behavior of the options from the "Edit" menu was not so clear:
did these options target the playing track or the selected ones?
So, adding "Selected Track(s)" submenu and moving all the appropriate
options into it makes it much more clear.
Signed-off-by: Andrés G. Aragoneses's avatarAndrés G. Aragoneses <knocte@gmail.com>
parent 43b2e0cc
<ui>
<menubar name="MainMenu" action="MainMenuAction">
<menu name="EditMenu" action="EditMenuAction">
<placeholder name="BelowAddToPlaylist">
<menuitem name="BurnDisc" action="BurnDiscAction"></menuitem>
</placeholder>
<menu name="SelectedTracks" action="SelectedTracksAction">
<placeholder name="BelowAddToPlaylist">
<menuitem name="BurnDisc" action="BurnDiscAction"></menuitem>
</placeholder>
</menu>
</menu>
</menubar>
<popup name="TrackContextMenu" action="TrackContextMenuAction">
......
......@@ -102,6 +102,11 @@ namespace Banshee.Gui
public TrackActions () : base ("Track")
{
Add (new ActionEntry [] {
new ActionEntry ("SelectedTracksAction", null,
Catalog.GetString ("Selected Track(s)"), "",
Catalog.GetString ("Options for selected track(s)"),
(o, e) => { ResetRating (); }),
new ActionEntry("TrackContextMenuAction", null,
String.Empty, null, null, OnTrackContextMenu),
......@@ -211,7 +216,7 @@ namespace Banshee.Gui
{
if (Actions.UIManager.GetAction ("/MainMenu/EditMenu") != null) {
rating_proxy = new RatingActionProxy (Actions.UIManager, this["RateTracksAction"]);
rating_proxy.AddPath ("/MainMenu/EditMenu", "AddToPlaylist");
rating_proxy.AddPath ("/MainMenu/EditMenu/SelectedTracks", "AddToPlaylist");
rating_proxy.AddPath ("/TrackContextMenu", "AddToPlaylist");
Actions.UIManager.ActionsChanged -= HandleActionsChanged;
}
......@@ -229,8 +234,11 @@ namespace Banshee.Gui
{
// inside the "Edit" menu it's a bit redundant to have a label that starts as "Edit Track..."
this["TrackEditorAction"].Label = Catalog.GetString ("Track _Information");
ResetRating ();
if (Selection.Count > 1) {
this ["SelectedTracksAction"].Label = Catalog.GetString ("Selected Tracks");
} else {
this ["SelectedTracksAction"].Label = Catalog.GetString ("Selected Track");
}
}
private void OnSelectionChanged ()
......@@ -304,6 +312,7 @@ namespace Banshee.Gui
);
this["SelectAllAction"].Sensitive = track_source.Count > 0 && !selection.AllSelected;
UpdateAction ("SelectedTracksAction", track_source.Count > 0 && has_selection, has_selection, null);
UpdateAction ("RemoveTracksAction", track_source.CanRemoveTracks, has_selection, source);
UpdateAction ("DeleteTracksFromDriveAction", track_source.CanDeleteTracks, has_selection, source);
......
......@@ -56,26 +56,28 @@
</menu>
<menu name="EditMenu" action="EditMenuAction">
<placeholder name="AboveAddToPlaylist"/>
<menu name="AddToPlaylist" action="AddToPlaylistAction"></menu>
<placeholder name="BelowAddToPlaylist"/>
<menuitem name="TrackEditor" action="TrackEditorAction"/>
<separator/>
<menu name="SelectedTracks" action="SelectedTracksAction">
<placeholder name="AboveAddToPlaylist"/>
<menu name="AddToPlaylist" action="AddToPlaylistAction"></menu>
<placeholder name="BelowAddToPlaylist"/>
<menuitem name="TrackEditor" action="TrackEditorAction"/>
<separator/>
<menuitem name="RemoveTracks" action="RemoveTracksAction"/>
<menuitem name="RemoveTracksFromLibrary" action="RemoveTracksFromLibraryAction"/>
<menuitem name="DeleteTracksFromDrive" action="DeleteTracksFromDriveAction"/>
<separator/>
<menuitem name="OpenContainingFolder" action="OpenContainingFolderAction"/>
<separator/>
<menuitem name="TrackProperties" action="TrackPropertiesAction"/>
</menu>
<menuitem name="SelectAll" action="SelectAllAction"/>
<menuitem name="SelectNone" action="SelectNoneAction"/>
<separator/>
<menuitem name="RemoveTracks" action="RemoveTracksAction"/>
<menuitem name="RemoveTracksFromLibrary" action="RemoveTracksFromLibraryAction"/>
<menuitem name="DeleteTracksFromDrive" action="DeleteTracksFromDriveAction"/>
<separator/>
<menuitem name="OpenContainingFolder" action="OpenContainingFolderAction"/>
<separator/>
<menuitem name="RenameSource" action="RenameSourceAction"/>
<menuitem name="RefreshSmartPlaylist" action="RefreshSmartPlaylistAction"/>
<menuitem name="ExportPlaylist" action="ExportPlaylistAction"/>
<menuitem name="SourceProperties" action="SourcePropertiesAction"/>
<menuitem name="UnmapSource" action="UnmapSourceAction"/>
<menuitem name="TrackProperties" action="TrackPropertiesAction"/>
<separator name="PreferencesSeparator" />
<menuitem name="Preferences" action="PreferencesAction"/>
</menu>
......
......@@ -8,16 +8,18 @@
<menubar name="MainMenu" action="MainMenuAction">
<menu name="EditMenu" action="EditMenuAction">
<placeholder name="BelowAddToPlaylist">
<separator />
<!--<menuitem name="PodcastItemDownload" action="PodcastItemDownloadAction" />
<menuitem name="PodcastItemDeleteFile" action="PodcastItemDeleteFileAction" />-->
<!--
<menuitem name="PodcastItemCancel" action="PodcastItemCancelAction" />-->
<!--<menuitem name="PodcastItemMarkNew" action="PodcastItemMarkNewAction" />
<menuitem name="PodcastItemMarkOld" action="PodcastItemMarkOldAction" />-->
<separator />
</placeholder>
<menu name="SelectedTracks" action="SelectedTracksAction">
<placeholder name="BelowAddToPlaylist">
<separator />
<!--<menuitem name="PodcastItemDownload" action="PodcastItemDownloadAction" />
<menuitem name="PodcastItemDeleteFile" action="PodcastItemDeleteFileAction" />-->
<!--
<menuitem name="PodcastItemCancel" action="PodcastItemCancelAction" />-->
<!--<menuitem name="PodcastItemMarkNew" action="PodcastItemMarkNewAction" />
<menuitem name="PodcastItemMarkOld" action="PodcastItemMarkOldAction" />-->
<separator />
</placeholder>
</menu>
</menu>
</menubar>
......
......@@ -15,16 +15,18 @@
</menu>
<menu name="EditMenu" action="EditMenuAction">
<placeholder name="BelowAddToPlaylist">
<separator />
<menuitem name="PodcastItemDownload" action="PodcastItemDownloadAction" />
<menuitem name="PodcastItemDeleteFile" action="PodcastItemDeleteFileAction" />
<!--
<menuitem name="PodcastItemCancel" action="PodcastItemCancelAction" />-->
<menuitem name="PodcastItemMarkNew" action="PodcastItemMarkNewAction" />
<menuitem name="PodcastItemMarkOld" action="PodcastItemMarkOldAction" />
<separator />
</placeholder>
<menu name="SelectedTracks" action="SelectedTracksAction">
<placeholder name="BelowAddToPlaylist">
<separator />
<menuitem name="PodcastItemDownload" action="PodcastItemDownloadAction" />
<menuitem name="PodcastItemDeleteFile" action="PodcastItemDeleteFileAction" />
<!--
<menuitem name="PodcastItemCancel" action="PodcastItemCancelAction" />-->
<menuitem name="PodcastItemMarkNew" action="PodcastItemMarkNewAction" />
<menuitem name="PodcastItemMarkOld" action="PodcastItemMarkOldAction" />
<separator />
</placeholder>
</menu>
</menu>
</menubar>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment