From 444bde2e739d73c27418461fa001adb7b9ce83db Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 24 Jun 2001 13:06:53 +0000 Subject: split windows mode --- mixgtk/mixgtk_config.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'mixgtk/mixgtk_config.c') 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); +} -- cgit v1.2.3