banshee r5156 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r5156 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- Date: Mon, 23 Mar 2009 20:43:42 +0000 (UTC)
Author: gburt
Date: Mon Mar 23 20:43:42 2009
New Revision: 5156
URL: http://svn.gnome.org/viewvc/banshee?rev=5156&view=rev
Log:
2009-03-23 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs:
Set a tooltip on the next/arrow button, and make sure the title entry is
focused after we switch tracks.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/PageNavigationEntry.cs
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 20:43:42 2009
@@ -27,6 +27,7 @@
//
using System;
+using Mono.Unix;
using Gtk;
namespace Banshee.Gui.TrackEditor
@@ -36,6 +37,7 @@
public event EventHandler Changed;
private TextEntry entry;
+ private TrackEditorDialog dialog;
private Button forward_button;
public Button ForwardButton {
get { return forward_button; }
@@ -47,17 +49,15 @@
public PageNavigationEntry (TrackEditorDialog dialog, string completionTable, string completionColumn)
{
+ this.dialog = dialog;
entry = new TextEntry (completionTable, completionColumn);
entry.Changed += OnChanged;
- entry.Activated += delegate {
- if (dialog.CanGoForward) {
- dialog.NavigateForward ();
- }
- };
+ entry.Activated += EditNextTitle;
entry.KeyPressEvent += delegate (object o, KeyPressEventArgs args) {
if ((args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) &&
(args.Event.State & Gdk.ModifierType.ControlMask) != 0 && dialog.CanGoBackward) {
dialog.NavigateBackward ();
+ entry.GrabFocus ();
}
};
entry.Show ();
@@ -72,12 +72,22 @@
entry.SelectRegion (0, entry.Text.Length);
};
forward_button = EditorUtilities.CreateSmallStockButton (Stock.GoForward);
+ object tooltip_host = Hyena.Gui.TooltipSetter.CreateHost ();
+ Hyena.Gui.TooltipSetter.Set (tooltip_host, forward_button, Catalog.GetString ("Advance to the next track and edit its title"));
forward_button.Sensitive = dialog.CanGoForward;
forward_button.Show ();
- forward_button.Clicked += delegate { dialog.NavigateForward (); };
+ forward_button.Clicked += EditNextTitle;
PackStart (forward_button, false, false, 0);
}
}
+
+ private void EditNextTitle (object o, EventArgs args)
+ {
+ if (dialog.CanGoForward) {
+ dialog.NavigateForward ();
+ entry.GrabFocus ();
+ }
+ }
public void ConnectUndo (EditorTrackInfo track)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]