diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-11-03 21:36:14 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2017-11-03 21:44:11 -0500 |
commit | aabe746d30e23d887018ba6e22530e68377c40d4 (patch) | |
tree | 8de38d9290fbad55974d0605b3422b75094d4a36 /ui/gcr-certificate-exporter.c | |
parent | e0b3109833c05cbb90a9f6c20d6d0d370063c6a3 (diff) | |
download | gcr-aabe746d30e23d887018ba6e22530e68377c40d4.tar.gz |
ui: Fix certificate export dialog to not hang the application
I don't know why -- I guess something must have changed in GTK+ -- but
currently the certificate export dialog does nothing except hang. It
can't receive any user input or anything.
gtk_dialog_run() seems to fix this, so let's use it.
Note we have to adjust the refcounting here now, since if the Cancel
button is pressed the operation will complete before
_gcr_certificate_exporter_export_async returns. The function is still
partially async, but it now blocks until the dialog is closed.
https://bugzilla.gnome.org/show_bug.cgi?id=789804
Diffstat (limited to 'ui/gcr-certificate-exporter.c')
-rw-r--r-- | ui/gcr-certificate-exporter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gcr-certificate-exporter.c b/ui/gcr-certificate-exporter.c index 4b76815..5c3e816 100644 --- a/ui/gcr-certificate-exporter.c +++ b/ui/gcr-certificate-exporter.c @@ -340,7 +340,7 @@ exporter_display_chooser (GcrCertificateExporter *self) g_cancellable_connect (self->pv->cancellable, G_CALLBACK (on_cancel_chooser_dialog), self, NULL); - gtk_widget_show (GTK_WIDGET (self->pv->chooser_dialog)); + gtk_dialog_run (GTK_DIALOG (self->pv->chooser_dialog)); } /* ----------------------------------------------------------------------------- @@ -522,10 +522,10 @@ _gcr_certificate_exporter_export_async (GcrCertificateExporter *self, if (cancellable) self->pv->cancellable = g_object_ref (cancellable); - exporter_display_chooser (self); - /* Matching in export_finish */ g_object_ref (self); + + exporter_display_chooser (self); } gboolean |