Commit Graph

791 Commits

Author SHA1 Message Date
Anna Schumaker d7709fd5fb gui: Replace "Add New ..." button with a single GtkButton
I find that I usually create playlists through either a right click
action or through a keyboard shortcut, so we don't need an extra option
hidden inside a MenuButton.  Let's remove the button and show the "Add
Library Path" option directly instead.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-27 14:12:21 -04:00
Anna Schumaker 93d1550763 core/settings: Check for a NULL key
This fixes a problem with restoring treeview columns.  Sometimes
"Played" gets allocated way too much space, so I solve this by changing
it's setting key to NULL so the column always gets whatever space is
leftover.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 12:02:23 -04:00
Anna Schumaker 5a41eef8a2 gui/ocarina: Add basic command line options
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>
2016-09-26 08:07:36 -04:00
Anna Schumaker afbf9e0b1a gui/playlist: Change headers to "Playlists" and "Dynamic"
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>
2016-09-26 08:07:36 -04:00
Anna Schumaker 21a47ec3b8 gui: Rename ocarina6.glade -> ocarina.ui
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>
2016-09-26 08:07:35 -04:00
Anna Schumaker 43a0ffd54c ocarina: Add OCARINA_{MAJOR, MINOR}_VERSION constants
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>
2016-09-26 08:07:35 -04:00
Anna Schumaker 0cb44aaf3a gui/queue: Remove Repeat button
Most playlists don't allow changing this, and now that we have user
playlists it doesn't make sense to support repeating queued tracks.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker 4a4ec3fa36 gui/audio: Add GtkVolumeButton for changing volume
Implements #38: Add volume slider
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker f02dff4177 gui/view: Sort the user playlists menu
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker ddb564ed82 gui/view: Create a menu item for adding tracks to user playlists
This has to be created programmatically due to the dynamic nature of
user playlists.  The easiest way to do that is to list user playlists in
a submenu and switch them out as needed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker f0e9e1f1e4 gui/playlist: Add user playlists during init
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker e2d4dd61fb gui/view: Add "New Playlist" menu options
And pop up a dialog mox to ask the user for the name of the new
playlist.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker 1b9101cf26 gui/collection: Replace Add Library Path GtkButton with a GtkMenuButton
This lets me add new options without needing to clutter the gui with
lots of rarely-used buttons.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker 784cd3eb91 core/tags/track: Remove redundant artist and genre tags
The track tag doesn't need these tags now that they can be found in the
album tag.

Implements #64: Remove Artist and Genre pointers from Tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
Anna Schumaker 84661c4797 gui/playlist: Hide empty playlists
I need to disable filtering when adding artist playlists to avoid some
weird memory corruption issues.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:34 -04:00
Anna Schumaker 278a54f7ec gui/playlist: Add a GtkTreeFilter to the playlist treeview
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>
2016-09-26 08:07:34 -04:00
Anna Schumaker c6e9c176d8 gui/playlist: Select playlists by double clicking
I make the current playlist bold so the user has an easier time finding
it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:34 -04:00
Anna Schumaker da19ddd388 gui/playlist: Set playlist size when cleared
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:34 -04:00
Anna Schumaker e4cd59b895 core/tempq: Remove tempq.c
Multiple temporary queues has been replaced with a single Queued Tracks
playlist.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-26 08:07:34 -04:00
Anna Schumaker 69e628f505 gui/tempq: Remove tempq.c
Temporary queues are being replaced by the Queued Tracks playlist.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-26 08:07:34 -04:00
Anna Schumaker 69b39ea717 gui/sidebar: Remove unused sidebar liststore
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-26 08:07:34 -04:00
Anna Schumaker 017da02827 gui/playlist: Add Queued Tracks playlist
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-26 08:07:34 -04:00
Anna Schumaker 7e00c8ed10 core/settings: Move settings into core/
Implements issue #9: Move settings into core/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:08 -04:00
Anna Schumaker a8abbdfdcc Remove scons build files
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:08 -04:00
Anna Schumaker 257ef3612f gui/audio: Enable idle polling when the track changes
Unplayed, Most Played, and Least Played tracks playlists update
themselves with an idle task when tracks have been played.  It looks
like we haven't been processing these tasks, so the queue was just
building up after every track.  Fix this by enabling the GTK idle
callback whenever a track is played.

