Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin registration macro #1230

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/demoproxy.c
Expand Up @@ -181,7 +181,10 @@ static void demoproxy_cleanup(GeanyPlugin *plugin, gpointer data)
}


static const gchar *extensions[] = { "ini", "px", NULL};


GEANY_REGISTER_PROXY_PLUGIN(225,
"Demo Proxy", "Example Proxy.", "0.1", _("The Geany developer team"),
demoproxy_init, demoproxy_cleanup, NULL, NULL,
{ "ini", "px", NULL }, demoproxy_probe, demoproxy_load, demoproxy_unload)
extensions, demoproxy_probe, demoproxy_load, demoproxy_unload)
3 changes: 1 addition & 2 deletions src/plugindata.h
Expand Up @@ -422,11 +422,10 @@ void geany_plugin_set_data(GeanyPlugin *plugin, gpointer data, GDestroyNotify fr
extensions, probe_func, load_func, unload_func) \
static gboolean geany_plugin_real_init_(GeanyPlugin *plugin, gpointer pdata) \
{ \
static const gchar *extensions_[] = extensions; \
plugin->proxy_funcs->probe = probe_func; \
plugin->proxy_funcs->load = load_func; \
plugin->proxy_funcs->unload = unload_func; \
if (geany_plugin_register_proxy(plugin, extensions_)) \
if (geany_plugin_register_proxy(plugin, extensions)) \
return init_func(plugin, pdata); \
return FALSE; \
} \
Expand Down