[seahorse/wip/nielsdg/datetime: 2/3] pgp/expires-dialog: Set transient-for property




commit 57eb05e1ef5838d2d246687f8efe7599c80d4076
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sat Feb 27 23:14:46 2021 +0100

    pgp/expires-dialog: Set transient-for property
    
    Fixes https://gitlab.gnome.org/GNOME/seahorse/-/issues/280

 pgp/seahorse-gpgme-expires-dialog.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/pgp/seahorse-gpgme-expires-dialog.c b/pgp/seahorse-gpgme-expires-dialog.c
index 84b31c1d..07261e01 100644
--- a/pgp/seahorse-gpgme-expires-dialog.c
+++ b/pgp/seahorse-gpgme-expires-dialog.c
@@ -209,12 +209,14 @@ seahorse_gpgme_expires_dialog_class_init (SeahorseGpgmeExpiresDialogClass *klass
 
 GtkDialog *
 seahorse_gpgme_expires_dialog_new (SeahorseGpgmeSubkey *subkey,
-                                   GtkWindow *parent)
+                                   GtkWindow           *parent)
 {
     g_return_val_if_fail (SEAHORSE_GPGME_IS_SUBKEY (subkey), NULL);
+    g_return_val_if_fail (!parent || GTK_IS_WINDOW (parent), NULL);
 
     return g_object_new (SEAHORSE_GPGME_TYPE_EXPIRES_DIALOG,
                          "subkey", subkey,
+                         "transient-for", parent,
                          "use-header-bar", 1,
                          NULL);
 }


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