summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-21 19:56:45 +0300
committermonsta <[email protected]>2015-09-01 13:10:22 +0300
commit58f63533171544fff02a97a05937fda5cee9304f (patch)
tree4880bb976f77f1fcf0090fb88526f644923aadf3
parentbfc465e1f3106574606061be10ef3839362e1eb1 (diff)
downloadmate-utils-58f63533171544fff02a97a05937fda5cee9304f.tar.bz2
mate-utils-58f63533171544fff02a97a05937fda5cee9304f.tar.xz
logview: remove failed log from stored list
from https://git.gnome.org/browse/gnome-system-log/commit/?id=31b069ae801f44e33f3c9ac3d75a028477c490a3
-rw-r--r--logview/logview-app.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/logview/logview-app.c b/logview/logview-app.c
index f9d24826..b5ef8b45 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);