[libsocialweb] client: Load the service information from datadir
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsocialweb] client: Load the service information from datadir
- Date: Wed, 3 Nov 2010 15:24:23 +0000 (UTC)
commit 9828d56ccff04c168469450b04d1d0926ae7e975
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 15:20:49 2010 +0000
client: Load the service information from datadir
Service information "keyfiles" should be read from the same
prefix as the plugins are loaded.
This was a confusion between service developer keys (which can
still be loaded from the user's .local directory), and .keys
files which contain information about the service, such as the
translated display name.
libsocialweb-client/Makefile.am | 2 +-
libsocialweb-client/sw-client-service.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libsocialweb-client/Makefile.am b/libsocialweb-client/Makefile.am
index 7596acb..77e5417 100644
--- a/libsocialweb-client/Makefile.am
+++ b/libsocialweb-client/Makefile.am
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = libsocialweb-client.la
libsocialweb_client_ladir = $(includedir)/libsocialweb/libsocialweb-client
-libsocialweb_client_la_CFLAGS = -I$(top_srcdir) $(DBUS_GLIB_CFLAGS) $(GIO_CFLAGS)
+libsocialweb_client_la_CFLAGS = -I$(top_srcdir) $(DBUS_GLIB_CFLAGS) $(GIO_CFLAGS) -DDATADIR="\"$(datadir)\""
libsocialweb_client_la_LIBADD = $(DBUS_GLIB_LIBS) $(GIO_LIBS) $(top_builddir)/interfaces/libsocialweb-bindings.la
libsocialweb_client_la_LDFLAGS = -version-info $(LIBSOCIALWEB_CLIENT_CURRENT):$(LIBSOCIALWEB_CLIENT_REVISION):$(LIBSOCIALWEB_CLIENT_AGE)
libsocialweb_client_la_HEADERS = sw-client.h \
diff --git a/libsocialweb-client/sw-client-service.c b/libsocialweb-client/sw-client-service.c
index 055f774..1d69045 100644
--- a/libsocialweb-client/sw-client-service.c
+++ b/libsocialweb-client/sw-client-service.c
@@ -910,12 +910,12 @@ load_info (SwClientService *service)
char *filename, *path;
filename = g_strconcat (priv->name, ".keys", NULL);
- path = g_build_filename ("libsocialweb", "services", filename, NULL);
+ path = g_build_filename (DATADIR, "libsocialweb", "services", filename, NULL);
g_free (filename);
keys = g_key_file_new ();
- g_key_file_load_from_data_dirs (keys, path, NULL, G_KEY_FILE_NONE, NULL);
+ g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, NULL);
g_free (path);
priv->display_name = g_key_file_get_locale_string (keys, GROUP, "Name", NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]