Mercurial > pidgin
changeset 11033:50224ac8184d
[gaim-migrate @ 12919]
Ok, this is debug window filtering. Sadrul was going to do this with a text entry, but I like this better, feel free to disagree with me. It's not the prettiest in a couple places, most notable gtkmain.c where a bunch of categories that don't currently have a home get registered. I added some plugin_(un)load functions to some plugins to place the (un)register functions. Though I didn't do that for the prpls. Comments and cleanups welcome. (Oh, I've been seeing some crashes on quit, but I haven't been able to get it to happen reliably so I'm not sure if it's my code or some transient HEAD oscar/other crash.)
committer: Tailor Script <tailor@pidgin.im>
line wrap: on
line diff
--- a/plugins/autorecon.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/autorecon.c Tue Jun 28 06:13:07 2005 +0000 @@ -227,6 +227,7 @@ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("autorecon"); /* this was the suggested way to override a single function of the real ui ops. However, there's a mild concern of having more than one @@ -279,6 +280,8 @@ g_free(new_ops); old_ops = new_ops = NULL; + gaim_debug_unregister_category("autorecon"); + return TRUE; }
--- a/plugins/ciphertest.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/ciphertest.c Tue Jun 28 06:13:07 2005 +0000 @@ -179,12 +179,21 @@ **************************************************************************/ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("cipher-test"); + cipher_test_md5(); cipher_test_sha1(); return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) { + gaim_debug_unregister_category("cipher-test"); + + return TRUE; +} + static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -207,7 +216,7 @@ GAIM_WEBSITE, /**< homepage */ plugin_load, /**< load */ - NULL, /**< unload */ + plugin_unload, /**< unload */ NULL, /**< destroy */ NULL, /**< ui_info */
--- a/plugins/docklet/docklet.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/docklet/docklet.c Tue Jun 28 06:13:07 2005 +0000 @@ -471,6 +471,8 @@ void *accounts_handle = gaim_accounts_get_handle(); void *core_handle = gaim_get_core(); + gaim_debug_register_category("tray icon"); + gaim_debug(GAIM_DEBUG_INFO, "tray icon", "plugin loaded\n"); handle = plugin; @@ -512,6 +514,8 @@ gaim_debug(GAIM_DEBUG_INFO, "tray icon", "plugin unloaded\n"); + gaim_debug_register_category("tray icon"); + return TRUE; }
--- a/plugins/filectl.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/filectl.c Tue Jun 28 06:13:07 2005 +0000 @@ -216,6 +216,8 @@ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("filectl"); + init_file(); check = gaim_timeout_add(5000, (GSourceFunc)check_file, NULL); @@ -227,6 +229,8 @@ { gaim_timeout_remove(check); + gaim_debug_unregister_category("filectl"); + return TRUE; }
--- a/plugins/gaim-remote/remote.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/gaim-remote/remote.c Tue Jun 28 06:13:07 2005 +0000 @@ -770,6 +770,9 @@ GIOChannel *channel; char *buf = NULL; + gaim_debug_register_category("cui"); + gaim_debug_register_category("gaim_remote_handle_uri"); + if ((UI_fd = open_socket(&buf)) < 0) { gaim_notify_error(NULL, NULL, _("Unable to open socket"), buf); g_free(buf); @@ -803,6 +806,9 @@ gaim_debug_misc("core", "Removed core\n"); + gaim_debug_unregister_category("cui"); + gaim_debug_unregister_category("gaim_remote_handle_uri"); + return TRUE; #else return FALSE;
--- a/plugins/gestures/gestures.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/gestures/gestures.c Tue Jun 28 06:13:07 2005 +0000 @@ -185,6 +185,8 @@ GaimConversation *conv; GList *l; + gaim_debug_register_category("gestures"); + for (l = gaim_get_conversations(); l != NULL; l = l->next) { conv = (GaimConversation *)l->data; @@ -219,6 +221,8 @@ gstroke_cleanup(gtkconv->imhtml); } + gaim_debug_register_category("gestures"); + return TRUE; }
--- a/plugins/gevolution/gevolution.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/gevolution/gevolution.c Tue Jun 28 06:13:07 2005 +0000 @@ -256,6 +256,8 @@ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("evolution"); + bonobo_activate(); backup_blist_ui_ops = gaim_blist_get_ui_ops(); @@ -296,6 +298,8 @@ book = NULL; } + gaim_debug_unregister_category("evolution"); + return TRUE; }
--- a/plugins/gtk-signals-test.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/gtk-signals-test.c Tue Jun 28 06:13:07 2005 +0000 @@ -70,6 +70,8 @@ void *blist_handle = gaim_gtk_blist_get_handle(); void *conv_handle = gaim_gtk_conversations_get_handle(); + gaim_debug_register_category("gtk-signal-test"); + /* Accounts subsystem signals */ gaim_signal_connect(accounts_handle, "account-modified", plugin, GAIM_CALLBACK(account_modified_cb), NULL); @@ -87,6 +89,12 @@ return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + gaim_debug_unregister_category("gtk-signal-test"); +} + static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -109,7 +117,7 @@ GAIM_WEBSITE, /**< homepage */ plugin_load, /**< load */ - NULL, /**< unload */ + plugin_unload, /**< unload */ NULL, /**< destroy */ NULL, /**< ui_info */
--- a/plugins/idle.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/idle.c Tue Jun 28 06:13:07 2005 +0000 @@ -83,6 +83,21 @@ return l; } +static gboolean +plugin_load(GaimPlugin *plugin) +{ + gaim_debug_register_category("idle"); + + return TRUE; +} + +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + gaim_debug_unregister_category("idle"); + + return TRUE; +} static GaimPluginInfo info = { @@ -101,8 +116,8 @@ N_("Allows you to hand-configure how long you've been idle for"), "Eric Warmenhoven <eric@warmenhoven.org>", GAIM_WEBSITE, - NULL, - NULL, + plugin_load, + plugin_unload, NULL, NULL, NULL,
--- a/plugins/ipc-test-client.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/ipc-test-client.c Tue Jun 28 06:13:07 2005 +0000 @@ -32,6 +32,8 @@ gboolean ok; int result; + gaim_debug_register_category("ipc-test-client"); + server_plugin = gaim_plugins_find_with_id("core-ipc-test-server"); if (server_plugin == NULL) @@ -72,6 +74,12 @@ return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + gaim_debug_unregister_category("ipc-test-client"); +} + static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -95,7 +103,7 @@ GAIM_WEBSITE, /**< homepage */ plugin_load, /**< load */ - NULL, /**< unload */ + plugin_unload, /**< unload */ NULL, /**< destroy */ NULL, /**< ui_info */
--- a/plugins/ipc-test-server.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/ipc-test-server.c Tue Jun 28 06:13:07 2005 +0000 @@ -44,6 +44,8 @@ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("ipc-test-server"); + gaim_plugin_ipc_register(plugin, "add", GAIM_CALLBACK(add_func), gaim_marshal_INT__INT_INT, gaim_value_new(GAIM_TYPE_INT), 2, @@ -59,6 +61,12 @@ return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + gaim_debug_unregister_category("ipc-test-server"); +} + static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -82,7 +90,7 @@ GAIM_WEBSITE, /**< homepage */ plugin_load, /**< load */ - NULL, /**< unload */ + plugin_unload, /**< unload */ NULL, /**< destroy */ NULL, /**< ui_info */
--- a/plugins/mailchk.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/mailchk.c Tue Jun 28 06:13:07 2005 +0000 @@ -117,6 +117,8 @@ GaimBuddyList *list = gaim_get_blist(); void *conn_handle = gaim_connections_get_handle(); + gaim_debug_register_category("mailchk"); + if (!check_timeout(NULL)) { gaim_debug_warning("mailchk", "Could not read $MAIL or /var/spool/mail/$USER"); return FALSE; @@ -143,6 +145,8 @@ gtk_widget_destroy(mail); mail = NULL; + gaim_debug_unregister_category("mailchk"); + return TRUE; }
--- a/plugins/perl/perl.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/perl/perl.c Tue Jun 28 06:13:07 2005 +0000 @@ -504,10 +504,20 @@ } static gboolean +plugin_load(GaimPlugin *plugin) +{ + gaim_debug_register_category("perl"); + + return TRUE; +} + +static gboolean plugin_unload(GaimPlugin *plugin) { perl_end(); + gaim_debug_unregister_category("perl"); + return TRUE; } @@ -539,7 +549,7 @@ "Christian Hammond <chipx86@gnupdate.org>", /**< author */ GAIM_WEBSITE, /**< homepage */ - NULL, /**< load */ + plugin_load, /**< load */ plugin_unload, /**< unload */ NULL, /**< destroy */
--- a/plugins/raw.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/raw.c Tue Jun 28 06:13:07 2005 +0000 @@ -94,6 +94,8 @@ GtkWidget *entry; GtkWidget *dropdown; + gaim_debug_register_category("raw"); + /* Setup the window. */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width(GTK_CONTAINER(window), 6); @@ -134,6 +136,8 @@ window = NULL; + gaim_debug_register_category("raw"); + return TRUE; }
--- a/plugins/signals-test.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/signals-test.c Tue Jun 28 06:13:07 2005 +0000 @@ -488,6 +488,8 @@ void *ciphers_handle = gaim_ciphers_get_handle(); void *buddy_icons_handle = gaim_buddy_icons_get_handle(); + gaim_debug_register_category("signals-test"); + /* Accounts subsystem signals */ gaim_signal_connect(accounts_handle, "account-connecting", plugin, GAIM_CALLBACK(account_connecting_cb), NULL); @@ -609,6 +611,12 @@ return TRUE; } +static gboolean +plugin_unload(GaimPlugin *plugin) +{ + gaim_debug_unregister_category("signals-test"); +} + static GaimPluginInfo info = { GAIM_PLUGIN_MAGIC, @@ -631,7 +639,7 @@ GAIM_WEBSITE, /**< homepage */ plugin_load, /**< load */ - NULL, /**< unload */ + plugin_unload, /**< unload */ NULL, /**< destroy */ NULL, /**< ui_info */
--- a/plugins/simple.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/simple.c Tue Jun 28 06:13:07 2005 +0000 @@ -6,6 +6,8 @@ static gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("simple"); + gaim_debug(GAIM_DEBUG_INFO, "simple", "simple plugin loaded.\n"); return TRUE; @@ -16,6 +18,8 @@ { gaim_debug(GAIM_DEBUG_INFO, "simple", "simple plugin unloaded.\n"); + gaim_debug_unregister_category("simple"); + return TRUE; }
--- a/plugins/ssl/ssl-gnutls.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/ssl/ssl-gnutls.c Tue Jun 28 06:13:07 2005 +0000 @@ -187,12 +187,15 @@ plugin_load(GaimPlugin *plugin) { #ifdef HAVE_GNUTLS + gaim_debug_register_category("gnutls"); + if (!gaim_ssl_get_ops()) { gaim_ssl_set_ops(&ssl_ops); } - /* Init GNUTLS now so others can use it even if sslconn never does */ - ssl_gnutls_init_gnutls(); + /* Init GNUTLS now so others can use it even if sslconn never does */ + ssl_gnutls_init_gnutls(); + return TRUE; #else return FALSE; @@ -208,6 +211,8 @@ } #endif + gaim_debug_unregister_category("gnutls"); + return TRUE; }
--- a/plugins/ssl/ssl-nss.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/ssl/ssl-nss.c Tue Jun 28 06:13:07 2005 +0000 @@ -279,12 +279,15 @@ plugin_load(GaimPlugin *plugin) { #ifdef HAVE_NSS + gaim_debug_register_category("nss"); + if (!gaim_ssl_get_ops()) { gaim_ssl_set_ops(&ssl_ops); } - /* Init NSS now, so others can use it even if sslconn never does */ - ssl_nss_init_nss(); + /* Init NSS now, so others can use it even if sslconn never does */ + ssl_nss_init_nss(); + return TRUE; #else return FALSE; @@ -300,6 +303,8 @@ } #endif + gaim_debug_unregister_category("nss"); + return TRUE; }
--- a/plugins/tcl/tcl.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/tcl/tcl.c Tue Jun 28 06:13:07 2005 +0000 @@ -319,6 +319,8 @@ static gboolean tcl_load(GaimPlugin *plugin) { + gaim_debug_register_category("tcl"); + if(!tcl_loaded) return FALSE; tcl_glib_init(); @@ -337,6 +339,8 @@ g_hash_table_destroy(tcl_plugins); tcl_plugins = NULL; + gaim_debug_unregister_category("tcl"); + return TRUE; }
--- a/plugins/timestamp.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/timestamp.c Tue Jun 28 06:13:07 2005 +0000 @@ -233,6 +233,8 @@ { void *conv_handle = gaim_conversations_get_handle(); + gaim_debug_register_category("timestamp"); + init_timer_list(); gaim_signal_connect(conv_handle, "conversation-created", @@ -264,6 +266,8 @@ gtk_imhtml_show_comments(GTK_IMHTML(conv->imhtml), TRUE); } + gaim_debug_unregister_category("timestamp"); + return TRUE; }
--- a/plugins/win32/transparency/win2ktrans.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/win32/transparency/win2ktrans.c Tue Jun 28 06:13:07 2005 +0000 @@ -340,6 +340,8 @@ * EXPORTED FUNCTIONS */ gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category(WINTRANS_PLUGIN_ID); + imalpha = gaim_prefs_get_int(OPT_WINTRANS_IM_ALPHA); blalpha = gaim_prefs_get_int(OPT_WINTRANS_BL_ALPHA); @@ -376,6 +378,8 @@ if(blist) set_wintrans_off(blist); + gaim_debug_unregister_category(WINTRANS_PLUGIN_ID); + return TRUE; }
--- a/plugins/win32/winprefs/winprefs.c Sun Jun 26 01:14:51 2005 +0000 +++ b/plugins/win32/winprefs/winprefs.c Tue Jun 28 06:13:07 2005 +0000 @@ -329,6 +329,9 @@ */ gboolean plugin_load(GaimPlugin *plugin) { + gaim_debug_register_category("gtkappbar"); + gaim_debug_register_category(WINPREFS_PLUGIN_ID); + /* Find out how to go blinky */ load_winver_specific_procs(); @@ -358,6 +361,10 @@ gboolean plugin_unload(GaimPlugin *plugin) { blist_set_dockable(FALSE); blist_set_ontop(FALSE); + + gaim_debug_unregister_category("gtkappbar"); + gaim_debug_unregister_category(WINPREFS_PLUGIN_ID); + return TRUE; }
--- a/src/account.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/account.c Tue Jun 28 06:13:07 2005 +0000 @@ -1820,6 +1820,8 @@ { void *handle = gaim_accounts_get_handle(); + gaim_debug_register_category("account"); + gaim_signal_register(handle, "account-connecting", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, @@ -1874,4 +1876,6 @@ } gaim_signals_unregister_by_instance(gaim_accounts_get_handle()); + + gaim_debug_unregister_category("account"); }
--- a/src/blist.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/blist.c Tue Jun 28 06:13:07 2005 +0000 @@ -2550,6 +2550,8 @@ { void *handle = gaim_blist_get_handle(); + gaim_debug_register_category("blist"); + gaim_signal_register(handle, "buddy-away", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, @@ -2603,4 +2605,6 @@ } gaim_signals_unregister_by_instance(gaim_blist_get_handle()); + + gaim_debug_unregister_category("blist"); }
--- a/src/buddyicon.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/buddyicon.c Tue Jun 28 06:13:07 2005 +0000 @@ -473,6 +473,8 @@ void gaim_buddy_icons_init() { + gaim_debug_register_category("buddy icons"); + account_cache = g_hash_table_new_full( g_direct_hash, g_direct_equal, NULL, (GFreeFunc)g_hash_table_destroy); @@ -484,7 +486,7 @@ gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_BUDDY_ICON), gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_BLIST_BUDDY), + GAIM_SUBTYPE_BLIST_BUDDY), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_STRING)); } @@ -493,6 +495,8 @@ gaim_buddy_icons_uninit() { g_hash_table_destroy(account_cache); + + gaim_debug_unregister_category("buddy icons"); } void gaim_buddy_icon_get_scale_size(GaimBuddyIconSpec *spec, int *width, int *height)
--- a/src/connection.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/connection.c Tue Jun 28 06:13:07 2005 +0000 @@ -501,6 +501,8 @@ { void *handle = gaim_connections_get_handle(); + gaim_debug_register_category("connection"); + gaim_signal_register(handle, "signing-on", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, @@ -526,6 +528,8 @@ gaim_connections_uninit(void) { gaim_signals_unregister_by_instance(gaim_connections_get_handle()); + + gaim_debug_unregister_category("connection"); } void *
--- a/src/conversation.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/conversation.c Tue Jun 28 06:13:07 2005 +0000 @@ -2697,6 +2697,8 @@ { void *handle = gaim_conversations_get_handle(); + gaim_debug_register_category("conversation"); + /********************************************************************** * Register preferences **********************************************************************/ @@ -2988,4 +2990,6 @@ while (conversations) gaim_conversation_destroy((GaimConversation*)conversations->data); gaim_signals_unregister_by_instance(gaim_conversations_get_handle()); + + gaim_debug_unregister_category("conversation"); }
--- a/src/core.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/core.c Tue Jun 28 06:13:07 2005 +0000 @@ -76,14 +76,7 @@ * for protocol prefs to work. */ gaim_prefs_init(); - /* Initialize all static protocols. */ - static_proto_init(); - - /* Since plugins get probed so early we should probably initialize their - * subsystem right away too. - */ - gaim_plugins_init(); - gaim_plugins_probe(GAIM_PLUGIN_EXT); + gaim_debug_init(); if (ops != NULL) { @@ -94,13 +87,23 @@ ops->debug_ui_init(); } + gaim_debug_register_category("main"); + + /* Initialize all static protocols. */ + static_proto_init(); + + /* Since plugins get probed so early we should probably initialize their + * subsystem right away too. + */ + gaim_plugins_init(); + gaim_plugins_probe(GAIM_PLUGIN_EXT); + gaim_status_init(); gaim_savedstatuses_init(); gaim_accounts_init(); gaim_ciphers_init(); gaim_connections_init(); gaim_conversations_init(); - gaim_debug_init(); gaim_blist_init(); gaim_log_init(); gaim_buddy_icons_init(); @@ -160,6 +163,9 @@ core->ui = NULL; } + /* I think this is where this should go */ + gaim_debug_unregister_category("main"); + g_free(core); _core = NULL;
--- a/src/debug.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/debug.c Tue Jun 28 06:13:07 2005 +0000 @@ -40,6 +40,8 @@ */ static gboolean debug_enabled = FALSE; +/* XXX I want to make this static but gg uses this for internal debug level + * stuff and I don't really feel like unwrapping it right now. -Etan */ void gaim_debug_vargs(GaimDebugLevel level, const char *category, const char *format, va_list args) @@ -156,6 +158,32 @@ } void +gaim_debug_register_category(const char *category) +{ + GaimDebugUiOps *ops; + + g_return_if_fail(category != NULL); + + ops = gaim_debug_get_ui_ops(); + + if (ops != NULL && ops->register_category != NULL) + ops->register_category(category); +} + +void +gaim_debug_unregister_category(const char *category) +{ + GaimDebugUiOps *ops; + + g_return_if_fail(category != NULL); + + ops = gaim_debug_get_ui_ops(); + + if (ops != NULL && ops->unregister_category != NULL) + ops->unregister_category(category); +} + +void gaim_debug_set_enabled(gboolean enabled) { debug_enabled = enabled;
--- a/src/debug.h Sun Jun 26 01:14:51 2005 +0000 +++ b/src/debug.h Tue Jun 28 06:13:07 2005 +0000 @@ -49,7 +49,8 @@ { void (*print)(GaimDebugLevel level, const char *category, const char *format, va_list args); - + void (*register_category)(const char *category); + void (*unregister_category)(const char *category); } GaimDebugUiOps; #ifdef __cplusplus @@ -150,6 +151,20 @@ void gaim_debug_fatal(const char *category, const char *format, ...); /** + * Registers a debug category so that it can be filtered on. + * + * @param category The category to register. + */ +void gaim_debug_register_category(const char *category); + +/** + * Remove a registered category. + * + * @param category The category to unregister. + */ +void gaim_debug_unregister_category(const char *category); + +/** * Enable or disable printing debug output to the console. * * @param enabled TRUE to enable debug output or FALSE to disable it.
--- a/src/gtkaccount.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkaccount.c Tue Jun 28 06:13:07 2005 +0000 @@ -2507,6 +2507,8 @@ void gaim_gtk_account_init(void) { + gaim_debug_register_category("buddyicon"); + gaim_prefs_add_none("/gaim/gtk/accounts"); gaim_prefs_add_none("/gaim/gtk/accounts/dialog"); gaim_prefs_add_int("/gaim/gtk/accounts/dialog/width", 550); @@ -2522,4 +2524,6 @@ gaim_gtk_account_uninit(void) { gaim_signals_unregister_by_instance(gaim_gtk_account_get_handle()); + + gaim_debug_unregister_category("buddyicon"); }
--- a/src/gtkblist.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkblist.c Tue Jun 28 06:13:07 2005 +0000 @@ -4915,6 +4915,8 @@ { void *gtk_blist_handle = gaim_gtk_blist_get_handle(); + gaim_debug_register_category("gtkblist"); + gaim_signal_connect(gaim_connections_get_handle(), "signed-on", gtk_blist_handle, GAIM_CALLBACK(account_signon_cb), NULL); @@ -4947,6 +4949,8 @@ void gaim_gtk_blist_uninit(void) { gaim_signals_unregister_by_instance(gaim_gtk_blist_get_handle()); + + gaim_debug_unregister_category("gtkblist"); } /*********************************************************************
--- a/src/gtkconn.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkconn.c Tue Jun 28 06:13:07 2005 +0000 @@ -57,7 +57,6 @@ gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), (gaim_connections_get_connecting() != NULL)); gaim_gtk_blist_update_protocol_actions(); - } static void gaim_gtk_connection_disconnected(GaimConnection *gc)
--- a/src/gtkconv.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkconv.c Tue Jun 28 06:13:07 2005 +0000 @@ -6092,6 +6092,8 @@ { void *handle = gaim_gtk_conversations_get_handle(); + gaim_debug_register_category("gtkconv"); + /* Conversations */ gaim_prefs_add_none("/gaim/gtk/conversations"); gaim_prefs_add_bool("/gaim/gtk/conversations/close_on_tabs", TRUE); @@ -6189,4 +6191,6 @@ { gaim_prefs_disconnect_by_handle(gaim_gtk_conversations_get_handle()); gaim_signals_unregister_by_instance(gaim_gtk_conversations_get_handle()); + + gaim_debug_unregister_category("gtkconv"); }
--- a/src/gtkdebug.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkdebug.c Tue Jun 28 06:13:07 2005 +0000 @@ -42,6 +42,9 @@ GtkWidget *text; GtkWidget *find; + /* The category filter tree view. */ + GtkWidget *treeview; + gboolean timestamps; gboolean paused; @@ -58,6 +61,9 @@ static DebugWindow *debug_win = NULL; +static GHashTable *debug_categories = NULL; +static gboolean filter_enabled = FALSE; + struct _find { DebugWindow *window; GtkWidget *entry; @@ -220,6 +226,26 @@ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), GPOINTER_TO_INT(value)); } +static void +filter_cb(GtkToggleButton *button, DebugWindow *win) +{ + if (gtk_toggle_button_get_active(button)) { + filter_enabled = TRUE; + } else { + filter_enabled = FALSE; + } +} + +static void +debug_liststore_append(gpointer key, gpointer value, gpointer user_data) +{ + GtkTreeIter iter; + GtkListStore **liststore = (GtkListStore **)user_data; + + gtk_list_store_append(*liststore, &iter); + gtk_list_store_set(*liststore, &iter, 0, key, -1); +} + static DebugWindow * debug_window_new(void) { @@ -229,6 +255,10 @@ GtkWidget *frame; GtkWidget *button; GtkWidget *image; + GtkListStore *liststore = NULL; + GtkCellRenderer *renderer = NULL; + GtkTreeSelection *selection = NULL; + GtkTreeViewColumn *column = NULL; int width, height; win = g_new0(DebugWindow, 1); @@ -238,16 +268,16 @@ GAIM_DIALOG(win->window); gaim_debug_info("gtkdebug", "Setting dimensions to %d, %d\n", - width, height); + width, height); gtk_window_set_default_size(GTK_WINDOW(win->window), width, height); gtk_window_set_role(GTK_WINDOW(win->window), "debug"); gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); g_signal_connect(G_OBJECT(win->window), "delete_event", - G_CALLBACK(debug_window_destroy), NULL); + G_CALLBACK(debug_window_destroy), NULL); g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(configure_cb), win); + G_CALLBACK(configure_cb), win); /* Setup the vbox */ vbox = gtk_vbox_new(FALSE, 0); @@ -256,45 +286,85 @@ if (gaim_prefs_get_bool("/gaim/gtk/debug/toolbar")) { /* Setup our top button bar thingie. */ toolbar = gtk_toolbar_new(); - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ); + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), + GTK_TOOLBAR_BOTH_HORIZ); gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), - GTK_ICON_SIZE_SMALL_TOOLBAR); + GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); /* Find button */ gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_FIND, - NULL, NULL, G_CALLBACK(find_cb), win, -1); + NULL, NULL, G_CALLBACK(find_cb), + win, -1); /* Save */ gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_SAVE, - NULL, NULL, G_CALLBACK(save_cb), win, -1); + NULL, NULL, G_CALLBACK(save_cb), + win, -1); /* Clear button */ gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, - NULL, NULL, G_CALLBACK(clear_cb), win, -1); + NULL, NULL, G_CALLBACK(clear_cb), + win, -1); gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); /* Pause */ image = gtk_image_new_from_stock(GAIM_STOCK_PAUSE, GTK_ICON_SIZE_MENU); button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, - NULL, _("Pause"), NULL, NULL, - image, G_CALLBACK(pause_cb), win); + GTK_TOOLBAR_CHILD_TOGGLEBUTTON, + NULL, _("Pause"), NULL, + NULL, image, + G_CALLBACK(pause_cb), win); /* Timestamps */ button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, - NULL, _("Timestamps"), NULL, NULL, - NULL, G_CALLBACK(timestamps_cb), - win); + GTK_TOOLBAR_CHILD_TOGGLEBUTTON, + NULL, _("Timestamps"), + NULL, NULL, NULL, + G_CALLBACK(timestamps_cb), + win); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), - gaim_prefs_get_bool("/core/debug/timestamps")); + gaim_prefs_get_bool("/core/debug/timestamps")); + + gaim_prefs_connect_callback(gaim_gtk_debug_get_handle(), + "/core/debug/timestamps", + timestamps_pref_cb, button); + + button = gtk_check_button_new_with_label(_("Filter")); + g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(filter_cb), win); + button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), + GTK_TOOLBAR_CHILD_WIDGET, + button, NULL, NULL, NULL, + NULL, NULL, NULL); + + button = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(button), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); - gaim_prefs_connect_callback(gaim_gtk_debug_get_handle(), "/core/debug/timestamps", - timestamps_pref_cb, button); + liststore = gtk_list_store_new(1, G_TYPE_STRING); + win->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(liststore)); + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Filter"), renderer, "text", 0, NULL); + + gtk_tree_view_append_column(GTK_TREE_VIEW(win->treeview), column); + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(win->treeview), FALSE); + gtk_tree_view_set_fixed_height_mode(GTK_TREE_VIEW(win->treeview), TRUE); + gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(liststore), 0, GTK_SORT_ASCENDING); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(win->treeview)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); + + g_hash_table_foreach(debug_categories, (GHFunc)debug_liststore_append, &liststore); + + gtk_container_add(GTK_CONTAINER(button), win->treeview); + button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), + GTK_TOOLBAR_CHILD_WIDGET, + button, NULL, NULL, + NULL, NULL, NULL, NULL); } /* Add the gtkimhtml */ @@ -375,6 +445,8 @@ void gaim_gtk_debug_init(void) { + gaim_debug_register_category("gtkdebug"); + /* Debug window preferences. */ /* * NOTE: This must be set before prefs are loaded, and the callbacks @@ -417,6 +489,14 @@ } void +gaim_gtk_debug_uninit(void) +{ + gaim_debug_unregister_category("gtkdebug"); + + gaim_debug_set_ui_ops(NULL); +} + +void gaim_gtk_debug_window_show(void) { if (debug_win == NULL) @@ -437,6 +517,47 @@ } static void +create_debug_selected_categories(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + GHashTable **hashtable = (GHashTable **)data; + char *text = NULL; + + gtk_tree_model_get(model, iter, 0, &text, -1); + + g_hash_table_insert(*hashtable, text, NULL); +} + +static gboolean +debug_is_filtered_out(const char *category) +{ + GtkTreeSelection *selection = NULL; + GHashTable *hashtable = NULL; + gboolean found = FALSE; + + if (category == NULL) + return FALSE; + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(debug_win->treeview)); + hashtable = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, + NULL); + + gtk_tree_selection_selected_foreach(selection, + create_debug_selected_categories, + &hashtable); + + if (filter_enabled) { + if (g_hash_table_lookup_extended(hashtable, category, NULL, NULL)) + found = FALSE; + else + found = TRUE; + } + + g_hash_table_destroy(hashtable); + return found; +} + +static void gaim_gtk_debug_print(GaimDebugLevel level, const char *category, const char *format, va_list args) { @@ -445,7 +566,8 @@ gchar *esc_s, *cat_s, *tmp, *s; if (!gaim_prefs_get_bool("/gaim/gtk/debug/enabled") || - (debug_win == NULL) || debug_win->paused) { + (debug_win == NULL) || debug_win->paused || + debug_is_filtered_out(category)) { return; } @@ -454,8 +576,8 @@ arg_s = g_strdup_vprintf(format, args); /* - * For some reason we only print the timestamp if category is - * not NULL. Why the hell do we do that? --Mark + * For some reason we only print the timestamp if category is + * not NULL. Why the hell do we do that? --Mark */ if ((category != NULL) && (timestamps)) { gchar mdate[64]; @@ -498,9 +620,70 @@ g_free(s); } +static void +gaim_gtk_debug_register_category(const char *category) +{ + /* XXX I'd like to be able to put this creation in _init, but that + * would require that this be init:ed before anything that wants to + * register a category, and I'm not sure I can count on this coming + * first */ + if (debug_categories == NULL) + debug_categories = g_hash_table_new_full(g_str_hash, + g_str_equal, + g_free, NULL); + + if (!g_hash_table_lookup_extended(debug_categories, category, NULL, NULL)) { + g_hash_table_insert(debug_categories, g_strdup(category), NULL); + + if (debug_win != NULL && debug_win->treeview != NULL) { + GtkTreeModel *model = NULL; + GtkTreeIter iter; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(debug_win->treeview)); + + gtk_list_store_append(GTK_LIST_STORE(model), &iter); + gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, + category, -1); + } + } +} + +static gboolean +find_and_remove_category(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + GValue value = {0}; + + gtk_tree_model_get_value(model, iter, 0, &value); + + if (strcmp(g_value_get_string(&value), data) == 0) { + gtk_list_store_remove(GTK_LIST_STORE(model), iter); + + return TRUE; + } + + return FALSE; +} + +static void +gaim_gtk_debug_unregister_category(const char *category) +{ + GtkTreeModel *model = NULL; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(debug_win->treeview)); + + gtk_tree_model_foreach(model, + (GtkTreeModelForeachFunc)find_and_remove_category, + (char *)category); + + g_hash_table_remove(debug_categories, category); +} + static GaimDebugUiOps ops = { - gaim_gtk_debug_print + gaim_gtk_debug_print, + gaim_gtk_debug_register_category, + gaim_gtk_debug_unregister_category }; GaimDebugUiOps *
--- a/src/gtkdebug.h Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkdebug.h Tue Jun 28 06:13:07 2005 +0000 @@ -33,6 +33,11 @@ void gaim_gtk_debug_init(void); /** + * Uninitialized the GTK+ debug system. + */ +void gaim_gtk_debug_uninit(void); + +/** * Get the handle for the GTK+ debug system. * * @return the handle to the debug system
--- a/src/gtkft.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkft.c Tue Jun 28 06:13:07 2005 +0000 @@ -1135,6 +1135,8 @@ gaim_prefs_add_none("/gaim/gtk/filetransfer"); gaim_prefs_add_bool("/gaim/gtk/filetransfer/clear_finished", TRUE); gaim_prefs_add_bool("/gaim/gtk/filetransfer/keep_open", FALSE); + + gaim_debug_register_category("ft"); } void
--- a/src/gtkmain.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkmain.c Tue Jun 28 06:13:07 2005 +0000 @@ -290,6 +290,7 @@ gaim_gtk_blist_uninit(); gaim_gtk_account_uninit(); gaim_gtk_xfers_uninit(); + gaim_gtk_debug_uninit(); /* and end it all... */ gtk_main_quit(); @@ -528,6 +529,8 @@ if (!gui_check) { char *display = gdk_get_display(); + printf("Gaim %s\n", VERSION); + g_warning("cannot open display: %s", display ? display : "unset"); g_free(display); @@ -678,6 +681,40 @@ startup_notification_complete(); #endif + gaim_debug_register_category("sighandler"); + gaim_debug_register_category("ui_main"); + + /* XXX These don't really belong here, but I don't have a better place for + * them right now */ + gaim_debug_register_category("gtkimhtml"); + gaim_debug_register_category("gtk_imhtml_tip"); + gaim_debug_register_category("html clipboard"); + /* #if 0'ed out for Windows stuff + gaim_debug_register_category("imhtml clipboard"); + */ + gaim_debug_register_category("imgstore"); + gaim_debug_register_category("pluginpref"); + gaim_debug_register_category("request"); + gaim_debug_register_category("roomlist"); + /* gtkutils.c */ + gaim_debug_register_category("accels"); + gaim_debug_register_category("gtkspell"); + /* These are from util.c */ + gaim_debug_register_category("build_dir"); + gaim_debug_register_category("gaim_mkstemp"); + gaim_debug_register_category("gaim_str_add_cr"); + gaim_debug_register_category("gaim_url_fetch"); + gaim_debug_register_category("gaim_utf8_strcasecmp"); + gaim_debug_register_category("parse_content_len"); + gaim_debug_register_category("program_is_valid"); + gaim_debug_register_category("util"); + /* These only show up once */ + gaim_debug_register_category("gtknotify"); + gaim_debug_register_category("gtksound"); + gaim_debug_register_category("prpl"); + gaim_debug_register_category("server"); + gaim_debug_register_category("stringref"); + gtk_main(); #ifdef _WIN32
--- a/src/gtkprefs.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtkprefs.c Tue Jun 28 06:13:07 2005 +0000 @@ -2230,6 +2230,8 @@ void gaim_gtk_prefs_init(void) { + gaim_debug_register_category("theme dnd"); + gaim_prefs_add_none("/gaim"); gaim_prefs_add_none("/gaim/gtk"); gaim_prefs_add_none("/plugins/gtk");
--- a/src/gtksound.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/gtksound.c Tue Jun 28 06:13:07 2005 +0000 @@ -164,6 +164,8 @@ { void *gtk_sound_handle = gaim_gtk_sound_get_handle(); + gaim_debug_register_category("sound"); + gaim_signal_connect(gaim_connections_get_handle(), "signed-on", gtk_sound_handle, GAIM_CALLBACK(account_signon_cb), NULL); @@ -214,6 +216,8 @@ ao_shutdown(); #endif sound_initialized = FALSE; + + gaim_debug_unregister_category("sound"); } #ifdef USE_NAS_AUDIO
--- a/src/log.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/log.c Tue Jun 28 06:13:07 2005 +0000 @@ -441,6 +441,8 @@ void gaim_log_init(void) { + gaim_debug_register_category("log"); + gaim_prefs_add_none("/core/logging"); gaim_prefs_add_bool("/core/logging/log_ims", FALSE); gaim_prefs_add_bool("/core/logging/log_chats", FALSE);
--- a/src/network.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/network.c Tue Jun 28 06:13:07 2005 +0000 @@ -279,6 +279,8 @@ void gaim_network_init(void) { + gaim_debug_register_category("network"); + gaim_prefs_add_none ("/core/network"); gaim_prefs_add_bool ("/core/network/auto_ip", TRUE); gaim_prefs_add_string("/core/network/public_ip", "");
--- a/src/plugin.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/plugin.c Tue Jun 28 06:13:07 2005 +0000 @@ -815,6 +815,8 @@ gaim_plugins_init(void) { void *handle = gaim_plugins_get_handle(); + gaim_debug_register_category("plugins"); + gaim_signal_register(handle, "plugin-load", gaim_marshal_VOID__POINTER, NULL, 1, @@ -830,6 +832,8 @@ void gaim_plugins_uninit(void) { gaim_signals_disconnect_by_handle(gaim_plugins_get_handle()); + + gaim_debug_unregister_category("plugins"); } /**************************************************************************
--- a/src/pounce.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/pounce.c Tue Jun 28 06:13:07 2005 +0000 @@ -508,7 +508,7 @@ } if (!g_file_get_contents(filename, &contents, &length, &error)) { - gaim_debug(GAIM_DEBUG_ERROR, "pounces", + gaim_debug(GAIM_DEBUG_ERROR, "pounce", "Error reading pounces: %s\n", error->message); g_free(filename); @@ -534,7 +534,7 @@ } if (!g_markup_parse_context_end_parse(context, NULL)) { - gaim_debug(GAIM_DEBUG_ERROR, "pounces", "Error parsing %s\n", + gaim_debug(GAIM_DEBUG_ERROR, "pounce", "Error parsing %s\n", filename); g_markup_parse_context_free(context); @@ -980,6 +980,8 @@ void *blist_handle = gaim_blist_get_handle(); void *conv_handle = gaim_conversations_get_handle(); + gaim_debug_register_category("pounce"); + pounce_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_pounce_handler); @@ -1019,4 +1021,6 @@ } gaim_signals_disconnect_by_handle(gaim_pounces_get_handle()); + + gaim_debug_unregister_category("pounce"); }
--- a/src/prefs.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/prefs.c Tue Jun 28 06:13:07 2005 +0000 @@ -1075,6 +1075,8 @@ { void *handle = gaim_prefs_get_handle(); + gaim_debug_register_category("prefs"); + prefs_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); gaim_prefs_connect_callback(handle, "/", prefs_save_cb, NULL); @@ -1131,4 +1133,6 @@ } gaim_prefs_disconnect_by_handle(gaim_prefs_get_handle()); + + gaim_debug_unregister_category("prefs"); }
--- a/src/protocols/gg/gg.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/gg/gg.c Tue Jun 28 06:13:07 2005 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 12556 2005-04-25 03:55:11Z thekingant $ + * $Id: gg.c 12919 2005-06-28 06:13:07Z deryni9 $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -1832,6 +1832,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("gg"); + option = gaim_account_option_string_new(_("Nick"), "nick", "Gadu-Gadu User"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
--- a/src/protocols/irc/irc.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/irc/irc.c Tue Jun 28 06:13:07 2005 +0000 @@ -812,6 +812,8 @@ GaimAccountUserSplit *split; GaimAccountOption *option; + gaim_debug_register_category("irc"); + split = gaim_account_user_split_new(_("Server"), IRC_DEFAULT_SERVER, '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
--- a/src/protocols/jabber/jabber.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/jabber/jabber.c Tue Jun 28 06:13:07 2005 +0000 @@ -1610,6 +1610,8 @@ GaimAccountUserSplit *split; GaimAccountOption *option; + gaim_debug_register_category("jabber"); + split = gaim_account_user_split_new(_("Server"), "jabber.org", '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
--- a/src/protocols/msn/msn.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/msn/msn.c Tue Jun 28 06:13:07 2005 +0000 @@ -1806,6 +1806,8 @@ static gboolean msn_load(GaimPlugin *plugin) { + gaim_debug_register_category("msn"); + msn_notification_init(); msn_switchboard_init(); msn_sync_init(); @@ -1819,6 +1821,8 @@ msn_switchboard_end(); msn_sync_end(); + gaim_debug_unregister_category("msn"); + return TRUE; }
--- a/src/protocols/napster/napster.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/napster/napster.c Tue Jun 28 06:13:07 2005 +0000 @@ -706,6 +706,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("napster"); + option = gaim_account_option_string_new(_("Server"), "server", NAP_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
--- a/src/protocols/novell/novell.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/novell/novell.c Tue Jun 28 06:13:07 2005 +0000 @@ -3555,6 +3555,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("novell"); + option = gaim_account_option_string_new(_("Server address"), "server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/protocols/oscar/oscar.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/oscar/oscar.c Tue Jun 28 06:13:07 2005 +0000 @@ -7606,6 +7606,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("oscar"); + option = gaim_account_option_string_new(_("Auth host"), "server", FAIM_LOGIN_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/protocols/rendezvous/rendezvous.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/rendezvous/rendezvous.c Tue Jun 28 06:13:07 2005 +0000 @@ -813,6 +813,9 @@ GaimAccountOption *option; char hostname[255]; + gaim_debug_register_category("mdns"); + gaim_debug_register_category("rendezvous"); + prpl_info.options = OPT_PROTO_NO_PASSWORD; prpl_info.icon_spec.format = "jpeg"; prpl_info.icon_spec.min_width = 0;
--- a/src/protocols/silc/silc.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/silc/silc.c Tue Jun 28 06:13:07 2005 +0000 @@ -1594,6 +1594,8 @@ GaimAccountUserSplit *split; char tmp[256]; + gaim_debug_register_category("silc"); + silc_plugin = plugin; split = gaim_account_user_split_new(_("Network"), "silcnet.org", '@'); @@ -1644,7 +1646,6 @@ #ifdef _WIN32 silc_net_win32_init(); #endif - } GAIM_INIT_PLUGIN(silc, init_plugin, info);
--- a/src/protocols/toc/toc.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/toc/toc.c Tue Jun 28 06:13:07 2005 +0000 @@ -2308,6 +2308,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("toc"); + option = gaim_account_option_string_new(_("TOC host"), "server", TOC_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/protocols/trepia/trepia.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/trepia/trepia.c Tue Jun 28 06:13:07 2005 +0000 @@ -1297,6 +1297,8 @@ { GaimAccountOption *option; + gaim_debug_register_category("trepia"); + option = gaim_account_option_string_new(_("Login server"), "server", TREPIA_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
--- a/src/protocols/yahoo/yahoo.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Tue Jun 28 06:13:07 2005 +0000 @@ -3330,6 +3330,10 @@ static gboolean yahoo_unload_plugin(GaimPlugin *plugin) { yahoo_dest_colorht(); + + gaim_debug_unregister_category("yahoo"); + gaim_debug_unregister_category("yahoo_filexfer"); + return TRUE; } @@ -3557,6 +3561,9 @@ { GaimAccountOption *option; + gaim_debug_register_category("yahoo"); + gaim_debug_register_category("yahoo_filexfer"); + option = gaim_account_option_bool_new(_("Yahoo Japan"), "yahoojp", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/protocols/zephyr/zephyr.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/protocols/zephyr/zephyr.c Tue Jun 28 06:13:07 2005 +0000 @@ -2877,7 +2877,9 @@ { GaimAccountOption *option; char *tmp = get_exposure_level(); - + + gaim_debug_register_category("zepyhr"); + option = gaim_account_option_bool_new("Use tzc", "use_tzc", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/proxy.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/proxy.c Tue Jun 28 06:13:07 2005 +0000 @@ -1201,7 +1201,7 @@ unsigned int len; int error = ETIMEDOUT; - gaim_debug_info("s4 proxy", "Connected.\n"); + gaim_debug_info("socks4 proxy", "Connected.\n"); if (phb->inpa > 0) gaim_input_remove(phb->inpa); @@ -1959,6 +1959,12 @@ { void *handle; + gaim_debug_register_category("dns"); + gaim_debug_register_category("proxy"); + gaim_debug_register_category("http proxy"); + gaim_debug_register_category("socks5 proxy"); + gaim_debug_register_category("socks4 proxy"); + /* Initialize a default proxy info struct. */ global_proxy_info = gaim_proxy_info_new();
--- a/src/session.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/session.c Tue Jun 28 06:13:07 2005 +0000 @@ -284,6 +284,8 @@ gchar *tmp = NULL; gchar **cmd = NULL; + gaim_debug_register_category("Session Management"); + if (session != NULL) { /* session is already established, what the hell is going on? */ gaim_debug(GAIM_DEBUG_WARNING, "Session Management", @@ -390,5 +392,7 @@ gaim_debug(GAIM_DEBUG_INFO, "Session Management", "Connection closed.\n"); + + gaim_debug_unregister_category("Session Management"); #endif /* USE_SM */ }
--- a/src/signals.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/signals.c Tue Jun 28 06:13:07 2005 +0000 @@ -566,6 +566,8 @@ { g_return_if_fail(instance_table == NULL); + gaim_debug_register_category("signals"); + instance_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)destroy_instance_data); @@ -578,6 +580,8 @@ g_hash_table_destroy(instance_table); instance_table = NULL; + + gaim_debug_unregister_category("signals"); } /**************************************************************************
--- a/src/status.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/status.c Tue Jun 28 06:13:07 2005 +0000 @@ -1683,6 +1683,8 @@ { void *handle = gaim_status_get_handle; + gaim_debug_register_category("status"); + gaim_prefs_add_none("/core/status"); gaim_prefs_add_none("/core/status/scores"); @@ -1732,4 +1734,6 @@ buddy_presences = NULL; } + + gaim_debug_unregister_category("status"); }
--- a/src/win32/win32dep.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/win32/win32dep.c Tue Jun 28 06:13:07 2005 +0000 @@ -376,6 +376,9 @@ char *newenv; gaim_debug_set_ui_ops(&ops); + gaim_debug_register_category("wgaim"); + gaim_debug_register_category("wgaim_gz_decompress"); + gaim_debug_register_category("wgaim_gz_untar"); gaim_debug(GAIM_DEBUG_INFO, "wgaim", "wgaim_init start\n"); gaimexe_hInstance = hint; @@ -439,6 +442,10 @@ wgaim_remove_idlehooks(); g_free(app_data_dir); + + gaim_debug_unregister_category("wgaim"); + gaim_debug_unregister_category("wgaim_gz_decompress"); + gaim_debug_unregister_category("wgaim_gz_untar"); } /* DLL initializer */
--- a/src/win32/wspell.c Sun Jun 26 01:14:51 2005 +0000 +++ b/src/win32/wspell.c Tue Jun 28 06:13:07 2005 +0000 @@ -135,6 +135,8 @@ void wgaim_gtkspell_init() { char *aspell_path = lookup_aspell_path(); + gaim_debug_register_category("wspell"); + if (aspell_path != NULL) { char *tmp = g_strconcat(aspell_path, "\\aspell-15.dll", NULL); if (g_file_test(tmp, G_FILE_TEST_EXISTS)) {