[geany/geany] 931df7: Merge pull request #1233 from b4n/proxy/dotted-extension-warning-only
Colomban Wendling
git-noreply at geany.org
Sat Oct 29 13:35:21 UTC 2016
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sat, 29 Oct 2016 13:35:21 UTC
Commit: 931df75faa4a48ea248e157e18360b06481c4d05
https://github.com/geany/geany/commit/931df75faa4a48ea248e157e18360b06481c4d05
Log Message:
-----------
Merge pull request #1233 from b4n/proxy/dotted-extension-warning-only
Do not strip dots from proxy plugin extensions
Modified Paths:
--------------
src/plugins.c
Modified: src/plugins.c
20 lines changed, 7 insertions(+), 13 deletions(-)
===================================================================
@@ -2005,18 +2005,6 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data)
}
-static const gchar *fix_extension(const gchar *ext)
-{
- if (*ext == '.')
- {
- g_warning(_("Proxy plugin extension '%s' starts with a dot, "
- "stripping. Please fix your proxy plugin."), ext);
- ext++;
- }
- return ext;
-}
-
-
/** Register the plugin as a proxy for other plugins
*
* Proxy plugins register a list of file extensions and a set of callbacks that are called
@@ -2067,8 +2055,14 @@ gboolean geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensio
foreach_strv(ext, extensions)
{
+ if (**ext == '.')
+ {
+ g_warning(_("Proxy plugin '%s' extension '%s' starts with a dot. "
+ "Please fix your proxy plugin."), p->info.name, *ext);
+ }
+
proxy = g_new(PluginProxy, 1);
- g_strlcpy(proxy->extension, fix_extension(*ext), sizeof(proxy->extension));
+ g_strlcpy(proxy->extension, *ext, sizeof(proxy->extension));
proxy->plugin = p;
/* prepend, so that plugins automatically override core providers for a given extension */
g_queue_push_head(&active_proxies, proxy);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list