aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-theme-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-02 18:57:36 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-02 18:57:36 +0800
commit5e112661cca767870225936428515a82b2f6f82c (patch)
tree24ebab468dcfd84b2f730e86f04a722b03683757 /libempathy-gtk/empathy-theme-manager.c
parent74895e8b815cbed7a041fcbc8e3234ae6df102ae (diff)
downloadgsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar.gz
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar.bz2
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar.lz
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar.xz
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.tar.zst
gsoc2013-empathy-5e112661cca767870225936428515a82b2f6f82c.zip
add empathy_theme_manager_dup_theme_name_from_path()
Diffstat (limited to 'libempathy-gtk/empathy-theme-manager.c')
-rw-r--r--libempathy-gtk/empathy-theme-manager.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index 9999de08d..1f6611663 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -416,3 +416,23 @@ empathy_theme_manager_find_theme (const gchar *name)
return NULL;
}
+
+gchar *
+empathy_theme_manager_dup_theme_name_from_path (const gchar *path)
+{
+ gchar *fullname, *result;
+ gchar **tmp;
+
+ if (path == NULL)
+ return NULL;
+
+ fullname = g_path_get_basename (path);
+ if (!g_str_has_suffix (fullname, ".AdiumMessageStyle"))
+ return NULL;
+
+ tmp = g_strsplit (fullname, ".AdiumMessageStyle", 0);
+ result = g_strdup (tmp[0]);
+
+ g_strfreev (tmp);
+ return result;
+}