Commit Graph

3454 Commits

Author SHA1 Message Date
Anna Schumaker 223a1e47c1 core/playlist: Switch over to db_load_idle()
Implements #14: Load playlists through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:07:16 -04:00
Anna Schumaker 0bcfa06bfb core/containers/database: Add a function for loading databases when idle
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:06:57 -04:00
Anna Schumaker 2ab0c6957b core/idle: Test idle queue before containers
This will let databases use the idle queue for loading.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:06:41 -04:00
Anna Schumaker f706ccb77c core/collection: Initialize the collection through an idle task
Scan over all tracks in the database first, and then schedule a
collection update.

Implements #13: Load collection queue through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:06:20 -04:00
Anna Schumaker bd1e20bc56 core/tempq: Load the tempq file through an idle task
This will help reduce disk accesses during thet main startup sequence.

Implements #12: Load temporary queues through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:05:11 -04:00
Anna Schumaker 279d6e0228 core/audio: Load initial track through an idle task
Let's save this disk access for when we're idle.

Implements #11: Load initial track through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:04:28 -04:00
Anna Schumaker cb6d451fb1 gui/collection: Add library paths through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-13 09:47:46 -04:00
Anna Schumaker f01cce3b47 gui/idle: Split out idle queue functions
I want to use this outside of the collection, so let's move these
functions into a new file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-13 09:47:46 -04:00
Anna Schumaker fc03b6cb95 Ocarina 6.4.13
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-13 09:42:00 -04:00
Anna Schumaker f50c1541a1 gui/view: Scrolling improvements
This patch fixes two issues.  First, I disable scrolling when the user
has manually selected a track.  I've found that extra scrolling in this
case can be disorienting, and frequently ends up with the wrong track
selected due to how queue iterators are set so it's probably best just
to disable scrolling in this case.

This patch also changes the order of calls to set_cursor() and
scroll_to_cell().  I've found that scrolling before setting the cursor
causes the GtkTreeView to ignore alignment settings unless the row is
already on the screen.  Switching the order makes everything work
properly.

Fixes #57: Wrong track is sometimes scrolled to
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-08 08:23:53 -04:00
Anna Schumaker dfb023a0fc gui/model: Set text to bold for the currently playing track
This patch adds support for changing a rows font face to bold for the
currently playing track.  This should make it easier to find what track
is playing while quickly skimming through the list.

Fixes #22: Highlight the currently-playing song in the collection
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-07 09:14:52 -04:00
Anna Schumaker a89aa5a201 core/audio: Trigger queue updates when changing tracks
I need to do this for temporary queues in addition to the collection for
bolding to work properly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-07 09:01:13 -04:00
Anna Schumaker b2a61a60f3 core/queue: Trigger an update when tracks are selected
This will let us turn tracks bold as they are selected.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-04 17:10:05 -04:00
Anna Schumaker 1ad112e217 gui/sidebar: Select first enabled queue during startup
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>
2016-06-04 13:52:09 -04:00
Anna Schumaker df93ad06df gui/tempq: Don't save queues from __tempq_cleared()
Cleared is only called during Ocarina shutdown, so calling save here
wipes out any temporary queues as they are written to disk.

Fixes #24: Temporary queues not saving
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-04 13:41:21 -04:00
Anna Schumaker 3a08828dda gui: Enable GtkTreeView fixed-height mode
Tracks information should always be the same height, so we can safely
enable this as a quick speed up to the treeview.

Fixes #52: Enable GtkTreeView fixed height mode
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-03 13:11:40 -04:00
Anna Schumaker 6c8733bbbb gui: Remove unused ui files
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:05:36 -04:00
Anna Schumaker 490370b759 Ocarina 6.4.13-rc
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:04:14 -04:00
Anna Schumaker 061dbc4575 gui/ocarina: Convert file to C
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 4dbaf12701 gui/ocarina: Switch to C-style GtkApplication
The right way to do this would be to respond to the "activate",
"startup", and "shutdown" signals.  I can't to this easily, because
gstreamer needs argc and argv.  Let's fake things up now and sort it out
later.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 108dbacf41 gui/ocarina: Replace share_file() with find_file_path()
And don't keep the result around any longer than we need to.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 2c65584e2d gui: Remove o_notebook
Now that nothing uses it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker e97939a9cd gui: Remove old Tab and QueueTab code
Now that nothing uses it

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker c0a6c663d1 gui: Move tempq operations into tempq.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker bd22c8da6d gui/collection: Move collection_ops into collection.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 27a4cc23ed gui: Remove C++ collection tab code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker e290552812 gui/history: Convert file to C
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 5a9c6a1dd1 gui/history: Remove obsolete HistoryTab code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker d769140e35 gui: Remove C++ playlist code
And notebook switching code in playlist.c

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 7995e381c0 gui/playlist: Move playlist_ops into playlist.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker a1c6502226 gui/audio: Handle favorite and hide buttons
This lets me remove gui/playlist_tab.cpp

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker f328b1686d gui/view: Scroll to the current queue's iterator position
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker d5c365ddf0 gui/view: Show sort indicators on columns
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker cacd344741 gui/view: Sort queue when columns are clicked
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 8e6b963eb8 gui/view: Add a right-click menu
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker c9eb9d724b gui/view: Add keypress events
- Press "f" to add tracks to the Favorites playlist
- Press "q" to create a new temporary queue
- Press "r" to create a new temporary queue with Q_RANDOM set
- Press 0 .. 9 to add tracks to a temporary queue
- Delete to remove tracks from a queue

I also removed the corresponding keypress events from the C++ code to
make progress easier to track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker aee4764a2c core/queue: Add queue_erase() and qop_erase()
This function is similar to queue_remove(), except the remove can be
prevented if qop_erase() returns false.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 8d2b0caf6c core/tempq: Store queue operations passed to tempq_init()
We don't need different operations for each queue.  If we store this
then a higher layer doesn't need to keep passing the same structure over
and over again.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 87c59ce888 gui/queue: Control runtime display
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 2d1ddd5a35 gui/view: Load a track when treeview is double clicked
And remove this feature from the C++ code.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker bbf111ecb0 gui/view: Add gui_view_set_model()
To set the currently displayed treemodel

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 76a6eba537 gui/queue: Add functions to filter the currently displayed queue
And remove the ability to filter from the C++ code.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 4c784366d7 gui/view: Save and restore column widths
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker 13525eda22 gui/queue: Add a single treeview instance
And swap out the model when queues are shown.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 12:01:43 -04:00
Anna Schumaker c5e03d98cf Ocarina 6.4.12
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-27 11:49:33 -04:00
Anna Schumaker f42c3d41d1 gui: Vertically center the playback controls
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-26 13:22:41 -04:00
Anna Schumaker d07b7e68ac core/tempq: Don't enable all queues by default
Enabling all queues by default, even ones read from disk, is incorrect
as it leads to all queues getting reenabled when restarting Ocarina.

Fixes #56: Enabled status of temporary queues not saving
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-19 07:33:45 -04:00
Anna Schumaker 4fd4f75f0e TODO list updates
I can cross off a few more items after the last couple of releases.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-16 14:27:06 -04:00
Anna Schumaker b01f61f8e4 gui: Refer to "this track" instead of "current track"
Saying current track sounds too formal, and adds extra space to the
pause-after widget.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-16 14:27:03 -04:00
Anna Schumaker d874c0e408 gui: More widget spacing updates
Fixes #54: Fix On/Off switch size group
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-16 14:26:39 -04:00