[epiphany/wip/exalm/popovers: 2/2] security-popover: Ensure popdown animation
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/popovers: 2/2] security-popover: Ensure popdown animation
- Date: Sun, 6 Oct 2019 10:39:46 +0000 (UTC)
commit add85e6bbc8fbbfb9afc624a45b2f59db096046f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Oct 6 15:36:05 2019 +0500
security-popover: Ensure popdown animation
lib/widgets/ephy-security-popover.c | 2 +-
src/ephy-window.c | 13 +++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index ec60d84fb..263ea2b2a 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -231,7 +231,7 @@ certificate_button_clicked_cb (GtkButton *button,
G_CALLBACK (gtk_widget_destroy),
NULL);
- gtk_widget_hide (GTK_WIDGET (popover));
+ gtk_popover_popdown (GTK_POPOVER (popover));
gtk_widget_show (dialog);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6a4acdd26..71b034abe 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3395,6 +3395,15 @@ sync_user_input_cb (EphyLocationController *action,
window->updating_address = FALSE;
}
+static void
+security_popover_notify_visible_cb (GtkWidget *widget,
+ GParamSpec *param,
+ gpointer user_data)
+{
+ if (!gtk_widget_get_visible (widget))
+ gtk_widget_destroy (widget);
+}
+
static void
title_widget_lock_clicked_cb (EphyTitleWidget *title_widget,
GdkRectangle *lock_position,
@@ -3417,8 +3426,8 @@ title_widget_lock_clicked_cb (EphyTitleWidget *title_widget,
tls_errors,
security_level);
- g_signal_connect (security_popover, "closed",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (security_popover, "notify::visible",
+ G_CALLBACK (security_popover_notify_visible_cb), NULL);
gtk_popover_set_pointing_to (GTK_POPOVER (security_popover), lock_position);
gtk_popover_set_position (GTK_POPOVER (security_popover), GTK_POS_BOTTOM);
gtk_popover_popup (GTK_POPOVER (security_popover));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]