[gnome-music/wip/mschraal/albumview-covers-on-demand: 2/2] albumsview: Clarify widget naming
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/albumview-covers-on-demand: 2/2] albumsview: Clarify widget naming
- Date: Sun, 20 Oct 2019 13:39:54 +0000 (UTC)
commit 6187eff9860c86cac8eec62de5daec121ee2edfc
Author: Marinus Schraal <mschraal gnome org>
Date: Fri Oct 18 17:20:01 2019 +0200
albumsview: Clarify widget naming
data/ui/AlbumsView.ui | 2 +-
gnomemusic/views/albumsview.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/data/ui/AlbumsView.ui b/data/ui/AlbumsView.ui
index 116231fe..cb7828fc 100644
--- a/data/ui/AlbumsView.ui
+++ b/data/ui/AlbumsView.ui
@@ -3,7 +3,7 @@
<requires lib="gtk+" version="3.18"/>
<template class="AlbumsView" parent="GtkStack">
<child>
- <object class="GtkScrolledWindow" id="_all_albums">
+ <object class="GtkScrolledWindow" id="_scrolled_window">
<property name="visible">True</property>
<child>
<object class="GtkFlowBox" id="_flowbox">
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index 9d32b197..6f91cc07 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -45,7 +45,7 @@ class AlbumsView(Gtk.Stack):
selected_items_count = GObject.Property(type=int, default=0, minimum=0)
selection_mode = GObject.Property(type=bool, default=False)
- _all_albums = Gtk.Template.Child()
+ _scrolled_window = Gtk.Template.Child()
_flowbox = Gtk.Template.Child()
def __repr__(self):
@@ -65,7 +65,7 @@ class AlbumsView(Gtk.Stack):
self._window = application.props.window
self._headerbar = self._window._headerbar
self._timeout_id = None
- self._viewport = self._all_albums.get_child()
+ self._viewport = self._scrolled_window.get_child()
model = self._window._app.props.coremodel.props.albums_sort
self._flowbox.bind_model(model, self._create_widget)
@@ -87,9 +87,9 @@ class AlbumsView(Gtk.Stack):
self.connect(
"notify::search-mode-active", self._on_search_mode_changed)
- self._all_albums.props.vadjustment.connect(
+ self._scrolled_window.props.vadjustment.connect(
"value-changed", self._on_vadjustment_changed)
- self._all_albums.props.vadjustment.connect(
+ self._scrolled_window.props.vadjustment.connect(
"changed", self._on_vadjustment_changed)
self.show_all()
@@ -104,7 +104,7 @@ class AlbumsView(Gtk.Stack):
priority=GLib.PRIORITY_LOW)
def _retrieve_covers(self, old_adjustment):
- adjustment = self._all_albums.props.vadjustment.props.value
+ adjustment = self._scrolled_window.props.vadjustment.props.value
if old_adjustment != adjustment:
return GLib.SOURCE_CONTINUE
@@ -169,7 +169,7 @@ class AlbumsView(Gtk.Stack):
def _back_button_clicked(self, widget, data=None):
self._headerbar.state = HeaderBar.State.MAIN
- self.props.visible_child = self._all_albums
+ self.props.visible_child = self._scrolled_window
def _on_child_activated(self, widget, child, user_data=None):
corealbum = child.props.corealbum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]