After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 364824 - Auto-completion for Artist and Album in TrackEditor
Auto-completion for Artist and Album in TrackEditor
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal enhancement
: 1.4
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-24 21:24 UTC by Scott Peterson
Modified: 2008-10-12 15:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (17.12 KB, patch)
2006-10-24 21:24 UTC, Scott Peterson
needs-work Details | Review
A cleaned-up version of the patch (20.07 KB, patch)
2006-12-08 00:13 UTC, Scott Peterson
none Details | Review

Description Scott Peterson 2006-10-24 21:24:01 UTC
This patch adds the AutoComplete class which is instantiated with a Gtk.Entry and a delegate to a query function. As text is typed into the Entry, it is run through the query function which returns a List<string> of auto-complete suggestions. The List<string> is then packed into a pop-up Window with a TreeView which the user can thumb through.

At least, that's how it should work. I am a Gtk novice so I did lots of hacky things to keep the focus where it belongs. It works fine with everything I've thought to try but there could be logical errors that I missed. There were a few minor issues I couldn't figure out:

When the TreeViewColumn.Sizing is set to Autosize, the width will only go as large as the first CellRenderer AFTER THE MODEL HAS CHANGED AND BEFORE THE WINDOW IS HIDDEN. That is to say, if the pop-up window is hidden, then the model is changed, the the window is shown, the width is correct, but if the model is then changed again, the width will be only as large as the first cell's width until the window is hidden again. Is this a Gtk bug?

Also, I couldn't find a way to give the TreeView the appearance of being focused. It isn't actually focused - the Entry is - but I wanted the cells to be highlighted as though the TreeView had focus.

And sometimes the auto-complete window steals focus when it pops up, even though it's AcceptFocus is false. This only happens sometimes.
Comment 1 Scott Peterson 2006-10-24 21:24:55 UTC
Created attachment 75329 [details] [review]
The patch
Comment 2 Aaron Bockover 2006-12-05 06:25:55 UTC
Scott: I just tried to quickly test this and I get no autocomplete window. I can see the focus of my track editor window changing (but the entry remains focused), but no popup. This may be an issue with compiz, but is also probably an issue in your code. For instance, the same kind of popup is used in MonoDevelop with its autocompletion.
Comment 3 Scott Peterson 2006-12-08 00:13:21 UTC
Created attachment 77940 [details] [review]
A cleaned-up version of the patch

Hmm. I just tried this with the CVS head and it worked for me. I've tested it successfully with both Beryl and Metacity. I don't know where to start looking for problems. If you're using stock NLD or Suse image that has a live CD, I could pop that in a give it a try.

I've cleaned up the code and added some documentation if you want it give it a look yourself. There are no changes in behavior.
Comment 4 Bertrand Lorentz 2008-08-21 19:38:43 UTC
The patch doesn't apply to trunk anymore.
Comment 5 Michael Martin-Smucker 2008-10-05 15:58:27 UTC
This is a feature I definitely miss from iTunes.  Has anything happened with this in the past couple years?
Comment 6 Michael Martin-Smucker 2008-10-12 14:57:06 UTC
This is implemented in 1.3.2 and can be closed, correct?
Comment 7 Gabriel Burt 2008-10-12 15:46:34 UTC
Yes, thanks, closing.