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>
This will open up each of the playlist headings except for "Collection",
which I think is the behavior we want.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise we'll get a message saying that either the filter or the
treeview is not a GtkTreeModel
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The concept of queues is going away over the next few releases, so we
should rename this variable for consistency. I considered calling it
"playlist_model", but I think "gui_model" better matches naming
conventions in the gui.
Imlements #77: Rename queue_model to playlist_model
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I connect this in code so I can pass the column index as data to the
function, avoding the need for a "column index" lookup function.
I restore saved column widths during startup.
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>
And rename the widget from "o_treeview" to just "treeview".
I wanted to rename gui/view.c to gui/treeview.c at some point. I
decided to gradually rework things into a new file to make it easier to
track progress.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This keeps the treepath conversions contained to the filter code when
finding paths to scroll to.
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>
Ocarina is moving in a playlist oriented direction, so move away from
using the queue directly in favor of using the playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This only needs to happen once, so let's do it when we initialize the
model rather than waiting for the first allocation.
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>
This is called to get the requested playlist. I also reworked
playlist_get_queue() to call this function.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The function gtk_menu_popup() is deprecated as of Gtk 3.22, so replace
it with the simplified popup_at_pointer() function.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The new file is written in the Gitlab markdown language. I also update
the content to match how things are done now that we use CMake.
Implements #85: Update README
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Track database defragmenting can happen before the new tasks are ever
scheduled, causing a crash when we try to find tracks with changed IDs.
After the crash, the Favorites and Hidden playlist data appears to be
lost.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We want playback to continue after the queued tracks playlist has run
out. Allowing us to select the same playlist multiple times can cause
us to get stuck picking the next track.
Fixes#100: Finishing "Queued Tracks" playlist shouldn't stop playback
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise we will crash with a memory error. This only seems to be a
problem when Ocarina is started up after creating a user playlist.
Fixes#99: Ocarina crashes during startup with user playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We need to free the playlist name after looking up in case we hit the
case where the playlist isn't found.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise valgrind will report that we are leaking memory.
Additionally, only initialize the idle queue for sync idle tasks until
album artwork needs it.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>