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>
Gtk doesn't have a simple way to manually trigger this, so I didn't
write a unit test for this feature.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This function scans through the treestore at the current level, without
descending into children. This is because we frequently know what
category playlists are under when searching for a child, so it makes
sense to find that first.
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>
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 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>
__gui_playlist_init_idle() will select the first visible playlist by
default, which is what we want. Let's not override this by showing the
Collection later in this function.
Fixes#95: Startup shows Collection instead of Queued Tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
One word labels are always better. I move the "Favorites" and "Hidden"
playlists under the "Playlists" header because they're manually
configured by the user.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I need to disable filtering when adding artist playlists to avoid some
weird memory corruption issues.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I intend to use this to hide empty playlists, but it could potentially
also be used to search for a specific playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We only need to do this after Ocarina init has completed, otherwise
artist playlists will be added twice.
Fixes#79: Artist playlists not updated when tracks are added
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We were calling the queue function directly, rather than passing through
the playlist layer. This means random state isn't saved when the button
is clicked and Ocarina is closed.
Fixes#78: Call playlist_set_random() when clicking random button
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
System playlists cannot be deleted, but library playlists can. Deleting
a library playlist removes the library and associated tracks from the database.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I'm going to use this to distinguish between various playlist types that
are about to be added. Let's update the playlist functions first, and
then add more types in a future patch.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
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>