Fixes #89: Dynamic playlists aren't updating
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-19 14:45:11 -04:00
Anna Schumaker 1bc43a9e2c gui/queue: Remove unused fields from struct gui_queue
Now that we have a single model and filter there is no need to attach
them to every gui_queue.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker 336c0a01af gui/queue: Only allocate a single GtkTreeModelFilter
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>
2016-09-11 10:52:29 -04:00
Anna Schumaker 65b43c7ae5 gui/model: Make sure that the queue model can represent a NULL queue
Otherwise this could lead to crashes or buggy behavior.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker 40bce8cc59 gui/model: Don't require a GuiQueueModel for public functions
We can get by without this now that the model is shared across all
queues.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker 5c426fc8d7 gui/model: Update runtime label when the model changes
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker f58cc8da46 gui/model: Add a function for getting the current queue
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker a28b5c4ec5 gui/model: Create a static, shared GuiQueueModel
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>
2016-09-11 10:52:29 -04:00
Anna Schumaker a9aa3c297d gui/model: Add support for changing the represented queue
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:27 -04:00
Anna Schumaker 53285534b9 gui/model: Improve the efficiency of gui_queue_model_clear()
We can cut out several thousand function calls and allocations by
reusing the same GtkTreePath structure.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:50:50 -04:00
Anna Schumaker 00c4c8a418 gui/collection: Set dialog default response
This gives users the ability to add new library paths by pressing the
"Enter" key instead of needing to click a button with their mouse.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-31 15:35:10 -04:00
Anna Schumaker 21718c4179 gui/collection: Select user's music directory when creating file chooser
Most users will have their music in their ~/Music directory, so it makes
sense to select this path by default.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-30 07:47:07 -04:00
Anna Schumaker 1d02024505 gui/queue: Check for gq_queue before dereferencing it
Otherwise Ocarina will crash.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-29 07:55:15 -04:00
Anna Schumaker d7322c1f07 gui/queue: Add a selector for filtering by different fields
Implements #63: Add field selector for filtering
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker 11ef52b5de core/string: Remove unused string functions
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker aead4939c3 core/filter: Remove filter.c
It is unused now that I have a token matching system in place.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker 2e753b6f52 gui/queue: Switch over to using token matches for filtering
This patch also adds the genre field to the list of fields that can be
searched.

Implements #62: Replace filter layer with token matching
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker 3806577154 gui/playlists: Add artist playlists when they are created
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>
2016-08-28 09:48:12 -04:00
Anna Schumaker 3d31349cca gui/playlist: Random state isn't saved when random button is clicked
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>
2016-08-28 09:06:33 -04:00
Anna Schumaker f855eaea58 gui/collection: Run FileChooserDialog on startup
But only if the library database is empty.  This patch also changes the
prompt of the dialog to "Add Music" so users know what is going on.

