File: 25_mute-debug-messages.patch

package info (click to toggle)
evolution-data-server 2.30.3-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 45,704 kB
  • ctags: 26,968
  • sloc: ansic: 223,692; sh: 10,413; makefile: 2,646; xml: 386; perl: 204; python: 30
file content (64 lines) | stat: -rw-r--r-- 1,931 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff --git a/libedataserver/e-categories.c b/libedataserver/e-categories.c
index c581efd..277ca50 100644
--- a/libedataserver/e-categories.c
+++ b/libedataserver/e-categories.c
@@ -26,6 +26,8 @@
 
 #include "libedataserver-private.h"
 
+#define d(x)
+
 typedef struct {
 	gchar *display_name;  /* localized category name */
 	gchar *clocale_name;  /* only for default categories */
@@ -204,7 +206,7 @@ idle_saver_cb (gpointer user_data)
 
 	filename = build_categories_filename ();
 
-	g_debug ("Saving categories to \"%s\"", filename);
+	d (g_debug ("Saving categories to \"%s\"", filename));
 
 	/* Build the file contents. */
 	buffer = g_string_new ("<categories>\n");
@@ -348,7 +350,7 @@ load_categories (void)
 	if (!g_file_test (filename, G_FILE_TEST_EXISTS))
 		goto exit;
 
-	g_debug ("Loading categories from \"%s\"", filename);
+	d (g_debug ("Loading categories from \"%s\"", filename));
 
 	if (!g_file_get_contents (filename, &contents, &length, &error)) {
 		g_warning ("Unable to load categories: %s", error->message);
@@ -404,7 +406,7 @@ migrate_old_categories (void)
 	if (string == NULL || *string == '\0')
 		goto exit;
 
-	g_debug ("Loading categories from GConf key \"%s\"", key);
+	d (g_debug ("Loading categories from GConf key \"%s\"", key));
 
 	n_added = parse_categories (string, strlen (string));
 	if (n_added == 0)
@@ -489,20 +491,20 @@ initialize_categories (void)
 
 	n_added = load_categories ();
 	if (n_added > 0) {
-		g_debug ("Loaded %d categories", n_added);
+		d (g_debug ("Loaded %d categories", n_added));
 		save_is_pending = FALSE;
 		return;
 	}
 
 	n_added = migrate_old_categories ();
 	if (n_added > 0) {
-		g_debug ("Loaded %d categories", n_added);
+		d (g_debug ("Loaded %d categories", n_added));
 		save_categories ();
 		return;
 	}
 
 	load_default_categories ();
-	g_debug ("Loaded default categories");
+	d (g_debug ("Loaded default categories"));
 	save_categories ();
 }