[gnome-software/wip/hughsie/close-in-app-on-close] Hide any in-app notifications when closing the main window



commit bfcd5a2facf077871b46d03135bfab249c1af8e5
Author: Richard Hughes <richard hughsie com>
Date:   Thu Dec 12 14:18:20 2019 +0000

    Hide any in-app notifications when closing the main window
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1695043

 src/gs-shell.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 918b794f..173a8e48 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -727,6 +727,8 @@ static gboolean
 main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
 {
        GsShell *shell = user_data;
+       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
+       GtkWidget *widget;
 
        /* hide any notifications */
        g_application_withdraw_notification (g_application_get_default (),
@@ -734,6 +736,10 @@ main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
        g_application_withdraw_notification (g_application_get_default (),
                                             "install-resources");
 
+       /* clear any in-app notification */
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "notification_event"));
+       gtk_revealer_set_reveal_child (GTK_REVEALER (widget), FALSE);
+
        gs_shell_clean_back_entry_stack (shell);
        gtk_widget_hide (dialog);
        return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]