summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-08 00:18:33 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-08 00:18:33 +0000
commit44d6a545a0cc61c8c986ce6bcf126548386ba246 (patch)
tree9c7269617fce4c10d0dddde51e13a7487b0b5092
parent69af1256d8e122ada66328ea3ff7fd41931ee0be (diff)
downloadmdk-44d6a545a0cc61c8c986ce6bcf126548386ba246.tar.gz
mdk-44d6a545a0cc61c8c986ce6bcf126548386ba246.tar.bz2
use of mix_config
-rw-r--r--mixgtk/mixgtk_cmd_dispatcher.c4
-rw-r--r--mixgtk/mixgtk_config.c8
-rw-r--r--mixgtk/mixgtk_config.h5
-rw-r--r--mixgtk/mixgtk_device.c8
4 files changed, 15 insertions, 10 deletions
diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c
index ae009b8..2f47c64 100644
--- a/mixgtk/mixgtk_cmd_dispatcher.c
+++ b/mixgtk/mixgtk_cmd_dispatcher.c
@@ -342,7 +342,9 @@ mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top)
r = fcntl(dis_data_.fildes[0], F_SETFL, r);
g_return_val_if_fail (r != -1, FALSE);
dis_data_.dispatcher =
- mix_vm_cmd_dispatcher_new (dis_data_.out, dis_data_.out);
+ mix_vm_cmd_dispatcher_new_with_config (dis_data_.out,
+ dis_data_.out,
+ mixgtk_config_get_mix_config ());
mix_vm_cmd_dispatcher_print_time (dis_data_.dispatcher, FALSE);
install_hooks_ ();
diff --git a/mixgtk/mixgtk_config.c b/mixgtk/mixgtk_config.c
index ae96f2a..b444caf 100644
--- a/mixgtk/mixgtk_config.c
+++ b/mixgtk/mixgtk_config.c
@@ -26,7 +26,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#include <mixlib/mix_config.h>
#include "mixgtk.h"
#include "mixgtk_config.h"
@@ -51,6 +50,13 @@ mixgtk_config_load (void)
return (config_ != NULL);
}
+/* get mixlib config */
+mix_config_t *
+mixgtk_config_get_mix_config (void)
+{
+ return config_;
+}
+
/* autosave state */
gboolean
mixgtk_config_is_autosave (void)
diff --git a/mixgtk/mixgtk_config.h b/mixgtk/mixgtk_config.h
index ea54ba4..038c659 100644
--- a/mixgtk/mixgtk_config.h
+++ b/mixgtk/mixgtk_config.h
@@ -26,11 +26,16 @@
#define MIXGTK_CONFIG_H
#include <mixlib/mix.h>
+#include <mixlib/mix_config.h>
/* load configuration */
extern gboolean
mixgtk_config_load (void);
+/* get mix config */
+extern mix_config_t *
+mixgtk_config_get_mix_config (void);
+
/* autosave state */
extern gboolean
mixgtk_config_is_autosave (void);
diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c
index e94006e..2b0bf2e 100644
--- a/mixgtk/mixgtk_device.c
+++ b/mixgtk/mixgtk_device.c
@@ -357,7 +357,6 @@ gboolean
mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm)
{
gint k = 0;
- static gchar *devdir = NULL;
g_return_val_if_fail (container != NULL, FALSE);
g_return_val_if_fail (vm != NULL, FALSE);
@@ -372,13 +371,6 @@ mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm)
/* remove dummy page from container */
gtk_notebook_remove_page (container_, 0);
- if (!devdir)
- {
- devdir = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S,
- MIXGTK_FILES_DIR, NULL);
- mix_device_set_dir (devdir);
- }
-
mix_vm_set_device_factory (vm, mixgtk_device_new_);
/* read format configuration */