summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk_widgets.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c
index c286467..1cdbee2 100644
--- a/mixgtk/mixgtk_widgets.c
+++ b/mixgtk/mixgtk_widgets.c
@@ -22,7 +22,7 @@
*/
-
+#include <unistd.h>
#include <glade/glade.h>
#include <mixlib/mix.h>
#include "mixgtk_config.h"
@@ -133,23 +133,18 @@ init_about_ (void)
gboolean
mixgtk_widget_factory_init (void)
{
- const gchar *glade_file = GLADE_FILE;
- const gchar *local_glade_file = LOCAL_GLADE_FILE;
- FILE *f;
gboolean split = mixgtk_config_is_split ();
about_ = NULL;
if (!file_)
{
+ const gchar *glade_file = GLADE_FILE;
glade_init ();
- f = fopen (glade_file, "r");
- if (!f) {
- f = fopen (local_glade_file, "r");
- if (!f) return FALSE;
- glade_file = local_glade_file;
+ if (access (glade_file, R_OK)) {
+ if (access (LOCAL_GLADE_FILE, R_OK)) return FALSE;
+ glade_file = LOCAL_GLADE_FILE;
}
- fclose (f);
file_ = g_strdup (glade_file);
}
else