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.c15
-rw-r--r--src/config/preferences.h4
-rw-r--r--src/config/theme.c6
-rw-r--r--src/config/theme.h2
4 files changed, 21 insertions, 6 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 32214c91..802f60bc 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -32,7 +32,7 @@
  *
  */
 
-#include "config.h"
+#include "prof_config.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -591,6 +591,19 @@ prefs_set_autoxa_time(gint value)
     _save_prefs();
 }
 
+gchar **
+prefs_get_plugins(void)
+{
+    if (!g_key_file_has_group(prefs, "plugins")) {
+        return NULL;
+    }
+    if (!g_key_file_has_key(prefs, "plugins", "load", NULL)) {
+        return NULL;
+    }
+
+    return g_key_file_get_string_list(prefs, "plugins", "load", NULL, NULL);
+}
+
 void
 prefs_set_occupants_size(gint value)
 {
diff --git a/src/config/preferences.h b/src/config/preferences.h
index d97cd015..59874169 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -35,7 +35,7 @@
 #ifndef PREFERENCES_H
 #define PREFERENCES_H
 
-#include "config.h"
+#include "prof_config.h"
 
 #include <glib.h>
 
@@ -183,6 +183,8 @@ void prefs_set_autoaway_time(gint value);
 gint prefs_get_autoxa_time(void);
 void prefs_set_autoxa_time(gint value);
 
+gchar** prefs_get_plugins(void);
+
 char prefs_get_otr_char(void);
 void prefs_set_otr_char(char ch);
 char prefs_get_pgp_char(void);
diff --git a/src/config/theme.c b/src/config/theme.c
index 82d5a988..437239ad 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -32,15 +32,15 @@
  *
  */
 
-#include "config.h"
+#include "prof_config.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #include <glib.h>
-#ifdef HAVE_NCURSESW_NCURSES_H
+#ifdef PROF_HAVE_NCURSESW_NCURSES_H
 #include <ncursesw/ncurses.h>
-#elif HAVE_NCURSES_H
+#elif PROF_HAVE_NCURSES_H
 #include <ncurses.h>
 #endif
 
diff --git a/src/config/theme.h b/src/config/theme.h
index 6ea369d9..10769679 100644
--- a/src/config/theme.h
+++ b/src/config/theme.h
@@ -35,7 +35,7 @@
 #ifndef THEME_H
 #define THEME_H
 
-#include "config.h"
+#include "prof_config.h"
 
 #include <glib.h>