summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-01 00:04:00 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-01 00:04:00 +0000
commit075a7726fcd147c355d0fa6b78de710c920b9192 (patch)
treef020df895434e767bc97cae957edbb7532d7bc43 /mixgtk
parent8cdc5f8399441f1a85c80330dc2628de95046f65 (diff)
downloadmdk-075a7726fcd147c355d0fa6b78de710c920b9192.tar.gz
mdk-075a7726fcd147c355d0fa6b78de710c920b9192.tar.bz2
using access to check for glade file
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