doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

Blame SOURCES/0064-applet-confirm-ignoring-of-notifications.patch

baab13
From ba356330db1c797ac050b6229f75474aed39faa7 Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Wed, 1 Oct 2014 17:14:50 +0200
baab13
Subject: [ABRT PATCH 64/66] applet: confirm ignoring of notifications
baab13
baab13
and fix a bug in abrt-action-notify
baab13
baab13
Resolves #1084031
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/applet/applet.c            | 16 +++++++++++++---
baab13
 src/plugins/abrt-action-notify |  2 +-
baab13
 2 files changed, 14 insertions(+), 4 deletions(-)
baab13
baab13
diff --git a/src/applet/applet.c b/src/applet/applet.c
baab13
index b1ce400..a40f877 100644
baab13
--- a/src/applet/applet.c
baab13
+++ b/src/applet/applet.c
baab13
@@ -666,9 +666,19 @@ static void action_ignore(NotifyNotification *notification, gchar *action, gpoin
baab13
 {
baab13
     problem_info_t *pi = (problem_info_t *)user_data;
baab13
 
baab13
-    log_debug("Ignoring problem '%s'", problem_info_get_dir(pi));
baab13
-
baab13
-    ignored_problems_add_problem_data(g_ignore_set, pi->problem_data);
baab13
+    const char *const message = _(
baab13
+            "You are going to mute notifications of a particular problem. " \
baab13
+            "You will never see a notification bubble for this problem again, " \
baab13
+            "however, ABRT will be detecting it and you will be able " \
baab13
+            "to report it from ABRT GUI." \
baab13
+            "\n\n" \
baab13
+            "Do you want to continue?");
baab13
+
baab13
+    if (run_ask_yes_no_yesforever_dialog("AskIgnoreForever", message, NULL))
baab13
+    {
baab13
+        log_debug("Ignoring problem '%s'", problem_info_get_dir(pi));
baab13
+        ignored_problems_add_problem_data(g_ignore_set, pi->problem_data);
baab13
+    }
baab13
 
baab13
     GError *err = NULL;
baab13
     notify_notification_close(notification, &err;;
baab13
diff --git a/src/plugins/abrt-action-notify b/src/plugins/abrt-action-notify
baab13
index cbabf74..8b8f38e 100644
baab13
--- a/src/plugins/abrt-action-notify
baab13
+++ b/src/plugins/abrt-action-notify
baab13
@@ -99,7 +99,7 @@ def emit_crash_dbus_signal(problem_data):
baab13
         # member is a Boolean flag which is True if the element is required
baab13
         arguments = ((FILENAME_PACKAGE, True), (CD_DUMPDIR, True),
baab13
                 (FILENAME_UID, False), (FILENAME_UUID, False),
baab13
-                (FILENAME_PACKAGE, False))
baab13
+                (FILENAME_DUPHASH, False))
baab13
 
baab13
         for elem in arguments:
baab13
             itm = problem_data.get(elem[0])
baab13
-- 
baab13
1.8.3.1
baab13