diff options
author | Owen Taylor <otaylor@redhat.com> | 2004-03-04 21:58:26 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-03-04 21:58:26 +0000 |
commit | 1af39383d6131665abcfcad7254e6dc0f01bb1a6 (patch) | |
tree | 405451ba440682e16474131927ae0126e1aafe4d /gtk/gtkrc.c | |
parent | b1ac4367f5c50d86ddc8d632c8c29f4bde592f6b (diff) | |
download | gtk+-1af39383d6131665abcfcad7254e6dc0f01bb1a6.tar.gz |
Don't open/close the file, just check for existence with g_file_test().
Thu Mar 4 16:54:30 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_check_pixmap_dir): Don't
open/close the file, just check for existence
with g_file_test(). This is considerably cheaper,
and lack-of-permissions for pixmap dirs is
pathological.
Wed Mar 3 17:53:21 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c (gtk_socket_class_init): Overide
show_all/hide_all to be gtk_widget_show/gtk_widget_hide,
since we don't want to propagate to the in-process
plug, if any. (#122949, Michael Meeks)
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r-- | gtk/gtkrc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index e222174db1..905ae29a2a 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2973,13 +2973,9 @@ gtk_rc_check_pixmap_dir (const gchar *dir, const gchar *pixmap_file) gint fd; buf = g_build_filename (dir, pixmap_file, NULL); - - fd = open (buf, O_RDONLY); - if (fd >= 0) - { - close (fd); - return buf; - } + + if (g_file_test (buf, G_FILE_TEST_EXISTS)) + return buf; g_free (buf); |