diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-02 18:54:25 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-02 18:54:25 +0100 |
commit | 6e69f7f3ce22bf5537b1e02088b95352d04ec5cc (patch) | |
tree | b041426d6c655c4ba1c03d1a19a175d4b130a2b3 /src/plugins/notify | |
parent | 640ff6b51c249b44c382eb92c03dafbfb482bc91 (diff) | |
download | weechat-6e69f7f3ce22bf5537b1e02088b95352d04ec5cc.zip |
Remove debug plugin (merged to core), new debug variable for each plugin (no more signals for setting debug)
Diffstat (limited to 'src/plugins/notify')
-rw-r--r-- | src/plugins/notify/notify.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/plugins/notify/notify.c b/src/plugins/notify/notify.c index 2855902c0..dfb6d05ae 100644 --- a/src/plugins/notify/notify.c +++ b/src/plugins/notify/notify.c @@ -49,8 +49,6 @@ struct t_config_section *notify_config_section_buffer = NULL; char *notify_string[NOTIFY_NUM_LEVELS] = { "none", "highlight", "message", "all" }; -int notify_debug = 0; - /* * notify_search: search a notify level by name @@ -95,33 +93,6 @@ notify_build_option_name (struct t_gui_buffer *buffer) } /* - * notify_debug_cb: callback for "debug" signal - */ - -int -notify_debug_cb (void *data, const char *signal, const char *type_data, - void *signal_data) -{ - /* make C compiler happy */ - (void) data; - (void) signal; - - if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0) - { - if (weechat_strcasecmp ((char *)signal_data, NOTIFY_PLUGIN_NAME) == 0) - { - notify_debug ^= 1; - if (notify_debug) - weechat_printf (NULL, _("%s: debug enabled"), NOTIFY_PLUGIN_NAME); - else - weechat_printf (NULL, _("%s: debug disabled"), NOTIFY_PLUGIN_NAME); - } - } - - return WEECHAT_RC_OK; -} - -/* * notify_get: read a notify level in config file * we first try with all arguments, then remove one by one * to find notify level (from specific to general notify) @@ -183,7 +154,7 @@ notify_set_buffer (struct t_gui_buffer *buffer) if (option_name) { notify = notify_get (option_name); - if (notify_debug) + if (weechat_notify_plugin->debug) { weechat_printf (NULL, _("notify: debug: set notify for buffer %s to " @@ -479,8 +450,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin = plugin; - notify_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); - if (!notify_config_init ()) { weechat_printf (NULL, @@ -511,9 +480,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) /* callback when a config option is changed */ weechat_hook_config ("notify.buffer.*", ¬ify_config_cb, NULL); - /* callback for debug */ - weechat_hook_signal ("debug", ¬ify_debug_cb, NULL); - /* set notify for open buffers */ notify_set_buffer_all (); |