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
Anna Schumaker
5e96f40cf8
gui/audio: Unit test can simulate button presses
...
This is better than calling audio_*() functions directly, since we can
make sure signals are wired up properly in glade.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:39:39 -04:00
Anna Schumaker
d8754e9a45
gui/audio: Control keyboard shortcuts from GtkBuilder
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:30 -04:00
Anna Schumaker
f95a6d02ed
gui/audio: Redesign some of the interface
...
I moved the location of buttons and text boxes, and also resized some of
the widgets.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:27 -04:00
Anna Schumaker
286085d248
gui/audio: Configure pause-after-N through glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:25 -04:00
Anna Schumaker
2d45e9e5c4
gui/audio: Pass the progress bar to __audio_timeout
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:24 -04:00
Anna Schumaker
36b8b29b0b
gui/audio: Add __audio prefix to internal functions
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:22 -04:00
Anna Schumaker
e5e2c87a86
gui/audio: Define seek controls completely in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:20 -04:00
Anna Schumaker
50a7c83d61
gui/audio: Convert gst.cpp to audio.c
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:16:10 -04:00
Anna Schumaker
c48e128d0a
gui/gst: Configure timeout with the C interface
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:12:36 -04:00
Anna Schumaker
5368208a37
gui/gst: Remove gst :: pre_init() and rename gst_init()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 13:12:19 -04:00
Anna Schumaker
dee8b948b0
gui/gst: Remove gst :: toggle()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
bf39724a40
gui/gst: Set ban and favorite buttons through the C interface
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
71c4e6a1aa
gui/gst: Completely define the positon and duration labels in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
15da6b4249
gui/gst: Completely define title, artist, and album widgets in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
aacc1f876a
gui/gst: Completely define the play button in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
6723ef88c7
gui/gst: Completely define the pause button in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
8ae31ed483
gui/gst: Completely define the stop button in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
00899873bd
gui/gst: Completely define the previous button in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
6680cdbd0e
gui/gst: Completely define the next button in glade
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
f31a67f644
gui/gst: Use C-style gtk widgets
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
44d7f9a853
core/gst: Set ban / favorite status when tracks are loaded
...
It's easier to do this from the audio code than the plalist code.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
61436d5ccd
gui: Switch over to the new gui_builder system
...
Glib::wrap() all the things!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
0eb8521094
gui/builder: Get a widget from the GTK builder
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
d4b27316c0
gui/builder: Get an object from the builder
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
961659bc66
gui/builder: Add a test UI file
...
This file creates a button that calls the test_builder_activated()
function when clicked.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
3bc5b1db9e
gui/builder: Add new file for accessing the GtkBuilder
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
27e09f47a6
gui/ocarina: Initialize settings on startup
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
c479042a86
gui/settings: Add gui_settings_has() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
d292879837
gui/settings: Read settings file on startup
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
a5f0da7a60
gui/settings: Store settings when changed
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
92c1b64b1a
gui/settings: Add functions for setting and getting values
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
f23fb9e0f5
gui/settings: Add new settings file
...
The settings layer will track various configuration options set by the
user. This belongs in the gui, and not core, because it controls
settings specific to this gui implementation.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-04-08 12:03:08 -04:00
Anna Schumaker
ece432bb22
core/audio: audio_{load, next, prev}() should start playback
...
The GUI needed an extra function to do this manually, which means it's
something that core should do instead.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
0cf5187867
core/audio: Add on_state_change() audio operation
...
Called to notify when playback state has changed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
2586348921
core/audio: Convert file to C
...
I also convert core/core.c so the audio test can be converted at the
same time.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
a59a71eb38
core/core: Move core_deinit() out of the core namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
04291f4296
core/core: Move core_init() out of the core namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
03196c3efa
core/audio: Set up the gstreamer bus for the gui
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
a5556ac10a
core/audio: Move audio_eos() out of the AudioDriver
...
This change lets me remove the AudioDriver, too.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
276c56406a
core/audio: Move audio_pause_after() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
d18d3dd214
core/audio: Move audio_prev() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
3f25369444
core/audio: Move audio_next() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
2511db3a08
core/audio: Add audio_cur_state() function
...
This replaces the is_playing() function of the AudioDriver class. I can
also make the GUIs GstDriver static.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
0a1a9f1394
core/audio: Move audio_cur_track() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
d1d722a163
core/audio: Move audio_stop() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
e1abe94b28
core/audio: Move audio_duration() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
20bb01ef4e
core/audio: Move audio_position() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
566ef3bb50
core/audio: Move audio_seek() out of the audio namespace
2016-03-28 08:01:30 -04:00
Anna Schumaker
9097bd0ffc
core/audio: Move audio_pause() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:29 -04:00
Anna Schumaker
16c4c23a42
core/audio: Move audio_play() out of the audio namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:29 -04:00
Anna Schumaker
e5c3d8f02e
core/audio: Move audio_load() out of the audio namespace
...
And add the on_load() audio operation.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:29 -04:00
Anna Schumaker
e0c89556ed
core/audio: Add audio_deinit() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:29 -04:00
Anna Schumaker
d9540b29d6
core/audio: Move audio_init() out of the audio namespace
...
I also move the gstreamer playbin back into core/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:29 -04:00
Anna Schumaker
6358124ce8
gui: Check the return code from collection_check_library()
...
If the library isn't valid, then we shouldn't try to pick another track
until the user fixes things.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-23 09:58:17 -04:00
Anna Schumaker
08bf842767
gui: Don't update gui if zero tracks were cleared
...
I'm seeing Ocarina crash when a tempq finishes and gets removed. For
now, let's only have the gui handle queue clearing if tracks were
actually removed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-22 16:04:25 -04:00
Anna Schumaker
76985c8842
gui: Fix setting Q_RANDOM flag
...
I had the condition reversed for enabling random on temporary queues, so
the flag was getting set whenever I didn't want it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-22 09:36:32 -04:00
Anna Schumaker
5979d1dcaf
core/collection: Handle -EIO errors coming from the filesystem
...
One of my disks frequently returns this error, and has wiped out my
track database on more than one occasion. Let's handle this error by
disabling the library until the user tells us it is safe to use again.
Fixes #33 : Handle music directories disappearing better
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-21 08:36:48 -04:00
Anna Schumaker
2dd4f93bd0
gui: Don't call tempq_save() in the qop_cleared() handler
...
The first thing queue_deinit() does is clear the queue, so calling
tempq_save() here will overwrite any tempq state currently on disk.
This seems reasonable at first, but ends up erasing any temporary queues
during Ocarina shutdown.
Fixes #34 : Temporary queues not saving
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-17 12:17:11 -04:00
Anna Schumaker
882ee6e1e7
core/tempq: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
2102b1bfc9
core/tempq: Move tempq_save() out of the deck namespace
...
And remove the deck :: write() and TempQueue :: write() functions while
we're at it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
b3d95a06d4
core/tempq: Move tempq_next() out of the deck namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
ecda136015
core/tempq: Move tempq_move() out of the deck namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
c22b93b2cf
core/tempq: Move tempq_get() out of the deck namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
06d62240bb
core/tempq: Move tempq_free() out of the deck namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
bce2ba33f7
core/tempq: Move tempq_alloc() out of the deck namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
77d4815eb6
core/history: Move history queue into a new file
...
I think managing this separately from temporary queues will make the
code simpler.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-11 10:40:34 -05:00
Anna Schumaker
b191a7f22c
gui/ocarina: Deinitialize core first
...
This fixes a segfault I was getting when closing ocarina before the
directory scan finishes.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-09 09:59:06 -05:00
Anna Schumaker
8c8ab2a9eb
core/idle: Add idle_cancel() function
...
This function is used to cancel all idle tasks and free the memory
allocated for them. This needs to be called when Ocarina is shutting
down to prevent a possible hang with the gtk idle callback continuing to
process tasks.
Fixes #30 : Closing Ocarina should cancel idle tasks
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-01 08:27:13 -05:00
Anna Schumaker
b3592e40c0
core/playlist: Rename PL_BANNED -> PL_HIDDEN
...
"Banning" a track is a bit harsh. Let's talking about hiding tracks
instead, so that it sounds friendlier.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-29 13:22:31 -05:00
Anna Schumaker
fef3ef3353
core: Initialize the playlist before the collection
...
I think it makes more sense to have the collection manage if banned
tracks are displayed or not, rather than doing this from the playlist
layer.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
20825613e9
core/playlist: playlist_add() can return a boolean
...
There is at least one place in the gui where it needs to know if a track
was actually added to a playlist. Adding a return value is the best way
to know what happened.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
02c82c182e
core/playlist: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
b7a4bb3872
core/playlist: Use playlist_t enum to access playlists
...
Using strings is pretty tedious, so let's restrict restrict playlist
access to known values.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
88f6fc526c
core/playlist: Add a function to remove banned tracks
...
This replaces the get_tracks() function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
4e6028cf6e
core/playlist: Move playlist_remove() out of the playlist namespace
...
I also remove redundant unit tests.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
0e3d6251d3
core/playlist: Move playlist_add() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
82ed2f2dc0
core/playlist: Move playlist_get_queue() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
6f0b95608a
core/playlist: Move playlist_select() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
1d3a762936
core/playlist: Move playlist_has() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
219f8fa119
core/collection: Update collection on startup
...
This is much more convenient to users, since they don't need to update
the collection manually.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-23 07:55:56 -05:00
Anna Schumaker
7065b6312e
core/collection: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:47:16 -05:00
Anna Schumaker
f413d14720
core/collection: Move collection_save() out of the collection namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
295a4424ed
core/collection: Move collection_get_queue() out of the collection
...
namespace
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
62f0606cd6
core/collection: move collection_set_enabled() out of the collection
...
namespace
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
8a1f5403d0
core/collection: Move collection_update() out of the collection namespace
...
And bring collection_update_all() along with it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
0cb16f5c64
core/collection: Move collection_remove() out of the collection
...
namespace
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
6e39e17060
core/collection: Move collection_add() out of the collection namespace
...
This patch breaks later tests, since I needed to remove the old ogg
files. This will be fixed in a few more patches.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:37:26 -05:00
Anna Schumaker
e47540a84e
core/queue: Add queue_clear()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 10:12:09 -05:00
Anna Schumaker
6a8e73375e
gui/collection: Check for collection_q in on_track_removed()
...
So we don't segfault while removing banned tracks.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
0a331a44f5
core/queue: Replace on_track_updated() with qop_updated()
...
This patch also removes the now-unused queue notifier class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
da0c96ac51
core/queue: Replace on_track_removed() with qop_removed()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
df06b444cf
core/queue: Replace on_track_added() with qop_added()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
acc78a6667
core/queue: Move queue_remove_all() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
ea00b406e5
core/queue: Move queue_remove() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
8fe85b9782
core/queue: Move queue_add() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
4c4d0ab6ce
core/queue: Move queue_sort() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
13723856fc
core/queue: Move queue_{set|unset}_flag() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
be5d028fcf
core/deck: Wire up the qop_save() function
...
So temporary queues can save when flags change or when sorted.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
9451a41ff1
core/collection: Wire up the qop_save() operation
...
This will be triggered both when queue flags are changed and when the
queue is sorted.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
ce55ef2421
core/queue: Add queue operations vector
...
And a function to help with saving queues. This patch also adds the
Q_SAVE_FLAGS and Q_SAVE_SORT queue flags to control if the queue should
be saved when flags are changed or when the queue is sorted.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
b3a8fa293b
core/queue: Move queue_has_flag() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
ff0c2a09a8
core/queue: Move queue_at() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
c259177dde
core/queue: Move queue_size() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
6bd625f65b
core/queue: Move queue_selected() out of the queue struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
d6ae61d915
core/queue: Remove queue :: set_notifier()
...
Let's just set the q_notify variable directly, rather than going through
a function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
a721a95604
core/queue: Remove queue :: length()
...
Let's just access the q_length variable directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
281947aded
core/queue: Convert from class to struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
08c7323dfc
core/tags/track: Move comparison fields into track.h
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
58a983efd1
core/containers: Move index into the containers/ directory
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
c34f0c160d
core/containers: Move database into the containers/ directory
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
ad5726b542
core: Add core :: deinit() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
b5caf6faed
core/tags/track: Convert std::string to gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
9e3e3e514c
core/tags/track: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
5cc4efb6ac
core/tags/library: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
6c3d708576
core/tags/genre: Replace std::string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
c07d1e9024
core/tags/artist: Replace std:string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
ad48d24533
core/tags/album: Replace std::string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
ab837b1a18
core/idle: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
8e25c4d89e
core/idle: Move idle_run_task() out of the idle queue
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
f17a19fe57
core/idle: Move idle_progress() out of the idle namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
cfd8ca8d43
core/filter: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
f2664aa8f2
core/filter: Move filter_search() out of the filter namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
8e02001373
gui/queue: Stop space bar from selecting new tracks
...
From Josh: Single-clicking a track in the collection queue and pressing the
space bar loads the selected track, but users would expect this to
toggle the play / pause state instead.
The solution is to watch for the on_key_press signal and tell GTK that
we have handled it if we see that the space bar was pressed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-06 10:27:28 -05:00
Anna Schumaker
55a688cdcc
core/index: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
1c22ecfda4
core/database: De-templatize the database
...
We now have an interface for controlling everything through struct
db_entry, so let's just have the database store a db_entry directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
1bef380ba7
core/database: Introduce the dbe_key() database operation
...
And store the result in the db_entry struct for use later.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
847e4c1925
core/database: Remove db_entry::index() function
...
Let's just access the dbe_index variable directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
33e20989fa
core/tags/track: Directly inherit from DatabaseEntry
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
ee71786c09
core/tags/track: Move track_last_play() out of the track struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
90cdfd4cbd
core/tags/track: Move track_path() out of the track struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
24d5c37a6c
core/tags/track: Remove variable accessor functions
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
9c1cbbf8cb
core/tags/track: Remove tag accessor functions
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
c8061e2868
core/tags/track: Move track_get() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
765079df94
core/tags/track: Convert Track class into a struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
24504c7de8
core/tags/library: Remove library size() and {inc|dec}_size() functions
...
We can just access this variable directly instead.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
ac2b4ad52c
core/tags/library: Remove library enabled() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
f41235e5b2
core/tags/library: Replace tags :: library_size() with library_db_get()
...
It's easier to just pass off the library database rather than forcing
higher layers to iterate over the entire thing (including possible
invalid entries).
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
e1093f7eab
core/tags/library: Move library_get() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
ffa5e65ba7
core/tags/library: Convert Library class to a struct
...
I also have to replace the "library" namespace with the "collection"
namespace to avoid naming collisions.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
cc3becd566
core/tags/genre: Directly inherit from DatabaseEntry
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
fe3d7867d1
core/tags/artist: Directly inherit from DatabaseEntry
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
e5b0047812
core/tags/album: Directly inherit from DatabaseEntry
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
a7746cf901
core/tags/album: Remove album::year() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
45207ebd2e
core/index: Replace index_entry iterators with struct set_iter
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
a91326551f
core/index: Convert IndexEntry class to a struct
...
In addition, I added the prefix "ie_" to all member names.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
60678d1ddb
core/string: Convert file to C
...
And convert the unit test while we're at it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:56:19 -04:00
Anna Schumaker
83fe822dc7
core/string: Move sec2str_detailed() out of "string" namespace
...
I also take the opportunity to rename the function to
string_sec2str_long().
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:46:30 -04:00
Anna Schumaker
a314ee03ca
core/string: Move sec2str() out of "string" namespace
...
And I replace it with a simple call to g_strdup_printf() that does the
exact same thing. Note that callers are now required to free the
returned string with g_free().
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:33:50 -04:00
Anna Schumaker
82d1da491b
core/string: Remove string :: utos()
...
I replace it with calls to g_strdup_printf(). This has the additional
benefit that I can do uint conversions at the same time as other
formatting options, so this seems like a win. The only downside is that
I have to manually free the memory that glib allocates, but that's easy
enough.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:31:28 -04:00
Anna Schumaker
1d0f392835
gui: Give tab labels a set_size() function
...
This lets them set themselves whenever values change. Additionally, I
update the Tab class to take a QueueLabel instead of the "size label"
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
2c45cf3972
gui: Remove tab_finish_init()
...
It is no longer needed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
9ddae1275f
gui: Set up QueueWindow from a single place
...
I can't pack it directly into the tab_vbox because playlists need a way
to pack in their special window.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
d0212d47aa
gui: Create QueueToolbar from a single place
...
Derived classes should already have this available to configure as they
see fit.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
319838138a
gui: Set up tab builder from a single place
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
682dca2339
gui: Set up each tab page vbox from a single place
...
This is better than having the same code in 4 places.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
c9ca2604ee
gui: Move on_row_activated() into the QueueWindow
...
And out of the Tab class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
83414ca3ad
gui: Trigger refiltering from the QueueToolbar
...
I also modify the QueueWindow to do the actual filtering.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00