Commit Graph

3629 Commits

Author SHA1 Message Date
Anna Schumaker 2431ad104e Ocarina 6.5.1-rc
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 1c386809d0 gui/treeview: Respond to the notify::width signal
I connect this in code so I can pass the column index as data to the
function, avoding the need for a "column index" lookup function.

I restore saved column widths during startup.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker dbc1df154a gui/treeview: Add a row-activated signal handler
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 730395aeff gui/treeview: Add a function for scrolling the treeview
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 9e37062920 gui/treeview: Sort treeview when columns are clicked
I decided to manually connect signals this time so I can pass sort
information instead of needing to look up the column index.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker df43010766 gui/treeview: Add an init function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker c49b77a24a gui/treeview: Add a function for accessing the treeview
And rename the widget from "o_treeview" to just "treeview".

I wanted to rename gui/view.c to gui/treeview.c at some point.  I
decided to gradually rework things into a new file to make it easier to
track progress.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 3fc19275f3 gui/filter: Add a function for loading a track from a tree path
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker ac3c316d9a gui/filter: Add a function for getting filter treepaths from index
This keeps the treepath conversions contained to the filter code when
finding paths to scroll to.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 32d712c213 gui/filter: Remember search text when switching playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 39d87f98f8 gui/filter: Move playlist filtering into filter.c
Implements #75: Move treeview filter to a new layer
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker b9916706f1 gui/filter: Add functions for getting the SearchEntry and ComboBox
And take this chance to rename o_search -> filter_search.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker ad29c520d4 gui/filter: Add a function for converting filter paths to indexes
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker f550d45811 gui/filter: Add a function for converting GtkTreePaths into tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 6325779062 gui/filter: Create a new file for treeview filter code
Right now filtering is split between queue.c and view.c, which can make
things somewhat complicated.  I think this is a sign that we need a new
file to manage filtering.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 27a1e2e12a gui/model: Add a function for accessing the runtime label
And rename the widget from "o_runtime" to just "runtime"

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 619ea0b559 gui/model: Use queue positions instead of queue iterator
This helps simplify the code, since we can reuse
gui_model_iter_nth_child() here.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 010969c7b3 gui/model: Convert set_queue() -> set_playlist()
Ocarina is moving in a playlist oriented direction, so move away from
using the queue directly in favor of using the playlist.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker 82da46365f gui/model: Register the GuiModel type during gui_model_init()
This only needs to happen once, so let's do it when we initialize the
model rather than waiting for the first allocation.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker e522475d38 gui/model: Various cleanups to code and test
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:23 -04:00
Anna Schumaker cdbe96c575 gui/model: Rename "Queue Model" to "Gui Model"
This is going to represent a playlist soon enough, so let's just name it
something more generic in case it ever has to change again.

Implements #87: Rename GuiQueueModel -> GuiModel
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-11-01 08:51:07 -04:00
Anna Schumaker 453f176d63 gui/idle: Rename widget to "progress_bar"
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:56:38 -04:00
Anna Schumaker 3383f9e32a gui/idle: Add a function for getting the progress bar
And add in various cleanups while we're at it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:55:40 -04:00
Anna Schumaker f9238c34e4 tests/gui: Add a generic way to run a main loop
I've had to code this in several places, so creating a generic function
is long overdue.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:55:23 -04:00
Anna Schumaker 90b80fc8a7 gui/window: Rename widget to "window"
Drop the "o_" prefix since it doesn't really add anything.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:44:34 -04:00
Anna Schumaker 133efc0515 gui/window: Add a function for getting the window
This is cleaner and easier than calling into the gtk builder directly.
I bumped up the window layer so other gui components can use it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:44:34 -04:00
Anna Schumaker 85bb67feed core/playlist: Add a private field to struct playlist
I intend to use this for playlist filtering to store filter text.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:44:34 -04:00
Anna Schumaker e7b4973a50 core/playlist: Add playlist_get() function
This is called to get the requested playlist.  I also reworked
playlist_get_queue() to call this function.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:44:34 -04:00
Anna Schumaker 7d0dbcbdc7 gui/view: Replace gtk_menu_popup() with gtk_menu_popup_at_pointer()
The function gtk_menu_popup() is deprecated as of Gtk 3.22, so replace
it with the simplified popup_at_pointer() function.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-31 07:44:34 -04:00
Anna Schumaker a89dc49609 Ocarina 6.5
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-29 17:35:26 -04:00
Anna Schumaker 34f21bf247 Update PKGBUILD
We build with CMake now, so update the PKGBUILD script to match.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-29 17:23:59 -04:00
Anna Schumaker 63951568af Replace README with README.md
The new file is written in the Gitlab markdown language.  I also update
the content to match how things are done now that we use CMake.

