This way we don't need to keep including the same core libraries in
almost every file.
Implements #83: Include useful headers in core/core.h
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The core_init_data only held three items, most of which don't get set
during testing. Removing this struct means several tests no longer need
to define a "dummy" initdata object to pass around during init.
Implements #92: Remove core_init_data
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And make them optional, that way tests don't need to keep creating fake
callbacks if they don't need anything from the audio layer.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Passing this option tells Ocarina that it should only process
synchronous idle tasks, such as library or playlist updates. This
effectively disables album art fetching (and any async jobs we add in
the future).
Implements #91: Add --no-fetch option
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Rather than offering two init functions for testing. This lets the UI
select if they want async idle tasks (like Album Art fetching).
Implements #90: Give idle_init an async flag
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Everything has been merged into the playlist layer to better match how
playlists are actually used. This means we can remove the queue files.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This code is obsolete now that gui/playlist.c handles keypress and
right-click events on the main treeview.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This functionality needs to be tested better. I can't really test the
dialog, since it runs in the main thread, but I can test adding library
paths with the selected directory.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This code is obsolete now that the sidebar handles setting the random
button when playlists are changed.
Implements #76: Remove struct gui_queue
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Called to access the GtkPaned widget. I also rename the widget
"sidebar" to match the new convention.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise we may try to use the gstreamer playbin after destroying it,
leading to various error messages showing up in the console.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I decided to manually connect signals this time so I can pass sort
information instead of needing to look up the column index.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Right now filtering is split between queue.c and view.c, which can make
things somewhat complicated. I think this is a sign that we need a new
file to manage filtering.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is going to represent a playlist soon enough, so let's just name it
something more generic in case it ever has to change again.
Implements #87: Rename GuiQueueModel -> GuiModel
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is cleaner and easier than calling into the gtk builder directly.
I bumped up the window layer so other gui components can use it.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
These options are mostly used to communicate with a running Ocarina
instance to control playback.
Implements #37: Ocarina Command Line Commands
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The convention is for gtk builder files named with a ".ui" extension.
Let's rename our file to match, and drop the 6 while we're at it.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
These can be used for version number comparisons as integers, which will
be useful once file version numbers are based off of minor versions.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The view is now responsible for allocating the filter, but the gui_queue
still needs to set the filter function during an init step.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Now that we can switch between different queues we no longer need to
allocate multiple models.
Implements #72: Only allocate a single GuiQueueModel for all playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This preserves the original behavior, where the collection is always
selected from the beginning. This can be improved upon later, once
queued tracks are implemented as a playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise the list of tracks is left blank, which the user might not be
expecting.
Fixes#55: Collection should be selected by default
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>