[gnome-news/wip/gbsneto/improvements: 2/2] app: improve about dialog
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-news/wip/gbsneto/improvements: 2/2] app: improve about dialog
- Date: Thu, 3 Mar 2016 05:37:36 +0000 (UTC)
commit d28790d4f030e93181545eb990a2a18aa1a771ac
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Mar 3 02:01:17 2016 -0300
app: improve about dialog
Set it modal to the parent window. Also, avoid accessing
a private field from the parent application.
gnomenews/about.py | 3 ++-
gnomenews/application.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomenews/about.py b/gnomenews/about.py
index ec908c1..d29e931 100644
--- a/gnomenews/about.py
+++ b/gnomenews/about.py
@@ -20,7 +20,8 @@ class AboutDialog(Gtk.AboutDialog):
def __init__(self, parent):
Gtk.AboutDialog.__init__(self)
self.parent = parent
- self.set_transient_for(self.parent._window)
+ self.set_modal(True)
+ self.set_transient_for(parent)
self.set_artists(self._read_file("ARTISTS"))
self.set_authors(self._read_file("AUTHORS"))
self.set_copyright("Copyright © 2015 GNOME Foundation")
diff --git a/gnomenews/application.py b/gnomenews/application.py
index cd4e00f..d748cf3 100644
--- a/gnomenews/application.py
+++ b/gnomenews/application.py
@@ -80,7 +80,7 @@ class Application(Gtk.Application):
self._about_dialog = None
if not self._about_dialog:
- self._about_dialog = AboutDialog(self)
+ self._about_dialog = AboutDialog(self._window)
self._about_dialog.connect("destroy", on_destroy)
self._about_dialog.present()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]