Commit Graph

39 Commits

Author SHA1 Message Date
Anna Schumaker 76bf68f484 audio: Replace the old Controls widget with AudioControls
And grab the global Player instance during construction.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker ef1d3f0985 audio: Create a custom AudioControls widget
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker ca47bd052f audio: Create a custom MenuButton and MenuIcon
This mimics the behavior of the Gtk.MenuButton(), except it allows
updating the ToggleButton child widget with the current autopause count.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker bd49396210 audio: Create a custom ControlsPopover widget
For displaying our menu controls

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker 68f0541079 audio: Create a custom AutoPauseControlBox
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:58 -04:00
Anna Schumaker d551e0ea13 audio: Create a custom VolumeControlBox
I also create a shared base class at the same time so autopause controls
can use it as well.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:26:57 -04:00
Anna Schumaker da1211f595 audio: Add a custom AutoPauseScale widget
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:23:38 -04:00
Anna Schumaker edc3e7f876 audio: Add a custom VolumeScale widget
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:23:37 -04:00
Anna Schumaker 33c7bdf517 audio: Add a custom PlayPause button
And update the image based on the current playback state

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker ec9ed14474 audio: Create custom PreviousButton and NextButton buttons
Along with a shared base class for these buttons, and soon the
PlayPause button

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker e4f6018195 audio: Replace the old Seeker widget with a ScaleButtonbox
And make the widget separate from the audio Player

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker e4236b0bf4 audio: Create a custom ScaleButtonBox
This configures the buttons for a scale and places them into a GtkBox
widget for us to use.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker 644706ef50 audio: Add custom ScaleButtons
Thes buttons handle Increment and Decrement operations

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker 1c53886152 audio: Add a custom SeekScale widget
For handling seeks to the audio player

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:43 -04:00
Anna Schumaker 753f6477a7 audio: Create a custom ScalePlus widget
For giving GtkScales increment() and decrement() functionality that
triggers the "change-value" signal

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:15:41 -04:00
Anna Schumaker e884dc5a6e audio: Clean up the NowPlaying widget
It now uses the TrackTitle and TrackArtist labels. Additonally, I move
it out of the Player class and create a shortcut function for
instantiating one using the global Player instance

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 15:13:18 -04:00
Anna Schumaker ae7c2010e9 audio: Add a custom TrackArtist label
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 10:09:18 -04:00
Anna Schumaker 4ab66ef7ab audio: Add a custom TrackTitle label
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-31 10:04:27 -04:00
Anna Schumaker 5c2e4bb016 audio: Convert the Player into a GObject
And give it "state-changed" and "track-changed" signals.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 17:30:55 -04:00
Anna Schumaker e24999bb2f audio: Give the Player a playpause() function
This makes it easy for others to pause if playing, or play if paused

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-02 10:25:00 -04:00
Anna Schumaker 029b432dd3 audio: Check that artwork has a default path
Instead of checking the path itself. I found that the test fails if
Emmental is installed, since it's finding the artwork in
/usr/share/icons before our local path.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-31 13:15:49 -04:00
Anna Schumaker f78402f258 Rename trackdb -> tagdb
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 11:15:15 -04:00
Anna Schumaker e8f9427750 Move testing tracks into data/
And the generate_tracks.py script into tools/

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 10:57:01 -04:00
Anna Schumaker b1ece1cd1d audio: Give Players a TrackChanged publisher
The playlist model can use this to make the current track bold

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:35 -04:00
Anna Schumaker 500d0757d1 audio: Add an Artwork object to the Player
And add it to the Sidebar box while we're at it

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:35 -04:00
Anna Schumaker 16d31dfd3a audio: Create a class for showing album art
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:35 -04:00
Anna Schumaker 5633d50024 audio: Watch for EOS messages from the gstreamer bus
Mark the track as played if it has run for more than 2/3 of the running
time. Also check the "continue" field when choosing the next song from
the stack.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker a6c78f55a3 audio: Create an audio Player instance
And update the header to include its widgets

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 878102a246 audio: Add the NowPlaying widgets to the player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 4f43a3faf4 audio: Add a Seeker to the Player
And related functions needed for operation

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 7a042dd381 audio: Add Controls to the Player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 8b3dd1e27c audio: Create seeking widgets
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker dc4f83f9a3 audio: Add widgets for audio Controls
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 2b358e3733 audio: Add the current autopause count to the menu button widget
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 73533c1283 audio: Add autopause controls to the menu popover
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 1c6357a073 audio: Create a menu button with volume controls
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker c844aba318 audio: Add widgets for Now Playing information
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker d29f4c1b47 audio: Save and restore the current track through the settings module
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 0fde1f58e2 audio: Add a Player class
I provide a way to load, play, and pause tracks. I also add functions
for picking the next and previous tracks from the tagdb.Stack

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00