diff options
98 files changed, 3771 insertions, 1748 deletions
@@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index abe8568fd..b46605120 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,389 @@ +Mon Mar 13 18:37:55 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c: Fix a bunch of cases where XGetWindowProperty() + is called without trapping X errors. + +Fri Feb 25 10:48:53 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkrc.*: Fix problem where stray '"' characters found their + way into the fontset lists. + +Tue Feb 22 08:52:52 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkthemes.h: add extern "C" scope. + +Mon Feb 21 20:16:42 2000 Lars Hamann <lars@gtk.org> + + * gtk/gtkclist.c: applied patch from Guy Harris <guy@netapp.com> + to make appends to the list constant. (gtk-guy-990901-0.patch) + +Mon Feb 14 22:50:10 2000 Tim Janik <timj@gtk.org> + + * gtk/gtktypeutils.c (gtk_type_init): use g_str_hash() and g_str_equal() + for the typename hash table. + +Mon Feb 14 15:01:23 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkpaned.c (gtk_paned_compute_position): Add some sanity checks + to make sure we never divide by zero. + (Problem pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>) + +Mon Feb 14 12:29:38 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Apply patch from + SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> to make font selector work a little + better with 2-byte fonts. (Load a fontset instead of a font for two byte fonts.) + + Also, some cleanups in atom handling. + +Sun Feb 13 08:02:21 2000 Tim Janik <timj@gtk.org> + + * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer, + not GtkWidget. + +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + +Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against + guint wrap arounds in allocation.width. + + * gtk/gtktable.c (gtk_table_size_allocate_pass1): repeat shrinking + process untill we fit the allocation given. + +Tue Feb 8 09:38:29 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkwidget.c: + (gtk_widget_unrealize): guard widget access with ref/unref + around signal emission. + (gtk_widget_hide): same here, but also check its destroyed + state before queueing a resize. + +Tue Feb 8 03:05:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkstyle.c (gtk_style_new): use gtk_default_prelight_bg instead + of gtk_default_insensitive_bg as insensitive base color. + + * gtk/gtktext.c (gtk_text_style_set): set the background color according + to the widget's state. + (gtk_text_realize): same here. + (gtk_text_state_changed): same here. + (draw_bg_rect): compare background color against base[] from + GTK_WIDGET_STATE (text) not GTK_STATE_NORMAL. + +Mon Feb 7 04:01:55 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkmain.c (gtk_main_do_event): ignore delete events when + grabs are active, unless a delete event is send to the toplevel + of the currently grab holding widget. + +Sun Feb 6 10:13:15 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (gtk_ctree_drag_data_received): Remove + debugging g_print's. + +Fri Feb 4 15:54:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_request): Don't + ever make the scrolled-window requisition ever depend on the + visibility state of the scrollbars for the AUTOMATIC policy. + This breaks the GTK+ requisition model, and causes loops. + +Fri Feb 4 15:09:12 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Set the charset explicitely for + the default font to avoid problems with XFree86-4.0 where the + default charset is iso10646-1, not iso8859-1. + +Thu Feb 3 14:58:48 PST 2000 Manish Singh <yosh@gimp.org> + + * acinclude.m4 + * config.guess + * config.sub + * ltconfig + * ltmain.sh: upgrade to libtool 1.3.4 (bugfix only release) + + * gtk/Makefile.am: minor cosmetic consistency tweak + +Thu Feb 3 14:46:01 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkmenushell.c (gtk_menu_shell_button_release): Set + the activate_time to 0, so that we handle a quick + press/release press/release properly and don't suppress + the second release. (Red Hat bug #7545) + +Wed Feb 2 22:25:17 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkctree.c (row_delete): + (gtk_ctree_node_set_row_data_full): fixed very evil reentrancy + bugs with destruction notifier, *always* update internal + structures *before* calling user code. + +Sun Jan 30 20:10:52 2000 Lars Hamann <lars@gtk.org> + + A few more fixes for bug #5487, #2051, #2677. + * gtk/gtkclist.c : + (gtk_clist_button_press): Reset clist->anchor to -1 if event->type is + not GDK_BUTTON_PRESS. + (resync_selection): resync only if selection_mode is + GTK_SELECTION_EXTENDED + * gtk/gtkctree.c (resync_selection): same here + +Sun Jan 30 12:29:20 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.h gtk/gtkmenu.h: Removed duplicate prototypes for + gdk_drag_get_selection() and gtk_menu_detach(). + + [ From Jeroen Ruigrok/Asmodai ] + +Sat Jan 29 10:11:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_size_request): + page->tab_label can be NULL. + +2000-01-25 Havoc Pennington <hp@pobox.com> + + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative + arg is boolean + + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean + + * gdk/gdkrectangle.c (gdk_rectangle_intersect): return boolean + + * gdk/gdkproperty.c (gdk_property_get): return boolean + + * gdk/gdkinput.c (gdk_input_set_mode): return boolean + + * gdk/gdkim.c (gdk_im_ready): return boolean + + * gdk/gdkgc.c (gdk_gc_set_exposures): gboolean arg + + * gdk/gdkfont.c (gdk_font_equal): return gboolean (mild + glib clash, should fix glib) + + * gdk/gdkevents.c (gdk_set_show_events): take gboolean arg + (gdk_get_show_events): return gboolean, and canonicalize + to TRUE/FALSE + + * gdk/gdkcolor.c (gdk_colormap_new): gboolean flag whether the + colormap is private + (gdk_colors_alloc): gboolean whether to be contiguous + (gdk_color_equal): return gboolean since we are a predicate + and not a qsort() (this looks semi-wrong due to glib breakage, + IMO glib should be fixed) + + * gdk/gdk.c (gdk_set_use_xshm): take gboolean arg + (gdk_get_use_xshm): return gboolean + (gdk_pointer_is_grabbed): return gboolean + + * gdk/gdk.h: Change prototypes to match all the above changes, + and re-run egtk-format-protos as required. + +Fri Jan 28 12:28:17 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkctree.c (resync_selection): + * gtk/gtkclist.c (resync_selection): + + Return immediately if clist->drag_pos < 0. This is a workaround + for the corrupt state that the clist gets into when a + GDK_2BUTTON_PRESS occurs. See note in gtk_clist_button_press(). + + Bug #5487, #2051, #2677; fix suggested by David Helder and T. Alexander Popiel. + + * gtk/gtknotebook.c (gtk_notebook_size_request): Fix uninitialized + variable from recent commit. + +Thu Jan 27 15:22:09 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin): Fix stupid typo in last commit. + +Thu Jan 27 18:00:55 2000 Tim Janik <timj@gtk.org> + + * gtk/Makefile.am: prefix all autogenerated source that get build in + $(srcdir) with $(srcdir)/, so make doesn't assume they got generted + in builddir. since we subsequently cd into srcdir for autogeneration, + the paths have to be stripped from the target file names, thusly we + use $(@F) as target names now. + put a comment about configure.in's --disable-rebuilds option, + which can be used for non-writable source directories, for development + setups though, srcdir has to be *writable*. + +hu Jan 27 00:15:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkdnd.c (gtk_drag_begin gtk_drag_get_event_actions): + Finish the job of allowing event to be NULL. + (Fixes bug #4283, reported by Chris Blizzard) + + * gtk/gtkentry.c (entry_adjust_scroll): When calculating + things so that the cursor appears on screen, properly + take into account INNER_BORDER. + (Fixes bug #4754, reported by Antonio Campos) + +Wed Jan 26 23:12:28 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + +Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkstyle.c (gtk_style_new): Dont' set + style/base[GTK_STATE_INSENSITIVE] both to + gtk_default_insensitive_bg! + (Bug #2187, reported by Jonathan Blandford) + + * gtk/gtkaccelgroup.c (gtk_accelerator_valid): + Add Alt_L, Alt_R to list of invalid accelerators. + (Bug #3736, reported by Vlad Harchev) + +Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_ref_dir): Fix several + bugs which occured after an attempt to open + invalid home directory left cmpl_state->reference_dir == NULL. + + - completion on files in home directory didn't work + - completion on an empty string caused segfault + + (Bug #3768, reported by Steve Ratcliffe) + + * gtk/gtkscale.c (gtk_scale_get_value_width): Fix + cut and paste error that was causing scales to + be incorrectly positioned. + (Bug #2956, + patch from Steve Ratcliffe <steve@parabola.demon.co.uk>) + +2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> + + * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs + when checking for dcgettext, if we've found we needed + it for dgettext. ++ +Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore + queue_clear on NO_WINDOW widgets during a reparent, + since at that point the window and widget heirarchies + are out of sync. This stops crashing in some cases + (the scrolled window reparent test, for instance), and + _probably_ won't cause drawing errors. + + * gtk/testgtk.c: Make the reparenting-a-scrolled-window + test do what it was supposed to do and be robust against + window closings, etc. (Bug #2443) + +Wed Jan 26 16:56:54 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkentry.c: Fix return values on mouse events. + (Bug #2686, Sky <seb_sky@yahoo.com>) + + * gtk/genmarshal.pl: Fix up handling of FOREIGN. + (pointed out by George Lebl) + + * gdk/gdkcolor.c (gdk_color_copy): Made const-safe. + (From Ettore Perazzoli <ettore@helixcode.com>) + +Mon Jan 24 10:44:48 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Handle + clicks between rows or outside calender area correctly. + (Patch from Damon Chaplin) + + * gtk/gtkclist.c (gtk_clist_set_row_data_full): + * gtk/gtkctree.c (gtk_ctree_node_set_row_data_full): + Call destroy function when overwriting existing data. + (Pointed out by Damon Chaplin) + +Tue Jan 25 09:55:41 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdk.c: Remove useless #include of <X11/Xmu/WinUtil.h>, + which was causing problems on various systems with Xmu. + This hasn't been needed for a very long time. + (Fixes #1185 3167) + +Sun Jan 23 22:27:36 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdki18n.h: Include <ctype.h> when defining + gdk_isw* in terms of is* as a fallback. + (Bug #4106 - Dan Winship <danw@MIT.EDU>) + +Sun Jan 23 22:12:36 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + +Sat Jan 22 15:44:30 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwidget.c (gtk_widget_reparent): Correctly + fix up widget->window when the widget is a + NO_WINDOW container widget. + +Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite + to account for the fact that feof() does _not_ + return TRUE on errors, and thus avoid infinite loops + when trying to use gdk_pixmap_create_from_xpm() + on unreadable values. + +Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/. + +Fri Jan 21 16:24:08 2000 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkgc.c (gdk_gc_set_dashes): Change from + gdk_gc_set_dashes to take gint8 instead of gchar to + make it clearer that it is _not_ a NULL terminated string. + + * gdk/gdk.h gdk/gdkfont.c gdk/gdkgc.c gdk/gdkselection.c + gdk/gdkwindow.c gtk/gtkprogress.[ch] gtk/gtkthemes.[ch] + gtk/gtktreeitem.[ch] gtk/gtkwidget.[ch]: Constify string + arguments. + +Thu Dec 30 04:51:05 1999 Tim Janik <timj@gtk.org> + + * gtk/gtkvscale.c (gtk_vscale_pos_background): + * gtk/gtkhscale.c (gtk_hscale_pos_background): when calculating the + background size relative to our allocation, guard against small + allocations, we may have not yet been size allocated. + +Thu Dec 2 10:59:14 1999 Owen Taylor <otaylor@redhat.com> + + * gdk/gdkdnd.c (xdnd_check_dest): Allow version >= 3, + not just version == 3. We implement all 3 + most of 4 - + (we don't support matching text/plain;charset=iso-8859-1 + to a dest that expects text/plain). We'll still advertise + 3 to be safe, but any client implementing version >= 3 + must interoperate with 3. + +Tue Mar 14 11:53:31 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktooltips.[ch] (struct _GtkTooltips): Remove foreground, + background and gc members, add a warning in gtk_tooltips_set_color() + indicating that this function is deprecated. + Thu Mar 9 22:10:56 GMT 2000 Tony Gale <gale@gtk.org> * docs/gtkfaq.sgml: FAQ Update: @@ -7,8 +7,8 @@ you got this package. Simple install procedure ======================== - % gzip -cd gtk+-1.2.5.tar.gz | tar xvf - # unpack the sources - % cd gtk+-1.2.5 # change to the toplevel directory + % gzip -cd gtk+-1.2.7.tar.gz | tar xvf - # unpack the sources + % cd gtk+-1.2.7 # change to the toplevel directory % ./configure # run the `configure' script % make # build GTK [ Become root if necessary ] @@ -118,7 +118,7 @@ You can compile GTK+ against a copy of GLIB that you have not yet installed. To do this, give the --with-glib=DIR options to ./configure. For instance: - ./configure --with-glib=../glib-1.2.5 + ./configure --with-glib=../glib-1.2.7 This, however, will not work if you built GLIB with different source and build directories. @@ -1,7 +1,7 @@ General Information =================== -This is GTK+ version 1.2.0. GTK+, which stands for the Gimp ToolKit, +This is GTK+ version 1.2.7. GTK+, which stands for the Gimp ToolKit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. @@ -37,9 +37,9 @@ version number. This should be separated by a blank line from the actual headers. Package: gtk+ - Version: 1.2.0 + Version: 1.2.7 -[ Please substitute 1.2.0 with the version of GTK+ that +[ Please substitute 1.2.7 with the version of GTK+ that you have installed ] Then describe the bug. Include: @@ -82,7 +82,7 @@ From: yourname@your.address.org Subject: handlebox test in testgtk is misnamed. Package: gtk+ -Version: 1.2.0 +Version: 1.2.7 When I run gtk/testgtk, the button "handle box" is misnamed. There are multiple handle boxes in diff --git a/acinclude.m4 b/acinclude.m4 index 5de6f7aa1..01e7d5ce3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -34,7 +34,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig @@ -66,6 +66,11 @@ AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -84,7 +89,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext @@ -300,7 +305,6 @@ else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_SUBST(LD) AC_PROG_LD_GNU ]) @@ -346,14 +350,13 @@ else fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) -AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= -case "$host" in +case "$lt_target" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; @@ -487,6 +490,10 @@ AC_DEFUN(AM_GTK_WITH_NLS, gt_cv_func_dgettext_libintl=no)]) fi + if test "$gt_cv_func_dgettext_libintl" = "yes"; then + LIBS="$LIBS -lintl"; + fi + if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) diff --git a/config.guess b/config.guess index 6cb567b8a..e1b587170 100755 --- a/config.guess +++ b/config.guess @@ -24,7 +24,7 @@ # Written by Per Bothner <bothner@cygnus.com>. # The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to the Autoconf mailing list <autoconf@gnu.org>. +# Please send patches to <autoconf-patches@gnu.org>. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -156,6 +156,9 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -328,15 +331,18 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -453,7 +459,7 @@ EOF exit (0); } EOF - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` @@ -550,7 +556,7 @@ EOF echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*T3E:*:*:*) - echo t3e-cray-unicosmk${UNAME_RELEASE} + echo alpha-cray-unicosmk${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos @@ -588,7 +594,7 @@ EOF echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` @@ -618,12 +624,6 @@ EOF echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - armv*) UNAME_MACHINE=$UNAME_MACHINE ;; - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -636,11 +636,38 @@ EOF s/ .*// p'` case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + *ia64) + echo "${UNAME_MACHINE}-unknown-linux" + exit 0 + ;; + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; elf32ppc) # Determine Lib Version cat >$dummy.c <<EOF @@ -670,7 +697,9 @@ EOF fi fi rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then @@ -797,19 +826,21 @@ EOF echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -943,6 +974,9 @@ EOF *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:QNX:*:4*) + echo i386-qnx-qnx${UNAME_VERSION} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/config.sub b/config.sub index 2436b4534..28426bb8f 100755 --- a/config.sub +++ b/config.sub @@ -105,7 +105,7 @@ case $os in -scout) ;; -wrs) - os=vxworks + os=-vxworks basic_machine=$1 ;; -hiux*) @@ -156,13 +156,17 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ @@ -171,12 +175,12 @@ case $basic_machine in | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el \ + | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v) + | thumb | d10v | fr30) basic_machine=$basic_machine-unknown ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' @@ -191,7 +195,8 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ @@ -204,10 +209,10 @@ case $basic_machine in | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -425,7 +430,6 @@ case $basic_machine in ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) @@ -460,6 +464,9 @@ case $basic_machine in basic_machine=i386-unknown os=-mingw32 ;; + i386-qnx | qnx) + basic_machine=i386-qnx + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -488,7 +495,7 @@ case $basic_machine in miniframe) basic_machine=m68000-convergent ;; - *mint | *MiNT) + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; @@ -514,6 +521,10 @@ case $basic_machine in basic_machine=i386-unknown os=-msdos ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -523,7 +534,7 @@ case $basic_machine in os=-netbsd ;; netwinder) - basic_machine=armv4l-corel + basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) @@ -907,7 +918,7 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) + | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ @@ -926,6 +937,9 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; -osfrose*) os=-osfrose ;; @@ -963,6 +977,9 @@ case $os in -oss*) os=-sysv3 ;; + -qnx) + os=-qnx4 + ;; -svr4) os=-sysv4 ;; @@ -1012,7 +1029,7 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; - arm*-corel) + arm*-rebel) os=-linux ;; arm*-semi) @@ -1186,7 +1203,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -70,9 +70,9 @@ void gdk_error_trap_push (void); gint gdk_error_trap_pop (void); -void gdk_set_use_xshm (gint use_xshm); +void gdk_set_use_xshm (gboolean use_xshm); -gint gdk_get_use_xshm (void); +gboolean gdk_get_use_xshm (void); gchar* gdk_get_display (void); gint gdk_input_add_full (gint source, @@ -86,20 +86,18 @@ gint gdk_input_add (gint source, gpointer data); void gdk_input_remove (gint tag); -gint gdk_pointer_grab (GdkWindow *window, - gint owner_events, - GdkEventMask event_mask, - GdkWindow *confine_to, - GdkCursor *cursor, - guint32 time); -void gdk_pointer_ungrab (guint32 time); - -gint gdk_keyboard_grab (GdkWindow *window, - gint owner_events, - guint32 time); -void gdk_keyboard_ungrab (guint32 time); - -gint gdk_pointer_is_grabbed (void); +gint gdk_pointer_grab (GdkWindow *window, + gboolean owner_events, + GdkEventMask event_mask, + GdkWindow *confine_to, + GdkCursor *cursor, + guint32 time); +void gdk_pointer_ungrab (guint32 time); +gint gdk_keyboard_grab (GdkWindow *window, + gboolean owner_events, + guint32 time); +void gdk_keyboard_ungrab (guint32 time); +gboolean gdk_pointer_is_grabbed (void); gint gdk_screen_width (void); gint gdk_screen_height (void); @@ -115,12 +113,12 @@ void gdk_key_repeat_restore (void); /* Rectangle utilities */ -gint gdk_rectangle_intersect (GdkRectangle *src1, - GdkRectangle *src2, - GdkRectangle *dest); -void gdk_rectangle_union (GdkRectangle *src1, - GdkRectangle *src2, - GdkRectangle *dest); +gboolean gdk_rectangle_intersect (GdkRectangle *src1, + GdkRectangle *src2, + GdkRectangle *dest); +void gdk_rectangle_union (GdkRectangle *src1, + GdkRectangle *src2, + GdkRectangle *dest); /* Conversion functions between wide char and multibyte strings. */ diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c index 47a35af48..913e698dd 100644 --- a/gdk/gdkcolor.c +++ b/gdk/gdkcolor.c @@ -101,7 +101,7 @@ gdk_colors_store (GdkColormap *colormap, static GMemChunk *color_chunk; GdkColor* -gdk_color_copy (GdkColor *color) +gdk_color_copy (const GdkColor *color) { GdkColor *new_color; @@ -221,7 +221,7 @@ gdk_color_hash (const GdkColor *colora) (colora->blue >> 6)); } -gint +gboolean gdk_color_equal (const GdkColor *colora, const GdkColor *colorb) { diff --git a/gdk/gdkcolor.h b/gdk/gdkcolor.h index 94630f098..d2af35266 100644 --- a/gdk/gdkcolor.h +++ b/gdk/gdkcolor.h @@ -32,7 +32,7 @@ struct _GdkColormap GdkColormap* gdk_colormap_new (GdkVisual *visual, - gint allocate); + gboolean allocate); GdkColormap* gdk_colormap_ref (GdkColormap *cmap); void gdk_colormap_unref (GdkColormap *cmap); @@ -59,22 +59,20 @@ void gdk_colormap_free_colors (GdkColormap *colormap, GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap); -GdkColor *gdk_color_copy (GdkColor *color); -void gdk_color_free (GdkColor *color); - -gint gdk_color_parse (const gchar *spec, - GdkColor *color); -guint gdk_color_hash (const GdkColor *colora); -gint gdk_color_equal (const GdkColor *colora, - const GdkColor *colorb); - +GdkColor *gdk_color_copy (const GdkColor *color); +void gdk_color_free (GdkColor *color); +gint gdk_color_parse (const gchar *spec, + GdkColor *color); +guint gdk_color_hash (const GdkColor *colora); +gboolean gdk_color_equal (const GdkColor *colora, + const GdkColor *colorb); /* The following functions are deprecated */ void gdk_colors_store (GdkColormap *colormap, GdkColor *colors, gint ncolors); gint gdk_colors_alloc (GdkColormap *colormap, - gint contiguous, + gboolean contiguous, gulong *planes, gint nplanes, gulong *pixels, diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h index 3a749fb96..3d5e802e9 100644 --- a/gdk/gdkdnd.h +++ b/gdk/gdkdnd.h @@ -91,8 +91,6 @@ void gdk_drag_drop (GdkDragContext *context, void gdk_drag_abort (GdkDragContext *context, guint32 time); -GdkAtom gdk_drag_get_selection (GdkDragContext *context); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 300d194ab..8df54a093 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -462,7 +462,7 @@ gdk_event_get_time (GdkEvent *event) */ void -gdk_set_show_events (gint show_events) +gdk_set_show_events (gboolean show_events) { if (show_events) gdk_debug_flags |= GDK_DEBUG_EVENTS; @@ -470,10 +470,10 @@ gdk_set_show_events (gint show_events) gdk_debug_flags &= ~GDK_DEBUG_EVENTS; } -gint +gboolean gdk_get_show_events (void) { - return gdk_debug_flags & GDK_DEBUG_EVENTS; + return (gdk_debug_flags & GDK_DEBUG_EVENTS) != 0; } static void diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h index bf37ced81..29dde26a7 100644 --- a/gdk/gdkevents.h +++ b/gdk/gdkevents.h @@ -419,8 +419,8 @@ void gdk_event_handler_set (GdkEventFunc func, gpointer data, GDestroyNotify notify); -void gdk_set_show_events (gint show_events); -gint gdk_get_show_events (void); +void gdk_set_show_events (gboolean show_events); +gboolean gdk_get_show_events (void); /* * The following function adds a global filter for all client diff --git a/gdk/gdkfont.h b/gdk/gdkfont.h index fab92938f..213c545d0 100644 --- a/gdk/gdkfont.h +++ b/gdk/gdkfont.h @@ -25,11 +25,11 @@ struct _GdkFont }; GdkFont* gdk_font_load (const gchar *font_name); -GdkFont* gdk_fontset_load (gchar *fontset_name); +GdkFont* gdk_fontset_load (const gchar *fontset_name); GdkFont* gdk_font_ref (GdkFont *font); void gdk_font_unref (GdkFont *font); gint gdk_font_id (const GdkFont *font); -gint gdk_font_equal (const GdkFont *fonta, +gboolean gdk_font_equal (const GdkFont *fonta, const GdkFont *fontb); gint gdk_string_width (GdkFont *font, diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c index 557828251..385348521 100644 --- a/gdk/gdkgc.c +++ b/gdk/gdkgc.c @@ -294,7 +294,7 @@ gdk_gc_set_line_attributes (GdkGC *gc, void gdk_gc_set_dashes (GdkGC *gc, gint dash_offset, - gchar dash_list[], + gint8 dash_list[], gint n) { g_return_if_fail (gc != NULL); diff --git a/gdk/gdkgc.h b/gdk/gdkgc.h index 0fe9deb2f..072ddfe74 100644 --- a/gdk/gdkgc.h +++ b/gdk/gdkgc.h @@ -219,7 +219,7 @@ void gdk_gc_set_line_attributes (GdkGC *gc, GdkJoinStyle join_style); void gdk_gc_set_dashes (GdkGC *gc, gint dash_offset, - gchar dash_list[], + gint8 dash_list[], gint n); void gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc); diff --git a/gdk/gdki18n.h b/gdk/gdki18n.h index 62213ebe6..7e277648b 100644 --- a/gdk/gdki18n.h +++ b/gdk/gdki18n.h @@ -47,6 +47,7 @@ # define gdk_iswalnum(c) iswalnum(c) # define gdk_iswspace(c) iswspace(c) #else +# include <ctype.h> # define gdk_iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) # define gdk_iswspace(c) ((wchar_t)(c) <= 0xFF && isspace(c)) #endif diff --git a/gdk/gdkim.h b/gdk/gdkim.h index 3f3ceb692..bf74f20fa 100644 --- a/gdk/gdkim.h +++ b/gdk/gdkim.h @@ -96,7 +96,7 @@ struct _GdkICAttr GdkColormap *status_colormap; }; -gint gdk_im_ready (void); +gboolean gdk_im_ready (void); void gdk_im_begin (GdkIC *ic, GdkWindow *window); diff --git a/gdk/gdkinput.h b/gdk/gdkinput.h index c34c67795..35550b265 100644 --- a/gdk/gdkinput.h +++ b/gdk/gdkinput.h @@ -73,34 +73,33 @@ struct _GdkTimeCoord gdouble ytilt; }; -GList *gdk_input_list_devices (void); -void gdk_input_set_extension_events (GdkWindow *window, - gint mask, - GdkExtensionMode mode); -void gdk_input_set_source (guint32 deviceid, - GdkInputSource source); -gint gdk_input_set_mode (guint32 deviceid, - GdkInputMode mode); -void gdk_input_set_axes (guint32 deviceid, - GdkAxisUse *axes); -void gdk_input_set_key (guint32 deviceid, - guint index, - guint keyval, - GdkModifierType modifiers); -void gdk_input_window_get_pointer (GdkWindow *window, - guint32 deviceid, - gdouble *x, - gdouble *y, - gdouble *pressure, - gdouble *xtilt, - gdouble *ytilt, - GdkModifierType *mask); - -GdkTimeCoord *gdk_input_motion_events (GdkWindow *window, - guint32 deviceid, - guint32 start, - guint32 stop, - gint *nevents_return); +GList * gdk_input_list_devices (void); +void gdk_input_set_extension_events (GdkWindow *window, + gint mask, + GdkExtensionMode mode); +void gdk_input_set_source (guint32 deviceid, + GdkInputSource source); +gboolean gdk_input_set_mode (guint32 deviceid, + GdkInputMode mode); +void gdk_input_set_axes (guint32 deviceid, + GdkAxisUse *axes); +void gdk_input_set_key (guint32 deviceid, + guint index, + guint keyval, + GdkModifierType modifiers); +void gdk_input_window_get_pointer (GdkWindow *window, + guint32 deviceid, + gdouble *x, + gdouble *y, + gdouble *pressure, + gdouble *xtilt, + gdouble *ytilt, + GdkModifierType *mask); +GdkTimeCoord *gdk_input_motion_events (GdkWindow *window, + guint32 deviceid, + guint32 start, + guint32 stop, + gint *nevents_return); #ifdef __cplusplus } diff --git a/gdk/gdkproperty.h b/gdk/gdkproperty.h index afba2d2bf..7bc897ac8 100644 --- a/gdk/gdkproperty.h +++ b/gdk/gdkproperty.h @@ -14,38 +14,42 @@ typedef enum GDK_PROP_MODE_APPEND } GdkPropMode; -GdkAtom gdk_atom_intern (const gchar *atom_name, - gboolean only_if_exists); -gchar* gdk_atom_name (GdkAtom atom); -gboolean gdk_property_get (GdkWindow *window, - GdkAtom property, - GdkAtom type, - gulong offset, - gulong length, - gint pdelete, - GdkAtom *actual_property_type, - gint *actual_format, - gint *actual_length, - guchar **data); - -void gdk_property_change (GdkWindow *window, - GdkAtom property, - GdkAtom type, - gint format, - GdkPropMode mode, - guchar *data, - gint nelements); -void gdk_property_delete (GdkWindow *window, - GdkAtom property); - -gint gdk_text_property_to_text_list (GdkAtom encoding, gint format, - guchar *text, gint length, - gchar ***list); -void gdk_free_text_list (gchar **list); -gint gdk_string_to_compound_text (gchar *str, - GdkAtom *encoding, gint *format, - guchar **ctext, gint *length); -void gdk_free_compound_text (guchar *ctext); +GdkAtom gdk_atom_intern (const gchar *atom_name, + gboolean only_if_exists); +gchar* gdk_atom_name (GdkAtom atom); + +gboolean gdk_property_get (GdkWindow *window, + GdkAtom property, + GdkAtom type, + gulong offset, + gulong length, + gint pdelete, + GdkAtom *actual_property_type, + gint *actual_format, + gint *actual_length, + guchar **data); +void gdk_property_change (GdkWindow *window, + GdkAtom property, + GdkAtom type, + gint format, + GdkPropMode mode, + const guchar *data, + gint nelements); +void gdk_property_delete (GdkWindow *window, + GdkAtom property); + +gint gdk_text_property_to_text_list (GdkAtom encoding, + gint format, + const guchar *text, + gint length, + gchar ***list); +void gdk_free_text_list (gchar **list); +gint gdk_string_to_compound_text (const gchar *str, + GdkAtom *encoding, + gint *format, + guchar **ctext, + gint *length); +void gdk_free_compound_text (guchar *ctext); #ifdef __cplusplus } diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c index 381ccd5f7..9d8bb5a17 100644 --- a/gdk/gdkrectangle.c +++ b/gdk/gdkrectangle.c @@ -41,7 +41,7 @@ gdk_rectangle_union (GdkRectangle *src1, dest->height = MAX (src1->y + src1->height, src2->y + src2->height) - dest->y; } -gint +gboolean gdk_rectangle_intersect (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) diff --git a/gdk/gdkselection.h b/gdk/gdkselection.h index d8f7d6e1f..94723d6b4 100644 --- a/gdk/gdkselection.h +++ b/gdk/gdkselection.h @@ -42,7 +42,7 @@ typedef enum gboolean gdk_selection_owner_set (GdkWindow *owner, GdkAtom selection, guint32 time, - gint send_event); + gboolean send_event); GdkWindow* gdk_selection_owner_get (GdkAtom selection); void gdk_selection_convert (GdkWindow *requestor, GdkAtom selection, diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index dc51277ae..47c09e9ef 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -241,7 +241,7 @@ void gdk_window_set_background (GdkWindow *window, GdkColor *color); void gdk_window_set_back_pixmap (GdkWindow *window, GdkPixmap *pixmap, - gint parent_relative); + gboolean parent_relative); void gdk_window_set_cursor (GdkWindow *window, GdkCursor *cursor); void gdk_window_get_user_data (GdkWindow *window, @@ -280,7 +280,7 @@ void gdk_window_set_icon (GdkWindow *window, GdkPixmap *pixmap, GdkBitmap *mask); void gdk_window_set_icon_name (GdkWindow *window, - gchar *name); + const gchar *name); void gdk_window_set_group (GdkWindow *window, GdkWindow *leader); void gdk_window_set_decorations (GdkWindow *window, diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c index 26994cbe8..7759fb5f1 100644 --- a/gdk/x11/gdkcolor-x11.c +++ b/gdk/x11/gdkcolor-x11.c @@ -43,7 +43,7 @@ static GHashTable *colormap_hash = NULL; GdkColormap* gdk_colormap_new (GdkVisual *visual, - gint private_cmap) + gboolean private_cmap) { GdkColormap *colormap; GdkColormapPrivateX *private; @@ -344,7 +344,7 @@ gdk_colormap_change (GdkColormap *colormap, gboolean gdk_colors_alloc (GdkColormap *colormap, - gint contiguous, + gboolean contiguous, gulong *planes, gint nplanes, gulong *pixels, diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index 653f2086d..590c4174d 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -950,6 +950,7 @@ motif_read_target_table (void) guchar *p; gboolean success = FALSE; + gdk_error_trap_push (); XGetWindowProperty (gdk_display, motif_drag_window, motif_drag_targets_atom, 0, (sizeof(MotifTargetTableHeader)+3)/4, FALSE, @@ -957,12 +958,13 @@ motif_read_target_table (void) &type, &format, &nitems, &bytes_after, (guchar **)&header); - if ((format != 8) || (nitems < sizeof (MotifTargetTableHeader))) + if (gdk_error_trap_pop () || (format != 8) || (nitems < sizeof (MotifTargetTableHeader))) goto error; header->n_lists = card16_to_host (header->n_lists, header->byte_order); header->total_size = card32_to_host (header->total_size, header->byte_order); + gdk_error_trap_push (); XGetWindowProperty (gdk_display, motif_drag_window, motif_drag_targets_atom, (sizeof(MotifTargetTableHeader)+3)/4, (header->total_size + 3)/4 - (sizeof(MotifTargetTableHeader) + 3)/4, @@ -970,7 +972,7 @@ motif_read_target_table (void) motif_drag_targets_atom, &type, &format, &nitems, &bytes_after, &target_bytes); - if ((format != 8) || (bytes_after != 0) || + if (gdk_error_trap_pop () || (format != 8) || (bytes_after != 0) || (nitems != header->total_size - sizeof(MotifTargetTableHeader))) goto error; @@ -1294,29 +1296,33 @@ motif_check_dest (Window win) if (!motif_drag_receiver_info_atom) motif_drag_receiver_info_atom = gdk_atom_intern ("_MOTIF_DRAG_RECEIVER_INFO", FALSE); + gdk_error_trap_push (); XGetWindowProperty (gdk_display, win, motif_drag_receiver_info_atom, 0, (sizeof(*info)+3)/4, False, AnyPropertyType, &type, &format, &nitems, &after, (guchar **)&info); - - if (type != None) + + if (gdk_error_trap_pop() == 0) { - if ((format == 8) && (nitems == sizeof(*info))) - { - if ((info->protocol_version == 0) && - ((info->protocol_style == XmDRAG_PREFER_PREREGISTER) || - (info->protocol_style == XmDRAG_PREFER_DYNAMIC) || - (info->protocol_style == XmDRAG_DYNAMIC))) - retval = TRUE; - } - else + if (type != None) { - GDK_NOTE (DND, - g_warning ("Invalid Motif drag receiver property on window %ld\n", win)); + if ((format == 8) && (nitems == sizeof(*info))) + { + if ((info->protocol_version == 0) && + ((info->protocol_style == XmDRAG_PREFER_PREREGISTER) || + (info->protocol_style == XmDRAG_PREFER_DYNAMIC) || + (info->protocol_style == XmDRAG_DYNAMIC))) + retval = TRUE; + } + else + { + GDK_NOTE (DND, + g_warning ("Invalid Motif drag receiver property on window %ld\n", win)); + } + + XFree (info); } - - XFree (info); } return retval ? win : GDK_NONE; @@ -1475,13 +1481,14 @@ motif_read_initiator_info (Window source_window, if (!motif_drag_initiator_info) motif_drag_initiator_info = gdk_atom_intern ("_MOTIF_DRAG_INITIATOR_INFO", FALSE); + gdk_error_trap_push (); XGetWindowProperty (gdk_display, source_window, atom, 0, sizeof(*initiator_info), FALSE, motif_drag_initiator_info, &type, &format, &nitems, &bytes_after, (guchar **)&initiator_info); - if ((format != 8) || (nitems != sizeof (MotifDragInitiatorInfo)) || (bytes_after != 0)) + if (gdk_error_trap_pop () || (format != 8) || (nitems != sizeof (MotifDragInitiatorInfo)) || (bytes_after != 0)) { g_warning ("Error reading initiator info\n"); return FALSE; @@ -2308,7 +2315,7 @@ xdnd_check_dest (Window win) { if ((format == 32) && (nitems == 1)) { - if (*version == 3) + if (*version >= 3) retval = TRUE; } else @@ -2511,13 +2518,14 @@ xdnd_enter_filter (GdkXEvent *xev, new_context->targets = NULL; if (get_types) { + gdk_error_trap_push (); XGetWindowProperty (GDK_DRAWABLE_XDISPLAY (event->any.window), source_window, gdk_atom_intern ("XdndTypeList", FALSE), 0, 65536, False, XA_ATOM, &type, &format, &nitems, &after, (guchar **)&data); - if ((format != 32) || (type != XA_ATOM)) + if (gdk_error_trap_pop () || (format != 32) || (type != XA_ATOM)) { gdk_drag_context_unref (new_context); return GDK_FILTER_REMOVE; @@ -2779,10 +2787,12 @@ gdk_drag_get_protocol (guint32 xid, if (xid == gdk_root_window) rootwin = TRUE; + gdk_error_warnings = 0; + if (!rootwin) { gdk_error_code = 0; - + XGetWindowProperty (gdk_display, xid, gdk_atom_intern ("ENLIGHTENMENT_DESKTOP", FALSE), 0, 0, False, AnyPropertyType, diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c index 55b4524fc..b4e1020bc 100644 --- a/gdk/x11/gdkfont-x11.c +++ b/gdk/x11/gdkfont-x11.c @@ -134,7 +134,7 @@ gdk_font_load (const gchar *font_name) } GdkFont* -gdk_fontset_load (gchar *fontset_name) +gdk_fontset_load (const gchar *fontset_name) { GdkFont *font; GdkFontPrivateX *private; @@ -276,7 +276,7 @@ gdk_font_id (const GdkFont *font) } } -gint +gboolean gdk_font_equal (const GdkFont *fonta, const GdkFont *fontb) { diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c index a13d1a612..6ad29752e 100644 --- a/gdk/x11/gdkim-x11.c +++ b/gdk/x11/gdkim-x11.c @@ -445,7 +445,7 @@ gdk_im_close (void) } } -gint +gboolean gdk_im_ready (void) { return (xim_im != NULL); diff --git a/gdk/x11/gdkinput.c b/gdk/x11/gdkinput.c index 348251458..cb2dd269c 100644 --- a/gdk/x11/gdkinput.c +++ b/gdk/x11/gdkinput.c @@ -73,7 +73,7 @@ gdk_input_set_source (guint32 deviceid, GdkInputSource source) gdkdev->info.source = source; } -gint +gboolean gdk_input_set_mode (guint32 deviceid, GdkInputMode mode) { if (deviceid == GDK_CORE_POINTER) diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index de696cca9..332ad7718 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -42,7 +42,6 @@ #include <X11/Xlib.h> #include <X11/Xos.h> #include <X11/Xutil.h> -#include <X11/Xmu/WinUtil.h> #include <X11/cursorfont.h> #include "gdk.h" @@ -191,12 +190,12 @@ _gdk_windowing_init_check (int argc, char **argv) } void -gdk_set_use_xshm (gint use_xshm) +gdk_set_use_xshm (gboolean use_xshm) { gdk_use_xshm = use_xshm; } -gint +gboolean gdk_get_use_xshm (void) { return gdk_use_xshm; @@ -227,7 +226,7 @@ gdk_get_use_xshm (void) gint gdk_pointer_grab (GdkWindow * window, - gint owner_events, + gboolean owner_events, GdkEventMask event_mask, GdkWindow * confine_to, GdkCursor * cursor, @@ -337,7 +336,7 @@ gdk_pointer_ungrab (guint32 time) *-------------------------------------------------------------- */ -gint +gboolean gdk_pointer_is_grabbed (void) { return gdk_xgrab_window != NULL; @@ -365,7 +364,7 @@ gdk_pointer_is_grabbed (void) gint gdk_keyboard_grab (GdkWindow * window, - gint owner_events, + gboolean owner_events, guint32 time) { g_return_val_if_fail (window != NULL, 0); diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c index c27517c9a..45807cb61 100644 --- a/gdk/x11/gdkpixmap-x11.c +++ b/gdk/x11/gdkpixmap-x11.c @@ -212,21 +212,23 @@ gdk_pixmap_seek_string (FILE *infile, { char instr[1024]; - while (!feof (infile)) + while (1) { - fscanf (infile, "%1023s", instr); + if (fscanf (infile, "%1023s", instr) != 1) + return FALSE; + if (skip_comments == TRUE && strcmp (instr, "/*") == 0) { - fscanf (infile, "%1023s", instr); - while (!feof (infile) && strcmp (instr, "*/") != 0) - fscanf (infile, "%1023s", instr); - fscanf(infile, "%1023s", instr); + do + { + if (fscanf (infile, "%1023s", instr) != 1) + return FALSE; + } + while (strcmp (instr, "*/") != 0); } - if (strcmp (instr, str)==0) + else if (strcmp (instr, str) == 0) return TRUE; } - - return FALSE; } static gint diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 54fa55c51..58b51a971 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -91,7 +91,7 @@ gdk_atom_name (GdkAtom atom) } } -gint +gboolean gdk_property_get (GdkWindow *window, GdkAtom property, GdkAtom type, @@ -190,13 +190,13 @@ gdk_property_get (GdkWindow *window, } void -gdk_property_change (GdkWindow *window, - GdkAtom property, - GdkAtom type, - gint format, - GdkPropMode mode, - guchar *data, - gint nelements) +gdk_property_change (GdkWindow *window, + GdkAtom property, + GdkAtom type, + gint format, + GdkPropMode mode, + const guchar *data, + gint nelements) { Display *xdisplay; Window xwindow; @@ -219,7 +219,7 @@ gdk_property_change (GdkWindow *window, } XChangeProperty (xdisplay, xwindow, property, type, - format, mode, data, nelements); + format, mode, (guchar *)data, nelements); } void diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index e1272f421..42e00195e 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -34,11 +34,11 @@ #include "gdkx.h" -gint +gboolean gdk_selection_owner_set (GdkWindow *owner, GdkAtom selection, guint32 time, - gint send_event) + gboolean send_event) { Display *xdisplay; Window xwindow; @@ -187,9 +187,11 @@ gdk_selection_send_notify (guint32 requestor, } gint -gdk_text_property_to_text_list (GdkAtom encoding, gint format, - guchar *text, gint length, - gchar ***list) +gdk_text_property_to_text_list (GdkAtom encoding, + gint format, + const guchar *text, + gint length, + gchar ***list) { XTextProperty property; gint count = 0; @@ -198,7 +200,7 @@ gdk_text_property_to_text_list (GdkAtom encoding, gint format, if (!list) return 0; - property.value = text; + property.value = (guchar *)text; property.encoding = encoding; property.format = format; property.nitems = length; @@ -220,15 +222,17 @@ gdk_free_text_list (gchar **list) } gint -gdk_string_to_compound_text (gchar *str, - GdkAtom *encoding, gint *format, - guchar **ctext, gint *length) +gdk_string_to_compound_text (const gchar *str, + GdkAtom *encoding, + gint *format, + guchar **ctext, + gint *length) { gint res; XTextProperty property; res = XmbTextListToTextProperty (GDK_DISPLAY(), - &str, 1, XCompoundTextStyle, + (char **)&str, 1, XCompoundTextStyle, &property); if (res != Success) { diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 26cbcb8c2..fe1be34a4 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1069,7 +1069,7 @@ gdk_window_set_background (GdkWindow *window, void gdk_window_set_back_pixmap (GdkWindow *window, GdkPixmap *pixmap, - gint parent_relative) + gboolean parent_relative) { Pixmap xpixmap; @@ -1643,8 +1643,8 @@ gdk_window_set_icon (GdkWindow *window, } void -gdk_window_set_icon_name (GdkWindow *window, - gchar * name) +gdk_window_set_icon_name (GdkWindow *window, + const gchar *name) { XTextProperty property; gint res; diff --git a/gdk/x11/gxid.c b/gdk/x11/gxid.c index 5eb4b7f85..2b0994cbc 100644 --- a/gdk/x11/gxid.c +++ b/gdk/x11/gxid.c @@ -355,7 +355,7 @@ handle_claim_device(GxidClaimDevice *msg) { /* FIXME: this is a bit improper. We probably should do this only when a window is first claimed. But we might be fooled if - an old client died without releasing its windows. So until + an old client died without releasing it's windows. So until we look for client-window closings, do it here (We do look for closings now...) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 6950ef035..adbd67199 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -350,15 +350,20 @@ $(OBJECTS): OLD_STAMP # this is our oldest-source-stamp gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here test -f "$(srcdir)/$@" || touch $(srcdir)/$@ # normal autogeneration rules -stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources) $(gdk_headers) +# all autogenerated files need to generated in the srcdir, +# so old versions get remade and are not confused with newer +# versions in the build dir. thus a development setup requires +# srcdir to be writable, passing --disable-rebuilds to +# ../configure will supress all autogeneration rules. +$(srcdir)/stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources) $(gdk_headers) cd $(srcdir) \ && $(PERL) makeenums.pl defs $(gtk_public_h_sources) $(gdk_headers) > xgen-gdef \ && cat gtk-boxed.defs >> xgen-gdef \ && (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \ && rm -f xgen-gdef \ - && echo timestamp > $@ -gtkmarshal.c: stamp-gtkmarshal.h -gtkmarshal.c stamp-gtkmarshal.h: @REBUILD@ genmarshal.pl gtkmarshal.list gtkmarshal.h + && echo timestamp > $(@F) +$(srcdir)/gtkmarshal.c: stamp-gtkmarshal.h +$(srcdir)/gtkmarshal.c $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ genmarshal.pl gtkmarshal.list gtkmarshal.h cd $(srcdir) \ && $(PERL) genmarshal.pl gtkmarshal.list xgen-gmh xgen-gmc \ && (test -z "$(INDENT)" || $(INDENT) xgen-gmh) \ @@ -367,26 +372,26 @@ gtkmarshal.c stamp-gtkmarshal.h: @REBUILD@ genmarshal.pl gtkmarshal.list gtkmars && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \ && rm -f xgen-gmh xgen-gmc xgen-gmh~ xgen-gmc~ \ && echo timestamp > stamp-gtkmarshal.h -stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h +$(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h cd $(srcdir) \ && $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \ && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \ && rm -f xgen-gtbh \ - && echo timestamp > $@ -gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs + && echo timestamp > $(@F) +$(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs cd $(srcdir) \ && $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \ - && cp xgen-gtbvc $@ \ + && cp xgen-gtbvc $(@F) \ && rm -f xgen-gtbvc -gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs +$(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs cd $(srcdir) \ && $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \ - && cp xgen-gtbic $@ \ + && cp xgen-gtbic $(@F) \ && rm -f xgen-gtbic -gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources) $(gdk_headers) +$(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources) $(gdk_headers) cd $(srcdir) \ && $(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) > xgen-gtbec \ - && cp xgen-gtbec $@ \ + && cp xgen-gtbec $(@F) \ && rm -f xgen-gtbec @@ -478,7 +483,7 @@ EXTRA_DIST += @STRIP_BEGIN@ \ testgtk.1 \ testgtkrc \ testgtkrc2 \ - circles.xbm \ + circles.xbm \ line-arrow.xbm \ line-wrap.xbm \ tree_plus.xbm \ diff --git a/gtk/genmarshal.pl b/gtk/genmarshal.pl index 3b5fdfaf8..067afd3fb 100755 --- a/gtk/genmarshal.pl +++ b/gtk/genmarshal.pl @@ -8,7 +8,7 @@ "ULONG"=>"gulong", "FLOAT"=>"gfloat", "DOUBLE"=>"gdouble", "STRING"=>"gpointer", "ENUM"=>"gint", "FLAGS"=>"gint", - "BOXED"=>"gpointer", "FOREIGN"=>"gpointer", + "BOXED"=>"gpointer", "POINTER"=>"gpointer", "OBJECT"=>"gpointer", diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 7f001cfd9..ddf6510a6 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -715,7 +715,7 @@ gtk_accelerator_valid (guint keyval, GDK_BackSpace, GDK_Delete, GDK_KP_Delete, GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock, GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R, - GDK_Super_L, GDK_Super_R, GDK_Hyper_L, GDK_Hyper_R, + GDK_Alt_L, GDK_Alt_R, GDK_Super_L, GDK_Super_R, GDK_Hyper_L, GDK_Hyper_R, GDK_Mode_switch, GDK_Num_Lock, GDK_Multi_key, GDK_Scroll_Lock, GDK_Sys_Req, GDK_Up, GDK_Down, GDK_Left, GDK_Right, GDK_Tab, GDK_ISO_Left_Tab, diff --git a/gtk/gtkaccelgroup.h b/gtk/gtkaccelgroup.h index 2db22ad60..13fdf5bef 100644 --- a/gtk/gtkaccelgroup.h +++ b/gtk/gtkaccelgroup.h @@ -158,14 +158,6 @@ guint gtk_accel_group_create_add (GtkType class_type, guint gtk_accel_group_create_remove (GtkType class_type, GtkSignalRunType signal_flags, guint handler_offset); -void gtk_accel_group_marshal_add (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args); -void gtk_accel_group_marshal_remove (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args); /* Miscellaneous (internal) */ diff --git a/gtk/gtkaspectframe.h b/gtk/gtkaspectframe.h index f9d34937d..67df478fa 100644 --- a/gtk/gtkaspectframe.h +++ b/gtk/gtkaspectframe.h @@ -55,7 +55,7 @@ struct _GtkAspectFrame gfloat xalign; gfloat yalign; gfloat ratio; - gint obey_child; + gboolean obey_child; GtkAllocation center_allocation; }; @@ -71,7 +71,7 @@ GtkWidget* gtk_aspect_frame_new (const gchar *label, gfloat xalign, gfloat yalign, gfloat ratio, - gint obey_child); + gboolean obey_child); void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, gfloat xalign, gfloat yalign, diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 435b43437..96cad9e03 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -23,7 +23,7 @@ */ /* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. @@ -512,7 +512,7 @@ column_from_x (GtkCalendar *calendar, x_left = left_x_for_column (calendar, c); x_right = x_left + GTK_CALENDAR_PRIVATE_DATA (calendar)->day_width; - if (event_x > x_left && event_x < x_right) + if (event_x >= x_left && event_x < x_right) { column = c; break; @@ -549,7 +549,7 @@ row_from_y (GtkCalendar *calendar, y_top = top_y_for_row (calendar, r); y_bottom = y_top + height; - if (event_y > y_top && event_y < y_bottom) + if (event_y >= y_top && event_y < y_bottom) { row = r; break; @@ -796,6 +796,10 @@ gtk_calendar_main_button (GtkWidget *widget, row = row_from_y (calendar, y); col = column_from_x (calendar, x); + + /* If row or column isn't found, just return. */ + if (row == -1 || col == -1) + return; day_month = calendar->day_month[row][col]; diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 265bdcd1a..34396b629 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -122,6 +122,12 @@ LIST_WIDTH (GtkCList * clist) return 0; } +/* returns the GList item for the nth row */ +#define ROW_ELEMENT(clist, row) (((row) == (clist)->rows - 1) ? \ + (clist)->row_list_end : \ + g_list_nth ((clist)->row_list, (row))) + + #define GTK_CLIST_CLASS_FW(_widget_) GTK_CLIST_CLASS (((GtkObject*) (_widget_))->klass) /* redraw the list if it's not frozen */ @@ -2174,7 +2180,7 @@ gtk_clist_get_cell_type (GtkCList *clist, if (column < 0 || column >= clist->columns) return -1; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; return clist_row->cell[column].type; } @@ -2195,7 +2201,7 @@ gtk_clist_set_text (GtkCList *clist, if (column < 0 || column >= clist->columns) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; /* if text is null, then the cell is empty */ GTK_CLIST_CLASS_FW (clist)->set_cell_contents @@ -2225,7 +2231,7 @@ gtk_clist_get_text (GtkCList *clist, if (column < 0 || column >= clist->columns) return 0; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->cell[column].type != GTK_CELL_TEXT) return 0; @@ -2253,7 +2259,7 @@ gtk_clist_set_pixmap (GtkCList *clist, if (column < 0 || column >= clist->columns) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; gdk_pixmap_ref (pixmap); @@ -2287,7 +2293,7 @@ gtk_clist_get_pixmap (GtkCList *clist, if (column < 0 || column >= clist->columns) return 0; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->cell[column].type != GTK_CELL_PIXMAP) return 0; @@ -2321,7 +2327,7 @@ gtk_clist_set_pixtext (GtkCList *clist, if (column < 0 || column >= clist->columns) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; gdk_pixmap_ref (pixmap); if (mask) gdk_pixmap_ref (mask); @@ -2355,7 +2361,7 @@ gtk_clist_get_pixtext (GtkCList *clist, if (column < 0 || column >= clist->columns) return 0; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->cell[column].type != GTK_CELL_PIXTEXT) return 0; @@ -2391,7 +2397,7 @@ gtk_clist_set_shift (GtkCList *clist, if (column < 0 || column >= clist->columns) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist->column[column].auto_resize && !GTK_CLIST_AUTO_RESIZE_BLOCKED(clist)) @@ -2729,7 +2735,7 @@ real_remove_row (GtkCList *clist, was_selected = 0; /* get the row we're going to delete */ - list = g_list_nth (clist->row_list, row); + list = ROW_ELEMENT (clist, row); g_assert (list != NULL); clist_row = list->data; @@ -2856,7 +2862,7 @@ real_row_move (GtkCList *clist, gtk_clist_freeze (clist); /* unlink source row */ - clist_row = g_list_nth_data (clist->row_list, source_row); + clist_row = ROW_ELEMENT (clist, source_row)->data; if (source_row == clist->rows - 1) clist->row_list_end = clist->row_list_end->prev; clist->row_list = g_list_remove (clist->row_list, clist_row); @@ -3013,7 +3019,11 @@ gtk_clist_set_row_data_full (GtkCList *clist, if (row < 0 || row > (clist->rows - 1)) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; + + if (clist_row->destroy) + clist_row->destroy (clist_row->data); + clist_row->data = data; clist_row->destroy = destroy; } @@ -3030,7 +3040,7 @@ gtk_clist_get_row_data (GtkCList *clist, if (row < 0 || row > (clist->rows - 1)) return NULL; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; return clist_row->data; } @@ -3139,7 +3149,7 @@ gtk_clist_set_foreground (GtkCList *clist, if (row < 0 || row >= clist->rows) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (color) { @@ -3169,7 +3179,7 @@ gtk_clist_set_background (GtkCList *clist, if (row < 0 || row >= clist->rows) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (color) { @@ -3210,7 +3220,7 @@ gtk_clist_set_cell_style (GtkCList *clist, if (column < 0 || column >= clist->columns) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->cell[column].style == style) return; @@ -3262,7 +3272,7 @@ gtk_clist_get_cell_style (GtkCList *clist, if (row < 0 || row >= clist->rows || column < 0 || column >= clist->columns) return NULL; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; return clist_row->cell[column].style; } @@ -3283,7 +3293,7 @@ gtk_clist_set_row_style (GtkCList *clist, if (row < 0 || row >= clist->rows) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->style == style) return; @@ -3345,7 +3355,7 @@ gtk_clist_get_row_style (GtkCList *clist, if (row < 0 || row >= clist->rows) return NULL; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; return clist_row->style; } @@ -3372,7 +3382,7 @@ gtk_clist_set_selectable (GtkCList *clist, if (row < 0 || row >= clist->rows) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (selectable == clist_row->selectable) return; @@ -3403,7 +3413,7 @@ gtk_clist_get_selectable (GtkCList *clist, if (row < 0 || row >= clist->rows) return FALSE; - return GTK_CLIST_ROW (g_list_nth (clist->row_list, row))->selectable; + return GTK_CLIST_ROW (ROW_ELEMENT (clist, row))->selectable; } void @@ -3510,7 +3520,7 @@ toggle_row (GtkCList *clist, case GTK_SELECTION_EXTENDED: case GTK_SELECTION_MULTIPLE: case GTK_SELECTION_SINGLE: - clist_row = g_list_nth (clist->row_list, row)->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (!clist_row) return; @@ -3534,7 +3544,7 @@ fake_toggle_row (GtkCList *clist, { GList *work; - work = g_list_nth (clist->row_list, row); + work = ROW_ELEMENT (clist, row); if (!work || !GTK_CLIST_ROW (work)->selectable) return; @@ -3659,7 +3669,7 @@ real_select_row (GtkCList *clist, break; } - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->state != GTK_STATE_NORMAL || !clist_row->selectable) return; @@ -3694,7 +3704,7 @@ real_unselect_row (GtkCList *clist, if (row < 0 || row > (clist->rows - 1)) return; - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; if (clist_row->state == GTK_STATE_SELECTED) { @@ -3816,7 +3826,7 @@ fake_unselect_all (GtkCList *clist, GList *work; gint i; - if (row >= 0 && (work = g_list_nth (clist->row_list, row))) + if (row >= 0 && (work = ROW_ELEMENT (clist, row))) { if (GTK_CLIST_ROW (work)->state == GTK_STATE_NORMAL && GTK_CLIST_ROW (work)->selectable) @@ -3833,7 +3843,7 @@ fake_unselect_all (GtkCList *clist, clist->undo_selection = clist->selection; clist->selection = NULL; clist->selection_end = NULL; - + for (list = clist->undo_selection; list; list = list->next) { if ((i = GPOINTER_TO_INT (list->data)) == row || @@ -3860,8 +3870,7 @@ real_undo_selection (GtkCList *clist) clist->selection_mode != GTK_SELECTION_EXTENDED) return; - if (clist->anchor >= 0) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); if (!(clist->undo_selection || clist->undo_unselection)) { @@ -3943,7 +3952,10 @@ resync_selection (GtkCList *clist, GList *list; GtkCListRow *clist_row; - if (clist->anchor < 0) + if (clist->selection_mode != GTK_SELECTION_EXTENDED) + return; + + if (clist->anchor < 0 || clist->drag_pos < 0) return; gtk_clist_freeze (clist); @@ -4221,10 +4233,9 @@ end_selection (GtkCList *clist) g_return_if_fail (clist != NULL); g_return_if_fail (GTK_IS_CLIST (clist)); - if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_FOCUS(clist)) || - clist->anchor == -1) + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_FOCUS(clist)) return; - + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); } @@ -4281,8 +4292,7 @@ sync_selection (GtkCList *clist, clist->focus_row = clist->rows - 1; } - if (clist->selection_mode == GTK_SELECTION_BROWSE && clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -4687,9 +4697,7 @@ gtk_clist_unmap (GtkWidget *widget) { remove_grab (clist); - if (clist->anchor != -1 && - clist->selection_mode == GTK_SELECTION_EXTENDED) - GTK_CLIST_CLASS_FW (widget)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (widget)->resync_selection (clist, NULL); clist->click_cell.row = -1; clist->click_cell.column = -1; @@ -4989,9 +4997,12 @@ gtk_clist_button_press (GtkWidget *widget, case GTK_SELECTION_SINGLE: case GTK_SELECTION_MULTIPLE: if (event->type != GDK_BUTTON_PRESS) - gtk_signal_emit (GTK_OBJECT (clist), - clist_signals[SELECT_ROW], - row, column, event); + { + gtk_signal_emit (GTK_OBJECT (clist), + clist_signals[SELECT_ROW], + row, column, event); + clist->anchor = -1; + } else clist->anchor = row; break; @@ -5661,7 +5672,7 @@ draw_row (GtkCList *clist, /* if the function is passed the pointer to the row instead of null, * it avoids this expensive lookup */ if (!clist_row) - clist_row = (g_list_nth (clist->row_list, row))->data; + clist_row = ROW_ELEMENT (clist, row)->data; /* rectangle of the entire row */ row_rectangle.x = 0; @@ -5675,7 +5686,7 @@ draw_row (GtkCList *clist, cell_rectangle.width = row_rectangle.width; cell_rectangle.height = CELL_SPACING; - /* rectangle used to clip drawing operations, it's y and height + /* rectangle used to clip drawing operations, its y and height * positions only need to be set once, so we set them once here. * the x and width are set withing the drawing loop below once per * column */ @@ -5938,7 +5949,7 @@ draw_rows (GtkCList *clist, if (clist->rows == first_row) first_row--; - list = g_list_nth (clist->row_list, first_row); + list = ROW_ELEMENT (clist, first_row); i = first_row; while (list) { @@ -6682,8 +6693,7 @@ gtk_clist_focus_out (GtkWidget *widget, clist = GTK_CLIST (widget); - if (clist->anchor != -1 && clist->selection_mode == GTK_SELECTION_EXTENDED) - GTK_CLIST_CLASS_FW (widget)->resync_selection (clist, (GdkEvent *) event); + GTK_CLIST_CLASS_FW (widget)->resync_selection (clist, (GdkEvent *) event); return FALSE; } @@ -7877,9 +7887,7 @@ gtk_clist_set_button_actions (GtkCList *clist, clist->drag_button = 0; } - if (clist->anchor >= 0 && - clist->selection_mode == GTK_SELECTION_EXTENDED) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); clist->button_actions[button] = button_actions; } diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c index 01649495c..8532317b0 100644 --- a/gtk/gtkctree.c +++ b/gtk/gtkctree.c @@ -2055,8 +2055,7 @@ gtk_ctree_link (GtkCTree *ctree, if (update_focus_row && clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -2201,8 +2200,7 @@ gtk_ctree_unlink (GtkCTree *ctree, if (update_focus_row && clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -2384,8 +2382,7 @@ real_tree_move (GtkCTree *ctree, if (clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -2501,8 +2498,7 @@ real_tree_expand (GtkCTree *ctree, clist = GTK_CLIST (ctree); - if (clist->selection_mode == GTK_SELECTION_EXTENDED && clist->anchor >= 0) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); GTK_CTREE_ROW (node)->expanded = TRUE; level = GTK_CTREE_ROW (node)->level; @@ -2647,8 +2643,7 @@ real_tree_collapse (GtkCTree *ctree, clist = GTK_CLIST (ctree); - if (clist->selection_mode == GTK_SELECTION_EXTENDED && clist->anchor >= 0) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); GTK_CTREE_ROW (node)->expanded = FALSE; level = GTK_CTREE_ROW (node)->level; @@ -3248,7 +3243,15 @@ row_delete (GtkCTree *ctree, } if (ctree_row->row.destroy) - ctree_row->row.destroy (ctree_row->row.data); + { + GtkDestroyNotify dnotify = ctree_row->row.destroy; + gpointer ddata = ctree_row->row.data; + + ctree_row->row.destroy = NULL; + ctree_row->row.data = NULL; + + dnotify (ddata); + } g_mem_chunk_free (clist->cell_mem_chunk, ctree_row->row.cell); g_mem_chunk_free (clist->row_mem_chunk, ctree_row); @@ -4571,8 +4574,7 @@ gtk_ctree_real_select_recursive (GtkCTree *ctree, if (clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -5180,12 +5182,21 @@ gtk_ctree_node_set_row_data_full (GtkCTree *ctree, gpointer data, GtkDestroyNotify destroy) { + GtkDestroyNotify dnotify; + gpointer ddata; + g_return_if_fail (ctree != NULL); g_return_if_fail (GTK_IS_CTREE (ctree)); g_return_if_fail (node != NULL); + dnotify = GTK_CTREE_ROW (node)->row.destroy; + ddata = GTK_CTREE_ROW (node)->row.data; + GTK_CTREE_ROW (node)->row.data = data; GTK_CTREE_ROW (node)->row.destroy = destroy; + + if (dnotify) + dnotify (ddata); } gpointer @@ -5501,8 +5512,7 @@ gtk_ctree_sort_recursive (GtkCTree *ctree, if (clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -5550,8 +5560,7 @@ gtk_ctree_sort_node (GtkCTree *ctree, if (clist->selection_mode == GTK_SELECTION_EXTENDED) { - if (clist->anchor != -1) - GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); + GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL); g_list_free (clist->undo_selection); g_list_free (clist->undo_unselection); @@ -5633,7 +5642,10 @@ resync_selection (GtkCList *clist, GdkEvent *event) g_return_if_fail (clist != NULL); g_return_if_fail (GTK_IS_CTREE (clist)); - if (clist->anchor < 0) + if (clist->selection_mode != GTK_SELECTION_EXTENDED) + return; + + if (clist->anchor < 0 || clist->drag_pos < 0) return; ctree = GTK_CTREE (clist); @@ -6108,7 +6120,6 @@ gtk_ctree_drag_data_received (GtkWidget *widget, case GTK_CLIST_DRAG_NONE: break; case GTK_CLIST_DRAG_INTO: - g_print ("drag into\n"); if (check_drag (ctree, source_node, dest_node, dest_info.insert_pos)) gtk_ctree_move (ctree, source_node, dest_node, @@ -6116,7 +6127,6 @@ gtk_ctree_drag_data_received (GtkWidget *widget, g_dataset_remove_data (context, "gtk-clist-drag-dest"); break; case GTK_CLIST_DRAG_BEFORE: - g_print ("drag before\n"); if (check_drag (ctree, source_node, dest_node, dest_info.insert_pos)) gtk_ctree_move (ctree, source_node, @@ -6124,7 +6134,6 @@ gtk_ctree_drag_data_received (GtkWidget *widget, g_dataset_remove_data (context, "gtk-clist-drag-dest"); break; case GTK_CLIST_DRAG_AFTER: - g_print ("drag after\n"); if (check_drag (ctree, source_node, dest_node, dest_info.insert_pos)) gtk_ctree_move (ctree, source_node, diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index a6fd6e95d..43b19e47f 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -553,6 +553,17 @@ gtk_drag_get_event_actions (GdkEvent *event, *suggested_action = GDK_ACTION_LINK; } } + else + { + *possible_actions = actions; + + if (actions & GDK_ACTION_COPY) + *suggested_action = GDK_ACTION_COPY; + else if (actions & GDK_ACTION_MOVE) + *suggested_action = GDK_ACTION_MOVE; + else if (actions & GDK_ACTION_LINK) + *suggested_action = GDK_ACTION_LINK; + } return; } @@ -1680,13 +1691,12 @@ gtk_drag_begin (GtkWidget *widget, gtk_drag_get_event_actions (event, info->button, actions, &suggested_action, &possible_actions); - if (event) - info->cursor = gtk_drag_get_cursor (suggested_action); + info->cursor = gtk_drag_get_cursor (suggested_action); /* Set cur_x, cur_y here so if the "drag_begin" signal shows * the drag icon, it will be in the right place */ - if (event->type == GDK_MOTION_NOTIFY) + if (event && event->type == GDK_MOTION_NOTIFY) { info->cur_x = event->motion.x_root; info->cur_y = event->motion.y_root; @@ -1703,7 +1713,7 @@ gtk_drag_begin (GtkWidget *widget, gtk_signal_emit_by_name (GTK_OBJECT (widget), "drag_begin", info->context); - if (event->type == GDK_MOTION_NOTIFY) + if (event && event->type == GDK_MOTION_NOTIFY) gtk_drag_motion_cb (info->ipc_widget, (GdkEventMotion *)event, info); info->start_x = info->cur_x; diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index b6a93b1f8..6cc62ad2e 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -36,6 +36,8 @@ #define MIN_ENTRY_WIDTH 150 #define DRAW_TIMEOUT 20 + +/* If you are going to change this, see the note in entry_adjust_scroll */ #define INNER_BORDER 2 enum { @@ -907,6 +909,8 @@ gtk_entry_button_press (GtkWidget *widget, default: break; } + + return TRUE; } else if (event->type == GDK_BUTTON_PRESS) { @@ -930,6 +934,8 @@ gtk_entry_button_press (GtkWidget *widget, if (gdk_selection_owner_get (GDK_SELECTION_PRIMARY) == widget->window) gtk_selection_owner_set (NULL, GDK_SELECTION_PRIMARY, event->time); } + + return TRUE; } return FALSE; @@ -973,10 +979,14 @@ gtk_entry_button_release (GtkWidget *widget, if (gdk_selection_owner_get (GDK_SELECTION_PRIMARY) == widget->window) gtk_selection_owner_set (NULL, GDK_SELECTION_PRIMARY, event->time); } + + return TRUE; } else if (event->button == 3) { gtk_grab_remove (widget); + + return TRUE; } return FALSE; @@ -1007,7 +1017,7 @@ gtk_entry_motion_notify (GtkWidget *widget, entry_adjust_scroll (entry); gtk_entry_queue_draw (entry); - return FALSE; + return TRUE; } static gint @@ -1580,6 +1590,7 @@ entry_adjust_scroll (GtkEntry *entry) return; gdk_window_get_size (entry->text_area, &text_area_width, NULL); + text_area_width -= 2 * INNER_BORDER; /* Display as much text as we can */ max_offset = MAX(0, entry->char_offset[entry->text_length] - text_area_width); @@ -1587,14 +1598,23 @@ entry_adjust_scroll (GtkEntry *entry) if (entry->scroll_offset > max_offset) entry->scroll_offset = max_offset; - /* And make sure cursor is on screen */ + /* And make sure cursor is on screen. Note that the cursor is + * actually drawn one pixel into the INNER_BORDER space on + * the right, when the scroll is at the utmost right. This + * looks better to to me than confining the cursor inside the + * border entirely, though it means that the cursor gets one + * pixel closer to the the edge of the widget on the right than + * on the left. This might need changing if one changed + * INNER_BORDER from 2 to 1, as one would do on a + * small-screen-real-estate display. + */ xoffset = entry->char_offset[GTK_EDITABLE(entry)->current_pos]; xoffset -= entry->scroll_offset; if (xoffset < 0) entry->scroll_offset += xoffset; else if (xoffset > text_area_width) - entry->scroll_offset += xoffset - text_area_width + 1; + entry->scroll_offset += xoffset - text_area_width; gtk_widget_queue_draw (GTK_WIDGET (entry)); } diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index f39b9d763..11d85c3f0 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -1998,20 +1998,6 @@ open_ref_dir(gchar* text_to_complete, if (FALSE) ; #endif - else if (g_path_is_absolute (text_to_complete) || !cmpl_state->reference_dir) - { - char *root; - int rootlen; - - rootlen = g_path_skip_root (text_to_complete) - text_to_complete; - root = g_malloc (rootlen + 1); - memcpy (root, text_to_complete, rootlen); - root[rootlen] = '\0'; - new_dir = open_dir (root, cmpl_state); - if (new_dir) - *remaining_text = g_path_skip_root (text_to_complete); - g_free (root); - } #ifdef HAVE_PWD_H else if (text_to_complete[0] == '~') { @@ -2030,6 +2016,45 @@ open_ref_dir(gchar* text_to_complete, } } #endif + else if (g_path_is_absolute (text_to_complete) || !cmpl_state->reference_dir) + { + gchar *tmp = g_strdup(text_to_complete); + gchar *p; + + p = tmp; + while (*p && *p != '*' && *p != '?') + p++; + + *p = '\0'; + p = strrchr(tmp, G_DIR_SEPARATOR); + if (p) + { + if (p == tmp) + p++; + + *p = '\0'; + + new_dir = open_dir(tmp, cmpl_state); + + if(new_dir) + *remaining_text = text_to_complete + + ((p == tmp + 1) ? (p - tmp) : (p + 1 - tmp)); + } + else + { + /* If no possible candidates, use the cwd */ + gchar *curdir = g_get_current_dir (); + + new_dir = open_dir(curdir, cmpl_state); + + if (new_dir) + *remaining_text = text_to_complete; + + g_free (curdir); + } + + g_free (tmp); + } else { *remaining_text = text_to_complete; diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 8790c65b7..4c2318c2c 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -1760,6 +1760,7 @@ gtk_font_selection_load_font (GtkFontSelection *fontsel) { GdkFont *font; gchar *fontname, *label_text; + XFontStruct *xfs; if (fontsel->font) gdk_font_unref (fontsel->font); @@ -1777,6 +1778,16 @@ gtk_font_selection_load_font (GtkFontSelection *fontsel) #endif #ifndef GDK_WINDOWING_WIN32 font = gdk_font_load (fontname); + xfs = GDK_FONT_XFONT(font); + if (xfs->min_byte1 != 0 || xfs->max_byte1 != 0) + { + gchar *tmp_name; + + gdk_font_unref (font); + tmp_name = g_strconcat (fontname, ",*", NULL); + font = gdk_fontset_load (tmp_name); + g_free(tmp_name); + } #else /* Load as a fontset so that gtkentry uses wide chars for it */ font = gdk_fontset_load (fontname); @@ -1927,30 +1938,41 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel) #ifdef GDK_WINDOWING_X11 if (fontsel->font) { - font_atom = XInternAtom(GDK_DISPLAY(), "FONT", True); - if (font_atom != None) + font_atom = gdk_atom_intern ("FONT", FALSE); + + if (fontsel->font->type == GDK_FONT_FONTSET) + { + XFontStruct **font_structs; + gint num_fonts; + gchar **font_names; + + num_fonts = XFontsOfFontSet (GDK_FONT_XFONT(fontsel->font), + &font_structs, &font_names); + status = XGetFontProperty(font_structs[0], font_atom, &atom); + } + else { status = XGetFontProperty(GDK_FONT_XFONT(fontsel->font), font_atom, &atom); - if (status == True) + } + + if (status == True) + { + name = gdk_atom_name (atom); + gtk_entry_set_text (GTK_ENTRY (fontsel->actual_font_name), name); + + for (i = 0; i < GTK_XLFD_NUM_FIELDS; i++) { - name = XGetAtomName(GDK_DISPLAY(), atom); - gtk_entry_set_text(GTK_ENTRY(fontsel->actual_font_name), name); - - for (i = 0; i < GTK_XLFD_NUM_FIELDS; i++) - { - field = gtk_font_selection_get_xlfd_field (name, i, - field_buffer); - if (i == XLFD_SLANT) - field = gtk_font_selection_expand_slant_code(field); - else if (i == XLFD_SPACING) - field = gtk_font_selection_expand_spacing_code(field); - gtk_clist_set_text(GTK_CLIST(fontsel->info_clist), i, 2, - field ? field : ""); - } - shown_actual_fields = TRUE; - XFree(name); + field = gtk_font_selection_get_xlfd_field (name, i, field_buffer); + if (i == XLFD_SLANT) + field = gtk_font_selection_expand_slant_code(field); + else if (i == XLFD_SPACING) + field = gtk_font_selection_expand_spacing_code(field); + gtk_clist_set_text(GTK_CLIST(fontsel->info_clist), i, 2, + field ? field : ""); } + shown_actual_fields = TRUE; + g_free (name); } } #elif defined (GDK_WINDOWING_WIN32) diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 8f9cd035a..45e36ee7e 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -149,17 +149,16 @@ gtk_hpaned_size_allocate (GtkWidget *widget, GtkRequisition child2_requisition; GtkAllocation child1_allocation; GtkAllocation child2_allocation; - guint16 border_width; + gint border_width; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_HPANED (widget)); g_return_if_fail (allocation != NULL); widget->allocation = *allocation; - paned = GTK_PANED (widget); border_width = GTK_CONTAINER (paned)->border_width; - + if (paned->child1) gtk_widget_get_child_requisition (paned->child1, &child1_requisition); else @@ -171,9 +170,9 @@ gtk_hpaned_size_allocate (GtkWidget *widget, child2_requisition.width = 0; gtk_paned_compute_position (paned, - widget->allocation.width - - paned->handle_size - - 2 * border_width, + MAX (1, (gint) widget->allocation.width + - (gint) paned->handle_size + - 2 * border_width), child1_requisition.width, child2_requisition.width); @@ -182,7 +181,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget, paned->handle_xpos = paned->child1_size + border_width; paned->handle_ypos = border_width; paned->handle_width = paned->handle_size; - paned->handle_height = widget->allocation.height - 2 * border_width; + paned->handle_height = MAX (1, (gint) widget->allocation.height - 2 * border_width); if (GTK_WIDGET_REALIZED (widget)) { @@ -202,7 +201,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget, child1_allocation.width = paned->child1_size; child1_allocation.x = border_width; child1_allocation.y = child2_allocation.y = border_width; - + child2_allocation.x = child1_allocation.x + child1_allocation.width + paned->handle_width; child2_allocation.width = MAX (1, (gint) allocation->width - child2_allocation.x - border_width); diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c index e138ef1f1..51037cb57 100644 --- a/gtk/gtkhscale.c +++ b/gtk/gtkhscale.c @@ -476,6 +476,8 @@ gtk_hscale_pos_background (GtkHScale *hscale, *h -= theight; break; } + *w = MAX (*w, 0); + *h = MAX (*h, 0); } static void diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index c28c134f6..becef2c4c 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -722,8 +722,8 @@ gtk_main_do_event (GdkEvent *event) case GDK_DELETE: gtk_widget_ref (event_widget); - if (!gtk_widget_event (event_widget, event) && - !GTK_OBJECT_DESTROYED (event_widget)) + if ((!grabs || gtk_widget_get_toplevel (grabs->data) == event_widget) && + !gtk_widget_event (event_widget, event)) gtk_widget_destroy (event_widget); gtk_widget_unref (event_widget); break; diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h index 54ad58cd4..cd51c1e55 100644 --- a/gtk/gtkmenu.h +++ b/gtk/gtkmenu.h @@ -147,7 +147,6 @@ void gtk_menu_detach (GtkMenu *menu); */ GtkWidget* gtk_menu_get_attach_widget (GtkMenu *menu); -void gtk_menu_detach (GtkMenu *menu); void gtk_menu_set_tearoff_state (GtkMenu *menu, gboolean torn_off); diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index 0fe6c6b12..784a89fe8 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -494,7 +494,17 @@ gtk_menu_shell_button_release (GtkWidget *widget, } } else - deactivate = FALSE; + { + /* We only ever want to prevent deactivation on the first + * press/release. Setting the time to zero is a bit of a + * hack, since we could be being triggered in the first + * few fractions of a second after a server time wraparound. + * the chances of that happening are ~1/10^6, without + * serious harm if we lose. + */ + menu_shell->activate_time = 0; + deactivate = FALSE; + } /* If the button click was very fast, or we ended up on a submenu, * leave the menu up diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 2a3b0ff2a..676cade04 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -514,8 +514,8 @@ gtk_notebook_map (GtkWidget *widget) page = children->data; children = children->next; - if (page->tab_label && - GTK_WIDGET_VISIBLE (page->child) && + if (page->tab_label && + GTK_WIDGET_VISIBLE (page->tab_label) && !GTK_WIDGET_MAPPED (page->tab_label)) gtk_widget_map (page->tab_label); } @@ -803,6 +803,17 @@ gtk_notebook_size_request (GtkWidget *widget, } } } + else + { + for (children = notebook->children; children; + children = children->next) + { + page = children->data; + + if (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label)) + gtk_widget_hide (page->tab_label); + } + } } widget->requisition.width += GTK_CONTAINER (widget)->border_width * 2; diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index c3ea92ada..f5cff3bf4 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -637,6 +637,7 @@ gtk_option_menu_position (GtkMenu *menu, GtkOptionMenu *option_menu; GtkWidget *active; GtkWidget *child; + GtkRequisition requisition; GList *children; gint shift_menu; gint screen_width; @@ -651,8 +652,9 @@ gtk_option_menu_position (GtkMenu *menu, option_menu = GTK_OPTION_MENU (user_data); - width = GTK_WIDGET (menu)->allocation.width; - height = GTK_WIDGET (menu)->allocation.height; + gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); + width = requisition.width; + height = requisition.height; active = gtk_menu_get_active (GTK_MENU (option_menu->menu)); children = GTK_MENU_SHELL (option_menu->menu)->children; @@ -661,7 +663,10 @@ gtk_option_menu_position (GtkMenu *menu, menu_ypos += GTK_WIDGET (option_menu)->allocation.height / 2 - 2; if (active != NULL) - menu_ypos -= active->requisition.height / 2; + { + gtk_widget_get_child_requisition (active, &requisition); + menu_ypos -= requisition.height / 2; + } while (children) { @@ -671,7 +676,10 @@ gtk_option_menu_position (GtkMenu *menu, break; if (GTK_WIDGET_VISIBLE (child)) - menu_ypos -= child->allocation.height; + { + gtk_widget_get_child_requisition (child, &requisition); + menu_ypos -= requisition.height; + } children = children->next; } diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index e3b262d17..5022a094c 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -535,24 +535,25 @@ gtk_paned_compute_position(GtkPaned *paned, paned->max_position = allocation; if (!paned->child2_shrink) - paned->max_position -= child2_req; + paned->max_position = MAX (1, paned->max_position - child2_req); if (!paned->position_set) { if (paned->child1_resize && !paned->child2_resize) - paned->child1_size = allocation - child2_req; + paned->child1_size = MAX (1, allocation - child2_req); else if (!paned->child1_resize && paned->child2_resize) paned->child1_size = child1_req; + else if (child1_req + child2_req != 0) + paned->child1_size = allocation * ((gdouble)child1_req / (child1_req + child2_req)); else - paned->child1_size = allocation * ((gdouble) child1_req / - (child1_req + child2_req)); + paned->child1_size = allocation * 0.5; } else { /* If the position was set before the initial allocation. - * (paned->last_allocation < 0) just clamp it and leave it. + * (paned->last_allocation <= 0) just clamp it and leave it. */ - if (paned->last_allocation >= 0) + if (paned->last_allocation > 0) { if (paned->child1_resize && !paned->child2_resize) paned->child1_size += allocation - paned->last_allocation; diff --git a/gtk/gtkprogress.c b/gtk/gtkprogress.c index 885824588..8129bb41c 100644 --- a/gtk/gtkprogress.c +++ b/gtk/gtkprogress.c @@ -604,7 +604,7 @@ gtk_progress_set_text_alignment (GtkProgress *progress, void gtk_progress_set_format_string (GtkProgress *progress, - gchar *format) + const gchar *format) { g_return_if_fail (progress != NULL); g_return_if_fail (GTK_IS_PROGRESS (progress)); diff --git a/gtk/gtkprogress.h b/gtk/gtkprogress.h index b4bd959f6..5bf18f0ec 100644 --- a/gtk/gtkprogress.h +++ b/gtk/gtkprogress.h @@ -81,7 +81,7 @@ void gtk_progress_set_text_alignment (GtkProgress *progress, gfloat x_align, gfloat y_align); void gtk_progress_set_format_string (GtkProgress *progress, - gchar *format); + const gchar *format); void gtk_progress_set_adjustment (GtkProgress *progress, GtkAdjustment *adjustment); void gtk_progress_configure (GtkProgress *progress, diff --git a/gtk/gtkrc.bg b/gtk/gtkrc.bg index 5ba273e68..d0fc357d2 100644 --- a/gtk/gtkrc.bg +++ b/gtk/gtkrc.bg @@ -1,7 +1,7 @@ style "gtk-default-bg" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-microsoft-cp1251,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-microsoft-cp1251,\ -*-arial-medium-r-normal--12-*-*-*-*-*-microsoft-cp1251" } class "GtkWidget" style "gtk-default-bg" diff --git a/gtk/gtkrc.el b/gtk/gtkrc.el index b98fb68d8..1c63afaef 100644 --- a/gtk/gtkrc.el +++ b/gtk/gtkrc.el @@ -1,7 +1,7 @@ style "gtk-default-el" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-7,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-7,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-7" } class "GtkWidget" style "gtk-default-el" diff --git a/gtk/gtkrc.eo b/gtk/gtkrc.eo index 0956a2f99..fcadc4898 100644 --- a/gtk/gtkrc.eo +++ b/gtk/gtkrc.eo @@ -1,7 +1,7 @@ style "gtk-default-eo" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-3,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-3,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-3" } class "GtkWidget" style "gtk-default-eo" diff --git a/gtk/gtkrc.iso-8859-13 b/gtk/gtkrc.iso-8859-13 index ce5d5e96f..1ebd476af 100644 --- a/gtk/gtkrc.iso-8859-13 +++ b/gtk/gtkrc.iso-8859-13 @@ -1,7 +1,7 @@ style "gtk-default-iso-8859-13" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-13,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-13,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-13" } class "GtkWidget" style "gtk-default-iso-8859-13" diff --git a/gtk/gtkrc.iso-8859-14 b/gtk/gtkrc.iso-8859-14 index fcc1c7d08..c4c24203e 100644 --- a/gtk/gtkrc.iso-8859-14 +++ b/gtk/gtkrc.iso-8859-14 @@ -1,7 +1,7 @@ style "gtk-default-iso-8859-14" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-14,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-14,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-14" } class "GtkWidget" style "gtk-default-iso-8859-14" diff --git a/gtk/gtkrc.iso-8859-15 b/gtk/gtkrc.iso-8859-15 index 093426a53..4b51faf43 100644 --- a/gtk/gtkrc.iso-8859-15 +++ b/gtk/gtkrc.iso-8859-15 @@ -1,7 +1,7 @@ style "gtk-default-iso-8859-15" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-15,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-15,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-15" } class "GtkWidget" style "gtk-default-iso-8859-15" diff --git a/gtk/gtkrc.iso-8859-2 b/gtk/gtkrc.iso-8859-2 index 676d5fdc3..98c2fb441 100644 --- a/gtk/gtkrc.iso-8859-2 +++ b/gtk/gtkrc.iso-8859-2 @@ -6,8 +6,8 @@ style "gtk-default-iso-8859-2" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-2" } class "GtkWidget" style "gtk-default-iso-8859-2" diff --git a/gtk/gtkrc.iso-8859-5 b/gtk/gtkrc.iso-8859-5 index 6e324f158..c2c85bb0e 100644 --- a/gtk/gtkrc.iso-8859-5 +++ b/gtk/gtkrc.iso-8859-5 @@ -6,8 +6,8 @@ style "gtk-default-iso-8859-5" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-5,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-5,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-5" } class "GtkWidget" style "gtk-default-iso-8859-5" diff --git a/gtk/gtkrc.ru b/gtk/gtkrc.ru index 11259044a..d28b05059 100644 --- a/gtk/gtkrc.ru +++ b/gtk/gtkrc.ru @@ -11,8 +11,8 @@ style "gtk-default-ru" { fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-*,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -cronyx-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-r,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -cronyx-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-r,\ -*-arial-medium-r-normal--12-*-*-*-*-*-koi8-r" } class "GtkWidget" style "gtk-default-ru" diff --git a/gtk/gtkrc.tr b/gtk/gtkrc.tr index f6c17324f..6f83ab7e4 100644 --- a/gtk/gtkrc.tr +++ b/gtk/gtkrc.tr @@ -1,7 +1,7 @@ style "gtk-default-tr" { fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-9,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-9,\ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-9" } class "GtkWidget" style "gtk-default-tr" diff --git a/gtk/gtkrc.uk b/gtk/gtkrc.uk index a892125da..ffdb795c7 100644 --- a/gtk/gtkrc.uk +++ b/gtk/gtkrc.uk @@ -8,8 +8,8 @@ style "gtk-default-uk" { fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--14-*-*-*-*-*-koi8-u,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--14-*-*-*-*-*-koi8-u,\ -*-arial-medium-r-normal--14-*-*-*-*-*-koi8-u" } class "GtkWidget" style "gtk-default-uk" diff --git a/gtk/gtkrc.vi_VN.tcvn b/gtk/gtkrc.vi_VN.tcvn index ccba157dd..b3cd479ca 100644 --- a/gtk/gtkrc.vi_VN.tcvn +++ b/gtk/gtkrc.vi_VN.tcvn @@ -13,9 +13,9 @@ style "gtk-default-vi-vn-tcvn" { fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--14-*-*-*-*-*-tcvn-5712,\" - -*-arial-medium-r-normal--14-*-*-*-*-*-tcvn-5712,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--14-*-*-*-*-*-tcvn-5712,\ + -*-arial-medium-r-normal--14-*-*-*-*-*-tcvn-5712,\ -*-verdana-medium-r-normal--14-*-*-*-*-*-tcvn-5712" } class "GtkWidget" style "gtk-default-vi-vn-tcvn" diff --git a/gtk/gtkrc.vi_VN.viscii b/gtk/gtkrc.vi_VN.viscii index f25826703..58fffef79 100644 --- a/gtk/gtkrc.vi_VN.viscii +++ b/gtk/gtkrc.vi_VN.viscii @@ -12,9 +12,9 @@ style "gtk-default-vi-vn-viscii" { fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\ - -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\" - -*-helvetica-medium-r-normal--14-*-*-*-*-*-viscii1.1-1,\" - -*-arial-medium-r-normal--14-*-*-*-*-*-viscii1.1-1,\" + -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\ + -*-helvetica-medium-r-normal--14-*-*-*-*-*-viscii1.1-1,\ + -*-arial-medium-r-normal--14-*-*-*-*-*-viscii1.1-1,\ -*-verdana-medium-r-normal--14-*-*-*-*-*-viscii1.1-1" } class "GtkWidget" style "gtk-default-vi-vn-viscii" diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index deaebecca..e4cc0aada 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -307,7 +307,7 @@ gtk_scale_get_value_width (GtkScale *scale) digits = 13; i = 0; - if (range->adjustment->lower < 0) + if (range->adjustment->upper < 0) buffer[i++] = '-'; for (j = 0; j < digits; j++) buffer[i++] = '0'; diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 2e7b96924..a4529521f 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -656,18 +656,18 @@ gtk_scrolled_window_size_request (GtkWidget *widget, } if (scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC || - GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar)) + scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS) { requisition->width = MAX (requisition->width, hscrollbar_requisition.width); - if (!extra_height || GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar)) + if (!extra_height || scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS) extra_height = SCROLLBAR_SPACING (scrolled_window) + hscrollbar_requisition.height; } if (scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC || - GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)) + scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS) { requisition->height = MAX (requisition->height, vscrollbar_requisition.height); - if (!extra_width || GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar)) + if (!extra_height || scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS) extra_width = SCROLLBAR_SPACING (scrolled_window) + vscrollbar_requisition.width; } diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 8261e7158..15f7555dc 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -509,7 +509,8 @@ gtk_spin_button_size_allocate (GtkWidget *widget, g_return_if_fail (allocation != NULL); child_allocation = *allocation; - child_allocation.width -= ARROW_SIZE + 2 * widget->style->klass->xthickness; + if (child_allocation.width > ARROW_SIZE + 2 * widget->style->klass->xthickness) + child_allocation.width -= ARROW_SIZE + 2 * widget->style->klass->xthickness; GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, &child_allocation); diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 1efb032ee..b7f9ab98b 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -405,7 +405,7 @@ gtk_style_new (void) if (!default_font) { default_font = - gdk_font_load ("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"); + gdk_font_load ("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1"); if (!default_font) default_font = gdk_font_load ("fixed"); if (!default_font) @@ -450,8 +450,8 @@ gtk_style_new (void) style->base[i] = style->white; } - style->base[GTK_STATE_INSENSITIVE] = gtk_default_insensitive_bg; - style->text[GTK_STATE_INSENSITIVE] = gtk_default_insensitive_bg; + style->base[GTK_STATE_INSENSITIVE] = gtk_default_prelight_bg; + style->text[GTK_STATE_INSENSITIVE] = gtk_default_insensitive_fg; for (i = 0; i < 5; i++) style->bg_pixmap[i] = NULL; diff --git a/gtk/gtktable.c b/gtk/gtktable.c index 35037b1b1..e484479c8 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -1357,21 +1357,32 @@ gtk_table_size_allocate_pass1 (GtkTable *table) } } - /* Check to see if we were allocated less width than we requested. + /* Check to see if we were allocated less width than we requested, + * then shrink until we fit the size give. */ - if ((width > real_width) && (nshrink >= 1)) + if (width > real_width) { - width = width - real_width; - - for (col = 0; col < table->ncols; col++) - if (table->cols[col].shrink) - { - extra = width / nshrink; - table->cols[col].allocation = MAX (1, (gint)table->cols[col].allocation - extra); - - width -= extra; - nshrink -= 1; - } + gint total_nshrink = nshrink; + + extra = width - real_width; + while (total_nshrink > 0 && extra > 0) + { + nshrink = total_nshrink; + for (col = 0; col < table->ncols; col++) + if (table->cols[col].shrink) + { + gint allocation = table->cols[col].allocation; + + table->cols[col].allocation = MAX (1, (gint) table->cols[col].allocation - extra / nshrink); + extra -= allocation - table->cols[col].allocation; + nshrink -= 1; + if (table->cols[col].allocation < 2) + { + total_nshrink -= 1; + table->cols[col].shrink = FALSE; + } + } + } } } @@ -1436,20 +1447,31 @@ gtk_table_size_allocate_pass1 (GtkTable *table) } /* Check to see if we were allocated less height than we requested. + * then shrink until we fit the size give. */ - if ((height > real_height) && (nshrink >= 1)) + if (height > real_height) { - height = height - real_height; + gint total_nshrink = nshrink; - for (row = 0; row < table->nrows; row++) - if (table->rows[row].shrink) - { - extra = height / nshrink; - table->rows[row].allocation = MAX (1, (gint)table->rows[row].allocation - extra); - - height -= extra; - nshrink -= 1; - } + extra = height - real_height; + while (total_nshrink > 0 && extra > 0) + { + nshrink = total_nshrink; + for (row = 0; row < table->nrows; row++) + if (table->rows[row].shrink) + { + gint allocation = table->rows[row].allocation; + + table->rows[row].allocation = MAX (1, (gint) table->rows[row].allocation - extra / nshrink); + extra -= allocation - table->rows[row].allocation; + nshrink -= 1; + if (table->rows[row].allocation < 2) + { + total_nshrink -= 1; + table->rows[row].shrink = FALSE; + } + } + } } } } diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 7d8daf230..1da7b514d 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -207,6 +207,8 @@ static void gtk_text_realize (GtkWidget *widget); static void gtk_text_unrealize (GtkWidget *widget); static void gtk_text_style_set (GtkWidget *widget, GtkStyle *previous_style); +static void gtk_text_state_changed (GtkWidget *widget, + GtkStateType previous_state); static void gtk_text_draw_focus (GtkWidget *widget); static void gtk_text_size_request (GtkWidget *widget, GtkRequisition *requisition); @@ -566,6 +568,7 @@ gtk_text_class_init (GtkTextClass *class) widget_class->realize = gtk_text_realize; widget_class->unrealize = gtk_text_unrealize; widget_class->style_set = gtk_text_style_set; + widget_class->state_changed = gtk_text_state_changed; widget_class->draw_focus = gtk_text_draw_focus; widget_class->size_request = gtk_text_size_request; widget_class->size_allocate = gtk_text_size_allocate; @@ -1309,8 +1312,8 @@ gtk_text_realize (GtkWidget *widget) widget->style = gtk_style_attach (widget->style, widget->window); /* Can't call gtk_style_set_background here because it's handled specially */ - gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); - gdk_window_set_background (text->text_area, &widget->style->base[GTK_STATE_NORMAL]); + gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); + gdk_window_set_background (text->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); if (widget->style->bg_pixmap[GTK_STATE_NORMAL]) text->bg_gc = create_bg_gc (text); @@ -1405,19 +1408,15 @@ gtk_text_realize (GtkWidget *widget) } static void -gtk_text_style_set (GtkWidget *widget, - GtkStyle *previous_style) +gtk_text_style_set (GtkWidget *widget, + GtkStyle *previous_style) { - GtkText *text; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TEXT (widget)); - - text = GTK_TEXT (widget); + GtkText *text = GTK_TEXT (widget); + if (GTK_WIDGET_REALIZED (widget)) { - gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); - gdk_window_set_background (text->text_area, &widget->style->base[GTK_STATE_NORMAL]); + gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); + gdk_window_set_background (text->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); if (text->bg_gc) { @@ -1437,6 +1436,19 @@ gtk_text_style_set (GtkWidget *widget, } static void +gtk_text_state_changed (GtkWidget *widget, + GtkStateType previous_state) +{ + GtkText *text = GTK_TEXT (widget); + + if (GTK_WIDGET_REALIZED (widget)) + { + gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); + gdk_window_set_background (text->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); + } +} + +static void gtk_text_unrealize (GtkWidget *widget) { GtkText *text; @@ -4866,7 +4878,7 @@ draw_bg_rect (GtkText* text, GtkPropertyMark *mark, x, y, width, height); } else if (!gdk_color_equal(MARK_CURRENT_BACK (text, mark), - >K_WIDGET(text)->style->base[GTK_STATE_NORMAL])) + >K_WIDGET(text)->style->base[GTK_WIDGET_STATE (text)])) { gdk_gc_set_foreground (text->gc, MARK_CURRENT_BACK (text, mark)); diff --git a/gtk/gtkthemes.c b/gtk/gtkthemes.c index 4a5d484b0..571ec6574 100644 --- a/gtk/gtkthemes.c +++ b/gtk/gtkthemes.c @@ -65,7 +65,7 @@ static void gen_8_3_dll_name(gchar *name, gchar *fullname) #endif GtkThemeEngine* -gtk_theme_engine_get (gchar *name) +gtk_theme_engine_get (const gchar *name) { GtkThemeEnginePrivate *result; diff --git a/gtk/gtkthemes.h b/gtk/gtkthemes.h index e1c4a4723..a9903606b 100644 --- a/gtk/gtkthemes.h +++ b/gtk/gtkthemes.h @@ -32,6 +32,12 @@ #include <gtk/gtkstyle.h> #include <gtk/gtkwidget.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + struct _GtkThemeEngine { /* Fill in engine_data pointer in a GtkRcStyle by parsing contents * of brackets. Returns G_TOKEN_NONE if succesfull, otherwise returns @@ -77,19 +83,11 @@ struct _GtkThemeEngine { GtkStateType state_type); }; -GtkThemeEngine *gtk_theme_engine_get (gchar *name); +GtkThemeEngine *gtk_theme_engine_get (const gchar *name); void gtk_theme_engine_ref (GtkThemeEngine *engine); void gtk_theme_engine_unref (GtkThemeEngine *engine); -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -/* Initialization, exit, mainloop and miscellaneous routines - */ -void gtk_themes_init (int *argc, - char ***argv); -void gtk_themes_exit (gint error_code); #ifdef __cplusplus } diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index fafb94cc5..f66f18163 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -859,7 +859,7 @@ gtk_toolbar_insert_widget (GtkToolbar *toolbar, position); } -GtkWidget * +GtkWidget* gtk_toolbar_append_element (GtkToolbar *toolbar, GtkToolbarChildType type, GtkWidget *widget, diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c index d5e5a6a68..f8238a989 100644 --- a/gtk/gtktooltips.c +++ b/gtk/gtktooltips.c @@ -100,9 +100,6 @@ gtk_tooltips_init (GtkTooltips *tooltips) tooltips->tip_window = NULL; tooltips->active_tips_data = NULL; tooltips->tips_data_list = NULL; - tooltips->gc = NULL; - tooltips->foreground = NULL; - tooltips->background = NULL; tooltips->delay = DEFAULT_DELAY; tooltips->enabled = TRUE; @@ -167,12 +164,6 @@ gtk_tooltips_destroy (GtkObject *object) if (tooltips->tip_window) gtk_widget_destroy (tooltips->tip_window); - - if (tooltips->gc != NULL) - { - gdk_gc_destroy (tooltips->gc); - tooltips->gc = NULL; - } } void @@ -398,10 +389,8 @@ gtk_tooltips_set_colors (GtkTooltips *tooltips, { g_return_if_fail (tooltips != NULL); - if (background != NULL) - tooltips->foreground = foreground; - if (foreground != NULL) - tooltips->background = background; + g_warning ("gtk_tooltips_set_colors is deprecated and does nothing.\n" + "The colors for tooltips are now taken from the style."); } static gint diff --git a/gtk/gtktooltips.h b/gtk/gtktooltips.h index e270650c5..bd6c54ae9 100644 --- a/gtk/gtktooltips.h +++ b/gtk/gtktooltips.h @@ -67,10 +67,6 @@ struct _GtkTooltips GtkTooltipsData *active_tips_data; GList *tips_data_list; - GdkGC *gc; - GdkColor *foreground; - GdkColor *background; - guint delay : 30; guint enabled : 1; gint timer_tag; diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c index afcd8f46f..e174d6fb1 100644 --- a/gtk/gtktreeitem.c +++ b/gtk/gtktreeitem.c @@ -283,7 +283,7 @@ gtk_tree_item_new (void) } GtkWidget* -gtk_tree_item_new_with_label (gchar *label) +gtk_tree_item_new_with_label (const gchar *label) { GtkWidget *tree_item; GtkWidget *label_widget; diff --git a/gtk/gtktreeitem.h b/gtk/gtktreeitem.h index 3388cbbb8..ca780e4eb 100644 --- a/gtk/gtktreeitem.h +++ b/gtk/gtktreeitem.h @@ -75,7 +75,7 @@ struct _GtkTreeItemClass GtkType gtk_tree_item_get_type (void); GtkWidget* gtk_tree_item_new (void); -GtkWidget* gtk_tree_item_new_with_label (gchar *label); +GtkWidget* gtk_tree_item_new_with_label (const gchar *label); void gtk_tree_item_set_subtree (GtkTreeItem *tree_item, GtkWidget *subtree); void gtk_tree_item_remove_subtree (GtkTreeItem *tree_item); diff --git a/gtk/gtktypebuiltins_evals.c b/gtk/gtktypebuiltins_evals.c deleted file mode 100644 index 37657240f..000000000 --- a/gtk/gtktypebuiltins_evals.c +++ /dev/null @@ -1,1020 +0,0 @@ -/* Generated by makeenums.pl */ - -static const GtkEnumValue _gtk_accel_flags_values[] = { - { GTK_ACCEL_VISIBLE, "GTK_ACCEL_VISIBLE", "visible" }, - { GTK_ACCEL_SIGNAL_VISIBLE, "GTK_ACCEL_SIGNAL_VISIBLE", "signal-visible" }, - { GTK_ACCEL_LOCKED, "GTK_ACCEL_LOCKED", "locked" }, - { GTK_ACCEL_MASK, "GTK_ACCEL_MASK", "mask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_calendar_display_options_values[] = { - { GTK_CALENDAR_SHOW_HEADING, "GTK_CALENDAR_SHOW_HEADING", "show-heading" }, - { GTK_CALENDAR_SHOW_DAY_NAMES, "GTK_CALENDAR_SHOW_DAY_NAMES", "show-day-names" }, - { GTK_CALENDAR_NO_MONTH_CHANGE, "GTK_CALENDAR_NO_MONTH_CHANGE", "no-month-change" }, - { GTK_CALENDAR_SHOW_WEEK_NUMBERS, "GTK_CALENDAR_SHOW_WEEK_NUMBERS", "show-week-numbers" }, - { GTK_CALENDAR_WEEK_START_MONDAY, "GTK_CALENDAR_WEEK_START_MONDAY", "week-start-monday" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_cell_type_values[] = { - { GTK_CELL_EMPTY, "GTK_CELL_EMPTY", "empty" }, - { GTK_CELL_TEXT, "GTK_CELL_TEXT", "text" }, - { GTK_CELL_PIXMAP, "GTK_CELL_PIXMAP", "pixmap" }, - { GTK_CELL_PIXTEXT, "GTK_CELL_PIXTEXT", "pixtext" }, - { GTK_CELL_WIDGET, "GTK_CELL_WIDGET", "widget" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_clist_drag_pos_values[] = { - { GTK_CLIST_DRAG_NONE, "GTK_CLIST_DRAG_NONE", "none" }, - { GTK_CLIST_DRAG_BEFORE, "GTK_CLIST_DRAG_BEFORE", "before" }, - { GTK_CLIST_DRAG_INTO, "GTK_CLIST_DRAG_INTO", "into" }, - { GTK_CLIST_DRAG_AFTER, "GTK_CLIST_DRAG_AFTER", "after" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_button_action_values[] = { - { GTK_BUTTON_IGNORED, "GTK_BUTTON_IGNORED", "ignored" }, - { GTK_BUTTON_SELECTS, "GTK_BUTTON_SELECTS", "selects" }, - { GTK_BUTTON_DRAGS, "GTK_BUTTON_DRAGS", "drags" }, - { GTK_BUTTON_EXPANDS, "GTK_BUTTON_EXPANDS", "expands" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_ctree_pos_values[] = { - { GTK_CTREE_POS_BEFORE, "GTK_CTREE_POS_BEFORE", "before" }, - { GTK_CTREE_POS_AS_CHILD, "GTK_CTREE_POS_AS_CHILD", "as-child" }, - { GTK_CTREE_POS_AFTER, "GTK_CTREE_POS_AFTER", "after" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_ctree_line_style_values[] = { - { GTK_CTREE_LINES_NONE, "GTK_CTREE_LINES_NONE", "none" }, - { GTK_CTREE_LINES_SOLID, "GTK_CTREE_LINES_SOLID", "solid" }, - { GTK_CTREE_LINES_DOTTED, "GTK_CTREE_LINES_DOTTED", "dotted" }, - { GTK_CTREE_LINES_TABBED, "GTK_CTREE_LINES_TABBED", "tabbed" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_ctree_expander_style_values[] = { - { GTK_CTREE_EXPANDER_NONE, "GTK_CTREE_EXPANDER_NONE", "none" }, - { GTK_CTREE_EXPANDER_SQUARE, "GTK_CTREE_EXPANDER_SQUARE", "square" }, - { GTK_CTREE_EXPANDER_TRIANGLE, "GTK_CTREE_EXPANDER_TRIANGLE", "triangle" }, - { GTK_CTREE_EXPANDER_CIRCULAR, "GTK_CTREE_EXPANDER_CIRCULAR", "circular" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_ctree_expansion_type_values[] = { - { GTK_CTREE_EXPANSION_EXPAND, "GTK_CTREE_EXPANSION_EXPAND", "expand" }, - { GTK_CTREE_EXPANSION_EXPAND_RECURSIVE, "GTK_CTREE_EXPANSION_EXPAND_RECURSIVE", "expand-recursive" }, - { GTK_CTREE_EXPANSION_COLLAPSE, "GTK_CTREE_EXPANSION_COLLAPSE", "collapse" }, - { GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE, "GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE", "collapse-recursive" }, - { GTK_CTREE_EXPANSION_TOGGLE, "GTK_CTREE_EXPANSION_TOGGLE", "toggle" }, - { GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE, "GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE", "toggle-recursive" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_debug_flag_values[] = { - { GTK_DEBUG_OBJECTS, "GTK_DEBUG_OBJECTS", "objects" }, - { GTK_DEBUG_MISC, "GTK_DEBUG_MISC", "misc" }, - { GTK_DEBUG_SIGNALS, "GTK_DEBUG_SIGNALS", "signals" }, - { GTK_DEBUG_DND, "GTK_DEBUG_DND", "dnd" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_dest_defaults_values[] = { - { GTK_DEST_DEFAULT_MOTION, "GTK_DEST_DEFAULT_MOTION", "motion" }, - { GTK_DEST_DEFAULT_HIGHLIGHT, "GTK_DEST_DEFAULT_HIGHLIGHT", "highlight" }, - { GTK_DEST_DEFAULT_DROP, "GTK_DEST_DEFAULT_DROP", "drop" }, - { GTK_DEST_DEFAULT_ALL, "GTK_DEST_DEFAULT_ALL", "all" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_target_flags_values[] = { - { GTK_TARGET_SAME_APP, "GTK_TARGET_SAME_APP", "same-app" }, - { GTK_TARGET_SAME_WIDGET, "GTK_TARGET_SAME_WIDGET", "same-widget" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_arrow_type_values[] = { - { GTK_ARROW_UP, "GTK_ARROW_UP", "up" }, - { GTK_ARROW_DOWN, "GTK_ARROW_DOWN", "down" }, - { GTK_ARROW_LEFT, "GTK_ARROW_LEFT", "left" }, - { GTK_ARROW_RIGHT, "GTK_ARROW_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_attach_options_values[] = { - { GTK_EXPAND, "GTK_EXPAND", "expand" }, - { GTK_SHRINK, "GTK_SHRINK", "shrink" }, - { GTK_FILL, "GTK_FILL", "fill" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_button_box_style_values[] = { - { GTK_BUTTONBOX_DEFAULT_STYLE, "GTK_BUTTONBOX_DEFAULT_STYLE", "default-style" }, - { GTK_BUTTONBOX_SPREAD, "GTK_BUTTONBOX_SPREAD", "spread" }, - { GTK_BUTTONBOX_EDGE, "GTK_BUTTONBOX_EDGE", "edge" }, - { GTK_BUTTONBOX_START, "GTK_BUTTONBOX_START", "start" }, - { GTK_BUTTONBOX_END, "GTK_BUTTONBOX_END", "end" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_curve_type_values[] = { - { GTK_CURVE_TYPE_LINEAR, "GTK_CURVE_TYPE_LINEAR", "linear" }, - { GTK_CURVE_TYPE_SPLINE, "GTK_CURVE_TYPE_SPLINE", "spline" }, - { GTK_CURVE_TYPE_FREE, "GTK_CURVE_TYPE_FREE", "free" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_direction_type_values[] = { - { GTK_DIR_TAB_FORWARD, "GTK_DIR_TAB_FORWARD", "tab-forward" }, - { GTK_DIR_TAB_BACKWARD, "GTK_DIR_TAB_BACKWARD", "tab-backward" }, - { GTK_DIR_UP, "GTK_DIR_UP", "up" }, - { GTK_DIR_DOWN, "GTK_DIR_DOWN", "down" }, - { GTK_DIR_LEFT, "GTK_DIR_LEFT", "left" }, - { GTK_DIR_RIGHT, "GTK_DIR_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_justification_values[] = { - { GTK_JUSTIFY_LEFT, "GTK_JUSTIFY_LEFT", "left" }, - { GTK_JUSTIFY_RIGHT, "GTK_JUSTIFY_RIGHT", "right" }, - { GTK_JUSTIFY_CENTER, "GTK_JUSTIFY_CENTER", "center" }, - { GTK_JUSTIFY_FILL, "GTK_JUSTIFY_FILL", "fill" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_match_type_values[] = { - { GTK_MATCH_ALL, "GTK_MATCH_ALL", "all" }, - { GTK_MATCH_ALL_TAIL, "GTK_MATCH_ALL_TAIL", "all-tail" }, - { GTK_MATCH_HEAD, "GTK_MATCH_HEAD", "head" }, - { GTK_MATCH_TAIL, "GTK_MATCH_TAIL", "tail" }, - { GTK_MATCH_EXACT, "GTK_MATCH_EXACT", "exact" }, - { GTK_MATCH_LAST, "GTK_MATCH_LAST", "last" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_menu_direction_type_values[] = { - { GTK_MENU_DIR_PARENT, "GTK_MENU_DIR_PARENT", "parent" }, - { GTK_MENU_DIR_CHILD, "GTK_MENU_DIR_CHILD", "child" }, - { GTK_MENU_DIR_NEXT, "GTK_MENU_DIR_NEXT", "next" }, - { GTK_MENU_DIR_PREV, "GTK_MENU_DIR_PREV", "prev" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_menu_factory_type_values[] = { - { GTK_MENU_FACTORY_MENU, "GTK_MENU_FACTORY_MENU", "menu" }, - { GTK_MENU_FACTORY_MENU_BAR, "GTK_MENU_FACTORY_MENU_BAR", "menu-bar" }, - { GTK_MENU_FACTORY_OPTION_MENU, "GTK_MENU_FACTORY_OPTION_MENU", "option-menu" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_metric_type_values[] = { - { GTK_PIXELS, "GTK_PIXELS", "pixels" }, - { GTK_INCHES, "GTK_INCHES", "inches" }, - { GTK_CENTIMETERS, "GTK_CENTIMETERS", "centimeters" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_orientation_values[] = { - { GTK_ORIENTATION_HORIZONTAL, "GTK_ORIENTATION_HORIZONTAL", "horizontal" }, - { GTK_ORIENTATION_VERTICAL, "GTK_ORIENTATION_VERTICAL", "vertical" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_corner_type_values[] = { - { GTK_CORNER_TOP_LEFT, "GTK_CORNER_TOP_LEFT", "top-left" }, - { GTK_CORNER_BOTTOM_LEFT, "GTK_CORNER_BOTTOM_LEFT", "bottom-left" }, - { GTK_CORNER_TOP_RIGHT, "GTK_CORNER_TOP_RIGHT", "top-right" }, - { GTK_CORNER_BOTTOM_RIGHT, "GTK_CORNER_BOTTOM_RIGHT", "bottom-right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_pack_type_values[] = { - { GTK_PACK_START, "GTK_PACK_START", "start" }, - { GTK_PACK_END, "GTK_PACK_END", "end" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_path_priority_type_values[] = { - { GTK_PATH_PRIO_LOWEST, "GTK_PATH_PRIO_LOWEST", "lowest" }, - { GTK_PATH_PRIO_GTK, "GTK_PATH_PRIO_GTK", "gtk" }, - { GTK_PATH_PRIO_APPLICATION, "GTK_PATH_PRIO_APPLICATION", "application" }, - { GTK_PATH_PRIO_RC, "GTK_PATH_PRIO_RC", "rc" }, - { GTK_PATH_PRIO_HIGHEST, "GTK_PATH_PRIO_HIGHEST", "highest" }, - { GTK_PATH_PRIO_MASK, "GTK_PATH_PRIO_MASK", "mask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_path_type_values[] = { - { GTK_PATH_WIDGET, "GTK_PATH_WIDGET", "widget" }, - { GTK_PATH_WIDGET_CLASS, "GTK_PATH_WIDGET_CLASS", "widget-class" }, - { GTK_PATH_CLASS, "GTK_PATH_CLASS", "class" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_policy_type_values[] = { - { GTK_POLICY_ALWAYS, "GTK_POLICY_ALWAYS", "always" }, - { GTK_POLICY_AUTOMATIC, "GTK_POLICY_AUTOMATIC", "automatic" }, - { GTK_POLICY_NEVER, "GTK_POLICY_NEVER", "never" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_position_type_values[] = { - { GTK_POS_LEFT, "GTK_POS_LEFT", "left" }, - { GTK_POS_RIGHT, "GTK_POS_RIGHT", "right" }, - { GTK_POS_TOP, "GTK_POS_TOP", "top" }, - { GTK_POS_BOTTOM, "GTK_POS_BOTTOM", "bottom" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_preview_type_values[] = { - { GTK_PREVIEW_COLOR, "GTK_PREVIEW_COLOR", "color" }, - { GTK_PREVIEW_GRAYSCALE, "GTK_PREVIEW_GRAYSCALE", "grayscale" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_relief_style_values[] = { - { GTK_RELIEF_NORMAL, "GTK_RELIEF_NORMAL", "normal" }, - { GTK_RELIEF_HALF, "GTK_RELIEF_HALF", "half" }, - { GTK_RELIEF_NONE, "GTK_RELIEF_NONE", "none" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_resize_mode_values[] = { - { GTK_RESIZE_PARENT, "GTK_RESIZE_PARENT", "parent" }, - { GTK_RESIZE_QUEUE, "GTK_RESIZE_QUEUE", "queue" }, - { GTK_RESIZE_IMMEDIATE, "GTK_RESIZE_IMMEDIATE", "immediate" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_signal_run_type_values[] = { - { GTK_RUN_FIRST, "GTK_RUN_FIRST", "first" }, - { GTK_RUN_LAST, "GTK_RUN_LAST", "last" }, - { GTK_RUN_BOTH, "GTK_RUN_BOTH", "both" }, - { GTK_RUN_NO_RECURSE, "GTK_RUN_NO_RECURSE", "no-recurse" }, - { GTK_RUN_ACTION, "GTK_RUN_ACTION", "action" }, - { GTK_RUN_NO_HOOKS, "GTK_RUN_NO_HOOKS", "no-hooks" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_scroll_type_values[] = { - { GTK_SCROLL_NONE, "GTK_SCROLL_NONE", "none" }, - { GTK_SCROLL_STEP_BACKWARD, "GTK_SCROLL_STEP_BACKWARD", "step-backward" }, - { GTK_SCROLL_STEP_FORWARD, "GTK_SCROLL_STEP_FORWARD", "step-forward" }, - { GTK_SCROLL_PAGE_BACKWARD, "GTK_SCROLL_PAGE_BACKWARD", "page-backward" }, - { GTK_SCROLL_PAGE_FORWARD, "GTK_SCROLL_PAGE_FORWARD", "page-forward" }, - { GTK_SCROLL_JUMP, "GTK_SCROLL_JUMP", "jump" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_selection_mode_values[] = { - { GTK_SELECTION_SINGLE, "GTK_SELECTION_SINGLE", "single" }, - { GTK_SELECTION_BROWSE, "GTK_SELECTION_BROWSE", "browse" }, - { GTK_SELECTION_MULTIPLE, "GTK_SELECTION_MULTIPLE", "multiple" }, - { GTK_SELECTION_EXTENDED, "GTK_SELECTION_EXTENDED", "extended" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_shadow_type_values[] = { - { GTK_SHADOW_NONE, "GTK_SHADOW_NONE", "none" }, - { GTK_SHADOW_IN, "GTK_SHADOW_IN", "in" }, - { GTK_SHADOW_OUT, "GTK_SHADOW_OUT", "out" }, - { GTK_SHADOW_ETCHED_IN, "GTK_SHADOW_ETCHED_IN", "etched-in" }, - { GTK_SHADOW_ETCHED_OUT, "GTK_SHADOW_ETCHED_OUT", "etched-out" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_state_type_values[] = { - { GTK_STATE_NORMAL, "GTK_STATE_NORMAL", "normal" }, - { GTK_STATE_ACTIVE, "GTK_STATE_ACTIVE", "active" }, - { GTK_STATE_PRELIGHT, "GTK_STATE_PRELIGHT", "prelight" }, - { GTK_STATE_SELECTED, "GTK_STATE_SELECTED", "selected" }, - { GTK_STATE_INSENSITIVE, "GTK_STATE_INSENSITIVE", "insensitive" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_submenu_direction_values[] = { - { GTK_DIRECTION_LEFT, "GTK_DIRECTION_LEFT", "left" }, - { GTK_DIRECTION_RIGHT, "GTK_DIRECTION_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_submenu_placement_values[] = { - { GTK_TOP_BOTTOM, "GTK_TOP_BOTTOM", "top-bottom" }, - { GTK_LEFT_RIGHT, "GTK_LEFT_RIGHT", "left-right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_toolbar_style_values[] = { - { GTK_TOOLBAR_ICONS, "GTK_TOOLBAR_ICONS", "icons" }, - { GTK_TOOLBAR_TEXT, "GTK_TOOLBAR_TEXT", "text" }, - { GTK_TOOLBAR_BOTH, "GTK_TOOLBAR_BOTH", "both" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_trough_type_values[] = { - { GTK_TROUGH_NONE, "GTK_TROUGH_NONE", "none" }, - { GTK_TROUGH_START, "GTK_TROUGH_START", "start" }, - { GTK_TROUGH_END, "GTK_TROUGH_END", "end" }, - { GTK_TROUGH_JUMP, "GTK_TROUGH_JUMP", "jump" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_update_type_values[] = { - { GTK_UPDATE_CONTINUOUS, "GTK_UPDATE_CONTINUOUS", "continuous" }, - { GTK_UPDATE_DISCONTINUOUS, "GTK_UPDATE_DISCONTINUOUS", "discontinuous" }, - { GTK_UPDATE_DELAYED, "GTK_UPDATE_DELAYED", "delayed" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_visibility_values[] = { - { GTK_VISIBILITY_NONE, "GTK_VISIBILITY_NONE", "none" }, - { GTK_VISIBILITY_PARTIAL, "GTK_VISIBILITY_PARTIAL", "partial" }, - { GTK_VISIBILITY_FULL, "GTK_VISIBILITY_FULL", "full" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_window_position_values[] = { - { GTK_WIN_POS_NONE, "GTK_WIN_POS_NONE", "none" }, - { GTK_WIN_POS_CENTER, "GTK_WIN_POS_CENTER", "center" }, - { GTK_WIN_POS_MOUSE, "GTK_WIN_POS_MOUSE", "mouse" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_window_type_values[] = { - { GTK_WINDOW_TOPLEVEL, "GTK_WINDOW_TOPLEVEL", "toplevel" }, - { GTK_WINDOW_DIALOG, "GTK_WINDOW_DIALOG", "dialog" }, - { GTK_WINDOW_POPUP, "GTK_WINDOW_POPUP", "popup" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_sort_type_values[] = { - { GTK_SORT_ASCENDING, "GTK_SORT_ASCENDING", "ascending" }, - { GTK_SORT_DESCENDING, "GTK_SORT_DESCENDING", "descending" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_font_metric_type_values[] = { - { GTK_FONT_METRIC_PIXELS, "GTK_FONT_METRIC_PIXELS", "pixels" }, - { GTK_FONT_METRIC_POINTS, "GTK_FONT_METRIC_POINTS", "points" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_font_type_values[] = { - { GTK_FONT_BITMAP, "GTK_FONT_BITMAP", "bitmap" }, - { GTK_FONT_SCALABLE, "GTK_FONT_SCALABLE", "scalable" }, - { GTK_FONT_SCALABLE_BITMAP, "GTK_FONT_SCALABLE_BITMAP", "scalable-bitmap" }, - { GTK_FONT_ALL, "GTK_FONT_ALL", "all" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_font_filter_type_values[] = { - { GTK_FONT_FILTER_BASE, "GTK_FONT_FILTER_BASE", "base" }, - { GTK_FONT_FILTER_USER, "GTK_FONT_FILTER_USER", "user" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_object_flags_values[] = { - { GTK_DESTROYED, "GTK_DESTROYED", "destroyed" }, - { GTK_FLOATING, "GTK_FLOATING", "floating" }, - { GTK_CONNECTED, "GTK_CONNECTED", "connected" }, - { GTK_CONSTRUCTED, "GTK_CONSTRUCTED", "constructed" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_arg_flags_values[] = { - { GTK_ARG_READABLE, "GTK_ARG_READABLE", "readable" }, - { GTK_ARG_WRITABLE, "GTK_ARG_WRITABLE", "writable" }, - { GTK_ARG_CONSTRUCT, "GTK_ARG_CONSTRUCT", "construct" }, - { GTK_ARG_CONSTRUCT_ONLY, "GTK_ARG_CONSTRUCT_ONLY", "construct-only" }, - { GTK_ARG_CHILD_ARG, "GTK_ARG_CHILD_ARG", "child-arg" }, - { GTK_ARG_MASK, "GTK_ARG_MASK", "mask" }, - { GTK_ARG_READWRITE, "GTK_ARG_READWRITE", "readwrite" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_packer_options_values[] = { - { GTK_PACK_EXPAND, "GTK_PACK_EXPAND", "expand" }, - { GTK_FILL_X, "GTK_FILL_X", "fill-x" }, - { GTK_FILL_Y, "GTK_FILL_Y", "fill-y" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_side_type_values[] = { - { GTK_SIDE_TOP, "GTK_SIDE_TOP", "top" }, - { GTK_SIDE_BOTTOM, "GTK_SIDE_BOTTOM", "bottom" }, - { GTK_SIDE_LEFT, "GTK_SIDE_LEFT", "left" }, - { GTK_SIDE_RIGHT, "GTK_SIDE_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_anchor_type_values[] = { - { GTK_ANCHOR_CENTER, "GTK_ANCHOR_CENTER", "center" }, - { GTK_ANCHOR_NORTH, "GTK_ANCHOR_NORTH", "north" }, - { GTK_ANCHOR_NORTH_WEST, "GTK_ANCHOR_NORTH_WEST", "north-west" }, - { GTK_ANCHOR_NORTH_EAST, "GTK_ANCHOR_NORTH_EAST", "north-east" }, - { GTK_ANCHOR_SOUTH, "GTK_ANCHOR_SOUTH", "south" }, - { GTK_ANCHOR_SOUTH_WEST, "GTK_ANCHOR_SOUTH_WEST", "south-west" }, - { GTK_ANCHOR_SOUTH_EAST, "GTK_ANCHOR_SOUTH_EAST", "south-east" }, - { GTK_ANCHOR_WEST, "GTK_ANCHOR_WEST", "west" }, - { GTK_ANCHOR_EAST, "GTK_ANCHOR_EAST", "east" }, - { GTK_ANCHOR_N, "GTK_ANCHOR_N", "n" }, - { GTK_ANCHOR_NW, "GTK_ANCHOR_NW", "nw" }, - { GTK_ANCHOR_NE, "GTK_ANCHOR_NE", "ne" }, - { GTK_ANCHOR_S, "GTK_ANCHOR_S", "s" }, - { GTK_ANCHOR_SW, "GTK_ANCHOR_SW", "sw" }, - { GTK_ANCHOR_SE, "GTK_ANCHOR_SE", "se" }, - { GTK_ANCHOR_W, "GTK_ANCHOR_W", "w" }, - { GTK_ANCHOR_E, "GTK_ANCHOR_E", "e" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_private_flags_values[] = { - { PRIVATE_GTK_USER_STYLE, "PRIVATE_GTK_USER_STYLE", "user-style" }, - { PRIVATE_GTK_REDRAW_PENDING, "PRIVATE_GTK_REDRAW_PENDING", "redraw-pending" }, - { PRIVATE_GTK_RESIZE_PENDING, "PRIVATE_GTK_RESIZE_PENDING", "resize-pending" }, - { PRIVATE_GTK_RESIZE_NEEDED, "PRIVATE_GTK_RESIZE_NEEDED", "resize-needed" }, - { PRIVATE_GTK_LEAVE_PENDING, "PRIVATE_GTK_LEAVE_PENDING", "leave-pending" }, - { PRIVATE_GTK_HAS_SHAPE_MASK, "PRIVATE_GTK_HAS_SHAPE_MASK", "has-shape-mask" }, - { PRIVATE_GTK_IN_REPARENT, "PRIVATE_GTK_IN_REPARENT", "in-reparent" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_progress_bar_style_values[] = { - { GTK_PROGRESS_CONTINUOUS, "GTK_PROGRESS_CONTINUOUS", "continuous" }, - { GTK_PROGRESS_DISCRETE, "GTK_PROGRESS_DISCRETE", "discrete" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_progress_bar_orientation_values[] = { - { GTK_PROGRESS_LEFT_TO_RIGHT, "GTK_PROGRESS_LEFT_TO_RIGHT", "left-to-right" }, - { GTK_PROGRESS_RIGHT_TO_LEFT, "GTK_PROGRESS_RIGHT_TO_LEFT", "right-to-left" }, - { GTK_PROGRESS_BOTTOM_TO_TOP, "GTK_PROGRESS_BOTTOM_TO_TOP", "bottom-to-top" }, - { GTK_PROGRESS_TOP_TO_BOTTOM, "GTK_PROGRESS_TOP_TO_BOTTOM", "top-to-bottom" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_rc_flags_values[] = { - { GTK_RC_FG, "GTK_RC_FG", "fg" }, - { GTK_RC_BG, "GTK_RC_BG", "bg" }, - { GTK_RC_TEXT, "GTK_RC_TEXT", "text" }, - { GTK_RC_BASE, "GTK_RC_BASE", "base" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_rc_token_type_values[] = { - { GTK_RC_TOKEN_INVALID, "GTK_RC_TOKEN_INVALID", "invalid" }, - { GTK_RC_TOKEN_INCLUDE, "GTK_RC_TOKEN_INCLUDE", "include" }, - { GTK_RC_TOKEN_NORMAL, "GTK_RC_TOKEN_NORMAL", "normal" }, - { GTK_RC_TOKEN_ACTIVE, "GTK_RC_TOKEN_ACTIVE", "active" }, - { GTK_RC_TOKEN_PRELIGHT, "GTK_RC_TOKEN_PRELIGHT", "prelight" }, - { GTK_RC_TOKEN_SELECTED, "GTK_RC_TOKEN_SELECTED", "selected" }, - { GTK_RC_TOKEN_INSENSITIVE, "GTK_RC_TOKEN_INSENSITIVE", "insensitive" }, - { GTK_RC_TOKEN_FG, "GTK_RC_TOKEN_FG", "fg" }, - { GTK_RC_TOKEN_BG, "GTK_RC_TOKEN_BG", "bg" }, - { GTK_RC_TOKEN_BASE, "GTK_RC_TOKEN_BASE", "base" }, - { GTK_RC_TOKEN_TEXT, "GTK_RC_TOKEN_TEXT", "text" }, - { GTK_RC_TOKEN_FONT, "GTK_RC_TOKEN_FONT", "font" }, - { GTK_RC_TOKEN_FONTSET, "GTK_RC_TOKEN_FONTSET", "fontset" }, - { GTK_RC_TOKEN_BG_PIXMAP, "GTK_RC_TOKEN_BG_PIXMAP", "bg-pixmap" }, - { GTK_RC_TOKEN_PIXMAP_PATH, "GTK_RC_TOKEN_PIXMAP_PATH", "pixmap-path" }, - { GTK_RC_TOKEN_STYLE, "GTK_RC_TOKEN_STYLE", "style" }, - { GTK_RC_TOKEN_BINDING, "GTK_RC_TOKEN_BINDING", "binding" }, - { GTK_RC_TOKEN_BIND, "GTK_RC_TOKEN_BIND", "bind" }, - { GTK_RC_TOKEN_WIDGET, "GTK_RC_TOKEN_WIDGET", "widget" }, - { GTK_RC_TOKEN_WIDGET_CLASS, "GTK_RC_TOKEN_WIDGET_CLASS", "widget-class" }, - { GTK_RC_TOKEN_CLASS, "GTK_RC_TOKEN_CLASS", "class" }, - { GTK_RC_TOKEN_LOWEST, "GTK_RC_TOKEN_LOWEST", "lowest" }, - { GTK_RC_TOKEN_GTK, "GTK_RC_TOKEN_GTK", "gtk" }, - { GTK_RC_TOKEN_APPLICATION, "GTK_RC_TOKEN_APPLICATION", "application" }, - { GTK_RC_TOKEN_RC, "GTK_RC_TOKEN_RC", "rc" }, - { GTK_RC_TOKEN_HIGHEST, "GTK_RC_TOKEN_HIGHEST", "highest" }, - { GTK_RC_TOKEN_ENGINE, "GTK_RC_TOKEN_ENGINE", "engine" }, - { GTK_RC_TOKEN_MODULE_PATH, "GTK_RC_TOKEN_MODULE_PATH", "module-path" }, - { GTK_RC_TOKEN_LAST, "GTK_RC_TOKEN_LAST", "last" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_spin_button_update_policy_values[] = { - { GTK_UPDATE_ALWAYS, "GTK_UPDATE_ALWAYS", "always" }, - { GTK_UPDATE_IF_VALID, "GTK_UPDATE_IF_VALID", "if-valid" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_spin_type_values[] = { - { GTK_SPIN_STEP_FORWARD, "GTK_SPIN_STEP_FORWARD", "step-forward" }, - { GTK_SPIN_STEP_BACKWARD, "GTK_SPIN_STEP_BACKWARD", "step-backward" }, - { GTK_SPIN_PAGE_FORWARD, "GTK_SPIN_PAGE_FORWARD", "page-forward" }, - { GTK_SPIN_PAGE_BACKWARD, "GTK_SPIN_PAGE_BACKWARD", "page-backward" }, - { GTK_SPIN_HOME, "GTK_SPIN_HOME", "home" }, - { GTK_SPIN_END, "GTK_SPIN_END", "end" }, - { GTK_SPIN_USER_DEFINED, "GTK_SPIN_USER_DEFINED", "user-defined" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_toolbar_child_type_values[] = { - { GTK_TOOLBAR_CHILD_SPACE, "GTK_TOOLBAR_CHILD_SPACE", "space" }, - { GTK_TOOLBAR_CHILD_BUTTON, "GTK_TOOLBAR_CHILD_BUTTON", "button" }, - { GTK_TOOLBAR_CHILD_TOGGLEBUTTON, "GTK_TOOLBAR_CHILD_TOGGLEBUTTON", "togglebutton" }, - { GTK_TOOLBAR_CHILD_RADIOBUTTON, "GTK_TOOLBAR_CHILD_RADIOBUTTON", "radiobutton" }, - { GTK_TOOLBAR_CHILD_WIDGET, "GTK_TOOLBAR_CHILD_WIDGET", "widget" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_toolbar_space_style_values[] = { - { GTK_TOOLBAR_SPACE_EMPTY, "GTK_TOOLBAR_SPACE_EMPTY", "empty" }, - { GTK_TOOLBAR_SPACE_LINE, "GTK_TOOLBAR_SPACE_LINE", "line" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_tree_view_mode_values[] = { - { GTK_TREE_VIEW_LINE, "GTK_TREE_VIEW_LINE", "line" }, - { GTK_TREE_VIEW_ITEM, "GTK_TREE_VIEW_ITEM", "item" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_fundamental_type_values[] = { - { GTK_TYPE_INVALID, "GTK_TYPE_INVALID", "invalid" }, - { GTK_TYPE_NONE, "GTK_TYPE_NONE", "none" }, - { GTK_TYPE_CHAR, "GTK_TYPE_CHAR", "char" }, - { GTK_TYPE_UCHAR, "GTK_TYPE_UCHAR", "uchar" }, - { GTK_TYPE_BOOL, "GTK_TYPE_BOOL", "bool" }, - { GTK_TYPE_INT, "GTK_TYPE_INT", "int" }, - { GTK_TYPE_UINT, "GTK_TYPE_UINT", "uint" }, - { GTK_TYPE_LONG, "GTK_TYPE_LONG", "long" }, - { GTK_TYPE_ULONG, "GTK_TYPE_ULONG", "ulong" }, - { GTK_TYPE_FLOAT, "GTK_TYPE_FLOAT", "float" }, - { GTK_TYPE_DOUBLE, "GTK_TYPE_DOUBLE", "double" }, - { GTK_TYPE_STRING, "GTK_TYPE_STRING", "string" }, - { GTK_TYPE_ENUM, "GTK_TYPE_ENUM", "enum" }, - { GTK_TYPE_FLAGS, "GTK_TYPE_FLAGS", "flags" }, - { GTK_TYPE_BOXED, "GTK_TYPE_BOXED", "boxed" }, - { GTK_TYPE_POINTER, "GTK_TYPE_POINTER", "pointer" }, - { GTK_TYPE_SIGNAL, "GTK_TYPE_SIGNAL", "signal" }, - { GTK_TYPE_ARGS, "GTK_TYPE_ARGS", "args" }, - { GTK_TYPE_CALLBACK, "GTK_TYPE_CALLBACK", "callback" }, - { GTK_TYPE_C_CALLBACK, "GTK_TYPE_C_CALLBACK", "c-callback" }, - { GTK_TYPE_FOREIGN, "GTK_TYPE_FOREIGN", "foreign" }, - { GTK_TYPE_OBJECT, "GTK_TYPE_OBJECT", "object" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gtk_widget_flags_values[] = { - { GTK_TOPLEVEL, "GTK_TOPLEVEL", "toplevel" }, - { GTK_NO_WINDOW, "GTK_NO_WINDOW", "no-window" }, - { GTK_REALIZED, "GTK_REALIZED", "realized" }, - { GTK_MAPPED, "GTK_MAPPED", "mapped" }, - { GTK_VISIBLE, "GTK_VISIBLE", "visible" }, - { GTK_SENSITIVE, "GTK_SENSITIVE", "sensitive" }, - { GTK_PARENT_SENSITIVE, "GTK_PARENT_SENSITIVE", "parent-sensitive" }, - { GTK_CAN_FOCUS, "GTK_CAN_FOCUS", "can-focus" }, - { GTK_HAS_FOCUS, "GTK_HAS_FOCUS", "has-focus" }, - { GTK_CAN_DEFAULT, "GTK_CAN_DEFAULT", "can-default" }, - { GTK_HAS_DEFAULT, "GTK_HAS_DEFAULT", "has-default" }, - { GTK_HAS_GRAB, "GTK_HAS_GRAB", "has-grab" }, - { GTK_RC_STYLE, "GTK_RC_STYLE", "rc-style" }, - { GTK_COMPOSITE_CHILD, "GTK_COMPOSITE_CHILD", "composite-child" }, - { GTK_NO_REPARENT, "GTK_NO_REPARENT", "no-reparent" }, - { GTK_APP_PAINTABLE, "GTK_APP_PAINTABLE", "app-paintable" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_window_type_values[] = { - { GDK_WINDOW_ROOT, "GDK_WINDOW_ROOT", "root" }, - { GDK_WINDOW_TOPLEVEL, "GDK_WINDOW_TOPLEVEL", "toplevel" }, - { GDK_WINDOW_CHILD, "GDK_WINDOW_CHILD", "child" }, - { GDK_WINDOW_DIALOG, "GDK_WINDOW_DIALOG", "dialog" }, - { GDK_WINDOW_TEMP, "GDK_WINDOW_TEMP", "temp" }, - { GDK_WINDOW_PIXMAP, "GDK_WINDOW_PIXMAP", "pixmap" }, - { GDK_WINDOW_FOREIGN, "GDK_WINDOW_FOREIGN", "foreign" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_window_class_values[] = { - { GDK_INPUT_OUTPUT, "GDK_INPUT_OUTPUT", "output" }, - { GDK_INPUT_ONLY, "GDK_INPUT_ONLY", "only" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_image_type_values[] = { - { GDK_IMAGE_NORMAL, "GDK_IMAGE_NORMAL", "normal" }, - { GDK_IMAGE_SHARED, "GDK_IMAGE_SHARED", "shared" }, - { GDK_IMAGE_FASTEST, "GDK_IMAGE_FASTEST", "fastest" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_visual_type_values[] = { - { GDK_VISUAL_STATIC_GRAY, "GDK_VISUAL_STATIC_GRAY", "static-gray" }, - { GDK_VISUAL_GRAYSCALE, "GDK_VISUAL_GRAYSCALE", "grayscale" }, - { GDK_VISUAL_STATIC_COLOR, "GDK_VISUAL_STATIC_COLOR", "static-color" }, - { GDK_VISUAL_PSEUDO_COLOR, "GDK_VISUAL_PSEUDO_COLOR", "pseudo-color" }, - { GDK_VISUAL_TRUE_COLOR, "GDK_VISUAL_TRUE_COLOR", "true-color" }, - { GDK_VISUAL_DIRECT_COLOR, "GDK_VISUAL_DIRECT_COLOR", "direct-color" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_font_type_values[] = { - { GDK_FONT_FONT, "GDK_FONT_FONT", "font" }, - { GDK_FONT_FONTSET, "GDK_FONT_FONTSET", "fontset" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_window_attributes_type_values[] = { - { GDK_WA_TITLE, "GDK_WA_TITLE", "title" }, - { GDK_WA_X, "GDK_WA_X", "x" }, - { GDK_WA_Y, "GDK_WA_Y", "y" }, - { GDK_WA_CURSOR, "GDK_WA_CURSOR", "cursor" }, - { GDK_WA_COLORMAP, "GDK_WA_COLORMAP", "colormap" }, - { GDK_WA_VISUAL, "GDK_WA_VISUAL", "visual" }, - { GDK_WA_WMCLASS, "GDK_WA_WMCLASS", "wmclass" }, - { GDK_WA_NOREDIR, "GDK_WA_NOREDIR", "noredir" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_window_hints_values[] = { - { GDK_HINT_POS, "GDK_HINT_POS", "pos" }, - { GDK_HINT_MIN_SIZE, "GDK_HINT_MIN_SIZE", "min-size" }, - { GDK_HINT_MAX_SIZE, "GDK_HINT_MAX_SIZE", "max-size" }, - { GDK_HINT_BASE_SIZE, "GDK_HINT_BASE_SIZE", "base-size" }, - { GDK_HINT_ASPECT, "GDK_HINT_ASPECT", "aspect" }, - { GDK_HINT_RESIZE_INC, "GDK_HINT_RESIZE_INC", "resize-inc" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_function_values[] = { - { GDK_COPY, "GDK_COPY", "copy" }, - { GDK_INVERT, "GDK_INVERT", "invert" }, - { GDK_XOR, "GDK_XOR", "xor" }, - { GDK_CLEAR, "GDK_CLEAR", "clear" }, - { GDK_AND, "GDK_AND", "and" }, - { GDK_AND_REVERSE, "GDK_AND_REVERSE", "and-reverse" }, - { GDK_AND_INVERT, "GDK_AND_INVERT", "and-invert" }, - { GDK_NOOP, "GDK_NOOP", "noop" }, - { GDK_OR, "GDK_OR", "or" }, - { GDK_EQUIV, "GDK_EQUIV", "equiv" }, - { GDK_OR_REVERSE, "GDK_OR_REVERSE", "or-reverse" }, - { GDK_COPY_INVERT, "GDK_COPY_INVERT", "copy-invert" }, - { GDK_OR_INVERT, "GDK_OR_INVERT", "or-invert" }, - { GDK_NAND, "GDK_NAND", "nand" }, - { GDK_SET, "GDK_SET", "set" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_fill_values[] = { - { GDK_SOLID, "GDK_SOLID", "solid" }, - { GDK_TILED, "GDK_TILED", "tiled" }, - { GDK_STIPPLED, "GDK_STIPPLED", "stippled" }, - { GDK_OPAQUE_STIPPLED, "GDK_OPAQUE_STIPPLED", "opaque-stippled" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_fill_rule_values[] = { - { GDK_EVEN_ODD_RULE, "GDK_EVEN_ODD_RULE", "even-odd-rule" }, - { GDK_WINDING_RULE, "GDK_WINDING_RULE", "winding-rule" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_line_style_values[] = { - { GDK_LINE_SOLID, "GDK_LINE_SOLID", "solid" }, - { GDK_LINE_ON_OFF_DASH, "GDK_LINE_ON_OFF_DASH", "on-off-dash" }, - { GDK_LINE_DOUBLE_DASH, "GDK_LINE_DOUBLE_DASH", "double-dash" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_cap_style_values[] = { - { GDK_CAP_NOT_LAST, "GDK_CAP_NOT_LAST", "not-last" }, - { GDK_CAP_BUTT, "GDK_CAP_BUTT", "butt" }, - { GDK_CAP_ROUND, "GDK_CAP_ROUND", "round" }, - { GDK_CAP_PROJECTING, "GDK_CAP_PROJECTING", "projecting" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_join_style_values[] = { - { GDK_JOIN_MITER, "GDK_JOIN_MITER", "miter" }, - { GDK_JOIN_ROUND, "GDK_JOIN_ROUND", "round" }, - { GDK_JOIN_BEVEL, "GDK_JOIN_BEVEL", "bevel" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_cursor_type_values[] = { - { GDK_NUM_GLYPHS, "GDK_NUM_GLYPHS", "num-glyphs" }, - { GDK_X_CURSOR, "GDK_X_CURSOR", "x-cursor" }, - { GDK_ARROW, "GDK_ARROW", "arrow" }, - { GDK_BASED_ARROW_DOWN, "GDK_BASED_ARROW_DOWN", "based-arrow-down" }, - { GDK_BASED_ARROW_UP, "GDK_BASED_ARROW_UP", "based-arrow-up" }, - { GDK_BOAT, "GDK_BOAT", "boat" }, - { GDK_BOGOSITY, "GDK_BOGOSITY", "bogosity" }, - { GDK_BOTTOM_LEFT_CORNER, "GDK_BOTTOM_LEFT_CORNER", "bottom-left-corner" }, - { GDK_BOTTOM_RIGHT_CORNER, "GDK_BOTTOM_RIGHT_CORNER", "bottom-right-corner" }, - { GDK_BOTTOM_SIDE, "GDK_BOTTOM_SIDE", "bottom-side" }, - { GDK_BOTTOM_TEE, "GDK_BOTTOM_TEE", "bottom-tee" }, - { GDK_BOX_SPIRAL, "GDK_BOX_SPIRAL", "box-spiral" }, - { GDK_CENTER_PTR, "GDK_CENTER_PTR", "center-ptr" }, - { GDK_CIRCLE, "GDK_CIRCLE", "circle" }, - { GDK_CLOCK, "GDK_CLOCK", "clock" }, - { GDK_COFFEE_MUG, "GDK_COFFEE_MUG", "coffee-mug" }, - { GDK_CROSS, "GDK_CROSS", "cross" }, - { GDK_CROSS_REVERSE, "GDK_CROSS_REVERSE", "cross-reverse" }, - { GDK_CROSSHAIR, "GDK_CROSSHAIR", "crosshair" }, - { GDK_DIAMOND_CROSS, "GDK_DIAMOND_CROSS", "diamond-cross" }, - { GDK_DOT, "GDK_DOT", "dot" }, - { GDK_DOTBOX, "GDK_DOTBOX", "dotbox" }, - { GDK_DOUBLE_ARROW, "GDK_DOUBLE_ARROW", "double-arrow" }, - { GDK_DRAFT_LARGE, "GDK_DRAFT_LARGE", "draft-large" }, - { GDK_DRAFT_SMALL, "GDK_DRAFT_SMALL", "draft-small" }, - { GDK_DRAPED_BOX, "GDK_DRAPED_BOX", "draped-box" }, - { GDK_EXCHANGE, "GDK_EXCHANGE", "exchange" }, - { GDK_FLEUR, "GDK_FLEUR", "fleur" }, - { GDK_GOBBLER, "GDK_GOBBLER", "gobbler" }, - { GDK_GUMBY, "GDK_GUMBY", "gumby" }, - { GDK_HAND1, "GDK_HAND1", "hand1" }, - { GDK_HAND2, "GDK_HAND2", "hand2" }, - { GDK_HEART, "GDK_HEART", "heart" }, - { GDK_ICON, "GDK_ICON", "icon" }, - { GDK_IRON_CROSS, "GDK_IRON_CROSS", "iron-cross" }, - { GDK_LEFT_PTR, "GDK_LEFT_PTR", "left-ptr" }, - { GDK_LEFT_SIDE, "GDK_LEFT_SIDE", "left-side" }, - { GDK_LEFT_TEE, "GDK_LEFT_TEE", "left-tee" }, - { GDK_LEFTBUTTON, "GDK_LEFTBUTTON", "leftbutton" }, - { GDK_LL_ANGLE, "GDK_LL_ANGLE", "ll-angle" }, - { GDK_LR_ANGLE, "GDK_LR_ANGLE", "lr-angle" }, - { GDK_MAN, "GDK_MAN", "man" }, - { GDK_MIDDLEBUTTON, "GDK_MIDDLEBUTTON", "middlebutton" }, - { GDK_MOUSE, "GDK_MOUSE", "mouse" }, - { GDK_PENCIL, "GDK_PENCIL", "pencil" }, - { GDK_PIRATE, "GDK_PIRATE", "pirate" }, - { GDK_PLUS, "GDK_PLUS", "plus" }, - { GDK_QUESTION_ARROW, "GDK_QUESTION_ARROW", "question-arrow" }, - { GDK_RIGHT_PTR, "GDK_RIGHT_PTR", "right-ptr" }, - { GDK_RIGHT_SIDE, "GDK_RIGHT_SIDE", "right-side" }, - { GDK_RIGHT_TEE, "GDK_RIGHT_TEE", "right-tee" }, - { GDK_RIGHTBUTTON, "GDK_RIGHTBUTTON", "rightbutton" }, - { GDK_RTL_LOGO, "GDK_RTL_LOGO", "rtl-logo" }, - { GDK_SAILBOAT, "GDK_SAILBOAT", "sailboat" }, - { GDK_SB_DOWN_ARROW, "GDK_SB_DOWN_ARROW", "sb-down-arrow" }, - { GDK_SB_H_DOUBLE_ARROW, "GDK_SB_H_DOUBLE_ARROW", "sb-h-double-arrow" }, - { GDK_SB_LEFT_ARROW, "GDK_SB_LEFT_ARROW", "sb-left-arrow" }, - { GDK_SB_RIGHT_ARROW, "GDK_SB_RIGHT_ARROW", "sb-right-arrow" }, - { GDK_SB_UP_ARROW, "GDK_SB_UP_ARROW", "sb-up-arrow" }, - { GDK_SB_V_DOUBLE_ARROW, "GDK_SB_V_DOUBLE_ARROW", "sb-v-double-arrow" }, - { GDK_SHUTTLE, "GDK_SHUTTLE", "shuttle" }, - { GDK_SIZING, "GDK_SIZING", "sizing" }, - { GDK_SPIDER, "GDK_SPIDER", "spider" }, - { GDK_SPRAYCAN, "GDK_SPRAYCAN", "spraycan" }, - { GDK_STAR, "GDK_STAR", "star" }, - { GDK_TARGET, "GDK_TARGET", "target" }, - { GDK_TCROSS, "GDK_TCROSS", "tcross" }, - { GDK_TOP_LEFT_ARROW, "GDK_TOP_LEFT_ARROW", "top-left-arrow" }, - { GDK_TOP_LEFT_CORNER, "GDK_TOP_LEFT_CORNER", "top-left-corner" }, - { GDK_TOP_RIGHT_CORNER, "GDK_TOP_RIGHT_CORNER", "top-right-corner" }, - { GDK_TOP_SIDE, "GDK_TOP_SIDE", "top-side" }, - { GDK_TOP_TEE, "GDK_TOP_TEE", "top-tee" }, - { GDK_TREK, "GDK_TREK", "trek" }, - { GDK_UL_ANGLE, "GDK_UL_ANGLE", "ul-angle" }, - { GDK_UMBRELLA, "GDK_UMBRELLA", "umbrella" }, - { GDK_UR_ANGLE, "GDK_UR_ANGLE", "ur-angle" }, - { GDK_WATCH, "GDK_WATCH", "watch" }, - { GDK_XTERM, "GDK_XTERM", "xterm" }, - { GDK_LAST_CURSOR, "GDK_LAST_CURSOR", "last-cursor" }, - { GDK_CURSOR_IS_PIXMAP, "GDK_CURSOR_IS_PIXMAP", "cursor-is-pixmap" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_filter_return_values[] = { - { GDK_FILTER_CONTINUE, "GDK_FILTER_CONTINUE", "continue" }, - { GDK_FILTER_TRANSLATE, "GDK_FILTER_TRANSLATE", "translate" }, - { GDK_FILTER_REMOVE, "GDK_FILTER_REMOVE", "remove" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_visibility_state_values[] = { - { GDK_VISIBILITY_UNOBSCURED, "GDK_VISIBILITY_UNOBSCURED", "unobscured" }, - { GDK_VISIBILITY_PARTIAL, "GDK_VISIBILITY_PARTIAL", "partial" }, - { GDK_VISIBILITY_FULLY_OBSCURED, "GDK_VISIBILITY_FULLY_OBSCURED", "fully-obscured" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_event_type_values[] = { - { GDK_NOTHING, "GDK_NOTHING", "nothing" }, - { GDK_DELETE, "GDK_DELETE", "delete" }, - { GDK_DESTROY, "GDK_DESTROY", "destroy" }, - { GDK_EXPOSE, "GDK_EXPOSE", "expose" }, - { GDK_MOTION_NOTIFY, "GDK_MOTION_NOTIFY", "motion-notify" }, - { GDK_BUTTON_PRESS, "GDK_BUTTON_PRESS", "button-press" }, - { GDK_2BUTTON_PRESS, "GDK_2BUTTON_PRESS", "2button-press" }, - { GDK_3BUTTON_PRESS, "GDK_3BUTTON_PRESS", "3button-press" }, - { GDK_BUTTON_RELEASE, "GDK_BUTTON_RELEASE", "button-release" }, - { GDK_KEY_PRESS, "GDK_KEY_PRESS", "key-press" }, - { GDK_KEY_RELEASE, "GDK_KEY_RELEASE", "key-release" }, - { GDK_ENTER_NOTIFY, "GDK_ENTER_NOTIFY", "enter-notify" }, - { GDK_LEAVE_NOTIFY, "GDK_LEAVE_NOTIFY", "leave-notify" }, - { GDK_FOCUS_CHANGE, "GDK_FOCUS_CHANGE", "focus-change" }, - { GDK_CONFIGURE, "GDK_CONFIGURE", "configure" }, - { GDK_MAP, "GDK_MAP", "map" }, - { GDK_UNMAP, "GDK_UNMAP", "unmap" }, - { GDK_PROPERTY_NOTIFY, "GDK_PROPERTY_NOTIFY", "property-notify" }, - { GDK_SELECTION_CLEAR, "GDK_SELECTION_CLEAR", "selection-clear" }, - { GDK_SELECTION_REQUEST, "GDK_SELECTION_REQUEST", "selection-request" }, - { GDK_SELECTION_NOTIFY, "GDK_SELECTION_NOTIFY", "selection-notify" }, - { GDK_PROXIMITY_IN, "GDK_PROXIMITY_IN", "proximity-in" }, - { GDK_PROXIMITY_OUT, "GDK_PROXIMITY_OUT", "proximity-out" }, - { GDK_DRAG_ENTER, "GDK_DRAG_ENTER", "drag-enter" }, - { GDK_DRAG_LEAVE, "GDK_DRAG_LEAVE", "drag-leave" }, - { GDK_DRAG_MOTION, "GDK_DRAG_MOTION", "drag-motion" }, - { GDK_DRAG_STATUS, "GDK_DRAG_STATUS", "drag-status" }, - { GDK_DROP_START, "GDK_DROP_START", "drop-start" }, - { GDK_DROP_FINISHED, "GDK_DROP_FINISHED", "drop-finished" }, - { GDK_CLIENT_EVENT, "GDK_CLIENT_EVENT", "client-event" }, - { GDK_VISIBILITY_NOTIFY, "GDK_VISIBILITY_NOTIFY", "visibility-notify" }, - { GDK_NO_EXPOSE, "GDK_NO_EXPOSE", "no-expose" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_event_mask_values[] = { - { GDK_EXPOSURE_MASK, "GDK_EXPOSURE_MASK", "exposure-mask" }, - { GDK_POINTER_MOTION_MASK, "GDK_POINTER_MOTION_MASK", "pointer-motion-mask" }, - { GDK_POINTER_MOTION_HINT_MASK, "GDK_POINTER_MOTION_HINT_MASK", "pointer-motion-hint-mask" }, - { GDK_BUTTON_MOTION_MASK, "GDK_BUTTON_MOTION_MASK", "button-motion-mask" }, - { GDK_BUTTON1_MOTION_MASK, "GDK_BUTTON1_MOTION_MASK", "button1-motion-mask" }, - { GDK_BUTTON2_MOTION_MASK, "GDK_BUTTON2_MOTION_MASK", "button2-motion-mask" }, - { GDK_BUTTON3_MOTION_MASK, "GDK_BUTTON3_MOTION_MASK", "button3-motion-mask" }, - { GDK_BUTTON_PRESS_MASK, "GDK_BUTTON_PRESS_MASK", "button-press-mask" }, - { GDK_BUTTON_RELEASE_MASK, "GDK_BUTTON_RELEASE_MASK", "button-release-mask" }, - { GDK_KEY_PRESS_MASK, "GDK_KEY_PRESS_MASK", "key-press-mask" }, - { GDK_KEY_RELEASE_MASK, "GDK_KEY_RELEASE_MASK", "key-release-mask" }, - { GDK_ENTER_NOTIFY_MASK, "GDK_ENTER_NOTIFY_MASK", "enter-notify-mask" }, - { GDK_LEAVE_NOTIFY_MASK, "GDK_LEAVE_NOTIFY_MASK", "leave-notify-mask" }, - { GDK_FOCUS_CHANGE_MASK, "GDK_FOCUS_CHANGE_MASK", "focus-change-mask" }, - { GDK_STRUCTURE_MASK, "GDK_STRUCTURE_MASK", "structure-mask" }, - { GDK_PROPERTY_CHANGE_MASK, "GDK_PROPERTY_CHANGE_MASK", "property-change-mask" }, - { GDK_VISIBILITY_NOTIFY_MASK, "GDK_VISIBILITY_NOTIFY_MASK", "visibility-notify-mask" }, - { GDK_PROXIMITY_IN_MASK, "GDK_PROXIMITY_IN_MASK", "proximity-in-mask" }, - { GDK_PROXIMITY_OUT_MASK, "GDK_PROXIMITY_OUT_MASK", "proximity-out-mask" }, - { GDK_SUBSTRUCTURE_MASK, "GDK_SUBSTRUCTURE_MASK", "substructure-mask" }, - { GDK_ALL_EVENTS_MASK, "GDK_ALL_EVENTS_MASK", "all-events-mask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_notify_type_values[] = { - { GDK_NOTIFY_ANCESTOR, "GDK_NOTIFY_ANCESTOR", "ancestor" }, - { GDK_NOTIFY_VIRTUAL, "GDK_NOTIFY_VIRTUAL", "virtual" }, - { GDK_NOTIFY_INFERIOR, "GDK_NOTIFY_INFERIOR", "inferior" }, - { GDK_NOTIFY_NONLINEAR, "GDK_NOTIFY_NONLINEAR", "nonlinear" }, - { GDK_NOTIFY_NONLINEAR_VIRTUAL, "GDK_NOTIFY_NONLINEAR_VIRTUAL", "nonlinear-virtual" }, - { GDK_NOTIFY_UNKNOWN, "GDK_NOTIFY_UNKNOWN", "unknown" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_crossing_mode_values[] = { - { GDK_CROSSING_NORMAL, "GDK_CROSSING_NORMAL", "normal" }, - { GDK_CROSSING_GRAB, "GDK_CROSSING_GRAB", "grab" }, - { GDK_CROSSING_UNGRAB, "GDK_CROSSING_UNGRAB", "ungrab" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_modifier_type_values[] = { - { GDK_SHIFT_MASK, "GDK_SHIFT_MASK", "shift-mask" }, - { GDK_LOCK_MASK, "GDK_LOCK_MASK", "lock-mask" }, - { GDK_CONTROL_MASK, "GDK_CONTROL_MASK", "control-mask" }, - { GDK_MOD1_MASK, "GDK_MOD1_MASK", "mod1-mask" }, - { GDK_MOD2_MASK, "GDK_MOD2_MASK", "mod2-mask" }, - { GDK_MOD3_MASK, "GDK_MOD3_MASK", "mod3-mask" }, - { GDK_MOD4_MASK, "GDK_MOD4_MASK", "mod4-mask" }, - { GDK_MOD5_MASK, "GDK_MOD5_MASK", "mod5-mask" }, - { GDK_BUTTON1_MASK, "GDK_BUTTON1_MASK", "button1-mask" }, - { GDK_BUTTON2_MASK, "GDK_BUTTON2_MASK", "button2-mask" }, - { GDK_BUTTON3_MASK, "GDK_BUTTON3_MASK", "button3-mask" }, - { GDK_BUTTON4_MASK, "GDK_BUTTON4_MASK", "button4-mask" }, - { GDK_BUTTON5_MASK, "GDK_BUTTON5_MASK", "button5-mask" }, - { GDK_RELEASE_MASK, "GDK_RELEASE_MASK", "release-mask" }, - { GDK_MODIFIER_MASK, "GDK_MODIFIER_MASK", "modifier-mask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_subwindow_mode_values[] = { - { GDK_CLIP_BY_CHILDREN, "GDK_CLIP_BY_CHILDREN", "clip-by-children" }, - { GDK_INCLUDE_INFERIORS, "GDK_INCLUDE_INFERIORS", "include-inferiors" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_input_condition_values[] = { - { GDK_INPUT_READ, "GDK_INPUT_READ", "read" }, - { GDK_INPUT_WRITE, "GDK_INPUT_WRITE", "write" }, - { GDK_INPUT_EXCEPTION, "GDK_INPUT_EXCEPTION", "exception" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_status_values[] = { - { GDK_OK, "GDK_OK", "ok" }, - { GDK_ERROR, "GDK_ERROR", "error" }, - { GDK_ERROR_PARAM, "GDK_ERROR_PARAM", "error-param" }, - { GDK_ERROR_FILE, "GDK_ERROR_FILE", "error-file" }, - { GDK_ERROR_MEM, "GDK_ERROR_MEM", "error-mem" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_byte_order_values[] = { - { GDK_LSB_FIRST, "GDK_LSB_FIRST", "lsb-first" }, - { GDK_MSB_FIRST, "GDK_MSB_FIRST", "msb-first" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_gc_values_mask_values[] = { - { GDK_GC_FOREGROUND, "GDK_GC_FOREGROUND", "foreground" }, - { GDK_GC_BACKGROUND, "GDK_GC_BACKGROUND", "background" }, - { GDK_GC_FONT, "GDK_GC_FONT", "font" }, - { GDK_GC_FUNCTION, "GDK_GC_FUNCTION", "function" }, - { GDK_GC_FILL, "GDK_GC_FILL", "fill" }, - { GDK_GC_TILE, "GDK_GC_TILE", "tile" }, - { GDK_GC_STIPPLE, "GDK_GC_STIPPLE", "stipple" }, - { GDK_GC_CLIP_MASK, "GDK_GC_CLIP_MASK", "clip-mask" }, - { GDK_GC_SUBWINDOW, "GDK_GC_SUBWINDOW", "subwindow" }, - { GDK_GC_TS_X_ORIGIN, "GDK_GC_TS_X_ORIGIN", "ts-x-origin" }, - { GDK_GC_TS_Y_ORIGIN, "GDK_GC_TS_Y_ORIGIN", "ts-y-origin" }, - { GDK_GC_CLIP_X_ORIGIN, "GDK_GC_CLIP_X_ORIGIN", "clip-x-origin" }, - { GDK_GC_CLIP_Y_ORIGIN, "GDK_GC_CLIP_Y_ORIGIN", "clip-y-origin" }, - { GDK_GC_EXPOSURES, "GDK_GC_EXPOSURES", "exposures" }, - { GDK_GC_LINE_WIDTH, "GDK_GC_LINE_WIDTH", "line-width" }, - { GDK_GC_LINE_STYLE, "GDK_GC_LINE_STYLE", "line-style" }, - { GDK_GC_CAP_STYLE, "GDK_GC_CAP_STYLE", "cap-style" }, - { GDK_GC_JOIN_STYLE, "GDK_GC_JOIN_STYLE", "join-style" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_selection_values[] = { - { GDK_SELECTION_PRIMARY, "GDK_SELECTION_PRIMARY", "primary" }, - { GDK_SELECTION_SECONDARY, "GDK_SELECTION_SECONDARY", "secondary" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_property_state_values[] = { - { GDK_PROPERTY_NEW_VALUE, "GDK_PROPERTY_NEW_VALUE", "new-value" }, - { GDK_PROPERTY_DELETE, "GDK_PROPERTY_DELETE", "delete" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_prop_mode_values[] = { - { GDK_PROP_MODE_REPLACE, "GDK_PROP_MODE_REPLACE", "replace" }, - { GDK_PROP_MODE_PREPEND, "GDK_PROP_MODE_PREPEND", "prepend" }, - { GDK_PROP_MODE_APPEND, "GDK_PROP_MODE_APPEND", "append" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_input_source_values[] = { - { GDK_SOURCE_MOUSE, "GDK_SOURCE_MOUSE", "mouse" }, - { GDK_SOURCE_PEN, "GDK_SOURCE_PEN", "pen" }, - { GDK_SOURCE_ERASER, "GDK_SOURCE_ERASER", "eraser" }, - { GDK_SOURCE_CURSOR, "GDK_SOURCE_CURSOR", "cursor" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_input_mode_values[] = { - { GDK_MODE_DISABLED, "GDK_MODE_DISABLED", "disabled" }, - { GDK_MODE_SCREEN, "GDK_MODE_SCREEN", "screen" }, - { GDK_MODE_WINDOW, "GDK_MODE_WINDOW", "window" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_axis_use_values[] = { - { GDK_AXIS_IGNORE, "GDK_AXIS_IGNORE", "ignore" }, - { GDK_AXIS_X, "GDK_AXIS_X", "x" }, - { GDK_AXIS_Y, "GDK_AXIS_Y", "y" }, - { GDK_AXIS_PRESSURE, "GDK_AXIS_PRESSURE", "pressure" }, - { GDK_AXIS_XTILT, "GDK_AXIS_XTILT", "xtilt" }, - { GDK_AXIS_YTILT, "GDK_AXIS_YTILT", "ytilt" }, - { GDK_AXIS_LAST, "GDK_AXIS_LAST", "last" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_target_values[] = { - { GDK_TARGET_BITMAP, "GDK_TARGET_BITMAP", "bitmap" }, - { GDK_TARGET_COLORMAP, "GDK_TARGET_COLORMAP", "colormap" }, - { GDK_TARGET_DRAWABLE, "GDK_TARGET_DRAWABLE", "drawable" }, - { GDK_TARGET_PIXMAP, "GDK_TARGET_PIXMAP", "pixmap" }, - { GDK_TARGET_STRING, "GDK_TARGET_STRING", "string" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_selection_type_values[] = { - { GDK_SELECTION_TYPE_ATOM, "GDK_SELECTION_TYPE_ATOM", "atom" }, - { GDK_SELECTION_TYPE_BITMAP, "GDK_SELECTION_TYPE_BITMAP", "bitmap" }, - { GDK_SELECTION_TYPE_COLORMAP, "GDK_SELECTION_TYPE_COLORMAP", "colormap" }, - { GDK_SELECTION_TYPE_DRAWABLE, "GDK_SELECTION_TYPE_DRAWABLE", "drawable" }, - { GDK_SELECTION_TYPE_INTEGER, "GDK_SELECTION_TYPE_INTEGER", "integer" }, - { GDK_SELECTION_TYPE_PIXMAP, "GDK_SELECTION_TYPE_PIXMAP", "pixmap" }, - { GDK_SELECTION_TYPE_WINDOW, "GDK_SELECTION_TYPE_WINDOW", "window" }, - { GDK_SELECTION_TYPE_STRING, "GDK_SELECTION_TYPE_STRING", "string" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_extension_mode_values[] = { - { GDK_EXTENSION_EVENTS_NONE, "GDK_EXTENSION_EVENTS_NONE", "none" }, - { GDK_EXTENSION_EVENTS_ALL, "GDK_EXTENSION_EVENTS_ALL", "all" }, - { GDK_EXTENSION_EVENTS_CURSOR, "GDK_EXTENSION_EVENTS_CURSOR", "cursor" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_im_style_values[] = { - { GDK_IM_PREEDIT_AREA, "GDK_IM_PREEDIT_AREA", "preedit-area" }, - { GDK_IM_PREEDIT_CALLBACKS, "GDK_IM_PREEDIT_CALLBACKS", "preedit-callbacks" }, - { GDK_IM_PREEDIT_POSITION, "GDK_IM_PREEDIT_POSITION", "preedit-position" }, - { GDK_IM_PREEDIT_NOTHING, "GDK_IM_PREEDIT_NOTHING", "preedit-nothing" }, - { GDK_IM_PREEDIT_NONE, "GDK_IM_PREEDIT_NONE", "preedit-none" }, - { GDK_IM_PREEDIT_MASK, "GDK_IM_PREEDIT_MASK", "preedit-mask" }, - { GDK_IM_STATUS_AREA, "GDK_IM_STATUS_AREA", "status-area" }, - { GDK_IM_STATUS_CALLBACKS, "GDK_IM_STATUS_CALLBACKS", "status-callbacks" }, - { GDK_IM_STATUS_NOTHING, "GDK_IM_STATUS_NOTHING", "status-nothing" }, - { GDK_IM_STATUS_NONE, "GDK_IM_STATUS_NONE", "status-none" }, - { GDK_IM_STATUS_MASK, "GDK_IM_STATUS_MASK", "status-mask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_ic_attributes_type_values[] = { - { GDK_IC_STYLE, "GDK_IC_STYLE", "style" }, - { GDK_IC_CLIENT_WINDOW, "GDK_IC_CLIENT_WINDOW", "client-window" }, - { GDK_IC_FOCUS_WINDOW, "GDK_IC_FOCUS_WINDOW", "focus-window" }, - { GDK_IC_FILTER_EVENTS, "GDK_IC_FILTER_EVENTS", "filter-events" }, - { GDK_IC_SPOT_LOCATION, "GDK_IC_SPOT_LOCATION", "spot-location" }, - { GDK_IC_LINE_SPACING, "GDK_IC_LINE_SPACING", "line-spacing" }, - { GDK_IC_CURSOR, "GDK_IC_CURSOR", "cursor" }, - { GDK_IC_PREEDIT_FONTSET, "GDK_IC_PREEDIT_FONTSET", "preedit-fontset" }, - { GDK_IC_PREEDIT_AREA, "GDK_IC_PREEDIT_AREA", "preedit-area" }, - { GDK_IC_PREEDIT_AREA_NEEDED, "GDK_IC_PREEDIT_AREA_NEEDED", "preedit-area-needed" }, - { GDK_IC_PREEDIT_FOREGROUND, "GDK_IC_PREEDIT_FOREGROUND", "preedit-foreground" }, - { GDK_IC_PREEDIT_BACKGROUND, "GDK_IC_PREEDIT_BACKGROUND", "preedit-background" }, - { GDK_IC_PREEDIT_PIXMAP, "GDK_IC_PREEDIT_PIXMAP", "preedit-pixmap" }, - { GDK_IC_PREEDIT_COLORMAP, "GDK_IC_PREEDIT_COLORMAP", "preedit-colormap" }, - { GDK_IC_STATUS_FONTSET, "GDK_IC_STATUS_FONTSET", "status-fontset" }, - { GDK_IC_STATUS_AREA, "GDK_IC_STATUS_AREA", "status-area" }, - { GDK_IC_STATUS_AREA_NEEDED, "GDK_IC_STATUS_AREA_NEEDED", "status-area-needed" }, - { GDK_IC_STATUS_FOREGROUND, "GDK_IC_STATUS_FOREGROUND", "status-foreground" }, - { GDK_IC_STATUS_BACKGROUND, "GDK_IC_STATUS_BACKGROUND", "status-background" }, - { GDK_IC_STATUS_PIXMAP, "GDK_IC_STATUS_PIXMAP", "status-pixmap" }, - { GDK_IC_STATUS_COLORMAP, "GDK_IC_STATUS_COLORMAP", "status-colormap" }, - { GDK_IC_ALL_REQ, "GDK_IC_ALL_REQ", "all-req" }, - { GDK_IC_CLIENT_WINDOW, "GDK_IC_CLIENT_WINDOW", "client-window" }, - { GDK_IC_PREEDIT_AREA_REQ, "GDK_IC_PREEDIT_AREA_REQ", "preedit-area-req" }, - { GDK_IC_PREEDIT_FONTSET, "GDK_IC_PREEDIT_FONTSET", "preedit-fontset" }, - { GDK_IC_PREEDIT_POSITION_REQ, "GDK_IC_PREEDIT_POSITION_REQ", "preedit-position-req" }, - { GDK_IC_PREEDIT_FONTSET, "GDK_IC_PREEDIT_FONTSET", "preedit-fontset" }, - { GDK_IC_STATUS_AREA_REQ, "GDK_IC_STATUS_AREA_REQ", "status-area-req" }, - { GDK_IC_STATUS_FONTSET, "GDK_IC_STATUS_FONTSET", "status-fontset" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_wm_decoration_values[] = { - { GDK_DECOR_ALL, "GDK_DECOR_ALL", "all" }, - { GDK_DECOR_BORDER, "GDK_DECOR_BORDER", "border" }, - { GDK_DECOR_RESIZEH, "GDK_DECOR_RESIZEH", "resizeh" }, - { GDK_DECOR_TITLE, "GDK_DECOR_TITLE", "title" }, - { GDK_DECOR_MENU, "GDK_DECOR_MENU", "menu" }, - { GDK_DECOR_MINIMIZE, "GDK_DECOR_MINIMIZE", "minimize" }, - { GDK_DECOR_MAXIMIZE, "GDK_DECOR_MAXIMIZE", "maximize" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_wm_function_values[] = { - { GDK_FUNC_ALL, "GDK_FUNC_ALL", "all" }, - { GDK_FUNC_RESIZE, "GDK_FUNC_RESIZE", "resize" }, - { GDK_FUNC_MOVE, "GDK_FUNC_MOVE", "move" }, - { GDK_FUNC_MINIMIZE, "GDK_FUNC_MINIMIZE", "minimize" }, - { GDK_FUNC_MAXIMIZE, "GDK_FUNC_MAXIMIZE", "maximize" }, - { GDK_FUNC_CLOSE, "GDK_FUNC_CLOSE", "close" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_color_context_mode_values[] = { - { GDK_CC_MODE_UNDEFINED, "GDK_CC_MODE_UNDEFINED", "undefined" }, - { GDK_CC_MODE_BW, "GDK_CC_MODE_BW", "bw" }, - { GDK_CC_MODE_STD_CMAP, "GDK_CC_MODE_STD_CMAP", "std-cmap" }, - { GDK_CC_MODE_TRUE, "GDK_CC_MODE_TRUE", "true" }, - { GDK_CC_MODE_MY_GRAY, "GDK_CC_MODE_MY_GRAY", "my-gray" }, - { GDK_CC_MODE_PALETTE, "GDK_CC_MODE_PALETTE", "palette" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_overlap_type_values[] = { - { GDK_OVERLAP_RECTANGLE_IN, "GDK_OVERLAP_RECTANGLE_IN", "in" }, - { GDK_OVERLAP_RECTANGLE_OUT, "GDK_OVERLAP_RECTANGLE_OUT", "out" }, - { GDK_OVERLAP_RECTANGLE_PART, "GDK_OVERLAP_RECTANGLE_PART", "part" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_drag_action_values[] = { - { GDK_ACTION_DEFAULT, "GDK_ACTION_DEFAULT", "default" }, - { GDK_ACTION_COPY, "GDK_ACTION_COPY", "copy" }, - { GDK_ACTION_MOVE, "GDK_ACTION_MOVE", "move" }, - { GDK_ACTION_LINK, "GDK_ACTION_LINK", "link" }, - { GDK_ACTION_PRIVATE, "GDK_ACTION_PRIVATE", "private" }, - { GDK_ACTION_ASK, "GDK_ACTION_ASK", "ask" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_drag_protocol_values[] = { - { GDK_DRAG_PROTO_MOTIF, "GDK_DRAG_PROTO_MOTIF", "motif" }, - { GDK_DRAG_PROTO_XDND, "GDK_DRAG_PROTO_XDND", "xdnd" }, - { GDK_DRAG_PROTO_ROOTWIN, "GDK_DRAG_PROTO_ROOTWIN", "rootwin" }, - { GDK_DRAG_PROTO_NONE, "GDK_DRAG_PROTO_NONE", "none" }, - { 0, NULL, NULL } -}; -static const GtkEnumValue _gdk_rgb_dither_values[] = { - { GDK_RGB_DITHER_NONE, "GDK_RGB_DITHER_NONE", "none" }, - { GDK_RGB_DITHER_NORMAL, "GDK_RGB_DITHER_NORMAL", "normal" }, - { GDK_RGB_DITHER_MAX, "GDK_RGB_DITHER_MAX", "max" }, - { 0, NULL, NULL } -}; diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c index bac3c0296..a2c15e6aa 100644 --- a/gtk/gtktypeutils.c +++ b/gtk/gtktypeutils.c @@ -63,9 +63,6 @@ struct _GtkTypeNode } static void gtk_type_class_init (GtkType node_type); -static guint gtk_type_name_hash (const char *key); -static gint gtk_type_name_compare (const char *a, - const char *b); static void gtk_type_init_builtin_types (void); static GtkTypeNode *type_nodes = NULL; @@ -136,8 +133,7 @@ gtk_type_init (void) g_assert (sizeof (GtkType) >= 4); g_assert (TYPE_NODES_BLOCK_SIZE > GTK_TYPE_FUNDAMENTAL_MAX); - type_name_2_type_ht = g_hash_table_new ((GHashFunc) gtk_type_name_hash, - (GCompareFunc) gtk_type_name_compare); + type_name_2_type_ht = g_hash_table_new (g_str_hash, g_str_equal); gtk_type_init_builtin_types (); } @@ -908,25 +904,6 @@ gtk_type_query (GtkType type) return NULL; } -static guint -gtk_type_name_hash (const char *key) -{ - guint result; - - result = 0; - while (*key) - result += (result << 3) + *key++; - - return result; -} - -static gint -gtk_type_name_compare (const char *a, - const char *b) -{ - return (strcmp (a, b) == 0); -} - extern void gtk_object_init_type (void); #include "makeenums.h" /* include for various places diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 3f9eab48c..afffdf01a 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -756,12 +756,10 @@ gtk_viewport_size_allocate (GtkWidget *widget, child_allocation.width = viewport->hadjustment->upper; child_allocation.height = viewport->vadjustment->upper; - if (!GTK_WIDGET_REALIZED (widget)) - gtk_widget_realize (widget); - - gdk_window_resize (viewport->bin_window, - child_allocation.width, - child_allocation.height); + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_resize (viewport->bin_window, + child_allocation.width, + child_allocation.height); child_allocation.x = 0; child_allocation.y = 0; @@ -802,7 +800,6 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment, GtkViewport *viewport; GtkBin *bin; GtkAllocation child_allocation; - gint width, height; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); @@ -813,8 +810,6 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment, if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) { - gdk_window_get_size (viewport->view_window, &width, &height); - child_allocation.x = 0; child_allocation.y = 0; diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c index 6a7e113e1..816c17391 100644 --- a/gtk/gtkvpaned.c +++ b/gtk/gtkvpaned.c @@ -149,16 +149,16 @@ gtk_vpaned_size_allocate (GtkWidget *widget, GtkRequisition child2_requisition; GtkAllocation child1_allocation; GtkAllocation child2_allocation; - guint16 border_width; + gint border_width; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VPANED (widget)); g_return_if_fail (allocation != NULL); - + widget->allocation = *allocation; - paned = GTK_PANED (widget); border_width = GTK_CONTAINER (widget)->border_width; + gutter_size = paned->gutter_size; if (paned->child1) gtk_widget_get_child_requisition (paned->child1, &child1_requisition); @@ -169,19 +169,19 @@ gtk_vpaned_size_allocate (GtkWidget *widget, gtk_widget_get_child_requisition (paned->child2, &child2_requisition); else child2_requisition.height = 0; - - gtk_paned_compute_position(paned, - widget->allocation.height - - paned->handle_size - - 2 * border_width, - child1_requisition.height, - child2_requisition.height); + + gtk_paned_compute_position (paned, + MAX (1, (gint) widget->allocation.height + - (gint) paned->handle_size + - 2 * border_width), + child1_requisition.height, + child2_requisition.height); /* Move the handle before the children so we don't get extra expose events */ paned->handle_xpos = border_width; paned->handle_ypos = paned->child1_size + border_width; - paned->handle_width = widget->allocation.width - 2 * border_width; + paned->handle_width = MAX (1, (gint) widget->allocation.width - 2 * border_width); paned->handle_height = paned->handle_size; if (GTK_WIDGET_REALIZED(widget)) @@ -198,7 +198,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget, paned->handle_size); } - child1_allocation.width = child2_allocation.width = MAX(1, (gint) allocation->width - border_width * 2); + child1_allocation.width = child2_allocation.width = MAX (1, (gint) allocation->width - border_width * 2); child1_allocation.height = paned->child1_size; child1_allocation.x = child2_allocation.x = border_width; child1_allocation.y = border_width; diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c index c7c532aef..a27e0ae4b 100644 --- a/gtk/gtkvscale.c +++ b/gtk/gtkvscale.c @@ -478,6 +478,8 @@ gtk_vscale_pos_background (GtkVScale *vscale, *h -= theight; break; } + *w = MAX (*w, 0); + *h = MAX (*h, 0); } static void diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 6e7d2a32c..dd844777d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1518,9 +1518,11 @@ gtk_widget_hide (GtkWidget *widget) if (GTK_WIDGET_VISIBLE (widget)) { + gtk_widget_ref (widget); gtk_signal_emit (GTK_OBJECT (widget), widget_signals[HIDE]); - if (!GTK_WIDGET_TOPLEVEL (widget)) + if (!GTK_WIDGET_TOPLEVEL (widget) && !GTK_OBJECT_DESTROYED (widget)) gtk_widget_queue_resize (widget); + gtk_widget_unref (widget); } } @@ -1703,8 +1705,10 @@ gtk_widget_unrealize (GtkWidget *widget) if (GTK_WIDGET_REALIZED (widget)) { + gtk_widget_ref (widget); gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNREALIZE]); GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED); + gtk_widget_unref (widget); } } @@ -1860,6 +1864,19 @@ gtk_widget_queue_clear_area (GtkWidget *widget, if (GTK_WIDGET_NO_WINDOW (widget)) { + /* The following deals with the fact that while we are in + * a reparent, the widget and window heirarchies + * may be different, and the redraw queing code will be utterly + * screwed by that. + * + * So, continuing at this point is a bad idea, and returning is + * generally harmless. (More redraws will be queued then necessary + * for a reparent in any case.) This can go away, when we + * make reparent simply ref/remove/add/unref. + */ + if (GTK_WIDGET_IN_REPARENT (widget)) + return; + parent = widget; while (parent && GTK_WIDGET_NO_WINDOW (parent)) parent = parent->parent; @@ -2981,32 +2998,8 @@ gtk_widget_reparent (GtkWidget *widget, { GTK_PRIVATE_UNSET_FLAG (widget, GTK_IN_REPARENT); - /* OK, now fix up the widget's window. (And that for any - * children, if the widget is NO_WINDOW and a container) - */ - if (GTK_WIDGET_NO_WINDOW (widget)) - { - if (GTK_IS_CONTAINER (widget)) - gtk_container_forall (GTK_CONTAINER (widget), - gtk_widget_reparent_container_child, - gtk_widget_get_parent_window (widget)); - else - { - GdkWindow *parent_window; - - parent_window = gtk_widget_get_parent_window (widget); - if (parent_window != widget->window) - { - if (widget->window) - gdk_window_unref (widget->window); - widget->window = parent_window; - if (widget->window) - gdk_window_ref (widget->window); - } - } - } - else - gdk_window_reparent (widget->window, gtk_widget_get_parent_window (widget), 0, 0); + gtk_widget_reparent_container_child (widget, + gtk_widget_get_parent_window (widget)); } } } @@ -4202,8 +4195,8 @@ gtk_widget_is_ancestor (GtkWidget *widget, static GQuark quark_composite_name = 0; void -gtk_widget_set_composite_name (GtkWidget *widget, - gchar *name) +gtk_widget_set_composite_name (GtkWidget *widget, + const gchar *name) { g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_WIDGET (widget)); diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 49431de87..15e3c628e 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -588,7 +588,7 @@ void gtk_widget_modify_style (GtkWidget *widget, * the returned name is newly allocated. */ void gtk_widget_set_composite_name (GtkWidget *widget, - gchar *name); + const gchar *name); gchar* gtk_widget_get_composite_name (GtkWidget *widget); /* Descend recursively and set rc-style on all widgets without user styles */ diff --git a/gtk/testgtk.c b/gtk/testgtk.c index 2bbaadd68..df1b4940d 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -2488,32 +2488,6 @@ create_item_factory (void) } /* - * 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); - } -} - -/* create_modal_window */ @@ -2644,6 +2618,63 @@ create_modal_window (void) * GtkScrolledWindow */ +static GtkWidget *sw_parent = NULL; +static GtkWidget *sw_float_parent; +static guint sw_destroyed_handler = 0; + +static gboolean +scrolled_windows_delete_cb (GtkWidget *widget, GdkEventAny *event, GtkWidget *scrollwin) +{ + gtk_widget_reparent (scrollwin, sw_parent); + + gtk_signal_disconnect (GTK_OBJECT (sw_parent), sw_destroyed_handler); + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; + + return FALSE; +} + +static void +scrolled_windows_destroy_cb (GtkWidget *widget, GtkWidget *scrollwin) +{ + gtk_widget_destroy (sw_float_parent); + + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; +} + +static void +scrolled_windows_remove (GtkWidget *widget, GtkWidget *scrollwin) +{ + if (sw_parent) + { + gtk_widget_reparent (scrollwin, sw_parent); + gtk_widget_destroy (sw_float_parent); + + gtk_signal_disconnect (GTK_OBJECT (sw_parent), sw_destroyed_handler); + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; + } + else + { + sw_parent = scrollwin->parent; + sw_float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_default_size (GTK_WINDOW (sw_float_parent), 200, 200); + + gtk_widget_reparent (scrollwin, sw_float_parent); + gtk_widget_show (sw_float_parent); + + sw_destroyed_handler = + gtk_signal_connect (GTK_OBJECT (sw_parent), "destroy", + GTK_SIGNAL_FUNC (scrolled_windows_destroy_cb), scrollwin); + gtk_signal_connect (GTK_OBJECT (sw_float_parent), "delete_event", + GTK_SIGNAL_FUNC (scrolled_windows_delete_cb), scrollwin); + } +} + static void create_scrolled_windows (void) { @@ -2696,7 +2727,7 @@ create_scrolled_windows (void) } - button = gtk_button_new_with_label ("close"); + button = gtk_button_new_with_label ("Close"); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT (window)); @@ -2706,10 +2737,10 @@ create_scrolled_windows (void) 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)); + button = gtk_button_new_with_label ("Reparent Out"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC(scrolled_windows_remove), + 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); @@ -53,7 +53,7 @@ fi # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. -if test "X${PATH_SEPARATOR+set}" != "Xset"; then +if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; @@ -63,9 +63,9 @@ fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -if test "X${echo_test_string+set}" != "Xset"; then +if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... @@ -169,10 +169,10 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool -VERSION=1.3.3 -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" -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' +VERSION=1.3.4 +TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." @@ -369,8 +369,8 @@ exec 5>>./config.log # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi if test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" @@ -462,7 +462,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -663,7 +663,7 @@ if test "$with_gcc" = yes; then link_static_flag='-static' case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4*) + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) @@ -718,7 +718,7 @@ else # We can build DLLs from non-PIC. ;; - osf3* | osf4*) + osf3* | osf4* | osf5*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' @@ -1187,7 +1187,7 @@ EOF ;; netbsd*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -1196,7 +1196,7 @@ EOF fi ;; - solaris*) + solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<EOF 1>&2 @@ -1244,7 +1244,12 @@ EOF whole_archive_flag_spec= ;; *) - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi ;; esac fi @@ -1405,7 +1410,7 @@ else old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; - osf3* | osf4*) + osf3*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' @@ -1417,6 +1422,18 @@ else hardcode_libdir_separator=: ;; + osf4* | osf5*) # As osf3* with the addition of the -msym flag + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no @@ -1461,6 +1478,18 @@ else export_dynamic_flag_spec='-Bexport' ;; + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' @@ -1474,14 +1503,28 @@ else ;; sysv4*MP*) - if test -d /usr/nec ;then - # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' - archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs' + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=no hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH hardcode_runpath_var=yes - ld_shlibs=yes - fi + runpath_var=LD_RUN_PATH + ;; + + unixware7*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no ;; *) @@ -1589,11 +1632,11 @@ void nm_test_func(){} main(){nm_test_var='a';nm_test_func();return(0);} EOF - echo "$progname:1592: checking if global_symbol_pipe works" >&5 - if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + echo "$progname:1635: checking if global_symbol_pipe works" >&5 + if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm - if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -1645,7 +1688,7 @@ EOF save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 @@ -1787,8 +1830,9 @@ beos*) bsdi4*) version_type=linux - library_names_spec='${libname}.so$major ${libname}.so' - soname_spec='${libname}.so' + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' @@ -1796,6 +1840,7 @@ bsdi4*) file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs @@ -1841,10 +1886,9 @@ freebsd*) need_version=yes ;; esac - finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH case "$host_os" in - freebsd2* | freebsd3.[01]*) + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes ;; *) # from 3.2 on @@ -1896,8 +1940,6 @@ irix5* | irix6*) *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH @@ -1972,7 +2014,7 @@ os2*) shlibpath_var=LIBPATH ;; -osf3* | osf4*) +osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' @@ -2167,7 +2209,7 @@ else if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2170: checking for dlopen in -ldl" >&5 +echo "$progname:2212: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2175,17 +2217,20 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2178 "ltconfig" +#line 2220 "ltconfig" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen(); int main() { dlopen() ; return 0; } EOF -if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2204,18 +2249,21 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2207: checking for dlopen" >&5 +echo "$progname:2252: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2212 "ltconfig" +#line 2257 "ltconfig" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen(); int main() { @@ -2231,7 +2279,7 @@ dlopen(); ; return 0; } EOF -if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -2248,7 +2296,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2251: checking for dld_link in -ldld" >&5 +echo "$progname:2299: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2256,17 +2304,20 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2259 "ltconfig" +#line 2307 "ltconfig" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dld_link(); int main() { dld_link() ; return 0; } EOF -if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2285,18 +2336,21 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2288: checking for shl_load" >&5 +echo "$progname:2339: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2293 "ltconfig" +#line 2344 "ltconfig" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load(); int main() { @@ -2312,7 +2366,7 @@ shl_load(); ; return 0; } EOF -if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else @@ -2330,7 +2384,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2333: checking for shl_load in -ldld" >&5 +echo "$progname:2387: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2338,18 +2392,21 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2341 "ltconfig" +#line 2395 "ltconfig" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load(); int main() { shl_load() ; return 0; } EOF -if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2392,17 +2449,17 @@ fi for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2395: checking for $ac_hdr" >&5 +echo "$progname:2452: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2400 "ltconfig" +#line 2457 "ltconfig" #include <$ac_hdr> int fnord = 0; EOF -ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_try="$ac_compile >/dev/null 2>conftest.out" +{ (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2430,7 +2487,7 @@ done LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2433: checking whether a program can dlopen itself" >&5 +echo "$progname:2490: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2438,7 +2495,7 @@ else lt_cv_dlopen_self=cross else cat > conftest.c <<EOF -#line 2441 "ltconfig" +#line 2498 "ltconfig" #if HAVE_DLFCN_H #include <dlfcn.h> @@ -2484,7 +2541,7 @@ main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else @@ -2503,7 +2560,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5 +echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2511,7 +2568,7 @@ else lt_cv_dlopen_self_static=cross else cat > conftest.c <<EOF -#line 2514 "ltconfig" +#line 2571 "ltconfig" #if HAVE_DLFCN_H #include <dlfcn.h> @@ -2557,7 +2614,7 @@ main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else @@ -2649,7 +2706,7 @@ case "$ltmain" in # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -2675,7 +2732,7 @@ Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ### BEGIN LIBTOOL CONFIG EOF @@ -2938,7 +2995,7 @@ case "$ltmain" in # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -2948,6 +3005,10 @@ EOF # Append the ltmain.sh script. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? chmod +x "$ofile" ;; @@ -54,8 +54,8 @@ modename="$progname" # Constants. PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.3.3 -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" +VERSION=1.3.4 +TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" default_mode= help="Try \`$progname --help' for more information." @@ -435,7 +435,7 @@ compiler." fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $pic_flag -DPIC $srcfile" + command="$base_compile $srcfile $pic_flag -DPIC" if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` @@ -521,9 +521,17 @@ compiler." exit $error fi + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file - $show "$LN_S $obj $lo_libobj" - if $run $LN_S $obj $lo_libobj; then + $show "(cd $xdir && $LN_S $baseobj $libobj)" + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then exit 0 else error=$? @@ -613,8 +621,6 @@ compiler." # libtool link mode link) modename="$modename: link" - C_compiler="$CC" # save it, to compile generated C sources - CC="$nonopt" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) # It is impossible to link a dll without this setting, and @@ -802,8 +808,8 @@ compiler." allow_undefined=yes ;; esac - compile_command="$CC" - finalize_command="$CC" + compile_command="$nonopt" + finalize_command="$nonopt" compile_rpath= finalize_rpath= @@ -1851,7 +1857,7 @@ compiler." int main() { return 0; } EOF $rm conftest - $C_compiler -o conftest conftest.c $deplibs + $CC -o conftest conftest.c $deplibs if test $? -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do @@ -1884,7 +1890,7 @@ EOF # If $name is empty we are operating on a -L argument. if test "$name" != "" ; then $rm conftest - $C_compiler -o conftest conftest.c $i + $CC -o conftest conftest.c $i # Did it work? if test $? -eq 0 ; then ldd_output=`ldd conftest` @@ -2047,12 +2053,19 @@ EOF done # Ensure that we have .o objects for linkers which dislike .lo - # (e.g. aix) incase we are running --disable-static + # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do - oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` - if test ! -f $oldobj; then - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + if test ! -f $xdir/$oldobj; then + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done @@ -2311,8 +2324,16 @@ EOF # Just create a symlink. $show $rm $libobj $run $rm $libobj - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj || exit $? + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$libobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + $show "(cd $xdir && $LN_S $oldobj $baseobj)" + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then @@ -2598,16 +2619,21 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*) + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" @@ -2776,7 +2802,7 @@ sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" @@ -2865,7 +2891,7 @@ else fi" else echo >> $output "\ - program='$outputname$exeext' + program='$outputname' progdir=\"\$thisdir/$objdir\" " fi @@ -2995,14 +3021,21 @@ fi\ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else - # Ensure that we have .o objects in place incase we decided + # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then - obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"` - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$oldobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + $show "(cd $xdir && ${LN_S} $obj $baseobj)" + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done @@ -3672,8 +3705,10 @@ libdir='$install_libdir'\ done if test -z "$run"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then @@ -3690,8 +3725,10 @@ libdir='$install_libdir'\ exit 1 else # Display what would be done. - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi $echo "$cmd$args" exit 0 fi diff --git a/tests/testgtk.c b/tests/testgtk.c index 2bbaadd68..df1b4940d 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -2488,32 +2488,6 @@ create_item_factory (void) } /* - * 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); - } -} - -/* create_modal_window */ @@ -2644,6 +2618,63 @@ create_modal_window (void) * GtkScrolledWindow */ +static GtkWidget *sw_parent = NULL; +static GtkWidget *sw_float_parent; +static guint sw_destroyed_handler = 0; + +static gboolean +scrolled_windows_delete_cb (GtkWidget *widget, GdkEventAny *event, GtkWidget *scrollwin) +{ + gtk_widget_reparent (scrollwin, sw_parent); + + gtk_signal_disconnect (GTK_OBJECT (sw_parent), sw_destroyed_handler); + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; + + return FALSE; +} + +static void +scrolled_windows_destroy_cb (GtkWidget *widget, GtkWidget *scrollwin) +{ + gtk_widget_destroy (sw_float_parent); + + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; +} + +static void +scrolled_windows_remove (GtkWidget *widget, GtkWidget *scrollwin) +{ + if (sw_parent) + { + gtk_widget_reparent (scrollwin, sw_parent); + gtk_widget_destroy (sw_float_parent); + + gtk_signal_disconnect (GTK_OBJECT (sw_parent), sw_destroyed_handler); + sw_float_parent = NULL; + sw_parent = NULL; + sw_destroyed_handler = 0; + } + else + { + sw_parent = scrollwin->parent; + sw_float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_default_size (GTK_WINDOW (sw_float_parent), 200, 200); + + gtk_widget_reparent (scrollwin, sw_float_parent); + gtk_widget_show (sw_float_parent); + + sw_destroyed_handler = + gtk_signal_connect (GTK_OBJECT (sw_parent), "destroy", + GTK_SIGNAL_FUNC (scrolled_windows_destroy_cb), scrollwin); + gtk_signal_connect (GTK_OBJECT (sw_float_parent), "delete_event", + GTK_SIGNAL_FUNC (scrolled_windows_delete_cb), scrollwin); + } +} + static void create_scrolled_windows (void) { @@ -2696,7 +2727,7 @@ create_scrolled_windows (void) } - button = gtk_button_new_with_label ("close"); + button = gtk_button_new_with_label ("Close"); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT (window)); @@ -2706,10 +2737,10 @@ create_scrolled_windows (void) 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)); + button = gtk_button_new_with_label ("Reparent Out"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC(scrolled_windows_remove), + 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); |