This takes the ProgressBar from the scanner widgets and puts in in a Box
with Labels on either side to reserve its space at all times.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is a Gtk.TreeExpander with some extra functions to work the way we
need it. We don't have a way to create Gtk.TreeListRows manually, so we
can't test the set_item() and unset_item() functions directly.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
sidebar: Create a LibraryTreeRowFactory
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This contains the actual widgets used to display playlist information. I
override the GtkGrid.attach() function so it returns the attached widget
to simplify setup a little bit.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Configured to allow unselecting items so we have a way of choosing an
item if it is the only one in the list.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I can't inherit from Gtk.TreeListModel since the new() constructor is
the only way to set the create_child_func. Instead, use this wrapper
function to do the same thing.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This lets us create a new instance for each test we do, so we don't need
to keep resetting a single static instance.
Implements: #21 (Convert ui.pane.Pane into a class)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This moves the code out of ui/ and turns it into a class for easier
testing.
Implements: Issue #22 (Move Gtk.HeaderBar code into audio/)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
All sinks need to post the EOS message before the pipeline can pass it
on to our application. Using pad negotiation mode 2 means that the
message is only sent to the active path in the output selector, leaving
our application hanging waiting for the inactive path to post EOS as
well.
Fixes: #33 (Fix Autopause not resetting)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Again, we have to be careful not to check positions against playlists
where current == -1 for performance reasons.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We have to be careful not to check track positions against playlists
where current == -1, because this could drastically slow down adding new
tracks because SQLite would need to find the position for every track
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This lets us sort albums by original release date, so if an artist
releases multiple albums in a year we can sort by month too.
Additionally, this helps us better handle albums with the same name that
were released in different years.
Implements: #40 (Store the full date in the year table)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
previous_track() moves deeper into the previous tracks list while
next_track() moves us closer to the start. I also make sure we reset
current track when new tracks are added to the playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And add a get_current_track() function to make it easier to get the
currently selected track. Clamping behaves differently if random or loop
are enabled to ensure a track is still picked.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So we can write the current playlist stateid to the settings file and
look it up later.
Implements: #36 (Find playlists based on playlist state id)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This keeps us from ever completely clearing the sort field in the
playlist state, since that would lead to an incomplete SQL query error.
Fixes: #38 (PlaylistStates should not allow completely clearing sort)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So we can access the disc number when displaying tracks in the tracklist
Implements: Issue #34 (Give Discs a "number" property)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Adding a brief sleep when checking main_context iterations gives the
widget a chance to update the path so the test can pass more reliably.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So users don't need to re-create their playlists when switching over to
the sqlite database.
Implements: #10 (Import user playlists)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>