[grilo-plugins] lua-factory: Fix compilation with g-o-a disabled
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: Fix compilation with g-o-a disabled
- Date: Mon, 14 Sep 2015 16:19:47 +0000 (UTC)
commit fef7219173e475ea3b205b1572c017ec300f5a88
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 10 15:38:25 2015 +0200
lua-factory: Fix compilation with g-o-a disabled
https://bugzilla.gnome.org/show_bug.cgi?id=754895
src/lua-factory/grl-lua-factory.c | 8 ++++++++
src/lua-factory/grl-lua-library.c | 7 +++----
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-factory.c b/src/lua-factory/grl-lua-factory.c
index 1b18ca4..5d62656 100644
--- a/src/lua-factory/grl-lua-factory.c
+++ b/src/lua-factory/grl-lua-factory.c
@@ -272,7 +272,9 @@ static void
grl_lua_factory_plugin_deinit (GrlPlugin *plugin)
{
GCancellable *cancellable;
+#ifdef GOA_ENABLED
GList *lua_init_sources, *it;
+#endif
cancellable = g_object_get_data (G_OBJECT (plugin), "cancellable");
if (cancellable) {
@@ -281,11 +283,13 @@ grl_lua_factory_plugin_deinit (GrlPlugin *plugin)
g_object_set_data (G_OBJECT (plugin), "cancellable", NULL);
}
+#ifdef GOA_ENABLED
lua_init_sources = g_object_get_data (G_OBJECT (plugin), "lua-init-sources");
for (it = lua_init_sources; it != NULL; it = it->next)
grl_lua_goa_data_free (it->data);
g_list_free (lua_init_sources);
g_object_set_data (G_OBJECT (plugin), "lua-init-sources", NULL);
+#endif
}
GRL_PLUGIN_REGISTER (grl_lua_factory_plugin_init, grl_lua_factory_plugin_deinit, LUA_FACTORY_PLUGIN_ID);
@@ -908,7 +912,9 @@ handle_goa_sources (GList *lua_sources,
for (it = lua_sources; it; it = g_list_next (it)) {
lua_State *L;
+#ifdef GOA_ENABLED
GrlLuaGoaInitData *data;
+#endif
const char *lua_account_provider;
const char *lua_account_feature;
int ret;
@@ -980,12 +986,14 @@ handle_goa_sources (GList *lua_sources,
continue;
}
+#ifdef GOA_ENABLED
data = g_new0 (GrlLuaGoaInitData, 1);
data->lua_source_path = g_strdup (it->data);
data->lua_account_provider = g_strdup (lua_account_provider);
data->lua_account_feature = g_strdup (lua_account_feature);
new_goa_sources = g_list_prepend (new_goa_sources, data);
+#endif
lua_close (L);
}
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index b93260b..ed7130d 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -1321,7 +1321,7 @@ static gint
grl_l_goa_consumer_key (lua_State *L)
{
#ifndef GOA_ENABLED
- GRL_WARNING ("Source '%s' is broken as it tries to access gnome-online-accounts "
+ GRL_WARNING ("Source is broken as it tries to access gnome-online-accounts "
"information, but it should not have been created");
return 0;
#else
@@ -1360,9 +1360,8 @@ static gint
grl_l_goa_access_token (lua_State *L)
{
#ifndef GOA_ENABLED
- GRL_WARNING ("Source '%s' is broken as it tries to access gnome-online-accounts "
- "information, but it should not have been created",
- grl_source_get_id (os->source));
+ GRL_WARNING ("Source is broken as it tries to access gnome-online-accounts "
+ "information, but it should not have been created");
return 0;
#else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]