[gnome-music/wip/jfelder/simplify-playlistdialog: 25/28] playlistdialog: Do not show stack at init
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/simplify-playlistdialog: 25/28] playlistdialog: Do not show stack at init
- Date: Mon, 26 Mar 2018 08:35:13 +0000 (UTC)
commit 606fabb2f51459b1ccc00366fe55e4268f29a5b3
Author: Jean Felder <jfelder src gnome org>
Date: Tue Mar 13 17:46:57 2018 +0100
playlistdialog: Do not show stack at init
This is to avoid some strange flickerings when the dialog appears.
data/PlaylistDialog.ui | 4 ++--
gnomemusic/widgets/playlistdialog.py | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/data/PlaylistDialog.ui b/data/PlaylistDialog.ui
index f20de813..53db2e9c 100644
--- a/data/PlaylistDialog.ui
+++ b/data/PlaylistDialog.ui
@@ -32,7 +32,7 @@
<property name="transition_duration">250</property>
<child>
<object class="GtkBox" id="empty_state">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
@@ -132,7 +132,7 @@
</child>
<child>
<object class="GtkBox" id="normal_state">
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
diff --git a/gnomemusic/widgets/playlistdialog.py b/gnomemusic/widgets/playlistdialog.py
index 8300fd29..fe5d5b16 100644
--- a/gnomemusic/widgets/playlistdialog.py
+++ b/gnomemusic/widgets/playlistdialog.py
@@ -85,12 +85,14 @@ class PlaylistDialog():
def playlists_available_cb(available):
if available:
+ self._normal_state.show()
self._add_playlist_stack.set_visible_child(self._normal_state)
self._new_playlist_button = self._ui.get_object(
'new-playlist-button')
self._new_playlist_entry = self._ui.get_object(
'new-playlist-entry')
else:
+ self._empty_state.show()
self._add_playlist_stack.set_visible_child(self._empty_state)
self._new_playlist_button = self._ui.get_object(
'create-first-playlist-button')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]