Commit Graph

51 Commits

Author SHA1 Message Date
Anna Schumaker a7438b2be3 rind: Set a default image when there is no artwork
This acts as a placeholder, and keeps the sidebar from bouncing around
when tracks are changed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 10:55:35 -05:00
Anna Schumaker 0b334ddbee rind: Scale artwork when the sidebar position is changed
I always scale from the original reference image, and never from the
displayed pixbuf. This avoids artifacts due to lossy scaling algorithms.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 10:27:54 -05:00
Anna Schumaker d2c71f83a8 rind: Add an artwork widget
And look for the "image" tag from the gstreamer pipeline when setting.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 08:41:55 -05:00
Anna Schumaker 37c2260ebc Add an application icon
I took inspiration from a few other icons I found online, but I hacked
up my own version in Inkscape.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-30 20:41:05 -05:00
Anna Schumaker 57d77a5abd rind: Parse text entered in the track search entry
And set up a regex pattern that we can use to match tracks later.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-07-07 13:15:34 -04:00
Anna Schumaker daf7b6180c rind: Add an up-next column to the playlist model
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-06-15 11:22:06 -04:00
Anna Schumaker 9fb3c45886 rind: Enable selecting multiple tracks
I needed to switch starring multiple tracks at once to happen during a
button press instead of release, since the selection changes between
these two events.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-27 08:13:07 -04:00
Anna Schumaker 3eef442ee6 rind: Implement the TreeDragDest interface in the PlaylistModel
Testing this runs into the same problem that the TreeDragSource patch
hit - we're not able to manually allocate a Gtk.SelectionData object. We
can still test the code that does the move but we can't verify that
we're using the interface correctly

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-24 16:22:47 -04:00
Anna Schumaker fbfe17b828 rind: Add tracks to the Starred playlist through button clicks
There is currently no way to remove tracks from playlists, but this is a
start.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-22 11:21:20 -04:00
Anna Schumaker 9749e20b80 rind: Move position tracking into the audio widget code
And out of the upper level gst.py module

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-10 20:58:18 -04:00
Anna Schumaker 330c492f16 rind: Move pause popover handling into the autopause code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-09 15:51:25 -04:00
Anna Schumaker abac3b79ab rind: Move search entry handling into the view code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-05 11:03:50 -04:00
Anna Schumaker 7602acabb9 rind: Add a column for starred playlists
We don't do anything with this control yet, but eventually it'll be used
to show what tracks are starred. I intend to eventually allow clicking
on stars to add them to the starred playlist.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-05-03 09:45:27 -04:00
Anna Schumaker e272f4adab rind: Sort playlists by clicking on the treeview headers
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-27 14:15:41 -04:00
Anna Schumaker 413ce6f2e8 rind: Add a discnumber field to the playlist view
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-26 11:31:26 -04:00
Anna Schumaker e49999f754 rind: Activate next track button with keypad Enter key
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-26 10:52:53 -04:00
Anna Schumaker c62ab123b1 rind: Increase window width
I'm going to be adding more columns to the playlist display, so let's
increase the default width a little to accomidate this.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-26 10:51:15 -04:00
Anna Schumaker 27a598dacc rind: Add a Loop button
Similar to the Random button, this button sets the playlist loop
property. I also increase the length of the position slider slightly to
give the buttons above a little more room.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-25 16:48:55 -04:00
Anna Schumaker 52df4373b5 rind: Hide separators when "show more" area is hidden
I think it just looks nicer this way

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-24 15:54:22 -04:00
Anna Schumaker e3e51ee899 rind: Automatically size the node icon column
Images were getting cut off when descending into the node tree, so
automatically changing the sizes keeps the icon visible

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-24 09:09:22 -04:00
Anna Schumaker b49e81f580 curds: Rename ManagerModel to NodeTreeModel
This reflects how we're using the custom model to display the playlist
node tree.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-22 17:06:16 -04:00
Anna Schumaker bfe7e3550b rind: Set the row height of PlaylitNodes
If the node is a playlist, then we can use their natural height.
Otherwise, we set a height based on the first playlist in the model.
This way every row has the same height.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-19 11:08:24 -04:00
Anna Schumaker 40a353681c rind: Show a popover when configuring automatic pausing
This will eventually display the remaining time before the pause takes
effect, but for now just show the widget.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-12 21:54:55 -04:00
Anna Schumaker e09a4ed6ae rind: Implement a custom spin button for automatic pause controls
We have to do this because the "input" signal attached to a real
Gtk.SpinButton is broken, and likes to increment from -1 to 1, bypassing
0 all together.

Of course, this is only a problem when I try to have "This Track" and
"Next Track" text displayed instead of numbers, but I think everything
looks nicer this way.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-10 17:52:45 -04:00
Anna Schumaker a226305623 rind: Refine the behavior of can_activate_entry()
Now we only toggle the show-more button state if the entry is already
focused. Otherwise, we allow the grab focus.