Implements #85: Update README
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-29 17:17:46 -04:00
Anna Schumaker be3b788380 core/playlists/system: Don't read 6.4.x playlists in new idle tasks
Track database defragmenting can happen before the new tasks are ever
scheduled, causing a crash when we try to find tracks with changed IDs.
After the crash, the Favorites and Hidden playlist data appears to be
lost.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-21 11:31:11 -04:00
Anna Schumaker 9df093ec85 tests/gui: Fix gtk css theme parsing errors
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-19 08:22:58 -04:00
Anna Schumaker 50207c5b79 core/playlist: Don't reselect the current playlist
We want playback to continue after the queued tracks playlist has run
out.  Allowing us to select the same playlist multiple times can cause
us to get stuck picking the next track.

Fixes #100: Finishing "Queued Tracks" playlist shouldn't stop playback
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-19 07:58:10 -04:00
Anna Schumaker 01927cf806 gui/model: Don't add tracks if queue_model is NULL
Otherwise we will crash with a memory error.  This only seems to be a
problem when Ocarina is started up after creating a user playlist.

Fixes #99: Ocarina crashes during startup with user playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-10-17 08:03:57 -04:00
Anna Schumaker 59b2c854e7 Add a valgrind suppression file
I generated this file while hunting memory leaks and errors in core/

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 14:51:23 -04:00
Anna Schumaker e4e90f165e tests/core/audio: Process idle queue on EOS
Otherwise idle tasks will register as memory leaks.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 14:50:36 -04:00
Anna Schumaker 4250757b83 core/playlists: Don't leak playlist names while loading
We need to free the playlist name after looking up in case we hit the
case where the playlist isn't found.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 14:50:36 -04:00
Anna Schumaker cb2af114c5 core/playlists/user: Free playlist name during deinit
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 12:44:17 -04:00
Anna Schumaker b4d78b0d3d core/playlists/library: Free scan path when we're done with it
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 12:44:17 -04:00
Anna Schumaker d5de8e5dbf tests/core/queue: Deinitialize queues after testing
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 12:44:17 -04:00
Anna Schumaker 6120366da3 core/tags/album: __album_query_artist() needs to initialize "found"
Otherwise we could end up checking this variable uninitialized.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-29 12:44:17 -04:00
Anna Schumaker eb16d9c6fb tests/core/tags/album: Deinitialize genre after testing
Otherwise valgrind will report that we are leaking memory.
Additionally, only initialize the idle queue for sync idle tasks until
album artwork needs it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 16:53:20 -04:00
Anna Schumaker 1d7cfa0e6d tests/core/tags: Don't call *_db_init() twice in unit tests
This could lead to a false-positive when looking for memory leaks.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 15:55:32 -04:00
Anna Schumaker 99faa0cf39 tests: g_assert_cmpstr_free() stores the lhs in a temporary variable
Valgrind told me that all calls to g_assert_cmpstr_free() weren't
actually freeing the string.  A closer look shows that if we pass a
function as "lhs" then the function will be called twice, allocating
twice as much memory.

Fix this by storing the result of lhs in a temporary variable so
functions are only ever called once.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 15:20:24 -04:00
Anna Schumaker 0407486316 tests: Rename CONFIG_TESTING_ALBUM_ARTWORK to CONFIG_TESTING_ARTWORK
This makes the flag a little easier to toggle for testing.  I also
rename the compiler option for consistency.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 15:20:19 -04:00
Anna Schumaker 9a216fee1e gui/queue: Remove unused GQ_CAN_REPEAT and GQ_CAN_DISABLE flags
These go unused as a result of our recent playlist changes, so we can
remove them now.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 10:04:28 -04:00
Anna Schumaker ae916eaf40 gui/queue: No need to change random image sensitivity
GtkThemes should be taking care of this indicator for us.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 10:00:25 -04:00
Anna Schumaker 9d279fe21e gui/playlist: Don't show Collection on startup
__gui_playlist_init_idle() will select the first visible playlist by
default, which is what we want.  Let's not override this by showing the
Collection later in this function.

Fixes #95: Startup shows Collection instead of Queued Tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 09:33:27 -04:00