[gnome-disk-utility] about_dialog: Use response to clear references
- From: Kai Lüke <kailueke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] about_dialog: Use response to clear references
- Date: Mon, 18 Oct 2021 19:18:17 +0000 (UTC)
commit 6fbebefbc62a5d2eef0d8f2c21bc986d6b739211
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Tue Oct 12 11:39:35 2021 +0200
about_dialog: Use response to clear references
src/disks/gduapplication.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/disks/gduapplication.c b/src/disks/gduapplication.c
index 152ca2c7..9689aebc 100644
--- a/src/disks/gduapplication.c
+++ b/src/disks/gduapplication.c
@@ -321,6 +321,12 @@ shortcuts_activated (GSimpleAction *action,
gtk_widget_show_all (dialog);
}
+static void
+on_about_dialog_response (GtkDialog *dialog)
+{
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
static void
about_activated (GSimpleAction *action,
GVariant *parameter,
@@ -347,13 +353,9 @@ about_activated (GSimpleAction *action,
g_free (s);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (app->window));
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_widget_show_all (dialog);
- g_object_ref (dialog);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_hide (dialog);
- gtk_widget_destroy (dialog);
- g_object_unref (dialog);
+ g_signal_connect (dialog, "response", on_about_dialog_response, NULL);
+ gtk_window_present (GTK_WINDOW (dialog));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]