Fixes #80: Pop up FileChooserDialog the first time Ocarina is run
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-16 13:38:58 -04:00
Anna Schumaker 9733b82ae8 core/collection: Remove file
I have replaced everything in this file with the code in
core/playlists/library.c

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker bddbd04ef5 gui: Remove stack widget
It isn't needed now that we pop up a file choose dialog for selecting
library paths.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker b3476e15e9 gui/collection: Remove unused collection code
And the now unused sidebar widget.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker 73c70678bb gui/collection: add button for adding library paths
This is easier than responding to events from the treeview.  Let's just
pop up a dialog and let the user select from there, rather than doing
something complicated with a stack.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker 62e1b27b6c gui/playlist: Add support for deleting playlists
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>
2016-08-13 08:31:30 -04:00
Anna Schumaker 382ee79c2e gui/playlist: Add artist playlists to the playlist sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker f2597a8e6c gui/playlist: Add library playlists to the playlist sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker 8abc45b1ae gui/playlist: Store the playlist type in the sidebar treemodel
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker 871bf88b94 gui/queue: Store playlist in the gui queue
I'll need to know the playlist type to set artist information properly.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker cfeca9ae4b core/playlist: Add playlist_type enum
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>
2016-08-13 08:31:30 -04:00
Anna Schumaker 004d4578d4 gui/queue: Set gq_queue->gq_search to NULL after freeing
Otherwise we can attempt to free the search text again when the queue is
destroyed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-13 08:26:00 -04:00
Anna Schumaker 085701ad9d gui/queue: Set gq_queue->gq_visible to NULL after destroying
Otherwise the existance check will still pass the next time
__queue_filter() is called, and we will attempt to destroy it again.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-13 08:21:22 -04:00
Anna Schumaker f7e9e8b321 gui/queue: Remember search text when switching queues
I wasn't doing this, but I also wasn't refiltering queues when they were
changed.  This resulted in showing a filtered queue, but without a way
to clear it.  Remembering the text lets me simply set the text, instead
of refiltering queues whenever they are changed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-10 07:31:03 -04:00
Anna Schumaker 44a6ad0d78 gui/playlist: Make sure we free text from tree_model_get()
Otherwise this leads to a memory leak.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-01 12:06:25 -04:00
Anna Schumaker 34447007f9 core/history: Remove unused queue
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:09:38 -04:00
Anna Schumaker 5a54fb69b6 core/collection: Remove unused queue
And remove collection_ops from the core initdata

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:09:33 -04:00
Anna Schumaker dc07d637f6 gui/history: Remove unused gui queue code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker 64fc5a9a0d gui/collection: Remove unused gui queue code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker 15ed068e13 gui/playlist: Select Collection playlist during startup
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>
2016-07-29 17:06:06 -04:00
Anna Schumaker 696173b03e gui/playlist: Add Collection and History playlists to the sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker dfae74dd50 gui/playlist: Set gui queue name based on passed playlist
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker 5d4de9c5b0 core/playlist: Add playlist_sort() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker 44a57ed863 core/queue: Add extra paramater to queue_init()
This is used to pass through a value to the GUI during queue
initialization.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker 93fb40360d core/filter: filter_search() returns a new GHashTable
I think this is cleaner than having an upper layer allocate the results
set manually.  This also lets me return NULL in the case that there were
no results.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:59 -04:00
Anna Schumaker fda3f761a0 core/filter: Call GHashTable functions directly
Implements #43: Filter code can use a GHashTable directly
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:54 -04:00
Anna Schumaker 29b2b6f6f4 core/filter: Store track pointers directly
I was storing database indexes, but this assumes that database indexes
are constant.  I intend to change this with database defragmentation.

Implements #46: Filter stores a track pointer
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:47 -04:00
Anna Schumaker 3098282382 gui/artwork: Don't destroy objects twice
The file filter and preview widget are both cleaned up when the file
chooser dialog is destroyed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:51:59 -04:00
Anna Schumaker 3b62125135 gui/artwork: Show hidden folders when selecting new images
Sometimes Ocarina gets the correct image for CD1, but not for CD2.
Allow traversing into hidden folders so users can select the correct
image out of the artwork cache.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:51:42 -04:00
Anna Schumaker 4de869d691 gui/artwork: Clear __artwork_cur_album when selecting album art
Otherwise the new image will never be updated due to the "did the album
change?" check in __artwork_set_pixbuf()

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:48:13 -04:00
Anna Schumaker 160295a6cc gui/artwork: Add a preview widget to the file chooser dialog
This lets users actually see images before selecting them for ablum art.

Implements #59: Add preview widget to album art chooser
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:45:59 -04:00
Anna Schumaker 343dec5d8d gui/artwork: Fix blurry album art
Using gdk_pixbuf_new_from_file_at_scale() can result in a blurry image
due to something in the gdk backend.  I want to have a sharper image, so
we need to perform the scale manually through Cairo.