Additionally, I rename "updown_button" to "show_more" to match how it's
being used.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-09 11:20:58 -04:00
Anna Schumaker ce302ff773 rind: Add track filtering and pause-after widgets
I change the keyboard shortcuts up slightly with this patch:
- ctrl+m shows and hides the search widgets
- ctrl+f now shows the widgets and focuses the track filtering entry

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-08 21:17:14 -04:00
Anna Schumaker 0c1dcad3f3 rind: Add keyboard shortcuts
The following shortcuts are currently supported:
- Backspace: Previous song
- Return: Next Song
- Space: Toggle play / pause
- Ctrl+f: Open search bar
- Ctrl+s: Open search bar and focus search entry
- Ctrl+r: Toggle random
- Ctrl+Up: Increase volume
- Ctrl+Down: Decrease volume

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-07 20:25:01 -04:00
Anna Schumaker 7ec500bcd7 rind: Add runtime label
I add this to the overlay so it doesn't take up space on its own.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-06 21:33:24 -04:00
Anna Schumaker 50a86f0edd rind: Add playlist filtering
This patch allows the user to filter playlists based on text that they
enter. I use the python regex module to handle searching, which gives
the user more flexibility in how they search. If the user inputs an
invalid regular expression, then I apply the "warning" style class to
the entry to let them know something has gone wrong.

I needed to change how the new-playlist signal is handled when I
switched over to using the playlist entry. For some reason the
GtkTreeModelFilter would glitch out whenever I sent the row-added
signal, so instead I let the filter model detect new rows when their
size is set instead. This seems to work, even if it's not how everything
is intended to be used.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-04-06 21:01:36 -04:00
Anna Schumaker fe3863a977 rind: Show and hide the GtkSeparator with the search entry
The separator is only one pixel wide, but it was still noticable when
the search entry was hidden. Hiding it too just makes things look nicer.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-31 20:12:13 -04:00
Anna Schumaker c6f8a48b0d rind: add an up / down toggle button
I'm going to use this to show and hide the text entries for playlist
filtering and autopause controls.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-31 14:18:14 -04:00
Anna Schumaker ace07b74eb rind: More UI refinements
- Change top left controls into a buttonbox
- Change new library button to list-add-symbolic
- Remove "can focus" from buttons
- Make play / pause / next / previous buttons pill-shaped and
homogeneous

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-31 11:07:53 -04:00
Anna Schumaker d69661ef3b rind: Give the new library button the "osd" style class
This style class is for on-screen-display widgets, which lines up with
how we're using this button.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-31 09:36:19 -04:00
Anna Schumaker 215ebb8653 rind: Add volume button
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-30 17:26:02 -04:00
Anna Schumaker ff3b9c4b5a rind: Add a New Libray button
Clicking the button shows a popover with a file chooser widget, which
can be used to select a library path.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-30 17:25:25 -04:00
Anna Schumaker b03877129d rind: Make play / pause / next / previous buttons circular
I think this looks a little nicer. While I'm at it, I also shove all the
headerbar widgets into two boxes packed on either side.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-30 09:25:06 -04:00
Anna Schumaker 9633e20de5 rind: Set fixed-height-mode on the playlist treeview
Now that we push row_added notifications into the main thread, we can
enable this optimization that makes the treeview more efficient.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-27 11:20:13 -04:00
Anna Schumaker 16b5e1e990 rind: Add previous button and playlist to the UI
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-24 17:32:16 -04:00
Anna Schumaker e4755aae6d rind: Remove shadows from scrolled windows
And change the GtkPaned widget to have a small handle. This sets the
division between the playlist manager and the playlist to a single line,
which I think looks really slick

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-21 15:37:37 -04:00
Anna Schumaker e403fd6ba9 rind: Show the fill level when tracks are loaded
This is a small detail, but I like the idea of having an indicator when
tracks are loaded or not.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-21 14:22:14 -04:00
Anna Schumaker c447c9e2b7 rind: Clean up the gstreamer tests
The common setup and tear down code helps keep everything in sync.
Additionally, we no longer need to wait for duration changes, which have
always been unreliable.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-21 13:35:25 -04:00
Anna Schumaker a48a2ada76 rind: Set Title and Artist from gstreamer tags
This helps us prepare for the about-to-finish signal by setting this
information when gstreamer starts playing the next track.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-21 13:11:58 -04:00
Anna Schumaker a9f48534e5 rind: Add seek support
I put a smaller progress bar into the header area that users can use for
seeking or checking the current position. I also add two labels to show
time played and time remaining in the current track.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-21 09:52:39 -04:00
Anna Schumaker 5885228fd1 rind: Add a random button
We use this to toggle the random property of playlists

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-20 10:45:28 -04:00
Anna Schumaker 72a947621c rind: Replace window title and subtitle with a custom widget
This lets me control size and justification of the text. Additionally, I
put everything into a scrolled window just in case a track has a really
long title name.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-20 09:58:23 -04:00
Anna Schumaker c636b3fd5e rind: More icon and spacing changes
I switch around the sidebar icons again, and also make the header bar
icons larger to make them easier to press with touchscreens

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-20 09:58:06 -04:00
Anna Schumaker 60da00adf8 rind: Add play, pause, and next buttons
And also change the window title and subtitle when loading a new track

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-19 12:17:58 -04:00
Anna Schumaker 57b642265c rind: Add library playlists to the playlist manager
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-17 11:15:04 -04:00
Anna Schumaker a983947200 rind: Add another treeview for a playlist selector
Right now it just supports one level of playlists, but others will be
implemented as we go on.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-16 09:17:18 -04:00
Anna Schumaker 31d7ae26fa rind: Implement the PlaylistModel
This is a special tree model that translates our Playlist object into a
format that GTK understands.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-03-15 08:40:25 -04:00