This acts as a placeholder, and keeps the sidebar from bouncing around
when tracks are changed.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>