Fixes issue #60: Album art is blurry
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-25 10:00:09 -04:00
Anna Schumaker 7dff5412bc gui/artwork: Reduce time spent polling for artwork
Since MusicBrainz limits us to one request each second, it doesn't
really make sense to poll for new artwork every half second.  Instead,
let's just put this into a new timeout function that gets called every
two seconds.  This should also let us stop polling once artwork has been
found.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-22 09:40:03 -04:00
Anna Schumaker 83724c5f6f gui/artwork: Split out album art functions into a new file
I think this is cleaner, and it should make it easier to maintain this
code.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-22 09:40:03 -04:00
Anna Schumaker e24ab97545 gui/playlist: Add size information to playlist sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker 00dd72d46e core/playlist: Remove unused playlist_t enum
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker 5e9b6bc975 core/playlist: Access playlists through a string
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker 151c446635 core/playlist: Use separate queues for favorite and hidden playlists
Implements issue #6: Store playlists as queues
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:04 -04:00
Anna Schumaker db01ed3208 core/queue: Use a GQueue directly
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 08:13:10 -04:00
Anna Schumaker 4f1f76b764 gui/audio: Update album art when manually setting
If the user is fixing broken album art then we need to update the image
immediately, otherwise the user will be confused.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-14 13:36:33 -04:00
Anna Schumaker c62a88ce09 gui/audio: Add support for manually setting album art
Implements #58: Manually set album art
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-14 11:37:53 -04:00
Anna Schumaker 86b63298a5 gui/idle: Show the idle progress as a tooltip
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-04 20:07:50 -04:00
Anna Schumaker ecc7843ea5 gui: Clean up setting album art
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-30 10:28:17 -04:00
Anna Schumaker dd66b10dfa gui: Properly load a pixbuf
Using gdk_pixbuf_new_from_file_at_scale() will load a scaled pixbuf,
which looks better than loading a height x height square.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-30 10:28:17 -04:00
Anna Schumaker cbb9631877 gui: Add a function for determining the height of widgets
It's eaiser to do it in the builder code, rather than repeating this
code in several places.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-30 08:18:11 -04:00
Anna Schumaker 54af68a57f gui/audio: Add album art support
Also add the "o_cover" widget to the glade file for setting album art.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker 97c8f80393 core/idle: Add a way to reschedule idle tasks
This will be needed to reschedule MusicBrainz requests if the server is
busy.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker 6b52775e58 core/idle: Add support for running idle tasks in a new thread
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker 6a44f9e1a1 core/idle: Add idle_sync_t enum
I intend to use this to select between sync and async idle tasks.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker 9e0f017e61 core/file: Build in minimum version checks
I don't think it makes sense that callers of file_open() are expected to
check the file version after opening.  This should be something handled
by the file code so we can print a consistent error message.

