Anna Schumaker
a9ec9aa7f2
Ocarina 6.4.2
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-08 15:04:50 -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
7e306de007
Update Sconstruct for 6.4.2-rc
...
I probably should have tagged this commit, but oh well.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-06 10:26:21 -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
507ac4602d
core/index: Replace index_entry constructor with backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
b28b0c8464
core/database: Add C-style initializer macro
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
877d9ac1d7
core/database: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
8dfe818a7a
core/database: Replace constructors with a backwards pointer
...
This lets me use the struct db_entry without needing an inheritance
system.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
4a4529b158
core/database: Replace std::map with a glib hash table
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
9dd9d7d8f7
core/database: Replace std::vector with a glib array
...
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
f51852f62e
core/database: Introduce the dbe_write() database operation
...
For writing database entries to disk.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
2da33f1c75
core/database: Introduce the dbe_read() database operation
...
This function allocates and returns a new database entry using
information read from a file.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
c77ca65630
core/database: Introduce the dbe_setup() database operation
...
Track tags need to add themselves to the filter index and update the
library track count once added to the database.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
c8021639ba
core/database: Introduce the dbe_free() database operation
...
The Track tag needs to do some cleanup when removed from a database, so
we need to use this op when removing items.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
049156a523
core/database: Introduce the dbe_alloc() database operation
...
For allocating new database items from a given key. Tracks do not need
this function since we have special handling for creation and insertion.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
ab1572ed34
core/database: Add operations vector
...
I intend to replace C++ inheritance with this struct of function
pointers.
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
3eb27debfb
core/database: Convert DatabaseEntry class into a struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
1c0235c8c7
core/tags/generic: Remove Generic tag
...
Nothing uses it anymore, so it can be safely removed :)
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
cfd501c5d6
core/tags/track: Rewrite unit test
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:47:22 -05:00
Anna Schumaker
18311afcfe
core/tests: Write a script to generate empty albums
...
gen_tracks.sh will read a specially configured file and create a
directory containing empty tracks to use for testing.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:46:35 -05:00
Anna Schumaker
92806c5201
core/tags/track: Clean up constructors
...
I replace the standard and copy constructors with one that tags a track
during construction. This lets me clean up a lot of code, and keep
tagging functions internal to the track class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -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
c634f5d5e2
core/tags/track: Move track_played() out of the track struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
fb4933e418
core/tags/track: Remove track::compare_date()
...
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
192bdc3ac7
core/tags/track: Replace tags :: track_size() with track_db_get()
...
We want to loop over the track database in several places, so let's make
this easier by just returning the database itself.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
eea0f57cf8
core/tags/track: Move track_commit_db() out of tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
d3bdcf2edc
core/tags/track: Move track_db_init() out of the tags namespace
...
And add the functions track_db_deinit() and tags :: db_deinit().
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
d0ec3e2cac
core/tags/track: Move track_remove_all() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
7ffaf91617
core/tags/track: Move track_remove() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
83a945d3da
core/tags/track: Move track_add() out of the tags namespace
...
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
446f1228cf
core/tags/library: Add library_file() function
...
To help with finding the full path of files that are located in the
library's directory.
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
47ab4c4b17
core/tags/library: Move library_set_enabled() out of the library struct
...
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
768f86e802
core/tags/library: Move library_db_init() out of the tags namespace
...
And add the function library_db_deinit().
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
d7cff5faf4
core/tags/library: Move library_remove() out of tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
a288922b65
core/tags/library: Move library_find() out of the tags namespace
...
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
dbd4475815
core/tags/library: Rewrite unit test
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00