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 701194 - The library import tab does not update the available tracks
The library import tab does not update the available tracks
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Importing
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-29 13:36 UTC by Lionel Landwerlin
Modified: 2013-05-30 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
import-dialog: connect the right signal to get currently selected folder (1.26 KB, patch)
2013-05-29 13:37 UTC, Lionel Landwerlin
none Details | Review
import-dialog: connect the right signal to get currently selected folder (1.31 KB, patch)
2013-05-29 13:37 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2013-05-29 13:36:42 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.
Comment 1 Lionel Landwerlin 2013-05-29 13:37:12 UTC
Created attachment 245550 [details] [review]
import-dialog: connect the right signal to get currently selected folder
Comment 2 Lionel Landwerlin 2013-05-29 13:37:54 UTC
Created attachment 245551 [details] [review]
import-dialog: connect the right signal to get currently selected folder
Comment 3 Jonathan Matthew 2013-05-29 22:12:50 UTC
current-folder-changed used to be the right signal, so this looks like a gtk api break.
Comment 4 Lionel Landwerlin 2013-05-30 00:15:13 UTC
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.
Comment 5 Jonathan Matthew 2013-05-30 12:07:57 UTC
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.
Comment 6 Lionel Landwerlin 2013-05-30 12:26:38 UTC
Just found an unrelated bug in the GtkFileChooserButton... I'll check with the maintainers and update you about that.