GNOME Bugzilla – Bug 701194
The library import tab does not update the available tracks
Last modified: 2013-05-30 12:26:38 UTC
Open rhythmbox, Click the 'Music' item on the left, Click the 'Import' button in the library panel, Select the 'Download' directory (for example) where you have a couple of mp3 Nothing appears in the treeview underneath. The problem is that we're not listening on the right signal for the GtkFileChooserButton to know when the directory is changed.
Created attachment 245550 [details] [review] import-dialog: connect the right signal to get currently selected folder
Created attachment 245551 [details] [review] import-dialog: connect the right signal to get currently selected folder
current-folder-changed used to be the right signal, so this looks like a gtk api break.
Reading the GTK+ documentation about signals is utterly confusing to me... From the documentation : ------------------------------------------------- The "current-folder-changed" signal : This signal is emitted when the current folder in a GtkFileChooser changes. This can happen due to the user performing some action that changes folders, such as selecting a bookmark or visiting a folder on the file list. It can also happen as a result of calling a function to explicitly change the current folder in a file chooser. Normally you do not need to connect to this signal, unless you need to keep track of which folder a file chooser is showing. ------------------------------------------------- The "selection-changed" signal : This signal is emitted when there is a change in the set of selected files in a GtkFileChooser. This can happen when the user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection. Normally you do not need to connect to this signal, as it is easier to wait for the file chooser to finish running, and then to get the list of selected files using the functions mentioned below.
When I originally wrote this code I decided that current-folder-changed worked better than selection-changed, but I can't quite remember why that was. At some point it stopped working, but I thought I got that fixed. Oh well. I've pushed your patch as commit 1d5d9c9.
Just found an unrelated bug in the GtkFileChooserButton... I'll check with the maintainers and update you about that.