From 80bf2f97b9d1c11592c29836b3f960d788464987 Mon Sep 17 00:00:00 2001 From: Perberos Date: Thu, 8 Dec 2011 14:12:24 -0300 Subject: using .config instead of .mate2 --- plugins/font/gsd-font-manager.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'plugins') diff --git a/plugins/font/gsd-font-manager.c b/plugins/font/gsd-font-manager.c index ed33e1c..93d9279 100644 --- a/plugins/font/gsd-font-manager.c +++ b/plugins/font/gsd-font-manager.c @@ -66,7 +66,7 @@ update_property (GString *props, const gchar* key, const gchar* value) needle_len = strlen (needle); if (g_str_has_prefix (props->str, needle)) found = props->str; - else + else found = strstr (props->str, needle); if (found) { @@ -132,25 +132,26 @@ load_xcursor_theme (MateConfClient *client) mate_settings_profile_end (NULL); } -static char* -setup_dir (const char *font_dir_name, gboolean create) +static char* setup_dir(const char* font_dir_name, gboolean create) { - char *font_dir; - - font_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".mate2", "share", font_dir_name, NULL); - - if (create) { - if (g_mkdir_with_parents (font_dir, 0755) != 0) { - g_warning ("Cannot create needed directory \"%s\".", font_dir); - g_free (font_dir); - font_dir = NULL; - } - } else if (! g_file_test (font_dir, G_FILE_TEST_EXISTS)) { - g_free (font_dir); - font_dir = NULL; - } - - return font_dir; + char* font_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_home_dir(), ".config", "mate", "share", font_dir_name, NULL); + + if (create) + { + if (g_mkdir_with_parents(font_dir, 0755) != 0) + { + g_warning("Cannot create needed directory \"%s\".", font_dir); + g_free(font_dir); + font_dir = NULL; + } + } + else if (!g_file_test(font_dir, G_FILE_TEST_EXISTS)) + { + g_free (font_dir); + font_dir = NULL; + } + + return font_dir; } static char * -- cgit v1.2.1