]> Pileus Git - ~andy/gtk/commitdiff
Don't open/close the file, just check for existence with g_file_test().
authorOwen Taylor <otaylor@redhat.com>
Thu, 4 Mar 2004 21:58:26 +0000 (21:58 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 4 Mar 2004 21:58:26 +0000 (21:58 +0000)
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)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkrc.c
gtk/gtksocket.c

index 57a4b73c2c323fcabacdb4e5a46cb10029738fe5..0130e5455004ed6ac477d813bcd561e66720b615 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+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)
+
 Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
index 57a4b73c2c323fcabacdb4e5a46cb10029738fe5..0130e5455004ed6ac477d813bcd561e66720b615 100644 (file)
@@ -1,3 +1,18 @@
+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)
+
 Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
index 57a4b73c2c323fcabacdb4e5a46cb10029738fe5..0130e5455004ed6ac477d813bcd561e66720b615 100644 (file)
@@ -1,3 +1,18 @@
+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)
+
 Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
index 57a4b73c2c323fcabacdb4e5a46cb10029738fe5..0130e5455004ed6ac477d813bcd561e66720b615 100644 (file)
@@ -1,3 +1,18 @@
+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)
+
 Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
index 57a4b73c2c323fcabacdb4e5a46cb10029738fe5..0130e5455004ed6ac477d813bcd561e66720b615 100644 (file)
@@ -1,3 +1,18 @@
+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)
+
 Thu Mar  4 15:20:55 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (update_appearance): show the 'New
index e222174db1d92e3f74c32ed3056506f5040efcb7..905ae29a2a14597c7d6afee40eba44de6290a5ce 100644 (file)
@@ -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);
  
index 3a76cfbe50fe877cb3c90fd65dca5e8d81949320..3f59ceb4ab5c78515b83a313d88a499cd012204e 100644 (file)
@@ -191,6 +191,12 @@ gtk_socket_class_init (GtkSocketClass *class)
   widget_class->key_press_event = gtk_socket_key_event;
   widget_class->key_release_event = gtk_socket_key_event;
   widget_class->focus = gtk_socket_focus;
+
+  /* We don't want to show_all/hide_all the in-process
+   * plug, if any.
+   */
+  widget_class->show_all = gtk_widget_show;
+  widget_class->hide_all = gtk_widget_hide;
   
   container_class->remove = gtk_socket_remove;
   container_class->forall = gtk_socket_forall;