Implements issue #5: Better file versioning
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker bc513532c1 gui/idle: Add a function to disable processing idle tasks
This is needed during ocarina shutdown to prevent a segfault.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:09:39 -04:00
Anna Schumaker fff2da5439 gui/ocarina: Deinitialize gui with the GtkApplication "shutdown" signal
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:09:38 -04:00
Anna Schumaker d0179a9bfa gui/ocarina: Initialize gui with the GtkApplication "startup" signal
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:09:34 -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 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 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 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 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 b59b2a2daf gui/audio: Remove old pause after configuration code
And rearrange UI widgets a bit

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 12:03:53 -04:00
Anna Schumaker bf73685098 gui/audio: Add new GtkComboBox for controlling automatic pausing
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 11:55:46 -04:00
Anna Schumaker ada392550a gui: Switch over to using a GuiQueueModel
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:37:24 -04:00
Anna Schumaker ea149d57df gui/model: Convert iters and paths into tracks
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:37:17 -04:00
Anna Schumaker 87e547d85d gui: Wire up gui_queue functions to various tabs
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:37:11 -04:00
Anna Schumaker e8681e4c92 gui/queue: Add functions to update the model
These are simple passthrough functions to convert a struct queue into a
GuiQueueModel.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:37:03 -04:00
Anna Schumaker 70803cc199 gui/queue: Create a GuiQueueModel as part of the gui_queue
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:56 -04:00
Anna Schumaker 4fd370ceb6 gui/model: Send tree model signals
"row-inserted", "row-deleted", and "row-changed"

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:50 -04:00
Anna Schumaker dd2adc6307 gui/model: Add support for gtk_tree_model_iter_parent()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:43 -04:00
Anna Schumaker ccf6e4c61f gui/model: Add support for gtk_tree_model_iter_nth_child()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:36 -04:00
Anna Schumaker ba59d6bd29 gui/model: Add support for gtk_tree_model_iter_n_children()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:30 -04:00
Anna Schumaker 13223427c1 gui/model: Add support for gtk_tree_model_iter_has_children()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:23 -04:00
Anna Schumaker b34fd6d522 gui/model: Add support for gtk_tree_model_iter_children()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:16 -04:00
Anna Schumaker ed69e3d2b8 gui/model: Add support for gtk_tree_model_iter_next()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:09 -04:00
Anna Schumaker e59617ffa7 gui/model: Add support for gtk_tree_model_get_value()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:36:03 -04:00
Anna Schumaker 9c3adf2b09 gui/model: Add support for gtk_tree_model_get_path()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:56 -04:00
Anna Schumaker eb481b8d09 gui/model: Add support for gtk_tree_model_get_iter()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:50 -04:00
Anna Schumaker ff81af24fc gui/model: Add support for gtk_tree_model_get_column_type()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:40 -04:00
Anna Schumaker 6acee801ab gui/model: Add support for gtk_tree_model_get_n_columns()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:33 -04:00
Anna Schumaker f5fba1680a gui/model: Add support for gtk_tree_model_get_flags()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:27 -04:00
Anna Schumaker ddcb973d8e gui/model: Begin new custom tree model for queues
I'm not even going to try converting my C++ code.  Let's just start
fresh, and write unit tests as we build this up.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:20 -04:00
Anna Schumaker a313160f94 gui: Put file chooser and notebook onto a stack
The eventual goal is to replace the notebook, but this is a good start.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:14 -04:00
Anna Schumaker 21eb09ced3 gui: Remove old TabToolbar code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:08 -04:00
Anna Schumaker bc9efade75 gui/queue: Add a switch to enable and disable tempqueues
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:01 -04:00
Anna Schumaker d19e0b2cc0 gui/queue: Add a search entry widget
This gets cleared every time the queue is changed and disabled when we
show pages that cannot be filtered.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:34:55 -04:00
Anna Schumaker 24f53d88b6 gui/queue: Respond to toggling the random and repeat buttons
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:34:48 -04:00
Anna Schumaker ddbc040a3b gui/queue: Set state of random and repeat buttons
I need to change the state of these toggle buttons whenever the
sidebar's current selection changes.  Some gtk themes have trouble
showing the state of toggle buttons, so I change the sensitivity of both
the button and associated image so users know the current state.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:34:40 -04:00
Anna Schumaker 410a784ede gui/queue: Add flags to the gui queue
This will be used to determine if the random and random buttons should
be enabled.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker ce8ec63886 gui/sidebar: Switch over to using the new gui queues
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker f098811a28 gui: Wire up gui_queue_{alloc|free}() in the queue operations
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 2d6e42832b gui/queue: Add a text field to the gui queue
The sidebar is going to look at this when setting queue sizes.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker f85ad3a9c3 gui/queue: Add a new gui_queue struct
This will be used to store queue state once I no longer support notebook
tabs.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 5bc9f65cd9 core/tempq: Add tempq_index() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 2770403c61 core/tempq: Add tempq ops to queues durinig init
Rather than setting them after.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 5419711409 core/queue: Add qop_deinit() queue operation
This function is used to notify a higher layer that a queue is being
deinitialized.  The higher layer should then clean up any state
associated with that queue.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 8bb7a20ff4 core/queue: Add qop_init() queue operation
This function is used to notify a higher layer that a queue has been
initialized.  That higher layer can return a pointer to be attached to
the "private data" field of the queue.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-13 16:36:44 -04:00
Anna Schumaker 25211e93ac gui/collection: Convert checkbox into a right click menu
This feature isn't used very often, and keeping the checkbox in the
sidebar looks pretty ugly.

