[epiphany/mcatanzaro/#1570] passwords-view: fix the Clear All action
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#1570] passwords-view: fix the Clear All action
- Date: Sun, 1 Aug 2021 14:18:46 +0000 (UTC)
commit 89b30b829b1641021db8e0595c1aa56340b0f242
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Sun Aug 1 09:16:16 2021 -0500
passwords-view: fix the Clear All action
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
src/preferences/passwords-view.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/preferences/passwords-view.c b/src/preferences/passwords-view.c
index b4df843af..bf56cb353 100644
--- a/src/preferences/passwords-view.c
+++ b/src/preferences/passwords-view.c
@@ -183,9 +183,14 @@ confirmation_dialog_response_cb (GtkWidget *dialog,
static GtkWidget *
confirmation_dialog_construct (EphyPasswordsView *self)
{
- GtkWidget *dialog, *button;
+ GtkWidget *dialog;
+ GtkWidget *button;
+ GtkWidget *w = gtk_widget_get_parent (GTK_WIDGET (self));
- dialog = gtk_message_dialog_new (GTK_WINDOW (self),
+ while (!GTK_IS_WINDOW (w))
+ w = gtk_widget_get_parent (w);
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (w),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CANCEL,
@@ -194,7 +199,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 (w)),
GTK_WINDOW (dialog));
button = gtk_button_new_with_mnemonic (_("_Delete"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]