diff options
author | Michael Catanzaro <mcatanzaro@redhat.com> | 2021-08-01 09:16:16 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@redhat.com> | 2021-08-01 09:23:43 -0500 |
commit | 3b6e8462b20490173ea6d72489a4e62651beeb1b (patch) | |
tree | bd5b664a9f35c46235de16d1b0dc84c232a3ff11 | |
parent | 0cd22d6ed3e6419bcd1e42dfc6918d2df0b98f82 (diff) | |
download | epiphany-mcatanzaro/#1570.tar.gz |
passwords-view: fix the Clear All actionmcatanzaro/#1570
Apparently people don't try to delete all their passwords very often,
because this has been broken for the past year and nobody noticed until
now. Whatever. The dialog is no longer a GtkWindow so we just have to
find the parent window instead.
Fixes #1570
-rw-r--r-- | src/preferences/passwords-view.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/preferences/passwords-view.c b/src/preferences/passwords-view.c index b4df843af..66d0fe2d4 100644 --- a/src/preferences/passwords-view.c +++ b/src/preferences/passwords-view.c @@ -183,9 +183,13 @@ confirmation_dialog_response_cb (GtkWidget *dialog, static GtkWidget * confirmation_dialog_construct (EphyPasswordsView *self) { - GtkWidget *dialog, *button; + GtkWidget *dialog; + GtkWidget *button; + GtkWidget *window; - dialog = gtk_message_dialog_new (GTK_WINDOW (self), + window = gtk_widget_get_toplevel (GTK_WIDGET (self)); + + dialog = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_CANCEL, @@ -194,7 +198,7 @@ confirmation_dialog_construct (EphyPasswordsView *self) gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _("This will clear all locally stored passwords, and can not be undone.")); - gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (self)), + gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (window)), GTK_WINDOW (dialog)); button = gtk_button_new_with_mnemonic (_("_Delete")); |