aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicator/indicator.h5
-rw-r--r--src/applet-main.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/libindicator/indicator.h b/libindicator/indicator.h
index daee3c8..6940dfb 100644
--- a/libindicator/indicator.h
+++ b/libindicator/indicator.h
@@ -16,5 +16,10 @@ get_icon_t get_icon;
typedef GtkMenu * (*get_menu_t) (void);
get_menu_t get_menu;
+#define INDICATOR_VERSION "0.2.0"
+#define INDICATOR_SET_VERSION static gchar * indicator_version_symbol = INDICATOR_VERSION;
+#define INDICATOR_VERSION_S "indicator_version_symbol"
+#define INDICATOR_VERSION_CHECK(x) (!g_strcmp0(x, INDICATOR_VERSION))
+
#endif /* __LIBINDICATOR_INDICATOR_H_SEEN__ */
diff --git a/src/applet-main.c b/src/applet-main.c
index 795c2fb..e28009d 100644
--- a/src/applet-main.c
+++ b/src/applet-main.c
@@ -80,6 +80,10 @@ load_module (const gchar * name, GtkWidget * menu)
g_free(fullpath);
g_return_val_if_fail(module != NULL, FALSE);
+ gchar * version;
+ g_return_val_if_fail(g_module_symbol(module, INDICATOR_VERSION_S, (gpointer *)(&version)), FALSE);
+ g_return_val_if_fail(INDICATOR_VERSION_CHECK(version), FALSE);
+
get_label_t lget_label;
g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE);
g_return_val_if_fail(lget_label != NULL, FALSE);