[gnome-software] trivial: Reduce debug spew when updating flatpak apps
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Reduce debug spew when updating flatpak apps
- Date: Mon, 20 Feb 2017 16:54:15 +0000 (UTC)
commit 74019e4864d58af9e4e1f9be0f569cc5673ccf24
Author: Richard Hughes <richard hughsie com>
Date: Mon Feb 20 14:24:02 2017 +0000
trivial: Reduce debug spew when updating flatpak apps
src/gs-plugin-loader.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 1d1b9df..b21878d 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -49,6 +49,7 @@ typedef struct
SoupSession *soup_session;
GPtrArray *auth_array;
GFileMonitor *file_monitor;
+ GsPluginStatus global_status_last;
GMutex pending_apps_mutex;
GPtrArray *pending_apps;
@@ -3292,13 +3293,18 @@ gs_plugin_loader_status_changed_cb (GsPlugin *plugin,
GsPluginStatus status,
GsPluginLoader *plugin_loader)
{
+ GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
+
/* nothing specific */
if (gs_app_get_id (app) == NULL) {
- g_debug ("emitting global %s",
- gs_plugin_status_to_string (status));
- g_signal_emit (plugin_loader,
- signals[SIGNAL_STATUS_CHANGED],
- 0, app, status);
+ if (priv->global_status_last != status) {
+ g_debug ("emitting global %s",
+ gs_plugin_status_to_string (status));
+ g_signal_emit (plugin_loader,
+ signals[SIGNAL_STATUS_CHANGED],
+ 0, app, status);
+ priv->global_status_last = status;
+ }
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]