I make sure to clear an existing texture before setting a new one in
case the user downloads a new file with the same path. Otherwise we'll
end up using a stale texture in the list.
Implements: #54 ("Convert the SideBar to use the Texture Cache")
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I've found that during startup, we sometimes try to select the current
playlist before the Gtk sidebar widgets are completely loaded. This
results showing the right section, but not actually selecting a
playlist. We can fix this by selecting the playlist after a short
timeout to give everything a chance to load.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Rather than activating an action through a GLib.Variant, we can use the
newly added scroll_to() function to do most of the work for us.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The following shortcuts are implemented:
- <Control>? (<Shift><Control>/) to focus the "filter playlists" entry
- <Control><Alt>g to go to the current playlist
- <Shift><Control>p to open the Playlists section
- <Shift><Control>a to open the Artists section
- <Shift><Control>g to open the Genres section
- <Shift><Control>d to open the Decades section
- <Shift><Control>l to open the Libraries section
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm going to add a button to jump to the current playlist, and the first
step is to add an area to put it in the sidebar.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I change it to inherit from Gtk.Box, and append Sections as they are
added. I also add some stand-alone styling to set it apart as its own
widget.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It is much easier to pass a single boolean value instead of a Gtk
constant for specifying the icon size.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Otherwise we could have data loss if the application crashes.
Fixes: #63 ("The database isn't being committed enough")
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This section shows a list of library path playlists. I also add an extra
widget that opens a Gtk.FileDialogso users can add music to their
collections.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This section shows a tree of Decade and Year playlists. I use the
year-alt icon from the gnome icon-library as the section header.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This section uses the default Row for displaying genre playlists. I use
the theater icon from the gnome icon-library as the section header.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I make sure to save the "show-all" property to the settings so it can be
preserved across sessions.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This section shows a tree of Artist and Album playlists. I use the
library-artists icon from the gnome icon-library as the section header,
and the music-artist / music-artist2 icons for the "show all" button to
indicate state..
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I created a section Group with this section as the only member for now, and
bind the "selected-playlist" property to the sidebar.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This section creates PlaylistRows for displaying user and system
playlists. We also hook into the database playlist table to provide a
way to create new playlists. I add several new icons from the
icon-library to use for the section header and playlists.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This group manages a list of sections so only one is active at a time.
Additionally, it adjusts the animation property of each section to match
the direction the header moves when activated.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This class combines a header with an initially hidden ListView that can
be configured to list our playlists. It also implements
"playlist-activated" and "playlist-selected" signals to signal user
interaction.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The TreeRow is a factory.TreeRow configured for binding playlists to a
child widget. Individual sections are expected to inherit from this to
set up their section-specific widgets and bind any extra properties.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is a preconfigured row for displaying library paths. It includes a
switch to enable & disable the path, buttons for removing and updating a
path, and a progress bar for displaying scan progress.
I use the "update-symbolic" and "stop-sign-large-symbolic" icons from
the gnome icon library for this widget.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This row is configured for showing user and system playlists. This means
we use a SettableIcon, and EditableTitle, and an extra button for
deleting playlists. I use the big-x-symbolic icon from the gnome icon
library for deleting playlists.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is a basic Row widget with an Icon as a prefix widget, and no
postfix widget. You can set the "year" property to set a year value to
the icon text.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is intended to be used as a base class for our playlist Row
widgets, and sets up some common variables needed by both.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This will be used to display different types of playlists in the
sidebar, such as artist or genre. It also has a revealer that shows its
child when the header is active.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This widget allows users to change the displayed image by selecting a
new one from the filesystem.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This widget sets the Title::subtitle property to a nicely formatted
string based on the number set to the 'count' property.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It only contains a FilterEntry for filtering future playlists. The
application will save its size when resized.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>