[Xfce4-commits] [apps/xfdashboard] 05/06: Use a macro for plugin ID in clock view to ensure to use always the same ID at all places
noreply at xfce.org
noreply at xfce.org
Tue Feb 9 07:49:47 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 40c8a2f4340d17e1f0b691042c8dd67a45c6fdf6
Author: Stephan Haller <nomad at froevel.de>
Date: Tue Feb 9 07:41:05 2016 +0100
Use a macro for plugin ID in clock view to ensure to use always the same ID at all places
---
plugins/clock-view/plugin.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/plugins/clock-view/plugin.c b/plugins/clock-view/plugin.c
index 229aba1..2419ec5 100644
--- a/plugins/clock-view/plugin.c
+++ b/plugins/clock-view/plugin.c
@@ -34,6 +34,8 @@
/* IMPLEMENTATION: XfdashboardPlugin */
+#define PLUGIN_ID "de.froevel.xfdashboard.clock"
+
/* Forward declarations */
G_MODULE_EXPORT void plugin_init(XfdashboardPlugin *self);
@@ -46,7 +48,7 @@ static gboolean plugin_enable(XfdashboardPlugin *self, gpointer inUserData)
/* Register view */
viewManager=xfdashboard_view_manager_get_default();
- xfdashboard_view_manager_register(viewManager, "de.froevel.xfdashboard.clock", XFDASHBOARD_TYPE_CLOCK_VIEW);
+ xfdashboard_view_manager_register(viewManager, PLUGIN_ID, XFDASHBOARD_TYPE_CLOCK_VIEW);
g_object_unref(viewManager);
@@ -61,7 +63,7 @@ static gboolean plugin_disable(XfdashboardPlugin *self, gpointer inUserData)
/* Unregister view */
viewManager=xfdashboard_view_manager_get_default();
- xfdashboard_view_manager_unregister(viewManager, "clock");
+ xfdashboard_view_manager_unregister(viewManager, PLUGIN_ID);
g_object_unref(viewManager);
@@ -76,7 +78,7 @@ G_MODULE_EXPORT void plugin_init(XfdashboardPlugin *self)
/* Set plugin info */
xfdashboard_plugin_set_info(self,
- "id", "clock-view",
+ "id", PLUGIN_ID,
"name", _("Clock"),
"description", _("Adds new a view showing a clock"),
"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