diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-07-05 23:35:55 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-07-05 23:35:55 +0000 |
commit | 5071a7a4df62a7fe90ba1e3b4ddf539599668459 (patch) | |
tree | 4e5201773a694abcb5e4f97747e3194b93a54fa5 /mixgtk | |
parent | ff2facbdc12f86fb939baae406b82686c8a94eee (diff) | |
download | mdk-5071a7a4df62a7fe90ba1e3b4ddf539599668459.tar.gz mdk-5071a7a4df62a7fe90ba1e3b4ddf539599668459.tar.bz2 |
use of .mdk instead of .gmixvm
Diffstat (limited to 'mixgtk')
-rw-r--r-- | mixgtk/mixgtk.h | 2 | ||||
-rw-r--r-- | mixgtk/mixgtk_config.c | 9 | ||||
-rw-r--r-- | mixgtk/mixgtk_device.c | 14 |
3 files changed, 18 insertions, 7 deletions
diff --git a/mixgtk/mixgtk.h b/mixgtk/mixgtk.h index ed9973f..e4a16b6 100644 --- a/mixgtk/mixgtk.h +++ b/mixgtk/mixgtk.h @@ -29,7 +29,7 @@ #include <mixlib/mix.h> /* the app files directory */ -#define MIXGTK_FILES_DIR ".gmixvm" +#define MIXGTK_FILES_DIR ".mdk" /* initialise the app */ extern gboolean diff --git a/mixgtk/mixgtk_config.c b/mixgtk/mixgtk_config.c index 267b443..ae96f2a 100644 --- a/mixgtk/mixgtk_config.c +++ b/mixgtk/mixgtk_config.c @@ -30,6 +30,7 @@ #include "mixgtk.h" #include "mixgtk_config.h" +static const gchar *MIXGTK_CONFIG_FILE_ = "gmixvm.config"; static const gchar *SPLIT_KEY = "Split"; static const gchar *SPLIT_YES = "Yes"; static const gchar *SPLIT_NO = "No"; @@ -40,7 +41,13 @@ static mix_config_t *config_ = NULL; gboolean mixgtk_config_load (void) { - if (config_ == NULL) config_ = mix_config_new (NULL, NULL); + if (config_ == NULL) + { + gchar *cdir = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, + MIXGTK_FILES_DIR, NULL); + config_ = mix_config_new (cdir, MIXGTK_CONFIG_FILE_); + g_free (cdir); + } return (config_ != NULL); } diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c index 96e1ff9..e94006e 100644 --- a/mixgtk/mixgtk_device.c +++ b/mixgtk/mixgtk_device.c @@ -290,7 +290,6 @@ static mix_device_t * mixgtk_device_new_ (mix_device_type_t type) { struct mixgtk_device_t *dev = NULL; - gchar *name = NULL; g_return_val_if_fail (type < mix_dev_INVALID, NULL); @@ -304,10 +303,7 @@ mixgtk_device_new_ (mix_device_type_t type) ((struct mixgtk_bin_device_t *)dev)->last_insert = 0; } - name = g_strconcat (g_get_home_dir(), "/", - MIXGTK_FILES_DIR, "/", DEF_NAMES_[type], NULL); - construct_device_with_name_ (&dev->device, type, name); - g_free (name); + construct_device_ (&dev->device, type); dev->device.vtable = &MIXGTK_VTABLE_; @@ -361,6 +357,7 @@ 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); @@ -375,6 +372,13 @@ 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 */ |