Mercurial > pidgin
diff src/debug.c @ 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>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 28 Jun 2005 06:13:07 +0000 |
parents | 6a20307ef8dc |
children | bb0d7b719af2 |
line wrap: on
line diff
--- 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;