I'm transitioning this class to be a PlaylistNode, and nodes can easily
access their parent through a .parent pointer
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Nothing else inherits from this class anymore, so let's merge it into
one to make it easier to deal with going forward.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This will eventually replace the GenreManager instance, and makes use of
the new playlist node code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We'll use this do display the node in the UI. I add a newline so we
don't have to implement some kind of spacer class.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
My intention is to try to match the GtkTreeModel interface in terms of
functionality. This way, each node can act as its own iterator.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This helps reduce code duplication, since we can just call a single
function to handle sending the changed() signal.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I guess this could be lifted later if anybody asks for it, but I don't
think this really makes sense as a playlist source.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The collection playlist always has loop=True, so we'll never pop it from
the stack under normal conditions. Let's clear the list when selecting
this playlist so we don't keep a list of unreachable playlists.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm going to keep a list of playlists that have been selected so we can
switch playlists automatically when one ends.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This will eventually display the remaining time before the pause takes
effect, but for now just show the widget.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I either round to the nearest minute or nearest 5-second interval
depending on how much time is left. This will eventually be used to
populate a GtkPopover to display the remaining time.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We need to do this in a couple of different places, so let's make it
easier to do the conversion manually. Additionally, the datetime module
was having some trouble handling times over one hour. The new code
should handle it just fine, though.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm planning to use this for the automatic pausing code to tell the user
how much longer until we pause.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Users tell us how many tracks they would like to listen to, and then we
pause when that is complete. I make sure we test the about-to-finish
signal with this patch, since we hadn't been doing that up until now.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We have to do this because the "input" signal attached to a real
Gtk.SpinButton is broken, and likes to increment from -1 to 1, bypassing
0 all together.
Of course, this is only a problem when I try to have "This Track" and
"Next Track" text displayed instead of numbers, but I think everything
looks nicer this way.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Now we only toggle the show-more button state if the entry is already
focused. Otherwise, we allow the grab focus.
Additionally, I rename "updown_button" to "show_more" to match how it's
being used.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I change the keyboard shortcuts up slightly with this patch:
- ctrl+m shows and hides the search widgets
- ctrl+f now shows the widgets and focuses the track filtering entry
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
If everything goes well and the test passes, then this line will never
be reached. Let's move it so it doesn't skew the code coverage report.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>