And make them optional, that way tests don't need to keep creating fake
callbacks if they don't need anything from the audio layer.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This keeps all the audio operations together, and matches how we define
operations structs throughout the rest of Ocarina.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This code is obsolete now that gui/playlist.c handles keypress and
right-click events on the main treeview.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise we may try to use the gstreamer playbin after destroying it,
leading to various error messages showing up in the console.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>