[ABRT PATCH 2/5] applet: silent shortened reporting

Jakub Filak jfilak at redhat.com
Wed Aug 14 12:43:06 UTC 2013


Related to rhbz#953927

Signed-off-by: Jakub Filak <jfilak at redhat.com>
---
 src/applet/applet.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/applet/applet.c b/src/applet/applet.c
index b480012..758b2a1 100644
--- a/src/applet/applet.c
+++ b/src/applet/applet.c
@@ -121,6 +121,15 @@ static bool is_shortened_reporting_enabled()
     return g_settings_shortenedreporting;
 }
 
+static bool is_silent_shortened_reporting_enabled(void)
+{
+    const char *configured = get_user_setting("SilentShortenedReporting");
+    if (configured)
+        return string_to_bool(configured);
+
+    return 0;
+}
+
 /*
  * Converts a NM state value stored in GVariant to boolean.
  *
@@ -880,6 +889,17 @@ static void notify_problem_list(GList *problems, int flags)
                  */
                 if (is_shortened_reporting_enabled())
                 {
+                    /* Users dislike "useless" notification of reported
+                     * problems allowing only to disable future notifications
+                     * of the same problem.
+                     */
+                    if (is_silent_shortened_reporting_enabled())
+                    {
+                        problem_info_free(pi);
+                        g_object_unref(notification);
+                        continue;
+                    }
+
                     notify_notification_update(notification, _("A Problem has been Reported"), pi->message, NULL);
                 }
                 else
-- 
1.8.3.1



More information about the Crash-catcher mailing list