aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-02 20:06:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-02 20:06:58 +0800
commit284ff75925b329b0443338660480d392f53501e1 (patch)
tree07a4ea6131cfe8b1b462a71c0d15821c2872ae77
parent2b8d7ebbdd40b55b72248c11600cd782d4ac7ab1 (diff)
downloadgsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar.gz
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar.bz2
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar.lz
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar.xz
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.tar.zst
gsoc2013-empathy-284ff75925b329b0443338660480d392f53501e1.zip
upgrade_chat_theme_settings: use empathy_theme_manager_dup_theme_name_from_path()
-rw-r--r--src/empathy-sanity-cleaning.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index 8bc61b4cf..5b366ddf0 100644
--- a/src/empathy-sanity-cleaning.c
+++ b/src/empathy-sanity-cleaning.c
@@ -29,6 +29,8 @@
#include <libempathy/empathy-gsettings.h>
+#include <libempathy-gtk/empathy-theme-manager.h>
+
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
@@ -153,29 +155,19 @@ upgrade_chat_theme_settings (void)
EMPATHY_PREFS_CHAT_THEME);
if (!tp_strdiff (theme, "adium")) {
- gchar *path, *fullname;
+ gchar *path;
path = g_settings_get_string (gsettings_chat,
EMPATHY_PREFS_CHAT_ADIUM_PATH);
- fullname = g_path_get_basename (path);
- if (g_str_has_suffix (fullname, ".AdiumMessageStyle"))
- {
- gchar **tmp;
-
- tmp = g_strsplit (fullname, ".AdiumMessageStyle", 0);
- new_theme = g_strdup (tmp[0]);
-
- g_strfreev (tmp);
- }
- else
+ new_theme = empathy_theme_manager_dup_theme_name_from_path (path);
+ if (new_theme == NULL)
{
/* Use the Classic theme as fallback */
new_theme = g_strdup ("Classic");
}
g_free (path);
- g_free (fullname);
} else if (!tp_strdiff (theme, "gnome")) {
new_theme = g_strdup ("PlanetGNOME");
} else if (!tp_strdiff (theme, "simple")) {