banshee r5157 - in trunk/banshee: . src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r5157 - in trunk/banshee: . src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- Date: Mon, 23 Mar 2009 22:22:01 +0000 (UTC)
Author: gburt
Date: Mon Mar 23 22:22:01 2009
New Revision: 5157
URL: http://svn.gnome.org/viewvc/banshee?rev=5157&view=rev
Log:
2009-03-23 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs:
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs:
Make the track artist sync button not sensitive when IsCompilation, and
don't change the title forward button's sensitivity.
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs:
Make the title sort field NoSync.
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs:
* src/Core/Banshee.ThickClient/Makefile.am:
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/LicenseEntry.cs:
Add a combo entry for editing the LicenseURI field.
Added:
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/LicenseEntry.cs
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs
trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs Mon Mar 23 22:22:01 2009
@@ -42,14 +42,12 @@
private TextEntry entry = new TextEntry ("CoreAlbums", "ArtistName");
private object tooltip_host = Hyena.Gui.TooltipSetter.CreateHost ();
private Button track_artist_sync_button;
- private PageNavigationEntry title_entry;
private PageNavigationEntry track_artist_entry;
public AlbumArtistEntry (Button trackArtistSyncButton, PageNavigationEntry titleEntry,
PageNavigationEntry trackArtistEntry) : base ()
{
track_artist_sync_button = trackArtistSyncButton;
- title_entry = titleEntry;
track_artist_entry = trackArtistEntry;
enable_compilation.Label = Catalog.GetString ("Com_pilation Album Artist:");
@@ -101,16 +99,13 @@
// Will be null if we're only editing one track
if (track_artist_sync_button != null) {
+ track_artist_sync_button.Sensitive = !IsCompilation;
track_artist_sync_button.Visible = !IsCompilation;
}
if (track_artist_entry.ForwardButton != null) {
track_artist_entry.ForwardButton.Visible = IsCompilation;
}
-
- if (title_entry.ForwardButton != null) {
- title_entry.ForwardButton.Sensitive = !IsCompilation;
- }
}
}
}
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs Mon Mar 23 22:22:01 2009
@@ -83,14 +83,26 @@
delegate (EditorTrackInfo track, Widget widget) { track.Bpm = ((SpinButtonEntry)widget).ValueAsInt; },
FieldOptions.Shrink | FieldOptions.NoSync
);
+
+ HBox copyright_box = new HBox ();
+ copyright_box.Spacing = 12;
+ copyright_box.Show ();
+ PackStart (copyright_box, true, true, 0);
- AddField (this, new TextEntry (),
+ AddField (copyright_box, new TextEntry (),
Catalog.GetString ("Set all copyrights to this value"),
delegate { return Catalog.GetString ("Copyrig_ht:"); },
delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.Copyright; },
delegate (EditorTrackInfo track, Widget widget) { track.Copyright = ((TextEntry)widget).Text; }
);
+ AddField (copyright_box, new LicenseEntry (),
+ Catalog.GetString ("Set all licenses to this value"),
+ delegate { return Catalog.GetString ("_License URI:"); },
+ delegate (EditorTrackInfo track, Widget widget) { ((LicenseEntry)widget).Value = track.LicenseUri; },
+ delegate (EditorTrackInfo track, Widget widget) { track.LicenseUri = ((LicenseEntry)widget).Value; }
+ );
+
TextViewEntry comment_entry = new TextViewEntry ();
comment_entry.HscrollbarPolicy = PolicyType.Automatic;
comment_entry.TextView.WrapMode = WrapMode.WordChar;
Added: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/LicenseEntry.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/LicenseEntry.cs Mon Mar 23 22:22:01 2009
@@ -0,0 +1,83 @@
+//
+// LicenseEntry.cs
+//
+// Author:
+// Gabriel Burt <gburt novell com>
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2009 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using Gtk;
+
+using Hyena.Gui;
+
+using Banshee.ServiceStack;
+using Banshee.Collection.Database;
+
+namespace Banshee.Gui.TrackEditor
+{
+ public class LicenseEntry : ComboBoxEntry, ICanUndo, IEditorField
+ {
+ private ListStore license_model;
+ private EditorEditableUndoAdapter<Entry> undo_adapter = new EditorEditableUndoAdapter<Entry> ();
+
+ public LicenseEntry ()
+ {
+ license_model = new ListStore (typeof (string));
+ Model = license_model;
+ TextColumn = 0;
+
+ EntryCompletion c = new EntryCompletion ();
+ c.Model = license_model;
+ c.TextColumn = TextColumn;
+ c.PopupCompletion = true;
+ c.InlineCompletion = true;
+ //c.InlineSelection = true; // requires 2.12
+ c.PopupSingleMatch = false;
+ Entry.Completion = c;
+
+ foreach (string license_uri in ServiceManager.DbConnection.QueryEnumerable<string> (
+ "SELECT DISTINCT LicenseUri FROM CoreTracks ORDER BY LicenseUri")) {
+ if (!String.IsNullOrEmpty (license_uri)) {
+ license_model.AppendValues (license_uri);
+ }
+ }
+ }
+
+ public void DisconnectUndo ()
+ {
+ undo_adapter.DisconnectUndo ();
+ }
+
+ public void ConnectUndo (EditorTrackInfo track)
+ {
+ undo_adapter.ConnectUndo (Entry, track);
+ }
+
+ public string Value {
+ get { return Entry.Text; }
+ set { Entry.Text = value ?? String.Empty; }
+ }
+ }
+}
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs Mon Mar 23 22:22:01 2009
@@ -68,8 +68,6 @@
if (dialog.TrackCount > 1) {
dialog.Navigated += delegate {
forward_button.Sensitive = dialog.CanGoForward;
- entry.HasFocus = true;
- entry.SelectRegion (0, entry.Text.Length);
};
forward_button = EditorUtilities.CreateSmallStockButton (Stock.GoForward);
object tooltip_host = Hyena.Gui.TooltipSetter.CreateHost ();
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SortingPage.cs Mon Mar 23 22:22:01 2009
@@ -48,7 +48,8 @@
Catalog.GetString ("Set all sort track titles to this value"),
delegate { return Catalog.GetString ("Sort Track Title:"); },
delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.TrackTitleSort; },
- delegate (EditorTrackInfo track, Widget widget) { track.TrackTitleSort = ((TextEntry)widget).Text; }
+ delegate (EditorTrackInfo track, Widget widget) { track.TrackTitleSort = ((TextEntry)widget).Text; },
+ FieldOptions.NoSync
);
AddField (this, new TextEntry (),
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am Mon Mar 23 22:22:01 2009
@@ -67,6 +67,7 @@
Banshee.Gui.TrackEditor/IEditorField.cs \
Banshee.Gui.TrackEditor/ITrackEditorModifier.cs \
Banshee.Gui.TrackEditor/ITrackEditorPage.cs \
+ Banshee.Gui.TrackEditor/LicenseEntry.cs \
Banshee.Gui.TrackEditor/LyricsPage.cs \
Banshee.Gui.TrackEditor/PageNavigationEntry.cs \
Banshee.Gui.TrackEditor/PageType.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]