summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk.h2
-rw-r--r--mixgtk/mixgtk_config.c9
-rw-r--r--mixgtk/mixgtk_device.c14
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 */