diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-01 00:04:00 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-09-01 00:04:00 +0000 |
commit | f4dccd790cbb501af6c6a3ad2eaf41765d724cc8 (patch) | |
tree | c0d702279b5e7f98219879af95f772431ea7a1f3 /mixgtk | |
parent | 94d833c97f99aaa246a775bcccfed7d074ff1720 (diff) | |
download | mdk-f4dccd790cbb501af6c6a3ad2eaf41765d724cc8.tar.gz mdk-f4dccd790cbb501af6c6a3ad2eaf41765d724cc8.tar.bz2 |
using access to check for glade file
Diffstat (limited to 'mixgtk')
-rw-r--r-- | mixgtk/mixgtk_widgets.c | 15 |
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 |