banshee r5052 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor src/Extensions/Banshee.Bpm/Banshee.Bpm



Author: gburt
Date: Fri Feb 20 19:50:16 2009
New Revision: 5052
URL: http://svn.gnome.org/viewvc/banshee?rev=5052&view=rev

Log:
2009-02-20  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/EditorUtilities.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/FieldPage.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TextViewEntry.cs:
	* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs:
	* src/Extensions/Banshee.Bpm/Banshee.Bpm/BpmEntry.cs: Patch from Alexander
	Kojevnikov adding mnemonics for track editor fields (BGO #563606)

Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/AlbumArtistEntry.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/EditorUtilities.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/FieldPage.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TextViewEntry.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
   trunk/banshee/src/Extensions/Banshee.Bpm/Banshee.Bpm/BpmEntry.cs

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	Fri Feb 20 19:50:16 2009
@@ -52,7 +52,8 @@
             title_entry = titleEntry;
             track_artist_entry = trackArtistEntry;
         
-            enable_compilation.Label = Catalog.GetString ("Compilation Album Artist:");
+            enable_compilation.Label = Catalog.GetString ("Com_pilation Album Artist:");
+            enable_compilation.UseUnderline = true;
 
             Hyena.Gui.TooltipSetter.Set (tooltip_host, enable_compilation,
                 Catalog.GetString ("Check this if this track is part of an album with tracks by various artists"));

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs	Fri Feb 20 19:50:16 2009
@@ -66,7 +66,7 @@
 
             PageNavigationEntry title_entry = new PageNavigationEntry (Dialog);
             AddField (left, title_entry, null,
-                delegate { return Catalog.GetString ("Track Title:"); },
+                delegate { return Catalog.GetString ("Track _Title:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((PageNavigationEntry)widget).Text = track.TrackTitle; },
                 delegate (EditorTrackInfo track, Widget widget) { track.TrackTitle = ((PageNavigationEntry)widget).Text; },
                 FieldOptions.NoSync
@@ -75,7 +75,7 @@
             PageNavigationEntry track_artist_entry = new PageNavigationEntry (Dialog, "CoreArtists", "Name");
             FieldPage.FieldSlot track_artist_slot = AddField (left, track_artist_entry, 
                 Catalog.GetString ("Set all track artists to this value"),
-                delegate { return Catalog.GetString ("Track Artist:"); },
+                delegate { return Catalog.GetString ("Track _Artist:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((PageNavigationEntry)widget).Text = track.ArtistName; },
                 delegate (EditorTrackInfo track, Widget widget) { track.ArtistName = ((PageNavigationEntry)widget).Text; }
             );
@@ -98,14 +98,14 @@
 
             AddField (left, new TextEntry ("CoreAlbums", "Title"), 
                 Catalog.GetString ("Set all album titles to this value"),
-                delegate { return Catalog.GetString ("Album Title:"); },
+                delegate { return Catalog.GetString ("Albu_m Title:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.AlbumTitle; },
                 delegate (EditorTrackInfo track, Widget widget) { track.AlbumTitle = ((TextEntry)widget).Text; }
             );
 
             AddField (left, new GenreEntry (), 
                 Catalog.GetString ("Set all genres to this value"),
-                delegate { return Catalog.GetString ("Genre:"); },
+                delegate { return Catalog.GetString ("_Genre:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((GenreEntry)widget).Value = track.Genre; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Genre = ((GenreEntry)widget).Value; }
             );
@@ -131,7 +131,7 @@
                     }
                 }, Catalog.GetString ("Automatically set track number and count")), 
                 null,
-                delegate { return Catalog.GetString ("Track Number:"); },
+                delegate { return Catalog.GetString ("Track _Number:"); },
                 delegate (EditorTrackInfo track, Widget widget) {
                     RangeEntry entry = (RangeEntry)widget;
                     entry.From.Value = track.TrackNumber;
@@ -148,7 +148,7 @@
             AddField (right, new RangeEntry (Catalog.GetString ("of")), 
                 // Catalog.GetString ("Automatically set disc number and count"),
                 Catalog.GetString ("Set all disc numbers and counts to these values"),
-                delegate { return Catalog.GetString ("Disc Number:"); },
+                delegate { return Catalog.GetString ("_Disc Number:"); },
                 delegate (EditorTrackInfo track, Widget widget) {
                     RangeEntry entry = (RangeEntry)widget;
                     entry.From.Value = track.DiscNumber;
@@ -170,7 +170,7 @@
             year_entry.Numeric = true;
             AddField (right, year_label, year_entry,
                 Catalog.GetString ("Set all years to this value"),
-                delegate { return Catalog.GetString ("Year:"); },
+                delegate { return Catalog.GetString ("_Year:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((SpinButtonEntry)widget).Value = track.Year; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Year = ((SpinButtonEntry)widget).ValueAsInt; },
                 FieldOptions.Shrink
@@ -178,7 +178,7 @@
 
             AddField (right, new RatingEntry (), 
                 Catalog.GetString ("Set all ratings to this value"),
-                delegate { return Catalog.GetString ("Rating:"); },
+                delegate { return Catalog.GetString ("_Rating:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((RatingEntry)widget).Value = track.Rating; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Rating = ((RatingEntry)widget).Value; },
                 FieldOptions.Shrink | FieldOptions.NoSync

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/EditorUtilities.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/EditorUtilities.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/EditorUtilities.cs	Fri Feb 20 19:50:16 2009
@@ -38,8 +38,7 @@
                 
         public static Label CreateLabel (string text)
         {
-            Label label = new Label ();
-            label.Text = text;
+            Label label = new Label (text);
             label.Xalign = 0.0f;
             return label;
         }

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	Fri Feb 20 19:50:16 2009
@@ -48,14 +48,14 @@
         {
             AddField (this, new TextEntry (), 
                 Catalog.GetString ("Set all composers to this value"),
-                delegate { return Catalog.GetString ("Composer:"); },
+                delegate { return Catalog.GetString ("C_omposer:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.Composer; },
                 delegate (EditorTrackInfo track, Widget widget) {  track.Composer = ((TextEntry)widget).Text; }
             );
             
             AddField (this, new TextEntry (), 
                 Catalog.GetString ("Set all conductors to this value"),
-                delegate { return Catalog.GetString ("Conductor:"); },
+                delegate { return Catalog.GetString ("Con_ductor:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.Conductor; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Conductor = ((TextEntry)widget).Text; }
             );
@@ -67,7 +67,7 @@
             
             AddField (box, new TextEntry (), 
                 Catalog.GetString ("Set all groupings to this value"),
-                delegate { return Catalog.GetString ("Grouping:"); },
+                delegate { return Catalog.GetString ("_Grouping:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.Grouping; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Grouping = ((TextEntry)widget).Text; }
             );
@@ -78,7 +78,7 @@
             bpm_entry.Numeric = true;
             AddField (box, bpm_entry, 
                 Catalog.GetString ("Set all beats per minute to this value"),
-                delegate { return Catalog.GetString ("Beats Per Minute:"); },
+                delegate { return Catalog.GetString ("Bea_ts Per Minute:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((SpinButtonEntry)widget).Value = track.Bpm; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Bpm = ((SpinButtonEntry)widget).ValueAsInt; },
                 FieldOptions.Shrink | FieldOptions.NoSync
@@ -86,7 +86,7 @@
             
             AddField (this, new TextEntry (), 
                 Catalog.GetString ("Set all copyrights to this value"),
-                delegate { return Catalog.GetString ("Copyright:"); },
+                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; }
             );
@@ -96,7 +96,7 @@
             comment_entry.TextView.WrapMode = WrapMode.WordChar;
             AddField (this, comment_entry, 
                 Catalog.GetString ("Set all comments to this value"),
-                delegate { return Catalog.GetString ("Comment:"); },
+                delegate { return Catalog.GetString ("Co_mment:"); },
                 delegate (EditorTrackInfo track, Widget widget) { ((TextViewEntry)widget).Text = track.Comment; },
                 delegate (EditorTrackInfo track, Widget widget) { track.Comment = ((TextViewEntry)widget).Text; }
             );

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/FieldPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/FieldPage.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/FieldPage.cs	Fri Feb 20 19:50:16 2009
@@ -168,6 +168,9 @@
             }
 
             if (label != null) {
+                if (label is Label) {
+                    ((Label)label).MnemonicWidget = field;
+                }
                 table.Attach (label, 0, table.NColumns, 0, 1,
                     AttachOptions.Fill | AttachOptions.Expand, 
                     AttachOptions.Fill, 0, 0);
@@ -212,7 +215,7 @@
             Label label = slot.Label as Label;
             if (label != null && slot.LabelClosure != null) {
                 string value = slot.LabelClosure (track, slot.Label);
-                label.Text = value ?? String.Empty;
+                label.TextWithMnemonic = 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	Fri Feb 20 19:50:16 2009
@@ -96,6 +96,10 @@
                 handler (this, EventArgs.Empty);
             }
         }
+
+        protected override bool OnMnemonicActivated (bool group_cycling) {
+            return entry.MnemonicActivate(group_cycling);
+        }
     
         public TextEntry Entry {
             get { return entry; }

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs	Fri Feb 20 19:50:16 2009
@@ -76,6 +76,10 @@
             to_entry.ValueChanged += OnChanged;
         }
         
+        protected override bool OnMnemonicActivated (bool group_cycling) {
+            return from_entry.MnemonicActivate(group_cycling);
+        }
+
         private class AutoOrderButton : Button
         {
             public AutoOrderButton () 

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TextViewEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TextViewEntry.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TextViewEntry.cs	Fri Feb 20 19:50:16 2009
@@ -82,6 +82,10 @@
             undo_adapter.ConnectUndo (entry, track);
         }
                 
+        protected override bool OnMnemonicActivated (bool group_cycling) {
+            return entry.MnemonicActivate(group_cycling);
+        }
+
         private void OnChanged (object o, EventArgs args)
         {
             EventHandler handler = Changed;

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs	Fri Feb 20 19:50:16 2009
@@ -264,7 +264,7 @@
                 HBox box = new HBox ();
                 box.Spacing = 2;
                 box.PackStart (new Image (Stock.Copy, IconSize.Button), false, false, 0);
-                box.PackStart (new Label (Catalog.GetString ("Sync all field values")), false, false, 0);
+                box.PackStart (new Label (Catalog.GetString ("Sync all field _values")), false, false, 0);
                 alignment.Add (box);
                 sync_all_button.Add (alignment);
                 

Modified: trunk/banshee/src/Extensions/Banshee.Bpm/Banshee.Bpm/BpmEntry.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Bpm/Banshee.Bpm/BpmEntry.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Bpm/Banshee.Bpm/BpmEntry.cs	Fri Feb 20 19:50:16 2009
@@ -83,7 +83,7 @@
             Add (bpm_entry);
 
             if (detector != null) {
-                detect_button = new Button (Catalog.GetString ("Detect"));
+                detect_button = new Button (Catalog.GetString ("D_etect"));
                 detect_button.Clicked += OnDetectClicked;
                 Add (detect_button);
             }
@@ -95,7 +95,7 @@
             play_button.Clicked += OnPlayClicked;
             Add (play_button);
 
-            Button tap_button = new Button (Catalog.GetString ("Tap"));
+            Button tap_button = new Button (Catalog.GetString ("T_ap"));
             tap_adapter = new BpmTapAdapter (tap_button);
             tap_adapter.BpmChanged += OnTapBpmChanged;
             Add (tap_button);
@@ -130,6 +130,10 @@
             set { bpm_entry.Value = value; }
         }
 
+        protected override bool OnMnemonicActivated (bool group_cycling) {
+            return bpm_entry.MnemonicActivate(group_cycling);
+        }
+
         private void OnChanged (object o, EventArgs args)
         {
             EventHandler handler = Changed;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]