about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c1
-rw-r--r--src/config/theme.c14
-rw-r--r--src/config/theme.h3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 02bf959e..51c72095 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -404,7 +404,6 @@ prefs_free_string(char *pref)
     }
 }
 
-
 void
 prefs_set_string(preference_t pref, char *value)
 {
diff --git a/src/config/theme.c b/src/config/theme.c
index 3d28a129..08c2b5a2 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -557,6 +557,20 @@ _theme_prep_fgnd(char *setting, char *def, GString *lookup_str, gboolean *bold)
     g_free(val);
 }
 
+char*
+theme_get_string(char *str)
+{
+    return g_key_file_get_string(theme, "colours", str, NULL);
+}
+
+void
+theme_free_string(char *str)
+{
+    if (str) {
+        g_free(str);
+    }
+}
+
 int
 theme_attrs(theme_item_t attrs)
 {
diff --git a/src/config/theme.h b/src/config/theme.h
index 7b86d1a7..3c0f0fa9 100644
--- a/src/config/theme.h
+++ b/src/config/theme.h
@@ -131,7 +131,8 @@ gboolean theme_load(const char *const theme_name);
 GSList* theme_list(void);
 void theme_close(void);
 int theme_attrs(theme_item_t attrs);
-
+char* theme_get_string(char *str);
+void theme_free_string(char *str);
 theme_item_t theme_main_presence_attrs(const char *const presence);
 theme_item_t theme_roster_unread_presence_attrs(const char *const presence);
 theme_item_t theme_roster_active_presence_attrs(const char *const presence);