Dragging onto a sidebar row without a valid playlist will prompt the
user to create a new playlist. I could probably add a "New Playlist"
row at some point, but this is easier for now :)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We only support drag-and-drop one row at a time, even though multiple
rows can be selected in the treeview. If this is a problem, then we can
figure it out later!
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The popover is shown whenever the user pauses manually with automatic
pausing enabled. This will give the user a chance to disable pausing if
it is no longer needed.
Implements #113: Cancel "pause after" configuration when user manually pauses
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We have to disable the up and down buttons when typing in the entry in
case the user decides to type a minus or plus sign.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I set the "linked" property on the hbox to make everything look like a
single widget. I'm doing this on my own to cut out the GtkAdjustment
and to just use the counter in the audio layer in its place.
Additionally, this will give me the ability to use "+" and "-" keyboard
shortcuts to activate the widgets.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We can only rename user-created playlists, so let's not even show this
option for the other playlist types.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Enabling this option resolves several "Negative content width" warnings
that I was seeing. Normally I'd just ignore them, but these were
generating SIGTRAP during testing and causing the tests to fail
unnecessarily.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Instead, watch for a middle click and set the editable state manually
from there. This fixes a bug where double clicking on a user playlist
put us in editing mode instead of selecting the playlist for playback.
Fixes#110: Cannot select user playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We use this to set the playlist name in the provided GtkEntry, clearing
out the number of tracks
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I cleaned up several of the functions and added tests for making sure
everything is set correctly.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This patch also adds a unit test checking that the image is initialized
properly. In addition, I simplify things by changing the image widget
to be a direct child of the GtkButton.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Gtk doesn't have a simple way to manually trigger this, so I didn't
write a unit test for this feature.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Called to access the GtkPaned widget. I also rename the widget
"sidebar" to match the new convention.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I connect this in code so I can pass the column index as data to the
function, avoding the need for a "column index" lookup function.
I restore saved column widths during startup.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I decided to manually connect signals this time so I can pass sort
information instead of needing to look up the column index.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And rename the widget from "o_treeview" to just "treeview".
I wanted to rename gui/view.c to gui/treeview.c at some point. I
decided to gradually rework things into a new file to make it easier to
track progress.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I find that I usually create playlists through either a right click
action or through a keyboard shortcut, so we don't need an extra option
hidden inside a MenuButton. Let's remove the button and show the "Add
Library Path" option directly instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The convention is for gtk builder files named with a ".ui" extension.
Let's rename our file to match, and drop the 6 while we're at it.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>