summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_config.c
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-09 01:26:19 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-09 01:26:19 +0000
commit95a600525148564d98a0c26f1c7fe9d8b6ecc7a5 (patch)
tree81a5cb58ede7706a4ce1f564b48f670fe399f5c5 /mixgtk/mixgtk_config.c
parent4d0f7706aebe3f1a3fd8623fc819ea637e6ef6b7 (diff)
downloadmdk-95a600525148564d98a0c26f1c7fe9d8b6ecc7a5.tar.gz
mdk-95a600525148564d98a0c26f1c7fe9d8b6ecc7a5.tar.bz2
Configurable toolbars (icons, text or both)
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-36
Diffstat (limited to 'mixgtk/mixgtk_config.c')
-rw-r--r--mixgtk/mixgtk_config.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/mixgtk/mixgtk_config.c b/mixgtk/mixgtk_config.c
index 519e3cb..81cebac 100644
--- a/mixgtk/mixgtk_config.c
+++ b/mixgtk/mixgtk_config.c
@@ -30,9 +30,10 @@
#include "mixgtk_config.h"
static const gchar *MIXGTK_CONFIG_FILE_ = "gmixvm.config";
-static const gchar *SHOW_TB_KEY = "Toolbars";
-static const gchar *TB_YES = "Yes";
-static const gchar *TB_NO = "No";
+static const gchar *SHOW_TB_KEY_ = "Toolbars";
+static const gchar *TB_YES_ = "Yes";
+static const gchar *TB_NO_ = "No";
+static const gchar *TB_STYLE_KEY_ = "ToolbarStyle";
static mix_config_t *config_ = NULL;
@@ -47,6 +48,7 @@ mixgtk_config_load (void)
config_ = mix_config_new (cdir, MIXGTK_CONFIG_FILE_);
g_free (cdir);
}
+
return (config_ != NULL);
}
@@ -70,6 +72,18 @@ mixgtk_config_set_autosave (gboolean autosave)
mix_config_set_autosave (config_, autosave);
}
+guint
+mixgtk_config_tb_style (void)
+{
+ return (guint)mix_config_get_integer (config_, TB_STYLE_KEY_);
+}
+
+void
+mixgtk_config_set_tb_style (guint style)
+{
+ mix_config_update_integer (config_, TB_STYLE_KEY_, (gint)style);
+}
+
/* update config item */
void
mixgtk_config_update (const gchar *key, const gchar *value)
@@ -100,12 +114,12 @@ mixgtk_config_save (void)
gboolean
mixgtk_config_show_toolbars (void)
{
- const gchar *show = mixgtk_config_get (SHOW_TB_KEY);
- return (!show || !strcmp (show, TB_YES));
+ const gchar *show = mixgtk_config_get (SHOW_TB_KEY_);
+ return (!show || !strcmp (show, TB_YES_));
}
void
mixgtk_config_set_show_toolbars (gboolean show)
{
- mixgtk_config_update (SHOW_TB_KEY, show? TB_YES : TB_NO);
+ mixgtk_config_update (SHOW_TB_KEY_, show? TB_YES_ : TB_NO_);
}