From f4dccd790cbb501af6c6a3ad2eaf41765d724cc8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 1 Sep 2001 00:04:00 +0000 Subject: using access to check for glade file --- mixgtk/mixgtk_widgets.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'mixgtk') 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 #include #include #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 -- cgit v1.2.3