summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk/mixgtk_config.c')
-rw-r--r--mixgtk/mixgtk_config.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/mixgtk/mixgtk_config.c b/mixgtk/mixgtk_config.c
index b886238..dfb1ad8 100644
--- a/mixgtk/mixgtk_config.c
+++ b/mixgtk/mixgtk_config.c
@@ -29,9 +29,13 @@
#include "mixgtk.h"
#include "mixgtk_config.h"
-#define CONFIG_FILENAME "config"
-#define COMMENT_PREFIX '#'
-#define AUTOSAVE_FLAG "Autosave"
+static const gchar *CONFIG_FILENAME = "config";
+static const gchar COMMENT_PREFIX = '#';
+static const gchar *AUTOSAVE_FLAG = "Autosave";
+static const gchar *SPLIT_KEY = "Split";
+static const gchar *SPLIT_YES = "Yes";
+static const gchar *SPLIT_NO = "No";
+
static GHashTable *items_;
static gchar *config_ = NULL;
@@ -147,3 +151,15 @@ mixgtk_config_save (void)
+gboolean
+mixgtk_config_is_split (void)
+{
+ const gchar *split = mixgtk_config_get (SPLIT_KEY);
+ return (split && !strcmp (split, SPLIT_YES));
+}
+
+void
+mixgtk_config_set_split (gboolean split)
+{
+ mixgtk_config_update (SPLIT_KEY, split? SPLIT_YES : SPLIT_NO);
+}