[gnome-music/freeze-break: 106/107] widgets: Make Add to Playlist dialog modal to main window
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/freeze-break: 106/107] widgets: Make Add to Playlist dialog modal to main window
- Date: Wed, 11 Sep 2013 13:23:16 +0000 (UTC)
commit 1d3f3b1b9f8981c50ad7daefcfba5dd879654bb2
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Wed Sep 11 00:07:20 2013 +0800
widgets: Make Add to Playlist dialog modal to main window
gnomemusic/widgets.py | 3 ++-
gnomemusic/window.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 4fb13f0..7abf308 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -605,10 +605,11 @@ class ArtistAlbumWidget(Gtk.HBox):
class PlaylistDialog():
- def __init__(self):
+ def __init__(self, parent):
self.ui = Gtk.Builder()
self.ui.add_from_resource('/org/gnome/Music/PlaylistDialog.ui')
self.dialog_box = self.ui.get_object('dialog1')
+ self.dialog_box.set_transient_for(parent)
self.view = self.ui.get_object('treeview1')
self.selection = self.ui.get_object('treeview-selection1')
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 851d1c8..70bf818 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -159,7 +159,7 @@ class Window(Gtk.ApplicationWindow):
self._stack.set_visible_child(self.views[i])
def _on_add_to_playlist_button_clicked(self, widget):
- self.playlists = Widgets.PlaylistDialog()
+ self.playlists = Widgets.PlaylistDialog(self)
if self.playlists.dialog_box.run() == Gtk.ResponseType.ACCEPT:
playlist.add_to_playlist(
self.playlists.get_selected(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]