Merge lp:~seb128/update-notifier/unity-bug-reports into lp:update-notifier/ubuntu

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: 607
Proposed branch: lp:~seb128/update-notifier/unity-bug-reports
Merge into: lp:update-notifier/ubuntu
Diff against target: 120 lines (+19/-10)
4 files modified
debian/changelog (+10/-0)
src/crash.c (+9/-6)
src/reboot.c (+0/-2)
src/update-notifier.c (+0/-2)
To merge this branch: bzr merge lp:~seb128/update-notifier/unity-bug-reports
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+44049@code.launchpad.net

Description of the change

let user reports be sent with no systray and clean debug output noise

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-11-17 20:24:15 +0000
3+++ debian/changelog 2010-12-17 13:46:53 +0000
4@@ -1,3 +1,13 @@
5+update-notifier (0.110.1ubuntu2) UNRELEASED; urgency=low
6+
7+ * src/crash.c: if there is no systray report at least the user issues.
8+ The code should still be ported to use an indicator later on.
9+ * src/crash.c: Don't spam the session log with the crash names either.
10+ * src/crash.c, src/reboot.c, src/update-notifier.c:
11+ - clear some debug calls to keep the session log clean
12+
13+ -- Sebastien Bacher <seb128@ubuntu.com> Fri, 17 Dec 2010 11:25:12 +0100
14+
15 update-notifier (0.110.1ubuntu1) natty; urgency=low
16
17 [ Michael Vogt ]
18
19=== modified file 'src/crash.c'
20--- src/crash.c 2009-06-26 10:56:01 +0000
21+++ src/crash.c 2010-12-17 13:46:53 +0000
22@@ -17,12 +17,13 @@
23 static gboolean
24 check_system_crashes() {
25 int exitcode;
26+ gchar *stdlog;
27
28 if(!in_admin_group())
29 return FALSE;
30
31 // check for system crashes
32- if(!g_spawn_command_line_sync(CRASHREPORT_HELPER " --system", NULL, NULL,
33+ if(!g_spawn_command_line_sync(CRASHREPORT_HELPER " --system", &stdlog, NULL,
34 &exitcode, NULL)) {
35 g_warning("Can not run %s\n", CRASHREPORT_HELPER);
36 return FALSE;
37@@ -34,8 +35,7 @@
38 static gboolean
39 run_apport(TrayApplet *ta)
40 {
41- g_debug("fire up the crashreport tool\n");
42- if (check_system_crashes()) {
43+ if (check_system_crashes() && gtk_status_icon_is_embedded (ta->tray_icon)) {
44 invoke_with_gksu(CRASHREPORT_REPORT_APP,
45 _("<span weight=\"bold\" size=\"larger\">Please enter your password to access problem reports of system programs</span>"),
46 TRUE);
47@@ -98,7 +98,7 @@
48 int crashreports_found = 0;
49 static gboolean first_run = TRUE;
50 gboolean system_crashes;
51-
52+ gchar *stdlog;
53 // g_debug("crashreport_check\n");
54
55 // don't do anything if no apport-gtk is installed
56@@ -108,14 +108,13 @@
57 // Check whether the user doesn't want notifications
58 if (!gconf_client_get_bool ((GConfClient*) ta->user_data,
59 GCONF_KEY_APPORT_NOTIFICATIONS, NULL)) {
60- g_debug("apport notifications disabled in gconf, not displaying crashes");
61 return FALSE;
62 }
63
64 // check for (new) reports by calling CRASHREPORT_HELPER
65 // and checking the return code
66 int exitcode;
67- if(!g_spawn_command_line_sync(CRASHREPORT_HELPER, NULL, NULL,
68+ if(!g_spawn_command_line_sync(CRASHREPORT_HELPER, &stdlog, NULL,
69 &exitcode, NULL)) {
70 g_warning("Can not run %s\n", CRASHREPORT_HELPER);
71 return FALSE;
72@@ -137,6 +136,10 @@
73 /* Show the notification, after a delay so it doesn't look ugly
74 * if we've just logged in */
75 g_timeout_add(5000, (GSourceFunc)(show_notification), ta);
76+
77+ if (!gtk_status_icon_is_embedded (ta->tray_icon)) {
78+ run_apport(ta);
79+ }
80 }
81 // crashreport found and already visible
82 else if((crashreports_found > 0) && !(system_crashes || first_run)) {
83
84=== modified file 'src/reboot.c'
85--- src/reboot.c 2010-09-03 09:56:44 +0000
86+++ src/reboot.c 2010-12-17 13:46:53 +0000
87@@ -178,7 +178,6 @@
88 res = FALSE;
89 }
90
91- g_debug("aptdaemon on bus: %i", res);
92 return res;
93 }
94
95@@ -242,7 +241,6 @@
96 // no auto-open of this dialog
97 if(gconf_client_get_bool((GConfClient*) ta->user_data,
98 GCONF_KEY_AUTO_LAUNCH, NULL)) {
99- g_debug ("Skipping reboot required");
100 return;
101 }
102
103
104=== modified file 'src/update-notifier.c'
105--- src/update-notifier.c 2010-10-05 16:33:46 +0000
106+++ src/update-notifier.c 2010-12-17 13:46:53 +0000
107@@ -349,13 +349,11 @@
108 }
109
110 if(un->crashreport_pending) {
111- g_print("checking for valid crashreport now\n");
112 crashreport_check (un->crashreport);
113 un->crashreport_pending = FALSE;
114 }
115
116 if(un->unicast_local_avahi_pending) {
117- g_print("checking for disabled avahi due to unicast .local domain now\n");
118 avahi_disabled_check ();
119 un->unicast_local_avahi_pending = FALSE;
120 }

Subscribers

People subscribed via source and target branches

to all changes: