[gnome-software/wip/kalev/gnome-3-22: 29/96] Hide some notifications when the app is launched or the window is closed
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/gnome-3-22: 29/96] Hide some notifications when the app is launched or the window is closed
- Date: Tue, 7 Mar 2017 16:26:16 +0000 (UTC)
commit c1d05e03b96229f86cb3ef802983c2f0bbe88cc7
Author: Richard Hughes <richard hughsie com>
Date: Wed Dec 14 13:45:46 2016 +0000
Hide some notifications when the app is launched or the window is closed
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=775885
src/gs-shell-details.c | 5 +++++
src/gs-shell.c | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 4188446..f10d4fa 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1630,6 +1630,11 @@ static void
gs_shell_details_app_launch_button_cb (GtkWidget *widget, GsShellDetails *self)
{
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
+
+ /* hide the notification */
+ g_application_withdraw_notification (g_application_get_default (),
+ "installed");
+
g_set_object (&self->cancellable, cancellable);
gs_page_launch_app (GS_PAGE (self), self->app, self->cancellable);
}
diff --git a/src/gs-shell.c b/src/gs-shell.c
index a991c85..bb5104d 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -620,6 +620,12 @@ main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
GsShell *shell = user_data;
GsShellPrivate *priv = gs_shell_get_instance_private (shell);
+ /* hide any notifications */
+ g_application_withdraw_notification (g_application_get_default (),
+ "installed");
+ g_application_withdraw_notification (g_application_get_default (),
+ "install-resources");
+
/* When the window is closed, reset the initial mode to overview */
priv->mode = GS_SHELL_MODE_OVERVIEW;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]