From 4dc9a735fcea237546a9088ed5174b330aecbf84 Mon Sep 17 00:00:00 2001 From: Monsta Date: Fri, 21 Aug 2015 19:56:45 +0300 Subject: logview: remove failed log from stored list from https://git.gnome.org/browse/gnome-system-log/commit/?id=31b069ae801f44e33f3c9ac3d75a028477c490a3 --- logview/logview-app.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/logview/logview-app.c b/logview/logview-app.c index e82fe46e..ffa37ec7 100644 --- a/logview/logview-app.c +++ b/logview/logview-app.c @@ -381,6 +381,18 @@ logview_app_add_error (LogviewApp *app, g_free (primary); } +static void +check_error_prefs (gpointer data, + gpointer user_data) +{ + gchar **strings = data; + LogviewApp *app = user_data; + GFile *file = g_file_new_for_path (strings[0]); + + logview_prefs_remove_stored_log (app->priv->prefs, file); + g_object_unref (file); +} + void logview_app_add_errors (LogviewApp *app, GPtrArray *errors) @@ -393,7 +405,11 @@ logview_app_add_errors (LogviewApp *app, if (errors->len == 0) { return; - } else if (errors->len == 1) { + } + + g_ptr_array_foreach (errors, check_error_prefs, app); + + if (errors->len == 1) { char **err; err = g_ptr_array_index (errors, 0); -- cgit v1.2.1