Commit Graph

71 Commits

Author SHA1 Message Date
Anna Schumaker 798ef20a72 playlist: Give the playlist panel an add_selected_tracks() function
So we can have all the add track functionality in one place that also
allows for keyboard presses to work.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-09 19:25:16 -05:00
Anna Schumaker 2e14b511a4 sidebar: add_to_playlist() fixes
- Commit after adding tracks
- If tracks were added to the Queued Tracks playlist, then set it as the
  current playlist in the Player

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-09 17:51:02 -05:00
Anna Schumaker 2f1b7b397f sidebar: Add selected tracks to the selected playlist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-05 13:50:24 -05:00
Anna Schumaker 44f778bdb7 sidebar: Give the AddPlaylistButton an "add-to-playlist" signal
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-05 13:49:24 -05:00
Anna Schumaker 981e98818d sidebar: Make the current playlist bold
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-05 13:49:24 -05:00
Anna Schumaker 44ba5438e2 sidebar: Change the Player's playlist when rows are activated
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-05 13:49:24 -05:00
Anna Schumaker 7f31e39779 sidebar: Change the currently displayed playlist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-05 13:49:24 -05:00
Anna Schumaker 281fda1933 sidebar: Remove old Sidebar code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 20b84fa019 sidebar: Create a new Sidebar class
Containing both the Stack Switcher and Stack Box

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 6ac08eb2bd sidebar: Create a Stack Box
Containing our Stack and other widgets that get displayed along with it

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 34350d5700 sidebar: Create an AddUpdateBox
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 7be89be250 sidebar: Create an AddPlaylistButton
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 5b5d166db3 sidebar: Create an AddPlaylistPopover
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 5d18c336d5 sidebar: Create an AddPlaylistEntry
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 0152ba1431 sidebar: Create a custom ProgressBar
This takes the ProgressBar from the scanner widgets and puts in in a Box
with Labels on either side to reserve its space at all times.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 7beebbc7d1 sidebar: Create a Stack Switcher
This allocates a Stack during __init__(), which can then be displayed to
the user.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 16038a16f1 sidebar: Create a Stack with pages
Additionally, we save the current page when it is changed and restore on
startup.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 31695863de sidebar: Create a TableWindow scrolled window
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 2e4062a515 sidebar: Create a UserView list view
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 9dc466e8f1 sidebar: Create a TableView list view
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 869ab6d274 sidebar: Create a UserRow and UserRowFactory
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker e1cab1de6f sidebar: Create a TreeRow and {User,Library,}TreeRowFactorys
This is a Gtk.TreeExpander with some extra functions to work the way we
need it. We don't have a way to create Gtk.TreeListRows manually, so we
can't test the set_item() and unset_item() functions directly.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>

sidebar: Create a LibraryTreeRowFactory

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 3bd60b0f06 sidebar: Create a LibraryGrid
This adds a menu button with extra options for libraries

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 0e7cb81476 sidebar: Create a UserGrid
This adds a button users can click to remove the playlists they create.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker d1d84af228 sidebar: Create a row Grid
This contains the actual widgets used to display playlist information. I
override the GtkGrid.attach() function so it returns the attached widget
to simplify setup a little bit.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker b75fc78de7 sidebar: Create a row Label
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker fdc4bb7275 sidebar: Create a LibraryPopover
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 0014e5fa55 sidebar: Create a LibraryButtons box
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 59d9c3b484 sidebar: Create a UserSelection list model
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:54 -05:00
Anna Schumaker 1d5a52623c sidebar: Create a TableSelection list model
Configured to allow unselecting items so we have a way of choosing an
item if it is the only one in the list.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-20 10:04:52 -05:00
Anna Schumaker b74f948acb sidebar: Create a FilterUserModel list model
With a custom filter that only displays playlists that users can add
tracks to directly.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-19 10:34:08 -05:00
Anna Schumaker 43ec165a56 sidebar: Create a FilterTableModel list model
With a custom Regex filter that checks if the parent or any children
match the given pattern.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-19 10:34:08 -05:00
Anna Schumaker c982fe624b sidebar: Create a TreeListModel helper function
I can't inherit from Gtk.TreeListModel since the new() constructor is
the only way to set the create_child_func. Instead, use this wrapper
function to do the same thing.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-19 10:34:08 -05:00
Anna Schumaker 17391acd4d sidebar: Create a ChildModel list model
This will be used to display the children of some of our playlists.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-19 10:34:08 -05:00
Anna Schumaker 472280ca9b sidebar: Don't pop up the dir chooser popover during testing
This can cause a segfault for some reason, but the test works perfectly
fine without it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-18 10:20:24 -05:00
Anna Schumaker 3a50235c38 audio: Rework the Artwork widget
It now sets artwork based on the signals sent by the player, allowing us
to move it out of the Player class and create instances based on the
global Player instead.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-08 10:07:45 -04:00
Anna Schumaker f55ecf0472 sidebar: Switch over to using the emmental-favorites icon
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-31 19:18:28 -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 7a41c3b1a1 Move module tests out of the toplevel directory
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 11:03:32 -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 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 70f9bc5015 sidebar: Put the Pulser into the Sidebar.Box directly
Rather than putting it in the Window.Grid. I add some labels to provide
spacing and to make sure the pulser area stays visible even if the
pulser is hidden.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:35 -04:00
Anna Schumaker 05742d0bbc sidebar: Move the pulser into the sidebar directory
I'm soon going to put it into the same box as the Stack

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:35 -04:00
Anna Schumaker cf22a32fe7 window: Add the sidebar Switcher to the Grid directly
Rather than putting it in the Gtk.Paned

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:34 -04:00
Anna Schumaker e21eca37ae playlist: Create a function for changing the current tag
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:02 -04:00
Anna Schumaker 193dd7c85c sidebar: Add a key event controller to user tagrows
And respond to the delete key to remove playlists

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:45 -04:00
Anna Schumaker 00d43547e5 sidebar: Create a custom listrow for User playlists
With a button that deletes the user-created playlist when clicked

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:45 -04:00
Anna Schumaker 6c8903e7fd sidebar: Bold the top playlist on the trackdb.Stack
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:45 -04:00
Anna Schumaker aa15f9bf69 sidebar: Push selected rows onto the trackdb TagStack
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:45 -04:00
Anna Schumaker d6b7a4bb8b sidebar: Give child TagRows an indented look
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:45 -04:00