[gnome-software/gnome-3-22] trivial: Don't show a notification when live updating an app
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Don't show a notification when live updating an app
- Date: Mon, 7 Nov 2016 13:37:12 +0000 (UTC)
commit 6df0cf7242a4a0f0ce0c8614d2804a9b0e47714d
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 15 13:38:06 2016 +0100
trivial: Don't show a notification when live updating an app
(cherry picked from commit 6ed3a2c773246e2357ffbd5946ec3a68ec67299e)
src/gs-page.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index e7b3532..cd23320 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -48,6 +48,7 @@ typedef struct {
SoupSession *soup_session;
gulong notify_quirk_id;
GtkWidget *button_install;
+ GsPluginAction action;
} GsPageHelper;
static void
@@ -191,6 +192,7 @@ gs_page_app_installed_cb (GObject *source,
/* only show this if the window is not active */
if (gs_app_is_installed (helper->app) &&
+ helper->action == GS_PLUGIN_ACTION_INSTALL &&
!gs_shell_is_active (priv->shell))
gs_app_notify_installed (helper->app);
@@ -314,12 +316,13 @@ gs_page_install_app (GsPage *page, GsApp *app, GCancellable *cancellable)
}
helper = g_slice_new0 (GsPageHelper);
+ helper->action = GS_PLUGIN_ACTION_INSTALL;
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
- GS_PLUGIN_ACTION_INSTALL,
+ helper->action,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -417,6 +420,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
/* non-firmware applications do not have to be prepared */
helper = g_slice_new0 (GsPageHelper);
+ helper->action = GS_PLUGIN_ACTION_UPDATE;
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
@@ -437,7 +441,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
/* generic fallback */
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
- GS_PLUGIN_ACTION_UPDATE,
+ helper->action,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -461,7 +465,7 @@ gs_page_remove_app_response_cb (GtkDialog *dialog,
g_debug ("remove %s", gs_app_get_id (helper->app));
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
- GS_PLUGIN_ACTION_REMOVE,
+ helper->action,
helper->cancellable,
gs_page_app_removed_cb,
helper);
@@ -478,6 +482,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
/* pending install */
helper = g_slice_new0 (GsPageHelper);
+ helper->action = GS_PLUGIN_ACTION_REMOVE;
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]