From b23a3924efec431d74d175a5f22c298383396ebd Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 8 Jul 2001 00:18:33 +0000 Subject: use of mix_config --- mixgtk/mixgtk_cmd_dispatcher.c | 4 +++- mixgtk/mixgtk_config.c | 8 +++++++- mixgtk/mixgtk_config.h | 5 +++++ mixgtk/mixgtk_device.c | 8 -------- 4 files changed, 15 insertions(+), 10 deletions(-) (limited to 'mixgtk') 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 #include #include -#include #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 +#include /* 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 */ -- cgit v1.2.3