From 18397c82725b7cee22bf82b0539a4fb36dd49fe9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 17:08:17 -0500 Subject: Turning versions into a function and adding a name symbol. Not yet used though. --- src/applet-main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/applet-main.c b/src/applet-main.c index 74d948a..f979beb 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -80,9 +80,12 @@ 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_version_t lget_version; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_VERSION_S, (gpointer *)(&lget_version)), FALSE); + if (!INDICATOR_VERSION_CHECK(lget_version())) { + g_warning("Indicator using API version '%s' we're expecting '%s'", lget_version(), INDICATOR_VERSION); + return FALSE; + } get_label_t lget_label; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); -- cgit v1.2.3