I needed to switch starring multiple tracks at once to happen during a
button press instead of release, since the selection changes between
these two events.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Testing this runs into the same problem that the TreeDragSource patch
hit - we're not able to manually allocate a Gtk.SelectionData object. We
can still test the code that does the move but we can't verify that
we're using the interface correctly
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We're not able to completely test this implementation due to
Gtk.SelectionData() missing a constructor. Fingers crossed that it gets
added in a future release of python-gobject
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
There are a few places where we need to do this, so make a function that
is more straightforward than using an iterator
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Let's just set the visible state directly. Additionally, I add a test
for setting visibility back to false when showing a different playlist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This lets us clean up add() so we only need to loop over the list once
and we can remove the buggy built-in iterator code.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- Create a test_album variable instead of making each test build the
same path
- Create a single self.plist for test playlists
- Create a helper function for adding tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- Add a gtk.notify_loop() for running any queued notifications
- Add a gtk.timeout_loop() for running a main loop for a specificed
amount of time
- Prevent filtering warnings produced by some tests
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- curds.playlist.current() for the currently selected playlist
- curds.playlist.lookup() for lookups
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- Make a shortcut to the Starred playlist for the UI
- Always sort playlists, rather than sorting as soon as they become
visible
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Rather than testing the entire model in one giant function, split this
up into several functions for each virtual function.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm intending to create a new model whenever the currently visible
playlist is changed, so this helps to prepare for that.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I return the next state that the playbin should be set to from the
decrement function so callers don't need to figure this out themselves.
Additionally, I added an about_to_pause() function to tell callers if
the next call to decrement() will return the pause state.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>