[banshee] GrabFocus on the current entry on TrackEditor fwd/back, so its contents is selected
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] GrabFocus on the current entry on TrackEditor fwd/back, so its contents is selected
- Date: Mon, 11 May 2009 11:12:21 -0400 (EDT)
commit b89b8d377e3fd7a19e00ab977dab9f57dac41138
Author: Gabriel Burt <gabriel burt gmail com>
Date: Mon May 11 10:10:36 2009 -0500
GrabFocus on the current entry on TrackEditor fwd/back, so its contents is selected
---
.../Banshee.Gui.TrackEditor/TrackEditorDialog.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
index 099bb66..0943eb5 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
@@ -397,8 +397,21 @@ namespace Banshee.Gui.TrackEditor
nav_backward_button.Sensitive = CanGoBackward;
nav_forward_button.Sensitive = CanGoForward;
}
+
+ // If there was a widget focused already (eg the Title entry), GrabFocus on it,
+ // which causes its text to be selected, ready for editing.
+ Widget child = FocusChild;
+ while (child != null) {
+ Container container = child as Container;
+ if (container != null) {
+ child = container.FocusChild;
+ } else if (child != null) {
+ child.GrabFocus ();
+ child = null;
+ }
+ }
}
-
+
public void ForeachNonCurrentTrack (EditorTrackOperationClosure closure)
{
for (int i = 0; i < TrackCount; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]