[Xfce4-commits] [apps/xfdashboard] 02/04: Make plugin ID a definition specified in Makefile instead of source files
noreply at xfce.org
noreply at xfce.org
Sun Feb 14 16:13:27 CET 2016
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit af2f5285ed101fb98999e080094aa4e611e8aad5
Author: Stephan Haller <nomad at froevel.de>
Date: Sun Feb 14 14:18:43 2016 +0100
Make plugin ID a definition specified in Makefile instead of source files
---
plugins/gnome-shell-search-provider/Makefile.am | 1 +
plugins/gnome-shell-search-provider/gnome-shell-search-provider.c | 2 +-
plugins/gnome-shell-search-provider/gnome-shell-search-provider.h | 2 --
plugins/gnome-shell-search-provider/plugin.c | 4 ++--
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/plugins/gnome-shell-search-provider/Makefile.am b/plugins/gnome-shell-search-provider/Makefile.am
index 4d3b570..2c462c8 100644
--- a/plugins/gnome-shell-search-provider/Makefile.am
+++ b/plugins/gnome-shell-search-provider/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"xfdashboard-plugin-gnome_shell_search_provider\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ -DPLUGIN_ID=\"de.froevel.xfdashboard.gnome-shell-search-provider\" \
-DGNOME_SHELL_PROVIDERS_PATH=\"$(prefix)/share/gnome-shell/search-providers\"
plugin_LTLIBRARIES = \
diff --git a/plugins/gnome-shell-search-provider/gnome-shell-search-provider.c b/plugins/gnome-shell-search-provider/gnome-shell-search-provider.c
index f8c9dd6..4f35dd4 100644
--- a/plugins/gnome-shell-search-provider/gnome-shell-search-provider.c
+++ b/plugins/gnome-shell-search-provider/gnome-shell-search-provider.c
@@ -330,7 +330,7 @@ static void _xfdashboard_gnome_shell_search_provider_initialize(XfdashboardSearc
const gchar *providerID;
providerID=xfdashboard_search_provider_get_id(inProvider);
- priv->gnomeShellID=g_strdup(providerID+strlen(XFDASHBOARD_GNOME_SHELL_SEARCH_PROVIDER_PREFIX)+1);
+ priv->gnomeShellID=g_strdup(providerID+strlen(PLUGIN_ID)+1);
}
g_debug("Initializing search provider '%s' of type %s for Gnome-Shell search provider ID '%s'",
xfdashboard_search_provider_get_id(inProvider),
diff --git a/plugins/gnome-shell-search-provider/gnome-shell-search-provider.h b/plugins/gnome-shell-search-provider/gnome-shell-search-provider.h
index 3818171..146ddd3 100644
--- a/plugins/gnome-shell-search-provider/gnome-shell-search-provider.h
+++ b/plugins/gnome-shell-search-provider/gnome-shell-search-provider.h
@@ -58,8 +58,6 @@ struct _XfdashboardGnomeShellSearchProviderClass
};
/* Public API */
-#define XFDASHBOARD_GNOME_SHELL_SEARCH_PROVIDER_PREFIX "de.froevel.xfdashboard.gnome-shell-search-provider"
-
GType xfdashboard_gnome_shell_search_provider_get_type(void) G_GNUC_CONST;
void xfdashboard_gnome_shell_search_provider_type_register(GTypeModule *inModule);
diff --git a/plugins/gnome-shell-search-provider/plugin.c b/plugins/gnome-shell-search-provider/plugin.c
index 0981bea..bd3ebe3 100644
--- a/plugins/gnome-shell-search-provider/plugin.c
+++ b/plugins/gnome-shell-search-provider/plugin.c
@@ -76,7 +76,7 @@ static gchar* _xfdashboard_gnome_shell_search_provider_plugin_get_provider_name_
* using this plugin from file name without file extension.
*/
providerName=g_strndup(filename, strlen(filename)-4);
- pluginID=g_strdup_printf("%s.%s", XFDASHBOARD_GNOME_SHELL_SEARCH_PROVIDER_PREFIX, providerName);
+ pluginID=g_strdup_printf("%s.%s", PLUGIN_ID, providerName);
g_free(providerName);
/* Return provider name (ID) found */
@@ -437,7 +437,7 @@ G_MODULE_EXPORT void plugin_init(XfdashboardPlugin *self)
/* Set plugin info */
xfdashboard_plugin_set_info(self,
- "id", XFDASHBOARD_GNOME_SHELL_SEARCH_PROVIDER_PREFIX,
+ "id", PLUGIN_ID,
"name", _("Gnome-Shell search provider"),
"description", _("Uses Gnome-Shell search providers as source for searches"),
"author", "Stephan Haller <nomad at froevel.de>",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list