Mercurial > pidgin
changeset 5227:6d1707dc8c3d
[gaim-migrate @ 5597]
debug_printf -> gaim_debug
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 26 Apr 2003 17:36:52 +0000 |
parents | a2199ef77cbc |
children | 1a53330dfd34 |
files | plugins/autorecon.c plugins/docklet/docklet.c plugins/filectl.c plugins/gestures/stroke-draw.c plugins/idle.c plugins/perl/perl.c plugins/raw.c plugins/simple.c plugins/spellchk.c plugins/timestamp.c |
diffstat | 10 files changed, 48 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/autorecon.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/autorecon.c Sat Apr 26 17:36:52 2003 +0000 @@ -1,11 +1,5 @@ #include "config.h" -#if 0 -#ifndef GAIM_PLUGINS -#define GAIM_PLUGINS -#endif -#endif - #include "gaim.h" #include "prpl.h" @@ -26,13 +20,13 @@ static gboolean do_signon(gpointer data) { struct gaim_account *account = data; - debug_printf("do_signon called\n"); + gaim_debug(GAIM_DEBUG_INFO, "autorecon", "do_signon called\n"); if (g_slist_index(gaim_accounts, account) < 0) return FALSE; - debug_printf("calling serv_login\n"); + gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling serv_login\n"); serv_login(account); - debug_printf("done calling serv_login\n"); + gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling serv_login\n"); tim = 0; return FALSE; }
--- a/plugins/docklet/docklet.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/docklet/docklet.c Sat Apr 26 17:36:52 2003 +0000 @@ -288,22 +288,22 @@ } static void docklet_embedded(GtkWidget *widget, void *data) { - debug_printf("Tray Icon: embedded\n"); + gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: embedded\n"); gaim_gtk_blist_docklet_add(); } static void docklet_remove_callbacks() { - debug_printf("Tray Icon: removing callbacks"); + gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: removing callbacks"); while (g_source_remove_by_user_data(&docklet)) { - debug_printf("."); + gaim_debug(GAIM_DEBUG_INFO, NULL, "."); } - debug_printf("\n"); + gaim_debug(GAIM_DEBUG_INFO, NULL, "\n"); } static void docklet_destroyed(GtkWidget *widget, void *data) { - debug_printf("Tray Icon: destroyed\n"); + gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: destroyed\n"); gaim_gtk_blist_docklet_remove(); @@ -324,7 +324,8 @@ /* if this is being called when a tray icon exists, it's because something messed up. try destroying it before we proceed, although docklet_refcount may be all hosed. hopefully won't happen. */ - debug_printf("Tray Icon: trying to create icon but it already exists?\n"); + gaim_debug(GAIM_DEBUG_WARNING, "docklet", + "Tray Icon: trying to create icon but it already exists?\n"); plugin_unload(NULL); } @@ -345,7 +346,7 @@ docklet_update_status(); docklet_update_icon(); - debug_printf("Tray Icon: created\n"); + gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: created\n"); return FALSE; /* for when we're called by the glib idle handler */ } @@ -432,7 +433,7 @@ /* do this while gaim has no other way to toggle the global mute */ gaim_sound_set_mute(FALSE); - debug_printf("Tray Icon: removed\n"); + gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: removed\n"); return TRUE; }
--- a/plugins/filectl.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/filectl.c Sat Apr 26 17:36:52 2003 +0000 @@ -35,7 +35,7 @@ while (fgets(buffer, sizeof buffer, file)) { if (buffer[strlen(buffer) - 1] == '\n') buffer[strlen(buffer) - 1] = 0; - debug_printf("read: %s\n", buffer); + gaim_debug(GAIM_DEBUG_MISC, "filectl", "read: %s\n", buffer); command = getarg(buffer, 0, 0); if (!strncasecmp(command, "signon", 6)) { struct gaim_account *account = NULL; @@ -159,7 +159,8 @@ if ((stat (file, &finfo) == 0) && (finfo.st_size > 0)) if (mtime != finfo.st_mtime) { - debug_printf("control changed, checking\n"); + gaim_debug(GAIM_DEBUG_INFO, "filectl", + "control changed, checking\n"); run_commands(); } }
--- a/plugins/gestures/stroke-draw.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/gestures/stroke-draw.c Sat Apr 26 17:36:52 2003 +0000 @@ -262,7 +262,7 @@ (GHashTable*)g_object_get_data(G_OBJECT(widget), GSTROKE_SIGNALS); #if 0 - debug_printf("gstroke %s\n", name); + gaim_debug(GAIM_DEBUG_MISC, "gestures", "gstroke %s\n", name); #endif if (hash_table)
--- a/plugins/idle.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/idle.c Sat Apr 26 17:36:52 2003 +0000 @@ -20,7 +20,8 @@ if (!gc) { return; } - debug_printf("setting idle time for %s to %d\n", gc->username, tm); + gaim_debug(GAIM_DEBUG_INFO, "idle", + "setting idle time for %s to %d\n", gc->username, tm); time(&t); t -= 60 * tm; gc->lastsent = t;
--- a/plugins/perl/perl.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/perl/perl.c Sat Apr 26 17:36:52 2003 +0000 @@ -270,8 +270,9 @@ * return value. */ if (SvTRUE(ERRSV)) { - debug_printf("Perl function %s exited abnormally: %s\n", - function, SvPV(ERRSV, na)); + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Perl function %s exited abnormally: %s\n", + function, SvPV(ERRSV, na)); POPs; } else if (count != 1) { @@ -279,8 +280,9 @@ * This should NEVER happen. G_SCALAR ensures that we WILL * have 1 parameter. */ - debug_printf("Perl error from %s: expected 1 return value, " - "but got %d\n", function, count); + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Perl error from %s: expected 1 return value, " + "but got %d\n", function, count); } else ret_value = POPi; @@ -511,15 +513,12 @@ callback = SvPV(ST(2), junk); unused = SvPV(ST(3), junk); - debug_printf("GAIM::register(%s, %s)\n", name, ver); + gaim_debug(GAIM_DEBUG_INFO, "perl", + "GAIM::register(%s, %s)\n", name, ver); for (pl = gaim_plugins_get_all(); pl != NULL; pl = pl->next) { plug = pl->data; - debug_printf("** Comparing '%s' to '%s' and '%s' to '%s'\n", - name, plug->info->name, ver, - plug->info->version); - if (!strcmp(name, plug->info->name) && !strcmp(ver, plug->info->version)) { @@ -1050,8 +1049,9 @@ /* we can't handle this usefully without gtk/perl bindings */ return 0; default: - debug_printf("someone forgot to handle %s in the perl binding\n", - gaim_event_get_name(event)); + gaim_debug(GAIM_DEBUG_WARNING, "perl", + "Someone forgot to handle %s in the perl binding\n", + gaim_event_get_name(event)); return 0; } @@ -1149,9 +1149,13 @@ handler->handler_name = g_strdup(SvPV(ST(2), junk)); handler->plug = plug; perl_event_handlers = g_list_append(perl_event_handlers, handler); - debug_printf("registered perl event handler for %s\n", handler->event_type); + gaim_debug(GAIM_DEBUG_INFO, "perl", + "Registered perl event handler for %s\n", + handler->event_type); } else { - debug_printf("Invalid handle (%s) registering perl event handler\n", handle); + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Invalid handle (%s) registering perl event handler\n", + handle); } XSRETURN_EMPTY; @@ -1223,14 +1227,17 @@ if (p) { handler = g_new0(struct _perl_timeout_handlers, 1); timeout = 1000 * SvIV(ST(1)); - debug_printf("Adding timeout for %ld seconds.\n", timeout/1000); + gaim_debug(GAIM_DEBUG_INFO, "perl", + "Adding timeout for %ld seconds.\n", timeout/1000); handler->plug = plug; handler->handler_name = g_strdup(SvPV(ST(2), junk)); handler->handler_args = g_strdup(SvPV(ST(3), junk)); perl_timeout_handlers = g_list_append(perl_timeout_handlers, handler); handler->iotag = g_timeout_add(timeout, perl_timeout, handler); } else { - debug_printf("Invalid handle (%s) in adding perl timeout handler.", handle); + gaim_debug(GAIM_DEBUG_ERROR, "perl", + "Invalid handle (%s) in adding perl timeout handler.", + handle); } XSRETURN_EMPTY; }
--- a/plugins/raw.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/raw.c Sat Apr 26 17:36:52 2003 +0000 @@ -62,18 +62,18 @@ write(*a, &seqno, 2); write(*a, &len, 2); write(*a, txt, ntohs(len)); - debug_printf("TOC C: %s\n", txt); + gaim_debug(GAIM_DEBUG_MISC, "raw", "TOC C: %s\n", txt); } break; case PROTO_MSN: write(*(int *)gc->proto_data, txt, strlen(txt)); write(*(int *)gc->proto_data, "\r\n", 2); - debug_printf("MSN C: %s\n", txt); + gaim_debug(GAIM_DEBUG_MISC, "raw", "MSN C: %s\n", txt); break; case PROTO_IRC: write(*(int *)gc->proto_data, txt, strlen(txt)); write(*(int *)gc->proto_data, "\r\n", 2); - debug_printf("IRC C: %s\n", txt); + gaim_debug(GAIM_DEBUG_MISC, "raw", "IRC C: %s\n", txt); break; case PROTO_JABBER: jab_send_raw(*(jconn *)gc->proto_data, txt);
--- a/plugins/simple.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/simple.c Sat Apr 26 17:36:52 2003 +0000 @@ -4,7 +4,7 @@ static gboolean plugin_load(GaimPlugin *plugin) { - debug_printf("simple plugin loaded.\n"); + gaim_debug(GAIM_DEBUG_INFO, "simple", "simple plugin loaded.\n"); return TRUE; } @@ -12,7 +12,7 @@ static gboolean plugin_unload(GaimPlugin *plugin) { - debug_printf("simple plugin unloaded.\n"); + gaim_debug(GAIM_DEBUG_INFO, "simple", "simple plugin unloaded.\n"); return TRUE; }
--- a/plugins/spellchk.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/spellchk.c Sat Apr 26 17:36:52 2003 +0000 @@ -339,7 +339,8 @@ } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &iter)); } if(fclose(f)) { - debug_printf("Error writing to %s: %m\n", tempfilename); + gaim_debug(GAIM_DEBUG_ERROR, "spellchk", + "Error writing to %s: %m\n", tempfilename); unlink(tempfilename); g_free(name); return;
--- a/plugins/timestamp.c Sat Apr 26 15:42:36 2003 +0000 +++ b/plugins/timestamp.c Sat Apr 26 17:36:52 2003 +0000 @@ -50,7 +50,7 @@ tm = 0; tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); - debug_printf("setting time to %d mins\n", tm); + gaim_debug(GAIM_DEBUG_MISC, "timestamp", "setting time to %d mins\n", tm); tm = tm * 60 * 1000;