diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/capplet/mate-notification-properties.c | 6 | ||||
-rw-r--r-- | src/daemon/engines.c | 7 | ||||
-rw-r--r-- | src/themes/coco/Makefile.am | 2 | ||||
-rw-r--r-- | src/themes/nodoka/Makefile.am | 2 | ||||
-rw-r--r-- | src/themes/slider/Makefile.am | 2 | ||||
-rw-r--r-- | src/themes/standard/Makefile.am | 2 |
6 files changed, 9 insertions, 12 deletions
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c index ee0d521..034db8b 100644 --- a/src/capplet/mate-notification-properties.c +++ b/src/capplet/mate-notification-properties.c @@ -23,7 +23,7 @@ #include <glib/gi18n.h> #include <glib.h> -#include <glib/gprintf.h> +#include <gmodule.h> #include <gtk/gtk.h> #include <gdk/gdk.h> #include <gio/gio.h> @@ -293,7 +293,7 @@ static gchar* get_theme_name(const gchar* filename) { /* TODO: Remove magic numbers. Strip "lib" and ".so" */ gchar* result = g_strdup(filename + 3); - result[strlen(result) - 3] = '\0'; + result[strlen(result) - strlen("." G_MODULE_SUFFIX)] = '\0'; return result; } @@ -317,7 +317,7 @@ static void notification_properties_dialog_setup_themes(NotificationAppletDialog { while ((filename = g_dir_read_name(dir))) { - if (g_str_has_prefix(filename, "lib") && g_str_has_suffix(filename, ".so")) + if (g_str_has_suffix(filename, "." G_MODULE_SUFFIX)) { theme_name = get_theme_name(filename); diff --git a/src/daemon/engines.c b/src/daemon/engines.c index 23a2ade..2217f28 100644 --- a/src/daemon/engines.c +++ b/src/daemon/engines.c @@ -56,12 +56,9 @@ static ThemeEngine* active_engine = NULL; static ThemeEngine* load_theme_engine(const char *name) { ThemeEngine* engine; - char* filename; char* path; - filename = g_strdup_printf("lib%s.so", name); - path = g_build_filename(ENGINES_DIR, filename, NULL); - g_free (filename); + path = g_module_build_path (ENGINES_DIR, name); engine = g_new0(ThemeEngine, 1); engine->ref_count = 1; @@ -113,7 +110,7 @@ static ThemeEngine* load_theme_engine(const char *name) if (engine->module != NULL && !g_module_close (engine->module)) { - g_warning("%s: %s", filename, g_module_error()); + g_warning("%s: %s", name, g_module_error()); } g_free(engine); diff --git a/src/themes/coco/Makefile.am b/src/themes/coco/Makefile.am index bdfa229..52f7a6f 100644 --- a/src/themes/coco/Makefile.am +++ b/src/themes/coco/Makefile.am @@ -5,5 +5,5 @@ engine_LTLIBRARIES = libcoco.la libcoco_la_SOURCES = coco-theme.c -libcoco_la_LDFLAGS = -module -avoid-version +libcoco_la_LDFLAGS = -module -avoid-version -no-undefined libcoco_la_LIBADD = $(THEME_LIBS) diff --git a/src/themes/nodoka/Makefile.am b/src/themes/nodoka/Makefile.am index 71ab399..38b797c 100644 --- a/src/themes/nodoka/Makefile.am +++ b/src/themes/nodoka/Makefile.am @@ -5,5 +5,5 @@ engine_LTLIBRARIES = libnodoka.la libnodoka_la_SOURCES = nodoka-theme.c -libnodoka_la_LDFLAGS = -module -avoid-version +libnodoka_la_LDFLAGS = -module -avoid-version -no-undefined libnodoka_la_LIBADD = $(THEME_LIBS) diff --git a/src/themes/slider/Makefile.am b/src/themes/slider/Makefile.am index a94ceaa..46dcdd2 100644 --- a/src/themes/slider/Makefile.am +++ b/src/themes/slider/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = $(THEME_CFLAGS) libslider_la_SOURCES = theme.c -libslider_la_LDFLAGS = -module -avoid-version +libslider_la_LDFLAGS = -module -avoid-version -no-undefined libslider_la_LIBADD = \ $(THEME_LIBS) \ $(NULL) diff --git a/src/themes/standard/Makefile.am b/src/themes/standard/Makefile.am index 9d6a6ae..d5b4a2a 100644 --- a/src/themes/standard/Makefile.am +++ b/src/themes/standard/Makefile.am @@ -3,7 +3,7 @@ enginedir = $(libdir)/mate-notification-daemon/engines engine_LTLIBRARIES = libstandard.la libstandard_la_SOURCES = theme.c -libstandard_la_LDFLAGS = -module -avoid-version +libstandard_la_LDFLAGS = -module -avoid-version -no-undefined libstandard_la_LIBADD = $(NOTIFICATION_DAEMON_LIBS) INCLUDES = $(NOTIFICATION_DAEMON_CFLAGS) |