[gnome-keysign: 2/10] app: provide an emulated get_toplevel function



commit 1cf6786ccf8fa87a758647b76aad7c9140e0edd4
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Fri May 10 10:38:39 2019 +0200

    app: provide an emulated get_toplevel function
    
    We will want to run modal dialogues which require the top level window
    to be given.

 keysign/app.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/keysign/app.py b/keysign/app.py
index 8b01a6f..fc92cff 100755
--- a/keysign/app.py
+++ b/keysign/app.py
@@ -91,7 +91,13 @@ class PswMappingReceiveApp(ReceiveApp):
         psw.connect('map', self.func)
         if psw.get_mapped():
             self.func(psw)
-    
+
+    def get_toplevel(self):
+        """We're continuing to hack around
+        If we ever want to run a dialog, say a FileSave dialog, then we need to provide
+        the top level window of that widget.
+        """
+        return self.psw.get_toplevel()
 
 
 class KeysignApp(Gtk.Application):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]