Fixes #50: Remove Collection checkbox
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-05 08:27:10 -04:00
Anna Schumaker d2c4a36945 gui/collection: Add icon to library paths
I'm surprised this wasn't already there.  I think the "folder" icon
works best, considering library paths are directories in the filesystem.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-04 16:51:52 -04:00
Anna Schumaker 02f5b13650 gui/collection: Remove image size from the collection liststore
This is to match the playlist treeview.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-02 11:18:35 -04:00
Anna Schumaker 79f79405a8 gui/playlist: Remove image size from the playlist liststore
It's easier just to set all images to have the same size, rather than
making the header's image slightly larger.

Fixes #39: Remove GtkIconSize from Playlist treeview
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 14:58:40 -04:00
Anna Schumaker b4c81a4441 gui/playlist: Change "Banned" to "Hidden" in the sidebar
I also update the icon to match what is on the "Hide Track" button.

Fixes #49: Hidden playlist still says "Banned" in sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 14:42:02 -04:00
Anna Schumaker 16b055f06b gui/sidebar: Add support for removing temporary queues
Either through the delete key or when the queue runs out of tracks.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 839f4c4aa1 gui/sidebar: Add support for adding temporary queues
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker c663f287d4 gui/sidebar: Add sizes to Collection and History entries
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker eb137c4339 gui/sidebar: Change notebook page through the sidebar
And make sure other sidebar views are deselected.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 6c653c6a79 gui/sidebar: Add Collection and History entries to the sidebar
I could do this as a treeview, but creating this as a liststore in glade
is WAY easier!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 84ff59cf81 gui/playlist_tab: Remove custom list from tab
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 9ee00f9997 gui/sidebar: Add a function for deselecting treeviews
I'm using multiple treeviews, but only one should be selected at any
time.  Use this function to coordinate that.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 7439a2a73d gui/playlist: Change current playlist when selected
I also add a function to get the currently selected playlist.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker fde59a1868 gui/playlist: Add 5 playlists to the sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker be6895630d gui/playlist: Begin new playlist sidebar widget
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker ca88bca999 gui: Rename playlist.cpp -> playlist_tab.cpp
I will soon have playlist.c to control the playlist sidebar widgets.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 3c3f11b958 gui/collection: Remove old collection manager code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 8807f06fd6 gui/collection: Update collection on startup
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 2cae2cd525 gui/collection: Remove library paths with the Delete key
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 0afe46b5df gui/collection: Toggle library state through the gui
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 8dece02eed gui/collection: Update library paths when rows are clicked
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 2f9ee44000 gui/collection: Add library paths on startup
And change to them when selected.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker f34e2cb57b gui/collection: Change tab page when "Add new Path" is selected
I also add in code that reuses the current file chooser for picking
paths.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker eb81fa2e20 gui/collection: Add sidebar widget showing Collection header
And make it non-selectable.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 480090f78d gui: Rename collection.cpp -> collection_tab.cpp
I want to create a new file (collection.c) for the collection sidebar
code.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 58d61f52e2 gui/sidebar: Add new sidebar widget
This is a GtkPaned that remembers its size between Ocarina sessions.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 870a2b769b gui/window: Save width and height between sessions
Saving maximized state is too complicated, so let's just store width and
height of the window when it is not maximized.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 0c214dd1a9 gui/window: Add gui_window_deinit()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 684d52c522 gui/window: Convert file to C
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 0c8bcfa552 gui/window: Switch to C-style gtk widgets
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker 066d27a240 gui/window: Move keyboard shortcut handling into tabs.cpp
I handle the Escape key through gtkbuilder, so let's move the
tab-changing keys into the tabs source file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-29 13:04:45 -04:00
Anna Schumaker c01561831c gui/audio: Remove "By:" and "From:"
I replaced these with images that have similar meanings.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-25 11:38:20 -04:00
Anna Schumaker 6aa64f0bc1 gui/audio: Block accelerators when a gtk entry is focused
Otherwise pressing the spacebar while searching could toggle the play /
pause status.

Fixes #36: Button accelerators always triggered
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-12 11:25:49 -04:00
Anna Schumaker 2097f63f3d gui: Update playlists to say Hidden instead of Banned
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-11 15:34:21 -04:00
Anna Schumaker 627619c391 gui/audio: Convert o_progress widget to use seconds
This feels better than using units of nanoseconds.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:39:43 -04:00