[gnome-music/wip/exalm/about] application: Set modal property programmatically
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/exalm/about] application: Set modal property programmatically
- Date: Sat, 23 Feb 2019 10:43:39 +0000 (UTC)
commit 931ccbace4adeb76117d4c961e3d826a347a03e2
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sat Feb 23 15:35:12 2019 +0500
application: Set modal property programmatically
Modal property has to be set after transient_for, otherwise the latter has
no effect. Hence it cannot be done in ui file.
Fixes a regression from 2c9c3f17b8a0c06a3573e6607557135b492dba93
Fixes #261
data/ui/AboutDialog.ui.in | 1 -
gnomemusic/application.py | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/AboutDialog.ui.in b/data/ui/AboutDialog.ui.in
index b5237b06..8ae33fa2 100644
--- a/data/ui/AboutDialog.ui.in
+++ b/data/ui/AboutDialog.ui.in
@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.0 -->
<template class="AboutDialog" parent="GtkAboutDialog">
<property name="can_focus">False</property>
- <property name="modal">True</property>
<property name="program_name">@PROGRAM_NAME@</property>
<property name="version">@PACKAGE_VERSION@</property>
<property name="copyright" translatable="yes">Copyright © 2018 GNOME Music Developers</property>
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 9a496093..92c4d94b 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -91,6 +91,8 @@ class Application(Gtk.Application):
def _about(self, action, param):
about = AboutDialog()
about.props.transient_for = self._window
+ # This has to be set after transient_for
+ about.props.modal = True
@log
def do_startup(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]