[gnome-control-center] [common] Fix theme engine detection on non-UNIX platforms
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-control-center] [common] Fix theme engine detection on non-UNIX platforms
- Date: Sun, 3 May 2009 09:57:48 -0400 (EDT)
commit aee9b4affdecf2bce84616004b6a6d51ae368594
Author: Jens Granseuer <jensgr gmx net>
Date: Sun May 3 15:57:30 2009 +0200
[common] Fix theme engine detection on non-UNIX platforms
Use g_module_build_path to construct the module name so we don't break
on platforms that don't use the .so suffix (bug #581156)
---
capplets/common/ChangeLog | 8 ++++++++
capplets/common/gnome-theme-info.c | 5 ++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog
index e7b69ae..2c6b6be 100644
--- a/capplets/common/ChangeLog
+++ b/capplets/common/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-03 Jens Granseuer <jensgr gmx net>
+
+ Patch by: <yselkowitz users sourceforge net>
+
+ * gnome-theme-info.c (gtk_theme_info_missing_engine): fix theme
+ engine lookups on platforms that don't use .so by using
+ g_module_build_path (bug #581156)
+
2009-04-14 Jens Granseuer <jensgr gmx net>
* gtkrc-utils.c: (gtkrc_get_details): close gtkrc files after use so
diff --git a/capplets/common/gnome-theme-info.c b/capplets/common/gnome-theme-info.c
index dab8c0a..efe4a58 100644
--- a/capplets/common/gnome-theme-info.c
+++ b/capplets/common/gnome-theme-info.c
@@ -6,6 +6,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <glib/gi18n.h>
+#include <gmodule.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gio/gio.h>
@@ -1440,10 +1441,8 @@ gtk_theme_info_missing_engine (const gchar *gtk_theme, gboolean nameOnly)
g_free (gtkrc);
for (l = engines; l; l = l->next) {
- gchar *lib = g_strconcat ("lib", l->data, ".so", NULL);
- gchar *full = g_build_filename (GTK_ENGINE_DIR, lib, NULL);
+ gchar *full = g_module_build_path (GTK_ENGINE_DIR, l->data);
- g_free (lib);
found = g_file_test (full, G_FILE_TEST_EXISTS);
if (!found) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]