mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 07:46:38 +02:00
Remove debug plugin (merged to core), new debug variable for each plugin (no more signals for setting debug)
This commit is contained in:
@@ -132,7 +132,7 @@ weechat_aspell_speller_new (const char *lang)
|
||||
if (!lang)
|
||||
return NULL;
|
||||
|
||||
if (aspell_debug)
|
||||
if (weechat_aspell_plugin->debug)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"%s: creating new speller for lang \"%s\"",
|
||||
@@ -194,7 +194,7 @@ weechat_aspell_speller_free (struct t_aspell_speller *speller)
|
||||
if (!speller)
|
||||
return;
|
||||
|
||||
if (aspell_debug)
|
||||
if (weechat_aspell_plugin->debug)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"%s: removing speller for lang \"%s\"",
|
||||
|
||||
@@ -40,8 +40,6 @@ WEECHAT_PLUGIN_LICENSE("GPL3");
|
||||
|
||||
struct t_weechat_plugin *weechat_aspell_plugin = NULL;
|
||||
|
||||
int aspell_debug = 0;
|
||||
|
||||
char *aspell_last_modifier_string = NULL; /* last str. received by modifier */
|
||||
char *aspell_last_modifier_result = NULL; /* last str. built by modifier */
|
||||
|
||||
@@ -153,39 +151,6 @@ struct t_aspell_code countries_avail[] =
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* weechat_aspell_debug_cb: callback for "debug" signal
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_aspell_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, ASPELL_PLUGIN_NAME) == 0)
|
||||
{
|
||||
aspell_debug ^= 1;
|
||||
if (aspell_debug)
|
||||
{
|
||||
weechat_printf (NULL, _("%s: debug enabled"),
|
||||
ASPELL_PLUGIN_NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL, _("%s: debug disabled"),
|
||||
ASPELL_PLUGIN_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_aspell_build_option_name: build option name with a buffer
|
||||
*/
|
||||
@@ -981,9 +946,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
if (weechat_aspell_config_read () < 0)
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
/* callback for debug */
|
||||
weechat_hook_signal ("debug", &weechat_aspell_debug_cb, NULL);
|
||||
|
||||
/* command /aspell */
|
||||
weechat_hook_command ("aspell",
|
||||
N_("aspell plugin configuration"),
|
||||
|
||||
@@ -31,8 +31,6 @@ struct t_aspell_code
|
||||
char *name;
|
||||
};
|
||||
|
||||
extern int aspell_debug;
|
||||
|
||||
extern struct t_weechat_plugin *weechat_aspell_plugin;
|
||||
|
||||
extern struct t_aspell_code langs_avail[];
|
||||
|
||||
Reference in New Issue
Block a user