diff src/event.c @ 5211:0241d6b6702d

[gaim-migrate @ 5581] Wrote a new debugging API, and of course core/ui split it. Debug statements can now have debug levels and categories, for future filtering of stuff, and color highlighting. It's nifty, m'kay? committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 26 Apr 2003 06:46:08 +0000
parents fefad67de2c7
children 5160333a80df
line wrap: on
line diff
--- a/src/event.c	Sat Apr 26 05:31:26 2003 +0000
+++ b/src/event.c	Sat Apr 26 06:46:08 2003 +0000
@@ -21,18 +21,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include "event.h"
+#include "debug.h"
 
 #include <sys/time.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 
-/*
- * XXX - This is for debug_printf! Move out when debug_printf moved to debug.h
- *          -- ChipX86
- */
-#include "gaim.h"
-
 /**
  * A signal callback.
  */
@@ -74,7 +69,8 @@
 
 	callbacks = g_list_append(callbacks, call);
 
-	debug_printf("Adding callback %d\n", g_list_length(callbacks));
+	gaim_debug(GAIM_DEBUG_INFO, "signals",
+			   "Adding callback %d\n", g_list_length(callbacks));
 }
 
 void
@@ -105,7 +101,9 @@
 
 	g_return_if_fail(handle != NULL);
 
-	debug_printf("%d callbacks to search\n", g_list_length(callbacks));
+	gaim_debug(GAIM_DEBUG_INFO, "signals",
+			   "Disconnecting callbacks. %d to search.\n",
+			   g_list_length(callbacks));
 
 	for (c = callbacks; c != NULL; c = c_next) {
 		c_next = c->next;
@@ -114,8 +112,9 @@
 		if (g->handle == handle) {
 			callbacks = g_list_remove(callbacks, (gpointer)g);
 
-			debug_printf("Removing callback, %d remain\n",
-						 g_list_length(callbacks));
+			gaim_debug(GAIM_DEBUG_INFO, "signals",
+					   "Removing callback. %d remain.\n",
+					   g_list_length(callbacks));
 		}
 	}
 }
@@ -276,7 +275,8 @@
 					break;
 
 				default:
-					debug_printf("unknown event %d\n", event);
+					gaim_debug(GAIM_DEBUG_WARNING, "events",
+							   "Unknown event %d\n", event);
 					break;
 			}