[gnome-music/wip/gbsneto/contained-playlists: 28/29] playlistdialog: Make dialog insensitive while creating playlist
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/gbsneto/contained-playlists: 28/29] playlistdialog: Make dialog insensitive while creating playlist
- Date: Thu, 1 Dec 2016 23:27:55 +0000 (UTC)
commit a7397be09abc0671c9dc8c942f10a1c166f9a38d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Dec 1 21:12:27 2016 -0200
playlistdialog: Make dialog insensitive while creating playlist
When creating a playlist, the current behavior gives no feedback that
the operation is going on, neither blocks the user from repeatedly
click the Add button. This may lead to confusion and errors.
Fix that by making the entire dialog insensitive while a playlist
is being created.
gnomemusic/widgets/playlistdialog.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/widgets/playlistdialog.py b/gnomemusic/widgets/playlistdialog.py
index eba1394..1671fe2 100644
--- a/gnomemusic/widgets/playlistdialog.py
+++ b/gnomemusic/widgets/playlistdialog.py
@@ -95,6 +95,7 @@ class PlaylistDialog():
if self._new_playlist_entry.get_text() != '':
self.playlists.create_playlist(self._new_playlist_entry.get_text())
self._playlist_created = True
+ self.dialog_box.set_sensitive(False)
@log
def _on_playlist_added(self, playlists, playlist):
@@ -119,6 +120,7 @@ class PlaylistDialog():
# select it and notify the window that we're done
if self._playlist_created:
self.listbox.select_row(row)
+ self.dialog_box.set_sensitive(True)
self.dialog_box.response(Gtk.ResponseType.ACCEPT)
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]