summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/mixgtk/mixgtk.c b/mixgtk/mixgtk.c
index 42002f2..fb2d38a 100644
--- a/mixgtk/mixgtk.c
+++ b/mixgtk/mixgtk.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk.c :
* Main functions of the mix gtk front-end
* ------------------------------------------------------------------
- * Last change: Time-stamp: "2001-04-29 12:36:16 jao"
+ * Last change: Time-stamp: "2001-05-04 01:33:02 jao"
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -21,6 +21,8 @@
*
*/
+#include <stdio.h>
+
#include "mixgtk_widgets.h"
#include "mixgtk_cmd_dispatcher.h"
#include "mixgtk_device.h"
@@ -38,6 +40,16 @@ gboolean
mixgtk_init (int argc, char *argv[])
{
mix_vm_t *vm;
+
+ const gchar *gfile = GLADE_FILE;
+ FILE *f = fopen (gfile, "r");
+ if (!f && !(f = fopen ((gfile = LOCAL_GLADE_FILE), "r")))
+ {
+ g_error ("Configuration file not found (tried %s and %s)",
+ GLADE_FILE, LOCAL_GLADE_FILE);
+ return FALSE;
+ }
+ fclose (f);
gtk_init (&argc, &argv);
@@ -49,11 +61,9 @@ mixgtk_init (int argc, char *argv[])
return FALSE;
}
- if (!mixgtk_widget_factory_init (GLADE_FILE)
- && !mixgtk_widget_factory_init (LOCAL_GLADE_FILE))
+ if (!mixgtk_widget_factory_init (gfile))
{
- g_error ("Unable to initialise application (using %s and %s)\n",
- GLADE_FILE, LOCAL_GLADE_FILE);
+ g_error ("Unable to initialise application using %s\n", gfile);
return FALSE;
}