summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog162
-rw-r--r--ChangeLog.pre-2-0162
-rw-r--r--ChangeLog.pre-2-10162
-rw-r--r--ChangeLog.pre-2-2162
-rw-r--r--ChangeLog.pre-2-4162
-rw-r--r--ChangeLog.pre-2-6162
-rw-r--r--ChangeLog.pre-2-8162
-rw-r--r--Makefile.am8
-rw-r--r--gdk/Makefile.am2
-rw-r--r--gdk/gdkkeysyms.h36
-rw-r--r--gdk/gdkpixmap.c5
-rw-r--r--gdk/gdkwindow.c79
-rw-r--r--gdk/x11/gdkpixmap-x11.c5
-rw-r--r--gdk/x11/gdkwindow-x11.c79
-rw-r--r--glib/ChangeLog5
-rw-r--r--glib/gstring.c20
-rwxr-xr-xglib/ltconfig87
-rw-r--r--glib/ltmain.sh98
-rw-r--r--gtk+.prj334
-rw-r--r--gtk.m4117
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/gtkadjustment.c34
-rw-r--r--gtk/gtkadjustment.h39
-rw-r--r--gtk/gtkbin.c34
-rw-r--r--gtk/gtkbox.c2
-rw-r--r--gtk/gtkclist.c8
-rw-r--r--gtk/gtkcombo.c5
-rw-r--r--gtk/gtkcontainer.c68
-rw-r--r--gtk/gtkcontainer.h99
-rw-r--r--gtk/gtkfilesel.c22
-rw-r--r--gtk/gtkfixed.c4
-rw-r--r--gtk/gtklist.c141
-rw-r--r--gtk/gtklist.h74
-rw-r--r--gtk/gtkobject.c57
-rw-r--r--gtk/gtkpaned.c8
-rw-r--r--gtk/gtkpixmap.c12
-rw-r--r--gtk/gtkrc.c76
-rw-r--r--gtk/gtkscrolledwindow.c94
-rw-r--r--gtk/gtkscrolledwindow.h2
-rw-r--r--gtk/gtkselection.c17
-rw-r--r--gtk/gtkstyle.c2
-rw-r--r--gtk/gtktable.c4
-rw-r--r--gtk/gtktree.c19
-rw-r--r--gtk/gtktreeitem.c33
-rw-r--r--gtk/gtkwidget.c46
-rw-r--r--gtk/gtkwidget.h2
-rw-r--r--gtk/testgtk.c103
-rw-r--r--gtk/testgtkrc20
-rw-r--r--gtk/testgtkrc221
-rwxr-xr-xltconfig87
-rw-r--r--ltmain.sh98
-rw-r--r--tests/testgtk.c103
-rw-r--r--tests/testgtkrc20
-rw-r--r--tests/testgtkrc221
54 files changed, 2443 insertions, 942 deletions
diff --git a/ChangeLog b/ChangeLog
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index d486f7d9ec..6b64a579a6 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,165 @@
+Merges from gtk-1-0
+===================
+
+Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
+ Check to catch the case when the viewport fits in either
+ direction or both, instead of flip-flopping infinitely.
+
+ Only show/hide the scrollbars once at the end.
+
+Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
+ Include the scrollbars in the foreach call.
+ (gtk-fortier-980405-0.patch;
+ Patrice Fortier <Patrice.Fortier@aquarel.fr>).
+
+ The notebook widget
+ really should also include its tabs, but that might cause
+ problems for programs if they
+
+Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
+ resize if the size actually changed.
+ (gtk-johannes-980414-0.patch ;
+ johannes@nada.kth.se (Johannes Keukelaar) )
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ ltmain.sh ltconfig config.sub config.guess:
+
+ Reverted back to libtool-1.2 (plus minor patches) so as not to
+ force the issue for everyone else.
+
+Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
+
+ * glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
+ Updated to libtool 1.2a.
+
+ * gtk/gtkclist.c: Draw the in-between lines with style->base
+ instead of style->white.
+
+Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
+ Cache the colormap and children of a window locally
+ instead of fetching them from the server when needed.
+ Huge performance difference for creating/destroying
+ windows.
+
+ * gtk/gtkstyle.c: Find the depth from the cached
+ visual, instead of asking the server.
+
+ * gtk.m4: Distribute the new version which tries to
+ figure out what went wrong and give helpful error
+ messages.
+
+ * ltmain.sh ltconfig config.sub config.sh:
+ Updated to libtool 1.2a
+
+ * gtk/gtktext.c: Fixed a bug where the drawn level
+ was being messed up when the text was scrolled
+ during a deletion.
+
+Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkfilesel.c: don't die when naughty people remove parts of
+ the filesystem under you (fix from Josh)
+
+Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
+ if the viewport already exists before iterating over it, maybe we
+ haven't been constructed yet.
+
+Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
+ the GtkBin widget already has a child.
+
+ * gtk/gtkbox.c (gtk_box_pack_{start|end}):
+ check that child->parent == NULL;
+
+Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkselection.c (gtk_selection_clear): Only return
+ FALSE when the clear event is been rejected, not when
+ widget has already lost the selection. (Which should
+ only happen when we are setting the selection to another
+ widget ourself.)
+
+Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
+
+ Removed the "check visibility after gtk_widget_unparent" bug
+ in hopefully the last three places.
+
+Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
+ rc-files.
+
+Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
+ for CAN_FOCUS widgets.
+
+ * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
+ adjustments for the table.
+ (create_list): feature automatic adjustment of the scrolled window to
+ always contain the focused child.
+ (create_main_window): keep the focussed button always inside of the
+ scrolled windoww.
+
+ * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
+ adjustments, to contain the allocation of the currently focused child.
+ (gtk_container_set_focus_hadjustment): new functin to set the
+ horizontal focus adjustment.
+ (gtk_container_set_focus_vadjustment): new functin to set the vertical
+ focus adjustment.
+
+ * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
+ clamp the currents adjustment page into a specific range.
+
+ * random GtkType fixups for gtk_*_get_type() functions.
+
+Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
+ Account for the fact that gtk_tree_item_remove_subtree
+ will be called recursively.
+
+ Handle removing a collapsed subtree.
+
+ (From Andy Dustman <adustman@comstar.net>)
+
+ * gtk/gtktree.c (gtk_tree_remove_items): Look for the
+ root tree when removing items from a non-previously
+ mapped tree.
+
+ * gtk/testgtk.c: Added a remove_subtree button.
+
+Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
+ before object removing data. This change fixes a bug where
+ removing the last weak references would cause it to be
+ triggered.
+
+Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gdk/Makefile.am: Removed mostly useless dependency that
+ was causing problems for SGI's make, when used with
+ the 'make dist' form of GTK+. (Dependency caused dependencies
+ to be redone when BUILT_SOURCES changed)
+
+==========
+
Thu Apr 30 11:18:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.[ch]: Allow the user to use the popup list
diff --git a/Makefile.am b/Makefile.am
index 895d66001e..21d1119b8f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,10 +6,10 @@ SUBDIRS = $(SRC_SUBDIRS) docs
bin_SCRIPTS = gtk-config
EXTRA_DIST = \
- gtk+.prj \
- gtk.m4 \
- makecopyright \
- TODO \
+ gtk+.spec \
+ gtk.m4 \
+ makecopyright \
+ TODO \
ChangeLog.pre-1-0 \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 1013fc2346..1530d0e686 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -78,5 +78,3 @@ files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
echo $$p; \
done
-
-$(DEP_FILES) : $(BUILT_SOURCES)
diff --git a/gdk/gdkkeysyms.h b/gdk/gdkkeysyms.h
index 0ef07706f8..cc3ed517e6 100644
--- a/gdk/gdkkeysyms.h
+++ b/gdk/gdkkeysyms.h
@@ -1,21 +1,3 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
#define GDK_VoidSymbol 0xFFFFFF
#define GDK_BackSpace 0xFF08
#define GDK_Tab 0xFF09
@@ -28,6 +10,9 @@
#define GDK_Escape 0xFF1B
#define GDK_Delete 0xFFFF
#define GDK_Multi_key 0xFF20
+#define GDK_SingleCandidate 0xFF3C
+#define GDK_MultipleCandidate 0xFF3D
+#define GDK_PreviousCandidate 0xFF3E
#define GDK_Kanji 0xFF21
#define GDK_Muhenkan 0xFF22
#define GDK_Henkan_Mode 0xFF23
@@ -45,6 +30,8 @@
#define GDK_Kana_Shift 0xFF2E
#define GDK_Eisu_Shift 0xFF2F
#define GDK_Eisu_toggle 0xFF30
+#define GDK_Zen_Koho 0xFF3D
+#define GDK_Mae_Koho 0xFF3E
#define GDK_Home 0xFF50
#define GDK_Left 0xFF51
#define GDK_Up 0xFF52
@@ -234,11 +221,23 @@
#define GDK_dead_iota 0xFE5D
#define GDK_dead_voiced_sound 0xFE5E
#define GDK_dead_semivoiced_sound 0xFE5F
+#define GDK_dead_belowdot 0xFE60
#define GDK_First_Virtual_Screen 0xFED0
#define GDK_Prev_Virtual_Screen 0xFED1
#define GDK_Next_Virtual_Screen 0xFED2
#define GDK_Last_Virtual_Screen 0xFED4
#define GDK_Terminate_Server 0xFED5
+#define GDK_AccessX_Enable 0xFE70
+#define GDK_AccessX_Feedback_Enable 0xFE71
+#define GDK_RepeatKeys_Enable 0xFE72
+#define GDK_SlowKeys_Enable 0xFE73
+#define GDK_BounceKeys_Enable 0xFE74
+#define GDK_StickyKeys_Enable 0xFE75
+#define GDK_MouseKeys_Enable 0xFE76
+#define GDK_MouseKeys_Accel_Enable 0xFE77
+#define GDK_Overlay1_Enable 0xFE78
+#define GDK_Overlay2_Enable 0xFE79
+#define GDK_AudibleBell_Enable 0xFE7A
#define GDK_Pointer_Left 0xFEE0
#define GDK_Pointer_Right 0xFEE1
#define GDK_Pointer_Up 0xFEE2
@@ -264,6 +263,7 @@
#define GDK_Pointer_Drag2 0xFEF6
#define GDK_Pointer_Drag3 0xFEF7
#define GDK_Pointer_Drag4 0xFEF8
+#define GDK_Pointer_Drag5 0xFEFD
#define GDK_Pointer_EnableKeys 0xFEF9
#define GDK_Pointer_Accelerate 0xFEFA
#define GDK_Pointer_DfltBtnNext 0xFEFB
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index 5cbca00c57..a1af21542e 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -55,7 +55,7 @@ gdk_pixmap_new (GdkWindow *window,
return NULL;
if (depth == -1)
- gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
+ depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -64,6 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
private->window_type = GDK_WINDOW_PIXMAP;
private->xwindow = XCreatePixmap (private->xdisplay, window_private->xwindow,
width, height, depth);
+ private->colormap = NULL;
private->parent = NULL;
private->x = 0;
private->y = 0;
@@ -148,7 +149,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
return NULL;
if (depth == -1)
- gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
+ depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3dfb9d2a42..7531d08e1f 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -191,6 +191,7 @@ gdk_window_init ()
gdk_root_parent.window.user_data = NULL;
gdk_root_parent.width = width;
gdk_root_parent.height = height;
+ gdk_root_parent.children = NULL;
}
GdkWindow*
@@ -202,7 +203,6 @@ gdk_window_new (GdkWindow *parent,
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
GdkVisual *visual;
- GdkColormap *colormap;
Display *parent_display;
Window xparent;
Visual *xvisual;
@@ -232,6 +232,10 @@ gdk_window_new (GdkWindow *parent,
window = (GdkWindow*) private;
private->parent = parent;
+
+ if (parent_private != &gdk_root_parent)
+ parent_private->children = g_list_prepend (parent_private->children, window);
+
private->xdisplay = parent_display;
private->destroyed = FALSE;
private->resize_count = 0;
@@ -264,6 +268,7 @@ gdk_window_new (GdkWindow *parent,
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
+ private->children = NULL;
window->user_data = NULL;
@@ -296,9 +301,9 @@ gdk_window_new (GdkWindow *parent,
depth = visual->depth;
if (attributes_mask & GDK_WA_COLORMAP)
- colormap = attributes->colormap;
+ private->colormap = attributes->colormap;
else
- colormap = gdk_colormap_get_system ();
+ private->colormap = gdk_colormap_get_system ();
xattributes.background_pixel = BlackPixel (gdk_display, gdk_screen);
xattributes.border_pixel = BlackPixel (gdk_display, gdk_screen);
@@ -307,26 +312,26 @@ gdk_window_new (GdkWindow *parent,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_CHILD:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
break;
case GDK_WINDOW_DIALOG:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_TEMP:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
@@ -348,7 +353,7 @@ gdk_window_new (GdkWindow *parent,
{
depth = 0;
class = InputOnly;
- colormap = NULL;
+ private->colormap = NULL;
}
private->xwindow = XCreateWindow (private->xdisplay, xparent,
@@ -358,6 +363,9 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
+ if (private->colormap)
+ gdk_colormap_ref (private->colormap);
+
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
@@ -372,8 +380,8 @@ gdk_window_new (GdkWindow *parent,
break;
case GDK_WINDOW_CHILD:
if ((attributes->wclass == GDK_INPUT_OUTPUT) &&
- (colormap != gdk_colormap_get_system ()) &&
- (colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
+ (private->colormap != gdk_colormap_get_system ()) &&
+ (private->colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
@@ -430,6 +438,7 @@ gdk_window_foreign_new (guint32 anid)
{
GdkWindow *window;
GdkWindowPrivate *private;
+ GdkWindowPrivate *parent_private;
XWindowAttributes attrs;
Window root, parent;
Window *children;
@@ -446,6 +455,11 @@ gdk_window_foreign_new (guint32 anid)
XFree (children);
private->parent = gdk_xid_table_lookup (parent);
+ parent_private = (GdkWindowPrivate *)private->parent;
+
+ if (parent_private)
+ parent_private->children = g_list_prepend (parent_private->children, window);
+
private->xwindow = anid;
private->xdisplay = gdk_display;
private->x = attrs.x;
@@ -469,6 +483,7 @@ gdk_window_foreign_new (guint32 anid)
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
+ private->children = NULL;
window->user_data = NULL;
@@ -507,10 +522,17 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
case GDK_WINDOW_FOREIGN:
if (!private->destroyed)
{
+ if (private->parent)
+ {
+ GdkWindowPrivate *parent_private = (GdkWindowPrivate *)private->parent;
+ if (parent_private->children)
+ parent_private->children = g_list_remove (parent_private->children, window);
+ }
+
if (private->window_type != GDK_WINDOW_FOREIGN)
{
- children = gdk_window_get_children (window);
- tmp = children;
+ children = tmp = private->children;
+ private->children = NULL;
while (tmp)
{
@@ -522,7 +544,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gdk_window_internal_destroy (temp_window, FALSE,
our_destroy);
}
-
+
g_list_free (children);
}
@@ -581,6 +603,9 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
else if (xdestroy)
XDestroyWindow (private->xdisplay, private->xwindow);
+ if (private->colormap)
+ gdk_colormap_unref (private->colormap);
+
private->destroyed = TRUE;
}
break;
@@ -1059,6 +1084,11 @@ gdk_window_set_colormap (GdkWindow *window,
XSetWindowColormap (window_private->xdisplay,
window_private->xwindow,
colormap_private->xcolormap);
+
+ if (window_private->colormap)
+ gdk_colormap_unref (window_private->colormap);
+ window_private->colormap = colormap;
+ gdk_colormap_ref (window_private->colormap);
if (window_private->window_type != GDK_WINDOW_TOPLEVEL)
gdk_window_add_colormap_windows (window);
@@ -1153,7 +1183,7 @@ gdk_window_get_visual (GdkWindow *window)
{
GdkWindowPrivate *window_private;
XWindowAttributes window_attributes;
-
+
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
@@ -1162,11 +1192,15 @@ gdk_window_get_visual (GdkWindow *window)
if (window_private && !window_private->destroyed)
{
- XGetWindowAttributes (window_private->xdisplay,
- window_private->xwindow,
- &window_attributes);
-
- return gdk_visual_lookup (window_attributes.visual);
+ if (window_private->window_type == GDK_WINDOW_FOREIGN)
+ {
+ XGetWindowAttributes (window_private->xdisplay,
+ window_private->xwindow,
+ &window_attributes);
+ return gdk_visual_lookup (window_attributes.visual);
+ }
+ else
+ return ((GdkColormapPrivate *)window_private->colormap)->visual;
}
return NULL;
@@ -1176,7 +1210,6 @@ GdkColormap*
gdk_window_get_colormap (GdkWindow *window)
{
GdkWindowPrivate *window_private;
- XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
@@ -1184,11 +1217,7 @@ gdk_window_get_colormap (GdkWindow *window)
if (!window_private->destroyed)
{
- XGetWindowAttributes (window_private->xdisplay,
- window_private->xwindow,
- &window_attributes);
-
- return gdk_colormap_lookup (window_attributes.colormap);
+ return window_private->colormap;
}
return NULL;
diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c
index 5cbca00c57..a1af21542e 100644
--- a/gdk/x11/gdkpixmap-x11.c
+++ b/gdk/x11/gdkpixmap-x11.c
@@ -55,7 +55,7 @@ gdk_pixmap_new (GdkWindow *window,
return NULL;
if (depth == -1)
- gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
+ depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -64,6 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
private->window_type = GDK_WINDOW_PIXMAP;
private->xwindow = XCreatePixmap (private->xdisplay, window_private->xwindow,
width, height, depth);
+ private->colormap = NULL;
private->parent = NULL;
private->x = 0;
private->y = 0;
@@ -148,7 +149,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
return NULL;
if (depth == -1)
- gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
+ depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 3dfb9d2a42..7531d08e1f 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -191,6 +191,7 @@ gdk_window_init ()
gdk_root_parent.window.user_data = NULL;
gdk_root_parent.width = width;
gdk_root_parent.height = height;
+ gdk_root_parent.children = NULL;
}
GdkWindow*
@@ -202,7 +203,6 @@ gdk_window_new (GdkWindow *parent,
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
GdkVisual *visual;
- GdkColormap *colormap;
Display *parent_display;
Window xparent;
Visual *xvisual;
@@ -232,6 +232,10 @@ gdk_window_new (GdkWindow *parent,
window = (GdkWindow*) private;
private->parent = parent;
+
+ if (parent_private != &gdk_root_parent)
+ parent_private->children = g_list_prepend (parent_private->children, window);
+
private->xdisplay = parent_display;
private->destroyed = FALSE;
private->resize_count = 0;
@@ -264,6 +268,7 @@ gdk_window_new (GdkWindow *parent,
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
+ private->children = NULL;
window->user_data = NULL;
@@ -296,9 +301,9 @@ gdk_window_new (GdkWindow *parent,
depth = visual->depth;
if (attributes_mask & GDK_WA_COLORMAP)
- colormap = attributes->colormap;
+ private->colormap = attributes->colormap;
else
- colormap = gdk_colormap_get_system ();
+ private->colormap = gdk_colormap_get_system ();
xattributes.background_pixel = BlackPixel (gdk_display, gdk_screen);
xattributes.border_pixel = BlackPixel (gdk_display, gdk_screen);
@@ -307,26 +312,26 @@ gdk_window_new (GdkWindow *parent,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_CHILD:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
break;
case GDK_WINDOW_DIALOG:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_TEMP:
- xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
+ xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
@@ -348,7 +353,7 @@ gdk_window_new (GdkWindow *parent,
{
depth = 0;
class = InputOnly;
- colormap = NULL;
+ private->colormap = NULL;
}
private->xwindow = XCreateWindow (private->xdisplay, xparent,
@@ -358,6 +363,9 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
+ if (private->colormap)
+ gdk_colormap_ref (private->colormap);
+
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
@@ -372,8 +380,8 @@ gdk_window_new (GdkWindow *parent,
break;
case GDK_WINDOW_CHILD:
if ((attributes->wclass == GDK_INPUT_OUTPUT) &&
- (colormap != gdk_colormap_get_system ()) &&
- (colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
+ (private->colormap != gdk_colormap_get_system ()) &&
+ (private->colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
@@ -430,6 +438,7 @@ gdk_window_foreign_new (guint32 anid)
{
GdkWindow *window;
GdkWindowPrivate *private;
+ GdkWindowPrivate *parent_private;
XWindowAttributes attrs;
Window root, parent;
Window *children;
@@ -446,6 +455,11 @@ gdk_window_foreign_new (guint32 anid)
XFree (children);
private->parent = gdk_xid_table_lookup (parent);
+ parent_private = (GdkWindowPrivate *)private->parent;
+
+ if (parent_private)
+ parent_private->children = g_list_prepend (parent_private->children, window);
+
private->xwindow = anid;
private->xdisplay = gdk_display;
private->x = attrs.x;
@@ -469,6 +483,7 @@ gdk_window_foreign_new (guint32 anid)
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
+ private->children = NULL;
window->user_data = NULL;
@@ -507,10 +522,17 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
case GDK_WINDOW_FOREIGN:
if (!private->destroyed)
{
+ if (private->parent)
+ {
+ GdkWindowPrivate *parent_private = (GdkWindowPrivate *)private->parent;
+ if (parent_private->children)
+ parent_private->children = g_list_remove (parent_private->children, window);
+ }
+
if (private->window_type != GDK_WINDOW_FOREIGN)
{
- children = gdk_window_get_children (window);
- tmp = children;
+ children = tmp = private->children;
+ private->children = NULL;
while (tmp)
{
@@ -522,7 +544,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gdk_window_internal_destroy (temp_window, FALSE,
our_destroy);
}
-
+
g_list_free (children);
}
@@ -581,6 +603,9 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
else if (xdestroy)
XDestroyWindow (private->xdisplay, private->xwindow);
+ if (private->colormap)
+ gdk_colormap_unref (private->colormap);
+
private->destroyed = TRUE;
}
break;
@@ -1059,6 +1084,11 @@ gdk_window_set_colormap (GdkWindow *window,
XSetWindowColormap (window_private->xdisplay,
window_private->xwindow,
colormap_private->xcolormap);
+
+ if (window_private->colormap)
+ gdk_colormap_unref (window_private->colormap);
+ window_private->colormap = colormap;
+ gdk_colormap_ref (window_private->colormap);
if (window_private->window_type != GDK_WINDOW_TOPLEVEL)
gdk_window_add_colormap_windows (window);
@@ -1153,7 +1183,7 @@ gdk_window_get_visual (GdkWindow *window)
{
GdkWindowPrivate *window_private;
XWindowAttributes window_attributes;
-
+
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
@@ -1162,11 +1192,15 @@ gdk_window_get_visual (GdkWindow *window)
if (window_private && !window_private->destroyed)
{
- XGetWindowAttributes (window_private->xdisplay,
- window_private->xwindow,
- &window_attributes);
-
- return gdk_visual_lookup (window_attributes.visual);
+ if (window_private->window_type == GDK_WINDOW_FOREIGN)
+ {
+ XGetWindowAttributes (window_private->xdisplay,
+ window_private->xwindow,
+ &window_attributes);
+ return gdk_visual_lookup (window_attributes.visual);
+ }
+ else
+ return ((GdkColormapPrivate *)window_private->colormap)->visual;
}
return NULL;
@@ -1176,7 +1210,6 @@ GdkColormap*
gdk_window_get_colormap (GdkWindow *window)
{
GdkWindowPrivate *window_private;
- XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
@@ -1184,11 +1217,7 @@ gdk_window_get_colormap (GdkWindow *window)
if (!window_private->destroyed)
{
- XGetWindowAttributes (window_private->xdisplay,
- window_private->xwindow,
- &window_attributes);
-
- return gdk_colormap_lookup (window_attributes.colormap);
+ return window_private->colormap;
}
return NULL;
diff --git a/glib/ChangeLog b/glib/ChangeLog
index 67bfd738d4..1eda6f5c6f 100644
--- a/glib/ChangeLog
+++ b/glib/ChangeLog
@@ -4,6 +4,11 @@
a link in a list - should be the inverse of g_list_nth(), but
haven't tested it so poof.
+Thu Apr 30 21:41:30 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gstring.c : Check arguments more carefully,
+ (gtk-draco-980423-1.patch; ramsey@rhrk.uni-kl.de)
+
Tue Apr 7 19:36:48 1998 Owen Taylor <owt1@cornell.edu>
* gutils.c (g_direct_compare): Removed, because that's what
diff --git a/glib/gstring.c b/glib/gstring.c
index fc0780e2b4..e006415b85 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -254,8 +254,11 @@ GString*
g_string_append (GString *fstring, gchar *val)
{
GRealString *string = (GRealString*)fstring;
- int len = strlen (val);
+ int len;
+ g_return_val_if_fail (val != NULL, fstring);
+
+ len = strlen (val);
g_string_maybe_expand (string, len);
strcpy (string->str + string->len, val);
@@ -282,8 +285,11 @@ GString*
g_string_prepend (GString *fstring, gchar *val)
{
GRealString *string = (GRealString*)fstring;
- gint len = strlen (val);
+ gint len;
+
+ g_return_val_if_fail (val != NULL, fstring);
+ len = strlen (val);
g_string_maybe_expand (string, len);
g_memmove (string->str + len, string->str, string->len);
@@ -319,10 +325,13 @@ GString *
g_string_insert (GString *fstring, gint pos, gchar *val)
{
GRealString *string = (GRealString*)fstring;
- gint len = strlen (val);
+ gint len;
+ g_return_val_if_fail (val != NULL, fstring);
+ g_return_val_if_fail (pos >= 0, fstring);
g_return_val_if_fail (pos <= string->len, fstring);
+ len = strlen (val);
g_string_maybe_expand (string, len);
g_memmove (string->str + pos + len, string->str + pos, string->len - pos);
@@ -361,10 +370,13 @@ g_string_erase (GString *fstring, gint pos, gint len)
{
GRealString *string = (GRealString*)fstring;
+ g_return_val_if_fail (len >= 0, fstring);
+ g_return_val_if_fail (pos >= 0, fstring);
g_return_val_if_fail (pos <= string->len, fstring);
g_return_val_if_fail (pos + len <= string->len, fstring);
- g_memmove (string->str + pos, string->str + pos + len, string->len - (pos + len));
+ if (pos + len < string->len)
+ g_memmove (string->str + pos, string->str + pos + len, string->len - (pos + len));
string->len -= len;
diff --git a/glib/ltconfig b/glib/ltconfig
index 7ebb9be8c0..878a7c8122 100755
--- a/glib/ltconfig
+++ b/glib/ltconfig
@@ -32,23 +32,43 @@ if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
- # The Solaris and AIX default echo program unquotes backslashes.
- # This makes it impossible to quote backslashes using
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
- # So, we emulate echo with printf '%s\n'
- echo="printf %s\\n"
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
- else
- # Oops. We have no working printf. Try to find a not-so-buggy echo.
- echo=echo
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH /usr/ucb; do
- if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
- echo="$dir/echo"
- break
+ #
+ # So, first we look for a working echo in the user's PATH.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+#
+# The following is from libtool-1.2a, won't work with this patched
+# libtool-1.2
+#
+# elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
+# # If we have ksh, try running ltconfig again with it.
+# CONFIG_SHELL=/bin/ksh
+# export CONFIG_SHELL
+# exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
fi
- done
- IFS="$save_ifs"
+ fi
fi
fi
@@ -66,7 +86,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.1
+VERSION=1.2
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f"
@@ -421,7 +441,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC.
with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
- echo "$progname:424: checking whether we are using GNU C" >&5
+ echo "$progname:444: checking whether we are using GNU C" >&5
$rm conftest.c
cat > conftest.c <<EOF
@@ -429,7 +449,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@@ -544,14 +564,15 @@ if test -n "$pic_flag"; then
echo > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
- echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
- if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
- # Append any errors to the config.log.
+ echo "$progname:567: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+ # Append any warnings to the config.log.
cat conftest.err 1>&5
- # On HP-UX, the stripped-down bundled CC does not accept +Z, but also
- # reports no error. So, we need to grep stderr for (Bundled).
- if grep '(Bundled)' conftest.err >/dev/null; then
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
echo "$ac_t"no 1>&6
can_build_shared=no
pic_flag=
@@ -587,8 +608,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:590: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+echo "$progname:611: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6
else
echo "$ac_t"none 1>&6
@@ -620,7 +641,7 @@ if test -z "$LD"; then
if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
- echo "$progname:623: checking for ld used by GCC" >&5
+ echo "$progname:644: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -638,10 +659,10 @@ if test -z "$LD"; then
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
- echo "$progname:641: checking for GNU ld" >&5
+ echo "$progname:662: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
- echo "$progname:644: checking for non-GNU ld" >&5
+ echo "$progname:665: checking for non-GNU ld" >&5
fi
if test -z "$LD"; then
@@ -967,11 +988,11 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
-echo "$progname:970: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
+echo "$progname:991: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { echo "$progname:974: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+ if { echo "$progname:995: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -1029,7 +1050,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS='conftestm.o'
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:1053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
diff --git a/glib/ltmain.sh b/glib/ltmain.sh
index 9b8e94784b..e9350b3fab 100644
--- a/glib/ltmain.sh
+++ b/glib/ltmain.sh
@@ -30,7 +30,7 @@ modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.1
+VERSION=1.2
default_mode=
help="Try \`$progname --help' for more information."
@@ -481,7 +481,7 @@ if test -z "$show_help"; then
if test "$export_dynamic" != yes; then
export_dynamic=yes
if test -n "$export_dynamic_flag_spec"; then
- arg=`eval \\$echo "$export_dynamic_flag_spec"`
+ eval arg=\"$export_dynamic_flag_spec\"
else
arg=
fi
@@ -682,7 +682,7 @@ if test -z "$show_help"; then
fi
if test -n "$libdir"; then
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
finalize_command="$finalize_command $flag"
@@ -843,7 +843,7 @@ if test -z "$show_help"; then
esac
name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- libname=`eval \\$echo \"$libname_spec\"`
+ eval libname=\"$libname_spec\"
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -1006,13 +1006,13 @@ if test -z "$show_help"; then
if test "$build_libtool_libs" = yes; then
# Get the real and link names of the library.
- library_names=`eval \\$echo \"$library_names_spec\"`
+ eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
shift; shift
if test -n "$soname_spec"; then
- soname=`eval \\$echo \"$soname_spec\"`
+ eval soname=\"$soname_spec\"
else
soname="$realname"
fi
@@ -1027,7 +1027,7 @@ if test -z "$show_help"; then
test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
# Do each of the archive commands.
- cmds=`eval \\$echo \"$archive_cmds\"`
+ eval cmds=\"$archive_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1104,7 +1104,7 @@ if test -z "$show_help"; then
reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
output="$obj"
- cmds=`eval \\$echo \"$reload_cmds\"`
+ eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1128,7 +1128,7 @@ if test -z "$show_help"; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs"
output="$libobj"
- cmds=`eval \\$echo \"$reload_cmds\"`
+ eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1177,7 +1177,7 @@ if test -z "$show_help"; then
fi
if test -n "$libdir"; then
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
finalize_command="$finalize_command $flag"
@@ -1254,8 +1254,8 @@ if test -z "$show_help"; then
case "$dlsyms" in
"") ;;
*.c)
- $echo > "$objdir/$dlsyms" \
-"/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
+ $echo > "$objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
#ifdef __cplusplus
@@ -1266,17 +1266,17 @@ extern \"C\" {
#define dld_preloaded_symbol_count some_other_symbol
#define dld_preloaded_symbols some_other_symbol
-/* External symbol declarations for the compiler. */"
+/* External symbol declarations for the compiler. */\
+"
if test -f "$nlist"; then
sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
else
echo '/* NONE */' >> "$objdir/$dlsyms"
-EOF
fi
- $echo >> "$objdir/$dlsyms" \
-"
+ $echo >> "$objdir/$dlsyms" "\
+
#undef dld_preloaded_symbol_count
#undef dld_preloaded_symbols
@@ -1295,19 +1295,21 @@ struct {
__ptr_t address;
}
dld_preloaded_symbols[] =
-{"
+{\
+"
if test -f "$nlist"; then
sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
fi
- $echo >> "$objdir/$dlsyms" \
-" {0, (__ptr_t) 0}
+ $echo >> "$objdir/$dlsyms" "\
+ {0, (__ptr_t) 0}
};
#ifdef __cplusplus
}
-#endif"
+#endif\
+"
;;
*)
@@ -1427,8 +1429,8 @@ dld_preloaded_symbols[] =
$rm $output
trap "$rm $output; exit 1" 1 2 15
- $echo > $output \
-"#! /bin/sh
+ $echo > $output "\
+#! /bin/sh
# $output - temporary wrapper script for $objdir/$output
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
@@ -1459,10 +1461,9 @@ else
else
echo=\"$qecho\"
file=\"\$0\"
- fi
-"
- $echo >> $output \
+ fi\
"
+ $echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
@@ -1496,8 +1497,8 @@ else
# Export our shlibpath_var if we have one.
if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output \
-" # Add our own library path to $shlibpath_var
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
@@ -1507,24 +1508,17 @@ else
"
fi
- echo >> $output \
-" if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
- args=
- for arg
- do
- # Quote arguments (to preserve shell metacharacters).
- arg=\`\$echo \"X\$arg\" | \$Xsed -e \"\$sed_quote_subst\"\`
- args=\"\$args \\\"\$arg\\\"\"
- done
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
- eval \"exec \$program \$args\"
+ exec \$program \${1+\"\$@\"}
- \$echo \"\$0: cannot exec \$program \$args\"
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1
fi
else
@@ -1534,7 +1528,8 @@ else
echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
fi
-fi"
+fi\
+"
chmod +x $output
fi
exit 0
@@ -1548,9 +1543,9 @@ fi"
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=`eval \\$echo \"$old_archive_from_new_cmds\"`
+ eval cmds=\"$old_archive_from_new_cmds\"
else
- cmds=`eval \\$echo \"$old_archive_cmds\"`
+ eval cmds=\"$old_archive_cmds\"
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
@@ -1571,8 +1566,8 @@ fi"
# Only create the output if not a dry run.
if test -z "$run"; then
- echo > $output \
-"# $output - a libtool library file
+ $echo > $output "\
+# $output - a libtool library file
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
# The name that we can dlopen(3).
@@ -1593,7 +1588,8 @@ age=$age
revision=$revision
# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
+libdir='$install_libdir'\
+"
fi
# Do a symbolic link so that the libtool archive can be found in
@@ -1835,7 +1831,7 @@ libdir='$install_libdir'"
# Do each command in the postinstall commands.
lib="$destdir/$realname"
- cmds=`eval \\$echo \"$postinstall_cmds\"`
+ eval cmds=\"$postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1972,7 +1968,7 @@ libdir='$install_libdir'"
$run eval "$install_prog \$file \$oldlib" || exit $?
# Do each command in the postinstall commands.
- cmds=`eval \\$echo \"$old_postinstall_cmds\"`
+ eval cmds=\"$old_postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2010,7 +2006,7 @@ libdir='$install_libdir'"
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
- cmds=`eval \\$echo \"$finish_cmds\"`
+ eval cmds=\"$finish_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2021,7 +2017,7 @@ libdir='$install_libdir'"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
- cmds=`eval \\$echo \"$finish_eval\"`
+ eval cmds=\"$finish_eval\"
$run eval "$cmds"
fi
done
@@ -2047,7 +2043,7 @@ libdir='$install_libdir'"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
echo " - use the \`$flag' linker flag"
fi
@@ -2238,7 +2234,7 @@ libdir='$install_libdir'"
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- cmds=`eval \\$echo \"$postuninstall_cmds\"`
+ eval cmds=\"$postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2250,7 +2246,7 @@ libdir='$install_libdir'"
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- cmds=`eval \\$echo \"$old_postuninstall_cmds\"`
+ eval cmds=\"$old_postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
diff --git a/gtk+.prj b/gtk+.prj
deleted file mode 100644
index 2c16fecaf7..0000000000
--- a/gtk+.prj
+++ /dev/null
@@ -1,334 +0,0 @@
-;; -*- Lisp -*-
-(Created-By-Prcs-Version 1 1 0)
-(Project-Description "")
-(Project-Version gtk+ 0 16)
-(Parent-Version gtk+ 0 15)
-(Descends-From -*- -*- -*-)
-(Version-Log "")
-(New-Version-Log "")
-(Checkin-Time "Wed, 19 Feb 1997 15:49:10 -0800")
-(Checkin-Login pmattis)
-(Populate-Ignore ("\\.o$" "\\.a$" "^core$" "^.*/core$"
- ".*.deps/.*" "\\.dvi$" "\\.aux$" "\\.log"
- "Makefile$" "config.cache$" "config.log$"
- "configure$" "gconfig.h$" "stamp-h$"))
-(Files
-;; This is a comment. Fill in files here.
-;; For example: (prcs/checkout.cc ())
-
-; Files added by populate at Thu, 21 Nov 1996 16:48:40 -0800:
-
- (docs/texinfo.tex (gtk+/1_texinfo.te 1.1 644))
- (docs/gtk.texi (gtk+/2_gtk.texi 1.5 644))
- (docs/gdk.texi (gtk+/3_gdk.texi 1.2 644))
- (docs/Makefile.in (gtk+/4_Makefile.i 1.5 644))
- (docs/Makefile.am (gtk+/5_Makefile.a 1.2 644))
- (gtk/testgtk.c (gtk+/6_testgtk.c 1.14 644))
- (gtk/gtkwindow.h (gtk+/7_gtkwindow. 1.6 644))
- (gtk/gtkwindow.c (gtk+/8_gtkwindow. 1.10 644))
- (gtk/gtkwidget.h (gtk+/9_gtkwidget. 1.8 644))
- (gtk/gtkwidget.c (gtk+/10_gtkwidget. 1.14 644))
- (gtk/gtkvseparator.h (gtk+/11_gtkvsepara 1.3 644))
- (gtk/gtkvseparator.c (gtk+/12_gtkvsepara 1.5 644))
- (gtk/gtkvscrollbar.h (gtk+/13_gtkvscroll 1.3 644))
- (gtk/gtkvscrollbar.c (gtk+/14_gtkvscroll 1.5 644))
- (gtk/gtkvscale.h (gtk+/15_gtkvscale. 1.2 644))
- (gtk/gtkvscale.c (gtk+/16_gtkvscale. 1.7 644))
- (gtk/gtkvruler.h (gtk+/17_gtkvruler. 1.4 644))
- (gtk/gtkvruler.c (gtk+/18_gtkvruler. 1.7 644))
- (gtk/gtkviewport.h (gtk+/19_gtkviewpor 1.3 644))
- (gtk/gtkviewport.c (gtk+/20_gtkviewpor 1.6 644))
- (gtk/gtkvbox.h (gtk+/21_gtkvbox.h 1.2 644))
- (gtk/gtkvbox.c (gtk+/22_gtkvbox.c 1.5 644))
- (gtk/gtktypeutils.h (gtk+/23_gtktypeuti 1.4 644))
- (gtk/gtktypeutils.c (gtk+/24_gtktypeuti 1.6 644))
- (gtk/gtktreeitem.h (gtk+/25_gtktreeite 1.3 644))
- (gtk/gtktreeitem.c (gtk+/26_gtktreeite 1.4 644))
- (gtk/gtktree.h (gtk+/27_gtktree.h 1.3 644))
- (gtk/gtktree.c (gtk+/28_gtktree.c 1.4 644))
- (gtk/gtktogglebutton.h (gtk+/29_gtktoggleb 1.5 644))
- (gtk/gtktogglebutton.c (gtk+/30_gtktoggleb 1.8 644))
- (gtk/gtktable.h (gtk+/31_gtktable.h 1.2 644))
- (gtk/gtktable.c (gtk+/32_gtktable.c 1.8 644))
- (gtk/gtkstyle.h (gtk+/33_gtkstyle.h 1.3 644))
- (gtk/gtkstyle.c (gtk+/34_gtkstyle.c 1.7 644))
- (gtk/gtksignal.h (gtk+/35_gtksignal. 1.7 644))
- (gtk/gtksignal.c (gtk+/36_gtksignal. 1.9 644))
- (gtk/gtkseparator.h (gtk+/37_gtkseparat 1.2 644))
- (gtk/gtkseparator.c (gtk+/38_gtkseparat 1.4 644))
- (gtk/gtkscrolledwindow.h (gtk+/39_gtkscrolle 1.2 644))
- (gtk/gtkscrolledwindow.c (gtk+/40_gtkscrolle 1.8 644))
- (gtk/gtkscrollbar.h (gtk+/41_gtkscrollb 1.2 644))
- (gtk/gtkscrollbar.c (gtk+/42_gtkscrollb 1.4 644))
- (gtk/gtkscale.h (gtk+/43_gtkscale.h 1.4 644))
- (gtk/gtkscale.c (gtk+/44_gtkscale.c 1.7 644))
- (gtk/gtkruler.h (gtk+/45_gtkruler.h 1.5 644))
- (gtk/gtkruler.c (gtk+/46_gtkruler.c 1.8 644))
- (gtk/gtkrc.h (gtk+/47_gtkrc.h 1.3 644))
- (gtk/gtkrc.c (gtk+/48_gtkrc.c 1.4 644))
- (gtk/gtkrange.h (gtk+/49_gtkrange.h 1.4 644))
- (gtk/gtkrange.c (gtk+/50_gtkrange.c 1.6 644))
- (gtk/gtkradiobutton.h (gtk+/51_gtkradiobu 1.3 644))
- (gtk/gtkradiobutton.c (gtk+/b/0_gtkradiobutton.c 1.7 644))
- (gtk/gtkpixmap.h (gtk+/b/1_gtkpixmap. 1.3 644))
- (gtk/gtkpixmap.c (gtk+/b/2_gtkpixmap. 1.5 644))
- (gtk/gtkoptionmenu.h (gtk+/b/3_gtkoptionm 1.5 644))
- (gtk/gtkoptionmenu.c (gtk+/b/4_gtkoptionm 1.7 644))
- (gtk/gtkobject.h (gtk+/b/5_gtkobject. 1.6 644))
- (gtk/gtkobject.c (gtk+/b/6_gtkobject. 1.9 644))
- (gtk/gtkmisc.h (gtk+/b/7_gtkmisc.h 1.2 644))
- (gtk/gtkmisc.c (gtk+/b/8_gtkmisc.c 1.4 644))
- (gtk/gtkmenushell.h (gtk+/b/9_gtkmenushe 1.5 644))
- (gtk/gtkmenushell.c (gtk+/b/10_gtkmenushe 1.8 644))
- (gtk/gtkmenuitem.h (gtk+/b/11_gtkmenuite 1.6 644))
- (gtk/gtkmenuitem.c (gtk+/b/12_gtkmenuite 1.8 644))
- (gtk/gtkmenubar.h (gtk+/b/13_gtkmenubar 1.4 644))
- (gtk/gtkmenubar.c (gtk+/b/14_gtkmenubar 1.7 644))
- (gtk/gtkmenu.h (gtk+/b/15_gtkmenu.h 1.5 644))
- (gtk/gtkmenu.c (gtk+/b/16_gtkmenu.c 1.8 644))
- (gtk/gtkmain.h (gtk+/b/17_gtkmain.h 1.4 644))
- (gtk/gtkmain.c (gtk+/b/18_gtkmain.c 1.11 644))
- (gtk/gtklistitem.h (gtk+/b/19_gtklistite 1.3 644))
- (gtk/gtklistitem.c (gtk+/b/20_gtklistite 1.9 644))
- (gtk/gtklist.h (gtk+/b/21_gtklist.h 1.5 644))
- (gtk/gtklist.c (gtk+/b/22_gtklist.c 1.10 644))
- (gtk/gtklabel.h (gtk+/b/23_gtklabel.h 1.2 644))
- (gtk/gtklabel.c (gtk+/b/24_gtklabel.c 1.7 644))
- (gtk/gtkitem.h (gtk+/b/25_gtkitem.h 1.3 644))
- (gtk/gtkitem.c (gtk+/b/26_gtkitem.c 1.7 644))
- (gtk/gtkimage.h (gtk+/b/27_gtkimage.h 1.2 644))
- (gtk/gtkimage.c (gtk+/b/28_gtkimage.c 1.4 644))
- (gtk/gtkhseparator.h (gtk+/b/29_gtkhsepara 1.2 644))
- (gtk/gtkhseparator.c (gtk+/b/30_gtkhsepara 1.4 644))
- (gtk/gtkhscrollbar.h (gtk+/b/31_gtkhscroll 1.2 644))
- (gtk/gtkhscrollbar.c (gtk+/b/32_gtkhscroll 1.4 644))
- (gtk/gtkhscale.h (gtk+/b/33_gtkhscale. 1.2 644))
- (gtk/gtkhscale.c (gtk+/b/34_gtkhscale. 1.7 644))
- (gtk/gtkhruler.h (gtk+/b/35_gtkhruler. 1.4 644))
- (gtk/gtkhruler.c (gtk+/b/36_gtkhruler. 1.7 644))
- (gtk/gtkhbox.h (gtk+/b/37_gtkhbox.h 1.2 644))
- (gtk/gtkhbox.c (gtk+/b/38_gtkhbox.c 1.5 644))
- (gtk/gtkgc.h (gtk+/b/39_gtkgc.h 1.3 644))
- (gtk/gtkgc.c (gtk+/b/40_gtkgc.c 1.5 644))
- (gtk/gtkframe.h (gtk+/b/41_gtkframe.h 1.2 644))
- (gtk/gtkframe.c (gtk+/b/42_gtkframe.c 1.5 644))
- (gtk/gtkenums.h (gtk+/b/45_gtkenums.h 1.6 644))
- (gtk/gtkentry.h (gtk+/b/46_gtkentry.h 1.5 644))
- (gtk/gtkentry.c (gtk+/b/47_gtkentry.c 1.9 644))
- (gtk/gtkdrawingarea.h (gtk+/b/48_gtkdrawing 1.4 644))
- (gtk/gtkdrawingarea.c (gtk+/b/49_gtkdrawing 1.6 644))
- (gtk/gtkdata.h (gtk+/b/50_gtkdata.h 1.2 644))
- (gtk/gtkdata.c (gtk+/b/51_gtkdata.c 1.7 644))
- (gtk/gtkcontainer.h (gtk+/c/0_gtkcontainer.h 1.6 644))
- (gtk/gtkcontainer.c (gtk+/c/1_gtkcontain 1.10 644))
- (gtk/gtkcheckbutton.h (gtk+/c/2_gtkcheckbu 1.3 644))
- (gtk/gtkcheckbutton.c (gtk+/c/3_gtkcheckbu 1.6 644))
- (gtk/gtkbutton.h (gtk+/c/4_gtkbutton. 1.4 644))
- (gtk/gtkbutton.c (gtk+/c/5_gtkbutton. 1.9 644))
- (gtk/gtkbox.h (gtk+/c/6_gtkbox.h 1.2 644))
- (gtk/gtkbox.c (gtk+/c/7_gtkbox.c 1.5 644))
- (gtk/gtkbin.h (gtk+/c/8_gtkbin.h 1.2 644))
- (gtk/gtkbin.c (gtk+/c/9_gtkbin.c 1.6 644))
- (gtk/gtkarrow.h (gtk+/c/10_gtkarrow.h 1.2 644))
- (gtk/gtkarrow.c (gtk+/c/11_gtkarrow.c 1.4 644))
- (gtk/gtkalignment.h (gtk+/c/12_gtkalignme 1.2 644))
- (gtk/gtkalignment.c (gtk+/c/13_gtkalignme 1.5 644))
- (gtk/gtkadjustment.h (gtk+/c/14_gtkadjustm 1.3 644))
- (gtk/gtkadjustment.c (gtk+/c/15_gtkadjustm 1.7 644))
- (gtk/gtkaccelerator.h (gtk+/c/16_gtkacceler 1.4 644))
- (gtk/gtkaccelerator.c (gtk+/c/17_gtkacceler 1.4 644))
- (gtk/gtk.h (gtk+/c/18_gtk.h 1.7 644))
- (gtk/fnmatch.h (gtk+/c/19_fnmatch.h 1.1 644))
- (gtk/fnmatch.c (gtk+/c/20_fnmatch.c 1.1 644))
- (TODO (gtk+/c/21_TODO 1.13 644))
- (gtk/Makefile.in (gtk+/c/22_Makefile.i 1.10 644))
- (gtk/Makefile.am (gtk+/c/23_Makefile.a 1.10 644))
- (gdk/makekeysyms.sed (gtk+/c/24_makekeysym 1.1 644))
- (gdk/makekeysyms (gtk+/c/25_makekeysym 1.1 755))
- (gdk/makecursors.sed (gtk+/c/26_makecursor 1.1 644))
- (gdk/makecursors (gtk+/c/27_makecursor 1.1 755))
- (gdk/gdkx.h (gtk+/c/28_gdkx.h 1.2 644))
- (gdk/gdkwindow.c (gtk+/c/29_gdkwindow. 1.8 644))
- (gdk/gdkvisual.c (gtk+/c/30_gdkvisual. 1.2 644))
- (gdk/gdktypes.h (gtk+/c/31_gdktypes.h 1.6 644))
- (gdk/gdkrectangle.c (gtk+/c/32_gdkrectang 1.3 644))
- (gdk/gdkprivate.h (gtk+/c/33_gdkprivate 1.4 644))
- (gdk/gdkpixmap.c (gtk+/c/34_gdkpixmap. 1.6 644))
- (gdk/gdkkeysyms.h (gtk+/c/35_gdkkeysyms 1.2 644))
- (gdk/gdkimage.c (gtk+/c/36_gdkimage.c 1.4 644))
- (gdk/gdkglobals.c (gtk+/c/37_gdkglobals 1.3 644))
- (gdk/gdkgc.c (gtk+/c/38_gdkgc.c 1.6 644))
- (gdk/gdkfont.c (gtk+/c/39_gdkfont.c 1.4 644))
- (gdk/gdkdraw.c (gtk+/c/40_gdkdraw.c 1.4 644))
- (gdk/gdkcursors.h (gtk+/c/41_gdkcursors 1.3 644))
- (gdk/gdkcursor.c (gtk+/c/42_gdkcursor. 1.3 644))
- (gdk/gdkcolor.c (gtk+/c/43_gdkcolor.c 1.4 644))
- (gdk/gdk.h (gtk+/c/44_gdk.h 1.6 644))
- (gdk/gdk.c (gtk+/c/45_gdk.c 1.8 644))
- (gdk/Makefile.in (gtk+/c/46_Makefile.i 1.7 644))
- (gdk/Makefile.am (gtk+/c/47_Makefile.a 1.7 644))
- (glib/testglib.c (gtk+/c/48_testglib.c 1.8 644))
- (glib/stamp-h.in (gtk+/c/49_stamp-h.in 1.1 644))
- (glib/mkinstalldirs (gtk+/c/50_mkinstalld 1.1 755))
- (glib/install-sh (gtk+/c/51_install-sh 1.1 755))
- (glib/gutils.c (gtk+/d/0_gutils.c 1.3 644))
- (glib/gtimer.c (gtk+/d/1_gtimer.c 1.2 644))
- (glib/gslist.c (gtk+/d/2_gslist.c 1.6 644))
- (glib/gprimes.c (gtk+/d/3_gprimes.c 1.2 644))
- (glib/gmem.c (gtk+/d/4_gmem.c 1.9 644))
- (glib/glist.c (gtk+/d/5_glist.c 1.4 644))
- (glib/glib.h (gtk+/d/6_glib.h 1.8 644))
- (glib/ghash.c (gtk+/d/7_ghash.c 1.5 644))
- (glib/gerror.c (gtk+/d/8_gerror.c 1.4 644))
- (glib/gconfig.h.in (gtk+/d/9_gconfig.h. 1.3 644))
- (glib/gconfig.h (gtk+/d/10_gconfig.h 1.6 644))
- (glib/gcache.c (gtk+/d/11_gcache.c 1.6 644))
- (glib/configure.in (gtk+/d/12_configure. 1.4 644))
- (glib/configure (gtk+/d/13_configure 1.4 755))
- (glib/config.sub (gtk+/d/14_config.sub 1.2 755))
- (glib/config.guess (gtk+/d/15_config.gue 1.2 755))
- (glib/aclocal.m4 (gtk+/d/16_aclocal.m4 1.4 644))
- (glib/acconfig.h (gtk+/d/17_acconfig.h 1.3 644))
- (glib/README (gtk+/d/18_README 1.1 644))
- (glib/NEWS (gtk+/d/19_NEWS 1.1 644))
- (glib/Makefile.in (gtk+/d/20_Makefile.i 1.7 644))
- (glib/Makefile.am (gtk+/d/21_Makefile.a 1.7 644))
- (glib/INSTALL (gtk+/d/22_INSTALL 1.1 644))
- (glib/ChangeLog (gtk+/d/23_ChangeLog 1.2 644))
- (glib/COPYING (gtk+/d/24_COPYING 1.1 644))
- (glib/AUTHORS (gtk+/d/25_AUTHORS 1.2 644))
- (stamp-h.in (gtk+/d/26_stamp-h.in 1.1 644))
- (mkinstalldirs (gtk+/d/27_mkinstalld 1.1 755))
- (install-sh (gtk+/d/28_install-sh 1.1 755))
- (configure.in (gtk+/d/30_configure. 1.8 644))
- (configure (gtk+/d/31_configure 1.8 755))
- (config.sub (gtk+/d/32_config.sub 1.2 755))
- (config.h.in (gtk+/d/33_config.h.i 1.4 644))
- (config.guess (gtk+/d/34_config.gue 1.2 755))
- (aclocal.m4 (gtk+/d/35_aclocal.m4 1.4 644))
- (acconfig.h (gtk+/d/36_acconfig.h 1.3 644))
- (README (gtk+/d/37_README 1.1 644))
- (NEWS (gtk+/d/38_NEWS 1.1 644))
- (Makefile.in (gtk+/d/39_Makefile.i 1.9 644))
- (Makefile.am (gtk+/d/40_Makefile.a 1.7 644))
- (INSTALL (gtk+/d/41_INSTALL 1.1 644))
- (ChangeLog (gtk+/d/42_ChangeLog 1.14 644))
- (COPYING (gtk+/d/43_COPYING 1.2 644))
- (AUTHORS (gtk+/d/44_AUTHORS 1.2 644))
-
-; Files added by populate at Mon, 30 Dec 1996 13:14:24 -0800:
-
- (gtk/gtkmenufactory.h (gtk+/0_gtkmenufac 1.4 644))
- (gtk/gtkmenufactory.c (gtk+/1_gtkmenufac 1.4 644))
-
-; Files added by populate at Thu, 02 Jan 1997 15:31:44 -0800:
-
- (gtk/testgtkrc (gtk+/0_testgtkrc 1.2 644))
-
-
-; Files added by populate at Fri, 10 Jan 1997 14:19:47 -0800:
-
- (gtk/gtkfilesel.h (gtk+/b/0_gtkfilesel.h 1.3 644))
- (gtk/gtkfilesel.c (gtk+/c/0_gtkfilesel.c 1.7 644))
- (glib/gstring.c (gtk+/d/0_gstring.c 1.4 644))
-
-; Files added by populate at Fri, 10 Jan 1997 18:01:19 -0800:
-
- (gdk/gdkselection.c (gtk+/b/0_gdkselection.c 1.5 644))
-
-; Files added by populate at Sun, 19 Jan 1997 18:29:12 -0800:
-
- (gtk/gtktext.h (gtk+/b/0_gtktext.h 1.4 644))
- (gtk/gtktext.c (gtk+/c/0_gtktext.c 1.7 644))
- (gtk/gtkdialog.h (gtk+/d/0_gtkdialog.h 1.2 644))
- (gtk/gtkdialog.c (gtk+/d/47_gtkdialog. 1.4 644))
- (gdk/gdkxid.c (gtk+/d/48_gdkxid.c 1.2 644))
-
-; Files added by populate at Thu, 23 Jan 1997 01:29:17 -0800:
-
- (gtk/gtknotebook.h (gtk+/b/0_gtknotebook.h 1.3 644))
- (gtk/gtknotebook.c (gtk+/c/0_gtknotebook.c 1.6 644))
-
-; Files added by populate at Thu, 23 Jan 1997 02:06:11 -0800:
-
- (gtk/line-wrap.xbm (gtk+/b/0_line-wrap.xbm 1.1 644))
- (gtk/line-arrow.xbm (gtk+/c/0_line-arrow.xbm 1.1 644))
-
-; Files added by populate at Fri, 24 Jan 1997 13:02:44 -0800:
-
-
-
-
-
-
-; Files deleted by populate at Fri, 24 Jan 1997 13:02:44 -0800:
-
- ; `docs/texinfo3.7.patch'
-
-; Files added by populate at Tue, 28 Jan 1997 16:54:35 -0800:
-
- (gtk/simple.c (gtk+/e/0_simple.c 1.1 644))
- (glib/ltmain.sh (gtk+/e/1_ltmain.sh 1.3 644))
- (glib/ltconfig (gtk+/e/2_ltconfig 1.3 755))
- (ltmain.sh (gtk+/e/3_ltmain.sh 1.3 644))
- (ltconfig (gtk+/e/4_ltconfig 1.3 755))
-
-; Files added by populate at Thu, 30 Jan 1997 01:30:38 -0800:
-
- (glib/gtree.c (gtk+/b/0_gtree.c 1.3 644))
-
-; Files added by populate at Mon, 03 Feb 1997 19:46:14 -0800:
-
- (makecopyright (gtk+/b/0_makecopyright 1.1 755))
-
-; Files added by populate at Sat, 08 Feb 1997 14:41:52 -0800:
-
- (gtk/gtkprogressbar.h (gtk+/b/0_gtkprogressbar.h 1.1 644))
- (gtk/gtkprogressbar.c (gtk+/c/0_gtkprogressbar.c 1.1 644))
- (glib/garray.c (gtk+/d/0_garray.c 1.1 644))
-
-; Files deleted by populate at Sat, 08 Feb 1997 14:41:52 -0800:
-
- ; `interp/Makefile.am'
- ; `interp/Makefile.in'
- ; `interp/interp.c'
-
-;; Files added by populate at Wed, 19 Feb 1997 15:48:04 -0800:
-
- (gtk+.xconfig.in (gtk+/b/0_gtk+.xconfig.in 1.1 644))
-
-;; Files deleted by populate at Wed, 19 Feb 1997 15:48:04 -0800:
-
- ; docs/proposal.tex
-
-;; Files added by populate at Thu, 17 Apr 1997 17:39:47 -0700:
-
- (docs/macros.texi ())
- (gdk/gdkproperty.c ())
- (glib/missing () :symlink)
- (missing () :symlink)
-
-;; Files deleted by populate at Thu, 17 Apr 1997 17:39:47 -0700:
-
- ; gtk/gtkcanvas.c
- ; gtk/gtkcanvas.h
- ; gtk/gtkfill.c
- ; gtk/gtkfill.h
-
-;; Files added by populate at Thu, 17 Apr 1997 17:41:14 -0700:
-
- (gtk/gtktooltips.h ())
- (gtk/gtktooltips.c ())
- (gtk/gtkradiomenuitem.h ())
- (gtk/gtkradiomenuitem.c ())
- (gtk/gtkpreview.h ())
- (gtk/gtkpreview.c ())
- (gtk/gtkcolorsel.h ())
- (gtk/gtkcolorsel.c ())
- (gtk/gtkcheckmenuitem.h ())
- (gtk/gtkcheckmenuitem.c ())
- (gtk/gtkaspectframe.h ())
- (gtk/gtkaspectframe.c ())
-)
-(Merge-Parents)
-(New-Merge-Parents)
diff --git a/gtk.m4 b/gtk.m4
index b51cd6feac..463c436777 100644
--- a/gtk.m4
+++ b/gtk.m4
@@ -12,6 +12,8 @@ AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
+AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
+ , enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
@@ -30,18 +32,28 @@ AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
- if test "$GTK_CONFIG" != "no" ; then
+ if test "$GTK_CONFIG" = "no" ; then
+ no_gtk=yes
+ else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$LIBS $GTK_LIBS"
+ gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
- AC_TRY_RUN([
+ rm -f conf.gtktest
+ AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
@@ -50,30 +62,109 @@ main ()
{
int major, minor, micro;
+ system ("touch conf.gtktest");
+
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
- return !((gtk_major_version > major) ||
- ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If gtk-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
+ printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
+ printf("*** before re-running configure\n");
+ }
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
+ printf("*** correct copy of gtk-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- else
- no_gtk=yes
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
+ if test "$GTK_CONFIG" = "no" ; then
+ echo "*** The gtk-config script installed by GTK could not be found"
+ echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GTK_CONFIG environment variable to the"
+ echo "*** full path to gtk-config."
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK test program, checking why..."
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK or finding the wrong"
+ echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ echo "***"
+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+ echo "*** came with the system with the command"
+ echo "***"
+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK was incorrectly installed"
+ echo "*** or that you have moved GTK since it was installed. In the latter case, you"
+ echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
+ rm -f conf.gtktest
])
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 668a428ff5..d0b99fcf2a 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -203,6 +203,7 @@ EXTRA_DIST = \
line-arrow.xbm \
line-wrap.xbm \
testgtkrc \
+ testgtkrc2 \
gtk.defs \
runelisp \
gentypeinfo.el \
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index 40de518a81..37b2aa3460 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -34,10 +34,10 @@ static void gtk_adjustment_init (GtkAdjustment *adjustment);
static guint adjustment_signals[LAST_SIGNAL] = { 0 };
-guint
+GtkType
gtk_adjustment_get_type ()
{
- static guint adjustment_type = 0;
+ static GtkType adjustment_type = 0;
if (!adjustment_type)
{
@@ -130,3 +130,33 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed");
}
+
+void
+gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
+ gfloat lower,
+ gfloat upper)
+{
+ gint need_emission;
+
+ g_return_if_fail (adjustment != NULL);
+ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
+
+ lower = CLAMP (lower, adjustment->lower, adjustment->upper);
+ upper = CLAMP (upper, adjustment->lower, adjustment->upper);
+
+ need_emission = FALSE;
+
+ if (adjustment->value + adjustment->page_size < upper)
+ {
+ adjustment->value = upper - adjustment->page_size;
+ need_emission = TRUE;
+ }
+ if (adjustment->value > lower)
+ {
+ adjustment->value = lower;
+ need_emission = TRUE;
+ }
+
+ if (need_emission)
+ gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed");
+}
diff --git a/gtk/gtkadjustment.h b/gtk/gtkadjustment.h
index 1e53a31e12..75caf47e87 100644
--- a/gtk/gtkadjustment.h
+++ b/gtk/gtkadjustment.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -26,21 +26,22 @@
#ifdef __cplusplus
extern "C" {
+#pragma }
#endif /* __cplusplus */
-#define GTK_ADJUSTMENT(obj) GTK_CHECK_CAST (obj, gtk_adjustment_get_type (), GtkAdjustment)
-#define GTK_ADJUSTMENT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_adjustment_get_type (), GtkAdjustmentClass)
-#define GTK_IS_ADJUSTMENT(obj) GTK_CHECK_TYPE (obj, gtk_adjustment_get_type ())
+#define GTK_ADJUSTMENT(obj) (GTK_CHECK_CAST (obj, gtk_adjustment_get_type (), GtkAdjustment))
+#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gtk_adjustment_get_type (), GtkAdjustmentClass))
+#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE (obj, gtk_adjustment_get_type ()))
-typedef struct _GtkAdjustment GtkAdjustment;
+typedef struct _GtkAdjustment GtkAdjustment;
typedef struct _GtkAdjustmentClass GtkAdjustmentClass;
struct _GtkAdjustment
{
GtkData data;
-
+
gfloat lower;
gfloat upper;
gfloat value;
@@ -52,21 +53,25 @@ struct _GtkAdjustment
struct _GtkAdjustmentClass
{
GtkDataClass parent_class;
-
- void (* changed) (GtkAdjustment *adjustment);
+
+ void (* changed) (GtkAdjustment *adjustment);
void (* value_changed) (GtkAdjustment *adjustment);
};
-guint gtk_adjustment_get_type (void);
-GtkObject* gtk_adjustment_new (gfloat value,
- gfloat lower,
- gfloat upper,
- gfloat step_increment,
- gfloat page_increment,
- gfloat page_size);
-void gtk_adjustment_set_value (GtkAdjustment *adjustment,
- gfloat value);
+GtkType gtk_adjustment_get_type (void);
+GtkObject* gtk_adjustment_new (gfloat value,
+ gfloat lower,
+ gfloat upper,
+ gfloat step_increment,
+ gfloat page_increment,
+ gfloat page_size);
+void gtk_adjustment_set_value (GtkAdjustment *adjustment,
+ gfloat value);
+void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
+ gfloat lower,
+ gfloat upper);
+
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 4e7b56e140..c1e07766d8 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -200,27 +200,25 @@ gtk_bin_add (GtkContainer *container,
g_return_if_fail (widget != NULL);
bin = GTK_BIN (container);
+ g_return_if_fail (bin->child == NULL);
- if (!bin->child)
+ gtk_widget_set_parent (widget, GTK_WIDGET (container));
+
+ if (GTK_WIDGET_VISIBLE (widget->parent))
{
- gtk_widget_set_parent (widget, GTK_WIDGET (container));
-
- if (GTK_WIDGET_VISIBLE (widget->parent))
- {
- if (GTK_WIDGET_REALIZED (widget->parent) &&
- !GTK_WIDGET_REALIZED (widget))
- gtk_widget_realize (widget);
-
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
- }
-
- bin->child = widget;
-
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (widget);
+ if (GTK_WIDGET_REALIZED (widget->parent) &&
+ !GTK_WIDGET_REALIZED (widget))
+ gtk_widget_realize (widget);
+
+ if (GTK_WIDGET_MAPPED (widget->parent) &&
+ !GTK_WIDGET_MAPPED (widget))
+ gtk_widget_map (widget);
}
+
+ bin->child = widget;
+
+ if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ gtk_widget_queue_resize (widget);
}
static void
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 58891217fb..0a58ca046e 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -160,6 +160,7 @@ gtk_box_pack_start (GtkBox *box,
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
+ g_return_if_fail (child->parent == NULL);
child_info = g_new (GtkBoxChild, 1);
child_info->widget = child;
@@ -199,6 +200,7 @@ gtk_box_pack_end (GtkBox *box,
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
+ g_return_if_fail (child->parent == NULL);
child_info = g_new (GtkBoxChild, 1);
child_info->widget = child;
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 3ef3659de9..2f4686592c 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -2495,7 +2495,7 @@ draw_row (GtkCList * clist,
{
if (gdk_rectangle_intersect (area, &cell_rectangle, &intersect_rectangle))
gdk_draw_rectangle (clist->clist_window,
- widget->style->white_gc,
+ widget->style->base_gc[GTK_STATE_NORMAL],
TRUE,
intersect_rectangle.x,
intersect_rectangle.y,
@@ -2509,7 +2509,7 @@ draw_row (GtkCList * clist,
if (gdk_rectangle_intersect (area, &cell_rectangle, &intersect_rectangle))
gdk_draw_rectangle (clist->clist_window,
- widget->style->white_gc,
+ widget->style->base_gc[GTK_STATE_NORMAL],
TRUE,
intersect_rectangle.x,
intersect_rectangle.y,
@@ -2538,7 +2538,7 @@ draw_row (GtkCList * clist,
else
{
gdk_draw_rectangle (clist->clist_window,
- widget->style->white_gc,
+ widget->style->base_gc[GTK_STATE_NORMAL],
TRUE,
cell_rectangle.x,
cell_rectangle.y,
@@ -2551,7 +2551,7 @@ draw_row (GtkCList * clist,
cell_rectangle.y += clist->row_height + CELL_SPACING;
gdk_draw_rectangle (clist->clist_window,
- widget->style->white_gc,
+ widget->style->base_gc[GTK_STATE_NORMAL],
TRUE,
cell_rectangle.x,
cell_rectangle.y,
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c
index a22c654cc3..7ca02840c5 100644
--- a/gtk/gtkcombo.c
+++ b/gtk/gtkcombo.c
@@ -494,12 +494,15 @@ gtk_combo_button_release (GtkWidget * widget, GdkEvent * event, GtkCombo * combo
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK,
NULL, NULL, GDK_CURRENT_TIME);
-
return FALSE;
}
}
else
{
+ /* Don't remove the popwin when the user adjusts the scrollbats */
+ if (!(GTK_LIST (combo->list)->button))
+ return FALSE;
+
gtk_grab_remove (combo->popwin);
gdk_pointer_ungrab (event->button.time);
}
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 1e672724a3..ec2f869547 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -110,10 +110,15 @@ static guint container_signals[LAST_SIGNAL] = { 0 };
static GtkWidgetClass *parent_class = NULL;
-guint
+static const gchar *vadjustment_key = "gtk-vadjustment";
+static guint vadjustment_key_id = 0;
+static const gchar *hadjustment_key = "gtk-hadjustment";
+static guint hadjustment_key_id = 0;
+
+GtkType
gtk_container_get_type ()
{
- static guint container_type = 0;
+ static GtkType container_type = 0;
if (!container_type)
{
@@ -142,7 +147,11 @@ gtk_container_class_init (GtkContainerClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
+
parent_class = gtk_type_class (gtk_widget_get_type ());
+
+ vadjustment_key_id = gtk_object_data_force_id (vadjustment_key);
+ hadjustment_key_id = gtk_object_data_force_id (hadjustment_key);
gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_LONG, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
gtk_object_add_arg_type ("GtkContainer::auto_resize", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_AUTO_RESIZE);
@@ -608,6 +617,7 @@ gtk_real_container_focus (GtkContainer *container,
GList *tmp_list;
GList *tmp_list2;
gint return_val;
+ GtkAdjustment *adjustment;
g_return_val_if_fail (container != NULL, FALSE);
g_return_val_if_fail (GTK_IS_CONTAINER (container), FALSE);
@@ -669,6 +679,25 @@ gtk_real_container_focus (GtkContainer *container,
}
}
+ /* check for h/v adjustments
+ */
+ if (container->focus_child)
+ {
+ adjustment = gtk_object_get_data_by_id (GTK_OBJECT (container), vadjustment_key_id);
+ if (adjustment)
+ gtk_adjustment_clamp_page (adjustment,
+ container->focus_child->allocation.y,
+ (container->focus_child->allocation.y +
+ container->focus_child->allocation.height));
+
+ adjustment = gtk_object_get_data_by_id (GTK_OBJECT (container), hadjustment_key_id);
+ if (adjustment)
+ gtk_adjustment_clamp_page (adjustment,
+ container->focus_child->allocation.x,
+ (container->focus_child->allocation.x +
+ container->focus_child->allocation.width));
+ }
+
return return_val;
}
@@ -1059,3 +1088,38 @@ gtk_container_hide_all (GtkWidget *widget)
gtk_container_foreach (container, (GtkCallback) gtk_widget_hide_all, NULL);
}
+void
+gtk_container_set_focus_vadjustment (GtkContainer *container,
+ GtkAdjustment *adjustment)
+{
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (GTK_IS_CONTAINER (container));
+ if (adjustment)
+ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
+
+ if (adjustment)
+ gtk_object_ref (adjustment);
+
+ gtk_object_set_data_by_id_full (GTK_OBJECT (container),
+ vadjustment_key_id,
+ adjustment,
+ (GtkDestroyNotify) gtk_object_unref);
+}
+
+void
+gtk_container_set_focus_hadjustment (GtkContainer *container,
+ GtkAdjustment *adjustment)
+{
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (GTK_IS_CONTAINER (container));
+ if (adjustment)
+ g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
+
+ if (adjustment)
+ gtk_object_ref (adjustment);
+
+ gtk_object_set_data_by_id_full (GTK_OBJECT (container),
+ hadjustment_key_id,
+ adjustment,
+ (GtkDestroyNotify) gtk_object_unref);
+}
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index 178c79a291..a07a8b9f1e 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -23,34 +23,36 @@
#include <gdk/gdk.h>
#include <gtk/gtkenums.h>
#include <gtk/gtkwidget.h>
+#include <gtk/gtkadjustment.h>
#ifdef __cplusplus
extern "C" {
+#pragma }
#endif /* __cplusplus */
-#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), gtk_container_get_type (), GtkContainer))
+#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), gtk_container_get_type (), GtkContainer))
#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_container_get_type (), GtkContainerClass))
-#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), gtk_container_get_type ()))
+#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), gtk_container_get_type ()))
-#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
+#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
-typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkContainer GtkContainer;
typedef struct _GtkContainerClass GtkContainerClass;
struct _GtkContainer
{
GtkWidget widget;
-
+
GtkWidget *focus_child;
-
+
gint16 border_width;
guint auto_resize : 1;
guint need_resize : 1;
guint block_resize : 1;
-
-
+
+
/* The list of children that requested a resize
*/
GSList *resize_widgets;
@@ -59,52 +61,59 @@ struct _GtkContainer
struct _GtkContainerClass
{
GtkWidgetClass parent_class;
-
- void (* add) (GtkContainer *container,
- GtkWidget *widget);
- void (* remove) (GtkContainer *container,
- GtkWidget *widget);
- gint (* need_resize) (GtkContainer *container);
- void (* foreach) (GtkContainer *container,
- GtkCallback callback,
- gpointer callbabck_data);
- gint (* focus) (GtkContainer *container,
+
+ void (* add) (GtkContainer *container,
+ GtkWidget *widget);
+ void (* remove) (GtkContainer *container,
+ GtkWidget *widget);
+ gint (* need_resize) (GtkContainer *container);
+ void (* foreach) (GtkContainer *container,
+ GtkCallback callback,
+ gpointer callbabck_data);
+ gint (* focus) (GtkContainer *container,
GtkDirectionType direction);
};
-guint gtk_container_get_type (void);
-void gtk_container_border_width (GtkContainer *container,
- gint border_width);
-void gtk_container_add (GtkContainer *container,
- GtkWidget *widget);
-void gtk_container_remove (GtkContainer *container,
- GtkWidget *widget);
-void gtk_container_disable_resize (GtkContainer *container);
-void gtk_container_enable_resize (GtkContainer *container);
-void gtk_container_block_resize (GtkContainer *container);
-void gtk_container_unblock_resize (GtkContainer *container);
-gint gtk_container_need_resize (GtkContainer *container);
-void gtk_container_foreach (GtkContainer *container,
- GtkCallback callback,
- gpointer callback_data);
-void gtk_container_foreach_interp (GtkContainer *container,
+GtkType gtk_container_get_type (void);
+void gtk_container_border_width (GtkContainer *container,
+ gint border_width);
+void gtk_container_add (GtkContainer *container,
+ GtkWidget *widget);
+void gtk_container_remove (GtkContainer *container,
+ GtkWidget *widget);
+void gtk_container_disable_resize (GtkContainer *container);
+void gtk_container_enable_resize (GtkContainer *container);
+void gtk_container_block_resize (GtkContainer *container);
+void gtk_container_unblock_resize (GtkContainer *container);
+gint gtk_container_need_resize (GtkContainer *container);
+void gtk_container_foreach (GtkContainer *container,
+ GtkCallback callback,
+ gpointer callback_data);
+void gtk_container_foreach_interp (GtkContainer *container,
GtkCallbackMarshal marshal,
- gpointer callback_data,
+ gpointer callback_data,
GtkDestroyNotify notify);
-void gtk_container_foreach_full (GtkContainer *container,
- GtkCallback callback,
+void gtk_container_foreach_full (GtkContainer *container,
+ GtkCallback callback,
GtkCallbackMarshal marshal,
- gpointer callback_data,
+ gpointer callback_data,
GtkDestroyNotify notify);
-gint gtk_container_focus (GtkContainer *container,
- GtkDirectionType direction);
-GList* gtk_container_children (GtkContainer *container);
+GList* gtk_container_children (GtkContainer *container);
+void gtk_container_register_toplevel (GtkContainer *container);
+void gtk_container_unregister_toplevel (GtkContainer *container);
+gint gtk_container_focus (GtkContainer *container,
+ GtkDirectionType direction);
+void gtk_container_set_focus_vadjustment (GtkContainer *container,
+ GtkAdjustment *adjustment);
+void gtk_container_set_focus_hadjustment (GtkContainer *container,
+ GtkAdjustment *adjustment);
+
+
+
+
-void gtk_container_register_toplevel (GtkContainer *container);
-void gtk_container_unregister_toplevel (GtkContainer *container);
-
#ifdef __cplusplus
}
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index e1e7d4998e..376ef764c4 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -1436,7 +1436,13 @@ cmpl_last_valid_char (CompletionState* cmpl_state)
static gchar*
cmpl_completion_fullname (gchar* text, CompletionState* cmpl_state)
{
- if (text[0] == '/')
+ static char nothing[2] = "";
+
+ if (!cmpl_state_okay (cmpl_state))
+ {
+ return nothing;
+ }
+ else if (text[0] == '/')
{
strcpy (cmpl_state->updated_text, text);
}
@@ -1515,10 +1521,14 @@ cmpl_init_state (void)
if (!getcwd (getcwd_buf, MAXPATHLEN))
#endif
{
- cmpl_errno = errno;
- return NULL;
+ /* Oh joy, we can't get the current directory. Um..., we should have
+ * a root directory, right? Right? (Probably not portable to non-Unix)
+ */
+ strcpy (getcwd_buf, "/");
}
+tryagain:
+
new_state->reference_dir = NULL;
new_state->completion_dir = NULL;
new_state->active_completion_dir = NULL;
@@ -1542,7 +1552,11 @@ cmpl_init_state (void)
new_state->reference_dir = open_dir (getcwd_buf, new_state);
if (!new_state->reference_dir)
- return NULL;
+ {
+ /* Directories changing from underneath us, grumble */
+ strcpy (getcwd_buf, "/");
+ goto tryagain;
+ }
return new_state;
}
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index ace3558162..e598f687ab 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -437,13 +437,15 @@ gtk_fixed_remove (GtkContainer *container,
if (child->widget == widget)
{
+ gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+
gtk_widget_unparent (widget);
fixed->children = g_list_remove_link (fixed->children, children);
g_list_free (children);
g_free (child);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
break;
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index e76ff51e46..56ba0c8e14 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -31,54 +31,54 @@ enum {
typedef void (*GtkListSignal) (GtkObject *object,
- gpointer arg1,
- gpointer data);
+ gpointer arg1,
+ gpointer data);
-static void gtk_list_class_init (GtkListClass *klass);
-static void gtk_list_init (GtkList *list);
-static void gtk_list_destroy (GtkObject *object);
-static void gtk_list_map (GtkWidget *widget);
-static void gtk_list_unmap (GtkWidget *widget);
-static void gtk_list_realize (GtkWidget *widget);
-static void gtk_list_draw (GtkWidget *widget,
+static void gtk_list_class_init (GtkListClass *klass);
+static void gtk_list_init (GtkList *list);
+static void gtk_list_destroy (GtkObject *object);
+static void gtk_list_map (GtkWidget *widget);
+static void gtk_list_unmap (GtkWidget *widget);
+static void gtk_list_realize (GtkWidget *widget);
+static void gtk_list_draw (GtkWidget *widget,
GdkRectangle *area);
-static gint gtk_list_expose (GtkWidget *widget,
+static gint gtk_list_expose (GtkWidget *widget,
GdkEventExpose *event);
static gint gtk_list_enter_notify (GtkWidget *widget,
GdkEventCrossing *event);
static gint gtk_list_button_press (GtkWidget *widget,
GdkEventButton *event);
-static gint gtk_list_button_release (GtkWidget *widget,
+static gint gtk_list_button_release (GtkWidget *widget,
GdkEventButton *event);
-static void gtk_list_size_request (GtkWidget *widget,
+static void gtk_list_size_request (GtkWidget *widget,
GtkRequisition *requisition);
-static void gtk_list_size_allocate (GtkWidget *widget,
+static void gtk_list_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_list_add (GtkContainer *container,
- GtkWidget *widget);
-static void gtk_list_remove (GtkContainer *container,
- GtkWidget *widget);
-static void gtk_list_foreach (GtkContainer *container,
+static void gtk_list_add (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_list_remove (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_list_foreach (GtkContainer *container,
GtkCallback callback,
- gpointer callback_data);
+ gpointer callback_data);
-static void gtk_real_list_select_child (GtkList *list,
- GtkWidget *child);
-static void gtk_real_list_unselect_child (GtkList *list,
- GtkWidget *child);
+static void gtk_real_list_select_child (GtkList *list,
+ GtkWidget *child);
+static void gtk_real_list_unselect_child (GtkList *list,
+ GtkWidget *child);
-static void gtk_list_marshal_signal (GtkObject *object,
+static void gtk_list_marshal_signal (GtkObject *object,
GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
+ gpointer func_data,
+ GtkArg *args);
static GtkContainerClass *parent_class = NULL;
static guint list_signals[LAST_SIGNAL] = { 0 };
-guint
+GtkType
gtk_list_get_type ()
{
static guint list_type = 0;
@@ -93,7 +93,7 @@ gtk_list_get_type ()
(GtkClassInitFunc) gtk_list_class_init,
(GtkObjectInitFunc) gtk_list_init,
(GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL,
+ (GtkArgGetFunc) NULL,
};
list_type = gtk_type_unique (gtk_container_get_type (), &list_info);
@@ -117,27 +117,27 @@ gtk_list_class_init (GtkListClass *class)
list_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GtkListClass, selection_changed),
- gtk_signal_default_marshaller,
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (GtkListClass, selection_changed),
+ gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
list_signals[SELECT_CHILD] =
gtk_signal_new ("select_child",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GtkListClass, select_child),
- gtk_list_marshal_signal,
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (GtkListClass, select_child),
+ gtk_list_marshal_signal,
GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
+ GTK_TYPE_WIDGET);
list_signals[UNSELECT_CHILD] =
gtk_signal_new ("unselect_child",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GtkListClass, unselect_child),
- gtk_list_marshal_signal,
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (GtkListClass, unselect_child),
+ gtk_list_marshal_signal,
GTK_TYPE_NONE, 1,
- GTK_TYPE_WIDGET);
+ GTK_TYPE_WIDGET);
gtk_object_class_add_signals (object_class, list_signals, LAST_SIGNAL);
@@ -219,7 +219,7 @@ gtk_list_destroy (GtkObject *object)
void
gtk_list_insert_items (GtkList *list,
GList *items,
- gint position)
+ gint position)
{
GtkWidget *widget;
GList *tmp_list;
@@ -307,7 +307,7 @@ gtk_list_append_items (GtkList *list,
void
gtk_list_prepend_items (GtkList *list,
- GList *items)
+ GList *items)
{
g_return_if_fail (list != NULL);
g_return_if_fail (GTK_IS_LIST (list));
@@ -316,8 +316,8 @@ gtk_list_prepend_items (GtkList *list,
}
static void
-gtk_list_remove_items_internal (GtkList *list,
- GList *items,
+gtk_list_remove_items_internal (GtkList *list,
+ GList *items,
gboolean no_unref)
{
GtkWidget *widget;
@@ -377,15 +377,15 @@ gtk_list_remove_items_internal (GtkList *list,
}
void
-gtk_list_remove_items (GtkList *list,
- GList *items)
+gtk_list_remove_items (GtkList *list,
+ GList *items)
{
gtk_list_remove_items_internal (list, items, FALSE);
}
void
-gtk_list_remove_items_no_unref (GtkList *list,
- GList *items)
+gtk_list_remove_items_no_unref (GtkList *list,
+ GList *items)
{
gtk_list_remove_items_internal (list, items, TRUE);
}
@@ -421,11 +421,11 @@ gtk_list_clear_items (GtkList *list,
if (start_list->prev)
start_list->prev->next = end_list;
if (end_list && end_list->prev)
- end_list->prev->next = NULL;
+ end_list->prev->next = NULL;
if (end_list)
- end_list->prev = start_list->prev;
+ end_list->prev = start_list->prev;
if (start_list == list->children)
- list->children = end_list;
+ list->children = end_list;
selection_changed = FALSE;
widget = NULL;
@@ -478,7 +478,7 @@ gtk_list_select_item (GtkList *list,
void
gtk_list_unselect_item (GtkList *list,
- gint item)
+ gint item)
{
GList *tmp_list;
@@ -491,7 +491,7 @@ gtk_list_unselect_item (GtkList *list,
}
void
-gtk_list_select_child (GtkList *list,
+gtk_list_select_child (GtkList *list,
GtkWidget *child)
{
gtk_signal_emit (GTK_OBJECT (list), list_signals[SELECT_CHILD], child);
@@ -531,7 +531,7 @@ gtk_list_child_position (GtkList *list,
}
void
-gtk_list_set_selection_mode (GtkList *list,
+gtk_list_set_selection_mode (GtkList *list,
GtkSelectionMode mode)
{
g_return_if_fail (list != NULL);
@@ -639,7 +639,7 @@ gtk_list_draw (GtkWidget *widget,
}
static gint
-gtk_list_expose (GtkWidget *widget,
+gtk_list_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkList *list;
@@ -693,7 +693,12 @@ gtk_list_enter_notify (GtkWidget *widget,
item = item->parent;
if (item && (item->parent == widget))
- gtk_list_select_child (list, item);
+ {
+ gtk_list_select_child (list, item);
+
+ if (!GTK_WIDGET_HAS_FOCUS (item))
+ gtk_widget_grab_focus (item);
+ }
return FALSE;
}
@@ -732,7 +737,7 @@ gtk_list_button_press (GtkWidget *widget,
}
static gint
-gtk_list_button_release (GtkWidget *widget,
+gtk_list_button_release (GtkWidget *widget,
GdkEventButton *event)
{
GtkList *list;
@@ -841,7 +846,7 @@ gtk_list_size_allocate (GtkWidget *widget,
static void
gtk_list_add (GtkContainer *container,
- GtkWidget *widget)
+ GtkWidget *widget)
{
GtkList *list;
@@ -895,8 +900,8 @@ gtk_list_remove (GtkContainer *container,
static void
gtk_list_foreach (GtkContainer *container,
- GtkCallback callback,
- gpointer callback_data)
+ GtkCallback callback,
+ gpointer callback_data)
{
GtkList *list;
GtkWidget *child;
@@ -1028,7 +1033,7 @@ gtk_real_list_select_child (GtkList *list,
}
static void
-gtk_real_list_unselect_child (GtkList *list,
+gtk_real_list_unselect_child (GtkList *list,
GtkWidget *child)
{
g_return_if_fail (list != NULL);
@@ -1057,10 +1062,10 @@ gtk_real_list_unselect_child (GtkList *list,
static void
-gtk_list_marshal_signal (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
+gtk_list_marshal_signal (GtkObject *object,
+ GtkSignalFunc func,
+ gpointer func_data,
+ GtkArg *args)
{
GtkListSignal rfunc;
diff --git a/gtk/gtklist.h b/gtk/gtklist.h
index 8a1799b753..9f68b67a21 100644
--- a/gtk/gtklist.h
+++ b/gtk/gtklist.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -30,12 +30,12 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_LIST(obj) GTK_CHECK_CAST (obj, gtk_list_get_type (), GtkList)
-#define GTK_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_list_get_type (), GtkListClass)
-#define GTK_IS_LIST(obj) GTK_CHECK_TYPE (obj, gtk_list_get_type ())
+#define GTK_LIST(obj) (GTK_CHECK_CAST (obj, gtk_list_get_type (), GtkList))
+#define GTK_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gtk_list_get_type (), GtkListClass))
+#define GTK_IS_LIST(obj) (GTK_CHECK_TYPE (obj, gtk_list_get_type ()))
-typedef struct _GtkList GtkList;
+typedef struct _GtkList GtkList;
typedef struct _GtkListClass GtkListClass;
struct _GtkList
@@ -50,49 +50,49 @@ struct _GtkList
guint16 selection_end_pos;
guint selection_mode : 2;
guint scroll_direction : 1;
- guint have_grab : 1;
- guint16 button;
+ guint have_grab : 1; /* unused */
+ guint16 button; /* read by GtkCombo */
};
struct _GtkListClass
{
GtkContainerClass parent_class;
- void (* selection_changed) (GtkList *list);
- void (* select_child) (GtkList *list,
+ void (* selection_changed) (GtkList *list);
+ void (* select_child) (GtkList *list,
GtkWidget *child);
- void (* unselect_child) (GtkList *list,
+ void (* unselect_child) (GtkList *list,
GtkWidget *child);
};
-guint gtk_list_get_type (void);
-GtkWidget* gtk_list_new (void);
-void gtk_list_insert_items (GtkList *list,
- GList *items,
- gint position);
-void gtk_list_append_items (GtkList *list,
- GList *items);
-void gtk_list_prepend_items (GtkList *list,
- GList *items);
-void gtk_list_remove_items (GtkList *list,
- GList *items);
-void gtk_list_remove_items_no_unref (GtkList *list,
- GList *items);
-void gtk_list_clear_items (GtkList *list,
- gint start,
- gint end);
-void gtk_list_select_item (GtkList *list,
- gint item);
-void gtk_list_unselect_item (GtkList *list,
- gint item);
-void gtk_list_select_child (GtkList *list,
- GtkWidget *child);
-void gtk_list_unselect_child (GtkList *list,
- GtkWidget *child);
-gint gtk_list_child_position (GtkList *list,
- GtkWidget *child);
-void gtk_list_set_selection_mode (GtkList *list,
+GtkType gtk_list_get_type (void);
+GtkWidget* gtk_list_new (void);
+void gtk_list_insert_items (GtkList *list,
+ GList *items,
+ gint position);
+void gtk_list_append_items (GtkList *list,
+ GList *items);
+void gtk_list_prepend_items (GtkList *list,
+ GList *items);
+void gtk_list_remove_items (GtkList *list,
+ GList *items);
+void gtk_list_remove_items_no_unref (GtkList *list,
+ GList *items);
+void gtk_list_clear_items (GtkList *list,
+ gint start,
+ gint end);
+void gtk_list_select_item (GtkList *list,
+ gint item);
+void gtk_list_unselect_item (GtkList *list,
+ gint item);
+void gtk_list_select_child (GtkList *list,
+ GtkWidget *child);
+void gtk_list_unselect_child (GtkList *list,
+ GtkWidget *child);
+gint gtk_list_child_position (GtkList *list,
+ GtkWidget *child);
+void gtk_list_set_selection_mode (GtkList *list,
GtkSelectionMode mode);
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index 1f3bf3c623..cd852d3bdc 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -72,7 +72,8 @@ static void gtk_object_get_arg (GtkObject *object,
static void gtk_object_shutdown (GtkObject *object);
static void gtk_object_real_destroy (GtkObject *object);
static void gtk_object_finalize (GtkObject *object);
-static void gtk_object_notify_weaks (gpointer data);
+static void gtk_object_notify_weaks (GtkObject *object);
+
static void gtk_object_data_destroy (GtkObjectData *odata);
static guint* gtk_object_data_id_alloc (void);
@@ -91,7 +92,8 @@ static GHashTable *arg_info_ht = NULL;
static const gchar *user_data_key = "user_data";
static guint user_data_key_id = 0;
-
+static const gchar *weakrefs_key = "gtk-weakrefs";
+static guint weakrefs_key_id = 0;
#ifdef G_ENABLE_DEBUG
static guint obj_count = 0;
@@ -259,6 +261,8 @@ gtk_object_finalize (GtkObject *object)
{
GtkObjectData *odata, *next;
+ gtk_object_notify_weaks (object);
+
odata = object->object_data;
while (odata)
{
@@ -443,14 +447,14 @@ gtk_object_sink (GtkObject *object)
* referenced object is finalized.
*
* They are not implemented as a signal because they really are
- * special and need to be used with great care. Unlike signals, who
+ * special and need to be used with great care. Unlike signals, which
* should be able to execute any code whatsoever.
*
* A weakref callback is not allowed to retain a reference to the
- * object. In fact, the object is no longer there at all when it is
- * called.
+ * object. Object data keys may be retrieved in a weak reference
+ * callback.
*
- * A weakref callback is called atmost once.
+ * A weakref callback is called at most once.
*
*****************************************/
@@ -463,8 +467,6 @@ struct _GtkWeakRef
gpointer data;
};
-static const gchar *weakrefs_key = "gtk-weakrefs";
-
void
gtk_object_weakref (GtkObject *object,
GtkDestroyNotify notify,
@@ -476,12 +478,14 @@ gtk_object_weakref (GtkObject *object,
g_return_if_fail (notify != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
+ if (!weakrefs_key_id)
+ weakrefs_key_id = gtk_object_data_force_id (weakrefs_key);
+
weak = g_new (GtkWeakRef, 1);
- weak->next = gtk_object_get_data (object, weakrefs_key);
+ weak->next = gtk_object_get_data_by_id (object, weakrefs_key_id);
weak->notify = notify;
weak->data = data;
- gtk_object_set_data_full (object, weakrefs_key, weak,
- gtk_object_notify_weaks);
+ gtk_object_set_data_by_id (object, weakrefs_key_id, weak);
}
void
@@ -494,15 +498,17 @@ gtk_object_weakunref (GtkObject *object,
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
- weaks = gtk_object_get_data (object, weakrefs_key);
+ if (!weakrefs_key_id)
+ return;
+
+ weaks = gtk_object_get_data_by_id (object, weakrefs_key_id);
for (wp = &weaks; *wp; wp = &(*wp)->next)
{
w = *wp;
if (w->notify == notify && w->data == data)
{
if (w == weaks)
- gtk_object_set_data_full (object, weakrefs_key, w->next,
- gtk_object_notify_weaks);
+ gtk_object_set_data_by_id (object, weakrefs_key_id, w->next);
else
*wp = w->next;
g_free (w);
@@ -512,18 +518,21 @@ gtk_object_weakunref (GtkObject *object,
}
static void
-gtk_object_notify_weaks (gpointer data)
+gtk_object_notify_weaks (GtkObject *object)
{
- GtkWeakRef *w1, *w2;
-
- w1 = (GtkWeakRef *)data;
-
- while (w1)
+ if (weakrefs_key_id)
{
- w1->notify (w1->data);
- w2 = w1->next;
- g_free (w1);
- w1 = w2;
+ GtkWeakRef *w1, *w2;
+
+ w1 = gtk_object_get_data_by_id (object, weakrefs_key_id);
+
+ while (w1)
+ {
+ w1->notify (w1->data);
+ w2 = w1->next;
+ g_free (w1);
+ w1 = w2;
+ }
}
}
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 40f656b38b..9fbf23ef19 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -349,20 +349,22 @@ gtk_paned_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkPaned *paned;
+ gboolean was_visible;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_PANED (container));
g_return_if_fail (widget != NULL);
paned = GTK_PANED (container);
-
+ was_visible = GTK_WIDGET_VISIBLE (widget);
+
if (paned->child1 == widget)
{
gtk_widget_unparent (widget);
paned->child1 = NULL;
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
else if (paned->child2 == widget)
@@ -371,7 +373,7 @@ gtk_paned_remove (GtkContainer *container,
paned->child2 = NULL;
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
}
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index 713cd22778..014a2dbf08 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -104,12 +104,16 @@ gtk_pixmap_set (GtkPixmap *pixmap,
{
gint width;
gint height;
+ gint oldwidth;
+ gint oldheight;
g_return_if_fail (pixmap != NULL);
g_return_if_fail (GTK_IS_PIXMAP (pixmap));
if (pixmap->pixmap != val)
{
+ oldwidth = GTK_WIDGET (pixmap)->requisition.width;
+ oldheight = GTK_WIDGET (pixmap)->requisition.height;
if (pixmap->pixmap)
gdk_pixmap_unref (pixmap->pixmap);
pixmap->pixmap = val;
@@ -128,7 +132,13 @@ gtk_pixmap_set (GtkPixmap *pixmap,
GTK_WIDGET (pixmap)->requisition.height = 0;
}
if (GTK_WIDGET_VISIBLE (pixmap))
- gtk_widget_queue_resize (GTK_WIDGET (pixmap));
+ {
+ if ((GTK_WIDGET (pixmap)->requisition.width != oldwidth) ||
+ (GTK_WIDGET (pixmap)->requisition.height != oldheight))
+ gtk_widget_queue_resize (GTK_WIDGET (pixmap));
+ else
+ gtk_widget_queue_draw (GTK_WIDGET (pixmap));
+ }
}
if (pixmap->mask != mask)
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index fc05cbe4d6..26bde5aade 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -26,6 +26,7 @@
enum {
TOKEN_INVALID = G_TOKEN_LAST,
+ TOKEN_INCLUDE,
TOKEN_ACTIVE,
TOKEN_BASE,
TOKEN_BG,
@@ -47,7 +48,8 @@ enum {
enum {
PARSE_OK,
PARSE_ERROR,
- PARSE_SYNTAX
+ PARSE_SYNTAX,
+ PARSE_DONE
};
enum {
@@ -175,30 +177,28 @@ static GScannerConfig gtk_rc_scanner_config =
static struct
{
- char *name;
- int token;
-} symbols[] =
- {
- { "ACTIVE", TOKEN_ACTIVE },
- { "base", TOKEN_BASE },
- { "bg", TOKEN_BG },
- { "bg_pixmap", TOKEN_BG_PIXMAP },
- { "fg", TOKEN_FG },
- { "font", TOKEN_FONT },
- { "fontset", TOKEN_FONTSET },
- { "INSENSITIVE", TOKEN_INSENSITIVE },
- { "NORMAL", TOKEN_NORMAL },
- { "pixmap_path", TOKEN_PIXMAP_PATH },
- { "PRELIGHT", TOKEN_PRELIGHT },
- { "SELECTED", TOKEN_SELECTED },
- { "style", TOKEN_STYLE },
- { "text", TOKEN_TEXT },
- { "widget", TOKEN_WIDGET },
- { "widget_class", TOKEN_WIDGET_CLASS },
- };
-static int nsymbols = sizeof (symbols) / sizeof (symbols[0]);
-
-static int done;
+ gchar *name;
+ gint token;
+} symbols[] = {
+ { "include", TOKEN_INCLUDE },
+ { "ACTIVE", TOKEN_ACTIVE },
+ { "base", TOKEN_BASE },
+ { "bg", TOKEN_BG },
+ { "bg_pixmap", TOKEN_BG_PIXMAP },
+ { "fg", TOKEN_FG },
+ { "font", TOKEN_FONT },
+ { "fontset", TOKEN_FONTSET },
+ { "INSENSITIVE", TOKEN_INSENSITIVE },
+ { "NORMAL", TOKEN_NORMAL },
+ { "pixmap_path", TOKEN_PIXMAP_PATH },
+ { "PRELIGHT", TOKEN_PRELIGHT },
+ { "SELECTED", TOKEN_SELECTED },
+ { "style", TOKEN_STYLE },
+ { "text", TOKEN_TEXT },
+ { "widget", TOKEN_WIDGET },
+ { "widget_class", TOKEN_WIDGET_CLASS },
+};
+static guint nsymbols = sizeof (symbols) / sizeof (symbols[0]);
static GHashTable *rc_style_ht = NULL;
static GSList *widget_sets = NULL;
@@ -341,6 +341,7 @@ gtk_rc_parse_any (const gchar *input_name,
{
GScanner *scanner;
guint i;
+ gboolean done;
scanner = g_scanner_new (&gtk_rc_scanner_config);
@@ -363,8 +364,15 @@ gtk_rc_parse_any (const gchar *input_name,
done = FALSE;
while (!done)
{
- if (gtk_rc_parse_statement (scanner) != PARSE_OK)
+ gint return_val;
+
+ return_val = gtk_rc_parse_statement (scanner);
+
+ switch (return_val)
{
+ case PARSE_OK:
+ break;
+ default:
if (scanner->next_token != G_TOKEN_NONE)
g_scanner_get_next_token (scanner);
@@ -375,8 +383,10 @@ gtk_rc_parse_any (const gchar *input_name,
g_warning ("rc file parse error: \"%s\" line %d",
input_name,
scanner->line);
-
+ /* fall through */
+ case PARSE_DONE:
done = TRUE;
+ break;
}
}
g_scanner_destroy (scanner);
@@ -569,8 +579,18 @@ gtk_rc_parse_statement (GScanner *scanner)
token = g_scanner_peek_next_token (scanner);
if (token == G_TOKEN_EOF)
+ return PARSE_DONE;
+
+ if (token == TOKEN_INCLUDE)
{
- done = TRUE;
+ g_scanner_get_next_token (scanner);
+ token = g_scanner_get_next_token (scanner);
+
+ if (token != G_TOKEN_STRING)
+ return PARSE_ERROR;
+
+ gtk_rc_parse (scanner->value.v_string);
+
return PARSE_OK;
}
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 3d15c2d4e3..979b166bd3 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -371,7 +371,8 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
GtkAllocation child_allocation;
guint previous_hvis;
guint previous_vvis;
-
+ gint count;
+
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (widget));
g_return_if_fail (allocation != NULL);
@@ -379,12 +380,12 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
scrolled_window = GTK_SCROLLED_WINDOW (widget);
widget->allocation = *allocation;
- gtk_scrolled_window_viewport_allocate (widget, &viewport_allocation);
-
gtk_container_disable_resize (GTK_CONTAINER (scrolled_window));
if (GTK_WIDGET_VISIBLE (scrolled_window->viewport))
{
+ count = 0;
+
do {
gtk_scrolled_window_viewport_allocate (widget, &viewport_allocation);
@@ -393,16 +394,32 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
child_allocation.width = viewport_allocation.width;
child_allocation.height = viewport_allocation.height;
- previous_hvis = GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar);
- previous_vvis = GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar);
+ previous_hvis = scrolled_window->hscrollbar_visible;
+ previous_vvis = scrolled_window->vscrollbar_visible;
gtk_widget_size_allocate (scrolled_window->viewport, &child_allocation);
- } while ((previous_hvis != GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar)) ||
- (previous_vvis != GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)));
+ /* If, after the first iteration, the hscrollbar and the
+ * vscrollbar flip visiblity, then we need both.
+ */
+ if ((count++) &&
+ (previous_hvis != scrolled_window->hscrollbar_visible) &&
+ (previous_vvis != scrolled_window->vscrollbar_visible))
+ {
+ scrolled_window->hscrollbar_visible = TRUE;
+ scrolled_window->vscrollbar_visible = TRUE;
+ break;
+ }
+
+ count++;
+ } while ((previous_hvis != scrolled_window->hscrollbar_visible) ||
+ (previous_vvis != scrolled_window->vscrollbar_visible));
}
- if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ if (scrolled_window->hscrollbar_visible)
{
+ if (!GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ gtk_widget_show (scrolled_window->hscrollbar);
+
child_allocation.x = viewport_allocation.x;
child_allocation.y = viewport_allocation.y + viewport_allocation.height + SCROLLBAR_SPACING (scrolled_window);
child_allocation.width = viewport_allocation.width;
@@ -412,9 +429,17 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (scrolled_window->hscrollbar, &child_allocation);
}
+ else
+ {
+ if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ gtk_widget_hide (scrolled_window->hscrollbar);
+ }
- if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ if (scrolled_window->vscrollbar_visible)
{
+ if (!GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ gtk_widget_show (scrolled_window->vscrollbar);
+
child_allocation.x = viewport_allocation.x + viewport_allocation.width + SCROLLBAR_SPACING (scrolled_window);
child_allocation.y = viewport_allocation.y;
child_allocation.width = scrolled_window->vscrollbar->requisition.width;
@@ -424,6 +449,11 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (scrolled_window->vscrollbar, &child_allocation);
}
+ else
+ {
+ if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ gtk_widget_hide (scrolled_window->vscrollbar);
+ }
gtk_container_enable_resize (GTK_CONTAINER (scrolled_window));
}
@@ -478,7 +508,11 @@ gtk_scrolled_window_foreach (GtkContainer *container,
scrolled_window = GTK_SCROLLED_WINDOW (container);
- (* callback) (scrolled_window->viewport, callback_data);
+ if (scrolled_window->viewport)
+ (* callback) (scrolled_window->viewport, callback_data);
+
+ (* callback) (scrolled_window->vscrollbar, callback_data);
+ (* callback) (scrolled_window->hscrollbar, callback_data);
}
static void
@@ -497,10 +531,10 @@ gtk_scrolled_window_viewport_allocate (GtkWidget *widget,
allocation->width = MAX (1, widget->allocation.width - allocation->x * 2);
allocation->height = MAX (1, widget->allocation.height - allocation->y * 2);
- if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ if (scrolled_window->vscrollbar_visible)
allocation->width = MAX (1,
allocation->width - (scrolled_window->vscrollbar->requisition.width + SCROLLBAR_SPACING (scrolled_window)));
- if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ if (scrolled_window->hscrollbar_visible)
allocation->height = MAX (1,
allocation->height - (scrolled_window->hscrollbar->requisition.height + SCROLLBAR_SPACING (scrolled_window)));
}
@@ -510,9 +544,6 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
gpointer data)
{
GtkScrolledWindow *scrolled_win;
- GtkWidget *scrollbar;
- gint hide_scrollbar;
- gint policy;
g_return_if_fail (adjustment != NULL);
g_return_if_fail (data != NULL);
@@ -521,36 +552,23 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->hscrollbar)))
{
- scrollbar = scrolled_win->hscrollbar;
- policy = scrolled_win->hscrollbar_policy;
+ if (scrolled_win->hscrollbar_policy == GTK_POLICY_AUTOMATIC)
+ {
+ scrolled_win->hscrollbar_visible =
+ ((adjustment->upper - adjustment->lower) > adjustment->page_size);
+ }
}
else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->vscrollbar)))
{
- scrollbar = scrolled_win->vscrollbar;
- policy = scrolled_win->vscrollbar_policy;
+ if (scrolled_win->vscrollbar_policy == GTK_POLICY_AUTOMATIC)
+ {
+ scrolled_win->vscrollbar_visible =
+ ((adjustment->upper - adjustment->lower) > adjustment->page_size);
+ }
}
else
{
g_warning ("could not determine which adjustment scrollbar received change signal for");
return;
}
-
- if (policy == GTK_POLICY_AUTOMATIC)
- {
- hide_scrollbar = FALSE;
-
- if ((adjustment->upper - adjustment->lower) <= adjustment->page_size)
- hide_scrollbar = TRUE;
-
- if (hide_scrollbar)
- {
- if (GTK_WIDGET_VISIBLE (scrollbar))
- gtk_widget_hide (scrollbar);
- }
- else
- {
- if (!GTK_WIDGET_VISIBLE (scrollbar))
- gtk_widget_show (scrollbar);
- }
- }
}
diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h
index 360b22bc6a..595163fc6a 100644
--- a/gtk/gtkscrolledwindow.h
+++ b/gtk/gtkscrolledwindow.h
@@ -49,6 +49,8 @@ struct _GtkScrolledWindow
guint8 hscrollbar_policy;
guint8 vscrollbar_policy;
+ gint hscrollbar_visible : 1;
+ gint vscrollbar_visible : 1;
};
struct _GtkScrolledWindowClass
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index ba6148cd8a..3f4dffa1a5 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -630,12 +630,17 @@ gtk_selection_clear (GtkWidget *widget,
tmp_list = tmp_list->next;
}
- if (tmp_list == NULL || selection_info->time > event->time)
- return FALSE;
-
- current_selections = g_list_remove_link (current_selections, tmp_list);
- g_list_free (tmp_list);
- g_free (selection_info);
+ if (selection_info->time > event->time)
+ return FALSE; /* return FALSE to indicate that
+ * the selection was out of date,
+ * and this clear should be ignored */
+ else
+ if (tmp_list)
+ {
+ current_selections = g_list_remove_link (current_selections, tmp_list);
+ g_list_free (tmp_list);
+ g_free (selection_info);
+ }
return TRUE;
}
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 971ec32fd0..ed009558d9 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -266,7 +266,7 @@ gtk_style_attach (GtkStyle *style,
g_return_val_if_fail (window != NULL, NULL);
colormap = gdk_window_get_colormap (window);
- gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
+ depth = gdk_window_get_visual (window)->depth;
new_style = gtk_style_find (style, colormap, depth);
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index e58466d2b2..9140a6af55 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -570,12 +570,14 @@ gtk_table_remove (GtkContainer *container,
if (child->widget == widget)
{
+ gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+
gtk_widget_unparent (widget);
table->children = g_list_remove (table->children, child);
g_free (child);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
break;
}
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 32352a3bd7..faed8e60ef 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -710,7 +710,20 @@ gtk_tree_remove_items (GtkTree *tree,
g_print("+ gtk_tree_remove_items [ tree %#x items list %#x ]\n", (int)tree, (int)items);
#endif /* TREE_DEBUG */
- root_tree = GTK_TREE(GTK_TREE_ROOT_TREE(tree));
+ /* We may not yet be mapped, so we actively have to find our
+ * root tree
+ */
+ if (tree->root_tree)
+ root_tree = tree->root_tree;
+ else
+ {
+ GtkWidget *tmp = GTK_WIDGET (tree);
+ while (tmp->parent && GTK_IS_TREE (tmp->parent))
+ tmp = tmp->parent;
+
+ root_tree = GTK_TREE (tmp);
+ }
+
tmp_list = items;
selected_widgets = NULL;
sorted_list = NULL;
@@ -779,9 +792,9 @@ gtk_tree_remove_items (GtkTree *tree,
#endif /* TREE_DEBUG */
}
- /* remove this item of his real parent */
+ /* remove this item from its real parent */
#ifdef TREE_DEBUG
- g_print("* remove widget of his owner tree\n");
+ g_print("* remove widget from its owner tree\n");
#endif /* TREE_DEBUG */
real_tree->children = g_list_remove (real_tree->children, widget);
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 6934a6a74e..3b2cb072b3 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -304,9 +304,6 @@ gtk_tree_item_set_subtree (GtkTreeItem *tree_item,
tree_item->subtree = subtree;
GTK_TREE(subtree)->tree_owner = GTK_WIDGET(tree_item);
- /* set root tree for selection list */
- GTK_TREE(subtree)->root_tree = GTK_TREE(GTK_WIDGET(tree_item)->parent)->root_tree;
-
/* show subtree button */
if (tree_item->pixmaps_box)
gtk_widget_show(tree_item->pixmaps_box);
@@ -994,25 +991,35 @@ gtk_tree_item_remove_subtree (GtkTreeItem* item)
g_return_if_fail (item->subtree != NULL);
if (GTK_TREE (item->subtree)->children)
- gtk_tree_remove_items (GTK_TREE (item->subtree),
- GTK_TREE (item->subtree)->children);
-
+ {
+ /* The following call will remove the children and call
+ * gtk_tree_item_remove_subtree() again. So we are done.
+ */
+ gtk_tree_remove_items (GTK_TREE (item->subtree),
+ GTK_TREE (item->subtree)->children);
+ return;
+ }
+
if (GTK_WIDGET_MAPPED (item->subtree))
gtk_widget_unmap (item->subtree);
-
+
gtk_widget_unparent (item->subtree);
if (item->pixmaps_box)
gtk_widget_hide (item->pixmaps_box);
item->subtree = NULL;
- item->expanded = FALSE;
- if (item->pixmaps_box)
+
+ if (item->expanded)
{
- gtk_container_remove (GTK_CONTAINER (item->pixmaps_box),
- item->minus_pix_widget);
- gtk_container_add (GTK_CONTAINER (item->pixmaps_box),
- item->plus_pix_widget);
+ item->expanded = FALSE;
+ if (item->pixmaps_box)
+ {
+ gtk_container_remove (GTK_CONTAINER (item->pixmaps_box),
+ item->minus_pix_widget);
+ gtk_container_add (GTK_CONTAINER (item->pixmaps_box),
+ item->plus_pix_widget);
+ }
}
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 0548f90a6a..faf2a41a91 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -256,10 +256,10 @@ static const gchar *visual_key = "gtk-visual";
* results:
*****************************************/
-guint
+GtkType
gtk_widget_get_type ()
{
- static guint widget_type = 0;
+ static GtkType widget_type = 0;
if (!widget_type)
{
@@ -2244,27 +2244,31 @@ gtk_widget_basic (GtkWidget *widget)
void
gtk_widget_grab_focus (GtkWidget *widget)
{
- GtkWidget *window;
- GtkWidget *child;
- GtkType window_type;
-
g_return_if_fail (widget != NULL);
-
- window_type = gtk_window_get_type ();
- window = widget->parent;
- child = widget;
-
- while (window && !gtk_type_is_a (GTK_WIDGET_TYPE (window), window_type))
- {
- GTK_CONTAINER (window)->focus_child = child;
- child = window;
- window = window->parent;
- }
-
- if (window && gtk_type_is_a (GTK_WIDGET_TYPE (window), window_type))
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ if (GTK_WIDGET_CAN_FOCUS (widget))
{
- GTK_CONTAINER (window)->focus_child = child;
- gtk_window_set_focus (GTK_WINDOW (window), widget);
+ GtkWidget *window;
+ GtkWidget *child;
+ GtkType window_type;
+
+ window_type = gtk_window_get_type ();
+ window = widget->parent;
+ child = widget;
+
+ while (window && !gtk_type_is_a (GTK_WIDGET_TYPE (window), window_type))
+ {
+ GTK_CONTAINER (window)->focus_child = child;
+ child = window;
+ window = window->parent;
+ }
+
+ if (window && gtk_type_is_a (GTK_WIDGET_TYPE (window), window_type))
+ {
+ GTK_CONTAINER (window)->focus_child = child;
+ gtk_window_set_focus (GTK_WINDOW (window), widget);
+ }
}
}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 2267e7d377..0ec99d5193 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -355,7 +355,7 @@ struct _GtkWidgetShapeInfo
};
-guint gtk_widget_get_type (void);
+GtkType gtk_widget_get_type (void);
GtkWidget* gtk_widget_new (guint type,
...);
GtkWidget* gtk_widget_newv (guint type,
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index fc4ea56178..677ca8d11a 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -51,6 +51,7 @@ typedef struct sTreeButtons {
guint nb_item_add;
GtkWidget* add_button;
GtkWidget* remove_button;
+ GtkWidget* subtree_button;
} sTreeButtons;
/* end of tree section */
@@ -1066,6 +1067,22 @@ cb_remove_item(GtkWidget*w, GtkTree* tree)
}
static void
+cb_remove_subtree(GtkWidget*w, GtkTree* tree)
+{
+ GList* selected_list;
+ GtkTreeItem *item;
+
+ selected_list = GTK_TREE_SELECTION(tree);
+
+ if (selected_list)
+ {
+ item = GTK_TREE_ITEM (selected_list->data);
+ if (item->subtree)
+ gtk_tree_item_remove_subtree (item);
+ }
+}
+
+static void
cb_tree_changed(GtkTree* tree)
{
sTreeButtons* tree_buttons;
@@ -1084,11 +1101,13 @@ cb_tree_changed(GtkTree* tree)
else
gtk_widget_set_sensitive(tree_buttons->add_button, FALSE);
gtk_widget_set_sensitive(tree_buttons->remove_button, FALSE);
+ gtk_widget_set_sensitive(tree_buttons->subtree_button, FALSE);
}
else
{
gtk_widget_set_sensitive(tree_buttons->remove_button, TRUE);
gtk_widget_set_sensitive(tree_buttons->add_button, (nb_selected == 1));
+ gtk_widget_set_sensitive(tree_buttons->subtree_button, (nb_selected == 1));
}
}
@@ -1228,6 +1247,15 @@ create_tree_sample(guint selection_mode,
gtk_widget_show(button);
tree_buttons->remove_button = button;
+ button = gtk_button_new_with_label("Remove Subtree");
+ gtk_widget_set_sensitive(button, FALSE);
+ gtk_signal_connect(GTK_OBJECT (button), "clicked",
+ (GtkSignalFunc) cb_remove_subtree,
+ (gpointer)root_tree);
+ gtk_box_pack_start(GTK_BOX(box2), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+ tree_buttons->subtree_button = button;
+
/* create separator */
separator = gtk_hseparator_new();
gtk_box_pack_start(GTK_BOX(box1), separator, FALSE, FALSE, 0);
@@ -2080,6 +2108,31 @@ create_menus ()
* GtkScrolledWindow
*/
static void
+scrolled_windows_remove (GtkWidget *widget, GtkWidget *scrollwin)
+{
+ static GtkWidget *parent = NULL;
+ static GtkWidget *float_parent;
+
+ if (parent)
+ {
+ gtk_widget_reparent (scrollwin, parent);
+ gtk_widget_destroy (float_parent);
+ float_parent = NULL;
+ parent = NULL;
+ }
+ else
+ {
+ parent = widget->parent;
+ float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_reparent (scrollwin, float_parent);
+ gtk_widget_show (float_parent);
+ }
+}
+
+/*
+ * GtkScrolledWindow
+ */
+static void
create_scrolled_windows ()
{
static GtkWidget *window;
@@ -2114,6 +2167,10 @@ create_scrolled_windows ()
gtk_table_set_row_spacings (GTK_TABLE (table), 10);
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
gtk_container_add (GTK_CONTAINER (scrolled_window), table);
+ gtk_container_set_focus_hadjustment (GTK_CONTAINER (table),
+ gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (table),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
gtk_widget_show (table);
for (i = 0; i < 20; i++)
@@ -2136,6 +2193,17 @@ create_scrolled_windows ()
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
+
+ button = gtk_button_new_with_label ("remove");
+ gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC(scrolled_windows_remove),
+ GTK_OBJECT (scrolled_window));
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
+ button, TRUE, TRUE, 0);
+ gtk_widget_grab_default (button);
+ gtk_widget_show (button);
+
}
if (!GTK_WIDGET_VISIBLE (window))
@@ -2772,6 +2840,8 @@ create_list ()
gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_MULTIPLE);
gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE);
gtk_container_add (GTK_CONTAINER (scrolled_win), list);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (list),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
for (i = 0; i < nlist_items; i++)
@@ -3909,6 +3979,28 @@ static char * book_closed_xpm[] = {
" "};
static void
+notebook_reparent (GtkWidget *widget, GtkWidget *scrollwin)
+{
+ static GtkWidget *parent = NULL;
+ static GtkWidget *float_parent;
+
+ if (parent)
+ {
+ gtk_widget_reparent (scrollwin, parent);
+ gtk_widget_destroy (float_parent);
+ float_parent = NULL;
+ parent = NULL;
+ }
+ else
+ {
+ parent = widget->parent;
+ float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_show (float_parent);
+ gtk_widget_reparent (scrollwin, float_parent);
+ }
+}
+
+static void
page_switch (GtkWidget *widget, GtkNotebookPage *page, gint page_num)
{
GtkNotebookPage *oldpage;
@@ -4187,6 +4279,13 @@ create_notebook ()
GTK_SIGNAL_FUNC (rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+
+ button = gtk_button_new_with_label ("reparent");
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC (notebook_reparent),
+ notebook);
+ gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+
}
if (!GTK_WIDGET_VISIBLE (window))
@@ -5718,6 +5817,7 @@ create_main_window ()
int i;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE);
gtk_widget_set_name (window, "main window");
gtk_widget_set_usize (window, 200, 400);
gtk_widget_set_uposition (window, 20, 20);
@@ -5754,12 +5854,15 @@ create_main_window ()
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
+ GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (scrolled_window)->vscrollbar, GTK_CAN_FOCUS);
gtk_box_pack_start (GTK_BOX (box1), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
box2 = gtk_vbox_new (FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_container_add (GTK_CONTAINER (scrolled_window), box2);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (box2),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
gtk_widget_show (box2);
for (i = 0; i < nbuttons; i++)
diff --git a/gtk/testgtkrc b/gtk/testgtkrc
index a1b376a173..1b9ff79a60 100644
--- a/gtk/testgtkrc
+++ b/gtk/testgtkrc
@@ -1,5 +1,7 @@
# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
#
+# include "rc-file"
+#
# style <name> [= <name>]
# {
# <option>
@@ -8,6 +10,9 @@
# widget <widget_set> style <style_name>
# widget_class <widget_class_set> style <style_name>
+# testgtkrc2 introduces the green color in the button list
+include "testgtkrc2"
+
pixmap_path "."
style "default"
@@ -33,10 +38,11 @@ style "button"
# bg[PRELIGHT] = { 0, 0, 0.75 }
}
-style 'main_button' = 'button'
+# we set want buttons in the main window to be blue by default
+style 'main_buttons' = 'button'
{
font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
- bg[PRELIGHT] = { 0, 0.75, 0x00 }
+ bg[PRELIGHT] = { 0, 0, 0.75 }
}
style "toggle_button" = "button"
@@ -54,6 +60,14 @@ style "text"
base[NORMAL] = { 0.0, 0.0, 0.0 }
}
+style "slider"
+{
+ fg[NORMAL] = { 1.0, 1.0, 1.0 }
+ bg[NORMAL] = { 0.0, 0.0, 1.0 }
+ bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
+ bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
+}
+
style "ruler"
{
font = '-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*'
@@ -74,5 +88,5 @@ widget_class "*GtkButton*" style "button"
widget_class "*Ruler" style "ruler"
widget_class "*GtkText" style "text"
widget_class "*" style "default"
-widget "main window.*GtkButton*" style "main_button"
+widget "main window.*GtkButton*" style "main_buttons"
widget "*GtkCurve" style "curve"
diff --git a/gtk/testgtkrc2 b/gtk/testgtkrc2
new file mode 100644
index 0000000000..f2c45de985
--- /dev/null
+++ b/gtk/testgtkrc2
@@ -0,0 +1,21 @@
+# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
+#
+# include "rc-file"
+#
+# style <name> [= <name>]
+# {
+# <option>
+# }
+#
+# widget <widget_set> style <style_name>
+# widget_class <widget_class_set> style <style_name>
+
+# this file gets included from testgtkrc
+
+style 'button_list' = 'button'
+{
+ font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
+ bg[PRELIGHT] = { 0, 0.75, 0x00 }
+}
+
+widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
diff --git a/ltconfig b/ltconfig
index 7ebb9be8c0..878a7c8122 100755
--- a/ltconfig
+++ b/ltconfig
@@ -32,23 +32,43 @@ if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
- # The Solaris and AIX default echo program unquotes backslashes.
- # This makes it impossible to quote backslashes using
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
- # So, we emulate echo with printf '%s\n'
- echo="printf %s\\n"
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
- else
- # Oops. We have no working printf. Try to find a not-so-buggy echo.
- echo=echo
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH /usr/ucb; do
- if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
- echo="$dir/echo"
- break
+ #
+ # So, first we look for a working echo in the user's PATH.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+#
+# The following is from libtool-1.2a, won't work with this patched
+# libtool-1.2
+#
+# elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
+# # If we have ksh, try running ltconfig again with it.
+# CONFIG_SHELL=/bin/ksh
+# export CONFIG_SHELL
+# exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
fi
- done
- IFS="$save_ifs"
+ fi
fi
fi
@@ -66,7 +86,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.1
+VERSION=1.2
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f"
@@ -421,7 +441,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC.
with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
- echo "$progname:424: checking whether we are using GNU C" >&5
+ echo "$progname:444: checking whether we are using GNU C" >&5
$rm conftest.c
cat > conftest.c <<EOF
@@ -429,7 +449,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@@ -544,14 +564,15 @@ if test -n "$pic_flag"; then
echo > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
- echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
- if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
- # Append any errors to the config.log.
+ echo "$progname:567: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+ # Append any warnings to the config.log.
cat conftest.err 1>&5
- # On HP-UX, the stripped-down bundled CC does not accept +Z, but also
- # reports no error. So, we need to grep stderr for (Bundled).
- if grep '(Bundled)' conftest.err >/dev/null; then
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
echo "$ac_t"no 1>&6
can_build_shared=no
pic_flag=
@@ -587,8 +608,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:590: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+echo "$progname:611: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6
else
echo "$ac_t"none 1>&6
@@ -620,7 +641,7 @@ if test -z "$LD"; then
if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
- echo "$progname:623: checking for ld used by GCC" >&5
+ echo "$progname:644: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -638,10 +659,10 @@ if test -z "$LD"; then
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
- echo "$progname:641: checking for GNU ld" >&5
+ echo "$progname:662: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
- echo "$progname:644: checking for non-GNU ld" >&5
+ echo "$progname:665: checking for non-GNU ld" >&5
fi
if test -z "$LD"; then
@@ -967,11 +988,11 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
-echo "$progname:970: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
+echo "$progname:991: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { echo "$progname:974: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+ if { echo "$progname:995: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -1029,7 +1050,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS='conftestm.o'
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:1053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
diff --git a/ltmain.sh b/ltmain.sh
index 9b8e94784b..e9350b3fab 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -30,7 +30,7 @@ modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.1
+VERSION=1.2
default_mode=
help="Try \`$progname --help' for more information."
@@ -481,7 +481,7 @@ if test -z "$show_help"; then
if test "$export_dynamic" != yes; then
export_dynamic=yes
if test -n "$export_dynamic_flag_spec"; then
- arg=`eval \\$echo "$export_dynamic_flag_spec"`
+ eval arg=\"$export_dynamic_flag_spec\"
else
arg=
fi
@@ -682,7 +682,7 @@ if test -z "$show_help"; then
fi
if test -n "$libdir"; then
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
finalize_command="$finalize_command $flag"
@@ -843,7 +843,7 @@ if test -z "$show_help"; then
esac
name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- libname=`eval \\$echo \"$libname_spec\"`
+ eval libname=\"$libname_spec\"
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -1006,13 +1006,13 @@ if test -z "$show_help"; then
if test "$build_libtool_libs" = yes; then
# Get the real and link names of the library.
- library_names=`eval \\$echo \"$library_names_spec\"`
+ eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
shift; shift
if test -n "$soname_spec"; then
- soname=`eval \\$echo \"$soname_spec\"`
+ eval soname=\"$soname_spec\"
else
soname="$realname"
fi
@@ -1027,7 +1027,7 @@ if test -z "$show_help"; then
test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
# Do each of the archive commands.
- cmds=`eval \\$echo \"$archive_cmds\"`
+ eval cmds=\"$archive_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1104,7 +1104,7 @@ if test -z "$show_help"; then
reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
output="$obj"
- cmds=`eval \\$echo \"$reload_cmds\"`
+ eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1128,7 +1128,7 @@ if test -z "$show_help"; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs"
output="$libobj"
- cmds=`eval \\$echo \"$reload_cmds\"`
+ eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1177,7 +1177,7 @@ if test -z "$show_help"; then
fi
if test -n "$libdir"; then
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
finalize_command="$finalize_command $flag"
@@ -1254,8 +1254,8 @@ if test -z "$show_help"; then
case "$dlsyms" in
"") ;;
*.c)
- $echo > "$objdir/$dlsyms" \
-"/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
+ $echo > "$objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
#ifdef __cplusplus
@@ -1266,17 +1266,17 @@ extern \"C\" {
#define dld_preloaded_symbol_count some_other_symbol
#define dld_preloaded_symbols some_other_symbol
-/* External symbol declarations for the compiler. */"
+/* External symbol declarations for the compiler. */\
+"
if test -f "$nlist"; then
sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
else
echo '/* NONE */' >> "$objdir/$dlsyms"
-EOF
fi
- $echo >> "$objdir/$dlsyms" \
-"
+ $echo >> "$objdir/$dlsyms" "\
+
#undef dld_preloaded_symbol_count
#undef dld_preloaded_symbols
@@ -1295,19 +1295,21 @@ struct {
__ptr_t address;
}
dld_preloaded_symbols[] =
-{"
+{\
+"
if test -f "$nlist"; then
sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
fi
- $echo >> "$objdir/$dlsyms" \
-" {0, (__ptr_t) 0}
+ $echo >> "$objdir/$dlsyms" "\
+ {0, (__ptr_t) 0}
};
#ifdef __cplusplus
}
-#endif"
+#endif\
+"
;;
*)
@@ -1427,8 +1429,8 @@ dld_preloaded_symbols[] =
$rm $output
trap "$rm $output; exit 1" 1 2 15
- $echo > $output \
-"#! /bin/sh
+ $echo > $output "\
+#! /bin/sh
# $output - temporary wrapper script for $objdir/$output
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
@@ -1459,10 +1461,9 @@ else
else
echo=\"$qecho\"
file=\"\$0\"
- fi
-"
- $echo >> $output \
+ fi\
"
+ $echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
@@ -1496,8 +1497,8 @@ else
# Export our shlibpath_var if we have one.
if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output \
-" # Add our own library path to $shlibpath_var
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
@@ -1507,24 +1508,17 @@ else
"
fi
- echo >> $output \
-" if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
- args=
- for arg
- do
- # Quote arguments (to preserve shell metacharacters).
- arg=\`\$echo \"X\$arg\" | \$Xsed -e \"\$sed_quote_subst\"\`
- args=\"\$args \\\"\$arg\\\"\"
- done
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
- eval \"exec \$program \$args\"
+ exec \$program \${1+\"\$@\"}
- \$echo \"\$0: cannot exec \$program \$args\"
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1
fi
else
@@ -1534,7 +1528,8 @@ else
echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
fi
-fi"
+fi\
+"
chmod +x $output
fi
exit 0
@@ -1548,9 +1543,9 @@ fi"
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=`eval \\$echo \"$old_archive_from_new_cmds\"`
+ eval cmds=\"$old_archive_from_new_cmds\"
else
- cmds=`eval \\$echo \"$old_archive_cmds\"`
+ eval cmds=\"$old_archive_cmds\"
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
@@ -1571,8 +1566,8 @@ fi"
# Only create the output if not a dry run.
if test -z "$run"; then
- echo > $output \
-"# $output - a libtool library file
+ $echo > $output "\
+# $output - a libtool library file
# Generated by ltmain.sh - GNU $PACKAGE $VERSION
# The name that we can dlopen(3).
@@ -1593,7 +1588,8 @@ age=$age
revision=$revision
# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
+libdir='$install_libdir'\
+"
fi
# Do a symbolic link so that the libtool archive can be found in
@@ -1835,7 +1831,7 @@ libdir='$install_libdir'"
# Do each command in the postinstall commands.
lib="$destdir/$realname"
- cmds=`eval \\$echo \"$postinstall_cmds\"`
+ eval cmds=\"$postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -1972,7 +1968,7 @@ libdir='$install_libdir'"
$run eval "$install_prog \$file \$oldlib" || exit $?
# Do each command in the postinstall commands.
- cmds=`eval \\$echo \"$old_postinstall_cmds\"`
+ eval cmds=\"$old_postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2010,7 +2006,7 @@ libdir='$install_libdir'"
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
- cmds=`eval \\$echo \"$finish_cmds\"`
+ eval cmds=\"$finish_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2021,7 +2017,7 @@ libdir='$install_libdir'"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
- cmds=`eval \\$echo \"$finish_eval\"`
+ eval cmds=\"$finish_eval\"
$run eval "$cmds"
fi
done
@@ -2047,7 +2043,7 @@ libdir='$install_libdir'"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
- flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"`
+ eval flag=\"$hardcode_libdir_flag_spec\"
echo " - use the \`$flag' linker flag"
fi
@@ -2238,7 +2234,7 @@ libdir='$install_libdir'"
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- cmds=`eval \\$echo \"$postuninstall_cmds\"`
+ eval cmds=\"$postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
@@ -2250,7 +2246,7 @@ libdir='$install_libdir'"
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- cmds=`eval \\$echo \"$old_postuninstall_cmds\"`
+ eval cmds=\"$old_postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
diff --git a/tests/testgtk.c b/tests/testgtk.c
index fc4ea56178..677ca8d11a 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -51,6 +51,7 @@ typedef struct sTreeButtons {
guint nb_item_add;
GtkWidget* add_button;
GtkWidget* remove_button;
+ GtkWidget* subtree_button;
} sTreeButtons;
/* end of tree section */
@@ -1066,6 +1067,22 @@ cb_remove_item(GtkWidget*w, GtkTree* tree)
}
static void
+cb_remove_subtree(GtkWidget*w, GtkTree* tree)
+{
+ GList* selected_list;
+ GtkTreeItem *item;
+
+ selected_list = GTK_TREE_SELECTION(tree);
+
+ if (selected_list)
+ {
+ item = GTK_TREE_ITEM (selected_list->data);
+ if (item->subtree)
+ gtk_tree_item_remove_subtree (item);
+ }
+}
+
+static void
cb_tree_changed(GtkTree* tree)
{
sTreeButtons* tree_buttons;
@@ -1084,11 +1101,13 @@ cb_tree_changed(GtkTree* tree)
else
gtk_widget_set_sensitive(tree_buttons->add_button, FALSE);
gtk_widget_set_sensitive(tree_buttons->remove_button, FALSE);
+ gtk_widget_set_sensitive(tree_buttons->subtree_button, FALSE);
}
else
{
gtk_widget_set_sensitive(tree_buttons->remove_button, TRUE);
gtk_widget_set_sensitive(tree_buttons->add_button, (nb_selected == 1));
+ gtk_widget_set_sensitive(tree_buttons->subtree_button, (nb_selected == 1));
}
}
@@ -1228,6 +1247,15 @@ create_tree_sample(guint selection_mode,
gtk_widget_show(button);
tree_buttons->remove_button = button;
+ button = gtk_button_new_with_label("Remove Subtree");
+ gtk_widget_set_sensitive(button, FALSE);
+ gtk_signal_connect(GTK_OBJECT (button), "clicked",
+ (GtkSignalFunc) cb_remove_subtree,
+ (gpointer)root_tree);
+ gtk_box_pack_start(GTK_BOX(box2), button, TRUE, TRUE, 0);
+ gtk_widget_show(button);
+ tree_buttons->subtree_button = button;
+
/* create separator */
separator = gtk_hseparator_new();
gtk_box_pack_start(GTK_BOX(box1), separator, FALSE, FALSE, 0);
@@ -2080,6 +2108,31 @@ create_menus ()
* GtkScrolledWindow
*/
static void
+scrolled_windows_remove (GtkWidget *widget, GtkWidget *scrollwin)
+{
+ static GtkWidget *parent = NULL;
+ static GtkWidget *float_parent;
+
+ if (parent)
+ {
+ gtk_widget_reparent (scrollwin, parent);
+ gtk_widget_destroy (float_parent);
+ float_parent = NULL;
+ parent = NULL;
+ }
+ else
+ {
+ parent = widget->parent;
+ float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_reparent (scrollwin, float_parent);
+ gtk_widget_show (float_parent);
+ }
+}
+
+/*
+ * GtkScrolledWindow
+ */
+static void
create_scrolled_windows ()
{
static GtkWidget *window;
@@ -2114,6 +2167,10 @@ create_scrolled_windows ()
gtk_table_set_row_spacings (GTK_TABLE (table), 10);
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
gtk_container_add (GTK_CONTAINER (scrolled_window), table);
+ gtk_container_set_focus_hadjustment (GTK_CONTAINER (table),
+ gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (table),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
gtk_widget_show (table);
for (i = 0; i < 20; i++)
@@ -2136,6 +2193,17 @@ create_scrolled_windows ()
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
+
+ button = gtk_button_new_with_label ("remove");
+ gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC(scrolled_windows_remove),
+ GTK_OBJECT (scrolled_window));
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
+ button, TRUE, TRUE, 0);
+ gtk_widget_grab_default (button);
+ gtk_widget_show (button);
+
}
if (!GTK_WIDGET_VISIBLE (window))
@@ -2772,6 +2840,8 @@ create_list ()
gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_MULTIPLE);
gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE);
gtk_container_add (GTK_CONTAINER (scrolled_win), list);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (list),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
for (i = 0; i < nlist_items; i++)
@@ -3909,6 +3979,28 @@ static char * book_closed_xpm[] = {
" "};
static void
+notebook_reparent (GtkWidget *widget, GtkWidget *scrollwin)
+{
+ static GtkWidget *parent = NULL;
+ static GtkWidget *float_parent;
+
+ if (parent)
+ {
+ gtk_widget_reparent (scrollwin, parent);
+ gtk_widget_destroy (float_parent);
+ float_parent = NULL;
+ parent = NULL;
+ }
+ else
+ {
+ parent = widget->parent;
+ float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_show (float_parent);
+ gtk_widget_reparent (scrollwin, float_parent);
+ }
+}
+
+static void
page_switch (GtkWidget *widget, GtkNotebookPage *page, gint page_num)
{
GtkNotebookPage *oldpage;
@@ -4187,6 +4279,13 @@ create_notebook ()
GTK_SIGNAL_FUNC (rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+
+ button = gtk_button_new_with_label ("reparent");
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ GTK_SIGNAL_FUNC (notebook_reparent),
+ notebook);
+ gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+
}
if (!GTK_WIDGET_VISIBLE (window))
@@ -5718,6 +5817,7 @@ create_main_window ()
int i;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE);
gtk_widget_set_name (window, "main window");
gtk_widget_set_usize (window, 200, 400);
gtk_widget_set_uposition (window, 20, 20);
@@ -5754,12 +5854,15 @@ create_main_window ()
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
+ GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (scrolled_window)->vscrollbar, GTK_CAN_FOCUS);
gtk_box_pack_start (GTK_BOX (box1), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
box2 = gtk_vbox_new (FALSE, 0);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_container_add (GTK_CONTAINER (scrolled_window), box2);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (box2),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
gtk_widget_show (box2);
for (i = 0; i < nbuttons; i++)
diff --git a/tests/testgtkrc b/tests/testgtkrc
index a1b376a173..1b9ff79a60 100644
--- a/tests/testgtkrc
+++ b/tests/testgtkrc
@@ -1,5 +1,7 @@
# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
#
+# include "rc-file"
+#
# style <name> [= <name>]
# {
# <option>
@@ -8,6 +10,9 @@
# widget <widget_set> style <style_name>
# widget_class <widget_class_set> style <style_name>
+# testgtkrc2 introduces the green color in the button list
+include "testgtkrc2"
+
pixmap_path "."
style "default"
@@ -33,10 +38,11 @@ style "button"
# bg[PRELIGHT] = { 0, 0, 0.75 }
}
-style 'main_button' = 'button'
+# we set want buttons in the main window to be blue by default
+style 'main_buttons' = 'button'
{
font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
- bg[PRELIGHT] = { 0, 0.75, 0x00 }
+ bg[PRELIGHT] = { 0, 0, 0.75 }
}
style "toggle_button" = "button"
@@ -54,6 +60,14 @@ style "text"
base[NORMAL] = { 0.0, 0.0, 0.0 }
}
+style "slider"
+{
+ fg[NORMAL] = { 1.0, 1.0, 1.0 }
+ bg[NORMAL] = { 0.0, 0.0, 1.0 }
+ bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
+ bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
+}
+
style "ruler"
{
font = '-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*'
@@ -74,5 +88,5 @@ widget_class "*GtkButton*" style "button"
widget_class "*Ruler" style "ruler"
widget_class "*GtkText" style "text"
widget_class "*" style "default"
-widget "main window.*GtkButton*" style "main_button"
+widget "main window.*GtkButton*" style "main_buttons"
widget "*GtkCurve" style "curve"
diff --git a/tests/testgtkrc2 b/tests/testgtkrc2
new file mode 100644
index 0000000000..f2c45de985
--- /dev/null
+++ b/tests/testgtkrc2
@@ -0,0 +1,21 @@
+# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
+#
+# include "rc-file"
+#
+# style <name> [= <name>]
+# {
+# <option>
+# }
+#
+# widget <widget_set> style <style_name>
+# widget_class <widget_class_set> style <style_name>
+
+# this file gets included from testgtkrc
+
+style 'button_list' = 'button'
+{
+ font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
+ bg[PRELIGHT] = { 0, 0.75, 0x00 }
+}
+
+widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"