GNOME Bugzilla – Bug 726713
Update of songs interferes with selection mode
Last modified: 2014-05-26 10:07:28 UTC
When I go to selection mode and a song is playing, the selection that I made gets cleared up. To reproduce: 1. Go to Songs view 2. Play a song 3. Click the Select button to enable selection mode 4. Select some songs 5. Wait for a few seconds Expected: Selection remains the same Results: Selection gets cleared up The problem seems to be from this commit: 5d16c7b - Update songs when they are being added or deleted. Reverting it fixes the issue. Seems like the said commit reloads the contents of the model of the TreeView, that's why the selection gets cleared up. Also, errors are showing up in the terminal continously: (gnome-music:21083): Gtk-CRITICAL **: gtk_list_store_set_value: assertion 'iter_is_valid (iter, list_store)' failed I've built gnome-music in GNOME 3.10.
Cannot reproduce this in 3.11.92, is this still happening to you, Arnel?
No unless I add a new song. Maybe there was a bug in tracker before, so the previous errors no longer shows up. This is always happening for me before. I think we could close this now.
Seems like it's still there - I upgraded to GNOME 3.12 by using the repository in COPR for Fedora 20 and after logging in my brother's account, it keeps reloading the songs view. To my own account, it only happens when I move around files, and add or delete songs. After that, the view gets reloaded, and sometimes the player gets stuck into one song because the current iterator is no longer valid. Seems like the updates gets triggered even if the files that changed are not songs. And the current iterator should be updated when the view is reloaded, if it is the current playlist.
We should disable song update if selection mode is on, probably
Created attachment 274587 [details] [review] Attachment for the patch When new music is added to the music folder when app is in selection mode, wait for the selection mode to end and then update the view.
Review of attachment 274587 [details] [review]: ::: gnomemusic/view.py @@ +383,3 @@ + return False + else: + self.check_for_selection() A better idea would be storing data from 'changes-pending' callback and calling it in _on_view_selection function - this way we would avoid timeout_add. Also note that there is a _on_changes_pending callback in window.py, which needs to be updated
(In reply to comment #4) > We should disable song update if selection mode is on, probably Makes sense to me.
Created attachment 276989 [details] [review] Attachment for the patch Check for pending changes when selection mode is done and call _on_changes_pending if there are any changes left.
Review of attachment 276989 [details] [review]: ::: gnomemusic/grilo.py @@ +77,3 @@ self.changed_media_ids = [] self.pending_event_id = 0 + self.changes_pending = [False for x in range(0, 3)] We should make it a named dict and load views dynamically (for playlists and search also)
Created attachment 277000 [details] [review] Attachment for the patch Added a dictionary for changes_pending for different views instead of a list in grilo.
Review of attachment 277000 [details] [review]: Thanks, pushed