diff options
author | Yaakov Selkowitz <[email protected]> | 2012-12-25 21:50:14 -0600 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-01-04 17:29:50 +0100 |
commit | 61d109a6e5794cf393d1f9d5bebda10f8efce902 (patch) | |
tree | 308bbb77ef752ad600020bb77a59d542d854f26b /src/capplet/mate-notification-properties.c | |
parent | 2f0f21bde5e00fc0abb3379ffb9f23574e9508ad (diff) | |
download | mate-notification-daemon-61d109a6e5794cf393d1f9d5bebda10f8efce902.tar.bz2 mate-notification-daemon-61d109a6e5794cf393d1f9d5bebda10f8efce902.tar.xz |
Fix engine loading portability
Use GModule APIs for determining engine filenames. Also, link with
the -no-undefined flag, required on PE platforms.
Diffstat (limited to 'src/capplet/mate-notification-properties.c')
-rw-r--r-- | src/capplet/mate-notification-properties.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c index 2c5612e..0a641b5 100644 --- a/src/capplet/mate-notification-properties.c +++ b/src/capplet/mate-notification-properties.c @@ -23,6 +23,7 @@ #include <glib/gi18n.h> #include <glib.h> +#include <gmodule.h> #include <gtk/gtk.h> #include <gio/gio.h> #include <string.h> @@ -186,7 +187,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; } @@ -210,7 +211,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); |