summaryrefslogtreecommitdiff
path: root/logview
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-21 19:56:45 +0300
committerinfirit <[email protected]>2015-08-31 21:57:23 +0200
commit4dc9a735fcea237546a9088ed5174b330aecbf84 (patch)
tree033b32bf3b8e40d5fa1106bb08cef3918384ea82 /logview
parent8bb7f35a56d8f448708b08dfd91fbef6ba3603e3 (diff)
downloadmate-utils-4dc9a735fcea237546a9088ed5174b330aecbf84.tar.bz2
mate-utils-4dc9a735fcea237546a9088ed5174b330aecbf84.tar.xz
logview: remove failed log from stored list
from https://git.gnome.org/browse/gnome-system-log/commit/?id=31b069ae801f44e33f3c9ac3d75a028477c490a3
Diffstat (limited to 'logview')
-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 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);