summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@cs.umn.edu>1999-11-22 21:52:50 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-11-22 21:52:50 +0000
commit33da844e70731005b5bb3670f81ca59a832b2910 (patch)
tree461543bc558308a588f82d8b2657b4f034119508
parent14237d13e2bdaf8a52534a03e390aa6ed30938fc (diff)
downloadgdk-pixbuf-33da844e70731005b5bb3670f81ca59a832b2910.tar.gz
Adapt cast macros to standard.
Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkgamma.h: Adapt cast macros to standard. [ Merges from 1.2 ] Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkitemfactory.c (gtk_item_factory_parse_path): If translation does not include a '/', use entire translation instead of crashing. Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org> * docs/gtk_tut.sgml: s/gtk_accel_group_attach/gtk_window_add_accel_group/. Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkselection.c (gtk_target_list_remove): Use g_list_remove_link, not g_list_remove. [ From Geert Bevin <gbevin@thunderstorms.org> ] Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org> * gtk/gtkclist.c (real_undo_selection): commented out g_print() statement upon unselection (how the heck did that slip in?). Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org> * gtk/gtktext.c (gtk_text_freeze): (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling in frozen state (and aparently crashes). patch provided by Anders Melchiorsen <and@kampsax.dtu.dk>. Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org> * fix insensitive default/focus widget activation, reported by Matt Goodall <mgg@isotek.co.uk>. * gtk/gtkwindow.c (gtk_window_key_press_event): (gtk_window_activate_default): (gtk_window_activate_focus): return handled=FALSE for actiavtion of insensitive default widgets. return handled=TRUE for activation of insensitive focus widgets. don't activate in either case. Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com> * gtk-config.in (lib_gtk): Switch order of @x_cflags@ and $glib_cflags to match library order and in the theory that an old version of GLib is more likely to be in the include directory for X then vice-versa. (Bug #2776) Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE to determine the locale for fontsets, not LC_MESSAGES; the user may want English messages with a handling for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR will still be broken) (Bug #2891) Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr> * gtk/gtkrc.ko: Fixed the wrong number of "*"'s. Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr> * gtk/gtkrc.ko: Changed the Korean default fontset. Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug where when scrolling to the left or top double exposes were done, causing major slowdowns. Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset names to lowercase and alphanumeric, before looking them up. * gtk/Makefile.am: Install codeset variant gtkrc files with normalized names. Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org> * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even popup menus when the menu is already visible, but its parent is still hidden, (happens after tornoff window got hidden). Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (install-data-local): Fix a typo where gtkrc.vi_VN.tcvn5712 wasn't getting deleted, causing error messages on install. Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw the handle as well, since we now sometimes ignore exposes on the handle while resizing. Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid extra g_free introduced in one of the last one or two commits. Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files consistent, put each style that a gtkrc.* file creates in a unique namespace, remove old files before installing. Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when gtk_rc_init is called multiple times. (Yes, people who do that have bugs in their code.) Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org> * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf. Remove it since it's generated by the Makefile anyway Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com> * gdk/gdkinputcommon.h (gdk_input_device_new): Free device->info.axes for core pointer. Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c (destroy_idle_test): Rename idle to idle_id, to deal with obsolete, broken C libraries. Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in allocation->x/y twice! * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough() consistent with gtk_vscale_pos_trough(). Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkcontainer.c (gtk_container_queue_resize): We may be queueing a resize on a toplevel container between the time we show it and when we map it. So, we need to test GTK_WIDGET_VISIBLE() for toplevels, and only use GTK_WIDGET_DRAWABLE() for child windows. Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS (fixes bug #2144) Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.c (gtk_container_queue_resize): check for container DRAWABLE (instead of VISIBLE), so we don't queue resizes on non-toplevel containers. Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkselection.[ch]: Make the data argument const guchar *. Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c: Try to behave sensibly if the focus widget is the window itself. (Should we allow this at all?) Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_set_sensitive): * gtk/gtknotebook.c (gtk_notebook_set_scrollable): * gtk/gtknotebook.c (gtk_notebook_set_show_border): * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args in prototypes and implementations consistent (Tomas Ogren). * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag before the widget is unparented (reported by damon). * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char, since we provide unsigned data anyways. Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay the call to gtk_tooltips_layout_text() until later. * gtk/gtktooltips.c (gtk_tooltips_draw_tips): Call gtk_widget_ensure_style() before using the style. Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_event): Added workaround for old widgets that don't propagate draws to all children. (Namely gnome-dock for gnome-libs <= 1.0.16) Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent for a redraw but just the widget that requested the resize. Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org> * gtk/gtkcontainer.c: added new widget level method gtk_container_set_reallocate_redraws() and a GtkContainer flag reallocate_redraws : 1 to reflect the setting, exported this through the argument system as a boolean ::reallocate_redraws. * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws on the widget because the allocation changes, do so as well for widget->parent if the parent has reallocate_redraws set to TRUE. with that containers requesting reallocation redraws get automatically redrawn if their children changed allocation (this unfortunately affects also other children that didn't change allocation, but we cannot work around that before 1.3). Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width _and_ height are >0 (not _or_). * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize() instead of gtk_container_queue_resize(), which is a core gtk internal function (must have been on crack when i queued that). * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so we can check more reliably if we want to discard expose events. * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING flag. * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes, we simply trust these events. for deciding whether to discard exposes, check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING. Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore queues of areas that are completely off screen. * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken logic for handleboxes. * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity check on width/height. Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org> * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements", we are fine with using $@ the way we do (if we actually encounter brokeness with $@ in VPATH builds because of additional path prefixes, we need to use $(@F) actually). Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org> * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce short lived bugs, that would allow language bindings to do surgeries to our guts. Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo where comparison was being done against an uninitialized value causing intermittant results depending on compiler flags. Also make it clearer that we aren't ever initializing the child as 0x0 (though this will be caught in gtk_widget_size_allocate()) Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_set_transient_for): Move gtk_window_unset_transient_for() call after we do checks involving the old transient parent. [ From Lance Capser <lmc@cyberhighway.net> ] 1999-09-07 Raja R Harinath <harinath@cs.umn.edu> * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create an empty file. Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org> * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has no children. (Reported by: Chris Rogers <gandalf@pobox.com>) 1999-09-03 Raja R Harinath <harinath@cs.umn.edu> * gtk/Makefile.am (gen_sources): Improve VPATH builds. `$@' is valid only in the build dir, not after we've done `cd $srcdir'. Also use `test -f' instead of less portable `test -e'. Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktext.c (correct_cache_insert): Rewrite for simplicity, and hopefully correctness. (Fixes bug #1322, which was a segfault when on some insertions with the properties around the insertion set up just wrong.) * gtk/gtktext.c (gtk_text_adjustment): When we receive a "changed" signal, clamp the new value to the adjustment bounds to avoid segfaulting if someone tries to change the adjustment to a bogus value. (Bug #1795) Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c: Ignore unexpected destroy notifies for children, for toplevel windows handle them like delete_event. * gtk/gtkplug.c: Add an unrealize handler so that we unref plug->socket_window when we are done with it. Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktext.c (clear_area): Fix stupid signedness problem that was causing background to sometimes be misaligned. Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com> [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ] * gtk/gtkmenu.c (gtk_menu_position): Make sure we never position menus with negative x, y, since gtk_widget_set_uposition() can't handle that. * gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Modify the positioning code a bit so that we always put the top-left corner onscreen. (This is for UI reasons, gtk_menu_position() now takes care of gtk_widet_set_uposition() brokeness.) Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org> * gtk/Makefile.am: fixed up things for -jx, x > 1. Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the RC style that is passed in. The lack of the ref before was a bug. If people worked around this bug, this will introduce a slight memory leak in their code. The code should typically look like: rc_style = gtk_rc_style_new (); [...] gtk_widget_modify_style (widget, rc_style); gtk_rc_style_unref (rc_style); * gtk/gtkwidget.c (gtk_widget_modify_style): Reset the style if it was already set. * gtk/gtkwidget.c (gtk_widget_set_name): Only set the style if it was set before. Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c (main): Add a check to see if we are being run from the correct directory and to quit nicely if we are not. * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function static. Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org> * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS. * gtk/gtkwindow.c: queue resizes unconditionally (gtk_widget_queue_resize will figure what to do if the window is not realized). (gtk_window_move_resize): only recenter the window for GTK_WIN_POS_CENTER_ALWAYS. (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in the same way as GTK_WIN_POS_CENTER. Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c (gtk_window_reposition): check for the last position with (!(info->last_flags & GDK_HINT_POS)) instead of (!info->last_flags & GDK_HINT_POS). * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and new_height unconditionally, because we use these values even if !default_size_changed && !hints_changed. comented the (default_size_changed || hints_changed) case with respect to resize rejects from the window manager. * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values in the zvt condition hack, since this includes the window hints, set the hints after the handling_resize case. * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a window is initially shown with to the geometry. Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c (gtk_window_move_resize): s/size_changed/default_size_changed/g so i know what's really going on (frying brain on smaller flame now). Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if we have size_changed upon handling_resize. this is a gross workaround for the broken zvt widget and should be removed in 1.3 again (search for FIXME). Owen provided an accurate comment for this: /* We could be here for two reasons * 1) We coincidentally got a resize while handling * another resize. * 2) Our computation of size_changed was completely * screwed up, probably because one of our children * is broken. It's probably a zvt widget. * * For 1), we could just go ahead and ask for the * new size right now, but doing that for 2) * might well be fighting the user (and can even * trigger a loop). Since we really don't want to * do that, we requeue a resize in hopes that * by the time it gets handled, the child has seen * the light and is willing to go along with the * new size. (this happens for the zvt widget, since * the size_allocate() above will have stored the * requisition corresponding to the new size in the * zvt widget) * * This doesn't buy us anything for 1), but it shouldn't * hurt us too badly, since it is what would have * happened if we had gotten the configure event before * the new size had been set. */ Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: deal properly with the fact that RC style lists may include rc styles more than once. * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed unused static function. * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a stack of directories of RC files currently being parsed and implicitely add them to pixmap path. This fixes a bug where the directory would get appended then overwritten by pixmap_path declarations. (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>) * gtk/gtkthemes.c (gtk_theme_engine_unref): Call theme's exit function. (Patch from Peter Wainwright, bug #1454) * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy): Add a destroy() handler to take care of removing group for menu item. (Fixes bug #1197) * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko in warning message. Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server roundtrip to figure window's width and height, since we know that anyways from widget->allocation. Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_move_resize): Compute the hints after we request the new size. Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_compute_hints): Removed GTK_WIDGET_REALIZED() assertion - we can compute the hints before we are realized. * gtk/gtkwindow.c (gtk_window_move_resize): Reorder hint changing so that we have a value of hints_changed when we decide whether to constrain the window size. * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix. * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups, change back to G_MAXINT. Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize new GtkWindowGeometryInfo, so fields like GdkGeometry geometry contain uncluttered values. (gtk_window_compute_hints): simply assert that window is realized and that geometry_info is valid, since we rely on this anyways. (gtk_window_constrain_size): major cleanups to the code. if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height for the base size, instead of the minimums. use 32767 as max width and height (like in gtkwindow.c) instead of G_MAXINT. Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org> * cleaned up the GtkContainer.need_resize flag handling mess, we only need to force resize requests when we were prematurely realized, or our widget tree was modified when we were temporarily hidden. handling these cases directly upon showing the window (i.e. while the GdkWindow is still unmapped) avoids the need to wait for a configure event response and therefore makes the GUI more snappier and avoids blank windows during the roundtrip. * gtk/gtkwidget.c: (gtk_widget_hide): (gtk_widget_show): don't queue resizes on toplevels, they know how to deal with matters. * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize flag directly for not visible resize containers and spare us unecessary signal emissions. * gtk/gtkwindow.c: (gtk_window_realize): if we need to enforce premature size allocation, queue a container resize so we are correctly resized later on. (gtk_window_init): (gtk_window_size_request): don't freak around with the ->need_resize flag, gtk_container_queue_resize() will care about that. (gtk_window_show): handle initial resizing issues here, we can handle matters better in this place, especially since we know that our GdkWindow is still unmapped. (gtk_window_move_resize): don't care about ->need_resize at all. handle size changes properly that occoured while we waited for a configure event. Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_uposition): * gtk/gtkwindow.[hc] (gtk_window_reposition): Move the hint setting code from gtk_widget_set_uposition to here; set the hints so that we respect any previously set geometry hints. * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't change the window hints here or move the window here, let that happen in gtk_window_move_resize(). Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due to already queued resizes (and therefore redraws) on a widget, check its anchestry as well. * gtk/gtkcontainer.c: (gtk_container_queue_resize): clear resize widgets for resize containers before aborting prematurely. this is especially important for toplevels which may need imemdiate processing or their resize handler to be queued. (gtk_container_dequeue_resize_handler): added new internal function for gtkwindow.c. * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a configure event, take possible changes in window position into account as well. if we request a new window size, queue up a resize handler that will last until the configure event response arrives. combined the ->need_resize case (initial show) with the general size (hints) changed case and added even more comments. if !auto_shrink, only revert to the old allocation if the new size is smaller than the current allocation. Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy, gtk_window_set_geometry_hints gtk_window_set_default_size): When hints are set, queue a resize so that the hints will be eventually reset on the toplevel. * gtk/gtkwindow.c (gtk_window_show): Use gtk_window_compute_default_size(). Clear the need_resize flag on the initail map so that we don't unnecessarily trigger the resize code. * gtk/gtkwindow.c (gtk_window_move_resize): Split apart into separate functions. Compare the hints we are setting with what we set last time so that we can accurately tell when we need to reset the hints. * gtk/gtkwindow.c (gtk_window_compute_default_size): New function to figure out the size from requisition and default_size. * gtk/gtkwindow.c (gtk_window_constrain_size): Function from fvwm to constrain a size to the geometry hints. * gtk/gtkwindow.c (gtk_window_compare_hints): New function to compare two sets of geometry hints. * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed from gtk_window_set_hints(), just compute the hints, don't set them. * gtk/gtkwindow.c (gtk_window_compute_reposition): Move code from gtk_window_move_resize() to separate function, rationalize a bit. Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com> * gtkrc.h: Move the ref_count member out of the GtkRcStyle structure into a new private structure. * gtkrc.c: Split GtkRcStyle into public/private. In the private part, add a list of pointers to the RcStyle lists this RcStyle participates in. * gtkrc.c: When a RcStyle is free, remove all lists referencing it from the realized_style_ht hash, and free those lists. * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call gtk_rc_init(), since that adds the default styles to the list of parsed RC files again. * gtk/gtkrc.c: Use gtk_rc_style_find() consistently. Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity checks that ensure that a widget's allocation is at least 1 in width and height. (GNOME note: this doesn't affect old panel code anymore, because GtkSocket will request width and height of at least 1 since Fri Jul 23). * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been allocated yet (happens if the user realizes the window prematurely), size request and allocate it. (gtk_window_size_allocate): guard against guint underflows. Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org> * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs in gtk_built_sources, so gtk.defs gets built prior to all other sources. Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org> * gtk/Makefile.am: invoke indent on gtkmarshal.*. rewrote source generation rules, use COPYING as oldest source tag for a piggyback rule to generate all sources from (don't touch it ;). major cleanups, strip spaces on build rules for GNU Make. * gtk/genmarshal.pl: don't operate on hardcoded filenames but take source and target files from commandline arguments. don't invoke indent. Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org> * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize notebook after switch to avoid drawing problems. (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>) (gtk_notebook_pages_allocate): don't map not visible tab_labels, show them instead. (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>) Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org> * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize notebook after switch to avoid drawing problems. (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>) (gtk_notebook_pages_allocate): don't map not visible tab_labels, show them instead. (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>) Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c: we use window->need_resize from configure_event now, to indicate that the gtkwindow should keep its allocation (e.g. because the user resized the window through window manager handles). resize_count is now reliably used to figure whether we got the allocation we requested from the window manager. configure events get queued as resizes now, the real stuff (size computation and allocation) now only goes on in gtk_window_move_resize(). GtkWindow's requisition now contains its *real* requisition (like all other widgets), *not* taking usize into account. geometry_info->last_{width|height} is now updated from set_hints() only so it always contains the last hints we set for the window manager. made some event handlers return TRUE instead of FALSE. the overall code should be much more straight forward now, and the significant code portions are accompanied by comments now. (gtk_window_set_hints): removed requisition argument and made it fetch the requisition through gtk_widget_get_child_requisition. we also don't move the gdkwindow here anymore, gtk_window_move_resize() does that now. (gtk_window_show): ensure that the widget is realized before calling gtk_container_check_resize() (and thus gtk_window_move_resize()), also ensure that we got properly size requested and allocated before realization. (gtk_window_configure_event): ignore plain window moves, or reallocate the widget tree through the resize queue otherwise. (gtk_window_move_resize): mostly rewrote this function to figure window manager hints more reliably, coalesce window moves and resizes to reduce configure events and do actuall size allocations. Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets that have a resize pending, because a redraw is already queued for them. * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal hack to clear resize_widgets. * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets for resize containers prior to size allocation. (this is also a bit ugly, but avoids side effects for stopped emissions and is thus more reliable). (gtk_widget_unparent): removed disconnect call for clear_resize_widgets. * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this function from gtk_tooltips_expose, as we connect to ::expose_event *and* ::draw now. 1999-08-18 Federico Mena Quintero <federico@redhat.com> * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity checks. (gtk_target_list_unref): Likewise. * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise. Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): guard against division by zero. (Fixes bug #1339) Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_move_{forward,backward}_word): Prevent the trivial leak of information of allowing word motion when the entry is not visible. Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate modality to error dialog as well as confirmation dialogs. (Bug #1803, reported by Rosanna Wing Sze Yuen) Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor tree->view_lines. (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>) * gtk/Makefile.am (install-data-local): Solaris apparently has various troubles with ln -f; use rm first instead. (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>) 1999-07-30 Raja R Harinath <harinath@cs.umn.edu> * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir, use `cp' followed by `rm' (the `rm' was already there). July 30, 1999 Elliot Lee <sopwith@redhat.com> * configure.in: Fix autoconf warnings about cross compilation by trying to provide sane defaults for AC_TRY_RUN. * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir), put them into $(srcdir) when generated. Also add a dependency of gtksignal.h on gtkmarshal.h for -j builds. * gtk/gtk(dnd,style,gamma).c: Minor warning fixes. Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_iteration_do): Added missing GDK_THREADS_{LEAVE,ENTER} pair. (From Paul Fisher <pnfisher@redhat.com>) Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org> * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested width and height are always >0 (owen). Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent change that assured that a widget's allocated with and height are always >1, since this breaks *buggy* panel code. unfortunately this back-breaks the gimp's color selector. * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our allocation is always >0 in width and height, before sending the configure event; this is a *gross* hack to get the gimp back to work. * marked both cases with TODO-1.3 Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtktext.c: Don't display wrap indicators when text is not editable and word wrap is on. Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org> * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case option menus here as they are not derived from menu shell, assure that the option menu has a menu we can add items to. Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org> * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation-> width/height to (gint) before calculations and check against < 0 to avoid guint wraparounds. Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated width and height is never zero. sanity check both dimensions against 32767 and issue a warning if the allocation is greater than that. Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_events_pending): Unlock around call to g_main_pending() as well. Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_iteration): Unlock around call to g_main_iteration() - since that will regrab GTK+ lock to process events. Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c - Regularize with the rest of GTK+ by making widget->requisition not reflect the set_usize() - Always recompute geometry hints, then check if they changed before sending them to the X server. The previous checks for changes would fail in a number of circumstances. Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c: Include <stdlib.h> for strcmp(). Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkdnd.c: - Code cleanups - Instantaneously update on modifier key presses - Allow cancellation of the drag with Escape. Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/testgtk.c (create_handle_box): Set the policy to auto_shrink - otherwise the appearance is rather strange when flipping between horizontal and vertical. Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c: add ::default_width and ::default_height arguments. (gtk_window_set_default_size): don't change a value if it's < 0. queue a resize. Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org> * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts. Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't add an extra "/" when concating "/" + filename. (From Matt Grossman <mattg@oz.net>) Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask for fg_gc if we set it for drawing pixmap. Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com> Fixes from Peter Wainwright <prw@wainpr.demon.co.uk> * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is already set, call old engine's destroy function and unref the old engine. Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org> * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize. Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: mark certain functions as internal. Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org> * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the expand behaviour changed. * gtk/gtklabel.c (gtk_label_set_pattern): (gtk_label_set_justify): (gtk_label_set_line_wrap): don't bother invoking queue_clear, the reallocation does that for us, always free_words so the upcoming resize will relayout the label's contents. Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org> * applied argument implementation patches from Elena Devdariani <elena@cogent.ca>. * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size, ::space_style, ::relief * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size * gtk/gtkpreview.c: ::expand * gtk/gtkpaned.c: ::handle_size, ::gutter_size * gtk/gtknotebook.c: ::homogeneous * gtk/gtklabel.c: ::wrap * gtk/gtklist.c: ::selection_mode * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity * gtk/gtkclist.c: ::sort_type * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c: Removed ill-thought-out part of last comment. Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_attach): Get the reference counting right when we have to attach a new style for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>) * gtk/gtkstyle.c: Documented the refcounting peculularities of gtk_style_attach. 1999-06-01 Tim Janik <timj@dhcpd7.redhat.com> * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid window types. * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead of GTK_TOPLEVEL for creating the window. 1999-06-01 Tim Janik <timj@dhcpd7.redhat.com> * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is the last argument (reported by Per Winkvist). Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com> Fixes for invisible XOR lines (Frank Loemker <floemker@TechFak.Uni-Bielefeld.DE>) * gtk/gtkclist.c (gtk_clist_realize): Always use a non-zero pixel for GDK_XOR. * gtk/gtkvpaned.c gtk/gtkhpaned.c: Use GDK_INVERT instead of GDK_XOR. Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org> * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed signals if h/voffsets differ from adjustment values. Reportet by Jerome Bolliet <bolliet@in2p3.fr> Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate ::selection-done emissions up to the topmost menu shell. Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset the user data on the window before destroying it. * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an unrealize handler to take care of destroying notebook->panel properly. (Bug #1198 - Morten Welinder <terra@diku.dk>) * gtk/gtktext.c (expand_scratch_buffer): Fix reversal of g_new and g_realloc to stop memory leak. (Actually, we could just use g_realloc(), but I'm not 100% sure that is portable). (Bug #1196 - Morten Welinder <terra@diku.dk>) Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkplug.h: Removed stray GtkPlugButton declaration. * gdk/gdkfont.c (gdk_text_measure): Fix the return value for fontsets. * gtk/gtkbutton.c (gtkbutton_expose): Fix warning with bin/button confusion. Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org> * gtk/testgtk.c: in the ItemFactory test, link radio items together, and show how preselection of radio items is done. Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org> * gtk/gtktreeitem.c (gtk_tree_item_set_subtree): * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert): * gtk/gtktoolbar.c (gtk_toolbar_insert_element): * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1): * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add): * gtk/gtktable.c (gtk_table_attach): * gtk/gtklist.c (gtk_list_insert_items): * gtk/gtkmenushell.c (gtk_menu_shell_insert): * gtk/gtknotebook.c (gtk_notebook_insert_page_menu): * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add): * gtk/gtkbin.c (gtk_bin_add): * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end): * gtk/gtkfixed.c (gtk_fixed_put): * gtk/gtklayout.c (gtk_layout_put): general fixups to container_add logic. always realize child if child->parent is realized, only map the child and queue a resize if child and child->parent are both visible. Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall instead of gtk_container_foreach to walk and unrealize children, so composite children get also unrealized. (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to. (gtk_widget_map): assert that the widget is visible (basic constrain). (gtk_widget_real_map): assert that the widget is realized (basic constrain). Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org> * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak. Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc file for iso-8859-2 locales. * configure.in (ALL_LINGUAS): ALL_LINGUAS update. Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES. (Pointed out by andy@rz.uni-karlsruhe.de and others). Remove some suspicious and useless lines. Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use width,height = 0, 0 to mean - here to edge of window, instead of -1, -1, since the former is all we support. Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main): Correctly free list nodes when removing from quit_functions list. Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org> * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable. Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): When redrawing characters on non-visible entry, use appropriate '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>) Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org> * gtk/gtkclist.c (drag_dest_cell): compute destination cell from drag coordinates. (gtk_clist_drag_data_received) (gtk_clist_drag_motion): use drag_dest_cell. * gtk/gtktree (drag_dest_cell) (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise. (Bug #1129) Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org> * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize translate_* fields. (gtk_item_factory_finalize): invoke translate_notify independant from translate_data. (gtk_item_factory_set_translate_func): likewise. (gtk_item_factory_destroy): only remove ifactory pointer from those widgets that belong to us (stupid me). Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of rc_style list when lookup succeeeds. Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org> * gtk/gtkctree.c (resync_selection): * gtk/gtkclist.c (resync_selection): fixed undo_selection bug. * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection bug. Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c: Add some missing GDK_THREADS_ENTER()/LEAVE around timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>) Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org> * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate() rather than emit_by_name. * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference on the widget across multiple signal emissions. (gtk_editable_delete_text): same here. (gtk_editable_class_init): set widget_class->activate_signal after editable_signals[ACTIVATE] has been created. Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp position here prematurely -- we might not have the right ->min_position and ->max_position yet. Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request): Add error traps so if the other end of the connection dies, we survive. * gtk/gtkselection.c (gtk_selection_notify): Clean up properly when selection property retrieval fails. * gtk/gtkselection.c (gtk_selection_request): Correctly reject SelectionRequest notifies where the handler returns no data. Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight when we've previously highlighted. * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't emit two "drag_leave" signals for Motif drops. * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send back the correct status messages when dropping from Motif onto a proxy window that is rejecting the drop. Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org> * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal() to compare two argument values. added gtk_arg_to_valueloc() to set a variable from an arg through its location (pointer). * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected as gfloat*, uchars are collected as guchar*, ints are collected as gint*, etc... Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c: Include <string.h> instead of <strings.h>. * gtk/gtkstyle.c: Fix double include of gtkthemes.h (actually, a lot more duplicate includes occur if you trace through the sequence of #include's) gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com> Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp> gtk-a-higuti-990322-[0-3] * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS that was causing -DX_LOCALE not to work. * gtk/gtkrc.c (gtk_rc_init): X_LOCALE will never have LC_MESSAGES defined Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org> * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from g_get_home_dir() (gtk-pmc-990123-0.patch.gz). * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/ left/right as well (gtk-michael-980726-0.patch.gz). * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/ for pointer values, use gchar instead of char. fixed uline allocation leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem chunks instead of G_ALLOC_ONLY. (gtk_label_size_request): always alter requisition as passed and leave widget->requisition alone. (gtk_label_set_text): allow NULL strings. (gtk_label_new): likewise. Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org> * gtk/gtkdrawingarea.[hc]: type/macro fixups. Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org> * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible *and* mapped (i.e. drawable). (gtk_bin_expose): only send exposes to drawable children. * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable. (gtk_box_expose): only send exposes to drawable children. * gtk/gtkhscale.c (gtk_hscale_draw): * gtk/gtkvscale.c (gtk_vscale_draw): hm, this is an ugly one. we first compute the size of our trough area here (window relative) and then check intersection with the draw_area which is parent relative because we're a NO_WINDOW widget, so we need to offset the trough area by allocation.x and allocation.y before the check. (this must not be done for the background area though, since that's already computed parent relative). Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org> * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary, unrealize title buttons. Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org> * gtk/gtkclist.c (gtk_clist_column_title_passive) (gtk_clist_column_title_active): only connect/disconnect to GtkWidgetClass::event to block mouse events. * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout): zero initialize event, removed superfluous gdk_window_get_pointer call * gtk/gtklist.c (gtk_list_vertical_timeout) (gtk_list_horizontal_timeout): removed superfluous gdk_window_get_pointer call Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org> * plugging problems reported by "Bruce Mitchener, Jr." <bruce@puremagic.com> due to a purify session. * gtk/gtkstyle.c: (gtk_style_ref): (gtk_style_unref): assert ref_count to be > 0. * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize the requisition. (gtk_clist_set_shift): likewise. * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the adjustments. * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the event before sending it and set send_event to TRUE (which needs to be done for *all* synthesized events). (gtk_list_vertical_timeout): likewise. * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory leaks. * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event to TRUE when synthesizing events. [ *** end of merges from 1.2 *** ]
-rw-r--r--ChangeLog1301
-rw-r--r--ChangeLog.pre-2-01301
-rw-r--r--ChangeLog.pre-2-101301
-rw-r--r--ChangeLog.pre-2-21301
-rw-r--r--ChangeLog.pre-2-41301
-rw-r--r--ChangeLog.pre-2-61301
-rw-r--r--ChangeLog.pre-2-81301
-rw-r--r--INSTALL.in187
-rw-r--r--NEWS96
-rw-r--r--README.in101
-rw-r--r--configure.in13
-rw-r--r--docs/gdk.texi2
-rw-r--r--docs/generation.txt177
-rw-r--r--examples/packer/pack.c2
-rw-r--r--gtk+.spec.in5
-rw-r--r--gtk-config.in2
-rw-r--r--gtk/.cvsignore7
-rw-r--r--gtk/Makefile.am607
-rwxr-xr-xgtk/genmarshal.pl27
-rw-r--r--gtk/gtkaccelgroup.h43
-rw-r--r--gtk/gtkarg.c225
-rw-r--r--gtk/gtkarg.h13
-rw-r--r--gtk/gtkaspectframe.c163
-rw-r--r--gtk/gtkaspectframe.h20
-rw-r--r--gtk/gtkbin.c30
-rw-r--r--gtk/gtkbindings.c1
-rw-r--r--gtk/gtkbox.c40
-rw-r--r--gtk/gtkbutton.c2
-rw-r--r--gtk/gtkcheckmenuitem.c72
-rw-r--r--gtk/gtkclist.c43
-rw-r--r--gtk/gtkclist.h3
-rw-r--r--gtk/gtkcolorsel.c105
-rw-r--r--gtk/gtkcolorsel.h21
-rw-r--r--gtk/gtkcontainer.c95
-rw-r--r--gtk/gtkcontainer.h54
-rw-r--r--gtk/gtkctree.c14
-rw-r--r--gtk/gtkcurve.c103
-rw-r--r--gtk/gtkdnd.c348
-rw-r--r--gtk/gtkdrawingarea.h8
-rw-r--r--gtk/gtkeditable.c10
-rw-r--r--gtk/gtkeditable.h5
-rw-r--r--gtk/gtkentry.c29
-rw-r--r--gtk/gtkenums.h3
-rw-r--r--gtk/gtkfilesel.c13
-rw-r--r--gtk/gtkfixed.c14
-rw-r--r--gtk/gtkfontsel.c26
-rw-r--r--gtk/gtkgamma.c2
-rw-r--r--gtk/gtkgamma.h11
-rw-r--r--gtk/gtkhandlebox.c49
-rw-r--r--gtk/gtkhandlebox.h8
-rw-r--r--gtk/gtkhpaned.c44
-rw-r--r--gtk/gtkhscale.c10
-rw-r--r--gtk/gtkitemfactory.c94
-rw-r--r--gtk/gtklabel.c318
-rw-r--r--gtk/gtklayout.c107
-rw-r--r--gtk/gtklist.c92
-rw-r--r--gtk/gtkmain.c36
-rw-r--r--gtk/gtkmenu.c21
-rw-r--r--gtk/gtkmenuitem.c44
-rw-r--r--gtk/gtkmenushell.c49
-rw-r--r--gtk/gtknotebook.c136
-rw-r--r--gtk/gtkobject.c43
-rw-r--r--gtk/gtkobject.h8
-rw-r--r--gtk/gtkpacker.c41
-rw-r--r--gtk/gtkpaned.c152
-rw-r--r--gtk/gtkplug.c28
-rw-r--r--gtk/gtkplug.h1
-rw-r--r--gtk/gtkpreview.c69
-rw-r--r--gtk/gtkpreview.h10
-rw-r--r--gtk/gtkprivate.h4
-rw-r--r--gtk/gtkradiomenuitem.c36
-rw-r--r--gtk/gtkrc1
-rw-r--r--gtk/gtkrc.bg8
-rw-r--r--gtk/gtkrc.c398
-rw-r--r--gtk/gtkrc.el8
-rw-r--r--gtk/gtkrc.eo8
-rw-r--r--gtk/gtkrc.h3
-rw-r--r--gtk/gtkrc.he4
-rw-r--r--gtk/gtkrc.hy4
-rw-r--r--gtk/gtkrc.iso-8859-137
-rw-r--r--gtk/gtkrc.iso-8859-148
-rw-r--r--gtk/gtkrc.iso-8859-158
-rw-r--r--gtk/gtkrc.iso-8859-214
-rw-r--r--gtk/gtkrc.iso-8859-514
-rw-r--r--gtk/gtkrc.iso8859136
-rw-r--r--gtk/gtkrc.iso8859146
-rw-r--r--gtk/gtkrc.iso8859156
-rw-r--r--gtk/gtkrc.iso8859212
-rw-r--r--gtk/gtkrc.iso8859512
-rw-r--r--gtk/gtkrc.ja4
-rw-r--r--gtk/gtkrc.ka_GE.georgianacademy4
-rw-r--r--gtk/gtkrc.ka_GE.georgianps4
-rw-r--r--gtk/gtkrc.ko10
-rw-r--r--gtk/gtkrc.ru10
-rw-r--r--gtk/gtkrc.sl6
-rw-r--r--gtk/gtkrc.th4
-rw-r--r--gtk/gtkrc.tr8
-rw-r--r--gtk/gtkrc.uk8
-rw-r--r--gtk/gtkrc.vi_VN.tcvn7
-rw-r--r--gtk/gtkrc.vi_VN.viscii7
-rw-r--r--gtk/gtkrc.zh_CN4
-rw-r--r--gtk/gtkrc.zh_TW.Big54
-rw-r--r--gtk/gtkruler.c85
-rw-r--r--gtk/gtkruler.h29
-rw-r--r--gtk/gtkscrolledwindow.c19
-rw-r--r--gtk/gtkselection.c41
-rw-r--r--gtk/gtkselection.h2
-rw-r--r--gtk/gtksignal.c20
-rw-r--r--gtk/gtksocket.c4
-rw-r--r--gtk/gtkstyle.c51
-rw-r--r--gtk/gtkthemes.c5
-rw-r--r--gtk/gtktipsquery.c5
-rw-r--r--gtk/gtktoolbar.c116
-rw-r--r--gtk/gtktoolbar.h22
-rw-r--r--gtk/gtktooltips.c17
-rw-r--r--gtk/gtktree.c73
-rw-r--r--gtk/gtktreeitem.c53
-rw-r--r--gtk/gtkvpaned.c43
-rw-r--r--gtk/gtkwidget.c172
-rw-r--r--gtk/gtkwindow.c1215
-rw-r--r--gtk/gtkwindow.h3
-rw-r--r--gtk/makeenums.h2
-rw-r--r--gtk/simple.c1
-rw-r--r--gtk/testgtk.c52
-rw-r--r--tests/simple.c1
-rw-r--r--tests/testgtk.c52
126 files changed, 13816 insertions, 2123 deletions
diff --git a/ChangeLog b/ChangeLog
index 22c6c8096..01da37158 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 22c6c8096..01da37158 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,1304 @@
+Fri Nov 19 10:34:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkgamma.h: Adapt cast macros to standard.
+
+Wed Nov 17 18:36:05 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkrectangle.c (gdk_rectangle_union gdk_rectangle_intersect):
+ Fixes so that it is safe to have dest the same as
+ src1 or src2.
+
+Wed Nov 17 15:58:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkregion-x11.c (gdk_region_get_clipbox): Indentation fix.
+
+[ Merges from 1.2 ]
+
+Tue Nov 16 10:15:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
+ If translation does not include a '/', use entire
+ translation instead of crashing.
+
+Sun Oct 31 22:21:11 1999 Tim Janik <timj@gtk.org>
+
+ * docs/gtk_tut.sgml:
+ s/gtk_accel_group_attach/gtk_window_add_accel_group/.
+
+Sat Oct 30 09:09:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_remove): Use
+ g_list_remove_link, not g_list_remove.
+
+ [ From Geert Bevin <gbevin@thunderstorms.org> ]
+
+Sun Oct 24 07:41:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.c (real_undo_selection): commented out g_print()
+ statement upon unselection (how the heck did that slip in?).
+
+Sat Oct 23 03:03:08 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_freeze):
+ (gtk_text_thaw): undraw/draw cursor here to avoid unnecessary scrolling
+ in frozen state (and aparently crashes). patch provided by Anders
+ Melchiorsen <and@kampsax.dtu.dk>.
+
+Sat Oct 23 02:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * fix insensitive default/focus widget activation,
+ reported by Matt Goodall <mgg@isotek.co.uk>.
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event):
+ (gtk_window_activate_default):
+ (gtk_window_activate_focus):
+ return handled=FALSE for actiavtion of insensitive default
+ widgets. return handled=TRUE for activation of insensitive
+ focus widgets. don't activate in either case.
+
+Tue Oct 19 09:55:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk-config.in (lib_gtk): Switch order of @x_cflags@
+ and $glib_cflags to match library order and in the
+ theory that an old version of GLib is more likely to
+ be in the include directory for X then vice-versa.
+ (Bug #2776)
+
+Tue Oct 19 09:46:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always use LC_CTYPE
+ to determine the locale for fontsets, not LC_MESSAGES;
+ the user may want English messages with a handling
+ for non-English languages. (LC_CTYPE=ru_RU LC_MESSAGES=fr_FR
+ will still be broken) (Bug #2891)
+
+Tue Oct 19 20:36:42 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Fixed the wrong number of "*"'s.
+
+Tue Oct 19 12:15:13 1999 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
+
+ * gtk/gtkrc.ko: Changed the Korean default fontset.
+
+Fri Oct 8 02:32:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklayout.c (gtk_layout_adjustment_changed): Fix bug
+ where when scrolling to the left or top double exposes
+ were done, causing major slowdowns.
+
+Thu Oct 7 18:31:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Always normalize codeset
+ names to lowercase and alphanumeric, before looking
+ them up.
+
+ * gtk/Makefile.am: Install codeset variant gtkrc files
+ with normalized names.
+
+Thu Oct 7 22:52:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_popup_with_data): even
+ popup menus when the menu is already visible, but its parent
+ is still hidden, (happens after tornoff window got hidden).
+
+Thu Oct 7 11:09:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (install-data-local): Fix
+ a typo where gtkrc.vi_VN.tcvn5712 wasn't getting
+ deleted, causing error messages on install.
+
+Thu Oct 7 11:03:06 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtk[hv]paned.c (gtk_{h,v}paned_draw): Redraw
+ the handle as well, since we now sometimes ignore
+ exposes on the handle while resizing.
+
+Wed Oct 6 18:02:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_pixmap_path): Fix stupid
+ extra g_free introduced in one of the last one or two
+ commits.
+
+Wed Oct 6 16:38:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc*: Make naming of gtkrc files
+ consistent, put each style that a gtkrc.* file creates
+ in a unique namespace, remove old files before installing.
+
+Wed Oct 6 14:31:16 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_init): Avoid leaking memory when
+ gtk_rc_init is called multiple times. (Yes, people who
+ do that have bugs in their code.)
+
+Tue Oct 5 11:36:57 PDT 1999 Manish Singh <yosh@gimp.org>
+
+ * gtk/Makefile.am: listing gtkrc in gtkconf_DATA seems to barf.
+ Remove it since it's generated by the Makefile anyway
+
+Tue Oct 5 02:43:41 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkinputcommon.h (gdk_input_device_new): Free
+ device->info.axes for core pointer.
+
+Thu Sep 30 13:55:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (destroy_idle_test): Rename idle to
+ idle_id, to deal with obsolete, broken C libraries.
+
+Mon Sep 27 02:50:15 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkvscale.c (gtk_vscale_draw): Don't add in
+ allocation->x/y twice!
+
+ * gtk/gtkhscale.c: Make usage of gtk_hscale_pos_trough()
+ consistent with gtk_vscale_pos_trough().
+
+Sun Sep 26 19:44:34 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): We may
+ be queueing a resize on a toplevel container between
+ the time we show it and when we map it. So, we need
+ to test GTK_WIDGET_VISIBLE() for toplevels, and only
+ use GTK_WIDGET_DRAWABLE() for child windows.
+
+Thu Sep 23 16:41:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (LDADDS): Add GDK_WLIBS to LDADDS
+ (fixes bug #2144)
+
+Fri Sep 24 00:51:45 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): check for
+ container DRAWABLE (instead of VISIBLE), so we don't queue
+ resizes on non-toplevel containers.
+
+Sun Sep 19 18:13:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.[ch]: Make the data argument
+ const guchar *.
+
+Sat Sep 18 21:27:40 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c: Try to behave sensibly if
+ the focus widget is the window itself. (Should
+ we allow this at all?)
+
+Fri Sep 17 09:57:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_set_sensitive):
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable):
+ * gtk/gtknotebook.c (gtk_notebook_set_show_border):
+ * gtk/gtkclist.c (gtk_notebook_set_show_border): make gboolean args
+ in prototypes and implementations consistent (Tomas Ogren).
+
+ * gtk/gtklayout.c (gtk_layout_remove): unset GTK_IS_OFFSCREEN flag
+ before the widget is unparented (reported by damon).
+
+ * gtk/gtkdnd.c: make the cursor and icon data _unsigned_ char,
+ since we provide unsigned data anyways.
+
+Thu Sep 16 21:32:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktooltips.c (gtk_tooltips_set_tip): Delay
+ the call to gtk_tooltips_layout_text() until later.
+
+ * gtk/gtktooltips.c (gtk_tooltips_draw_tips):
+ Call gtk_widget_ensure_style() before using the style.
+
+Wed Sep 15 02:52:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_event): Added workaround
+ for old widgets that don't propagate draws to all
+ children. (Namely gnome-dock for gnome-libs <= 1.0.16)
+
+Tue Sep 14 19:22:19 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_resize): don't queue the parent
+ for a redraw but just the widget that requested the resize.
+
+Tue Sep 14 18:29:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkcontainer.c: added new widget level method
+ gtk_container_set_reallocate_redraws() and a GtkContainer flag
+ reallocate_redraws : 1 to reflect the setting, exported this through
+ the argument system as a boolean ::reallocate_redraws.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): when queueing redraws
+ on the widget because the allocation changes, do so as well for
+ widget->parent if the parent has reallocate_redraws set to TRUE.
+ with that containers requesting reallocation redraws get automatically
+ redrawn if their children changed allocation (this unfortunately
+ affects also other children that didn't change allocation, but we
+ cannot work around that before 1.3).
+
+Tue Sep 14 18:23:01 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): only emit ::draw if width
+ _and_ height are >0 (not _or_).
+
+ * gtk/gtktable.c (gtk_table_remove): use gtk_widget_queue_resize()
+ instead of gtk_container_queue_resize(), which is a core gtk internal
+ function (must have been on crack when i queued that).
+
+ * gtk/gtkprivate.h: added new private flag GTK_FULLDRAW_PENDING, so
+ we can check more reliably if we want to discard expose events.
+ * gtk/gtkwidget.c: added setting/unsetting of the GTK_FULLDRAW_PENDING
+ flag.
+
+ * gtk/gtkwidget.c (gtk_widget_event): don't discard synthesized exposes,
+ we simply trust these events. for deciding whether to discard exposes,
+ check GTK_FULLDRAW_PENDING instead of RESIZE_PENDING.
+
+Mon Sep 13 15:01:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Ignore
+ queues of areas that are completely off screen.
+
+ * gtk/gtkwidget.c (gtk_widget_idle_draw): Fix broken
+ logic for handleboxes.
+
+ * gtk/gtkwidget.c (gtk_widget_queue_draw_data): Add santity
+ check on width/height.
+
+Mon Sep 13 02:22:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: backed out Raja's recent VPATH build "improvements",
+ we are fine with using $@ the way we do (if we actually encounter
+ brokeness with $@ in VPATH builds because of additional path prefixes,
+ we need to use $(@F) actually).
+
+Mon Sep 13 01:34:53 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksignal.c: renamed two variables, hopefully didn't introduce
+ short lived bugs, that would allow language bindings to do surgeries
+ to our guts.
+
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo
+ where comparison was being done against an uninitialized
+ value causing intermittant results depending on
+ compiler flags. Also make it clearer that we aren't
+ ever initializing the child as 0x0 (though this will
+ be caught in gtk_widget_size_allocate())
+
+Fri Sep 10 10:06:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_transient_for): Move
+ gtk_window_unset_transient_for() call after we do checks
+ involving the old transient parent.
+ [ From Lance Capser <lmc@cyberhighway.net> ]
+
+1999-09-07 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gtk.defs): Go back to using `touch' to create
+ an empty file.
+
+Mon Sep 6 00:11:56 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (gtk_ctree_is_ancestor): return FALSE if node has
+ no children. (Reported by: Chris Rogers <gandalf@pobox.com>)
+
+1999-09-03 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (gen_sources): Improve VPATH builds.
+ `$@' is valid only in the build dir, not after we've done
+ `cd $srcdir'. Also use `test -f' instead of less portable
+ `test -e'.
+
+Fri Sep 3 15:59:56 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (correct_cache_insert): Rewrite
+ for simplicity, and hopefully correctness.
+ (Fixes bug #1322, which was a segfault when
+ on some insertions with the properties around
+ the insertion set up just wrong.)
+
+ * gtk/gtktext.c (gtk_text_adjustment): When we receive
+ a "changed" signal, clamp the new value to the adjustment
+ bounds to avoid segfaulting if someone tries to change
+ the adjustment to a bogus value. (Bug #1795)
+
+Thu Sep 2 16:33:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c: Ignore unexpected destroy notifies
+ for children, for toplevel windows handle them
+ like delete_event.
+
+ * gtk/gtkplug.c: Add an unrealize handler so that
+ we unref plug->socket_window when we are done
+ with it.
+
+Fri Sep 3 14:52:54 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c (clear_area): Fix stupid signedness
+ problem that was causing background to sometimes
+ be misaligned.
+
+Fri Sep 3 12:26:33 1999 Owen Taylor <otaylor@redhat.com>
+
+ [ Fixes pointed out by Ettore Perazzoli <ettore@comm2000.it> ]
+
+ * gtk/gtkmenu.c (gtk_menu_position): Make
+ sure we never position menus with negative x, y,
+ since gtk_widget_set_uposition() can't handle that.
+
+ * gtk/gtkmenuitem.c (gtk_menu_item_position_menu):
+ Modify the positioning code a bit so that we always
+ put the top-left corner onscreen. (This is for
+ UI reasons, gtk_menu_position() now takes care of
+ gtk_widet_set_uposition() brokeness.)
+
+Fri Sep 3 03:06:30 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am: fixed up things for -jx, x > 1.
+
+Sun Sep 5 08:48:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Ref the
+ RC style that is passed in. The lack of the ref
+ before was a bug. If people worked around this
+ bug, this will introduce a slight memory leak
+ in their code. The code should typically look like:
+
+ rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+
+ * gtk/gtkwidget.c (gtk_widget_modify_style): Reset
+ the style if it was already set.
+
+ * gtk/gtkwidget.c (gtk_widget_set_name): Only set the
+ style if it was set before.
+
+Thu Sep 2 19:02:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (main): Add a check to see if we
+ are being run from the correct directory and
+ to quit nicely if we are not.
+
+ * gtk/gtkrc.c (gtk_rc_slist_remove_all): Make function
+ static.
+
+Thu Sep 2 23:00:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkenums.h (GtkWindowPosition): added GTK_WIN_POS_CENTER_ALWAYS.
+
+ * gtk/gtkwindow.c:
+ queue resizes unconditionally (gtk_widget_queue_resize will figure
+ what to do if the window is not realized).
+ (gtk_window_move_resize): only recenter the window
+ for GTK_WIN_POS_CENTER_ALWAYS.
+ (gtk_window_compute_reposition): handle GTK_WIN_POS_CENTER_ALWAYS in
+ the same way as GTK_WIN_POS_CENTER.
+
+Thu Sep 2 22:39:27 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_reposition): check for the last position
+ with (!(info->last_flags & GDK_HINT_POS)) instead of
+ (!info->last_flags & GDK_HINT_POS).
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): constrain new_width and
+ new_height unconditionally, because we use these values even if
+ !default_size_changed && !hints_changed.
+ comented the (default_size_changed || hints_changed) case with
+ respect to resize rejects from the window manager.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): save info->last values
+ in the zvt condition hack, since this includes the window hints, set
+ the hints after the handling_resize case.
+
+ * gtk/gtkwindow.c (gtk_window_show): constrain the default size that a
+ window is initially shown with to the geometry.
+
+Thu Sep 2 07:38:56 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize):
+ s/size_changed/default_size_changed/g so i know what's
+ really going on (frying brain on smaller flame now).
+
+Thu Sep 2 05:47:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): queue a new resize if
+ we have size_changed upon handling_resize. this is a gross
+ workaround for the broken zvt widget and should be removed in
+ 1.3 again (search for FIXME).
+ Owen provided an accurate comment for this:
+
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken. It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+Wed Sep 1 20:46:11 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c: deal properly with the fact that RC
+ style lists may include rc styles more than once.
+
+ * gtk/gtkrc.c (gtk_rc_append_pixmap_path): Removed
+ unused static function.
+
+ * gtk/gtkrc.c (gtk_rc_find_pixmap_in_path): Keep a
+ stack of directories of RC files currently being
+ parsed and implicitely add them to pixmap path.
+
+ This fixes a bug where the directory would get
+ appended then overwritten by pixmap_path declarations.
+
+ (bug #1462, from Peter Wainright <prw@wainpr.demon.co.uk>)
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Call
+ theme's exit function. (Patch from Peter Wainwright,
+ bug #1454)
+
+ * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_destroy):
+ Add a destroy() handler to take care of removing
+ group for menu item. (Fixes bug #1197)
+
+ * gtk/gtkwidget.c (gtk_widget_size_request): Fixed thinko
+ in warning message.
+
+Wed Sep 1 21:27:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): don't require a server
+ roundtrip to figure window's width and height, since we know that
+ anyways from widget->allocation.
+
+Wed Sep 1 12:37:44 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Compute
+ the hints after we request the new size.
+
+Wed Sep 1 10:38:37 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Removed
+ GTK_WIDGET_REALIZED() assertion - we can compute the
+ hints before we are realized.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Reorder
+ hint changing so that we have a value of hints_changed
+ when we decide whether to constrain the window size.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Spelling fix.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): cleanups,
+ change back to G_MAXINT.
+
+Wed Sep 1 06:54:59 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c (gtk_window_get_geometry_info): zero initialize
+ new GtkWindowGeometryInfo, so fields like GdkGeometry geometry
+ contain uncluttered values.
+ (gtk_window_compute_hints): simply assert that window is realized
+ and that geometry_info is valid, since we rely on this anyways.
+ (gtk_window_constrain_size): major cleanups to the code.
+ if (flags & GDK_HINT_BASE_SIZE) use geometry's base width and height
+ for the base size, instead of the minimums. use 32767 as max width
+ and height (like in gtkwindow.c) instead of G_MAXINT.
+
+Wed Sep 1 04:41:25 1999 Tim Janik <timj@gtk.org>
+
+ * cleaned up the GtkContainer.need_resize flag handling mess, we
+ only need to force resize requests when we were prematurely
+ realized, or our widget tree was modified when we were temporarily
+ hidden. handling these cases directly upon showing the window (i.e.
+ while the GdkWindow is still unmapped) avoids the need to wait for
+ a configure event response and therefore makes the GUI more snappier
+ and avoids blank windows during the roundtrip.
+
+ * gtk/gtkwidget.c:
+ (gtk_widget_hide):
+ (gtk_widget_show): don't queue resizes on toplevels, they know how
+ to deal with matters.
+
+ * gtk/gtkcontainer.c (gtk_container_queue_resize): set the ->need_resize
+ flag directly for not visible resize containers and spare us unecessary
+ signal emissions.
+
+ * gtk/gtkwindow.c:
+ (gtk_window_realize): if we need to enforce premature size allocation,
+ queue a container resize so we are correctly resized later on.
+ (gtk_window_init):
+ (gtk_window_size_request):
+ don't freak around with the ->need_resize flag,
+ gtk_container_queue_resize() will care about that.
+ (gtk_window_show):
+ handle initial resizing issues here, we can handle matters better in
+ this place, especially since we know that our GdkWindow is still
+ unmapped.
+ (gtk_window_move_resize):
+ don't care about ->need_resize at all.
+ handle size changes properly that occoured while we waited for a
+ configure event.
+
+Tue Aug 31 15:58:46 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_set_uposition):
+ * gtk/gtkwindow.[hc] (gtk_window_reposition):
+ Move the hint setting code from gtk_widget_set_uposition
+ to here; set the hints so that we respect any previously
+ set geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Don't
+ change the window hints here or move the window here,
+ let that happen in gtk_window_move_resize().
+
+Tue Aug 31 06:58:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): when discarding exposes due
+ to already queued resizes (and therefore redraws) on a widget, check
+ its anchestry as well.
+
+ * gtk/gtkcontainer.c:
+ (gtk_container_queue_resize): clear resize widgets for resize
+ containers before aborting prematurely. this is especially important
+ for toplevels which may need imemdiate processing or their resize
+ handler to be queued.
+ (gtk_container_dequeue_resize_handler): added new internal function for
+ gtkwindow.c.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): if we are resizing due to a
+ configure event, take possible changes in window position into account
+ as well.
+ if we request a new window size, queue up a resize handler that will
+ last until the configure event response arrives.
+ combined the ->need_resize case (initial show) with the general size
+ (hints) changed case and added even more comments.
+ if !auto_shrink, only revert to the old allocation if the new size
+ is smaller than the current allocation.
+
+Tue Aug 31 11:55:20 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_set_arg, gtk_window_set_policy,
+ gtk_window_set_geometry_hints
+ gtk_window_set_default_size):
+ When hints are set, queue a resize so that the hints will
+ be eventually reset on the toplevel.
+
+ * gtk/gtkwindow.c (gtk_window_show): Use
+ gtk_window_compute_default_size(). Clear the need_resize flag
+ on the initail map so that we don't unnecessarily trigger the
+ resize code.
+
+ * gtk/gtkwindow.c (gtk_window_move_resize): Split apart
+ into separate functions. Compare the hints we are setting
+ with what we set last time so that we can accurately
+ tell when we need to reset the hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_default_size): New
+ function to figure out the size from requisition
+ and default_size.
+
+ * gtk/gtkwindow.c (gtk_window_constrain_size): Function
+ from fvwm to constrain a size to the geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compare_hints): New function
+ to compare two sets of geometry hints.
+
+ * gtk/gtkwindow.c (gtk_window_compute_hints): Renamed
+ from gtk_window_set_hints(), just compute the hints,
+ don't set them.
+
+ * gtk/gtkwindow.c (gtk_window_compute_reposition): Move
+ code from gtk_window_move_resize() to separate function,
+ rationalize a bit.
+
+Tue Aug 31 13:05:03 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtkrc.h: Move the ref_count member out of the GtkRcStyle
+ structure into a new private structure.
+
+ * gtkrc.c: Split GtkRcStyle into public/private.
+ In the private part, add a list of pointers to the
+ RcStyle lists this RcStyle participates in.
+
+ * gtkrc.c: When a RcStyle is free, remove all
+ lists referencing it from the
+ realized_style_ht hash, and free those lists.
+
+ * gtk/gtkrc.c (gtk_rc_clear_styles): Don't call
+ gtk_rc_init(), since that adds the default styles
+ to the list of parsed RC files again.
+
+ * gtk/gtkrc.c: Use gtk_rc_style_find() consistently.
+
+Thu Aug 26 14:14:42 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): reactivated the sanity
+ checks that ensure that a widget's allocation is at least 1 in width
+ and height. (GNOME note: this doesn't affect old panel code anymore,
+ because GtkSocket will request width and height of at least 1 since
+ Fri Jul 23).
+
+ * gtk/gtkwindow.c (gtk_window_realize): if the widget hasn't been
+ allocated yet (happens if the user realizes the window prematurely),
+ size request and allocate it.
+ (gtk_window_size_allocate): guard against guint underflows.
+
+Wed Aug 25 19:01:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/Makefile.am (gtk_built_sources): reordered stamp-gtk.defs
+ in gtk_built_sources, so gtk.defs gets built prior to all other
+ sources.
+
+Mon Aug 23 19:11:17 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/Makefile.am:
+ invoke indent on gtkmarshal.*.
+ rewrote source generation rules, use COPYING as oldest source tag for
+ a piggyback rule to generate all sources from (don't touch it ;).
+ major cleanups, strip spaces on build rules for GNU Make.
+
+ * gtk/genmarshal.pl: don't operate on hardcoded filenames but take
+ source and target files from commandline arguments. don't invoke indent.
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Sat Aug 21 14:07:36 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_real_switch_page): queue_resize
+ notebook after switch to avoid drawing problems.
+ (Bug#856 Reported by: Theodore Roth <troth@netmagic.net>)
+
+ (gtk_notebook_pages_allocate): don't map not visible tab_labels,
+ show them instead.
+ (Bug#1805 Reported by: Dave Cole <dave@dccs.com.au>)
+
+Wed Aug 18 09:20:10 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c:
+ we use window->need_resize from configure_event now, to indicate that
+ the gtkwindow should keep its allocation (e.g. because the user resized
+ the window through window manager handles). resize_count is now reliably
+ used to figure whether we got the allocation we requested from the
+ window manager.
+ configure events get queued as resizes now, the real stuff (size
+ computation and allocation) now only goes on in gtk_window_move_resize().
+ GtkWindow's requisition now contains its *real* requisition (like all
+ other widgets), *not* taking usize into account.
+ geometry_info->last_{width|height} is now updated from set_hints() only
+ so it always contains the last hints we set for the window manager.
+ made some event handlers return TRUE instead of FALSE.
+ the overall code should be much more straight forward now, and the
+ significant code portions are accompanied by comments now.
+ (gtk_window_set_hints):
+ removed requisition argument and made it
+ fetch the requisition through gtk_widget_get_child_requisition.
+ we also don't move the gdkwindow here anymore, gtk_window_move_resize()
+ does that now.
+ (gtk_window_show):
+ ensure that the widget is realized before calling
+ gtk_container_check_resize() (and thus gtk_window_move_resize()), also
+ ensure that we got properly size requested and allocated before
+ realization.
+ (gtk_window_configure_event):
+ ignore plain window moves, or reallocate the widget tree through the
+ resize queue otherwise.
+ (gtk_window_move_resize):
+ mostly rewrote this function to figure window manager hints more
+ reliably, coalesce window moves and resizes to reduce configure events
+ and do actuall size allocations.
+
+Tue Aug 17 07:43:04 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_event): discard expose events for widgets
+ that have a resize pending, because a redraw is already queued for them.
+
+ * gtk/gtkcontainer.c: removed ugly connect_to ::size_allocate signal
+ hack to clear resize_widgets.
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): call clear_resize_widgets
+ for resize containers prior to size allocation. (this is also a bit
+ ugly, but avoids side effects for stopped emissions and is thus more
+ reliable).
+ (gtk_widget_unparent): removed disconnect call for clear_resize_widgets.
+
+ * gtk/gtktooltips.c (gtk_tooltips_paint_window): renamed this
+ function from gtk_tooltips_expose, as we connect to ::expose_event
+ *and* ::draw now.
+
+1999-08-18 Federico Mena Quintero <federico@redhat.com>
+
+ * gtk/gtkselection.c (gtk_target_list_ref): Added missing sanity
+ checks.
+ (gtk_target_list_unref): Likewise.
+
+ * gtk/gtkthemes.c (gtk_theme_engine_unref): Likewise.
+
+Tue Aug 17 15:47:07 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar):
+ guard against division by zero. (Fixes bug #1339)
+
+Tue Aug 17 10:56:49 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_move_{forward,backward}_word):
+ Prevent the trivial leak of information of allowing
+ word motion when the entry is not visible.
+
+Tue Aug 17 10:28:52 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_fileop_error): Propagate
+ modality to error dialog as well as confirmation dialogs.
+ (Bug #1803, reported by Rosanna Wing Sze Yuen)
+
+Wed Aug 11 01:04:57 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_draw_lines): Honor
+ tree->view_lines.
+ (gtk-guy-990611-3.patch: Guy Harris <guy@netapp.com>)
+
+ * gtk/Makefile.am (install-data-local): Solaris apparently
+ has various troubles with ln -f; use rm first instead.
+ (gtk-guy-990611-2.patch: Guy Harris <guy@netapp.com>)
+
+1999-07-30 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gtk/Makefile.am (stamp-m): Don't `mv' from builddir to srcdir,
+ use `cp' followed by `rm' (the `rm' was already there).
+
+July 30, 1999 Elliot Lee <sopwith@redhat.com>
+
+ * configure.in: Fix autoconf warnings about cross compilation by
+ trying to provide sane defaults for AC_TRY_RUN.
+ * gtk/Makefile.am: If we refer to gtkmarshal.[ch] in $(srcdir),
+ put them into $(srcdir) when generated. Also add a dependency of
+ gtksignal.h on gtkmarshal.h for -j builds.
+ * gtk/gtk(dnd,style,gamma).c: Minor warning fixes.
+
+Wed Jul 28 09:29:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration_do): Added missing
+ GDK_THREADS_{LEAVE,ENTER} pair.
+ (From Paul Fisher <pnfisher@redhat.com>)
+
+Fri Jul 23 01:00:15 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtksocket.c (gtk_socket_size_request): asure that the requested
+ width and height are always >0 (owen).
+
+Fri Jul 23 00:00:47 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): backed out my recent
+ change that assured that a widget's allocated with and height are
+ always >1, since this breaks *buggy* panel code. unfortunately this
+ back-breaks the gimp's color selector.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size_allocate): asure that our
+ allocation is always >0 in width and height, before sending the
+ configure event; this is a *gross* hack to get the gimp back to work.
+
+ * marked both cases with TODO-1.3
+
+Wed Jul 21 15:47:39 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktext.c: Don't display wrap indicators when
+ text is not editable and word wrap is on.
+
+Wed Jul 21 08:21:40 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_create_item): special case
+ option menus here as they are not derived from menu shell, assure that
+ the option menu has a menu we can add items to.
+
+Tue Jul 20 23:29:48 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtknotebook.c (gtk_notebook_page_allocate): convert allocation->
+ width/height to (gint) before calculations and check against < 0 to
+ avoid guint wraparounds.
+
+Sun Jul 18 00:35:49 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_size_allocate): ensure that the allocated
+ width and height is never zero. sanity check both dimensions against
+ 32767 and issue a warning if the allocation is greater than that.
+
+Wed Jul 7 15:03:30 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_events_pending): Unlock around call
+ to g_main_pending() as well.
+
+Wed Jul 7 14:59:01 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main_iteration): Unlock around
+ call to g_main_iteration() - since that will regrab
+ GTK+ lock to process events.
+
+Thu Jul 1 15:01:55 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c
+ - Regularize with the rest of GTK+ by making widget->requisition
+ not reflect the set_usize()
+ - Always recompute geometry hints, then check if they
+ changed before sending them to the X server. The
+ previous checks for changes would fail in a number
+ of circumstances.
+
+Thu Jul 1 11:55:59 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Include <stdlib.h> for strcmp().
+
+Wed Jun 30 19:26:36 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c:
+ - Code cleanups
+ - Instantaneously update on modifier key presses
+ - Allow cancellation of the drag with Escape.
+
+Tue Jun 29 17:04:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/testgtk.c (create_handle_box): Set the policy
+ to auto_shrink - otherwise the appearance is rather
+ strange when flipping between horizontal and vertical.
+
+Mon Jun 28 09:29:52 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwindow.c: add ::default_width and ::default_height arguments.
+ (gtk_window_set_default_size): don't change a value if it's < 0.
+ queue a resize.
+
+Sun Jun 27 11:00:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktext.c (gtk_text_insert): don't segfault on NULL inserts.
+
+Mon Jun 28 12:08:25 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (cmpl_completion_fullname): Don't
+ add an extra "/" when concating "/" + filename.
+ (From Matt Grossman <mattg@oz.net>)
+
+Mon Jun 28 10:57:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkctree.c (draw_cell_pixmap): Reset clip mask
+ for fg_gc if we set it for drawing pixmap.
+
+Tue Jun 15 12:45:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes from Peter Wainwright <prw@wainpr.demon.co.uk>
+
+ * gtk/gtkrc.c (gtk_rc_parse_engine): If rc_style->engine is
+ already set, call old engine's destroy function and
+ unref the old engine.
+
+Thu Jun 10 17:59:38 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_size): queue a resize.
+
+Wed Jun 9 15:13:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkaccelgroup.h: mark certain functions as internal.
+
+Wed Jun 9 13:48:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpreview.c (gtk_preview_set_expand): queue a resize if the
+ expand behaviour changed.
+
+ * gtk/gtklabel.c (gtk_label_set_pattern):
+ (gtk_label_set_justify):
+ (gtk_label_set_line_wrap):
+ don't bother invoking queue_clear, the reallocation does
+ that for us, always free_words so the upcoming resize will
+ relayout the label's contents.
+
+Wed Jun 9 12:50:48 1999 Tim Janik <timj@gtk.org>
+
+ * applied argument implementation patches from Elena Devdariani
+ <elena@cogent.ca>.
+
+ * gtk/gtktoolbar.c: ::orientation, ::toolbar_style, ::space_size,
+ ::space_style, ::relief
+ * gtk/gtkruler.c: ::lower, ::upper, ::position, ::max_size
+ * gtk/gtkpreview.c: ::expand
+ * gtk/gtkpaned.c: ::handle_size, ::gutter_size
+ * gtk/gtknotebook.c: ::homogeneous
+ * gtk/gtklabel.c: ::wrap
+ * gtk/gtklist.c: ::selection_mode
+ * gtk/gtkhandlebox.c: ::handle_position, ::snap_edge
+ * gtk/gtkcurve.c: ::curve_type, ::min_x, ::max_x, ::min_y, ::max_y
+ * gtk/gtkcolorsel.c: ::update_policy, ::use_opacity
+ * gtk/gtkclist.c: ::sort_type
+ * gtk/gtkcheckmenuitem.c: ::active, ::show_toggle
+ * gtk/gtkaspectframe.c: ::xalign, ::yalign, ::ratio, ::obey_child
+
+Tue Jun 1 23:38:38 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c: Removed ill-thought-out part of last
+ comment.
+
+Tue Jun 1 23:30:09 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkstyle.c (gtk_style_attach): Get the reference
+ counting right when we have to attach a new style
+ for a different visual. (Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
+
+ * gtk/gtkstyle.c: Documented the refcounting
+ peculularities of gtk_style_attach.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_new): added return if fail for invalid
+ window types.
+
+ * examples/packer/pack.c (main): use GTK_WINDOW_TOPLEVEL instead
+ of GTK_TOPLEVEL for creating the window.
+
+1999-06-01 Tim Janik <timj@dhcpd7.redhat.com>
+
+ * gtk/gtkmain.c (gtk_init_check): don't segfault when --gtk-module is
+ the last argument (reported by Per Winkvist).
+
+Tue May 25 13:13:12 1999 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for invisible XOR lines (Frank Loemker
+ <floemker@TechFak.Uni-Bielefeld.DE>)
+
+ * gtk/gtkclist.c (gtk_clist_realize): Always use
+ a non-zero pixel for GDK_XOR.
+
+ * gtk/gtkvpaned.c gtk/gtkhpaned.c:
+ Use GDK_INVERT instead of GDK_XOR.
+
+Wed May 12 21:56:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (adjust_adjustments): signal emit value_changed
+ signals if h/voffsets differ from adjustment values.
+ Reportet by Jerome Bolliet <bolliet@in2p3.fr>
+
+Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
+ ::selection-done emissions up to the topmost menu shell.
+
+Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
+ the user data on the window before destroying it.
+
+ * gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
+ unrealize handler to take care of destroying
+ notebook->panel properly.
+ (Bug #1198 - Morten Welinder <terra@diku.dk>)
+
+ * gtk/gtktext.c (expand_scratch_buffer): Fix reversal
+ of g_new and g_realloc to stop memory leak. (Actually,
+ we could just use g_realloc(), but I'm not 100% sure
+ that is portable).
+ (Bug #1196 - Morten Welinder <terra@diku.dk>)
+
+Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
+
+ * gdk/gdkfont.c (gdk_text_measure): Fix the return value
+ for fontsets.
+
+ * gtk/gtkbutton.c (gtkbutton_expose): Fix warning
+ with bin/button confusion.
+
+Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/testgtk.c: in the ItemFactory test, link radio items together,
+ and show how preselection of radio items is done.
+
+Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
+ * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
+ * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
+ * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
+ * gtk/gtktable.c (gtk_table_attach):
+ * gtk/gtklist.c (gtk_list_insert_items):
+ * gtk/gtkmenushell.c (gtk_menu_shell_insert):
+ * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
+ * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
+ * gtk/gtkbin.c (gtk_bin_add):
+ * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
+ * gtk/gtkfixed.c (gtk_fixed_put):
+ * gtk/gtklayout.c (gtk_layout_put):
+ general fixups to container_add logic. always realize child if
+ child->parent is realized, only map the child and queue a resize
+ if child and child->parent are both visible.
+
+Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
+ instead of gtk_container_foreach to walk and unrealize children, so
+ composite children get also unrealized.
+ (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
+ (gtk_widget_map): assert that the widget is visible (basic constrain).
+ (gtk_widget_real_map): assert that the widget is realized (basic
+ constrain).
+
+Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
+
+Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
+ file for iso-8859-2 locales.
+
+ * configure.in (ALL_LINGUAS): ALL_LINGUAS update.
+
+Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
+ (Pointed out by andy@rz.uni-karlsruhe.de and others).
+ Remove some suspicious and useless lines.
+
+Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
+ width,height = 0, 0 to mean - here to edge of window,
+ instead of -1, -1, since the former is all we support.
+
+Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmain.c (gtk_main): Correctly free list nodes
+ when removing from quit_functions list.
+
+Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
+
+Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
+ When redrawing characters on non-visible entry, use appropriate
+ '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
+
+Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (drag_dest_cell): compute destination cell
+ from drag coordinates.
+ (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
+ use drag_dest_cell.
+
+ * gtk/gtktree (drag_dest_cell)
+ (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
+ (Bug #1129)
+
+Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
+ translate_* fields.
+ (gtk_item_factory_finalize): invoke translate_notify independant from
+ translate_data.
+ (gtk_item_factory_set_translate_func): likewise.
+ (gtk_item_factory_destroy): only remove ifactory pointer from those
+ widgets that belong to us (stupid me).
+
+Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
+ rc_style list when lookup succeeeds.
+
+Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkctree.c (resync_selection):
+ * gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
+ * gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
+ bug.
+
+Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
+ Add some missing GDK_THREADS_ENTER()/LEAVE around
+ timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
+
+Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
+ rather than emit_by_name.
+
+ * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
+ on the widget across multiple signal emissions.
+ (gtk_editable_delete_text): same here.
+ (gtk_editable_class_init): set widget_class->activate_signal after
+ editable_signals[ACTIVATE] has been created.
+
+Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
+ position here prematurely -- we might not have the
+ right ->min_position and ->max_position yet.
+
+Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
+ Add error traps so if the other end of the connection
+ dies, we survive.
+
+ * gtk/gtkselection.c (gtk_selection_notify): Clean
+ up properly when selection property retrieval fails.
+
+ * gtk/gtkselection.c (gtk_selection_request): Correctly
+ reject SelectionRequest notifies where the handler
+ returns no data.
+
+Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
+ when we've previously highlighted.
+
+ * gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
+ emit two "drag_leave" signals for Motif drops.
+
+ * gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
+ back the correct status messages when dropping from
+ Motif onto a proxy window that is rejecting the
+ drop.
+
+Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
+ the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
+ to compare two argument values. added gtk_arg_to_valueloc() to set a
+ variable from an arg through its location (pointer).
+
+ * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
+ gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
+ as gfloat*, uchars are collected as guchar*, ints are collected as
+ gint*, etc...
+
+Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
+ Include <string.h> instead of <strings.h>.
+
+ * gtk/gtkstyle.c: Fix double include of gtkthemes.h
+ (actually, a lot more duplicate includes occur if
+ you trace through the sequence of #include's)
+ gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
+
+Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
+
+ Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
+ gtk-a-higuti-990322-[0-3]
+
+ * configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
+ that was causing -DX_LOCALE not to work.
+
+ * gtk/gtkrc.c (gtk_rc_init):
+ X_LOCALE will never have LC_MESSAGES defined
+
+Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
+ g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
+
+ * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
+ left/right as well (gtk-michael-980726-0.patch.gz).
+
+ * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
+ for pointer values, use gchar instead of char. fixed uline allocation
+ leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
+ chunks instead of G_ALLOC_ONLY.
+ (gtk_label_size_request): always alter requisition as passed and leave
+ widget->requisition alone.
+ (gtk_label_set_text): allow NULL strings.
+ (gtk_label_new): likewise.
+
+Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkdrawingarea.[hc]: type/macro fixups.
+
+Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
+ *and* mapped (i.e. drawable).
+ (gtk_bin_expose): only send exposes to drawable children.
+
+ * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
+ (gtk_box_expose): only send exposes to drawable children.
+
+ * gtk/gtkhscale.c (gtk_hscale_draw):
+ * gtk/gtkvscale.c (gtk_vscale_draw):
+ hm, this is an ugly one. we first compute the size of our trough area
+ here (window relative) and then check intersection with the draw_area
+ which is parent relative because we're a NO_WINDOW widget, so we need
+ to offset the trough area by allocation.x and allocation.y before the
+ check. (this must not be done for the background area though, since
+ that's already computed parent relative).
+
+Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
+ unrealize title buttons.
+
+Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
+
+ * gtk/gtkclist.c (gtk_clist_column_title_passive)
+ (gtk_clist_column_title_active):
+ only connect/disconnect to GtkWidgetClass::event to block mouse events.
+
+ * gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
+ zero initialize event, removed superfluous gdk_window_get_pointer call
+
+ * gtk/gtklist.c (gtk_list_vertical_timeout)
+ (gtk_list_horizontal_timeout): removed superfluous
+ gdk_window_get_pointer call
+
+Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
+
+ * plugging problems reported by "Bruce Mitchener, Jr."
+ <bruce@puremagic.com> due to a purify session.
+
+ * gtk/gtkstyle.c:
+ (gtk_style_ref):
+ (gtk_style_unref): assert ref_count to be > 0.
+
+ * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
+ the requisition.
+ (gtk_clist_set_shift): likewise.
+
+ * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
+ adjustments.
+
+ * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
+ event before sending it and set send_event to TRUE (which needs to
+ be done for *all* synthesized events).
+ (gtk_list_vertical_timeout): likewise.
+
+ * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
+ leaks.
+
+ * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
+ to TRUE when synthesizing events.
+
+[ *** end of merges from 1.2 *** ]
+
1999-11-21 Tor Lillqvist <tml@iki.fi>
* gdk/gdkconfig.h: Remove, as this is a file generated by configure
diff --git a/INSTALL.in b/INSTALL.in
new file mode 100644
index 000000000..661b10e90
--- /dev/null
+++ b/INSTALL.in
@@ -0,0 +1,187 @@
+Prerequisites
+=============
+
+GTK+ requires the GLIB library, available at the same location as
+you got this package.
+
+Simple install procedure
+========================
+
+ % gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
+ % cd gtk+-@GTK_VERSION@ # change to the toplevel directory
+ % ./configure # run the `configure' script
+ % make # build GTK
+ [ Become root if necessary ]
+ % make install # install GTK
+
+The Nitty-Gritty
+================
+
+The 'configure' script can be given a number of options to enable
+and disable various features. For a complete list, type:
+
+ ./configure --help
+
+A few of the more important ones:
+
+* --prefix=PREFIX install architecture-independent files in PREFIX
+ [ Defaults to /usr/local ]
+
+* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [ Defaults to the value given to --prefix ]
+
+* --with-xinput=[no/gxi/xfree] support XInput [default=no]
+
+The --with-xinput flag specifies whether to compile with support
+for the XInput extension (mainly used for graphics tablets), and
+which form of support to use:
+
+ no : no support
+ gxi : Use generic XInput support
+ xfree : Use special features in the Wacom drivers in XFree86 3.3.1
+ and later.
+
+For more information, follow the link from http://www.gtk.org
+
+* --disable-nls do not use Native Language Support
+
+If this flag is not specified, GTK+ will try to find
+and use the gettext() set of functions to provide translations
+of the strings in the standard dialogs into the
+user's native language.
+
+* --enable-xim support XIM [default=yes]
+
+Specifying --disable-xim will disable support for entering
+internationalized text using X Input Methods. This will give some
+slight savings in speed and memory use and might be necessary
+with older versions of X.
+
+* --with-locale=LOCALE locale name you want to use
+
+The --with-locale options is used to determine if your operating
+system has support for the locale you will be using. If not, X's
+built in locale support will be used.
+
+Because of bugs in autoconf, it is necessary to specify this
+option even if your LANG environment variable is correctly set.
+
+This option does not determine which locale GTK will use at
+runtime. That will be determined from the usual environment
+variables. If you will be using multiple locales with GTK,
+specify the one for which your operating system has the worst
+support for the --with-locale option.
+
+
+Options can be given to the compiler and linker by setting
+environment variables before running configure. A few of the more
+important ones:
+
+ CC : The C compiler to use
+ CPPFLAGS : Flags for the C preprocesser such as -I and -D
+ CFLAGS : C compiler flags
+
+The most important use of this is to set the
+optimization/debugging flags. For instance, to compile with no
+debugging information at all, run configure as:
+
+ CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
+
+or,
+
+ setenv CFLAGS -O2 ; ./configure # csh and variants
+
+Native-Language Support and gettext()
+=====================================
+
+To provide native-language support (NLS) GTK+ uses the
+gettext() set of functions. These functions are found
+in the C library on many systems, such as the Solaris
+C library and the GNU C Library, version 2.
+
+If your C library does not provide the necessary functionality,
+you may wish to install the GNU gettext package. You'll
+need version 0.10.35 or better. Version 0.10.35 is
+available from ftp://alpha.gnu.org/pub/gnu
+
+Generally, GTK+ will properly detect what is installed
+on your system and enable or disable NLS as appropriate.
+However, in rare cases, it may be necessary to disable
+NLS manually to get GTK+ to compile. You can do this
+by specifying the --disable-nls flag when configuring
+GTK+.
+
+Using an uninstalled copy of GLIB [ Unsupported ]
+=================================================
+
+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-@GTK_VERSION@
+
+This, however, will not work if you built GLIB with different
+source and build directories.
+
+It is recommended that you install GLIB before compiling
+GTK+. The --with-glib option is not regularly tested
+and may not function correctly. In addition,
+inter-library dependencies won't be generated when
+using --with-glib=.
+
+Installation directories
+========================
+
+The location of the installed files is determined by the --prefix
+and --exec-prefix options given to configure. There are also more
+detailed flags to control individual directories. However, the
+use of these flags is not tested.
+
+One particular detail to note, is that the architecture-dependent
+include file glibconfig.h is installed in:
+
+ $exec_pref/lib/glib/include/
+
+if you have a version in $prefix/include, this is out of date
+and should be deleted.
+
+A shell script gtk-config is created during the configure
+process, and installed in the bin/ directory
+($exec_prefix/bin). This is used to determine the location of GTK
+when building applications. If you move GTK after installation,
+it will be necessary to edit this file.
+
+For complete details, see the file docs/gtk-config.txt
+
+
+Notes for using XIM support for Japanese input
+==============================================
+
+* There is a bug in older versions of kinput2 that will cause GTK+
+to hang when destroying a text entry. The latest versions of
+kinput is available from:
+
+ ftp://ftp.sra.co.jp/pub/x11/kinput2
+
+* The locale information file for the ja_JP EUC locale
+distributed with some recent versions of X11 specifies to use the
+C library multibyte functions. Unless your C library has support
+for Japanese locales, this is incorrect, and will cause problems
+for GTK's internationalization.
+
+(In particular, this occurs with GNU libc 2.0 in which
+the multibyte functions always translate to and from UTF-8; but
+the problem may occur for other C libraries, and other operating
+systems as well.)
+
+To fix this, change the line:
+
+use_stdc_env True
+
+to
+
+use_stdc_env False
+
+in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
+
+
diff --git a/NEWS b/NEWS
index c3c214aaf..7454617e2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,99 @@
+Overview of Changes in GTK+ 1.2.6:
+
+* container queue_resize fixes
+* gtk[vh]scale: minor fixups
+* rename idle to idle_id in testgtk to avoid conflicts with
+ broken libs
+* More consistant naming of gtkrc files
+* Added language support: ro, uk
+
+Overview of Changes in GTK+ 1.2.5:
+
+* more GtkCTree and GtkWindow bug fixes.
+* more redraw/resize queue fixes, better expose event
+ discarding code.
+* more miscellaneous bugs fixed
+* new configure.in option --disable-rebuilds to completely disable
+ rebuilds of autogenerated sources.
+* check for 5.002 now, to avoid failing autogeneration build rules due
+ to old perl versions.
+* fonts (and fontsets) are cached now.
+* more autogeneration make rules and dependancy fixups, we should be
+ save with autogeneration up to make -j12 now ;)
+* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
+ GtkWindow on every size change.
+* major rework of window manager hints handling code, fixed a bunch of
+ races with the new resizing code.
+* the new wm hints and resizing code is absolutely perfect and bug free now,
+ it only lacks testing ;)
+* fixed up various rc style memory prolems.
+* gtk_widget_modify_style() now properly changes the style of realized widgets
+ and references the style passed into it. if people worked around this bug,
+ this will introduce a slight memory leak in their code.
+ The code should typically look like:
+ GtkRcStyle *rc_style = gtk_rc_style_new ();
+ [...]
+ gtk_widget_modify_style (widget, rc_style);
+ gtk_rc_style_unref (rc_style);
+* fix problems with positioning menus offscreen.
+* GtkText fixes for some crashes and drawing errors.
+* Better handling for unexpected window destroys in GDK and GTK+.
+ This should make it possible to use a GtkPlug and catch the
+ case where its parent socket is randomly killed.
+* FAQ updates.
+* FileSelection i18n patches, RadioButton fixups.
+* many translation improvements.
+* miscellaneous other bugs fixed.
+
+Overview of Changes in GTK+ 1.2.4:
+
+* DnD improvements (drags can be canceled with Esc now).
+* suppressed configure event reordering in Gdk.
+* rewrite of Gtk's configure event handling.
+* major improvements for the object argument system (Elena Devdariani).
+* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
+ GtkCTree.
+* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
+* configure's --with-glib= is "officially" unsupported.
+* upgrade to libtool 1.3.3.
+* various buglets fixed.
+
+Overview of Changes in GTK+ 1.2.3:
+
+* Upgrade to libtool 1.3
+* Check for dgettext (for systems with old versions of GNU Gettext)
+* Many bug fixes (see ChangeLog for details)
+
+Overview of Changes in GTK+ 1.2.2:
+
+* Improved Dnd behaviour with Motif applications.
+* Bug fixes for the Gtk selection code.
+* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
+* Bug fixes and leak plugs for the Gdk IM code.
+* Added gtk_object_get() facility to retrive object arguments easily.
+ The var args list expects ("arg-name", &value) pairs.
+* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
+ problems where closed pipes were no longer signalling GDK_INPUT_READ on
+ systems with a native poll().
+* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
+ anymore).
+* We don't attempt to lookup xpm color "None" anymore, this should prevent
+ eXodus (commercial X windows server) from popping up a color dialog every
+ time a transparent pixmap is created.
+* Fixed bug where Gtk timout/idle handlers would execute without the global
+ Gdk lock being held.
+* Other minor bug fixes.
+
+Overview of Changes in GTK+ 1.2.1:
+
+* Many Bug fixes have been applied to the menu and accelerator code.
+* GtkItemFactory can "adopt" foreign menu items now and manage their
+ accelerator installation. This is often required to get GtkItemFactory
+ like accelerator propagation between different windows with the same
+ menu heirarchy and for centralized parsing and saving of accelerators.
+* GtkCList/GtkCTree buttons should always display correctly now.
+* Miscellaneous other bug fixes.
+
What's New in GTK+ 1.2.0 (since 1.0.x):
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
diff --git a/README.in b/README.in
new file mode 100644
index 000000000..e0eda4c25
--- /dev/null
+++ b/README.in
@@ -0,0 +1,101 @@
+General Information
+===================
+
+This is GTK+ version @GTK_VERSION@. 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.
+
+The official ftp site is:
+ ftp://ftp.gtk.org/pub/gtk
+
+The official web site is:
+ http://www.gtk.org/
+
+A mailing list is located at:
+ gtk-list@redhat.com
+
+To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
+(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
+
+Installation
+============
+
+See the file 'INSTALL'
+
+How to report bugs
+==================
+
+Bugs should be reported to the GNOME bug tracking
+system. (http://bugs.gnome.org). To report a problem
+about GTK+, send mail to submit@bugs.gnome.org.
+
+The subject of the mail should describe your problem.
+In the body of the mail, you should first include
+a "pseudo-header" that gives the package and
+version number. This should be separated by a blank
+line from the actual headers.
+
+ Package: gtk+
+ Version: @GTK_VERSION@
+
+[ Please substitute @GTK_VERSION@ with the version of GTK+ that
+ you have installed ]
+
+Then describe the bug. Include:
+
+* Information about your system. For instance:
+
+ - What operating system and version
+ - What version of X
+ - For Linux, what version of the C library
+
+ And anything else you think is relevant.
+
+* How to reproduce the bug.
+
+ If you can reproduce it with the testgtk program that is built
+ in the gtk/ subdirectory, that will be most convenient. Otherwise,
+ please include a short test program that exhibits the behavior.
+ As a last resort, you can also provide a pointer to a larger piece
+ of software that can be downloaded.
+
+ (Bugs that can be reproduced within the GIMP are almost as good
+ as bugs that can be reproduced in testgtk. If you are reporting a
+ bug found with the GIMP, please include the version number of the GIMP
+ you are using)
+
+* If the bug was a crash, the exact text that was printed out
+ when the crash occured.
+
+* Further information such as stack traces may be useful, but
+ is not necessary. If you do send a stack trace, and the error
+ is an X error, it will be more useful if the stacktrace
+ is produced running the test program with the --sync command
+ line option.
+
+An example of a bug report:
+
+====
+To: submit@bugs.gnome.org
+From: yourname@your.address.org
+Subject: handlebox test in testgtk is misnamed.
+
+Package: gtk+
+Version: @GTK_VERSION@
+
+When I run gtk/testgtk, the button "handle box"
+is misnamed. There are multiple handle boxes in
+the demo, so it should be "handle boxes", to
+be like "buttons" or "check buttons".
+===
+
+Patches
+=======
+
+Patches can be uploaded to the incoming/ directory on
+ftp.gtk.org. Please follow the instructions there, and include
+your name and email address in the README file.
+
+If the patch fixes a bug, it is usually a good idea to include
+all the information described in "How to Report Bugs".
diff --git a/configure.in b/configure.in
index 4817b9521..980b5cbe9 100644
--- a/configure.in
+++ b/configure.in
@@ -147,7 +147,7 @@ changequote([,])dnl
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
- # define a MAINT-like variable REBUILD which is set if Perl
+# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_PROG_AWK
@@ -207,8 +207,10 @@ AC_TRY_RUN([#include <math.h>
AC_MSG_RESULT()
CFLAGS=$gtk_save_CFLAGS
AC_MSG_WARN(
- [No ANSI prototypes found in library. (-std1 didn't work.)])
- )
+ [No ANSI prototypes found in library. (-std1 didn't work.)]),
+ true
+ ),
+ AC_MSG_RESULT(none needed)
)
LIBS=$gtk_save_LIBS
@@ -453,11 +455,12 @@ main ()
return setlocale (LC_ALL, "${with_locale}") == NULL;
}],
need_x_locale=no,
-need_x_locale=yes)
+need_x_locale=yes,
+need_x_locale=no)
AC_MSG_RESULT($need_x_locale)
if test $need_x_locale = yes; then
- GTK_LOCALE_CFLAGS="-DX_LOCALE"
+ GTK_LOCALE_FLAGS="-DX_LOCALE"
fi
# Checks for header files.
diff --git a/docs/gdk.texi b/docs/gdk.texi
index e6d24bc6d..4e4b84f5d 100644
--- a/docs/gdk.texi
+++ b/docs/gdk.texi
@@ -1,4 +1,4 @@
-b\input texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename gdk.info
@settitle GDK
diff --git a/docs/generation.txt b/docs/generation.txt
new file mode 100644
index 000000000..5ec2d83be
--- /dev/null
+++ b/docs/generation.txt
@@ -0,0 +1,177 @@
+Overview:
+========
+
+This file describes the way that autogeneration
+works within the GTK+ source code.
+
+The following files in the gdk/ subdirectory
+are autogenerated:
+
+ gdkkeysyms.h
+ gdkcursors.h
+
+The following files in the gtk/ subdirectory
+are autogenerated:
+
+ gtk.defs
+ Description of GTK+ types (and some functions) in a lisp-style
+ format.
+ gtktypebuiltins.h
+ Header file including declarations for internal types
+ gtktypebuiltins_vars.c
+ Variables for type values for internal types.
+ gtktypebuiltins_ids.c
+ Arrays holding information about each internal type.
+ gtktypebuiltins_evals.c
+ Arrays holding mapping between enumeration values
+ and strings.
+
+ gtkmarshal.c
+ gtkmarshal.h
+ Autogenerated signal marshallers
+
+GDK
+===
+
+gdkkeysyms.h and gdkcursors.h are generated from
+the corresponding header files
+
+ X11/cursorfont.h
+ X11/keysymdef.h
+
+by some simple sed scripts. These are not actually
+run automatically because we want all the keysyms
+even on systems with a limited set.
+So the Gdk rule to generate both files (X-derived-headers)
+only needs to be rerun for every new release of the X Window
+System.
+
+GTK+ - type definitions
+=======================
+
+The type definitions are generated from several sources:
+
+ gtk-boxed.defs - definitions for boxed types
+ GTK+ header files
+ GDK header files
+
+The makeenums.pl script does a heuristic parse of
+the header files and extracts all enumerations declarations.
+It also recognizes a number of pseudo-comments in the
+header files:
+
+Two of these apply to individual enumeration values:
+
+ /*< skip >*/
+
+ This enumeration value should be skipped.
+
+ /*< nick=NICK >*/
+
+ The nickname for this value should NICK instead of the
+ normally guessed value. For instance:
+
+ typedef enum {
+ GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
+ GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
+ } GtkTargetFlags;
+
+ makes the nicks "same-app" and "same-widget", instead of
+ "app" and "widget" that would normally be used.
+
+The other two apply to entire enumeration declarations.
+
+ /*< prefix=PREFIX >*/
+
+ Specifies the prefix to be removed from the enumeration
+ values to generate nicknames.
+
+ /*< flags >*/
+
+ Specifies that this enumeration is used as a bitfield.
+ (makenums.pl normally guesses this from the presence of values
+ with << operators). For instance:
+
+ typedef enum /*< flags >*/
+ {
+ GDK_IM_PREEDIT_AREA = 0x0001,
+ GDK_IM_PREEDIT_CALLBACKS = 0x0002,
+ [ ... ]
+ } GdkIMStyle;
+
+makeenums.pl can be run into two modes:
+
+ 1) Generate the gtktypebuiltins_eval.c file (this
+ contains arrays holding the mapping of
+ string <=> enumeration value)
+
+ 2) Generate the enumeration portion of gtk.defs.
+
+The enumearation portion is added to the boxed type
+declarations in gtk-boxed.defs to create gtk.defs.
+
+The makeetypes.awk program takes the gtk.defs file, and
+from that generates various files depending on the
+third parameter passed to it:
+
+ macros: gtktypebuiltins.h
+ variables: gtktypebuiltins_vars.c
+ entries: gtktypebuiltins_ids.c
+
+GTK+ - marshallers
+==================
+
+The files gtkmarshal.c and gtkmarshal.h include declarations
+and definitions for the marshallers needed inside of
+GTK+. The marshallers to be generated are listed in
+the file gtkmashal.list, which is processed
+by genmarshal.pl.
+
+The format of this file is a list of lines:
+
+ <retval-type>:<arg1-type>,<arg2-type>,<arg3-type>
+
+e.g.:
+
+ BOOL:POINTER,STRING,STRING,POINTER
+
+A marshaller is generated for each line in the file.
+The possible types are:
+
+ NONE
+ BOOL
+ CHAR
+ INT
+ UINT
+ LONG
+ ULONG
+ FLOAT
+ DOUBLE
+ STRING
+ ENUM
+ FLAGS
+ BOXED
+ POINTER
+ OBJECT
+ FOREIGN (gpointer data, GtkDestroyNotify notify)
+ C_CALLBACK (GtkFunction func, gpointer func_data)
+ SIGNAL (GtkSignalFunc f, gpointer data)
+ ARGS (gint n_args, GtkArg *args)
+ CALLBACK (GtkCallBackMarshal marshall,
+ gpointer data,
+ GtkDestroyNotify Notify)
+
+Some of these types map to multiple return values - these
+are marked above with the return types in parantheses.
+
+NOTES
+=====
+
+When autogenerating GTK+ files, the autogenerated
+files are often rebuild resulting in the same result.
+
+To prevent unecessary rebuilds of the entire directory, some files
+that multiple other source files depend on are not actually written
+to directly. Instead, an intermediate file is written, which
+is then compared to the old file, and only if it is different
+is it copied into the final location.
diff --git a/examples/packer/pack.c b/examples/packer/pack.c
index e3200b22c..6bde2f082 100644
--- a/examples/packer/pack.c
+++ b/examples/packer/pack.c
@@ -81,7 +81,7 @@ main (int argv, char **argc)
info = g_malloc(sizeof(Info));
- window = gtk_window_new(GTK_TOPLEVEL);
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy), NULL);
diff --git a/gtk+.spec.in b/gtk+.spec.in
index 8d78011d8..16032adae 100644
--- a/gtk+.spec.in
+++ b/gtk+.spec.in
@@ -1,6 +1,7 @@
# Note that this is NOT a relocatable package
-%define ver @VERSION@
-%define rel SNAP
+%define ver @VERSION@
+%define RELEASE 1
+%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define prefix /usr
Summary: The Gimp Toolkit
diff --git a/gtk-config.in b/gtk-config.in
index 399d77efe..5fffdf6b9 100644
--- a/gtk-config.in
+++ b/gtk-config.in
@@ -99,7 +99,7 @@ if test "$echo_cflags" = "yes"; then
fi
done
fi
- echo -I@libdir@/gtk+/include $includes @x_cflags@ $glib_cflags
+ echo -I@libdir@/gtk+/include $includes $glib_cflags @x_cflags@
fi
if test "$echo_libs" = "yes"; then
diff --git a/gtk/.cvsignore b/gtk/.cvsignore
index 3a9bb5a07..14e0a2d72 100644
--- a/gtk/.cvsignore
+++ b/gtk/.cvsignore
@@ -22,7 +22,6 @@ gtktypebuiltins_vars.c
gtktypebuiltins_evals.c
gtk.defs
testdnd
-stamp-d
-stamp-t
-stamp-m
-s-*
+stamp-gtktypebuiltins.h
+stamp-gtkmarshal.h
+stamp-gtk.defs
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 01ccba147..ad3c84a77 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -1,126 +1,47 @@
-### Process this file with automake to produce Makefile.in
+## Makefile.am for gtk+/gtk
-top_builddir_full=`cd \$(top_builddir); pwd`
+INCLUDES = @STRIP_BEGIN@ \
+ -DG_LOG_DOMAIN=\"Gtk\" \
+ -DGTK_DISABLE_COMPAT_H \
+ -DGTK_EXE_PREFIX=\"$(exec_prefix)\" \
+ -DGTK_DATA_PREFIX=\"$(prefix)\" \
+ -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
+ -DGTK_LOCALEDIR=\"$(gtklocaledir)\" \
+ -I$(top_srcdir) -I../gdk \
+ -I$(top_srcdir)/gdk \
+ -I$(top_srcdir)/gdk/x11 \
+ @GTK_DEBUG_FLAGS@ \
+ @GTK_XIM_FLAGS@ \
+ @GTK_LOCALE_FLAGS@ \
+ @GLIB_CFLAGS@ \
+ @x_cflags@ \
+@STRIP_END@
-gtkincludedir = $(includedir)/gtk
+#
+# libraries to compile and install
+#
lib_LTLIBRARIES = libgtk.la
-static_SOURCES = \
- gtkaccelgroup.c \
- gtkaccellabel.c \
- gtkadjustment.c \
- gtkalignment.c \
- gtkarg.c \
- gtkarrow.c \
- gtkaspectframe.c \
- gtkbin.c \
- gtkbindings.c \
- gtkbbox.c \
- gtkbox.c \
- gtkbutton.c \
- gtkcalendar.c \
- gtkcheckbutton.c \
- gtkcheckmenuitem.c \
- gtkclist.c \
- gtkcolorsel.c \
- gtkcombo.c \
- gtkcontainer.c \
- gtkctree.c \
- gtkcurve.c \
- gtkdata.c \
- gtkdialog.c \
- gtkdnd.c \
- gtkdrawingarea.c \
- gtkeditable.c \
- gtkentry.c \
- gtkeventbox.c \
- gtkfilesel.c \
- gtkfixed.c \
- gtkfontsel.c \
- gtkframe.c \
- gtkgamma.c \
- gtkgc.c \
- gtkhandlebox.c \
- gtkhbbox.c \
- gtkhbox.c \
- gtkhpaned.c \
- gtkhruler.c \
- gtkhscale.c \
- gtkhscrollbar.c \
- gtkhseparator.c \
- gtkimage.c \
- gtkinputdialog.c \
- gtkintl.h \
- gtkinvisible.c \
- gtkitem.c \
- gtkitemfactory.c \
- gtklabel.c \
- gtklayout.c \
- gtklist.c \
- gtklistitem.c \
- gtkmain.c \
- gtkmenu.c \
- gtkmenubar.c \
- gtkmenufactory.c \
- gtkmenuitem.c \
- gtkmenushell.c \
- gtkmisc.c \
- gtknotebook.c \
- gtkobject.c \
- gtkoptionmenu.c \
- gtkpacker.c \
- gtkpaned.c \
- gtkpixmap.c \
- gtkplug.c \
- gtkpreview.c \
- gtkprogress.c \
- gtkprogressbar.c \
- gtkradiobutton.c \
- gtkradiomenuitem.c \
- gtkrange.c \
- gtkrc.c \
- gtkruler.c \
- gtkscale.c \
- gtkscrollbar.c \
- gtkscrolledwindow.c \
- gtkselection.c \
- gtkseparator.c \
- gtksignal.c \
- gtksocket.c \
- gtkspinbutton.c \
- gtkstyle.c \
- gtkstatusbar.c \
- gtktable.c \
- gtktearoffmenuitem.c \
- gtktext.c \
- gtkthemes.c \
- gtktipsquery.c \
- gtktogglebutton.c \
- gtktoolbar.c \
- gtktooltips.c \
- gtktree.c \
- gtktreeitem.c \
- gtktypeutils.c \
- gtkvbbox.c \
- gtkvbox.c \
- gtkviewport.c \
- gtkvpaned.c \
- gtkvruler.c \
- gtkvscale.c \
- gtkvscrollbar.c \
- gtkvseparator.c \
- gtkwidget.c \
- gtkwindow.c \
- fnmatch.c \
- fnmatch.h
+# libtool stuff: set version and export symbols for resolving
+libgtkincludedir = $(includedir)/gtk
+libgtk_la_LDFLAGS = @STRIP_BEGIN@ \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) \
+ -export-dynamic \
+ @GLIB_DEPLIBS@ \
+ @x_ldflags@ \
+ @x_libs@ \
+ -lm \
+@STRIP_END@
+# $(top_builddir)/gdk/libgdk.la
-libgtk_la_SOURCES = \
- $(static_SOURCES) \
- gtkmarshal.c
-# Source headers which are non-autogenerated headers
-source_headers = \
+#
+# setup source file variables
+#
+# GTK+ header files for public installation (non-generated)
+gtk_public_h_sources = @STRIP_BEGIN@ \
gtk.h \
gtkaccelgroup.h \
gtkaccellabel.h \
@@ -152,6 +73,7 @@ source_headers = \
gtkentry.h \
gtkenums.h \
gtkeventbox.h \
+ gtkfeatures.h \
gtkfilesel.h \
gtkfixed.h \
gtkfontsel.h \
@@ -228,26 +150,160 @@ source_headers = \
gtkvscrollbar.h \
gtkvseparator.h \
gtkwidget.h \
- gtkwindow.h
-
-gtkinclude_HEADERS = \
- $(source_headers) \
- gtkcompat.h \
+ gtkwindow.h \
+@STRIP_END@
+# GTK+ header files that don't get installed
+gtk_private_h_sources = @STRIP_BEGIN@ \
+@STRIP_END@
+# GTK+ C sources to build the library from
+gtk_c_sources = @STRIP_BEGIN@ \
+ gtkaccelgroup.c \
+ gtkaccellabel.c \
+ gtkadjustment.c \
+ gtkalignment.c \
+ gtkarg.c \
+ gtkarrow.c \
+ gtkaspectframe.c \
+ gtkbin.c \
+ gtkbindings.c \
+ gtkbbox.c \
+ gtkbox.c \
+ gtkbutton.c \
+ gtkcalendar.c \
+ gtkcheckbutton.c \
+ gtkcheckmenuitem.c \
+ gtkclist.c \
+ gtkcolorsel.c \
+ gtkcombo.c \
+ gtkcontainer.c \
+ gtkctree.c \
+ gtkcurve.c \
+ gtkdata.c \
+ gtkdialog.c \
+ gtkdnd.c \
+ gtkdrawingarea.c \
+ gtkeditable.c \
+ gtkentry.c \
+ gtkeventbox.c \
+ gtkfilesel.c \
+ gtkfixed.c \
+ gtkfontsel.c \
+ gtkframe.c \
+ gtkgamma.c \
+ gtkgc.c \
+ gtkhandlebox.c \
+ gtkhbbox.c \
+ gtkhbox.c \
+ gtkhpaned.c \
+ gtkhruler.c \
+ gtkhscale.c \
+ gtkhscrollbar.c \
+ gtkhseparator.c \
+ gtkimage.c \
+ gtkinputdialog.c \
+ gtkintl.h \
+ gtkinvisible.c \
+ gtkitem.c \
+ gtkitemfactory.c \
+ gtklabel.c \
+ gtklayout.c \
+ gtklist.c \
+ gtklistitem.c \
+ gtkmain.c \
+ gtkmarshal.c \
+ gtkmenu.c \
+ gtkmenubar.c \
+ gtkmenufactory.c \
+ gtkmenuitem.c \
+ gtkmenushell.c \
+ gtkmisc.c \
+ gtknotebook.c \
+ gtkobject.c \
+ gtkoptionmenu.c \
+ gtkpacker.c \
+ gtkpaned.c \
+ gtkpixmap.c \
+ gtkplug.c \
+ gtkpreview.c \
+ gtkprogress.c \
+ gtkprogressbar.c \
+ gtkradiobutton.c \
+ gtkradiomenuitem.c \
+ gtkrange.c \
+ gtkrc.c \
+ gtkruler.c \
+ gtkscale.c \
+ gtkscrollbar.c \
+ gtkscrolledwindow.c \
+ gtkselection.c \
+ gtkseparator.c \
+ gtksignal.c \
+ gtksocket.c \
+ gtkspinbutton.c \
+ gtkstyle.c \
+ gtkstatusbar.c \
+ gtktable.c \
+ gtktearoffmenuitem.c \
+ gtktext.c \
+ gtkthemes.c \
+ gtktipsquery.c \
+ gtktogglebutton.c \
+ gtktoolbar.c \
+ gtktooltips.c \
+ gtktree.c \
+ gtktreeitem.c \
+ gtktypeutils.c \
+ gtkvbbox.c \
+ gtkvbox.c \
+ gtkviewport.c \
+ gtkvpaned.c \
+ gtkvruler.c \
+ gtkvscale.c \
+ gtkvscrollbar.c \
+ gtkvseparator.c \
+ gtkwidget.c \
+ gtkwindow.c \
+ fnmatch.c \
+ fnmatch.h \
+@STRIP_END@
+# we use our own built_sources variable rules to avoid automake's
+# BUILT_SOURCES oddities
+# we generate frequently rebuild files piggyback on a stamp file, so sources
+# depending on them only get rebuild when the built source actually changed
+# content
+#
+# built sources that don't get installed
+gtk_built_sources = @STRIP_BEGIN@ \
+ stamp-gtk.defs \
+ stamp-gtktypebuiltins.h \
+ stamp-gtkmarshal.h \
+ gtktypebuiltins_vars.c \
+ gtktypebuiltins_ids.c \
+ gtktypebuiltins_evals.c \
+ gtkmarshal.c \
+ gtk.defs \
+@STRIP_END@
+# built sources that get installed with the header files
+gtk_built_public_sources = @STRIP_BEGIN@ \
gtkmarshal.h \
- gtktypebuiltins.h
-
-# note gtk.defs, gtktypebuiltin* and gtkmarshal.[ch] aren't here, but
-# their stamps are. Another trick is to use the temporary output files as
-# the stamp files.
-BUILT_SOURCES = \
- s-gd s-gtb s-gtbv s-gtbi s-gtbe \
- stamp-m
-
-# cause the built sources to be rebuild when possible, even with --include-deps
-$(static_sources): $(BUILT_SOURCES)
-
-# More headers to use when autogenerating.
-gdk_headers = \
+ gtktypebuiltins.h \
+@STRIP_END@
+# non-header sources (headers should be specified in the above variables)
+# that don't serve as direct make target sources, i.e. they don't have
+# their own .lo rules and don't get publically installed
+gtk_extra_sources = @STRIP_BEGIN@ \
+ gtkcompat.h.in \
+ makeenums.pl \
+ makeenums.awk \
+ maketypes.awk \
+ makeenums.h \
+ gtkargcollector.c \
+ gtk-boxed.defs \
+ genmarshal.pl \
+ gtkmarshal.list \
+@STRIP_END@
+# Extra headers that are used for enum type array/id generation
+gdk_headers = @STRIP_BEGIN@ \
../gdk/gdkcc.h \
../gdk/gdkcolor.h \
../gdk/gdkcursor.h \
@@ -266,195 +322,137 @@ gdk_headers = \
../gdk/gdkselection.h \
../gdk/gdktypes.h \
../gdk/gdkvisual.h \
- ../gdk/gdkwindow.h
-
-# generate gtk.defs file from gtk-boxed.defs and *.h
-gtk.defs: @REBUILD@ s-gd
- @:
-s-gd: @REBUILD@ makeenums.pl gtk-boxed.defs $(source_headers) $(gdk_headers)
+ ../gdk/gdkwindow.h \
+@STRIP_END@
+
+#
+# setup GTK+ sources and their dependancies
+#
+libgtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_built_public_sources)
+libgtk_la_SOURCES = $(gtk_c_sources)
+MAINTAINERCLEANFILES += $(gtk_built_public_sources) $(gtk_built_sources)
+EXTRA_HEADERS +=
+EXTRA_DIST += $(gtk_private_h_sources)
+EXTRA_DIST += $(gtk_built_sources) $(gtk_built_public_sources) $(gtk_extra_sources)
+
+#
+# rules to generate built sources
+#
+# setup autogeneration dependancies
+gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
+CLEANFILES += $(gen_sources)
+OLD_STAMP: $(gtk_built_public_sources) $(gtk_built_sources)
+$(OBJECTS): OLD_STAMP # this is our oldest-source-stamp
+# initial creation of the real stamp-* files
+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)
cd $(srcdir) \
- && $(PERL) makeenums.pl defs $(source_headers) $(gdk_headers) > s-gd \
- && cat gtk-boxed.defs >> s-gd \
- && (cmp -s s-gd gtk.defs || cp s-gd gtk.defs)
-
-# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
-gtktypebuiltins.h: @REBUILD@ s-gtb
- @:
-s-gtb: @REBUILD@ s-gd maketypes.awk
+ && $(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
cd $(srcdir) \
- && $(AWK) -f maketypes.awk gtk.defs macros > s-gtb \
- && (cmp -s s-gtb gtktypebuiltins.h || cp s-gtb gtktypebuiltins.h)
-
-# generate type identifier variables (GTK_TYPE_WIDGET_FLAGS)
-gtktypebuiltins_vars.c: @REBUILD@ s-gtbv
- @:
-s-gtbv: @REBUILD@ s-gd maketypes.awk
+ && $(PERL) genmarshal.pl gtkmarshal.list xgen-gmh xgen-gmc \
+ && (test -z "$(INDENT)" || $(INDENT) xgen-gmh) \
+ && (test -z "$(INDENT)" || $(INDENT) xgen-gmc) \
+ && cp xgen-gmc gtkmarshal.c \
+ && (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
cd $(srcdir) \
- && $(AWK) -f maketypes.awk gtk.defs variables > s-gtbv \
- && (cmp -s s-gtbv gtktypebuiltins_vars.c || cp s-gtbv gtktypebuiltins_vars.c)
-
-# generate type entries for type-id registration
-gtktypebuiltins_ids.c: @REBUILD@ s-gtbi
- @:
-s-gtbi: @REBUILD@ s-gd maketypes.awk
+ && $(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
cd $(srcdir) \
- && $(AWK) -f maketypes.awk gtk.defs entries > s-gtbi \
- && (cmp -s s-gtbi gtktypebuiltins_ids.c || cp s-gtbi gtktypebuiltins_ids.c)
-
-# generate enum value arrays
-gtktypebuiltins_evals.c: @REBUILD@ s-gtbe
- @:
-s-gtbe: @REBUILD@ makeenums.pl s-gd
+ && $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
+ && cp xgen-gtbvc $@ \
+ && rm -f xgen-gtbvc
+gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
cd $(srcdir) \
- && $(PERL) makeenums.pl arrays $(source_headers) $(gdk_headers) > \
- s-gtbe \
- && (cmp -s s-gtbe gtktypebuiltins_evals.c || cp s-gtbe gtktypebuiltins_evals.c)
-
-$(srcdir)/gtkmarshal.c $(srcdir)/gtkmarshal.h: @REBUILD@ stamp-m
- @:
-stamp-m: @REBUILD@ $(srcdir)/gtkmarshal.list $(srcdir)/genmarshal.pl
- (srcdir=$(srcdir) INDENT=$(INDENT) $(PERL) $(srcdir)/genmarshal.pl \
- && (cmp -s s-gmc gtkmarshal.c || mv s-gmc gtkmarshal.c) \
- && rm -f s-gmc \
- && (cmp -s s-gmh gtkmarshal.h || mv s-gmh gtkmarshal.h) \
- && rm -f s-gmh) \
- && echo timestamp > stamp-m
+ && $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
+ && cp xgen-gtbic $@ \
+ && rm -f xgen-gtbic
+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 $@ \
+ && rm -f xgen-gtbec
-libgtk_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE) \
- @GLIB_DEPLIBS@ \
- @x_ldflags@ \
- @x_libs@ \
- @GTK_LIBS_EXTRA@ \
- -lm
-# $(top_builddir)/gdk/libgdk.la
gtkconfdir = $(sysconfdir)/gtk
-gtkconf_DATA = gtkrc gtkrc.bg gtkrc.el gtkrc.eo gtkrc.he gtkrc.hy gtkrc.ja \
- gtkrc.ko gtkrc.ru gtkrc.tr gtkrc.th gtkrc.uk \
- gtkrc.iso88592 gtkrc.iso88595 gtkrc.iso885913 gtkrc.iso885914 \
- gtkrc.iso885915 gtkrc.zh_CN gtkrc.zh_TW.Big5 \
+gtkconf_DATA = gtkrc.bg gtkrc.el gtkrc.eo gtkrc.he gtkrc.hy gtkrc.ja \
+ gtkrc.ko gtkrc.ru gtkrc.tr gtkrc.th gtkrc.uk gtkrc.iso-8859-2 \
+ gtkrc.iso-8859-5 gtkrc.iso-8859-13 gtkrc.iso-8859-14 \
+ gtkrc.iso-8859-15 gtkrc.zh_CN gtkrc.zh_TW.Big5 \
gtkrc.ka_GE.georgianacademy gtkrc.ka_GE.georgianps \
gtkrc.vi_VN.tcvn gtkrc.vi_VN.viscii
-gtkrc:
- :
-
# We create a dummy theme for the default GTK+ theme
-
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk
echo "# Empty gtkrc for default theme" > \
$(DESTDIR)$(datadir)/themes/Default/gtk/gtkrc
- cd $(DESTDIR)$(gtkconfdir) ; \
- $(LN_S) gtkrc.iso88592 gtkrc.cs ; \
- $(LN_S) gtkrc.iso88592 gtkrc.hr ; \
- $(LN_S) gtkrc.iso88592 gtkrc.hu ; \
- $(LN_S) gtkrc.iso88592 gtkrc.pl ; \
- $(LN_S) gtkrc.iso88592 gtkrc.ro ; \
- $(LN_S) gtkrc.iso88592 gtkrc.sk ; \
- $(LN_S) gtkrc.iso88592 gtkrc.sl ; \
- $(LN_S) gtkrc.iso88592 gtkrc.sq ; \
- $(LN_S) gtkrc.iso88592 gtkrc.sr_YU.iso88592 ; \
- $(LN_S) gtkrc.iso88595 gtkrc.bg_BG.iso88595 ; \
- $(LN_S) gtkrc.iso88595 gtkrc.mk ; \
- $(LN_S) gtkrc.iso88595 gtkrc.sr ; \
- $(LN_S) gtkrc.iso88595 gtkrc.ru_RU.iso88595 ; \
- $(LN_S) gtkrc.iso885913 gtkrc.lt ; \
- $(LN_S) gtkrc.iso885914 gtkrc.cy ; \
- $(LN_S) gtkrc.iso885914 gtkrc.ga ; \
- $(LN_S) gtkrc.iso885915 gtkrc.et ; \
- $(LN_S) gtkrc.ka_GE.georgianacademy gtkrc.ka ; \
- $(LN_S) gtkrc.vi_VN.viscii gtkrc.vi_VN.viscii111 ; \
- $(LN_S) gtkrc.vi_VN.tcvn gtkrc.vi_VN.tcvn5712 ; \
- $(LN_S) gtkrc.vi_VN.tcvn5712 gtkrc.vi
-
+ $(mkinstalldirs) $(DESTDIR)$(gtkconfdir)
+ cd $(DESTDIR)$(gtkconfdir) && \
+ for i in cs hr hu pl ro sk sl sq ; do \
+ rm -f gtkrc.$$i ; \
+ ln -s gtkrc.iso-8859-2 gtkrc.$$i ; \
+ done ; \
+ for i in bg_BG.iso88595 mk sr ru_RU.iso88595 ; do \
+ rm -f gtkrc.$$i ; \
+ ln -s gtkrc.iso-8859-5 gtkrc.$$i ; \
+ done ; \
+ rm -f gtkrc.lt gtkrc.cy gtkrc.ga gtkrc.et gtkrc.ka \
+ gtkrc.vi_VN.viscii111 gtkrc.vi_VN.tcvn5712 gtkrc.vi ; \
+ ln -s gtkrc.iso-8859-13 gtkrc.lt ; \
+ ln -s gtkrc.iso-8859-14 gtkrc.cy ; \
+ ln -s gtkrc.iso-8859-14 gtkrc.ga ; \
+ ln -s gtkrc.iso-8859-15 gtkrc.et ; \
+ ln -s gtkrc.ka_GE.georgianacademy gtkrc.ka ; \
+ ln -s gtkrc.vi_VN.viscii gtkrc.vi_VN.viscii111 ; \
+ ln -s gtkrc.vi_VN.tcvn gtkrc.vi_VN.tcvn5712 ; \
+ ln -s gtkrc.vi_VN.tcvn5712 gtkrc.vi
uninstall-local:
rm -f $(DESTDIR)$(datadir)/themes/Default/gtkrc
-EXTRA_DIST = \
- $(gtkconf_DATA) \
- line-arrow.xbm \
- line-wrap.xbm \
- testgtk.1 \
- testgtkrc \
- testgtkrc2 \
- gtkcompat.h.in \
- makeenums.pl \
- makeenums.awk \
- maketypes.awk \
- makeenums.h \
- gtkargcollector.c \
- gtktypebuiltins_vars.c \
- gtktypebuiltins_ids.c \
- gtktypebuiltins_evals.c \
- gtk-boxed.defs \
- gtk.defs \
- genmarshal.pl \
- gtkmarshal.list \
- check-y.xpm \
- check-n.xpm \
- test.xpm \
- marble.xpm \
- 3DRings.xpm \
- FilesQueue.xpm \
- Modeller.xpm \
- tree_plus.xpm \
- tree_minus.xpm \
- tree_plus.xbm \
- tree_minus.xbm \
- circles.xbm \
- gtk.def \
- makefile.msc
-
-INCLUDES = \
- -DGTK_DISABLE_COMPAT_H \
- -DG_LOG_DOMAIN=\"Gtk\" \
- -DGTK_EXE_PREFIX=\"$(exec_prefix)\" \
- -DGTK_DATA_PREFIX=\"$(prefix)\" \
- -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
- -DGTK_LOCALEDIR=\"$(gtklocaledir)\" \
- -I$(top_srcdir) -I../gdk \
- -I$(top_srcdir)/gdk \
- -I$(top_srcdir)/gdk/x11 \
- @GTK_DEBUG_FLAGS@ \
- @GTK_XIM_FLAGS@ \
- @GTK_LOCALE_FLAGS@ \
- @GLIB_CFLAGS@ \
- @x_cflags@
-
-noinst_PROGRAMS = testgtk testinput testselection testrgb testdnd simple
-# testthreads
-
-DEPS = \
- libgtk.la \
- $(top_builddir)/gdk/libgdk.la
-
-LDADDS = \
- libgtk.la \
- $(top_builddir)/gdk/libgdk.la \
- @x_ldflags@ \
- @x_libs@ \
- @GLIB_LIBS@ \
- -lm
-
+#
+# test programs, not to be installed
+#
+noinst_PROGRAMS = testgtk testinput testselection testrgb testdnd simple # testthreads
+DEPS = libgtk.la $(top_builddir)/gdk/libgdk.la
+LDADDS = @STRIP_BEGIN@ \
+ libgtk.la \
+ $(top_builddir)/gdk/libgdk.la \
+ @x_ldflags@ \
+ @x_libs@ \
+ @GDK_WLIBS@ \
+ @GLIB_LIBS@ \
+ @GTK_LIBS_EXTRA@ \
+ -lm \
+@STRIP_END@
testgtk_DEPENDENCIES = $(DEPS)
testinput_DEPENDENCIES = $(DEPS)
-#testthreads_DEPENDENCIES = $(DEPS)
testselection_DEPENDENCIES = $(DEPS)
testrgb_DEPENDENCIES = $(DEPS)
testdnd_DEPENDENCIES = $(DEPS)
simple_DEPENDENCIES = $(DEPS)
-
+#testthreads_DEPENDENCIES = $(DEPS)
testgtk_LDADD = $(LDADDS)
testinput_LDADD = $(LDADDS)
-#testthreads_LDADD = $(LDADDS)
testselection_LDADD = $(LDADDS)
testrgb_LDADD = $(LDADDS)
testdnd_LDADD = $(LDADDS)
simple_LDADD = $(LDADDS)
+#testthreads_LDADD = $(LDADDS)
.PHONY: files test test-debug
@@ -473,3 +471,28 @@ test-debug: testgtk
cd $$builddir; cd $(srcdir); \
$(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtk
+EXTRA_DIST += @STRIP_BEGIN@ \
+ testgtk.1 \
+ testgtkrc \
+ testgtkrc2 \
+ circles.xbm \
+ line-arrow.xbm \
+ line-wrap.xbm \
+ tree_plus.xbm \
+ tree_minus.xbm \
+ 3DRings.xpm \
+ FilesQueue.xpm \
+ Modeller.xpm \
+ check-y.xpm \
+ check-n.xpm \
+ marble.xpm \
+ tree_minus.xpm \
+ tree_plus.xpm \
+ test.xpm \
+ check-y.xpm \
+ check-n.xpm \
+ test.xpm \
+ gtk.def \
+ makefile.msc \
+ $(gtkconf_DATA) \
+@STRIP_END@
diff --git a/gtk/genmarshal.pl b/gtk/genmarshal.pl
index db0487b99..3b5fdfaf8 100755
--- a/gtk/genmarshal.pl
+++ b/gtk/genmarshal.pl
@@ -20,25 +20,17 @@
"CALLBACK"=>"CALLBACK"
);
-$srcdir = $ENV{'srcdir'} || '.';
-$indent = $ENV{'INDENT'};
-
-sub indent {
- my $filename = shift;
- if (defined($indent) && $indent ne "") {
- system($indent, $filename);
- # we try the most likely names for backup files
- system("rm", "-f", "$filename.bak", "$filename~");
- }
+if ($#ARGV != 2) {
+ die ("Wrong number of arguments given, need <source> <target.h> <target.c>");
}
-open(IL, "<$srcdir/gtkmarshal.list") || die("Open failed: $!");
-open(OH, ">s-gmh") || die("Open failed: $!");
-open(OS, ">s-gmc") || die("Open failed: $!");
+open(IL, "<" . $ARGV[0]) || die ("Open failed: $!");
+open(OH, ">" . $ARGV[1]) || die ("Open failed: $!");
+open(OS, ">" . $ARGV[2]) || die ("Open failed: $!");
print OH <<EOT;
-#ifndef __GTKMARSHAL_H__
-#define __GTKMARSHAL_H__ 1
+#ifndef __GTK_MARSHAL_H__
+#define __GTK_MARSHAL_H__
#include <gtk/gtktypeutils.h>
#include <gtk/gtkobject.h>
@@ -196,10 +188,7 @@ print OH <<EOT;
}
#endif /* __cplusplus */
-#endif /* __GTKMARSHAL_H__ */
+#endif /* __GTK_MARSHAL_H__ */
EOT
close(IL); close(OH); close(OS);
-
-indent("s-gmh");
-indent("s-gmc");
diff --git a/gtk/gtkaccelgroup.h b/gtk/gtkaccelgroup.h
index 30c222556..2db22ad60 100644
--- a/gtk/gtkaccelgroup.h
+++ b/gtk/gtkaccelgroup.h
@@ -83,26 +83,42 @@ struct _GtkAccelEntry
};
+/* Accelerators
+ */
+gboolean gtk_accelerator_valid (guint keyval,
+ GdkModifierType modifiers);
+void gtk_accelerator_parse (const gchar *accelerator,
+ guint *accelerator_key,
+ GdkModifierType *accelerator_mods);
+gchar* gtk_accelerator_name (guint accelerator_key,
+ GdkModifierType accelerator_mods);
+void gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask);
+guint gtk_accelerator_get_default_mod_mask (void);
+
+
/* Accelerator Groups
*/
GtkAccelGroup* gtk_accel_group_new (void);
GtkAccelGroup* gtk_accel_group_get_default (void);
GtkAccelGroup* gtk_accel_group_ref (GtkAccelGroup *accel_group);
void gtk_accel_group_unref (GtkAccelGroup *accel_group);
-gboolean gtk_accel_group_activate (GtkAccelGroup *accel_group,
+void gtk_accel_group_lock (GtkAccelGroup *accel_group);
+void gtk_accel_group_unlock (GtkAccelGroup *accel_group);
+gboolean gtk_accel_groups_activate (GtkObject *object,
guint accel_key,
GdkModifierType accel_mods);
-gboolean gtk_accel_groups_activate (GtkObject *object,
+
+/* internal functions
+ */
+gboolean gtk_accel_group_activate (GtkAccelGroup *accel_group,
guint accel_key,
GdkModifierType accel_mods);
void gtk_accel_group_attach (GtkAccelGroup *accel_group,
GtkObject *object);
void gtk_accel_group_detach (GtkAccelGroup *accel_group,
GtkObject *object);
-void gtk_accel_group_lock (GtkAccelGroup *accel_group);
-void gtk_accel_group_unlock (GtkAccelGroup *accel_group);
-/* Accelerator Group Entries
+/* Accelerator Group Entries (internal)
*/
GtkAccelEntry* gtk_accel_group_get_entry (GtkAccelGroup *accel_group,
guint accel_key,
@@ -124,7 +140,7 @@ void gtk_accel_group_remove (GtkAccelGroup *accel_group,
GdkModifierType accel_mods,
GtkObject *object);
-/* Accelerator Signals
+/* Accelerator Signals (internal)
*/
void gtk_accel_group_handle_add (GtkObject *object,
guint accel_signal_id,
@@ -151,25 +167,12 @@ void gtk_accel_group_marshal_remove (GtkObject *object,
gpointer func_data,
GtkArg *args);
-/* Miscellaneous
+/* Miscellaneous (internal)
*/
GSList* gtk_accel_groups_from_object (GtkObject *object);
GSList* gtk_accel_group_entries_from_object (GtkObject *object);
-/* Accelerators
- */
-gboolean gtk_accelerator_valid (guint keyval,
- GdkModifierType modifiers);
-void gtk_accelerator_parse (const gchar *accelerator,
- guint *accelerator_key,
- GdkModifierType *accelerator_mods);
-gchar* gtk_accelerator_name (guint accelerator_key,
- GdkModifierType accelerator_mods);
-void gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask);
-guint gtk_accelerator_get_default_mod_mask (void);
-
-
#ifdef __cplusplus
}
diff --git a/gtk/gtkarg.c b/gtk/gtkarg.c
index 3474b80ae..bdd7003c0 100644
--- a/gtk/gtkarg.c
+++ b/gtk/gtkarg.c
@@ -422,17 +422,40 @@ gtk_arg_copy (GtkArg *src_arg,
}
void
-gtk_arg_free (GtkArg *arg,
- gboolean free_contents)
+gtk_arg_free (GtkArg *arg,
+ gboolean free_contents)
{
g_return_if_fail (arg != NULL);
- if (free_contents &&
- GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING)
- g_free (GTK_VALUE_STRING (*arg));
+ if (free_contents)
+ gtk_arg_reset (arg);
g_free (arg);
}
+void
+gtk_arg_reset (GtkArg *arg)
+{
+ GtkType fundamental_type;
+
+ g_return_if_fail (arg != NULL);
+
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
+ if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
+ {
+ fundamental_type = gtk_type_get_varargs_type (fundamental_type);
+ if (!fundamental_type)
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
+ }
+
+ if (fundamental_type == GTK_TYPE_STRING)
+ {
+ g_free (GTK_VALUE_STRING (*arg));
+ arg->type = GTK_TYPE_INVALID;
+ }
+ else if (arg->type != GTK_TYPE_INVALID)
+ arg->type = GTK_TYPE_INVALID;
+}
+
gint
gtk_arg_info_equal (gconstpointer arg_info_1,
gconstpointer arg_info_2)
@@ -466,3 +489,195 @@ gtk_arg_info_hash (gconstpointer arg_info)
return h;
}
+
+gboolean
+gtk_arg_values_equal (const GtkArg *arg1,
+ const GtkArg *arg2)
+{
+ GtkType fundamental_type;
+ gboolean equal;
+
+ g_return_val_if_fail (arg1 != NULL, FALSE);
+ g_return_val_if_fail (arg2 != NULL, FALSE);
+ g_return_val_if_fail (GTK_FUNDAMENTAL_TYPE (arg1->type) ==
+ GTK_FUNDAMENTAL_TYPE (arg2->type), FALSE);
+
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
+ if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
+ {
+ fundamental_type = gtk_type_get_varargs_type (fundamental_type);
+ if (!fundamental_type)
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
+ }
+
+ switch (fundamental_type)
+ {
+ case GTK_TYPE_INVALID:
+ equal = TRUE;
+ break;
+ case GTK_TYPE_CHAR:
+ equal = GTK_VALUE_CHAR (*arg1) == GTK_VALUE_CHAR (*arg2);
+ break;
+ case GTK_TYPE_BOOL:
+ equal = (GTK_VALUE_BOOL (*arg1) != FALSE) == (GTK_VALUE_BOOL (*arg2) != FALSE);
+ break;
+ case GTK_TYPE_INT:
+ equal = GTK_VALUE_INT (*arg1) == GTK_VALUE_INT (*arg2);
+ break;
+ case GTK_TYPE_UINT:
+ equal = GTK_VALUE_UINT (*arg1) == GTK_VALUE_UINT (*arg2);
+ break;
+ case GTK_TYPE_LONG:
+ equal = GTK_VALUE_LONG (*arg1) == GTK_VALUE_LONG (*arg2);
+ break;
+ case GTK_TYPE_ULONG:
+ equal = GTK_VALUE_ULONG (*arg1) == GTK_VALUE_ULONG (*arg2);
+ break;
+ case GTK_TYPE_FLOAT:
+ equal = GTK_VALUE_FLOAT (*arg1) == GTK_VALUE_FLOAT (*arg2);
+ break;
+ case GTK_TYPE_DOUBLE:
+ equal = GTK_VALUE_DOUBLE (*arg1) == GTK_VALUE_DOUBLE (*arg2);
+ break;
+ case GTK_TYPE_STRING:
+ if (!GTK_VALUE_STRING (*arg1) ||
+ !GTK_VALUE_STRING (*arg2))
+ equal = GTK_VALUE_STRING (*arg1) == GTK_VALUE_STRING (*arg2);
+ else
+ equal = g_str_equal (GTK_VALUE_STRING (*arg1), GTK_VALUE_STRING (*arg2));
+ break;
+ case GTK_TYPE_ENUM:
+ equal = GTK_VALUE_ENUM (*arg1) == GTK_VALUE_ENUM (*arg2);
+ break;
+ case GTK_TYPE_FLAGS:
+ equal = GTK_VALUE_FLAGS (*arg1) == GTK_VALUE_FLAGS (*arg2);
+ break;
+ case GTK_TYPE_BOXED:
+ equal = GTK_VALUE_BOXED (*arg1) == GTK_VALUE_BOXED (*arg2);
+ break;
+ case GTK_TYPE_FOREIGN:
+ equal = (GTK_VALUE_FOREIGN (*arg1).data == GTK_VALUE_FOREIGN (*arg2).data &&
+ GTK_VALUE_FOREIGN (*arg1).notify == GTK_VALUE_FOREIGN (*arg2).notify);
+ break;
+ case GTK_TYPE_CALLBACK:
+ equal = (GTK_VALUE_CALLBACK (*arg1).marshal == GTK_VALUE_CALLBACK (*arg2).marshal &&
+ GTK_VALUE_CALLBACK (*arg1).data == GTK_VALUE_CALLBACK (*arg2).data &&
+ GTK_VALUE_CALLBACK (*arg1).notify == GTK_VALUE_CALLBACK (*arg2).notify);
+ break;
+ case GTK_TYPE_ARGS:
+ equal = (GTK_VALUE_ARGS (*arg1).n_args == GTK_VALUE_ARGS (*arg2).n_args &&
+ GTK_VALUE_ARGS (*arg1).args == GTK_VALUE_ARGS (*arg2).args);
+ break;
+ case GTK_TYPE_OBJECT:
+ equal = GTK_VALUE_OBJECT (*arg1) == GTK_VALUE_OBJECT (*arg2);
+ break;
+ case GTK_TYPE_POINTER:
+ equal = GTK_VALUE_POINTER (*arg1) == GTK_VALUE_POINTER (*arg2);
+ break;
+ case GTK_TYPE_SIGNAL:
+ equal = (GTK_VALUE_SIGNAL (*arg1).f == GTK_VALUE_SIGNAL (*arg2).f &&
+ GTK_VALUE_SIGNAL (*arg1).d == GTK_VALUE_SIGNAL (*arg2).d);
+ break;
+ case GTK_TYPE_C_CALLBACK:
+ equal = (GTK_VALUE_C_CALLBACK (*arg1).func == GTK_VALUE_C_CALLBACK (*arg2).func &&
+ GTK_VALUE_C_CALLBACK (*arg1).func_data == GTK_VALUE_C_CALLBACK (*arg2).func_data);
+ break;
+ default:
+ g_warning ("gtk_arg_values_equal() used with unknown type `%s'", gtk_type_name (arg1->type));
+ equal = FALSE;
+ break;
+ }
+
+ return equal;
+}
+
+void
+gtk_arg_to_valueloc (GtkArg *arg,
+ gpointer value_pointer)
+{
+ GtkType fundamental_type;
+
+ g_return_if_fail (arg != NULL);
+ g_return_if_fail (value_pointer != NULL);
+
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
+ if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
+ {
+ fundamental_type = gtk_type_get_varargs_type (fundamental_type);
+ if (!fundamental_type)
+ fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
+ }
+
+ switch (fundamental_type)
+ {
+ gchar *p_char;
+ guchar *p_uchar;
+ gboolean *p_boolean;
+ gint *p_int;
+ guint *p_uint;
+ glong *p_long;
+ gulong *p_ulong;
+ gfloat *p_float;
+ gdouble *p_double;
+ gpointer *p_pointer;
+ case GTK_TYPE_CHAR:
+ p_char = value_pointer;
+ *p_char = GTK_VALUE_CHAR (*arg);
+ break;
+ case GTK_TYPE_UCHAR:
+ p_uchar = value_pointer;
+ *p_uchar = GTK_VALUE_UCHAR (*arg);
+ break;
+ case GTK_TYPE_BOOL:
+ p_boolean = value_pointer;
+ *p_boolean = GTK_VALUE_BOOL (*arg);
+ break;
+ case GTK_TYPE_INT:
+ case GTK_TYPE_ENUM:
+ p_int = value_pointer;
+ *p_int = GTK_VALUE_INT (*arg);
+ break;
+ case GTK_TYPE_UINT:
+ case GTK_TYPE_FLAGS:
+ p_uint = value_pointer;
+ *p_uint = GTK_VALUE_UINT (*arg);
+ break;
+ case GTK_TYPE_LONG:
+ p_long = value_pointer;
+ *p_long = GTK_VALUE_LONG (*arg);
+ break;
+ case GTK_TYPE_ULONG:
+ p_ulong = value_pointer;
+ *p_ulong = GTK_VALUE_ULONG (*arg);
+ break;
+ case GTK_TYPE_FLOAT:
+ p_float = value_pointer;
+ *p_float = GTK_VALUE_FLOAT (*arg);
+ break;
+ case GTK_TYPE_DOUBLE:
+ p_double = value_pointer;
+ *p_double = GTK_VALUE_DOUBLE (*arg);
+ break;
+ case GTK_TYPE_STRING:
+ case GTK_TYPE_POINTER:
+ case GTK_TYPE_BOXED:
+ case GTK_TYPE_OBJECT:
+ p_pointer = value_pointer;
+ *p_pointer = GTK_VALUE_POINTER (*arg);
+ break;
+ case GTK_TYPE_SIGNAL:
+ case GTK_TYPE_ARGS:
+ case GTK_TYPE_FOREIGN:
+ case GTK_TYPE_CALLBACK:
+ case GTK_TYPE_C_CALLBACK:
+ case GTK_TYPE_NONE:
+ case GTK_TYPE_INVALID:
+ /* it doesn't make much sense to retrive these values,
+ * they either are always read-only args, or require
+ * multiple pointers.
+ */
+ g_warning ("gtk_arg_fill_retloc(): unsupported argument type `%s'",
+ gtk_type_name (arg->type));
+ break;
+ }
+}
diff --git a/gtk/gtkarg.h b/gtk/gtkarg.h
index a226bb4f5..609131048 100644
--- a/gtk/gtkarg.h
+++ b/gtk/gtkarg.h
@@ -63,6 +63,9 @@ GtkArg* gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg);
void gtk_arg_free (GtkArg *arg,
gboolean free_contents);
+void gtk_arg_reset (GtkArg *arg);
+gboolean gtk_arg_values_equal (const GtkArg *arg1,
+ const GtkArg *arg2);
gchar* gtk_args_collect (GtkType object_type,
GHashTable *arg_info_hash_table,
GSList **arg_list_p,
@@ -87,10 +90,12 @@ GtkArg* gtk_args_query (GtkType class_type,
guint32 **arg_flags,
guint *n_args_p);
gchar* gtk_arg_name_strip_type (const gchar *arg_name);
-gint gtk_arg_info_equal (gconstpointer arg_info_1,
- gconstpointer arg_info_2);
-guint gtk_arg_info_hash (gconstpointer arg_info);
-
+gint gtk_arg_info_equal (gconstpointer arg_info_1,
+ gconstpointer arg_info_2);
+guint gtk_arg_info_hash (gconstpointer arg_info);
+void gtk_arg_to_valueloc (GtkArg *arg,
+ gpointer value_pointer);
+
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index 1fb3ac406..788399fb5 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -31,8 +31,22 @@
#include "gtkaspectframe.h"
+enum {
+ ARG_0,
+ ARG_XALIGN,
+ ARG_YALIGN,
+ ARG_RATIO,
+ ARG_OBEY_CHILD
+};
+
static void gtk_aspect_frame_class_init (GtkAspectFrameClass *klass);
-static void gtk_aspect_frame_init (GtkAspectFrame *aspect_frame);
+static void gtk_aspect_frame_init (GtkAspectFrame *aspect_frame);
+static void gtk_aspect_frame_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_aspect_frame_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_aspect_frame_draw (GtkWidget *widget,
GdkRectangle *area);
static void gtk_aspect_frame_paint (GtkWidget *widget,
@@ -49,7 +63,7 @@ GtkType
gtk_aspect_frame_get_type (void)
{
static GtkType aspect_frame_type = 0;
-
+
if (!aspect_frame_type)
{
static const GtkTypeInfo aspect_frame_info =
@@ -63,23 +77,37 @@ gtk_aspect_frame_get_type (void)
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
-
- aspect_frame_type = gtk_type_unique (gtk_frame_get_type (), &aspect_frame_info);
+
+ aspect_frame_type = gtk_type_unique (GTK_TYPE_FRAME, &aspect_frame_info);
}
-
+
return aspect_frame_type;
}
static void
gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
{
+ GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass*) class;
+
+ object_class = GTK_OBJECT_CLASS (class);
+ widget_class = GTK_WIDGET_CLASS (class);
+
+ object_class->set_arg = gtk_aspect_frame_set_arg;
+ object_class->get_arg = gtk_aspect_frame_get_arg;
widget_class->draw = gtk_aspect_frame_draw;
widget_class->expose_event = gtk_aspect_frame_expose;
widget_class->size_allocate = gtk_aspect_frame_size_allocate;
+
+ gtk_object_add_arg_type ("GtkAspectFrame::xalign", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_XALIGN);
+ gtk_object_add_arg_type ("GtkAspectFrame::yalign", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_YALIGN);
+ gtk_object_add_arg_type ("GtkAspectFrame::ratio", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_RATIO);
+ gtk_object_add_arg_type ("GtkAspectFrame::obey_child", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_OBEY_CHILD);
}
static void
@@ -88,19 +116,86 @@ gtk_aspect_frame_init (GtkAspectFrame *aspect_frame)
aspect_frame->xalign = 0.5;
aspect_frame->yalign = 0.5;
aspect_frame->ratio = 1.0;
- aspect_frame->obey_child = 1;
+ aspect_frame->obey_child = TRUE;
aspect_frame->center_allocation.x = -1;
aspect_frame->center_allocation.y = -1;
aspect_frame->center_allocation.width = 1;
aspect_frame->center_allocation.height = 1;
}
+static void
+gtk_aspect_frame_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkAspectFrame *aspect_frame = GTK_ASPECT_FRAME (object);
+
+ switch (arg_id)
+ {
+ case ARG_XALIGN:
+ gtk_aspect_frame_set (aspect_frame,
+ GTK_VALUE_FLOAT (*arg),
+ aspect_frame->yalign,
+ aspect_frame->ratio,
+ aspect_frame->obey_child);
+ break;
+ case ARG_YALIGN:
+ gtk_aspect_frame_set (aspect_frame,
+ aspect_frame->xalign,
+ GTK_VALUE_FLOAT (*arg),
+ aspect_frame->ratio,
+ aspect_frame->obey_child);
+ break;
+ case ARG_RATIO:
+ gtk_aspect_frame_set (aspect_frame,
+ aspect_frame->xalign,
+ aspect_frame->yalign,
+ GTK_VALUE_FLOAT (*arg),
+ aspect_frame->obey_child);
+ break;
+ case ARG_OBEY_CHILD:
+ gtk_aspect_frame_set (aspect_frame,
+ aspect_frame->xalign,
+ aspect_frame->yalign,
+ aspect_frame->ratio,
+ GTK_VALUE_BOOL (*arg));
+ break;
+ }
+}
+
+static void
+gtk_aspect_frame_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkAspectFrame *aspect_frame = GTK_ASPECT_FRAME (object);
+
+ switch (arg_id)
+ {
+ case ARG_XALIGN:
+ GTK_VALUE_FLOAT (*arg) = aspect_frame->xalign;
+ break;
+ case ARG_YALIGN:
+ GTK_VALUE_FLOAT (*arg) = aspect_frame->yalign;
+ break;
+ case ARG_RATIO:
+ GTK_VALUE_FLOAT (*arg) = aspect_frame->ratio;
+ break;
+ case ARG_OBEY_CHILD:
+ GTK_VALUE_BOOL (*arg) = aspect_frame->obey_child;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
GtkWidget*
gtk_aspect_frame_new (const gchar *label,
- gfloat xalign,
- gfloat yalign,
- gfloat ratio,
- gint obey_child)
+ gfloat xalign,
+ gfloat yalign,
+ gfloat ratio,
+ gboolean obey_child)
{
GtkAspectFrame *aspect_frame;
@@ -109,7 +204,7 @@ gtk_aspect_frame_new (const gchar *label,
aspect_frame->xalign = CLAMP (xalign, 0.0, 1.0);
aspect_frame->yalign = CLAMP (yalign, 0.0, 1.0);
aspect_frame->ratio = CLAMP (ratio, MIN_RATIO, MAX_RATIO);
- aspect_frame->obey_child = obey_child;
+ aspect_frame->obey_child = obey_child != FALSE;
gtk_frame_set_label (GTK_FRAME(aspect_frame), label);
@@ -118,33 +213,34 @@ gtk_aspect_frame_new (const gchar *label,
void
gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
- gfloat xalign,
- gfloat yalign,
- gfloat ratio,
- gint obey_child)
+ gfloat xalign,
+ gfloat yalign,
+ gfloat ratio,
+ gboolean obey_child)
{
g_return_if_fail (aspect_frame != NULL);
g_return_if_fail (GTK_IS_ASPECT_FRAME (aspect_frame));
-
+
xalign = CLAMP (xalign, 0.0, 1.0);
yalign = CLAMP (yalign, 0.0, 1.0);
ratio = CLAMP (ratio, MIN_RATIO, MAX_RATIO);
-
+ obey_child = obey_child != FALSE;
+
if ((aspect_frame->xalign != xalign) ||
(aspect_frame->yalign != yalign) ||
(aspect_frame->ratio != ratio) ||
(aspect_frame->obey_child != obey_child))
{
GtkWidget *widget = GTK_WIDGET(aspect_frame);
-
+
aspect_frame->xalign = xalign;
aspect_frame->yalign = yalign;
aspect_frame->ratio = ratio;
aspect_frame->obey_child = obey_child;
-
+
if (GTK_WIDGET_DRAWABLE(widget))
gtk_widget_queue_clear (widget);
-
+
gtk_widget_queue_resize (widget);
}
}
@@ -308,9 +404,10 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
gtk_widget_get_child_requisition (bin->child, &child_requisition);
if (child_requisition.height != 0)
{
- ratio = (gdouble)child_requisition.width /
- child_requisition.height;
- if (ratio < MIN_RATIO) ratio = MIN_RATIO;
+ ratio = ((gdouble) child_requisition.width /
+ child_requisition.height);
+ if (ratio < MIN_RATIO)
+ ratio = MIN_RATIO;
}
else if (child_requisition.width != 0)
ratio = MAX_RATIO;
@@ -319,22 +416,22 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
}
else
ratio = aspect_frame->ratio;
-
+
x = (GTK_CONTAINER (frame)->border_width +
GTK_WIDGET (frame)->style->klass->xthickness);
width = allocation->width - x * 2;
-
+
y = (GTK_CONTAINER (frame)->border_width +
- MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
+ MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
height = (allocation->height - y -
- GTK_CONTAINER (frame)->border_width -
- GTK_WIDGET (frame)->style->klass->ythickness);
-
+ GTK_CONTAINER (frame)->border_width -
+ GTK_WIDGET (frame)->style->klass->ythickness);
+
/* make sure we don't allocate a negative width or height,
* since that will be cast to a (very big) guint16 */
width = MAX (1, width);
height = MAX (1, height);
-
+
if (ratio * height > width)
{
child_allocation.width = width;
@@ -345,7 +442,7 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
child_allocation.width = ratio*height + 0.5;
child_allocation.height = height;
}
-
+
child_allocation.x = aspect_frame->xalign * (width - child_allocation.width) + allocation->x + x;
child_allocation.y = aspect_frame->yalign * (height - child_allocation.height) + allocation->y + y;
diff --git a/gtk/gtkaspectframe.h b/gtk/gtkaspectframe.h
index adcb00ea4..6f757236c 100644
--- a/gtk/gtkaspectframe.h
+++ b/gtk/gtkaspectframe.h
@@ -67,16 +67,16 @@ struct _GtkAspectFrameClass
GtkType gtk_aspect_frame_get_type (void);
-GtkWidget* gtk_aspect_frame_new (const gchar *label,
- gfloat xalign,
- gfloat yalign,
- gfloat ratio,
- gint obey_child);
-void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
- gfloat xalign,
- gfloat yalign,
- gfloat ratio,
- gint obey_child);
+GtkWidget* gtk_aspect_frame_new (const gchar *label,
+ gfloat xalign,
+ gfloat yalign,
+ gfloat ratio,
+ gint obey_child);
+void gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
+ gfloat xalign,
+ gfloat yalign,
+ gfloat ratio,
+ gboolean obey_child);
#ifdef __cplusplus
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 07d7bbd95..bfb3dfadf 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -167,10 +167,13 @@ gtk_bin_draw (GtkWidget *widget,
g_return_if_fail (GTK_IS_BIN (widget));
bin = GTK_BIN (widget);
-
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child) &&
- gtk_widget_intersect (bin->child, area, &child_area))
- gtk_widget_draw (bin->child, &child_area);
+
+ if (GTK_WIDGET_DRAWABLE (bin))
+ {
+ if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
+ gtk_widget_intersect (bin->child, area, &child_area))
+ gtk_widget_draw (bin->child, &child_area);
+ }
}
static gint
@@ -189,7 +192,7 @@ gtk_bin_expose (GtkWidget *widget,
bin = GTK_BIN (widget);
child_event = *event;
- if (bin->child &&
+ if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
@@ -216,19 +219,16 @@ gtk_bin_add (GtkContainer *container,
gtk_widget_set_parent (child, GTK_WIDGET (bin));
bin->child = child;
- if (GTK_WIDGET_VISIBLE (child->parent))
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (child->parent) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (child->parent) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
}
-
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (child);
}
static void
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index b751b910f..13d7dfb4c 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -1136,6 +1136,7 @@ gtk_pattern_spec_init (GtkPatternSpec *pspec,
t = pspec->pattern_reversed;
pspec->pattern_reversed = g_strdup (p);
g_free (t);
+ g_free (pspec->pattern);
pspec->pattern = g_strdup (pspec->pattern_reversed);
g_strreverse (pspec->pattern);
pspec->pattern_length = strlen (pspec->pattern);
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 868f0f145..5c94a272b 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -341,20 +341,17 @@ gtk_box_pack_start (GtkBox *box,
box->children = g_list_append (box->children, child_info);
gtk_widget_set_parent (child, GTK_WIDGET (box));
+
+ if (GTK_WIDGET_REALIZED (box))
+ gtk_widget_realize (child);
- if (GTK_WIDGET_VISIBLE (GTK_WIDGET (box)))
+ if (GTK_WIDGET_VISIBLE (box) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (box)) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (GTK_WIDGET (box)) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_MAPPED (box))
gtk_widget_map (child);
- }
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
- gtk_widget_queue_resize (child);
+ gtk_widget_queue_resize (child);
+ }
}
void
@@ -382,19 +379,16 @@ gtk_box_pack_end (GtkBox *box,
gtk_widget_set_parent (child, GTK_WIDGET (box));
- if (GTK_WIDGET_VISIBLE (GTK_WIDGET (box)))
+ if (GTK_WIDGET_REALIZED (box))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (box) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (box)) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (GTK_WIDGET (box)) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_MAPPED (box))
gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
}
-
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
- gtk_widget_queue_resize (child);
}
void
@@ -660,7 +654,8 @@ gtk_box_draw (GtkWidget *widget,
child = children->data;
children = children->next;
- if (gtk_widget_intersect (child->widget, area, &child_area))
+ if (GTK_WIDGET_DRAWABLE (child->widget) &&
+ gtk_widget_intersect (child->widget, area, &child_area))
gtk_widget_draw (child->widget, &child_area);
}
}
@@ -691,7 +686,8 @@ gtk_box_expose (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_NO_WINDOW (child->widget) &&
+ if (GTK_WIDGET_DRAWABLE (child->widget) &&
+ GTK_WIDGET_NO_WINDOW (child->widget) &&
gtk_widget_intersect (child->widget, &event->area, &child_event.area))
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
}
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index d40c679f6..1e5a36208 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -646,7 +646,7 @@ static gint
gtk_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- GtkButton *bin;
+ GtkBin *bin;
GdkEventExpose child_event;
g_return_val_if_fail (widget != NULL, FALSE);
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 7f7101c6f..852a7ba0e 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -74,16 +74,49 @@ gtk_check_menu_item_get_type (void)
(GtkClassInitFunc) NULL,
};
- check_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (), &check_menu_item_info);
+ check_menu_item_type = gtk_type_unique (GTK_TYPE_MENU_ITEM, &check_menu_item_info);
}
return check_menu_item_type;
}
+static void
+gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
+{
+ GtkObjectClass *object_class;
+ GtkWidgetClass *widget_class;
+ GtkMenuItemClass *menu_item_class;
+
+ object_class = (GtkObjectClass*) klass;
+ widget_class = (GtkWidgetClass*) klass;
+ menu_item_class = (GtkMenuItemClass*) klass;
+
+ parent_class = gtk_type_class (GTK_TYPE_MENU_ITEM);
+
+ widget_class->draw = gtk_check_menu_item_draw;
+ widget_class->expose_event = gtk_check_menu_item_expose;
+
+ menu_item_class->activate = gtk_check_menu_item_activate;
+ menu_item_class->toggle_size = 12;
+ menu_item_class->hide_on_activate = FALSE;
+
+ klass->toggled = NULL;
+ klass->draw_indicator = gtk_real_check_menu_item_draw_indicator;
+
+ check_menu_item_signals[TOGGLED] =
+ gtk_signal_new ("toggled",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (GtkCheckMenuItemClass, toggled),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+ gtk_object_class_add_signals (object_class, check_menu_item_signals, LAST_SIGNAL);
+}
+
GtkWidget*
gtk_check_menu_item_new (void)
{
- return GTK_WIDGET (gtk_type_new (gtk_check_menu_item_get_type ()));
+ return GTK_WIDGET (gtk_type_new (GTK_TYPE_CHECK_MENU_ITEM));
}
GtkWidget*
@@ -133,41 +166,6 @@ gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item)
}
static void
-gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkMenuItemClass *menu_item_class;
-
- object_class = (GtkObjectClass*) klass;
- widget_class = (GtkWidgetClass*) klass;
- menu_item_class = (GtkMenuItemClass*) klass;
-
- parent_class = gtk_type_class (gtk_menu_item_get_type ());
-
- check_menu_item_signals[TOGGLED] =
- gtk_signal_new ("toggled",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GtkCheckMenuItemClass, toggled),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, check_menu_item_signals, LAST_SIGNAL);
-
- widget_class->draw = gtk_check_menu_item_draw;
- widget_class->expose_event = gtk_check_menu_item_expose;
-
- menu_item_class->activate = gtk_check_menu_item_activate;
- menu_item_class->toggle_size = 12;
-
- menu_item_class->hide_on_activate = FALSE;
-
- klass->toggled = NULL;
- klass->draw_indicator = gtk_real_check_menu_item_draw_indicator;
-}
-
-static void
gtk_check_menu_item_init (GtkCheckMenuItem *check_menu_item)
{
check_menu_item->active = FALSE;
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index de0cefd70..d3dcb28c0 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -133,8 +133,7 @@ LIST_WIDTH (GtkCList * clist)
/* Signals */
-enum
-{
+enum {
SELECT_ROW,
UNSELECT_ROW,
ROW_MOVE,
@@ -154,8 +153,7 @@ enum
LAST_SIGNAL
};
-enum
-{
+enum {
SYNC_REMOVE,
SYNC_INSERT
};
@@ -168,7 +166,8 @@ enum {
ARG_ROW_HEIGHT,
ARG_TITLES_ACTIVE,
ARG_REORDERABLE,
- ARG_USE_DRAG_ICONS
+ ARG_USE_DRAG_ICONS,
+ ARG_SORT_TYPE
};
/* GtkCList Methods */
@@ -451,6 +450,7 @@ static void drag_dest_cell (GtkCList *clist,
GtkCListDestInfo *dest_info);
+
static GtkContainerClass *parent_class = NULL;
static guint clist_signals[LAST_SIGNAL] = {0};
@@ -523,7 +523,10 @@ gtk_clist_class_init (GtkCListClass *klass)
GTK_TYPE_BOOL,
GTK_ARG_READWRITE,
ARG_USE_DRAG_ICONS);
-
+ gtk_object_add_arg_type ("GtkCList::sort_type",
+ GTK_TYPE_SORT_TYPE,
+ GTK_ARG_READWRITE,
+ ARG_SORT_TYPE);
object_class->set_arg = gtk_clist_set_arg;
object_class->get_arg = gtk_clist_get_arg;
object_class->destroy = gtk_clist_destroy;
@@ -852,7 +855,8 @@ gtk_clist_set_arg (GtkObject *object,
case ARG_USE_DRAG_ICONS:
gtk_clist_set_use_drag_icons (clist, GTK_VALUE_BOOL (*arg));
break;
- default:
+ case ARG_SORT_TYPE:
+ gtk_clist_set_sort_type (clist, GTK_VALUE_ENUM (*arg));
break;
}
}
@@ -898,6 +902,9 @@ gtk_clist_get_arg (GtkObject *object,
case ARG_USE_DRAG_ICONS:
GTK_VALUE_BOOL (*arg) = GTK_CLIST_USE_DRAG_ICONS (clist);
break;
+ case ARG_SORT_TYPE:
+ GTK_VALUE_ENUM (*arg) = clist->sort_type;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
@@ -1296,8 +1303,6 @@ void
gtk_clist_column_title_active (GtkCList *clist,
gint column)
{
- GtkObject *object;
-
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
@@ -2736,8 +2741,7 @@ real_remove_row (GtkCList *clist,
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW],
row, -1, NULL);
- /* reset the row end pointer if we're removing at the
- * end of the list */
+ /* reset the row end pointer if we're removing at the end of the list */
clist->rows--;
if (clist->row_list == list)
clist->row_list = g_list_next (list);
@@ -3871,7 +3875,7 @@ real_undo_selection (GtkCList *clist)
for (work = clist->undo_unselection; work; work = work->next)
{
- g_print ("unselect %d\n",GPOINTER_TO_INT (work->data));
+ /* g_print ("unselect %d\n",GPOINTER_TO_INT (work->data)); */
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW],
GPOINTER_TO_INT (work->data), -1, NULL);
}
@@ -4511,7 +4515,8 @@ gtk_clist_realize (GtkWidget *widget)
/* We'll use this gc to do scrolling as well */
gdk_gc_set_exposures (clist->fg_gc, TRUE);
- values.foreground = widget->style->white;
+ values.foreground = (widget->style->white.pixel==0 ?
+ widget->style->black:widget->style->white);
values.function = GDK_XOR;
values.subwindow_mode = GDK_INCLUDE_INFERIORS;
clist->xor_gc = gdk_gc_new_with_values (widget->window,
@@ -4755,7 +4760,7 @@ gtk_clist_draw (GtkWidget *widget,
(2 * widget->style->klass->ythickness) +
clist->column_title_area.height);
- gdk_window_clear_area (clist->clist_window, 0, 0, -1, -1);
+ gdk_window_clear_area (clist->clist_window, 0, 0, 0, 0);
draw_rows (clist, NULL);
for (i = 0; i < clist->columns; i++)
@@ -5948,8 +5953,8 @@ draw_rows (GtkCList *clist,
}
if (!area)
- gdk_window_clear_area (clist->clist_window,
- 0, ROW_TOP_YPIXEL (clist, i), -1, -1);
+ gdk_window_clear_area (clist->clist_window, 0,
+ ROW_TOP_YPIXEL (clist, i), 0, 0);
}
static void
@@ -6049,7 +6054,8 @@ adjust_adjustments (GtkCList *clist,
clist->vadjustment->lower = 0;
clist->vadjustment->upper = LIST_HEIGHT (clist);
- if (clist->clist_window_height - clist->voffset > LIST_HEIGHT (clist))
+ if (clist->clist_window_height - clist->voffset > LIST_HEIGHT (clist) ||
+ (clist->voffset + (gint)clist->vadjustment->value) != 0)
{
clist->vadjustment->value = MAX (0, (LIST_HEIGHT (clist) -
clist->clist_window_height));
@@ -6067,7 +6073,8 @@ adjust_adjustments (GtkCList *clist,
clist->hadjustment->lower = 0;
clist->hadjustment->upper = LIST_WIDTH (clist);
- if (clist->clist_window_width - clist->hoffset > LIST_WIDTH (clist))
+ if (clist->clist_window_width - clist->hoffset > LIST_WIDTH (clist) ||
+ (clist->hoffset + (gint)clist->hadjustment->value) != 0)
{
clist->hadjustment->value = MAX (0, (LIST_WIDTH (clist) -
clist->clist_window_width));
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index 4a93988e3..5c02eeeee 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -42,8 +42,7 @@ extern "C" {
#endif /* __cplusplus */
/* clist flags */
-enum
-{
+enum {
GTK_CLIST_IN_DRAG = 1 << 0,
GTK_CLIST_ROW_HEIGHT_SET = 1 << 1,
GTK_CLIST_SHOW_TITLES = 1 << 2,
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 72660d3d5..5e82acc6d 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -62,32 +62,34 @@
#define SAMPLE_HEIGHT 28
static void gtk_color_selection_class_init (GtkColorSelectionClass *klass);
+static void gtk_color_selection_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_color_selection_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_color_selection_init (GtkColorSelection *colorsel);
-static void gtk_color_selection_dialog_class_init(GtkColorSelectionDialogClass *klass);
-static void gtk_color_selection_dialog_init(GtkColorSelectionDialog *colorseldiag);
+static void gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass);
+static void gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag);
-enum
-{
+enum {
COLOR_CHANGED,
LAST_SIGNAL
};
-enum
-{
+enum {
RGB_INPUTS = 1 << 0,
HSV_INPUTS = 1 << 1,
OPACITY_INPUTS = 1 << 2
};
-enum
-{
+enum {
SCALE,
ENTRY,
BOTH
};
-enum
-{
+enum {
HUE,
SATURATION,
VALUE,
@@ -98,6 +100,12 @@ enum
NUM_CHANNELS
};
+enum {
+ ARG_0,
+ ARG_UPDATE_POLICY,
+ ARG_USE_OPACITY
+};
+
typedef struct
{
gchar *label;
@@ -238,7 +246,7 @@ gtk_color_selection_get_type (void)
(GtkClassInitFunc) NULL,
};
- color_selection_type = gtk_type_unique (gtk_vbox_get_type (), &colorsel_info);
+ color_selection_type = gtk_type_unique (GTK_TYPE_VBOX, &colorsel_info);
}
return color_selection_type;
@@ -255,8 +263,13 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
widget_class = (GtkWidgetClass*) klass;
container_class = (GtkContainerClass*) klass;
- color_selection_parent_class = gtk_type_class (gtk_vbox_get_type ());
-
+ color_selection_parent_class = gtk_type_class (GTK_TYPE_VBOX);
+
+ gtk_object_add_arg_type ("GtkColorSelection::policy", GTK_TYPE_UPDATE_TYPE,
+ GTK_ARG_READWRITE, ARG_UPDATE_POLICY);
+ gtk_object_add_arg_type ("GtkColorSelection::use_opacity", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_USE_OPACITY);
+
color_selection_signals[COLOR_CHANGED] =
gtk_signal_new ("color_changed",
GTK_RUN_FIRST,
@@ -266,6 +279,8 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
gtk_object_class_add_signals (object_class, color_selection_signals, LAST_SIGNAL);
+ object_class->set_arg = gtk_color_selection_set_arg;
+ object_class->get_arg = gtk_color_selection_get_arg;
object_class->finalize = gtk_color_selection_finalize;
widget_class->realize = gtk_color_selection_realize;
@@ -440,17 +455,57 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
}
colorsel->opacity_label = label;
-
+
gtk_widget_show (table);
gtk_widget_show (hbox);
}
-GtkWidget *
+static void
+gtk_color_selection_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkColorSelection *color_selection = GTK_COLOR_SELECTION (object);
+
+ switch (arg_id)
+ {
+ case ARG_UPDATE_POLICY:
+ gtk_color_selection_set_update_policy (color_selection, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_USE_OPACITY:
+ gtk_color_selection_set_opacity (color_selection, GTK_VALUE_BOOL (*arg));
+ break;
+ }
+}
+
+static void
+gtk_color_selection_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkColorSelection *color_selection;
+
+ color_selection = GTK_COLOR_SELECTION (object);
+
+ switch (arg_id)
+ {
+ case ARG_UPDATE_POLICY:
+ GTK_VALUE_ENUM (*arg) = color_selection->policy;
+ break;
+ case ARG_USE_OPACITY:
+ GTK_VALUE_BOOL (*arg) = color_selection->use_opacity;
+ break;
+ default:
+ break;
+ }
+}
+
+GtkWidget*
gtk_color_selection_new (void)
{
GtkColorSelection *colorsel;
- colorsel = gtk_type_new (gtk_color_selection_get_type ());
+ colorsel = gtk_type_new (GTK_TYPE_COLOR_SELECTION);
return GTK_WIDGET (colorsel);
}
@@ -1145,10 +1200,14 @@ gtk_color_selection_wheel_timeout (GtkColorSelection *colorsel)
{
gint x, y;
+ GDK_THREADS_ENTER ();
+
gdk_window_get_pointer (colorsel->wheel_area->window, &x, &y, NULL);
gtk_color_selection_update_wheel (colorsel, x, y);
gtk_color_selection_color_changed (colorsel);
+ GDK_THREADS_LEAVE ();
+
return (TRUE);
}
@@ -1255,7 +1314,7 @@ gtk_color_selection_draw_value_bar (GtkColorSelection *colorsel,
}
v = 1.0;
- sv = 1.0 / (gdouble) (heig - 1);
+ sv = 1.0 / (gdouble) MAX (heig - 1, 0);
for (y = 0; y < heig; y++)
{
@@ -1599,10 +1658,10 @@ gtk_color_selection_rgb_to_hsv (gdouble r, gdouble g, gdouble b,
/* GtkColorSelectionDialog */
/***************************/
-guint
+GtkType
gtk_color_selection_dialog_get_type (void)
{
- static guint color_selection_dialog_type = 0;
+ static GtkType color_selection_dialog_type = 0;
if (!color_selection_dialog_type)
{
@@ -1618,7 +1677,7 @@ gtk_color_selection_dialog_get_type (void)
(GtkClassInitFunc) NULL,
};
- color_selection_dialog_type = gtk_type_unique (gtk_window_get_type (), &colorsel_diag_info);
+ color_selection_dialog_type = gtk_type_unique (GTK_TYPE_WINDOW, &colorsel_diag_info);
}
return color_selection_dialog_type;
@@ -1631,7 +1690,7 @@ gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass)
object_class = (GtkObjectClass*) klass;
- color_selection_dialog_parent_class = gtk_type_class (gtk_window_get_type ());
+ color_selection_dialog_parent_class = gtk_type_class (GTK_TYPE_WINDOW);
}
static void
@@ -1685,12 +1744,12 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
gtk_widget_pop_visual ();
}
-GtkWidget *
+GtkWidget*
gtk_color_selection_dialog_new (const gchar *title)
{
GtkColorSelectionDialog *colorseldiag;
- colorseldiag = gtk_type_new (gtk_color_selection_dialog_get_type ());
+ colorseldiag = gtk_type_new (GTK_TYPE_COLOR_SELECTION_DIALOG);
gtk_window_set_title (GTK_WINDOW (colorseldiag), title);
return GTK_WIDGET (colorseldiag);
diff --git a/gtk/gtkcolorsel.h b/gtk/gtkcolorsel.h
index d511b0377..fff80d387 100644
--- a/gtk/gtkcolorsel.h
+++ b/gtk/gtkcolorsel.h
@@ -50,14 +50,17 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_COLOR_SELECTION(obj) GTK_CHECK_CAST (obj, gtk_color_selection_get_type (), GtkColorSelection)
-#define GTK_COLOR_SELECTION_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_color_selection_get_type (), GtkColorSelectionClass)
-#define GTK_IS_COLOR_SELECTION(obj) GTK_CHECK_TYPE (obj, gtk_color_selection_get_type ())
-
-#define GTK_COLOR_SELECTION_DIALOG(obj) GTK_CHECK_CAST (obj, gtk_color_selection_dialog_get_type (), GtkColorSelectionDialog)
-#define GTK_COLOR_SELECTION_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_color_selection_dialog_get_type (), GtkColorSelectionDialogClass)
-#define GTK_IS_COLOR_SELECTION_DIALOG(obj) GTK_CHECK_TYPE (obj, gtk_color_selection_dialog_get_type ())
-
+#define GTK_TYPE_COLOR_SELECTION (gtk_color_selection_get_type ())
+#define GTK_COLOR_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelection))
+#define GTK_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
+#define GTK_IS_COLOR_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION))
+#define GTK_IS_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION))
+
+#define GTK_TYPE_COLOR_SELECTION_DIALOG (gtk_color_selection_dialog_get_type ())
+#define GTK_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialog))
+#define GTK_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialogClass))
+#define GTK_IS_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG))
+#define GTK_IS_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG))
typedef struct _GtkColorSelection GtkColorSelection;
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
@@ -140,7 +143,7 @@ void gtk_color_selection_get_color (GtkColorSelection *colorse
/* ColorSelectionDialog */
-guint gtk_color_selection_dialog_get_type (void);
+GtkType gtk_color_selection_dialog_get_type (void);
GtkWidget* gtk_color_selection_dialog_new (const gchar *title);
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index e8220845d..2e9367bb5 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -44,7 +44,8 @@ enum {
ARG_0,
ARG_BORDER_WIDTH,
ARG_RESIZE_MODE,
- ARG_CHILD
+ ARG_CHILD,
+ ARG_REALLOCATE_REDRAWS
};
typedef struct _GtkChildArgInfo GtkChildArgInfo;
@@ -167,6 +168,7 @@ gtk_container_class_init (GtkContainerClass *class)
gtk_object_add_arg_type ("GtkContainer::border_width", GTK_TYPE_ULONG, GTK_ARG_READWRITE, ARG_BORDER_WIDTH);
gtk_object_add_arg_type ("GtkContainer::resize_mode", GTK_TYPE_RESIZE_MODE, GTK_ARG_READWRITE, ARG_RESIZE_MODE);
gtk_object_add_arg_type ("GtkContainer::child", GTK_TYPE_WIDGET, GTK_ARG_WRITABLE, ARG_CHILD);
+ gtk_object_add_arg_type ("GtkContainer::reallocate_redraws", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_REALLOCATE_REDRAWS);
container_signals[ADD] =
gtk_signal_new ("add",
@@ -607,6 +609,7 @@ gtk_container_init (GtkContainer *container)
container->border_width = 0;
container->need_resize = FALSE;
container->resize_mode = GTK_RESIZE_PARENT;
+ container->reallocate_redraws = FALSE;
container->resize_widgets = NULL;
}
@@ -621,11 +624,9 @@ gtk_container_destroy (GtkObject *object)
container = GTK_CONTAINER (object);
if (GTK_CONTAINER_RESIZE_PENDING (container))
- {
- container_resize_queue = g_slist_remove (container_resize_queue, container);
- GTK_PRIVATE_UNSET_FLAG (container, GTK_RESIZE_PENDING);
- }
- gtk_container_clear_resize_widgets (container);
+ gtk_container_dequeue_resize_handler (container);
+ if (container->resize_widgets)
+ gtk_container_clear_resize_widgets (container);
gtk_container_foreach (container, (GtkCallback) gtk_widget_destroy, NULL);
@@ -650,6 +651,9 @@ gtk_container_set_arg (GtkObject *object,
case ARG_RESIZE_MODE:
gtk_container_set_resize_mode (container, GTK_VALUE_ENUM (*arg));
break;
+ case ARG_REALLOCATE_REDRAWS:
+ gtk_container_set_reallocate_redraws (container, GTK_VALUE_BOOL (*arg));
+ break;
case ARG_CHILD:
gtk_container_add (container, GTK_WIDGET (GTK_VALUE_OBJECT (*arg)));
break;
@@ -675,6 +679,9 @@ gtk_container_get_arg (GtkObject *object,
case ARG_RESIZE_MODE:
GTK_VALUE_ENUM (*arg) = container->resize_mode;
break;
+ case ARG_REALLOCATE_REDRAWS:
+ GTK_VALUE_BOOL (*arg) = container->reallocate_redraws;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
@@ -726,6 +733,16 @@ gtk_container_remove (GtkContainer *container,
}
void
+gtk_container_dequeue_resize_handler (GtkContainer *container)
+{
+ g_return_if_fail (GTK_IS_CONTAINER (container));
+ g_return_if_fail (GTK_CONTAINER_RESIZE_PENDING (container));
+
+ container_resize_queue = g_slist_remove (container_resize_queue, container);
+ GTK_PRIVATE_UNSET_FLAG (container, GTK_RESIZE_PENDING);
+}
+
+void
gtk_container_clear_resize_widgets (GtkContainer *container)
{
GSList *node;
@@ -735,11 +752,6 @@ gtk_container_clear_resize_widgets (GtkContainer *container)
node = container->resize_widgets;
- if (node)
- gtk_signal_disconnect_by_func (GTK_OBJECT (container),
- GTK_SIGNAL_FUNC (gtk_container_clear_resize_widgets),
- NULL);
-
while (node)
{
GtkWidget *widget = node->data;
@@ -778,6 +790,21 @@ gtk_container_set_resize_mode (GtkContainer *container,
}
}
+void
+gtk_container_set_reallocate_redraws (GtkContainer *container,
+ gboolean needs_redraws)
+{
+ g_return_if_fail (GTK_IS_CONTAINER (container));
+
+ needs_redraws = needs_redraws ? TRUE : FALSE;
+ if (needs_redraws != container->reallocate_redraws)
+ {
+ container->reallocate_redraws = needs_redraws;
+ if (container->reallocate_redraws)
+ gtk_widget_queue_draw (GTK_WIDGET (container));
+ }
+}
+
static GtkContainer*
gtk_container_get_resize_container (GtkContainer *container)
{
@@ -833,18 +860,23 @@ gtk_container_queue_resize (GtkContainer *container)
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_CONTAINER (container));
+ /* clear resize widgets for resize containers
+ * before aborting prematurely. this is especially
+ * important for toplevels which may need imemdiate
+ * processing or their resize handler to be queued.
+ */
+ if (GTK_IS_RESIZE_CONTAINER (container))
+ gtk_container_clear_resize_widgets (container);
if (GTK_OBJECT_DESTROYED (container) ||
GTK_WIDGET_RESIZE_NEEDED (container))
return;
-
- if (GTK_IS_RESIZE_CONTAINER (container))
- gtk_container_clear_resize_widgets (container);
-
+
resize_container = gtk_container_get_resize_container (container);
-
+
if (resize_container)
{
- if (GTK_WIDGET_VISIBLE (resize_container))
+ if (GTK_WIDGET_VISIBLE (resize_container) &&
+ (GTK_WIDGET_TOPLEVEL (resize_container) || GTK_WIDGET_DRAWABLE (resize_container)))
{
switch (resize_container->resize_mode)
{
@@ -860,40 +892,29 @@ gtk_container_queue_resize (GtkContainer *container)
}
GTK_PRIVATE_SET_FLAG (container, GTK_RESIZE_NEEDED);
- if (!resize_container->resize_widgets)
- gtk_signal_connect (GTK_OBJECT (resize_container),
- "size_allocate",
- GTK_SIGNAL_FUNC (gtk_container_clear_resize_widgets),
- NULL);
resize_container->resize_widgets =
g_slist_prepend (resize_container->resize_widgets, container);
break;
case GTK_RESIZE_IMMEDIATE:
GTK_PRIVATE_SET_FLAG (container, GTK_RESIZE_NEEDED);
- if (!resize_container->resize_widgets)
- gtk_signal_connect (GTK_OBJECT (resize_container),
- "size_allocate",
- GTK_SIGNAL_FUNC (gtk_container_clear_resize_widgets),
- NULL);
resize_container->resize_widgets =
g_slist_prepend (resize_container->resize_widgets, container);
gtk_container_check_resize (resize_container);
break;
case GTK_RESIZE_PARENT:
- /* Ignore */
+ /* Ignore, should not be reached */
break;
}
}
else
{
- /* We need to let hidden toplevels know that something
- * changed while they where hidden. For other resize containers,
- * they will get resized when they are shown.
+ /* we need to let hidden resize containers know that something
+ * changed while they where hidden (currently only evaluated by
+ * toplevels).
*/
- if (GTK_WIDGET_TOPLEVEL (resize_container))
- gtk_container_check_resize (resize_container);
+ resize_container->need_resize = TRUE;
}
}
}
@@ -903,7 +924,7 @@ gtk_container_check_resize (GtkContainer *container)
{
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_CONTAINER (container));
-
+
gtk_signal_emit (GTK_OBJECT (container), container_signals[CHECK_RESIZE]);
}
@@ -976,7 +997,7 @@ gtk_container_resize_children (GtkContainer *container)
* which is not the case if we got another container queued for
* a resize in our anchestry. also we can skip the whole
* resize_widgets checks if we are a toplevel and NEED_RESIZE.
- * this code implies that our allocation is sufficient for our
+ * this code assumes that our allocation is sufficient for our
* requisition, since otherwise we would NEED_RESIZE.
*/
resize_container = GTK_WIDGET (container);
@@ -1006,10 +1027,6 @@ gtk_container_resize_children (GtkContainer *container)
* is insufficient, since we don't need to reallocate below that.
*/
resize_widgets = container->resize_widgets;
- if (resize_widgets)
- gtk_signal_disconnect_by_func (GTK_OBJECT (container),
- GTK_SIGNAL_FUNC (gtk_container_clear_resize_widgets),
- NULL);
container->resize_widgets = NULL;
for (node = resize_widgets; node; node = node->next)
{
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index ab59731a3..6cfe9b8f5 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -60,7 +60,7 @@ struct _GtkContainer
guint border_width : 16;
guint need_resize : 1;
guint resize_mode : 2;
-
+ guint reallocate_redraws : 1;
/* The list of children that requested a resize
*/
@@ -132,6 +132,8 @@ gint gtk_container_focus (GtkContainer *container,
/* Widget-level methods */
+void gtk_container_set_reallocate_redraws (GtkContainer *container,
+ gboolean needs_redraws);
void gtk_container_set_focus_child (GtkContainer *container,
GtkWidget *child);
void gtk_container_set_focus_vadjustment (GtkContainer *container,
@@ -140,7 +142,7 @@ void gtk_container_set_focus_hadjustment (GtkContainer *container,
GtkAdjustment *adjustment);
void gtk_container_register_toplevel (GtkContainer *container);
void gtk_container_unregister_toplevel (GtkContainer *container);
-GList * gtk_container_get_toplevels (void);
+GList* gtk_container_get_toplevels (void);
void gtk_container_resize_children (GtkContainer *container);
@@ -200,30 +202,30 @@ void gtk_container_child_set (GtkContainer *container,
/* Non-public methods */
-void gtk_container_queue_resize (GtkContainer *container);
-void gtk_container_clear_resize_widgets (GtkContainer *container);
-void gtk_container_arg_set (GtkContainer *container,
- GtkWidget *child,
- GtkArg *arg,
- GtkArgInfo *info);
-void gtk_container_arg_get (GtkContainer *container,
- GtkWidget *child,
- GtkArg *arg,
- GtkArgInfo *info);
-gchar* gtk_container_child_args_collect (GtkType object_type,
- GSList **arg_list_p,
- GSList **info_list_p,
- const gchar *first_arg_name,
- va_list args);
-gchar* gtk_container_child_arg_get_info (GtkType object_type,
- const gchar *arg_name,
- GtkArgInfo **info_p);
-void gtk_container_forall (GtkContainer *container,
- GtkCallback callback,
- gpointer callback_data);
-gchar* gtk_container_child_composite_name (GtkContainer *container,
- GtkWidget *child);
-
+void gtk_container_queue_resize (GtkContainer *container);
+void gtk_container_clear_resize_widgets (GtkContainer *container);
+void gtk_container_arg_set (GtkContainer *container,
+ GtkWidget *child,
+ GtkArg *arg,
+ GtkArgInfo *info);
+void gtk_container_arg_get (GtkContainer *container,
+ GtkWidget *child,
+ GtkArg *arg,
+ GtkArgInfo *info);
+gchar* gtk_container_child_args_collect (GtkType object_type,
+ GSList **arg_list_p,
+ GSList **info_list_p,
+ const gchar *first_arg_name,
+ va_list args);
+gchar* gtk_container_child_arg_get_info (GtkType object_type,
+ const gchar *arg_name,
+ GtkArgInfo **info_p);
+void gtk_container_forall (GtkContainer *container,
+ GtkCallback callback,
+ gpointer callback_data);
+gchar* gtk_container_child_composite_name (GtkContainer *container,
+ GtkWidget *child);
+void gtk_container_dequeue_resize_handler (GtkContainer *container);
#ifdef __cplusplus
}
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 983257222..a5669653b 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -991,8 +991,12 @@ draw_cell_pixmap (GdkWindow *window,
if (width > 0 && height > 0)
gdk_draw_pixmap (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
-
- gdk_gc_set_clip_origin (fg_gc, 0, 0);
+
+ if (mask)
+ {
+ gdk_gc_set_clip_rectangle (fg_gc, NULL);
+ gdk_gc_set_clip_origin (fg_gc, 0, 0);
+ }
return x + MAX (width, 0);
}
@@ -4136,9 +4140,13 @@ gtk_ctree_is_ancestor (GtkCTree *ctree,
GtkCTreeNode *node,
GtkCTreeNode *child)
{
+ g_return_val_if_fail (GTK_IS_CTREE (ctree), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
- return gtk_ctree_find (ctree, GTK_CTREE_ROW (node)->children, child);
+ if (GTK_CTREE_ROW (node)->children)
+ return gtk_ctree_find (ctree, GTK_CTREE_ROW (node)->children, child);
+
+ return FALSE;
}
GtkCTreeNode *
diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c
index 5dd85900d..2e19e0a90 100644
--- a/gtk/gtkcurve.c
+++ b/gtk/gtkcurve.c
@@ -46,6 +46,15 @@
GDK_BUTTON_RELEASE_MASK | \
GDK_BUTTON1_MOTION_MASK)
+enum {
+ ARG_0,
+ ARG_CURVE_TYPE,
+ ARG_MIN_X,
+ ARG_MAX_X,
+ ARG_MIN_Y,
+ ARG_MAX_Y
+};
+
static GtkDrawingAreaClass *parent_class = NULL;
static guint curve_type_changed_signal = 0;
@@ -53,6 +62,12 @@ static guint curve_type_changed_signal = 0;
/* forward declarations: */
static void gtk_curve_class_init (GtkCurveClass *class);
static void gtk_curve_init (GtkCurve *curve);
+static void gtk_curve_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_curve_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_curve_finalize (GtkObject *object);
static gint gtk_curve_graph_events (GtkWidget *widget,
GdkEvent *event,
@@ -78,7 +93,7 @@ gtk_curve_get_type (void)
(GtkClassInitFunc) NULL,
};
- curve_type = gtk_type_unique (gtk_drawing_area_get_type (), &curve_info);
+ curve_type = gtk_type_unique (GTK_TYPE_DRAWING_AREA, &curve_info);
}
return curve_type;
}
@@ -87,18 +102,31 @@ static void
gtk_curve_class_init (GtkCurveClass *class)
{
GtkObjectClass *object_class;
-
- parent_class = gtk_type_class (gtk_drawing_area_get_type ());
-
+
+ parent_class = gtk_type_class (GTK_TYPE_DRAWING_AREA);
+
object_class = (GtkObjectClass *) class;
-
+
+ object_class->set_arg = gtk_curve_set_arg;
+ object_class->get_arg = gtk_curve_get_arg;
+ object_class->finalize = gtk_curve_finalize;
+
curve_type_changed_signal =
gtk_signal_new ("curve_type_changed", GTK_RUN_FIRST, object_class->type,
GTK_SIGNAL_OFFSET (GtkCurveClass, curve_type_changed),
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, &curve_type_changed_signal, 1);
-
- object_class->finalize = gtk_curve_finalize;
+
+ gtk_object_add_arg_type ("GtkCurve::curve_type", GTK_TYPE_CURVE_TYPE,
+ GTK_ARG_READWRITE, ARG_CURVE_TYPE);
+ gtk_object_add_arg_type ("GtkCurve::min_x", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_MIN_X);
+ gtk_object_add_arg_type ("GtkCurve::max_x", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_MAX_X);
+ gtk_object_add_arg_type ("GtkCurve::min_y", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_MIN_Y);
+ gtk_object_add_arg_type ("GtkCurve::max_y", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_MAX_Y);
}
static void
@@ -130,6 +158,67 @@ gtk_curve_init (GtkCurve *curve)
gtk_curve_size_graph (curve);
}
+static void
+gtk_curve_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkCurve *curve = GTK_CURVE (object);
+
+ switch (arg_id)
+ {
+ case ARG_CURVE_TYPE:
+ gtk_curve_set_curve_type (curve, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_MIN_X:
+ gtk_curve_set_range (curve, GTK_VALUE_FLOAT (*arg), curve->max_x,
+ curve->min_y, curve->max_y);
+ break;
+ case ARG_MAX_X:
+ gtk_curve_set_range (curve, curve->min_x, GTK_VALUE_FLOAT (*arg),
+ curve->min_y, curve->max_y);
+ break;
+ case ARG_MIN_Y:
+ gtk_curve_set_range (curve, curve->min_x, curve->max_x,
+ GTK_VALUE_FLOAT (*arg), curve->max_y);
+ break;
+ case ARG_MAX_Y:
+ gtk_curve_set_range (curve, curve->min_x, curve->max_x,
+ curve->min_y, GTK_VALUE_FLOAT (*arg));
+ break;
+ }
+}
+
+static void
+gtk_curve_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkCurve *curve = GTK_CURVE (object);
+
+ switch (arg_id)
+ {
+ case ARG_CURVE_TYPE:
+ GTK_VALUE_ENUM (*arg) = curve->curve_type;
+ break;
+ case ARG_MIN_X:
+ GTK_VALUE_FLOAT (*arg) = curve->min_x;
+ break;
+ case ARG_MAX_X:
+ GTK_VALUE_FLOAT (*arg) = curve->max_x;
+ break;
+ case ARG_MIN_Y:
+ GTK_VALUE_FLOAT (*arg) = curve->min_y;
+ break;
+ case ARG_MAX_Y:
+ GTK_VALUE_FLOAT (*arg) = curve->max_y;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
static int
project (gfloat value, gfloat min, gfloat max, int norm)
{
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 56dae8894..879773ae8 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -25,6 +25,7 @@
*/
#include "gdkx.h"
+#include "gdk/gdkkeysyms.h"
#include "gtkdnd.h"
#include "gtkinvisible.h"
@@ -228,9 +229,16 @@ static void gtk_drag_selection_get (GtkWidget *widget,
static gint gtk_drag_anim_timeout (gpointer data);
static void gtk_drag_remove_icon (GtkDragSourceInfo *info);
static void gtk_drag_source_info_destroy (gpointer data);
+static void gtk_drag_update (GtkDragSourceInfo *info,
+ gint x_root,
+ gint y_root,
+ GdkEvent *event);
static gint gtk_drag_motion_cb (GtkWidget *widget,
GdkEventMotion *event,
gpointer data);
+static gint gtk_drag_key_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data);
static gint gtk_drag_button_release_cb (GtkWidget *widget,
GdkEventButton *event,
gpointer data);
@@ -242,70 +250,70 @@ static gint gtk_drag_abort_timeout (gpointer data);
#define action_ask_width 16
#define action_ask_height 16
-static const char action_ask_bits[] = {
+static const guchar action_ask_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x1f, 0x06, 0xc0, 0x76, 0xf8, 0xb6, 0xf7,
0xd6, 0xec, 0x66, 0xdb, 0x66, 0xdb, 0x96, 0xec, 0x76, 0xf7, 0x76, 0xfb,
0xf6, 0xfc, 0x72, 0xfb, 0x7a, 0xfb, 0xf8, 0xfc, };
#define action_ask_mask_width 16
#define action_ask_mask_height 16
-static const char action_ask_mask_bits[] = {
+static const guchar action_ask_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x8f, 0x07, 0xcf, 0x0f,
0xef, 0x1f, 0xff, 0x3c, 0xff, 0x3c, 0x6f, 0x1f, 0x8f, 0x0f, 0x8f, 0x07,
0x0f, 0x03, 0x8f, 0x07, 0x87, 0x07, 0x07, 0x03, };
#define action_copy_width 16
#define action_copy_height 16
-static const char action_copy_bits[] = {
+static const guchar action_copy_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x1f, 0x06, 0xc0, 0x76, 0xfb, 0x76, 0xfb,
0x76, 0xfb, 0x06, 0x83, 0xf6, 0xbf, 0xf6, 0xbf, 0x06, 0x83, 0x76, 0xfb,
0x76, 0xfb, 0x72, 0xfb, 0x7a, 0xf8, 0xf8, 0xff, };
#define action_copy_mask_width 16
#define action_copy_mask_height 16
-static const char action_copy_mask_bits[] = {
+static const guchar action_copy_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x8f, 0x07, 0x8f, 0x07,
0x8f, 0x07, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x8f, 0x07,
0x8f, 0x07, 0x8f, 0x07, 0x87, 0x07, 0x07, 0x00, };
#define action_move_width 16
#define action_move_height 16
-static const char action_move_bits[] = {
+static const guchar action_move_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x1f, 0x06, 0xc0, 0x96, 0xff, 0x26, 0xff,
0xc6, 0xf8, 0xd6, 0xe3, 0x96, 0x8f, 0xb6, 0xbf, 0x36, 0xc3, 0x76, 0xfb,
0x76, 0xfa, 0xf2, 0xfa, 0xfa, 0xf8, 0xf8, 0xff, };
#define action_move_mask_width 16
#define action_move_mask_height 16
-static const char action_move_mask_bits[] = {
+static const guchar action_move_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x6f, 0x00, 0xff, 0x00,
0xff, 0x07, 0xef, 0x1f, 0xef, 0x7f, 0xcf, 0x7f, 0xcf, 0x3f, 0x8f, 0x07,
0x8f, 0x07, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x00, };
#define action_link_width 16
#define action_link_height 16
-static const char action_link_bits[] = {
+static const guchar action_link_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x1f, 0x06, 0xc0, 0x36, 0xf8, 0xd6, 0xf7,
0x66, 0xec, 0xa6, 0xe8, 0x26, 0xdf, 0xe6, 0xbd, 0xd6, 0xa7, 0xb6, 0xa8,
0xb6, 0xb1, 0x72, 0xdf, 0xfa, 0xe0, 0xf8, 0xff, };
#define action_link_mask_width 16
#define action_link_mask_height 16
-static const char action_link_mask_bits[] = {
+static const guchar action_link_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xcf, 0x07, 0xef, 0x0f,
0xff, 0x1f, 0x7f, 0x1f, 0xff, 0x3f, 0xff, 0x7f, 0xef, 0x7f, 0xcf, 0x77,
0xcf, 0x7f, 0x8f, 0x3f, 0x07, 0x1f, 0x07, 0x00, };
#define action_none_width 16
#define action_none_height 16
-static const char action_none_bits[] = {
+static const guchar action_none_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x1f, 0x06, 0xc0, 0xf6, 0xff, 0xf6, 0xff,
0xf6, 0xff, 0xf6, 0xff, 0xf6, 0xff, 0xf6, 0xff, 0xf6, 0xff, 0xf6, 0xff,
0xf6, 0xff, 0xf2, 0xff, 0xfa, 0xff, 0xf8, 0xff, };
#define action_none_mask_width 16
#define action_none_mask_height 16
-static const char action_none_mask_bits[] = {
+static const guchar action_none_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x00, 0x0f, 0x00,
0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x00,
0x0f, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x07, 0x00, };
@@ -330,7 +338,7 @@ static struct {
static const gint n_drag_cursors = sizeof (drag_cursors) / sizeof (drag_cursors[0]);
/* XPM */
-static const char * drag_default_xpm[] = {
+static const char *drag_default_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
@@ -416,6 +424,43 @@ gtk_drag_release_ipc_widget (GtkWidget *widget)
drag_widgets = g_slist_prepend (drag_widgets, widget);
}
+static guint32
+gtk_drag_get_event_time (GdkEvent *event)
+{
+ guint32 tm = GDK_CURRENT_TIME;
+
+ if (event)
+ switch (event->type)
+ {
+ case GDK_MOTION_NOTIFY:
+ tm = event->motion.time; break;
+ case GDK_BUTTON_PRESS:
+ case GDK_2BUTTON_PRESS:
+ case GDK_3BUTTON_PRESS:
+ case GDK_BUTTON_RELEASE:
+ tm = event->button.time; break;
+ case GDK_KEY_PRESS:
+ case GDK_KEY_RELEASE:
+ tm = event->key.time; break;
+ case GDK_ENTER_NOTIFY:
+ case GDK_LEAVE_NOTIFY:
+ tm = event->crossing.time; break;
+ case GDK_PROPERTY_NOTIFY:
+ tm = event->property.time; break;
+ case GDK_SELECTION_CLEAR:
+ case GDK_SELECTION_REQUEST:
+ case GDK_SELECTION_NOTIFY:
+ tm = event->selection.time; break;
+ case GDK_PROXIMITY_IN:
+ case GDK_PROXIMITY_OUT:
+ tm = event->proximity.time; break;
+ default: /* use current time */
+ break;
+ }
+
+ return tm;
+}
+
static void
gtk_drag_get_event_actions (GdkEvent *event,
gint button,
@@ -953,7 +998,17 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
gint tx, ty;
if (event->type == GDK_DROP_START)
- info->dropped = TRUE;
+ {
+ info->dropped = TRUE;
+ /* We send a leave here so that the widget unhighlights
+ * properly.
+ */
+ if (info->widget)
+ {
+ gtk_drag_dest_leave (info->widget, context, event->dnd.time);
+ info->widget = NULL;
+ }
+ }
gdk_window_get_origin (toplevel->window, &tx, &ty);
@@ -969,11 +1024,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
gtk_drag_find_widget (toplevel, &data);
- /* We send a leave here so that the widget unhighlights
- * properly
- */
- if (info->widget &&
- ((event->type == GDK_DROP_START) || (!data.found)))
+ if (info->widget && !data.found)
{
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
info->widget = NULL;
@@ -986,7 +1037,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
if (!data.found)
gdk_drag_status (context, 0, event->dnd.time);
}
- else if (event->type == GDK_DROP_START)
+ else if (event->type == GDK_DROP_START && !info->proxy_source)
{
gdk_drop_reply (context, data.found, event->dnd.time);
if ((context->protocol == GDK_DRAG_PROTO_MOTIF) && !data.found)
@@ -1332,7 +1383,7 @@ gtk_drag_dest_leave (GtkWidget *widget,
}
else
{
- if (site->flags & GTK_DEST_DEFAULT_HIGHLIGHT)
+ if ((site->flags & GTK_DEST_DEFAULT_HIGHLIGHT) && site->have_drag)
gtk_drag_unhighlight (widget);
if (!(site->flags & GTK_DEST_DEFAULT_MOTION) || site->have_drag)
@@ -1645,16 +1696,6 @@ gtk_drag_begin (GtkWidget *widget,
gtk_signal_emit_by_name (GTK_OBJECT (widget), "drag_begin",
info->context);
- /* We use a GTK grab here to override any grabs that the widget
- * we are dragging from might have held
- */
-
- gtk_grab_add (info->ipc_widget);
- gdk_pointer_grab (info->ipc_widget->window, FALSE,
- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_RELEASE_MASK, NULL,
- info->cursor, time);
-
if (event->type == GDK_MOTION_NOTIFY)
gtk_drag_motion_cb (info->ipc_widget, (GdkEventMotion *)event, info);
@@ -1665,9 +1706,37 @@ gtk_drag_begin (GtkWidget *widget,
GTK_SIGNAL_FUNC (gtk_drag_button_release_cb), info);
gtk_signal_connect (GTK_OBJECT (info->ipc_widget), "motion_notify_event",
GTK_SIGNAL_FUNC (gtk_drag_motion_cb), info);
+ gtk_signal_connect (GTK_OBJECT (info->ipc_widget), "key_press_event",
+ GTK_SIGNAL_FUNC (gtk_drag_key_cb), info);
+ gtk_signal_connect (GTK_OBJECT (info->ipc_widget), "key_release_event",
+ GTK_SIGNAL_FUNC (gtk_drag_key_cb), info);
gtk_signal_connect (GTK_OBJECT (info->ipc_widget), "selection_get",
GTK_SIGNAL_FUNC (gtk_drag_selection_get), info);
+ /* We use a GTK grab here to override any grabs that the widget
+ * we are dragging from might have held
+ */
+ gtk_grab_add (info->ipc_widget);
+ if (gdk_pointer_grab (info->ipc_widget->window, FALSE,
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_RELEASE_MASK, NULL,
+ info->cursor, time) == 0)
+ {
+ if (gdk_keyboard_grab (info->ipc_widget->window, FALSE, time) != 0)
+ {
+ /* FIXME: This should be cleaned up... */
+ GdkEventButton ev;
+
+ ev.time = time;
+ ev.type = GDK_BUTTON_RELEASE;
+ ev.button = info->button;
+
+ gtk_drag_button_release_cb (widget, &ev, info);
+
+ return NULL;
+ }
+ }
+
return info->context;
}
@@ -1937,7 +2006,7 @@ gtk_drag_set_icon_default (GdkDragContext *context)
gdk_pixmap_colormap_create_from_xpm_d (NULL,
default_icon_colormap,
&default_icon_mask,
- NULL, drag_default_xpm);
+ NULL, (gchar **)drag_default_xpm);
default_icon_hot_x = -2;
default_icon_hot_y = -2;
}
@@ -2032,8 +2101,14 @@ gtk_drag_source_handle_event (GtkWidget *widget,
{
if (info->proxy_dest->proxy_drop_wait)
{
+ gboolean result = context->action != 0;
+
/* Aha - we can finally pass the MOTIF DROP on... */
- gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
+ gdk_drop_reply (info->proxy_dest->context, result, info->proxy_dest->proxy_drop_time);
+ if (result)
+ gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
+ else
+ gtk_drag_finish (info->proxy_dest->context, FALSE, FALSE, info->proxy_dest->proxy_drop_time);
}
else
{
@@ -2066,9 +2141,9 @@ gtk_drag_source_handle_event (GtkWidget *widget,
if (info->last_event)
{
- gtk_drag_motion_cb (info->widget,
- (GdkEventMotion *)info->last_event,
- info);
+ gtk_drag_update (info,
+ info->cur_x, info->cur_y,
+ info->last_event);
info->last_event = NULL;
}
}
@@ -2508,41 +2583,36 @@ gtk_drag_source_info_destroy (gpointer data)
}
/*************************************************************
- * gtk_drag_motion_cb:
- * "motion_notify_event" callback during drag.
+ * gtk_drag_update:
+ * Function to update the status of the drag when the
+ * cursor moves or the modifier changes
* arguments:
- *
+ * info: DragSourceInfo for the drag
+ * x_root, y_root: position of darg
+ * event: The event that triggered this call
* results:
*************************************************************/
-static gint
-gtk_drag_motion_cb (GtkWidget *widget,
- GdkEventMotion *event,
- gpointer data)
+static void
+gtk_drag_update (GtkDragSourceInfo *info,
+ gint x_root,
+ gint y_root,
+ GdkEvent *event)
{
- GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
- GdkAtom selection;
GdkDragAction action;
GdkDragAction possible_actions;
GdkWindow *window = NULL;
GdkWindow *dest_window;
GdkDragProtocol protocol;
- gint x_root, y_root;
-
- if (event->is_hint)
- {
- gdk_window_get_pointer (GDK_ROOT_PARENT(), &x_root, &y_root, NULL);
- event->x_root = x_root;
- event->y_root = y_root;
- }
+ GdkAtom selection;
+ guint32 time = gtk_drag_get_event_time (event);
- gtk_drag_get_event_actions ((GdkEvent *)event,
+ gtk_drag_get_event_actions (event,
info->button,
info->possible_actions,
&action, &possible_actions);
-
- info->cur_x = event->x_root;
- info->cur_y = event->y_root;
+ info->cur_x = x_root;
+ info->cur_y = y_root;
if (info->icon_window)
{
@@ -2554,13 +2624,13 @@ gtk_drag_motion_cb (GtkWidget *widget,
}
gdk_drag_find_window (info->context,
- window, event->x_root, event->y_root,
+ window, x_root, y_root,
&dest_window, &protocol);
if (gdk_drag_motion (info->context, dest_window, protocol,
- event->x_root, event->y_root, action,
+ x_root, y_root, action,
possible_actions,
- event->time))
+ time))
{
if (info->last_event)
gdk_event_free ((GdkEvent *)info->last_event);
@@ -2573,60 +2643,37 @@ gtk_drag_motion_cb (GtkWidget *widget,
selection = gdk_drag_get_selection (info->context);
if (selection)
- gtk_drag_source_check_selection (info, selection, event->time);
-
-#if 0
- /* We ignore the response, so we can respond precisely to the drop
- */
- if (event->is_hint)
- gdk_window_get_pointer (widget->window, NULL, NULL, NULL);
-#endif
-
- return TRUE;
+ gtk_drag_source_check_selection (info, selection, time);
}
/*************************************************************
- * gtk_drag_motion_cb:
- * "button_release_event" callback during drag.
+ * gtk_drag_end:
+ * Called when the user finishes to drag, either by
+ * releasing the mouse, or by pressing Esc.
* arguments:
- *
+ * widget: GtkInvisible widget for this drag
+ * info:
* results:
*************************************************************/
-static gint
-gtk_drag_button_release_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer data)
+static void
+gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
{
- GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
- GtkWidget *source_widget = info->widget;
GdkEvent send_event;
+ GtkWidget *source_widget = info->widget;
- gtk_widget_ref (source_widget);
-
- if (event->button != info->button)
- return FALSE;
+ gdk_pointer_ungrab (time);
+ gdk_keyboard_ungrab (time);
- gdk_pointer_ungrab (event->time);
+ gtk_grab_remove (info->ipc_widget);
- gtk_grab_remove (widget);
- gtk_signal_disconnect_by_func (GTK_OBJECT (widget),
+ gtk_signal_disconnect_by_func (GTK_OBJECT (info->ipc_widget),
GTK_SIGNAL_FUNC (gtk_drag_button_release_cb),
info);
- gtk_signal_disconnect_by_func (GTK_OBJECT (widget),
+ gtk_signal_disconnect_by_func (GTK_OBJECT (info->ipc_widget),
GTK_SIGNAL_FUNC (gtk_drag_motion_cb),
info);
- if ((info->context->action != 0) && (info->context->dest_window != NULL))
- {
- gtk_drag_drop (info, event->time);
- }
- else
- {
- gdk_drag_abort (info->context, event->time);
- gtk_drag_drop_finished (info, FALSE, event->time);
- }
-
/* Send on a release pair to the the original
* widget to convince it to release its grab. We need to
* call gtk_propagate_event() here, instead of
@@ -2637,23 +2684,122 @@ gtk_drag_button_release_cb (GtkWidget *widget,
send_event.button.type = GDK_BUTTON_RELEASE;
send_event.button.window = GDK_ROOT_PARENT ();
send_event.button.send_event = TRUE;
- send_event.button.time = event->time;
+ send_event.button.time = time;
send_event.button.x = 0;
send_event.button.y = 0;
send_event.button.pressure = 0.;
send_event.button.xtilt = 0.;
send_event.button.ytilt = 0.;
- send_event.button.state = event->state;
- send_event.button.button = event->button;
+ send_event.button.state = 0;
+ send_event.button.button = info->button;
send_event.button.source = GDK_SOURCE_PEN;
send_event.button.deviceid = GDK_CORE_POINTER;
send_event.button.x_root = 0;
send_event.button.y_root = 0;
gtk_propagate_event (source_widget, &send_event);
+}
- gtk_widget_unref (source_widget);
+/*************************************************************
+ * gtk_drag_motion_cb:
+ * "motion_notify_event" callback during drag.
+ * arguments:
+ *
+ * results:
+ *************************************************************/
+
+static gint
+gtk_drag_motion_cb (GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data)
+{
+ GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
+ gint x_root, y_root;
+
+ if (event->is_hint)
+ {
+ gdk_window_get_pointer (GDK_ROOT_PARENT(), &x_root, &y_root, NULL);
+ event->x_root = x_root;
+ event->y_root = y_root;
+ }
+
+ gtk_drag_update (info, event->x_root, event->y_root, (GdkEvent *)event);
+
+ return TRUE;
+}
+
+/*************************************************************
+ * gtk_drag_key_cb:
+ * "key_press/release_event" callback during drag.
+ * arguments:
+ *
+ * results:
+ *************************************************************/
+
+static gint
+gtk_drag_key_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data)
+{
+ GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
+ GdkModifierType state;
+ if (event->type == GDK_KEY_PRESS)
+ {
+ if (event->keyval == GDK_Escape)
+ {
+ gtk_drag_end (info, event->time);
+ gdk_drag_abort (info->context, event->time);
+ gtk_drag_drop_finished (info, FALSE, event->time);
+
+ return TRUE;
+ }
+ }
+
+ /* Now send a "motion" so that the modifier state is updated */
+
+ /* The state is not yet updated in the event, so we need
+ * to query it here. We could use XGetModifierMapping, but
+ * that would be overkill.
+ */
+ gdk_window_get_pointer (GDK_ROOT_PARENT(), NULL, NULL, &state);
+
+ event->state = state;
+ gtk_drag_update (info, info->cur_x, info->cur_y, (GdkEvent *)event);
+
+ return TRUE;
+}
+
+/*************************************************************
+ * gtk_drag_button_release_cb:
+ * "button_release_event" callback during drag.
+ * arguments:
+ *
+ * results:
+ *************************************************************/
+
+static gint
+gtk_drag_button_release_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data)
+{
+ GtkDragSourceInfo *info = (GtkDragSourceInfo *)data;
+
+ if (event->button != info->button)
+ return FALSE;
+
+ gtk_drag_end (info, event->time);
+
+ if ((info->context->action != 0) && (info->context->dest_window != NULL))
+ {
+ gtk_drag_drop (info, event->time);
+ }
+ else
+ {
+ gdk_drag_abort (info->context, event->time);
+ gtk_drag_drop_finished (info, FALSE, event->time);
+ }
+
return TRUE;
}
@@ -2663,11 +2809,15 @@ gtk_drag_abort_timeout (gpointer data)
GtkDragSourceInfo *info = data;
guint32 time = GDK_CURRENT_TIME;
+ GDK_THREADS_ENTER ();
+
if (info->proxy_dest)
time = info->proxy_dest->proxy_drop_time;
info->drop_timeout = 0;
gtk_drag_drop_finished (info, FALSE, time);
+ GDK_THREADS_LEAVE ();
+
return FALSE;
}
diff --git a/gtk/gtkdrawingarea.h b/gtk/gtkdrawingarea.h
index 2bc19bcba..bad9b7b1f 100644
--- a/gtk/gtkdrawingarea.h
+++ b/gtk/gtkdrawingarea.h
@@ -37,9 +37,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_DRAWING_AREA(obj) GTK_CHECK_CAST (obj, gtk_drawing_area_get_type (), GtkDrawingArea)
-#define GTK_DRAWING_AREA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_drawing_area_get_type (), GtkDrawingAreaClass)
-#define GTK_IS_DRAWING_AREA(obj) GTK_CHECK_TYPE (obj, gtk_drawing_area_get_type ())
+#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ())
+#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
+#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
+#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
+#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
typedef struct _GtkDrawingArea GtkDrawingArea;
diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c
index ec4cd314e..04d64a50a 100644
--- a/gtk/gtkeditable.c
+++ b/gtk/gtkeditable.c
@@ -183,6 +183,7 @@ gtk_editable_class_init (GtkEditableClass *class)
GTK_SIGNAL_OFFSET (GtkEditableClass, activate),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
+ widget_class->activate_signal = editable_signals[ACTIVATE];
editable_signals[SET_EDITABLE] =
gtk_signal_new ("set-editable",
@@ -413,13 +414,14 @@ gtk_editable_insert_text (GtkEditable *editable,
gint *position)
{
GtkEditableClass *klass;
-
gchar buf[64];
gchar *text;
g_return_if_fail (editable != NULL);
g_return_if_fail (GTK_IS_EDITABLE (editable));
+ gtk_widget_ref (GTK_WIDGET (editable));
+
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
if (new_text_length <= 64)
@@ -434,6 +436,8 @@ gtk_editable_insert_text (GtkEditable *editable,
if (new_text_length > 64)
g_free (text);
+
+ gtk_widget_unref (GTK_WIDGET (editable));
}
void
@@ -446,10 +450,14 @@ gtk_editable_delete_text (GtkEditable *editable,
g_return_if_fail (editable != NULL);
g_return_if_fail (GTK_IS_EDITABLE (editable));
+ gtk_widget_ref (GTK_WIDGET (editable));
+
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[DELETE_TEXT], start_pos, end_pos);
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[CHANGED]);
+
+ gtk_widget_unref (GTK_WIDGET (editable));
}
static void
diff --git a/gtk/gtkeditable.h b/gtk/gtkeditable.h
index 7bf973031..5ff0ecbb5 100644
--- a/gtk/gtkeditable.h
+++ b/gtk/gtkeditable.h
@@ -53,16 +53,19 @@ struct _GtkEditable
{
GtkWidget widget;
+ /*< public >*/
guint current_pos;
guint selection_start_pos;
guint selection_end_pos;
guint has_selection : 1;
+
+ /*< private >*/
guint editable : 1;
guint visible : 1;
GdkIC *ic;
GdkICAttr *ic_attr;
-
+
gchar *clipboard_text;
};
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 5c35f5bf6..b6a93b1f8 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1115,7 +1115,7 @@ gtk_entry_key_press (GtkWidget *widget,
break;
case GDK_Return:
return_val = TRUE;
- gtk_signal_emit_by_name (GTK_OBJECT (entry), "activate");
+ gtk_widget_activate (widget);
break;
/* The next two keys should not be inserted literally. Any others ??? */
case GDK_Tab:
@@ -1477,10 +1477,15 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable)
*/
if ((editable->current_pos < entry->text_length) &&
(editable->selection_start_pos == editable->selection_end_pos))
- gdk_draw_text_wc (drawable, widget->style->font,
- widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
- xoffset, yoffset,
- entry->text + editable->current_pos, 1);
+ {
+ GdkWChar c = editable->visible ?
+ *(entry->text + editable->current_pos) :
+ '*';
+
+ gdk_draw_text_wc (drawable, widget->style->font,
+ widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ xoffset, yoffset, &c, 1);
+ }
}
@@ -1947,6 +1952,13 @@ gtk_move_forward_word (GtkEntry *entry)
editable = GTK_EDITABLE (entry);
+ /* Prevent any leak of information */
+ if (!editable->visible)
+ {
+ editable->current_pos = entry->text_length;
+ return;
+ }
+
if (entry->text && (editable->current_pos < entry->text_length))
{
text = entry->text;
@@ -1978,6 +1990,13 @@ gtk_move_backward_word (GtkEntry *entry)
editable = GTK_EDITABLE (entry);
+ /* Prevent any leak of information */
+ if (!editable->visible)
+ {
+ editable->current_pos = 0;
+ return;
+ }
+
if (entry->text && editable->current_pos > 0)
{
text = entry->text;
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index d004d728b..feb22aa00 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -304,7 +304,8 @@ typedef enum
{
GTK_WIN_POS_NONE,
GTK_WIN_POS_CENTER,
- GTK_WIN_POS_MOUSE
+ GTK_WIN_POS_MOUSE,
+ GTK_WIN_POS_CENTER_ALWAYS
} GtkWindowPosition;
/* Window types */
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index ccc674ece..d2e38ac5d 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -808,7 +808,7 @@ gtk_file_selection_destroy (GtkObject *object)
/* Begin file operations callbacks */
static void
-gtk_file_selection_fileop_error (gchar *error_message)
+gtk_file_selection_fileop_error (GtkFileSelection *fs, gchar *error_message)
{
GtkWidget *label;
GtkWidget *vbox;
@@ -827,6 +827,11 @@ gtk_file_selection_fileop_error (gchar *error_message)
gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
+ /* If file dialog is grabbed, make this dialog modal too */
+ /* When error dialog is closed, file dialog will be grabbed again */
+ if (GTK_WINDOW(fs)->modal)
+ gtk_window_set_modal (GTK_WINDOW(dialog), TRUE);
+
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox,
@@ -889,7 +894,7 @@ gtk_file_selection_create_dir_confirmed (GtkWidget *widget, gpointer data)
{
buf = g_strconcat ("Error creating directory \"", dirname, "\": ",
g_strerror(errno), NULL);
- gtk_file_selection_fileop_error (buf);
+ gtk_file_selection_fileop_error (fs, buf);
}
g_free (full_path);
@@ -986,7 +991,7 @@ gtk_file_selection_delete_file_confirmed (GtkWidget *widget, gpointer data)
{
buf = g_strconcat ("Error deleting file \"", fs->fileop_file, "\": ",
g_strerror(errno), NULL);
- gtk_file_selection_fileop_error (buf);
+ gtk_file_selection_fileop_error (fs, buf);
}
g_free (full_path);
@@ -1096,7 +1101,7 @@ gtk_file_selection_rename_file_confirmed (GtkWidget *widget, gpointer data)
{
buf = g_strconcat ("Error renaming file \"", file, "\": ",
g_strerror(errno), NULL);
- gtk_file_selection_fileop_error (buf);
+ gtk_file_selection_fileop_error (fs, buf);
}
g_free (new_filename);
g_free (old_filename);
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index daf8aca2b..af76e3854 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -150,14 +150,16 @@ gtk_fixed_put (GtkFixed *fixed,
fixed->children = g_list_append (fixed->children, child_info);
- if (GTK_WIDGET_REALIZED (fixed) && !GTK_WIDGET_REALIZED (widget))
+ if (GTK_WIDGET_REALIZED (fixed))
gtk_widget_realize (widget);
- if (GTK_WIDGET_MAPPED (fixed) && !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
-
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (fixed))
- gtk_widget_queue_resize (GTK_WIDGET (fixed));
+ if (GTK_WIDGET_VISIBLE (fixed) && GTK_WIDGET_VISIBLE (widget))
+ {
+ if (GTK_WIDGET_MAPPED (fixed))
+ gtk_widget_map (widget);
+
+ gtk_widget_queue_resize (GTK_WIDGET (fixed));
+ }
}
void
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index 6305003ff..6e650a5bd 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -1453,18 +1453,20 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
can_match = TRUE;
if (nbitmapped_sizes)
- if (fontsel->metric == GTK_FONT_METRIC_POINTS)
- {
- if (*bitmapped_sizes % 10 != 0)
- can_match = FALSE;
- bitmap_size = *bitmapped_sizes / 10;
- bitmap_size_float = *bitmapped_sizes / 10;
- }
- else
- {
- bitmap_size = *bitmapped_sizes;
- bitmap_size_float = *bitmapped_sizes;
- }
+ {
+ if (fontsel->metric == GTK_FONT_METRIC_POINTS)
+ {
+ if (*bitmapped_sizes % 10 != 0)
+ can_match = FALSE;
+ bitmap_size = *bitmapped_sizes / 10;
+ bitmap_size_float = *bitmapped_sizes / 10;
+ }
+ else
+ {
+ bitmap_size = *bitmapped_sizes;
+ bitmap_size_float = *bitmapped_sizes;
+ }
+ }
if (can_match && nstandard_sizes && nbitmapped_sizes
&& *standard_sizes == bitmap_size)
diff --git a/gtk/gtkgamma.c b/gtk/gtkgamma.c
index d5e71bce0..3d8b3bd38 100644
--- a/gtk/gtkgamma.c
+++ b/gtk/gtkgamma.c
@@ -310,7 +310,7 @@ button_realize_callback (GtkWidget *w)
i = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex"));
pm = gdk_pixmap_create_from_xpm_d (w->window, &mask,
- &w->style->bg[GTK_STATE_NORMAL], xpm[i]);
+ &w->style->bg[GTK_STATE_NORMAL], (gchar **)xpm[i]);
pixmap = gtk_pixmap_new (pm, mask);
gtk_container_add (GTK_CONTAINER (w), pixmap);
diff --git a/gtk/gtkgamma.h b/gtk/gtkgamma.h
index 94204aeb6..eea6855ab 100644
--- a/gtk/gtkgamma.h
+++ b/gtk/gtkgamma.h
@@ -37,12 +37,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_GAMMA_CURVE(obj) \
- GTK_CHECK_CAST (obj, gtk_gamma_curve_get_type (), GtkGammaCurve)
-#define GTK_GAMMA_CURVE_CLASS(klass) \
- GTK_CHECK_CLASS_CAST (klass, gtk_gamma_curve_get_type (), GtkGammaCurveClass)
-#define GTK_IS_GAMMA_CURVE(obj) \
- GTK_CHECK_TYPE (obj, gtk_gamma_curve_get_type ())
+#define GTK_TYPE_GAMMA_CURVE (gtk_gamma_curve_get_type ())
+#define GTK_GAMMA_CURVE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_GAMMA_CURVE, GtkGammaCurve))
+#define GTK_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_GAMMA_CURVE, GtkGammaCurveClass))
+#define GTK_IS_GAMMA_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_GAMMA_CURVE))
+#define GTK_IS_GAMMA_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GAMMA_CURVE))
typedef struct _GtkGammaCurve GtkGammaCurve;
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index b9bbe125f..e35ca9962 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -33,7 +33,9 @@
enum {
ARG_0,
- ARG_SHADOW
+ ARG_SHADOW,
+ ARG_HANDLE_POSITION,
+ ARG_SNAP_EDGE
};
#define DRAG_HANDLE_SIZE 10
@@ -41,8 +43,7 @@ enum {
#define GHOST_HEIGHT 3
#define TOLERANCE 5
-enum
-{
+enum {
SIGNAL_CHILD_ATTACHED,
SIGNAL_CHILD_DETACHED,
SIGNAL_LAST
@@ -151,7 +152,7 @@ gtk_handle_box_get_type (void)
(GtkClassInitFunc) NULL,
};
- handle_box_type = gtk_type_unique (gtk_bin_get_type (), &handle_box_info);
+ handle_box_type = gtk_type_unique (GTK_TYPE_BIN, &handle_box_info);
}
return handle_box_type;
@@ -168,9 +169,11 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
widget_class = (GtkWidgetClass *) class;
container_class = (GtkContainerClass *) class;
- parent_class = gtk_type_class (gtk_bin_get_type ());
-
+ parent_class = gtk_type_class (GTK_TYPE_BIN);
+
gtk_object_add_arg_type ("GtkHandleBox::shadow", GTK_TYPE_SHADOW_TYPE, GTK_ARG_READWRITE, ARG_SHADOW);
+ gtk_object_add_arg_type ("GtkHandleBox::handle_position", GTK_TYPE_POSITION_TYPE, GTK_ARG_READWRITE, ARG_HANDLE_POSITION);
+ gtk_object_add_arg_type ("GtkHandleBox::snap_edge", GTK_TYPE_POSITION_TYPE, GTK_ARG_READWRITE, ARG_SNAP_EDGE);
object_class->set_arg = gtk_handle_box_set_arg;
object_class->get_arg = gtk_handle_box_get_arg;
@@ -233,38 +236,44 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
}
static void
-gtk_handle_box_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+gtk_handle_box_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
{
- GtkHandleBox *handle_box;
-
- handle_box = GTK_HANDLE_BOX (object);
+ GtkHandleBox *handle_box = GTK_HANDLE_BOX (object);
switch (arg_id)
{
case ARG_SHADOW:
gtk_handle_box_set_shadow_type (handle_box, GTK_VALUE_ENUM (*arg));
break;
- default:
+ case ARG_HANDLE_POSITION:
+ gtk_handle_box_set_handle_position (handle_box, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_SNAP_EDGE:
+ gtk_handle_box_set_snap_edge (handle_box, GTK_VALUE_ENUM (*arg));
break;
}
}
static void
-gtk_handle_box_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+gtk_handle_box_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
{
- GtkHandleBox *handle_box;
-
- handle_box = GTK_HANDLE_BOX (object);
-
+ GtkHandleBox *handle_box = GTK_HANDLE_BOX (object);
+
switch (arg_id)
{
case ARG_SHADOW:
GTK_VALUE_ENUM (*arg) = handle_box->shadow_type;
break;
+ case ARG_HANDLE_POSITION:
+ GTK_VALUE_ENUM (*arg) = handle_box->handle_position;
+ break;
+ case ARG_SNAP_EDGE:
+ GTK_VALUE_ENUM (*arg) = handle_box->snap_edge;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
diff --git a/gtk/gtkhandlebox.h b/gtk/gtkhandlebox.h
index a36ccd7a8..f49dcf580 100644
--- a/gtk/gtkhandlebox.h
+++ b/gtk/gtkhandlebox.h
@@ -43,9 +43,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_HANDLE_BOX(obj) GTK_CHECK_CAST (obj, gtk_handle_box_get_type (), GtkHandleBox)
-#define GTK_HANDLE_BOX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_handle_box_get_type (), GtkHandleBoxClass)
-#define GTK_IS_HANDLE_BOX(obj) GTK_CHECK_TYPE (obj, gtk_handle_box_get_type ())
+#define GTK_TYPE_HANDLE_BOX (gtk_handle_box_get_type ())
+#define GTK_HANDLE_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HANDLE_BOX, GtkHandleBox))
+#define GTK_HANDLE_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HANDLE_BOX, GtkHandleBoxClass))
+#define GTK_IS_HANDLE_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HANDLE_BOX))
+#define GTK_IS_HANDLE_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HANDLE_BOX))
typedef struct _GtkHandleBox GtkHandleBox;
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c
index 51513108d..7fa7b4e37 100644
--- a/gtk/gtkhpaned.c
+++ b/gtk/gtkhpaned.c
@@ -245,7 +245,7 @@ gtk_hpaned_draw (GtkWidget *widget,
GdkRectangle *area)
{
GtkPaned *paned;
- GdkRectangle child_area;
+ GdkRectangle handle_area, child_area;
guint16 border_width;
g_return_if_fail (widget != NULL);
@@ -253,11 +253,43 @@ gtk_hpaned_draw (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
{
+ gint width, height;
+
paned = GTK_PANED (widget);
border_width = GTK_CONTAINER (paned)->border_width;
gdk_window_clear_area (widget->window,
area->x, area->y, area->width, area->height);
+
+ /* Redraw the handle
+ */
+ gdk_window_get_size (paned->handle, &width, &height);
+
+ handle_area.x = paned->handle_xpos;
+ handle_area.y = paned->handle_ypos;
+ handle_area.width = width;
+ handle_area.height = height;
+
+ if (gdk_rectangle_intersect (&handle_area, area, &child_area))
+ {
+ child_area.x -= handle_area.x;
+ child_area.y -= handle_area.y;
+ gtk_paint_box (widget->style, paned->handle,
+ GTK_WIDGET_STATE(widget),
+ GTK_SHADOW_OUT,
+ &child_area, widget, "paned",
+ 0, 0,
+ width, height);
+ }
+
+ /* Redraw the groove
+ */
+ gtk_paint_vline(widget->style, widget->window, GTK_STATE_NORMAL,
+ area, widget, "hpaned",
+ 0, widget->allocation.height - 1,
+ border_width + paned->child1_size + paned->gutter_size / 2 - 1);
+ /* Redraw the children
+ */
if (paned->child1 &&
gtk_widget_intersect (paned->child1, area, &child_area))
gtk_widget_draw (paned->child1, &child_area);
@@ -265,10 +297,6 @@ gtk_hpaned_draw (GtkWidget *widget,
gtk_widget_intersect (paned->child2, area, &child_area))
gtk_widget_draw (paned->child2, &child_area);
- gtk_paint_vline(widget->style, widget->window, GTK_STATE_NORMAL,
- area, widget, "hpaned",
- 0, widget->allocation.height - 1,
- border_width + paned->child1_size + paned->gutter_size / 2 - 1);
}
}
@@ -283,18 +311,16 @@ gtk_hpaned_xor_line (GtkPaned *paned)
if (!paned->xor_gc)
{
- values.foreground = widget->style->white;
- values.function = GDK_XOR;
+ values.function = GDK_INVERT;
values.subwindow_mode = GDK_INCLUDE_INFERIORS;
paned->xor_gc = gdk_gc_new_with_values (widget->window,
&values,
- GDK_GC_FOREGROUND |
GDK_GC_FUNCTION |
GDK_GC_SUBWINDOW);
}
xpos = paned->child1_size
- + GTK_CONTAINER(paned)->border_width + paned->gutter_size / 2;
+ + GTK_CONTAINER (paned)->border_width + paned->gutter_size / 2;
gdk_draw_line (widget->window, paned->xor_gc,
xpos,
diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c
index bf836a870..e138ef1f1 100644
--- a/gtk/gtkhscale.c
+++ b/gtk/gtkhscale.c
@@ -209,8 +209,8 @@ gtk_hscale_realize (GtkWidget *widget)
gtk_hscale_pos_trough (GTK_HSCALE (widget), &x, &y, &w, &h);
- attributes.x = x + widget->allocation.x;
- attributes.y = y + widget->allocation.y;
+ attributes.x = x;
+ attributes.y = y;
attributes.width = w;
attributes.height = h;
attributes.wclass = GDK_INPUT_OUTPUT;
@@ -370,8 +370,7 @@ gtk_hscale_size_allocate (GtkWidget *widget,
gtk_hscale_pos_trough (GTK_HSCALE (widget), &x, &y, &width, &height);
gdk_window_move_resize (range->trough,
- x + widget->allocation.x,
- y + widget->allocation.y, width, height);
+ x, y, width, height);
gtk_range_slider_update (GTK_RANGE (widget));
}
}
@@ -429,6 +428,9 @@ gtk_hscale_pos_trough (GtkHScale *hscale,
}
*x += 1;
*w -= 2;
+
+ *x += widget->allocation.x;
+ *y += widget->allocation.y;
}
static void
diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c
index af09f5935..8f73b8b6c 100644
--- a/gtk/gtkitemfactory.c
+++ b/gtk/gtkitemfactory.c
@@ -235,6 +235,9 @@ gtk_item_factory_init (GtkItemFactory *ifactory)
ifactory->accel_group = NULL;
ifactory->widget = NULL;
ifactory->items = NULL;
+ ifactory->translate_func = NULL;
+ ifactory->translate_data = NULL;
+ ifactory->translate_notify = NULL;
}
GtkItemFactory*
@@ -672,7 +675,7 @@ gtk_item_factory_destroy (GtkObject *object)
GSList *link;
for (link = item->widgets; link; link = link->next)
- if (gtk_object_get_data_by_id (link->data, quark_item_factory))
+ if (gtk_object_get_data_by_id (link->data, quark_item_factory) == ifactory)
gtk_object_remove_data_by_id (link->data, quark_item_factory);
}
g_slist_free (ifactory->items);
@@ -695,7 +698,7 @@ gtk_item_factory_finalize (GtkObject *object)
g_free (ifactory->path);
g_assert (ifactory->widget == NULL);
- if (ifactory->translate_data && ifactory->translate_notify)
+ if (ifactory->translate_notify)
ifactory->translate_notify (ifactory->translate_data);
parent_class->finalize (object);
@@ -976,7 +979,10 @@ gtk_item_factory_parse_path (GtkItemFactory *ifactory,
translation = str;
p = strrchr (translation, '/');
- p++;
+ if (p)
+ p++;
+ else
+ p = translation;
*item = g_strdup (p);
@@ -989,6 +995,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
gpointer callback_data,
guint callback_type)
{
+ GtkOptionMenu *option_menu = NULL;
GtkWidget *parent;
GtkWidget *widget;
GSList *radio_group;
@@ -1085,6 +1092,14 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
}
g_free (parent_path);
+ if (GTK_IS_OPTION_MENU (parent))
+ {
+ option_menu = GTK_OPTION_MENU (parent);
+ if (!option_menu->menu)
+ gtk_option_menu_set_menu (option_menu, gtk_widget_new (GTK_TYPE_MENU, NULL));
+ parent = option_menu->menu;
+ }
+
g_return_if_fail (GTK_IS_CONTAINER (parent));
widget = gtk_widget_new (type,
@@ -1093,6 +1108,8 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
type_id != quark_type_title),
"GtkWidget::parent", parent,
NULL);
+ if (option_menu && !option_menu->menu_item)
+ gtk_option_menu_set_history (option_menu, 0);
if (type == GTK_TYPE_RADIO_MENU_ITEM)
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);
@@ -1427,45 +1444,42 @@ gtk_item_factory_popup_with_data (GtkItemFactory *ifactory,
guint mouse_button,
guint32 time)
{
+ MenuPos *mpos;
+
g_return_if_fail (ifactory != NULL);
g_return_if_fail (GTK_IS_ITEM_FACTORY (ifactory));
g_return_if_fail (GTK_IS_MENU (ifactory->widget));
-
- if (!GTK_WIDGET_VISIBLE (ifactory->widget))
+
+ mpos = gtk_object_get_data_by_id (GTK_OBJECT (ifactory->widget), quark_if_menu_pos);
+
+ if (!mpos)
{
- MenuPos *mpos;
-
- mpos = gtk_object_get_data_by_id (GTK_OBJECT (ifactory->widget), quark_if_menu_pos);
-
- if (!mpos)
- {
- mpos = g_new0 (MenuPos, 1);
- gtk_object_set_data_by_id_full (GTK_OBJECT (ifactory->widget),
- quark_if_menu_pos,
- mpos,
- g_free);
- }
-
- mpos->x = x;
- mpos->y = y;
-
- if (popup_data != NULL)
- {
- gtk_object_set_data_by_id_full (GTK_OBJECT (ifactory),
- quark_popup_data,
- popup_data,
- destroy);
- gtk_signal_connect (GTK_OBJECT (ifactory->widget),
- "selection-done",
- GTK_SIGNAL_FUNC (ifactory_delete_popup_data),
- ifactory);
- }
-
- gtk_menu_popup (GTK_MENU (ifactory->widget),
- NULL, NULL,
- gtk_item_factory_menu_pos, mpos,
- mouse_button, time);
+ mpos = g_new0 (MenuPos, 1);
+ gtk_object_set_data_by_id_full (GTK_OBJECT (ifactory->widget),
+ quark_if_menu_pos,
+ mpos,
+ g_free);
}
+
+ mpos->x = x;
+ mpos->y = y;
+
+ if (popup_data != NULL)
+ {
+ gtk_object_set_data_by_id_full (GTK_OBJECT (ifactory),
+ quark_popup_data,
+ popup_data,
+ destroy);
+ gtk_signal_connect (GTK_OBJECT (ifactory->widget),
+ "selection-done",
+ GTK_SIGNAL_FUNC (ifactory_delete_popup_data),
+ ifactory);
+ }
+
+ gtk_menu_popup (GTK_MENU (ifactory->widget),
+ NULL, NULL,
+ gtk_item_factory_menu_pos, mpos,
+ mouse_button, time);
}
static guint
@@ -1635,11 +1649,7 @@ gtk_item_factory_parse_rc (const gchar *file_name)
if (!S_ISREG (g_scanner_stat_mode (file_name)))
return;
-#ifndef __EMX__
fd = open (file_name, O_RDONLY);
-#else
- fd = open (file_name, O_RDONLY | O_TEXT);
-#endif
if (fd < 0)
return;
@@ -1666,7 +1676,7 @@ gtk_item_factory_set_translate_func (GtkItemFactory *ifactory,
{
g_return_if_fail (ifactory != NULL);
- if (ifactory->translate_data && ifactory->translate_notify)
+ if (ifactory->translate_notify)
ifactory->translate_notify (ifactory->translate_data);
ifactory->translate_func = func;
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index b3f1e7ed2..697f5e10b 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -33,7 +33,8 @@ enum {
ARG_0,
ARG_LABEL,
ARG_PATTERN,
- ARG_JUSTIFY
+ ARG_JUSTIFY,
+ ARG_WRAP
};
typedef struct _GtkLabelULine GtkLabelULine;
@@ -81,21 +82,17 @@ static void gtk_label_style_set (GtkWidget *widget,
static gint gtk_label_expose (GtkWidget *widget,
GdkEventExpose *event);
-static GtkLabelWord * gtk_label_word_alloc (void);
-static GtkLabelULine * gtk_label_uline_alloc (void);
-static void gtk_label_free_words (GtkLabel *label);
-static void gtk_label_free_ulines (GtkLabelWord *word);
-static gint gtk_label_split_text (GtkLabel * label);
-static void gtk_label_finalize_lines (GtkLabel * label, gint line_width);
-static void gtk_label_finalize_lines_wrap(GtkLabel * label, gint line_width);
+static GtkLabelWord* gtk_label_word_alloc (void);
+static GtkLabelULine* gtk_label_uline_alloc (void);
+static void gtk_label_free_words (GtkLabel *label);
+static void gtk_label_free_ulines (GtkLabelWord *word);
+static gint gtk_label_split_text (GtkLabel *label);
static GtkMiscClass *parent_class = NULL;
-static GMemChunk *word_chunk = 0;
-static GtkLabelWord *free_words = 0;
-static GMemChunk *uline_chunk = 0;
-static GtkLabelULine *free_ulines = 0;
+static GMemChunk *word_chunk = NULL;
+static GMemChunk *uline_chunk = NULL;
GtkType
gtk_label_get_type (void)
@@ -116,7 +113,7 @@ gtk_label_get_type (void)
(GtkClassInitFunc) NULL,
};
- label_type = gtk_type_unique (gtk_misc_get_type (), &label_info);
+ label_type = gtk_type_unique (GTK_TYPE_MISC, &label_info);
gtk_type_set_chunk_alloc (label_type, 32);
}
@@ -132,11 +129,12 @@ gtk_label_class_init (GtkLabelClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
- parent_class = gtk_type_class (gtk_misc_get_type ());
+ parent_class = gtk_type_class (GTK_TYPE_MISC);
gtk_object_add_arg_type ("GtkLabel::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkLabel::pattern", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_PATTERN);
gtk_object_add_arg_type ("GtkLabel::justify", GTK_TYPE_JUSTIFICATION, GTK_ARG_READWRITE, ARG_JUSTIFY);
+ gtk_object_add_arg_type ("GtkLabel::wrap", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WRAP);
object_class->set_arg = gtk_label_set_arg;
object_class->get_arg = gtk_label_get_arg;
@@ -159,7 +157,7 @@ gtk_label_set_arg (GtkObject *object,
switch (arg_id)
{
case ARG_LABEL:
- gtk_label_set_text (label, GTK_VALUE_STRING (*arg) ? GTK_VALUE_STRING (*arg) : "");
+ gtk_label_set_text (label, GTK_VALUE_STRING (*arg));
break;
case ARG_PATTERN:
gtk_label_set_pattern (label, GTK_VALUE_STRING (*arg));
@@ -167,6 +165,9 @@ gtk_label_set_arg (GtkObject *object,
case ARG_JUSTIFY:
gtk_label_set_justify (label, GTK_VALUE_ENUM (*arg));
break;
+ case ARG_WRAP:
+ gtk_label_set_line_wrap (label, GTK_VALUE_BOOL (*arg));
+ break;
default:
break;
}
@@ -192,6 +193,9 @@ gtk_label_get_arg (GtkObject *object,
case ARG_JUSTIFY:
GTK_VALUE_ENUM (*arg) = label->jtype;
break;
+ case ARG_WRAP:
+ GTK_VALUE_BOOL (*arg) = label->wrap;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
@@ -217,54 +221,45 @@ gtk_label_init (GtkLabel *label)
}
GtkWidget*
-gtk_label_new (const char *str)
+gtk_label_new (const gchar *str)
{
GtkLabel *label;
- g_return_val_if_fail (str != NULL, NULL);
-
- label = gtk_type_new (gtk_label_get_type ());
-
- gtk_label_set_text (label, str);
+ label = gtk_type_new (GTK_TYPE_LABEL);
+
+ if (str && *str)
+ gtk_label_set_text (label, str);
return GTK_WIDGET (label);
}
-static void
+static inline void
gtk_label_set_text_internal (GtkLabel *label,
- char *str,
+ gchar *str,
GdkWChar *str_wc)
{
- if (label->label)
- g_free (label->label);
- if (label->label_wc)
- g_free (label->label_wc);
+ gtk_label_free_words (label);
+
+ g_free (label->label);
+ g_free (label->label_wc);
label->label = str;
label->label_wc = str_wc;
- gtk_label_free_words (label);
-
- if (GTK_WIDGET_VISIBLE (label))
- {
- if (GTK_WIDGET_MAPPED (label))
- gtk_widget_queue_clear (GTK_WIDGET (label));
-
- gtk_widget_queue_resize (GTK_WIDGET (label));
- }
+ gtk_widget_queue_resize (GTK_WIDGET (label));
}
void
-gtk_label_set_text (GtkLabel *label,
- const char *str)
+gtk_label_set_text (GtkLabel *label,
+ const gchar *str)
{
GdkWChar *str_wc;
gint len;
gint wc_len;
- g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
- g_return_if_fail (str != NULL);
+ if (!str)
+ str = "";
if (!label->label || strcmp (label->label, str))
{
@@ -286,68 +281,54 @@ void
gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern)
{
- g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
- if (label->pattern)
- g_free (label->pattern);
- label->pattern = g_strdup (pattern);
+ gtk_label_free_words (label);
- if (GTK_WIDGET_VISIBLE (label))
- {
- if (GTK_WIDGET_MAPPED (label))
- gtk_widget_queue_clear (GTK_WIDGET (label));
-
- gtk_widget_queue_resize (GTK_WIDGET (label));
- }
+ g_free (label->pattern);
+ label->pattern = g_strdup (pattern);
+
+ gtk_widget_queue_resize (GTK_WIDGET (label));
}
void
-gtk_label_set_justify (GtkLabel *label, GtkJustification jtype)
+gtk_label_set_justify (GtkLabel *label,
+ GtkJustification jtype)
{
- g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
+ g_return_if_fail (jtype >= GTK_JUSTIFY_LEFT && jtype <= GTK_JUSTIFY_FILL);
if ((GtkJustification) label->jtype != jtype)
{
- if ((label->jtype == GTK_JUSTIFY_FILL) ||
- (jtype == GTK_JUSTIFY_FILL))
- /* FIXME: think about this a little */
- gtk_label_free_words (label);
+ gtk_label_free_words (label);
label->jtype = jtype;
-
- if (GTK_WIDGET_VISIBLE (label))
- {
- if (GTK_WIDGET_MAPPED (label))
- gtk_widget_queue_clear (GTK_WIDGET (label));
-
- gtk_widget_queue_resize (GTK_WIDGET (label));
- }
+
+ gtk_widget_queue_resize (GTK_WIDGET (label));
}
}
void
-gtk_label_set_line_wrap (GtkLabel *label, gboolean wrap)
+gtk_label_set_line_wrap (GtkLabel *label,
+ gboolean wrap)
{
- g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
- if (label->wrap != wrap) {
- if (GTK_WIDGET_VISIBLE (label))
- {
- if (GTK_WIDGET_MAPPED (label))
- gtk_widget_queue_clear (GTK_WIDGET (label));
-
- gtk_widget_queue_resize (GTK_WIDGET (label));
- }
- label->wrap = wrap;
- }
+ wrap = wrap != FALSE;
+
+ if (label->wrap != wrap)
+ {
+ gtk_label_free_words (label);
+
+ label->wrap = wrap;
+
+ gtk_widget_queue_resize (GTK_WIDGET (label));
+ }
}
void
-gtk_label_get (GtkLabel *label,
- char **str)
+gtk_label_get (GtkLabel *label,
+ gchar **str)
{
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
@@ -368,94 +349,69 @@ gtk_label_finalize (GtkObject *object)
g_free (label->label);
g_free (label->label_wc);
-
- if (label->pattern)
- g_free (label->pattern);
+ g_free (label->pattern);
+
gtk_label_free_words (label);
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
+
+ GTK_OBJECT_CLASS (parent_class)->finalize (object);
}
-static GtkLabelWord*
-gtk_label_word_alloc ()
+static GtkLabelULine*
+gtk_label_uline_alloc (void)
{
- GtkLabelWord * word;
+ GtkLabelULine *uline;
- if (!word_chunk)
- {
- word_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
- sizeof (GtkLabelWord),
- 32 * sizeof (GtkLabelWord),
- G_ALLOC_ONLY);
- }
+ if (!uline_chunk)
+ uline_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
+
+ uline = g_chunk_new0 (GtkLabelULine, uline_chunk);
- if (free_words)
- {
- word = free_words;
- free_words = word->next;
- }
- else
- {
- word = g_mem_chunk_alloc (word_chunk);
- }
+ uline->next = NULL;
- word->next = 0;
- word->uline = 0;
- return word;
+ return uline;
}
static void
-gtk_label_free_words (GtkLabel *label)
+gtk_label_free_ulines (GtkLabelWord *word)
{
- GtkLabelWord * last;
-
- if (label->words)
+ while (word->uline)
{
- for (last = label->words; last->next != 0; last = last->next)
- gtk_label_free_ulines (label->words);
- last->next = free_words;
- free_words = label->words;
- label->words = NULL;
+ GtkLabelULine *uline = word->uline;
+
+ word->uline = uline->next;
+ g_chunk_free (uline, uline_chunk);
}
}
-static GtkLabelULine*
-gtk_label_uline_alloc (void)
+
+static GtkLabelWord*
+gtk_label_word_alloc (void)
{
- GtkLabelULine * uline;
-
- if (!uline_chunk)
- {
- uline_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
- sizeof (GtkLabelULine),
- 32 * sizeof (GtkLabelULine),
- G_ALLOC_ONLY);
- }
+ GtkLabelWord * word;
- if (free_ulines)
- {
- uline = free_ulines;
- free_ulines = uline->next;
- }
- else
- {
- uline = g_mem_chunk_alloc (uline_chunk);
- }
+ if (!word_chunk)
+ word_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
- uline->next = NULL;
+ word = g_chunk_new0 (GtkLabelWord, word_chunk);
- return uline;
+ word->beginning = NULL;
+ word->next = NULL;
+ word->uline = NULL;
+
+ return word;
}
static void
-gtk_label_free_ulines (GtkLabelWord *word)
+gtk_label_free_words (GtkLabel *label)
{
- GtkLabelULine *last;
- if (word->uline)
+ while (label->words)
{
- for (last = word->uline; last->next != 0; last = last->next)
- ;
- last->next = free_ulines;
- free_ulines = word->uline;
- word->uline = 0;
+ GtkLabelWord *word = label->words;
+
+ label->words = word->next;
+
+ gtk_label_free_ulines (word);
+
+ g_chunk_free (word, word_chunk);
}
}
@@ -466,8 +422,6 @@ gtk_label_split_text (GtkLabel *label)
gint space_width, line_width, max_line_width;
GdkWChar *str, *p;
- g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
-
gtk_label_free_words (label);
if (label->label == NULL)
return 0;
@@ -530,7 +484,7 @@ gtk_label_split_text (GtkLabel *label)
/* Add an empty word to represent an empty line
*/
- if ((str == label->label_wc) || (str[-1] == '\n'))
+ if (str == label->label_wc || str[-1] == '\n')
{
word = gtk_label_word_alloc ();
@@ -546,16 +500,14 @@ gtk_label_split_text (GtkLabel *label)
return MAX (line_width, max_line_width);
}
+/* this needs to handle white space better. */
static gint
gtk_label_split_text_wrapped (GtkLabel *label)
{
- /* this needs to handle white space better. */
GtkLabelWord *word, **tailp;
gint space_width, line_width, max_line_width;
GdkWChar *str, *p;
- g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
-
gtk_label_free_words (label);
if (label->label == NULL)
return 0;
@@ -668,8 +620,9 @@ gtk_label_pick_width (GtkLabel *label,
* use gtk_label_finalize_wrap instead.
*/
static void
-gtk_label_finalize_lines (GtkLabel *label,
- gint line_width)
+gtk_label_finalize_lines (GtkLabel *label,
+ GtkRequisition *requisition,
+ gint max_line_width)
{
GtkLabelWord *line;
gint y, baseline_skip, y_max;
@@ -680,14 +633,15 @@ gtk_label_finalize_lines (GtkLabel *label,
ptrn = label->pattern;
y = 0;
- baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 2;
+ baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
+ GTK_WIDGET (label)->style->font->descent + 2);
for (line = label->words; line; line = line->next)
{
if (label->jtype == GTK_JUSTIFY_CENTER)
- line->x = (line_width - line->width) / 2;
+ line->x = (max_line_width - line->width) / 2;
else if (label->jtype == GTK_JUSTIFY_RIGHT)
- line->x = line_width - line->width;
+ line->x = max_line_width - line->width;
else
line->x = 0;
@@ -748,15 +702,16 @@ gtk_label_finalize_lines (GtkLabel *label,
y += (baseline_skip + y_max);
}
- label->max_width = line_width;
- GTK_WIDGET (label)->requisition.width = line_width + 2 * label->misc.xpad;
- GTK_WIDGET (label)->requisition.height = y + 2 * label->misc.ypad;
+ label->max_width = max_line_width;
+ requisition->width = max_line_width + 2 * label->misc.xpad;
+ requisition->height = y + 2 * label->misc.ypad;
}
/* this finalizes word-wrapped words */
static void
-gtk_label_finalize_lines_wrap (GtkLabel *label,
- gint line_width)
+gtk_label_finalize_lines_wrap (GtkLabel *label,
+ GtkRequisition *requisition,
+ gint max_line_width)
{
GtkLabelWord *word, *line, *next_line;
GtkWidget *widget;
@@ -767,12 +722,13 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
ptrn = label->pattern;
y = 0;
- baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 1;
+ baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
+ GTK_WIDGET (label)->style->font->descent + 1);
for (line = label->words; line != 0; line = next_line)
{
space = 0;
- extra_width = line_width - line->width;
+ extra_width = max_line_width - line->width;
for (next_line = line->next; next_line; next_line = next_line->next)
{
@@ -809,10 +765,10 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
y += (baseline_skip);
}
- label->max_width = line_width;
+ label->max_width = max_line_width;
widget = GTK_WIDGET (label);
- widget->requisition.width = line_width + 2 * label->misc.xpad;
- widget->requisition.height = y + 2 * label->misc.ypad + 1;
+ requisition->width = max_line_width + 2 * label->misc.xpad;
+ requisition->height = y + 2 * label->misc.ypad + 1;
}
static void
@@ -821,12 +777,11 @@ gtk_label_size_request (GtkWidget *widget,
{
GtkLabel *label;
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_LABEL (widget));
g_return_if_fail (requisition != NULL);
label = GTK_LABEL (widget);
-
+
/*
* There are a number of conditions which will necessitate re-filling
* our text:
@@ -858,7 +813,7 @@ gtk_label_size_request (GtkWidget *widget,
aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
if (aux_info && aux_info->width > 0)
{
- label->max_width = MAX(aux_info->width - 2 * label->misc.xpad, 1);
+ label->max_width = MAX (aux_info->width - 2 * label->misc.xpad, 1);
gtk_label_split_text_wrapped (label);
}
else
@@ -878,33 +833,29 @@ gtk_label_size_request (GtkWidget *widget,
label->max_width);
}
}
- gtk_label_finalize_lines_wrap (label, label->max_width);
+ gtk_label_finalize_lines_wrap (label, requisition, label->max_width);
}
- else if (label->words == NULL)
+ else if (!label->words)
{
label->max_width = gtk_label_split_text (label);
- gtk_label_finalize_lines (label, label->max_width);
+ gtk_label_finalize_lines (label, requisition, label->max_width);
}
-
- if (requisition != &widget->requisition)
- *requisition = widget->requisition;
}
static void
-gtk_label_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
+gtk_label_style_set (GtkWidget *widget,
+ GtkStyle *previous_style)
{
GtkLabel *label;
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_LABEL (widget));
-
+
label = GTK_LABEL (widget);
+ /* Clear the list of words so that they are recomputed on
+ * size_request
+ */
if (previous_style && label->words)
- /* Clear the list of words so that they are recomputed on
- * size_request
- */
gtk_label_free_words (label);
}
@@ -946,7 +897,6 @@ gtk_label_expose (GtkWidget *widget,
GtkLabelWord *word;
gint x, y;
- g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_LABEL (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -999,7 +949,8 @@ gtk_label_parse_uline (GtkLabel *label,
gint length, wc_length;
gboolean underscore;
- g_return_val_if_fail(string != NULL, GDK_VoidSymbol);
+ g_return_val_if_fail (GTK_IS_LABEL (label), GDK_VoidSymbol);
+ g_return_val_if_fail (string != NULL, GDK_VoidSymbol);
/* Convert text to wide characters */
length = strlen (string);
@@ -1058,4 +1009,3 @@ gtk_label_parse_uline (GtkLabel *label,
return accel_key;
}
-
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index 8d8c24786..72fca31af 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -54,6 +54,7 @@ struct _GtkLayoutChild {
static void gtk_layout_class_init (GtkLayoutClass *class);
static void gtk_layout_init (GtkLayout *layout);
+static void gtk_layout_finalize (GtkObject *object);
static void gtk_layout_realize (GtkWidget *widget);
static void gtk_layout_unrealize (GtkWidget *widget);
static void gtk_layout_map (GtkWidget *widget);
@@ -97,9 +98,6 @@ static void gtk_layout_expose_area (GtkLayout *layout,
gint height);
static void gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GtkLayout *layout);
-static GdkFilterReturn gtk_layout_filter (GdkXEvent *gdk_xevent,
- GdkEvent *event,
- gpointer data);
static GdkFilterReturn gtk_layout_main_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data);
@@ -199,6 +197,17 @@ gtk_layout_set_adjustments (GtkLayout *layout,
gtk_layout_adjustment_changed (NULL, layout);
}
+static void
+gtk_layout_finalize (GtkObject *object)
+{
+ GtkLayout *layout = GTK_LAYOUT (object);
+
+ gtk_object_unref (GTK_OBJECT (layout->hadjustment));
+ gtk_object_unref (GTK_OBJECT (layout->vadjustment));
+
+ GTK_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
void
gtk_layout_set_hadjustment (GtkLayout *layout,
GtkAdjustment *adjustment)
@@ -249,19 +258,16 @@ gtk_layout_put (GtkLayout *layout,
if (!IS_ONSCREEN (x, y))
GTK_PRIVATE_SET_FLAG (child_widget, GTK_IS_OFFSCREEN);
- if (GTK_WIDGET_VISIBLE (layout))
+ if (GTK_WIDGET_REALIZED (layout))
+ gtk_widget_realize (child_widget);
+
+ if (GTK_WIDGET_VISIBLE (layout) && GTK_WIDGET_VISIBLE (child_widget))
{
- if (GTK_WIDGET_REALIZED (layout) &&
- !GTK_WIDGET_REALIZED (child_widget))
- gtk_widget_realize (child_widget);
-
- if (GTK_WIDGET_MAPPED (layout) &&
- !GTK_WIDGET_MAPPED (child_widget))
+ if (GTK_WIDGET_MAPPED (layout))
gtk_widget_map (child_widget);
- }
- if (GTK_WIDGET_VISIBLE (child_widget) && GTK_WIDGET_VISIBLE (layout))
- gtk_widget_queue_resize (child_widget);
+ gtk_widget_queue_resize (child_widget);
+ }
}
void
@@ -375,6 +381,8 @@ gtk_layout_class_init (GtkLayoutClass *class)
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+ object_class->finalize = gtk_layout_finalize;
+
widget_class->realize = gtk_layout_realize;
widget_class->unrealize = gtk_layout_unrealize;
widget_class->map = gtk_layout_map;
@@ -383,6 +391,11 @@ gtk_layout_class_init (GtkLayoutClass *class)
widget_class->draw = gtk_layout_draw;
widget_class->expose_event = gtk_layout_expose;
+ container_class->remove = gtk_layout_remove;
+ container_class->forall = gtk_layout_forall;
+
+ class->set_scroll_adjustments = gtk_layout_set_adjustments;
+
widget_class->set_scroll_adjustments_signal =
gtk_signal_new ("set_scroll_adjustments",
GTK_RUN_LAST,
@@ -390,11 +403,6 @@ gtk_layout_class_init (GtkLayoutClass *class)
GTK_SIGNAL_OFFSET (GtkLayoutClass, set_scroll_adjustments),
gtk_marshal_NONE__POINTER_POINTER,
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
-
- container_class->remove = gtk_layout_remove;
- container_class->forall = gtk_layout_forall;
-
- class->set_scroll_adjustments = gtk_layout_set_adjustments;
}
static void
@@ -465,7 +473,7 @@ gtk_layout_realize (GtkWidget *widget)
gtk_style_set_background (widget->style, layout->bin_window, GTK_STATE_NORMAL);
gdk_window_add_filter (widget->window, gtk_layout_main_filter, layout);
- gdk_window_add_filter (layout->bin_window, gtk_layout_filter, layout);
+ /* gdk_window_add_filter (layout->bin_window, gtk_layout_filter, layout);*/
/* XXX: If we ever get multiple displays for GTK+, then gravity_works
* will have to become a widget member. Right now we just
@@ -695,14 +703,14 @@ gtk_layout_remove (GtkContainer *container,
if (tmp_list)
{
+ GTK_PRIVATE_UNSET_FLAG (widget, GTK_IS_OFFSCREEN);
+
gtk_widget_unparent (widget);
layout->children = g_list_remove_link (layout->children, tmp_list);
g_list_free_1 (tmp_list);
g_free (child);
}
-
- GTK_PRIVATE_UNSET_FLAG (widget, GTK_IS_OFFSCREEN);
}
static void
@@ -1065,15 +1073,39 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GdkEvent event;
GtkWidget *event_widget;
- if ((xevent.xany.window == GDK_WINDOW_XWINDOW (layout->bin_window)) &&
- (gtk_layout_filter (&xevent, &event, layout) == GDK_FILTER_REMOVE))
- continue;
-
- if (xevent.type == Expose)
+ switch (xevent.type)
{
- event.expose.window = gdk_window_lookup (xevent.xany.window);
- gdk_window_get_user_data (event.expose.window,
- (gpointer *)&event_widget);
+ case Expose:
+
+ if (xevent.xany.window == GDK_WINDOW_XWINDOW (layout->bin_window))
+ {
+ /* If the window is unobscured, then we've exposed the
+ * regions with the following serials already, so we
+ * can throw out the expose events.
+ */
+ if (layout->visibility == GDK_VISIBILITY_UNOBSCURED &&
+ (((dx > 0 || dy > 0) &&
+ xevent.xexpose.serial == layout->configure_serial) ||
+ ((dx < 0 || dy < 0) &&
+ xevent.xexpose.serial == layout->configure_serial + 1)))
+ continue;
+ /* The following expose was generated while the origin was
+ * different from the current origin, so we need to offset it.
+ */
+ else if (xevent.xexpose.serial == layout->configure_serial)
+ {
+ xevent.xexpose.x += layout->scroll_x;
+ xevent.xexpose.y += layout->scroll_y;
+ }
+ event.expose.window = layout->bin_window;
+ event_widget = widget;
+ }
+ else
+ {
+ event.expose.window = gdk_window_lookup (xevent.xany.window);
+ gdk_window_get_user_data (event.expose.window,
+ (gpointer *)&event_widget);
+ }
if (event_widget)
{
@@ -1088,6 +1120,17 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
gtk_widget_event (event_widget, &event);
gdk_window_unref (event.expose.window);
}
+ break;
+
+ case ConfigureNotify:
+ if (xevent.xany.window == GDK_WINDOW_XWINDOW (layout->bin_window) &&
+ (xevent.xconfigure.x != 0 || xevent.xconfigure.y != 0))
+ {
+ layout->configure_serial = xevent.xconfigure.serial;
+ layout->scroll_x = xevent.xconfigure.x;
+ layout->scroll_y = xevent.xconfigure.y;
+ }
+ break;
}
}
#elif defined (GDK_WINDOWING_WIN32)
@@ -1095,9 +1138,10 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
#endif
}
+#if 0
/* The main event filter. Actually, we probably don't really need
- * to install this as a filter at all, since we are calling it
- * directly above in the expose-handling hack. But in case scrollbars
+ * this filter at all, since we are calling it directly above in the
+ * expose-handling hack. But in case scrollbars
* are fixed up in some manner...
*
* This routine identifies expose events that are generated when
@@ -1150,6 +1194,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent,
return GDK_FILTER_CONTINUE;
}
+#endif 0
/* Although GDK does have a GDK_VISIBILITY_NOTIFY event,
* there is no corresponding event in GTK, so we have
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index 49739c8e4..f4239604a 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -37,12 +37,22 @@ enum {
LAST_SIGNAL
};
+enum {
+ ARG_0,
+ ARG_SELECTION_MODE
+};
+
#define SCROLL_TIME 100
/** GtkList Methods **/
static void gtk_list_class_init (GtkListClass *klass);
static void gtk_list_init (GtkList *list);
-
+static void gtk_list_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_list_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
/** GtkObject Methods **/
static void gtk_list_shutdown (GtkObject *object);
@@ -230,6 +240,8 @@ gtk_list_class_init (GtkListClass *class)
gtk_object_class_add_signals (object_class, list_signals, LAST_SIGNAL);
object_class->shutdown = gtk_list_shutdown;
+ object_class->set_arg = gtk_list_set_arg;
+ object_class->get_arg = gtk_list_get_arg;
widget_class->map = gtk_list_map;
widget_class->unmap = gtk_list_unmap;
@@ -254,6 +266,10 @@ gtk_list_class_init (GtkListClass *class)
class->selection_changed = NULL;
class->select_child = gtk_real_list_select_child;
class->unselect_child = gtk_real_list_unselect_child;
+
+ gtk_object_add_arg_type ("GtkList::selection_mode",
+ GTK_TYPE_SELECTION_MODE, GTK_ARG_READWRITE,
+ ARG_SELECTION_MODE);
}
static void
@@ -280,6 +296,39 @@ gtk_list_init (GtkList *list)
list->add_mode = FALSE;
}
+static void
+gtk_list_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkList *list = GTK_LIST (object);
+
+ switch (arg_id)
+ {
+ case ARG_SELECTION_MODE:
+ gtk_list_set_selection_mode (list, GTK_VALUE_ENUM (*arg));
+ break;
+ }
+}
+
+static void
+gtk_list_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkList *list = GTK_LIST (object);
+
+ switch (arg_id)
+ {
+ case ARG_SELECTION_MODE:
+ GTK_VALUE_ENUM (*arg) = list->selection_mode;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
GtkWidget*
gtk_list_new (void)
{
@@ -1104,15 +1153,16 @@ gtk_list_insert_items (GtkList *list,
gtk_signal_connect (GTK_OBJECT (widget), "toggle",
GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle),
list);
- if (GTK_WIDGET_VISIBLE (widget->parent))
- {
- if (GTK_WIDGET_REALIZED (widget->parent) &&
- !GTK_WIDGET_REALIZED (widget))
- gtk_widget_realize (widget);
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
+ if (GTK_WIDGET_REALIZED (widget->parent))
+ gtk_widget_realize (widget);
+
+ if (GTK_WIDGET_VISIBLE (widget->parent) && GTK_WIDGET_VISIBLE (widget))
+ {
+ if (GTK_WIDGET_MAPPED (widget->parent))
gtk_widget_map (widget);
+
+ gtk_widget_queue_resize (widget);
}
}
@@ -1155,9 +1205,6 @@ gtk_list_insert_items (GtkList *list,
widget = list->children->data;
gtk_list_select_child (list, widget);
}
-
- if (GTK_WIDGET_VISIBLE (list))
- gtk_widget_queue_resize (GTK_WIDGET (list));
}
void
@@ -2409,19 +2456,14 @@ gtk_list_move_focus_child (GtkList *list,
static gint
gtk_list_horizontal_timeout (GtkWidget *list)
{
- gint x, y;
- GdkEventMotion event;
- GdkModifierType mask;
+ GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
GTK_LIST (list)->htimer = 0;
- gdk_window_get_pointer (list->window, &x, &y, &mask);
- event.is_hint = 0;
- event.x = x;
- event.y = y;
- event.state = mask;
+ event.type = GDK_MOTION_NOTIFY;
+ event.send_event = TRUE;
gtk_list_motion_notify (list, &event);
@@ -2433,20 +2475,14 @@ gtk_list_horizontal_timeout (GtkWidget *list)
static gint
gtk_list_vertical_timeout (GtkWidget *list)
{
- gint x;
- gint y;
- GdkEventMotion event;
- GdkModifierType mask;
+ GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
GTK_LIST (list)->vtimer = 0;
- gdk_window_get_pointer (list->window, &x, &y, &mask);
- event.is_hint = 0;
- event.x = x;
- event.y = y;
- event.state = mask;
+ event.type = GDK_MOTION_NOTIFY;
+ event.send_event = TRUE;
gtk_list_motion_notify (list, &event);
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index d1b8da1df..08ffc830f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -265,7 +265,7 @@ gtk_init_check (int *argc,
if (*module_name == '=')
module_name++;
- else
+ else if (i + 1 < *argc)
{
(*argv)[i] = NULL;
i += 1;
@@ -273,7 +273,8 @@ gtk_init_check (int *argc,
}
(*argv)[i] = NULL;
- gtk_modules = g_slist_prepend (gtk_modules, g_strdup (module_name));
+ if (module_name && *module_name)
+ gtk_modules = g_slist_prepend (gtk_modules, g_strdup (module_name));
}
else if (strcmp ("--g-fatal-warnings", (*argv)[i]) == 0)
{
@@ -530,7 +531,9 @@ gtk_main (void)
{
quitf = quit_functions->data;
+ tmp_list = quit_functions;
quit_functions = g_list_remove_link (quit_functions, quit_functions);
+ g_list_free_1 (tmp_list);
if ((quitf->main_level && quitf->main_level != gtk_main_loop_level) ||
gtk_quit_invoke_function (quitf))
@@ -539,7 +542,6 @@ gtk_main (void)
}
else
{
- g_list_free (tmp_list);
gtk_quit_destroy (quitf);
}
}
@@ -581,13 +583,21 @@ gtk_main_quit (void)
gint
gtk_events_pending (void)
{
- return g_main_pending();
+ gboolean result;
+
+ GDK_THREADS_LEAVE ();
+ result = g_main_pending();
+ GDK_THREADS_ENTER ();
+
+ return result;
}
gint
gtk_main_iteration (void)
{
+ GDK_THREADS_LEAVE ();
g_main_iteration (TRUE);
+ GDK_THREADS_ENTER ();
if (main_loops)
return !g_main_is_running (main_loops->data);
@@ -598,7 +608,9 @@ gtk_main_iteration (void)
gint
gtk_main_iteration_do (gboolean blocking)
{
+ GDK_THREADS_LEAVE ();
g_main_iteration (blocking);
+ GDK_THREADS_ENTER ();
if (main_loops)
return !g_main_is_running (main_loops->data);
@@ -717,11 +729,17 @@ gtk_main_do_event (GdkEvent *event)
break;
case GDK_DESTROY:
- gtk_widget_ref (event_widget);
- gtk_widget_event (event_widget, event);
- if (!GTK_OBJECT_DESTROYED (event_widget))
- gtk_widget_destroy (event_widget);
- gtk_widget_unref (event_widget);
+ /* Unexpected GDK_DESTROY from the outside, ignore for
+ * child windows, handle like a GDK_DELETE for toplevels
+ */
+ if (!event_widget->parent)
+ {
+ gtk_widget_ref (event_widget);
+ if (!gtk_widget_event (event_widget, event) &&
+ !GTK_OBJECT_DESTROYED (event_widget))
+ gtk_widget_destroy (event_widget);
+ gtk_widget_unref (event_widget);
+ }
break;
case GDK_PROPERTY_NOTIFY:
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 16d48eda1..15ac8813e 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1180,22 +1180,17 @@ gtk_menu_position (GtkMenu *menu)
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
- x -= 2;
- y -= 2;
-
- if ((x + requisition.width) > screen_width)
- x -= ((x + requisition.width) - screen_width);
- if (x < 0)
- x = 0;
- if ((y + requisition.height) > screen_height)
- y -= ((y + requisition.height) - screen_height);
- if (y < 0)
- y = 0;
+ x = CLAMP (x - 2, 0, MAX (0, screen_width - requisition.width));
+ y = CLAMP (y - 2, 0, MAX (0, screen_height - requisition.height));
}
-
+
+ /* FIXME: The MAX() here is because gtk_widget_set_uposition
+ * is broken. Once we provide an alternate interface that
+ * allows negative values, then we can remove them.
+ */
gtk_widget_set_uposition (GTK_MENU_SHELL (menu)->active ?
menu->toplevel : menu->tearoff_window,
- x, y);
+ MAX (x, 0), MAX (y, 0));
}
/* Reparent the menu, taking care of the refcounting
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 41ebc385a..263159c5a 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -63,6 +63,7 @@ static void gtk_real_menu_item_select (GtkItem *item);
static void gtk_real_menu_item_deselect (GtkItem *item);
static void gtk_real_menu_item_activate_item (GtkMenuItem *item);
static gint gtk_menu_item_select_timeout (gpointer data);
+static void gtk_menu_item_select_timeout_unlocked (gpointer data);
static void gtk_menu_item_position_menu (GtkMenu *menu,
gint *x,
gint *y,
@@ -552,7 +553,7 @@ gtk_real_menu_item_select (GtkItem *item)
gtk_menu_item_select_timeout,
menu_item);
else
- gtk_menu_item_select_timeout (menu_item);
+ gtk_menu_item_select_timeout_unlocked (menu_item);
if(event) gdk_event_free(event);
}
@@ -628,10 +629,20 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
static gint
gtk_menu_item_select_timeout (gpointer data)
{
- GtkMenuItem *menu_item;
-
GDK_THREADS_ENTER ();
+ gtk_menu_item_select_timeout_unlocked (data);
+
+ GDK_THREADS_LEAVE ();
+
+ return FALSE;
+}
+
+static void
+gtk_menu_item_select_timeout_unlocked (gpointer data)
+{
+ GtkMenuItem *menu_item;
+
menu_item = GTK_MENU_ITEM (data);
menu_item->timer = 0;
@@ -655,10 +666,6 @@ gtk_menu_item_select_timeout (gpointer data)
gtk_menu_shell_select_item (submenu, submenu->children->data);
}
}
-
- GDK_THREADS_LEAVE ();
-
- return FALSE;
}
static void
@@ -702,12 +709,6 @@ gtk_menu_item_position_menu (GtkMenu *menu,
else
ty += GTK_WIDGET (menu_item)->allocation.height;
- if ((tx + twidth) > screen_width)
- {
- tx -= ((tx + twidth) - screen_width);
- if (tx < 0)
- tx = 0;
- }
break;
case GTK_LEFT_RIGHT:
@@ -739,19 +740,16 @@ gtk_menu_item_position_menu (GtkMenu *menu,
break;
}
- if ((ty + GTK_WIDGET (menu_item)->allocation.height / 4 + theight) <= screen_height)
- ty += GTK_WIDGET (menu_item)->allocation.height / 4;
- else
- {
- ty -= ((ty + theight) - screen_height);
- if (ty < 0)
- ty = 0;
- }
+ ty += GTK_WIDGET (menu_item)->allocation.height / 4;
+
break;
}
- *x = tx;
- *y = ty;
+ /* If we have negative, tx, ty here it is because we can't get
+ * the menu all the way on screen. Favor the upper-left portion.
+ */
+ *x = CLAMP (tx, 0, MAX (0, screen_width - twidth));
+ *y = CLAMP (ty, 0, MAX (0, screen_height - theight));
}
void
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 3b7953917..0fe6c6b12 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -308,23 +308,20 @@ gtk_menu_shell_insert (GtkMenuShell *menu_shell,
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_MENU_ITEM (child));
+ menu_shell->children = g_list_insert (menu_shell->children, child, position);
+
gtk_widget_set_parent (child, GTK_WIDGET (menu_shell));
- if (GTK_WIDGET_VISIBLE (child->parent))
- {
- if (GTK_WIDGET_REALIZED (child->parent) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
- if (GTK_WIDGET_MAPPED (child->parent) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
+ {
+ if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
- }
- menu_shell->children = g_list_insert (menu_shell->children, child, position);
-
- if (GTK_WIDGET_VISIBLE (menu_shell))
- gtk_widget_queue_resize (GTK_WIDGET (menu_shell));
+ gtk_widget_queue_resize (child);
+ }
}
void
@@ -805,6 +802,7 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item,
gboolean force_deactivate)
{
+ GSList *slist, *shells = NULL;
gboolean deactivate = force_deactivate;
g_return_if_fail (menu_shell != NULL);
@@ -813,12 +811,23 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
if (!deactivate)
- {
- deactivate = GTK_MENU_ITEM_CLASS (GTK_OBJECT (menu_item)->klass)->hide_on_activate;
- }
+ deactivate = GTK_MENU_ITEM_CLASS (GTK_OBJECT (menu_item)->klass)->hide_on_activate;
+
+ gtk_widget_ref (GTK_WIDGET (menu_shell));
if (deactivate)
{
+ GtkMenuShell *parent_menu_shell = menu_shell;
+
+ do
+ {
+ gtk_widget_ref (GTK_WIDGET (parent_menu_shell));
+ shells = g_slist_prepend (shells, parent_menu_shell);
+ parent_menu_shell = (GtkMenuShell*) parent_menu_shell->parent_menu_shell;
+ }
+ while (parent_menu_shell);
+ shells = g_slist_reverse (shells);
+
gtk_menu_shell_deactivate (menu_shell);
/* flush the x-queue, so any grabs are removed and
@@ -827,11 +836,15 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
gdk_flush ();
}
- gtk_widget_ref (GTK_WIDGET (menu_shell));
gtk_widget_activate (menu_item);
- if (deactivate)
- gtk_signal_emit (GTK_OBJECT (menu_shell), menu_shell_signals[SELECTION_DONE]);
+ for (slist = shells; slist; slist = slist->next)
+ {
+ gtk_signal_emit (slist->data, menu_shell_signals[SELECTION_DONE]);
+ gtk_widget_unref (slist->data);
+ }
+ g_slist_free (shells);
+
gtk_widget_unref (GTK_WIDGET (menu_shell));
}
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index d1430c9c0..2a3b0ff2a 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -64,7 +64,8 @@ enum {
ARG_TAB_HBORDER,
ARG_TAB_VBORDER,
ARG_PAGE,
- ARG_ENABLE_POPUP
+ ARG_ENABLE_POPUP,
+ ARG_HOMOGENEOUS
};
enum {
@@ -94,6 +95,7 @@ static void gtk_notebook_get_arg (GtkObject *object,
static void gtk_notebook_map (GtkWidget *widget);
static void gtk_notebook_unmap (GtkWidget *widget);
static void gtk_notebook_realize (GtkWidget *widget);
+static void gtk_notebook_unrealize (GtkWidget *widget);
static void gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_notebook_size_allocate (GtkWidget *widget,
@@ -258,6 +260,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
gtk_object_add_arg_type ("GtkNotebook::show_border", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SHOW_BORDER);
gtk_object_add_arg_type ("GtkNotebook::scrollable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SCROLLABLE);
gtk_object_add_arg_type ("GtkNotebook::enable_popup", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ENABLE_POPUP);
+ gtk_object_add_arg_type ("GtkNotebook::homogeneous", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
gtk_container_add_child_arg_type ("GtkNotebook::tab_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_TAB_LABEL);
gtk_container_add_child_arg_type ("GtkNotebook::menu_label", GTK_TYPE_STRING, GTK_ARG_READWRITE, CHILD_ARG_MENU_LABEL);
@@ -284,6 +287,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
widget_class->map = gtk_notebook_map;
widget_class->unmap = gtk_notebook_unmap;
widget_class->realize = gtk_notebook_realize;
+ widget_class->unrealize = gtk_notebook_unrealize;
widget_class->size_request = gtk_notebook_size_request;
widget_class->size_allocate = gtk_notebook_size_allocate;
widget_class->draw = gtk_notebook_draw;
@@ -393,6 +397,9 @@ gtk_notebook_set_arg (GtkObject *object,
else
gtk_notebook_popup_disable (notebook);
break;
+ case ARG_HOMOGENEOUS:
+ gtk_notebook_set_homogeneous_tabs (notebook, GTK_VALUE_BOOL (*arg));
+ break;
case ARG_PAGE:
gtk_notebook_set_page (notebook, GTK_VALUE_INT (*arg));
break;
@@ -436,6 +443,9 @@ gtk_notebook_get_arg (GtkObject *object,
case ARG_ENABLE_POPUP:
GTK_VALUE_BOOL (*arg) = notebook->menu != NULL;
break;
+ case ARG_HOMOGENEOUS:
+ GTK_VALUE_BOOL (*arg) = notebook->homogeneous;
+ break;
case ARG_PAGE:
GTK_VALUE_INT (*arg) = gtk_notebook_get_current_page (notebook);
break;
@@ -565,6 +575,27 @@ gtk_notebook_realize (GtkWidget *widget)
}
static void
+gtk_notebook_unrealize (GtkWidget *widget)
+{
+ GtkNotebook *notebook;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_NOTEBOOK (widget));
+
+ notebook = GTK_NOTEBOOK (widget);
+
+ if (notebook->panel)
+ {
+ gdk_window_set_user_data (notebook->panel, NULL);
+ gdk_window_destroy (notebook->panel);
+ notebook->panel = NULL;
+ }
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
+
+static void
gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
@@ -2917,7 +2948,12 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
if (GTK_WIDGET_REALIZED (notebook) &&
page->tab_label && !GTK_WIDGET_MAPPED (page->tab_label))
- gtk_widget_map (page->tab_label);
+ {
+ if (GTK_WIDGET_VISIBLE (page->tab_label))
+ gtk_widget_map (page->tab_label);
+ else
+ gtk_widget_show (page->tab_label);
+ }
}
if (children)
@@ -2985,7 +3021,12 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook,
if (GTK_WIDGET_REALIZED (notebook) && page->tab_label &&
!GTK_WIDGET_MAPPED (page->tab_label))
- gtk_widget_map (page->tab_label);
+ {
+ if (GTK_WIDGET_VISIBLE (page->tab_label))
+ gtk_widget_map (page->tab_label);
+ else
+ gtk_widget_show (page->tab_label);
+ }
}
}
gtk_notebook_set_shape (notebook);
@@ -3026,16 +3067,14 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
{
case GTK_POS_TOP:
width = widget->allocation.width;
- height = MAX (page->allocation.height, allocation->height) +
- ythickness;
+ height = MAX (page->allocation.height, allocation->height) + ythickness;
x = 0;
y = border_width;
break;
case GTK_POS_BOTTOM:
width = widget->allocation.width + xthickness;
- height = MAX (page->allocation.height, allocation->height) +
- ythickness;
+ height = MAX (page->allocation.height, allocation->height) + ythickness;
x = 0;
y = widget->allocation.height - height - border_width;
break;
@@ -3069,12 +3108,14 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
case GTK_POS_TOP:
page->allocation.y += ythickness;
case GTK_POS_BOTTOM:
- page->allocation.height -= ythickness;
+ if (page->allocation.height > ythickness)
+ page->allocation.height -= ythickness;
break;
case GTK_POS_LEFT:
page->allocation.x += xthickness;
case GTK_POS_RIGHT:
- page->allocation.width -= xthickness;
+ if (page->allocation.width > xthickness)
+ page->allocation.width -= xthickness;
break;
}
}
@@ -3088,8 +3129,8 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
{
child_allocation.x = (xthickness + FOCUS_WIDTH +
notebook->tab_hborder);
- child_allocation.width = (page->allocation.width -
- 2 * child_allocation.x);
+ child_allocation.width = MAX (1, (((gint) page->allocation.width) -
+ 2 * child_allocation.x));
child_allocation.x += page->allocation.x;
}
else
@@ -3103,8 +3144,8 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
page->allocation.y);
if (notebook->tab_pos == GTK_POS_TOP)
child_allocation.y += ythickness;
- child_allocation.height = (page->allocation.height - ythickness -
- 2 * (notebook->tab_vborder + FOCUS_WIDTH));
+ child_allocation.height = MAX (1, (((gint) page->allocation.height) - ythickness -
+ 2 * (notebook->tab_vborder + FOCUS_WIDTH)));
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
@@ -3112,23 +3153,21 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
if (page->fill)
{
child_allocation.y = ythickness + padding;
- child_allocation.height = (page->allocation.height -
- 2 * child_allocation.y);
+ child_allocation.height = MAX (1, (((gint) page->allocation.height) -
+ 2 * child_allocation.y));
child_allocation.y += page->allocation.y;
}
else
{
- child_allocation.y = (page->allocation.y +
- (page->allocation.height -
- tab_requisition.height) / 2);
+ child_allocation.y = (page->allocation.y + (page->allocation.height -
+ tab_requisition.height) / 2);
child_allocation.height = tab_requisition.height;
}
- child_allocation.x = (page->allocation.x + notebook->tab_hborder +
- FOCUS_WIDTH);
+ child_allocation.x = page->allocation.x + notebook->tab_hborder + FOCUS_WIDTH;
if (notebook->tab_pos == GTK_POS_LEFT)
child_allocation.x += xthickness;
- child_allocation.width = (page->allocation.width - xthickness -
- 2 * (notebook->tab_hborder + FOCUS_WIDTH));
+ child_allocation.width = MAX (1, (((gint) page->allocation.width) - xthickness -
+ 2 * (notebook->tab_hborder + FOCUS_WIDTH)));
break;
}
@@ -3253,24 +3292,10 @@ gtk_notebook_real_switch_page (GtkNotebook *notebook,
notebook->focus_tab =
g_list_find (notebook->children, notebook->cur_page);
- gtk_notebook_pages_allocate (notebook, &GTK_WIDGET (notebook)->allocation);
- gtk_notebook_expose_tabs (notebook);
-
if (GTK_WIDGET_MAPPED (notebook))
- {
- if (GTK_WIDGET_REALIZED (notebook->cur_page->child))
- gtk_widget_map (notebook->cur_page->child);
- else
- {
- gtk_widget_map (notebook->cur_page->child);
- gtk_widget_size_allocate (GTK_WIDGET (notebook),
- &GTK_WIDGET (notebook)->allocation);
- }
- }
-
- if (GTK_WIDGET_DRAWABLE (notebook))
- gtk_widget_queue_draw (GTK_WIDGET (notebook));
- gtk_notebook_set_shape (notebook);
+ gtk_widget_map (notebook->cur_page->child);
+
+ gtk_widget_queue_resize (GTK_WIDGET (notebook));
}
/* Private GtkNotebook Page Switch Functions:
@@ -3620,15 +3645,20 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
gtk_notebook_switch_focus_tab (notebook, NULL);
}
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
if (GTK_WIDGET_VISIBLE (notebook))
{
- if (GTK_WIDGET_REALIZED (notebook) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (notebook) &&
- !GTK_WIDGET_MAPPED (child) && notebook->cur_page == page)
- gtk_widget_map (child);
+ if (GTK_WIDGET_VISIBLE (child))
+ {
+ if (GTK_WIDGET_MAPPED (notebook) &&
+ !GTK_WIDGET_MAPPED (child) &&
+ notebook->cur_page == page)
+ gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
+ }
if (tab_label)
{
@@ -3636,11 +3666,11 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
{
if (!GTK_WIDGET_VISIBLE (tab_label))
gtk_widget_show (tab_label);
-
+
if (GTK_WIDGET_REALIZED (notebook) &&
!GTK_WIDGET_REALIZED (tab_label))
gtk_widget_realize (tab_label);
-
+
if (GTK_WIDGET_MAPPED (notebook) &&
!GTK_WIDGET_MAPPED (tab_label))
gtk_widget_map (tab_label);
@@ -3649,9 +3679,6 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
gtk_widget_hide (tab_label);
}
}
-
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (notebook))
- gtk_widget_queue_resize (child);
}
void
@@ -3659,10 +3686,10 @@ gtk_notebook_remove_page (GtkNotebook *notebook,
gint page_num)
{
GList *list;
-
+
g_return_if_fail (notebook != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
-
+
if (page_num >= 0)
{
list = g_list_nth (notebook->children, page_num);
@@ -3948,7 +3975,7 @@ gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
void
gtk_notebook_set_scrollable (GtkNotebook *notebook,
- gint scrollable)
+ gboolean scrollable)
{
g_return_if_fail (notebook != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
@@ -3967,6 +3994,7 @@ gtk_notebook_set_scrollable (GtkNotebook *notebook,
}
else if (notebook->panel)
{
+ gdk_window_set_user_data (notebook->panel, NULL);
gdk_window_destroy (notebook->panel);
notebook->panel = NULL;
}
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index 2c5796061..c043561a8 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -671,6 +671,49 @@ gtk_object_getv (GtkObject *object,
}
void
+gtk_object_get (GtkObject *object,
+ const gchar *first_arg_name,
+ ...)
+{
+ va_list var_args;
+ gchar *name;
+
+ g_return_if_fail (GTK_IS_OBJECT (object));
+
+ va_start (var_args, first_arg_name);
+
+ name = (gchar*) first_arg_name;
+ while (name)
+ {
+ gpointer value_pointer = va_arg (var_args, gpointer);
+
+ if (value_pointer)
+ {
+ GtkArgInfo *info;
+ gchar *error;
+ GtkArg arg;
+
+ error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
+ object_arg_info_ht,
+ name,
+ &info);
+ if (error)
+ {
+ g_warning ("gtk_object_get(): %s", error);
+ g_free (error);
+ return;
+ }
+
+ arg.name = name;
+ gtk_object_arg_get (object, &arg, info);
+ gtk_arg_to_valueloc (&arg, value_pointer);
+ }
+
+ name = va_arg (var_args, gchar*);
+ }
+}
+
+void
gtk_object_set (GtkObject *object,
const gchar *first_arg_name,
...)
diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h
index 3dcf96c02..b2515cd32 100644
--- a/gtk/gtkobject.h
+++ b/gtk/gtkobject.h
@@ -243,6 +243,14 @@ void gtk_object_destroy (GtkObject *object);
void gtk_object_getv (GtkObject *object,
guint n_args,
GtkArg *args);
+/* gtk_object_get() sets the variable values pointed to by the adresses
+ * passed after the argument names according to the arguments value.
+ * if GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING, it's
+ * the callers response to do a g_free (retrived_value);
+ */
+void gtk_object_get (GtkObject *object,
+ const gchar *first_arg_name,
+ ...);
/* gtk_object_set() takes a variable argument list of the form:
* (..., gchar *arg_name, ARG_VALUES, [repeatedly name/value pairs,] NULL)
diff --git a/gtk/gtkpacker.c b/gtk/gtkpacker.c
index 756a8ccbf..095855b4f 100644
--- a/gtk/gtkpacker.c
+++ b/gtk/gtkpacker.c
@@ -636,20 +636,16 @@ gtk_packer_add_defaults (GtkPacker *packer,
gtk_widget_set_parent (child, GTK_WIDGET (packer));
- if (GTK_WIDGET_VISIBLE (GTK_WIDGET (packer)))
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (packer)) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (GTK_WIDGET (packer)) &&
- !GTK_WIDGET_MAPPED (child))
- gtk_widget_map (child);
- }
+ if (GTK_WIDGET_MAPPED (child->parent))
+ gtk_widget_map (child);
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (packer))
- gtk_widget_queue_resize (child);
-
+ gtk_widget_queue_resize (child);
+ }
}
void
@@ -690,20 +686,16 @@ gtk_packer_add (GtkPacker *packer,
gtk_widget_set_parent (child, GTK_WIDGET (packer));
- if (GTK_WIDGET_VISIBLE (GTK_WIDGET (packer)))
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (packer)) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (GTK_WIDGET (packer)) &&
- !GTK_WIDGET_MAPPED (child))
- gtk_widget_map (child);
+ if (GTK_WIDGET_MAPPED (child->parent))
+ gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
}
-
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (packer))
- gtk_widget_queue_resize (child);
-
}
void
@@ -979,7 +971,6 @@ gtk_packer_size_request (GtkWidget *widget,
gint nvis_horz_children;
gint width, height;
gint maxWidth, maxHeight;
- GtkRequisition child_requisition;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PACKER (widget));
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 301eaec0e..3a6929fc0 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -26,9 +26,20 @@
#include "gtkpaned.h"
+enum {
+ ARG_0,
+ ARG_HANDLE_SIZE,
+ ARG_GUTTER_SIZE
+};
static void gtk_paned_class_init (GtkPanedClass *klass);
static void gtk_paned_init (GtkPaned *paned);
+static void gtk_paned_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_paned_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_paned_realize (GtkWidget *widget);
static void gtk_paned_map (GtkWidget *widget);
static void gtk_paned_unmap (GtkWidget *widget);
@@ -87,6 +98,9 @@ gtk_paned_class_init (GtkPanedClass *class)
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+ object_class->set_arg = gtk_paned_set_arg;
+ object_class->get_arg = gtk_paned_get_arg;
+
widget_class->realize = gtk_paned_realize;
widget_class->map = gtk_paned_map;
widget_class->unmap = gtk_paned_unmap;
@@ -97,6 +111,11 @@ gtk_paned_class_init (GtkPanedClass *class)
container_class->remove = gtk_paned_remove;
container_class->forall = gtk_paned_forall;
container_class->child_type = gtk_paned_child_type;
+
+ gtk_object_add_arg_type ("GtkPaned::handle_size", GTK_TYPE_UINT,
+ GTK_ARG_READWRITE, ARG_HANDLE_SIZE);
+ gtk_object_add_arg_type ("GtkPaned::gutter_size", GTK_TYPE_UINT,
+ GTK_ARG_READWRITE, ARG_GUTTER_SIZE);
}
static GtkType
@@ -128,6 +147,44 @@ gtk_paned_init (GtkPaned *paned)
paned->handle_ypos = -1;
}
+static void
+gtk_paned_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkPaned *paned = GTK_PANED (object);
+
+ switch (arg_id)
+ {
+ case ARG_HANDLE_SIZE:
+ gtk_paned_set_handle_size (paned, GTK_VALUE_UINT (*arg));
+ break;
+ case ARG_GUTTER_SIZE:
+ gtk_paned_set_gutter_size (paned, GTK_VALUE_UINT (*arg));
+ break;
+ }
+}
+
+static void
+gtk_paned_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkPaned *paned = GTK_PANED (object);
+
+ switch (arg_id)
+ {
+ case ARG_HANDLE_SIZE:
+ GTK_VALUE_UINT (*arg) = paned->handle_size;
+ break;
+ case ARG_GUTTER_SIZE:
+ GTK_VALUE_UINT (*arg) = paned->gutter_size;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
static void
gtk_paned_realize (GtkWidget *widget)
@@ -308,69 +365,63 @@ gtk_paned_add2 (GtkPaned *paned,
void
gtk_paned_pack1 (GtkPaned *paned,
- GtkWidget *widget,
+ GtkWidget *child,
gboolean resize,
gboolean shrink)
{
g_return_if_fail (paned != NULL);
g_return_if_fail (GTK_IS_PANED (paned));
- g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_WIDGET (child));
if (!paned->child1)
{
- gtk_widget_set_parent (widget, GTK_WIDGET (paned));
-
- if (GTK_WIDGET_VISIBLE (widget->parent))
- {
- if (GTK_WIDGET_REALIZED (widget->parent) &&
- !GTK_WIDGET_REALIZED (widget))
- gtk_widget_realize (widget);
-
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
- }
-
- paned->child1 = widget;
+ paned->child1 = child;
paned->child1_resize = resize;
paned->child1_shrink = shrink;
-
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (paned))
- gtk_widget_queue_resize (widget);
+
+ gtk_widget_set_parent (child, GTK_WIDGET (paned));
+
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
+ {
+ if (GTK_WIDGET_MAPPED (child->parent))
+ gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
+ }
}
}
void
gtk_paned_pack2 (GtkPaned *paned,
- GtkWidget *widget,
+ GtkWidget *child,
gboolean resize,
gboolean shrink)
{
g_return_if_fail (paned != NULL);
g_return_if_fail (GTK_IS_PANED (paned));
- g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_WIDGET (child));
if (!paned->child2)
{
- gtk_widget_set_parent (widget, GTK_WIDGET (paned));
-
- if (GTK_WIDGET_VISIBLE (widget->parent))
- {
- if (GTK_WIDGET_REALIZED (widget->parent) &&
- !GTK_WIDGET_REALIZED (widget))
- gtk_widget_realize (widget);
-
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
- }
-
- paned->child2 = widget;
+ paned->child2 = child;
paned->child2_resize = resize;
paned->child2_shrink = shrink;
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (paned))
- gtk_widget_queue_resize (widget);
+ gtk_widget_set_parent (child, GTK_WIDGET (paned));
+
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
+ {
+ if (GTK_WIDGET_MAPPED (child->parent))
+ gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
+ }
}
}
@@ -455,9 +506,13 @@ gtk_paned_set_position (GtkPaned *paned,
if (position >= 0)
{
- paned->child1_size = CLAMP (position,
- paned->min_position,
- paned->max_position);
+ /* We don't clamp here - the assumption is that
+ * if the total allocation changes at the same time
+ * as the position, the position set is with reference
+ * to the new total size. If only the position changes,
+ * then clamping will occur in gtk_paned_compute_position()
+ */
+ paned->child1_size = position;
paned->position_set = TRUE;
}
else
@@ -525,13 +580,16 @@ gtk_paned_compute_position (GtkPaned *paned,
}
else
{
- if (paned->last_allocation < 0)
- paned->last_allocation = allocation;
-
- if (paned->child1_resize && !paned->child2_resize)
- paned->child1_size += (allocation - paned->last_allocation);
- else if (!(!paned->child1_resize && paned->child2_resize))
- paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
+ /* If the position was set before the initial allocation.
+ * (paned->last_allocation < 0) just clamp it and leave it.
+ */
+ if (paned->last_allocation >= 0)
+ {
+ if (paned->child1_resize && !paned->child2_resize)
+ paned->child1_size += (allocation - paned->last_allocation);
+ else if (!(!paned->child1_resize && paned->child2_resize))
+ paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
+ }
}
paned->child1_size = CLAMP (paned->child1_size,
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 4dc265560..5c0d02207 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -33,6 +33,7 @@ static void gtk_plug_class_init (GtkPlugClass *klass);
static void gtk_plug_init (GtkPlug *plug);
static void gtk_plug_realize (GtkWidget *widget);
+static void gtk_plug_unrealize (GtkWidget *widget);
static gint gtk_plug_key_press_event (GtkWidget *widget,
GdkEventKey *event);
static void gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event);
@@ -44,6 +45,9 @@ static void gtk_plug_set_focus (GtkWindow *window,
/* From Tk */
#define EMBEDDED_APP_WANTS_FOCUS NotifyNormal+20
+
+static GtkWindowClass *parent_class = NULL;
+
GtkType
gtk_plug_get_type ()
{
@@ -77,7 +81,10 @@ gtk_plug_class_init (GtkPlugClass *class)
widget_class = (GtkWidgetClass *)class;
window_class = (GtkWindowClass *)class;
+ parent_class = gtk_type_class (gtk_window_get_type ());
+
widget_class->realize = gtk_plug_realize;
+ widget_class->unrealize = gtk_plug_unrealize;
widget_class->key_press_event = gtk_plug_key_press_event;
widget_class->focus_in_event = gtk_plug_focus_in_event;
widget_class->focus_out_event = gtk_plug_focus_out_event;
@@ -120,6 +127,27 @@ gtk_plug_new (guint32 socket_id)
}
static void
+gtk_plug_unrealize (GtkWidget *widget)
+{
+ GtkPlug *plug;
+
+ g_return_if_fail (widget != NULL);
+ g_return_if_fail (GTK_IS_PLUG (widget));
+
+ plug = GTK_PLUG (widget);
+
+ if (plug->socket_window != NULL)
+ {
+ gdk_window_set_user_data (plug->socket_window, NULL);
+ gdk_window_unref (plug->socket_window);
+ plug->socket_window = NULL;
+ }
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
+}
+
+static void
gtk_plug_realize (GtkWidget *widget)
{
GtkWindow *window;
diff --git a/gtk/gtkplug.h b/gtk/gtkplug.h
index 28656572b..6489c0f6d 100644
--- a/gtk/gtkplug.h
+++ b/gtk/gtkplug.h
@@ -43,7 +43,6 @@ extern "C" {
typedef struct _GtkPlug GtkPlug;
typedef struct _GtkPlugClass GtkPlugClass;
-typedef struct _GtkPlugButton GtkPlugButton;
struct _GtkPlug
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index ebe90a339..39d2618a0 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -39,9 +39,20 @@
#define PREVIEW_CLASS(w) GTK_PREVIEW_CLASS (GTK_OBJECT (w)->klass)
+enum {
+ ARG_0,
+ ARG_EXPAND
+};
+
static void gtk_preview_class_init (GtkPreviewClass *klass);
static void gtk_preview_init (GtkPreview *preview);
+static void gtk_preview_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_preview_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_preview_finalize (GtkObject *object);
static void gtk_preview_realize (GtkWidget *widget);
static void gtk_preview_size_allocate (GtkWidget *widget,
@@ -75,7 +86,7 @@ gtk_preview_get_type (void)
(GtkClassInitFunc) NULL,
};
- preview_type = gtk_type_unique (gtk_widget_get_type (), &preview_info);
+ preview_type = gtk_type_unique (GTK_TYPE_WIDGET, &preview_info);
}
return preview_type;
@@ -90,9 +101,11 @@ gtk_preview_class_init (GtkPreviewClass *klass)
object_class = (GtkObjectClass*) klass;
widget_class = (GtkWidgetClass*) klass;
- parent_class = gtk_type_class (gtk_widget_get_type ());
+ parent_class = gtk_type_class (GTK_TYPE_WIDGET);
preview_class = klass;
+ object_class->set_arg = gtk_preview_set_arg;
+ object_class->get_arg = gtk_preview_get_arg;
object_class->finalize = gtk_preview_finalize;
widget_class->realize = gtk_preview_realize;
@@ -109,6 +122,46 @@ gtk_preview_class_init (GtkPreviewClass *klass)
gdk_rgb_init ();
klass->info.cmap = gdk_rgb_get_cmap ();
klass->info.visual = gdk_rgb_get_visual ();
+
+ gtk_object_add_arg_type ("GtkPreview::expand",
+ GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE,
+ ARG_EXPAND);
+}
+
+static void
+gtk_preview_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkPreview *preview = GTK_PREVIEW (object);
+
+ switch (arg_id)
+ {
+ case ARG_EXPAND:
+ gtk_preview_set_expand (preview, GTK_VALUE_BOOL (*arg));
+ break;
+ }
+}
+
+static void
+gtk_preview_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkPreview *preview;
+
+ preview = GTK_PREVIEW (object);
+
+ switch (arg_id)
+ {
+ case ARG_EXPAND:
+ GTK_VALUE_BOOL (*arg) = preview->expand;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
}
void
@@ -295,12 +348,18 @@ gtk_preview_draw_row (GtkPreview *preview,
void
gtk_preview_set_expand (GtkPreview *preview,
- gint expand)
+ gboolean expand)
{
g_return_if_fail (preview != NULL);
g_return_if_fail (GTK_IS_PREVIEW (preview));
- preview->expand = (expand != FALSE);
+ expand = expand != FALSE;
+
+ if (preview->expand != expand)
+ {
+ preview->expand = expand;
+ gtk_widget_queue_resize (GTK_WIDGET (preview));
+ }
}
void
@@ -539,7 +598,7 @@ gtk_preview_make_buffer (GtkPreview *preview)
}
}
-/* This will be useful for implementing gamma. */
+/* This is used for implementing gamma. */
static void
gtk_fill_lookup_array (guchar *array)
{
diff --git a/gtk/gtkpreview.h b/gtk/gtkpreview.h
index d9b588232..73073abcb 100644
--- a/gtk/gtkpreview.h
+++ b/gtk/gtkpreview.h
@@ -36,9 +36,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_PREVIEW(obj) GTK_CHECK_CAST (obj, gtk_preview_get_type (), GtkPreview)
-#define GTK_PREVIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_preview_get_type (), GtkPreviewClass)
-#define GTK_IS_PREVIEW(obj) GTK_CHECK_TYPE (obj, gtk_preview_get_type ())
+#define GTK_TYPE_PREVIEW (gtk_preview_get_type ())
+#define GTK_PREVIEW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PREVIEW, GtkPreview))
+#define GTK_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PREVIEW, GtkPreviewClass))
+#define GTK_IS_PREVIEW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PREVIEW))
+#define GTK_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PREVIEW))
typedef struct _GtkPreview GtkPreview;
@@ -109,7 +111,7 @@ void gtk_preview_draw_row (GtkPreview *preview,
gint y,
gint w);
void gtk_preview_set_expand (GtkPreview *preview,
- gint expand);
+ gboolean expand);
void gtk_preview_set_gamma (double gamma);
void gtk_preview_set_color_cube (guint nred_shades,
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index 9764f62a0..a18c4a6bc 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -48,7 +48,8 @@ typedef enum
PRIVATE_GTK_LEAVE_PENDING = 1 << 4,
PRIVATE_GTK_HAS_SHAPE_MASK = 1 << 5,
PRIVATE_GTK_IN_REPARENT = 1 << 6,
- PRIVATE_GTK_IS_OFFSCREEN = 1 << 7
+ PRIVATE_GTK_IS_OFFSCREEN = 1 << 7,
+ PRIVATE_GTK_FULLDRAW_PENDING = 1 << 8
} GtkPrivateFlags;
/* Macros for extracting a widgets private_flags from GtkWidget.
@@ -62,6 +63,7 @@ typedef enum
#define GTK_WIDGET_HAS_SHAPE_MASK(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_SHAPE_MASK) != 0)
#define GTK_WIDGET_IN_REPARENT(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IN_REPARENT) != 0)
#define GTK_WIDGET_IS_OFFSCREEN(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IS_OFFSCREEN) != 0)
+#define GTK_WIDGET_FULLDRAW_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_FULLDRAW_PENDING) != 0)
/* Macros for setting and clearing private widget flags.
* we use a preprocessor string concatenation here for a clear
diff --git a/gtk/gtkradiomenuitem.c b/gtk/gtkradiomenuitem.c
index 62d7c4212..4d61ead40 100644
--- a/gtk/gtkradiomenuitem.c
+++ b/gtk/gtkradiomenuitem.c
@@ -30,10 +30,12 @@
static void gtk_radio_menu_item_class_init (GtkRadioMenuItemClass *klass);
static void gtk_radio_menu_item_init (GtkRadioMenuItem *radio_menu_item);
+static void gtk_radio_menu_item_destroy (GtkObject *object);
static void gtk_radio_menu_item_activate (GtkMenuItem *menu_item);
static void gtk_radio_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
GdkRectangle *area);
+static GtkCheckMenuItemClass *parent_class = NULL;
GtkType
gtk_radio_menu_item_get_type (void)
@@ -149,12 +151,18 @@ gtk_radio_menu_item_group (GtkRadioMenuItem *radio_menu_item)
static void
gtk_radio_menu_item_class_init (GtkRadioMenuItemClass *klass)
{
+ GtkObjectClass *object_class;
GtkMenuItemClass *menu_item_class;
GtkCheckMenuItemClass *check_menu_item_class;
+ object_class = (GtkObjectClass*) klass;
menu_item_class = (GtkMenuItemClass*) klass;
check_menu_item_class = (GtkCheckMenuItemClass*) klass;
+ parent_class = gtk_type_class (gtk_check_menu_item_get_type ());
+
+ object_class->destroy = gtk_radio_menu_item_destroy;
+
menu_item_class->activate = gtk_radio_menu_item_activate;
check_menu_item_class->draw_indicator = gtk_radio_menu_item_draw_indicator;
@@ -167,6 +175,34 @@ gtk_radio_menu_item_init (GtkRadioMenuItem *radio_menu_item)
}
static void
+gtk_radio_menu_item_destroy (GtkObject *object)
+{
+ GtkRadioMenuItem *radio_menu_item;
+ GtkRadioMenuItem *tmp_menu_item;
+ GSList *tmp_list;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GTK_IS_RADIO_MENU_ITEM (object));
+
+ radio_menu_item = GTK_RADIO_MENU_ITEM (object);
+
+ radio_menu_item->group = g_slist_remove (radio_menu_item->group,
+ radio_menu_item);
+ tmp_list = radio_menu_item->group;
+
+ while (tmp_list)
+ {
+ tmp_menu_item = tmp_list->data;
+ tmp_list = tmp_list->next;
+
+ tmp_menu_item->group = radio_menu_item->group;
+ }
+
+ if (GTK_OBJECT_CLASS (parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+}
+
+static void
gtk_radio_menu_item_activate (GtkMenuItem *menu_item)
{
GtkRadioMenuItem *radio_menu_item;
diff --git a/gtk/gtkrc b/gtk/gtkrc
deleted file mode 100644
index 6943b9a63..000000000
--- a/gtk/gtkrc
+++ /dev/null
@@ -1 +0,0 @@
-# Empty gtkrc for default theme
diff --git a/gtk/gtkrc.bg b/gtk/gtkrc.bg
index 5a276505c..5ba273e68 100644
--- a/gtk/gtkrc.bg
+++ b/gtk/gtkrc.bg
@@ -1,6 +1,8 @@
-style "default" {
+style "gtk-default-bg" {
fontset = "-*-helvetica-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 "default"
+class "GtkWidget" style "gtk-default-bg"
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 6f492baa5..58470d83d 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -60,6 +60,7 @@
typedef struct _GtkRcSet GtkRcSet;
typedef struct _GtkRcNode GtkRcNode;
typedef struct _GtkRcFile GtkRcFile;
+typedef struct _GtkRcStylePrivate GtkRcStylePrivate;
struct _GtkRcSet
{
@@ -75,6 +76,15 @@ struct _GtkRcFile
gboolean reload;
};
+struct _GtkRcStylePrivate
+{
+ GtkRcStyle style;
+
+ guint ref_count;
+ /* list of RC style lists including this RC style */
+ GSList *rc_style_lists;
+};
+
static guint gtk_rc_style_hash (const char *name);
static gint gtk_rc_style_compare (const char *a,
const char *b);
@@ -124,7 +134,6 @@ static void gtk_rc_clear_hash_node (gpointer key,
static void gtk_rc_clear_styles (void);
static void gtk_rc_append_default_pixmap_path (void);
static void gtk_rc_append_default_module_path (void);
-static void gtk_rc_append_pixmap_path (gchar *dir);
static void gtk_rc_add_initial_default_files (void);
@@ -220,6 +229,11 @@ static gchar *pixmap_path[GTK_RC_MAX_PIXMAP_PATHS];
#define GTK_RC_MAX_MODULE_PATHS 128
static gchar *module_path[GTK_RC_MAX_MODULE_PATHS];
+/* A stack of directories for RC files we are parsing currently.
+ * these are implicitely added to the end of PIXMAP_PATHS
+ */
+GSList *rc_dir_stack = NULL;
+
/* The files we have parsed, to reread later if necessary */
GSList *rc_files = NULL;
@@ -320,18 +334,6 @@ gtk_rc_append_default_pixmap_path(void)
}
static void
-gtk_rc_append_pixmap_path(gchar *dir)
-{
- gint n;
-
- for (n = 0; pixmap_path[n]; n++) ;
- if (n >= GTK_RC_MAX_MODULE_PATHS - 1)
- return;
- pixmap_path[n++] = g_strdup(dir);
- pixmap_path[n] = NULL;
-}
-
-static void
gtk_rc_append_default_module_path(void)
{
gchar *var, *path;
@@ -459,55 +461,126 @@ gtk_rc_get_default_files (void)
return gtk_rc_default_files;
}
+ /* The following routine is based on _nl_normalize_codeset from
+ * the GNU C library. Contributed by
+ *
+ * Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ * Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ *
+ * Normalize codeset name. There is no standard for the codeset
+ * names. Normalization allows the user to use any of the common
+ * names.
+ */
+ static char *
+ _gtk_normalize_codeset (const char *codeset, int name_len)
+ {
+ int len = 0;
+ int only_digit = 1;
+ char *retval;
+ char *wp;
+ int cnt;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalnum (codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha (codeset[cnt]))
+ only_digit = 0;
+ }
+
+ retval = g_malloc ((only_digit ? 3 : 0) + len + 1);
+
+ if (only_digit)
+ {
+ strcpy (retval, "iso");
+ wp = retval + 3;
+ }
+ else
+ wp = retval;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalpha (codeset[cnt]))
+ *wp++ = isupper(codeset[cnt]) ? tolower (codeset[cnt]) : codeset[cnt];
+ else if (isdigit (codeset[cnt]))
+ *wp++ = codeset[cnt];
+
+ *wp = '\0';
+
+ return retval;
+ }
+
void
gtk_rc_init (void)
{
- gchar *locale_suffixes[3];
- gint n_locale_suffixes = 0;
- gint i, j;
-#ifdef G_OS_WIN32
- char *locale = g_win32_getlocale ();
-#else
-#ifdef HAVE_LC_MESSAGES
- char *locale = setlocale (LC_MESSAGES, NULL);
-#else
- char *locale = setlocale (LC_CTYPE, NULL);
-#endif
-#endif
- guint length;
- char *p;
+ static gchar *locale_suffixes[3];
+ static gint n_locale_suffixes = 0;
- rc_style_ht = g_hash_table_new ((GHashFunc) gtk_rc_style_hash,
- (GCompareFunc) gtk_rc_style_compare);
- pixmap_path[0] = NULL;
- module_path[0] = NULL;
- gtk_rc_append_default_pixmap_path();
- gtk_rc_append_default_module_path();
+ gint i, j;
- gtk_rc_add_initial_default_files ();
+ static gboolean initted = FALSE;
- if (strcmp (locale, "C") && strcmp (locale, "POSIX"))
+ if (!initted)
{
- /* Determine locale-specific suffixes for RC files
- */
- p = strchr (locale, '@');
- length = p ? (p -locale) : strlen (locale);
+ gint length;
+ gchar *locale;
+ gchar *p;
+
+#ifdef G_OS_WIN32
+ locale = g_win32_getlocale ();
+#else
+ locale = setlocale (LC_CTYPE, NULL);
+#endif
- p = strchr (locale, '.');
- if (p)
- {
- locale_suffixes[n_locale_suffixes++] = g_strndup (locale, length);
- length = p - locale;
- }
+ initted = TRUE;
+
+ pixmap_path[0] = NULL;
+ module_path[0] = NULL;
+ gtk_rc_append_default_pixmap_path();
+ gtk_rc_append_default_module_path();
- p = strchr (locale, '_');
- if (p)
+ gtk_rc_add_initial_default_files ();
+
+ if (strcmp (locale, "C") && strcmp (locale, "POSIX"))
{
- locale_suffixes[n_locale_suffixes++] = g_strndup (locale, length);
- length = p - locale;
- }
+ /* Determine locale-specific suffixes for RC files
+ *
+ * We normalize the charset into a standard form,
+ * which has all '-' and '_' characters removed,
+ * and is lowercase.
+ */
+ gchar *normalized_locale;
+
+ p = strchr (locale, '@');
+ length = p ? (p -locale) : strlen (locale);
+
+ p = strchr (locale, '.');
+ if (p)
+ {
+ gchar *tmp1 = g_strndup (locale, p - locale + 1);
+ gchar *tmp2 = _gtk_normalize_codeset (p + 1, length - (p - locale + 1));
+
+ normalized_locale = g_strconcat (tmp1, tmp2, NULL);
+ g_free (tmp1);
+ g_free (tmp2);
+
+ locale_suffixes[n_locale_suffixes++] = g_strdup (normalized_locale);
+ length = p - locale;
+ }
+ else
+ normalized_locale = g_strndup (locale, length);
+
+ p = strchr (normalized_locale, '_');
+ if (p)
+ {
+ locale_suffixes[n_locale_suffixes++] = g_strndup (normalized_locale, length);
+ length = p - normalized_locale;
+ }
+
+ locale_suffixes[n_locale_suffixes++] = g_strndup (normalized_locale, length);
- locale_suffixes[n_locale_suffixes++] = g_strndup (locale, length);
+ g_free (normalized_locale);
+ }
}
i = 0;
@@ -529,7 +602,7 @@ gtk_rc_init (void)
gtk_rc_parse (gtk_rc_default_files[i]);
i++;
}
- }
+}
void
gtk_rc_parse_string (const gchar *rc_string)
@@ -595,6 +668,7 @@ gtk_rc_parse_file (const gchar *filename, gboolean reload)
if (!lstat (rc_file->canonical_name, &statbuf))
{
gint fd;
+ GSList *tmp_list;
rc_file->mtime = statbuf.st_mtime;
@@ -602,19 +676,18 @@ gtk_rc_parse_file (const gchar *filename, gboolean reload)
if (fd < 0)
return;
- {
- gint i;
- gchar *dir;
-
- dir = g_strdup(rc_file->canonical_name);
- for (i = strlen(dir) - 1; (i >= 0) && (dir[i] != G_DIR_SEPARATOR); i--)
- dir[i] = 0;
- if (i >= 0 && dir[i] == G_DIR_SEPARATOR)
- dir[i] = 0;
- gtk_rc_append_pixmap_path(dir);
- g_free(dir);
- }
+ /* Temporarily push directory name for this file on
+ * a stack of directory names while parsing it
+ */
+ rc_dir_stack = g_slist_prepend (rc_dir_stack,
+ g_dirname (rc_file->canonical_name));
gtk_rc_parse_any (filename, fd, NULL);
+
+ tmp_list = rc_dir_stack;
+ rc_dir_stack = rc_dir_stack->next;
+
+ g_free (tmp_list->data);
+ g_slist_free_1 (tmp_list);
close (fd);
}
@@ -633,12 +706,12 @@ gtk_rc_parse (const gchar *filename)
GtkRcStyle *
gtk_rc_style_new (void)
{
- GtkRcStyle *new_style;
+ GtkRcStylePrivate *new_style;
- new_style = g_new0 (GtkRcStyle, 1);
+ new_style = g_new0 (GtkRcStylePrivate, 1);
new_style->ref_count = 1;
- return new_style;
+ return (GtkRcStyle *)new_style;
}
void
@@ -646,21 +719,62 @@ gtk_rc_style_ref (GtkRcStyle *rc_style)
{
g_return_if_fail (rc_style != NULL);
- rc_style->ref_count++;
+ ((GtkRcStylePrivate *)rc_style)->ref_count++;
+}
+
+/* Like g_slist_remove, but remove all copies of data */
+static GSList*
+gtk_rc_slist_remove_all (GSList *list,
+ gpointer data)
+{
+ GSList *tmp;
+ GSList *prev;
+
+ prev = NULL;
+ tmp = list;
+
+ while (tmp)
+ {
+ if (tmp->data == data)
+ {
+ if (list == tmp)
+ list = list->next;
+
+ if (prev)
+ prev->next = tmp->next;
+
+ g_slist_free_1 (tmp);
+
+ if (prev)
+ tmp = prev->next;
+ else
+ tmp = list;
+ }
+ else
+ {
+ prev = tmp;
+ tmp = tmp->next;
+ }
+ }
+
+ return list;
}
void
gtk_rc_style_unref (GtkRcStyle *rc_style)
{
+ GtkRcStylePrivate *private = (GtkRcStylePrivate *)rc_style;
gint i;
g_return_if_fail (rc_style != NULL);
- g_return_if_fail (rc_style->ref_count > 0);
+ g_return_if_fail (private->ref_count > 0);
- rc_style->ref_count--;
+ private->ref_count--;
- if (rc_style->ref_count == 0)
+ if (private->ref_count == 0)
{
+ GSList *tmp_list1, *tmp_list2;
+
if (rc_style->engine)
{
rc_style->engine->destroy_rc_style (rc_style);
@@ -678,16 +792,42 @@ gtk_rc_style_unref (GtkRcStyle *rc_style)
if (rc_style->bg_pixmap_name[i])
g_free (rc_style->bg_pixmap_name[i]);
- g_free (rc_style);
- }
-}
+ /* Now remove all references to this rc_style from
+ * realized_style_ht
+ */
+ tmp_list1 = private->rc_style_lists;
+ while (tmp_list1)
+ {
+ GSList *rc_styles = tmp_list1->data;
+ GtkStyle *style = g_hash_table_lookup (realized_style_ht, rc_styles);
+ gtk_style_unref (style);
+
+ /* Remove the list of styles from the other rc_styles
+ * in the list
+ */
+ tmp_list2 = rc_styles;
+ while (tmp_list2)
+ {
+ GtkRcStylePrivate *other_style = tmp_list2->data;
-static void
-gtk_rc_clear_realized_node (gpointer key,
- gpointer data,
- gpointer user_data)
-{
- gtk_style_unref (data);
+ if (other_style != private)
+ other_style->rc_style_lists =
+ gtk_rc_slist_remove_all (other_style->rc_style_lists, rc_styles);
+
+ tmp_list2 = tmp_list2->next;
+ }
+
+ /* And from the hash table itself
+ */
+ g_hash_table_remove (realized_style_ht, rc_styles);
+ g_slist_free (rc_styles);
+
+ tmp_list1 = tmp_list1->next;
+ }
+ g_slist_free (private->rc_style_lists);
+
+ g_free (private);
+ }
}
static void
@@ -725,13 +865,6 @@ gtk_rc_clear_styles (void)
rc_style_ht = NULL;
}
- if (realized_style_ht)
- {
- g_hash_table_foreach (realized_style_ht, gtk_rc_clear_realized_node, NULL);
- g_hash_table_destroy (realized_style_ht);
- realized_style_ht = NULL;
- }
-
gtk_rc_free_rc_sets (gtk_rc_sets_widget);
g_slist_free (gtk_rc_sets_widget);
gtk_rc_sets_widget = NULL;
@@ -743,8 +876,6 @@ gtk_rc_clear_styles (void)
gtk_rc_free_rc_sets (gtk_rc_sets_class);
g_slist_free (gtk_rc_sets_class);
gtk_rc_sets_class = NULL;
-
- gtk_rc_init ();
}
gboolean
@@ -1081,11 +1212,10 @@ gtk_rc_style_compare (const char *a,
static GtkRcStyle*
gtk_rc_style_find (const char *name)
{
- GtkRcStyle *rc_style;
-
- rc_style = g_hash_table_lookup (rc_style_ht, (gpointer) name);
-
- return rc_style;
+ if (rc_style_ht)
+ return g_hash_table_lookup (rc_style_ht, (gpointer) name);
+ else
+ return NULL;
}
/* Assumes ownership of rc_style */
@@ -1148,7 +1278,6 @@ gtk_rc_style_init (GSList *rc_styles)
gint i;
GtkStyle *style = NULL;
- GtkRcStyle *proto_style;
if (!realized_style_ht)
realized_style_ht = g_hash_table_new ((GHashFunc)gtk_rc_styles_hash,
@@ -1158,13 +1287,16 @@ gtk_rc_style_init (GSList *rc_styles)
if (!style)
{
- GSList *tmp_styles = rc_styles;
+ GtkRcStyle *proto_style;
+ GSList *tmp_styles;
proto_style = gtk_rc_style_new ();
+ tmp_styles = rc_styles;
while (tmp_styles)
{
GtkRcStyle *rc_style = tmp_styles->data;
+ GtkRcStylePrivate *rc_style_private;
for (i=0; i<5; i++)
{
@@ -1212,6 +1344,12 @@ gtk_rc_style_init (GSList *rc_styles)
(proto_style->engine == rc_style->engine))
proto_style->engine->merge_rc_style (proto_style, rc_style);
+ /* Point from each rc_style to the list of styles */
+
+ rc_style_private = (GtkRcStylePrivate *)rc_style;
+ if (!g_slist_find (rc_style_private->rc_style_lists, rc_styles))
+ rc_style_private->rc_style_lists = g_slist_prepend (rc_style_private->rc_style_lists, rc_styles);
+
tmp_styles = tmp_styles->next;
}
@@ -1227,6 +1365,8 @@ gtk_rc_style_init (GSList *rc_styles)
g_hash_table_insert (realized_style_ht, rc_styles, style);
}
+ else
+ g_slist_free (rc_styles);
return style;
}
@@ -1301,7 +1441,7 @@ gtk_rc_parse_style (GScanner *scanner)
return G_TOKEN_STRING;
insert = FALSE;
- rc_style = g_hash_table_lookup (rc_style_ht, scanner->value.v_string);
+ rc_style = gtk_rc_style_find (scanner->value.v_string);
if (!rc_style)
{
@@ -1333,7 +1473,7 @@ gtk_rc_parse_style (GScanner *scanner)
return G_TOKEN_STRING;
}
- parent_style = g_hash_table_lookup (rc_style_ht, scanner->value.v_string);
+ parent_style = gtk_rc_style_find (scanner->value.v_string);
if (parent_style)
{
for (i = 0; i < 5; i++)
@@ -1449,7 +1589,13 @@ gtk_rc_parse_style (GScanner *scanner)
}
if (insert)
- g_hash_table_insert (rc_style_ht, rc_style->name, rc_style);
+ {
+ if (!rc_style_ht)
+ rc_style_ht = g_hash_table_new ((GHashFunc) gtk_rc_style_hash,
+ (GCompareFunc) gtk_rc_style_compare);
+
+ g_hash_table_insert (rc_style_ht, rc_style->name, rc_style);
+ }
return G_TOKEN_NONE;
}
@@ -1586,29 +1732,51 @@ gtk_rc_parse_bg_pixmap (GScanner *scanner,
return G_TOKEN_NONE;
}
+static gchar*
+gtk_rc_check_pixmap_dir (const gchar *dir, const gchar *pixmap_file)
+{
+ gchar *buf;
+ gint fd;
+
+ buf = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", dir, pixmap_file);
+
+ fd = open (buf, O_RDONLY);
+ if (fd >= 0)
+ {
+ close (fd);
+ return buf;
+ }
+
+ g_free (buf);
+
+ return NULL;
+ }
+
gchar*
gtk_rc_find_pixmap_in_path (GScanner *scanner,
- const gchar *pixmap_file)
+ const gchar *pixmap_file)
{
gint i;
- gint fd;
- gchar *buf;
-
+ gchar *filename;
+ GSList *tmp_list;
+
for (i = 0; (i < GTK_RC_MAX_PIXMAP_PATHS) && (pixmap_path[i] != NULL); i++)
{
- buf = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s",
- pixmap_path[i], pixmap_file);
-
- fd = open (buf, O_RDONLY);
- if (fd >= 0)
- {
- close (fd);
- return buf;
- }
-
- g_free (buf);
+ filename = gtk_rc_check_pixmap_dir (pixmap_path[i], pixmap_file);
+ if (filename)
+ return filename;
}
-
+
+ tmp_list = rc_dir_stack;
+ while (tmp_list)
+ {
+ filename = gtk_rc_check_pixmap_dir (tmp_list->data, pixmap_file);
+ if (filename)
+ return filename;
+
+ tmp_list = tmp_list->next;
+ }
+
if (scanner)
g_warning (_("Unable to locate image file in pixmap_path: \"%s\" line %d"),
pixmap_file, scanner->line);
diff --git a/gtk/gtkrc.el b/gtk/gtkrc.el
index 45bc26b22..b98fb68d8 100644
--- a/gtk/gtkrc.el
+++ b/gtk/gtkrc.el
@@ -1,6 +1,8 @@
-style "default" {
+style "gtk-default-el" {
fontset = "-*-helvetica-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 "default"
+class "GtkWidget" style "gtk-default-el"
diff --git a/gtk/gtkrc.eo b/gtk/gtkrc.eo
index 8a67af539..0956a2f99 100644
--- a/gtk/gtkrc.eo
+++ b/gtk/gtkrc.eo
@@ -1,6 +1,8 @@
-style "default" {
+style "gtk-default-eo" {
fontset = "-*-helvetica-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 "default"
+class "GtkWidget" style "gtk-default-eo"
diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h
index c8cac7879..70d8ebaae 100644
--- a/gtk/gtkrc.h
+++ b/gtk/gtkrc.h
@@ -58,9 +58,6 @@ struct _GtkRcStyle
GtkThemeEngine *engine;
gpointer engine_data;
-
- /* Private */
- guint ref_count;
};
void gtk_rc_init (void);
diff --git a/gtk/gtkrc.he b/gtk/gtkrc.he
index 8bc5d3418..57d0eb22f 100644
--- a/gtk/gtkrc.he
+++ b/gtk/gtkrc.he
@@ -1,6 +1,6 @@
-style "default" {
+style "gtk-default-he" {
fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
-*-*-medium-r-normal--12-*-*-*-*-*-iso8859-8"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-he"
diff --git a/gtk/gtkrc.hy b/gtk/gtkrc.hy
index 836de99a4..02b88cfd2 100644
--- a/gtk/gtkrc.hy
+++ b/gtk/gtkrc.hy
@@ -1,6 +1,6 @@
-style "default" {
+style "gtk-default-hy" {
fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
-*-armnet helvetica-medium-r-normal--12-*-*-*-*-*-armscii-8"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-hy"
diff --git a/gtk/gtkrc.iso-8859-13 b/gtk/gtkrc.iso-8859-13
new file mode 100644
index 000000000..ce5d5e96f
--- /dev/null
+++ b/gtk/gtkrc.iso-8859-13
@@ -0,0 +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-13"
+}
+class "GtkWidget" style "gtk-default-iso-8859-13"
diff --git a/gtk/gtkrc.iso-8859-14 b/gtk/gtkrc.iso-8859-14
new file mode 100644
index 000000000..fcc1c7d08
--- /dev/null
+++ b/gtk/gtkrc.iso-8859-14
@@ -0,0 +1,8 @@
+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-14"
+}
+class "GtkWidget" style "gtk-default-iso-8859-14"
+
diff --git a/gtk/gtkrc.iso-8859-15 b/gtk/gtkrc.iso-8859-15
new file mode 100644
index 000000000..093426a53
--- /dev/null
+++ b/gtk/gtkrc.iso-8859-15
@@ -0,0 +1,8 @@
+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-15"
+}
+class "GtkWidget" style "gtk-default-iso-8859-15"
+
diff --git a/gtk/gtkrc.iso-8859-2 b/gtk/gtkrc.iso-8859-2
new file mode 100644
index 000000000..676d5fdc3
--- /dev/null
+++ b/gtk/gtkrc.iso-8859-2
@@ -0,0 +1,14 @@
+#$(gtkconfigdir)/gtkrc.iso-8859-2
+#
+# This file defines the fontsets for iso-8859-2 encoding
+# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-2
+# and a gtkrc.$LANG doesn't exist yet.
+
+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-2"
+}
+class "GtkWidget" style "gtk-default-iso-8859-2"
+
diff --git a/gtk/gtkrc.iso-8859-5 b/gtk/gtkrc.iso-8859-5
new file mode 100644
index 000000000..6e324f158
--- /dev/null
+++ b/gtk/gtkrc.iso-8859-5
@@ -0,0 +1,14 @@
+#$(gtkconfigdir)/gtkrc.iso-8859-5
+#
+# This file defines the fontsets for iso-8859-5 encoding
+# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-5
+# and a gtkrc.$LANG doesn't exist yet.
+
+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-5"
+}
+class "GtkWidget" style "gtk-default-iso-8859-5"
+
diff --git a/gtk/gtkrc.iso885913 b/gtk/gtkrc.iso885913
deleted file mode 100644
index 39f08930b..000000000
--- a/gtk/gtkrc.iso885913
+++ /dev/null
@@ -1,6 +0,0 @@
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-13"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.iso885914 b/gtk/gtkrc.iso885914
deleted file mode 100644
index 33e83247b..000000000
--- a/gtk/gtkrc.iso885914
+++ /dev/null
@@ -1,6 +0,0 @@
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-14"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.iso885915 b/gtk/gtkrc.iso885915
deleted file mode 100644
index 2b496180f..000000000
--- a/gtk/gtkrc.iso885915
+++ /dev/null
@@ -1,6 +0,0 @@
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-15"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.iso88592 b/gtk/gtkrc.iso88592
deleted file mode 100644
index cfe71a2e4..000000000
--- a/gtk/gtkrc.iso88592
+++ /dev/null
@@ -1,12 +0,0 @@
-#$(gtkconfigdir)/gtkrc.iso88592
-#
-# This file defines the fontsets for iso-8859-2 encoding
-# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-2
-# and a gtkrc.$LANG doesn't exist yet.
-
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.iso88595 b/gtk/gtkrc.iso88595
deleted file mode 100644
index 34ab1dbbf..000000000
--- a/gtk/gtkrc.iso88595
+++ /dev/null
@@ -1,12 +0,0 @@
-#$(gtkconfigdir)/gtkrc.iso88595
-#
-# This file defines the fontsets for iso-8859-5 encoding
-# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-5
-# and a gtkrc.$LANG doesn't exist yet.
-
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-5"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.ja b/gtk/gtkrc.ja
index cf433715f..9cabf92fa 100644
--- a/gtk/gtkrc.ja
+++ b/gtk/gtkrc.ja
@@ -1,6 +1,6 @@
-style "default" {
+style "gtk-default-ja" {
fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\
-misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-ja"
diff --git a/gtk/gtkrc.ka_GE.georgianacademy b/gtk/gtkrc.ka_GE.georgianacademy
index 7c35b9a1b..182ecb4ef 100644
--- a/gtk/gtkrc.ka_GE.georgianacademy
+++ b/gtk/gtkrc.ka_GE.georgianacademy
@@ -10,9 +10,9 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-georgianacademy" {
fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
-*-*-medium-r-normal--14-*-*-*-*-*-georgian-academy"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-georgianacademy"
diff --git a/gtk/gtkrc.ka_GE.georgianps b/gtk/gtkrc.ka_GE.georgianps
index 21c87eab5..e314cca4a 100644
--- a/gtk/gtkrc.ka_GE.georgianps
+++ b/gtk/gtkrc.ka_GE.georgianps
@@ -9,9 +9,9 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-georgianps" {
fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
-*-*-medium-r-normal--14-*-*-*-*-*-georgian-ps"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-georgianps"
diff --git a/gtk/gtkrc.ko b/gtk/gtkrc.ko
index 6cbbd5b7c..f0e539b80 100644
--- a/gtk/gtkrc.ko
+++ b/gtk/gtkrc.ko
@@ -1,6 +1,8 @@
-style "default" {
- fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\
- -*-*-medium-*-*--14-*-*-*-*-*-ksc5601.1987-*"
+style "gtk-default-ko" {
+ fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,\
+ -*-gulim-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
+ -*-kodig-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
+ -*-*-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,*"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-ko"
diff --git a/gtk/gtkrc.ru b/gtk/gtkrc.ru
index a52ef174e..11259044a 100644
--- a/gtk/gtkrc.ru
+++ b/gtk/gtkrc.ru
@@ -9,9 +9,11 @@
# 1999-06-23: changed -cronyx-helvetica-...koi8-r to -*-helvetica-...koi8-r
# everybody doesn't has cronyx fonts (I haven't :) )
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--14-*-*-*-*-*-koi8-r"
+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-*-*-*-*-*-koi8-r"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-ru"
diff --git a/gtk/gtkrc.sl b/gtk/gtkrc.sl
deleted file mode 100644
index d987b9f1d..000000000
--- a/gtk/gtkrc.sl
+++ /dev/null
@@ -1,6 +0,0 @@
-style "default" {
- fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2"
-}
-class "GtkWidget" style "default"
-
diff --git a/gtk/gtkrc.th b/gtk/gtkrc.th
index 91dad95ef..16fc09a91 100644
--- a/gtk/gtkrc.th
+++ b/gtk/gtkrc.th
@@ -6,10 +6,10 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-th" {
fontset = "-*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1,\
-*-phaisarn-medium-r-normal--14-*-*-*-*-*-tis620.2533-1,\
-*-*-medium-r-normal--14-*-*-*-*-*-tis620.2533-1"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-th"
diff --git a/gtk/gtkrc.tr b/gtk/gtkrc.tr
index c09e38768..f6c17324f 100644
--- a/gtk/gtkrc.tr
+++ b/gtk/gtkrc.tr
@@ -1,6 +1,8 @@
-style "default" {
+style "gtk-default-tr" {
fontset = "-*-helvetica-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 "default"
+class "GtkWidget" style "gtk-default-tr"
diff --git a/gtk/gtkrc.uk b/gtk/gtkrc.uk
index 91a5dbda4..a892125da 100644
--- a/gtk/gtkrc.uk
+++ b/gtk/gtkrc.uk
@@ -6,9 +6,11 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-uk" {
fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
- -*-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 "default"
+class "GtkWidget" style "gtk-default-uk"
diff --git a/gtk/gtkrc.vi_VN.tcvn b/gtk/gtkrc.vi_VN.tcvn
index 57db2481e..ccba157dd 100644
--- a/gtk/gtkrc.vi_VN.tcvn
+++ b/gtk/gtkrc.vi_VN.tcvn
@@ -11,9 +11,12 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+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,\"
-*-verdana-medium-r-normal--14-*-*-*-*-*-tcvn-5712"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-vi-vn-tcvn"
diff --git a/gtk/gtkrc.vi_VN.viscii b/gtk/gtkrc.vi_VN.viscii
index 9769c6344..f25826703 100644
--- a/gtk/gtkrc.vi_VN.viscii
+++ b/gtk/gtkrc.vi_VN.viscii
@@ -10,9 +10,12 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+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,\"
-*-verdana-medium-r-normal--14-*-*-*-*-*-viscii1.1-1"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-vi-vn-viscii"
diff --git a/gtk/gtkrc.zh_CN b/gtk/gtkrc.zh_CN
index e72b6787f..72f986935 100644
--- a/gtk/gtkrc.zh_CN
+++ b/gtk/gtkrc.zh_CN
@@ -6,9 +6,9 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-zh-cn" {
fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
-*-*-medium-r-normal--14-*-*-*-*-*-gb2312.1980-0"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-zh-cn"
diff --git a/gtk/gtkrc.zh_TW.Big5 b/gtk/gtkrc.zh_TW.Big5
index 37b01e66f..5c836b469 100644
--- a/gtk/gtkrc.zh_TW.Big5
+++ b/gtk/gtkrc.zh_TW.Big5
@@ -6,9 +6,9 @@
# 1999, Pablo Saratxaga <srtxg@chanae.alphanet.ch>
#
-style "default" {
+style "gtk-default-zh-tw" {
fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
-*-*-medium-r-normal--14-*-*-*-*-*-big5-0"
}
-class "GtkWidget" style "default"
+class "GtkWidget" style "gtk-default-zh-tw"
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 725cd0f75..e9481a921 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -26,6 +26,13 @@
#include "gtkruler.h"
+enum {
+ ARG_0,
+ ARG_LOWER,
+ ARG_UPPER,
+ ARG_POSITION,
+ ARG_MAX_SIZE
+};
static void gtk_ruler_class_init (GtkRulerClass *klass);
static void gtk_ruler_init (GtkRuler *ruler);
@@ -36,7 +43,12 @@ static void gtk_ruler_size_allocate (GtkWidget *widget,
static gint gtk_ruler_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_ruler_make_pixmap (GtkRuler *ruler);
-
+static void gtk_ruler_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_ruler_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static GtkWidgetClass *parent_class;
@@ -67,7 +79,7 @@ gtk_ruler_get_type (void)
(GtkClassInitFunc) NULL,
};
- ruler_type = gtk_type_unique (gtk_widget_get_type (), &ruler_info);
+ ruler_type = gtk_type_unique (GTK_TYPE_WIDGET, &ruler_info);
}
return ruler_type;
@@ -82,7 +94,10 @@ gtk_ruler_class_init (GtkRulerClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
- parent_class = gtk_type_class (gtk_widget_get_type ());
+ parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+
+ object_class->set_arg = gtk_ruler_set_arg;
+ object_class->get_arg = gtk_ruler_get_arg;
widget_class->realize = gtk_ruler_realize;
widget_class->unrealize = gtk_ruler_unrealize;
@@ -91,6 +106,15 @@ gtk_ruler_class_init (GtkRulerClass *class)
class->draw_ticks = NULL;
class->draw_pos = NULL;
+
+ gtk_object_add_arg_type ("GtkRuler::lower", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_LOWER);
+ gtk_object_add_arg_type ("GtkRuler::upper", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_UPPER);
+ gtk_object_add_arg_type ("GtkRuler::position", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_POSITION);
+ gtk_object_add_arg_type ("GtkRuler::max_size", GTK_TYPE_FLOAT,
+ GTK_ARG_READWRITE, ARG_MAX_SIZE);
}
static void
@@ -109,6 +133,61 @@ gtk_ruler_init (GtkRuler *ruler)
gtk_ruler_set_metric (ruler, GTK_PIXELS);
}
+static void
+gtk_ruler_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkRuler *ruler = GTK_RULER (object);
+
+ switch (arg_id)
+ {
+ case ARG_LOWER:
+ gtk_ruler_set_range (ruler, GTK_VALUE_FLOAT (*arg), ruler->upper,
+ ruler->position, ruler->max_size);
+ break;
+ case ARG_UPPER:
+ gtk_ruler_set_range (ruler, ruler->lower, GTK_VALUE_FLOAT (*arg),
+ ruler->position, ruler->max_size);
+ break;
+ case ARG_POSITION:
+ gtk_ruler_set_range (ruler, ruler->lower, ruler->upper,
+ GTK_VALUE_FLOAT (*arg), ruler->max_size);
+ break;
+ case ARG_MAX_SIZE:
+ gtk_ruler_set_range (ruler, ruler->lower, ruler->upper,
+ ruler->position, GTK_VALUE_FLOAT (*arg));
+ break;
+ }
+}
+
+static void
+gtk_ruler_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkRuler *ruler = GTK_RULER (object);
+
+ switch (arg_id)
+ {
+ case ARG_LOWER:
+ GTK_VALUE_FLOAT (*arg) = ruler->lower;
+ break;
+ case ARG_UPPER:
+ GTK_VALUE_FLOAT (*arg) = ruler->upper;
+ break;
+ case ARG_POSITION:
+ GTK_VALUE_FLOAT (*arg) = ruler->position;
+ break;
+ case ARG_MAX_SIZE:
+ GTK_VALUE_FLOAT (*arg) = ruler->max_size;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
void
gtk_ruler_set_metric (GtkRuler *ruler,
GtkMetricType metric)
diff --git a/gtk/gtkruler.h b/gtk/gtkruler.h
index 868288361..45b7013a4 100644
--- a/gtk/gtkruler.h
+++ b/gtk/gtkruler.h
@@ -37,10 +37,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_RULER(obj) GTK_CHECK_CAST (obj, gtk_ruler_get_type (), GtkRuler)
-#define GTK_RULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_ruler_get_type (), GtkRulerClass)
-#define GTK_IS_RULER(obj) GTK_CHECK_TYPE (obj, gtk_ruler_get_type ())
-
+#define GTK_TYPE_RULER (gtk_ruler_get_type ())
+#define GTK_RULER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RULER, GtkRuler))
+#define GTK_RULER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RULER, GtkRulerClass))
+#define GTK_IS_RULER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RULER))
+#define GTK_IS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RULER))
typedef struct _GtkRuler GtkRuler;
typedef struct _GtkRulerClass GtkRulerClass;
@@ -89,16 +90,16 @@ struct _GtkRulerMetric
};
-GtkType gtk_ruler_get_type (void);
-void gtk_ruler_set_metric (GtkRuler *ruler,
- GtkMetricType metric);
-void gtk_ruler_set_range (GtkRuler *ruler,
- gfloat lower,
- gfloat upper,
- gfloat position,
- gfloat max_size);
-void gtk_ruler_draw_ticks (GtkRuler *ruler);
-void gtk_ruler_draw_pos (GtkRuler *ruler);
+GtkType gtk_ruler_get_type (void);
+void gtk_ruler_set_metric (GtkRuler *ruler,
+ GtkMetricType metric);
+void gtk_ruler_set_range (GtkRuler *ruler,
+ gfloat lower,
+ gfloat upper,
+ gfloat position,
+ gfloat max_size);
+void gtk_ruler_draw_ticks (GtkRuler *ruler);
+void gtk_ruler_draw_pos (GtkRuler *ruler);
#ifdef __cplusplus
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index c77cb3f63..e9f0f1d85 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -900,8 +900,8 @@ gtk_scrolled_window_add (GtkContainer *container,
scrolled_window = GTK_SCROLLED_WINDOW (container);
- gtk_widget_set_parent (child, GTK_WIDGET (bin));
bin->child = child;
+ gtk_widget_set_parent (child, GTK_WIDGET (bin));
/* this is a temporary message */
if (!gtk_widget_set_scroll_adjustments (child,
@@ -910,19 +910,16 @@ gtk_scrolled_window_add (GtkContainer *container,
g_warning ("gtk_scrolled_window_add(): cannot add non scrollable widget "
"use gtk_scrolled_window_add_with_viewport() instead");
- if (GTK_WIDGET_VISIBLE (child->parent))
- {
- if (GTK_WIDGET_REALIZED (child->parent) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
- if (GTK_WIDGET_MAPPED (child->parent) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
+ {
+ if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
- }
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (child);
+ gtk_widget_queue_resize (child);
+ }
}
static void
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index eb3c652a9..1d62d7dc7 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -177,12 +177,17 @@ gtk_target_list_new (const GtkTargetEntry *targets,
void
gtk_target_list_ref (GtkTargetList *list)
{
+ g_return_if_fail (list != NULL);
+
list->ref_count++;
}
void
gtk_target_list_unref (GtkTargetList *list)
{
+ g_return_if_fail (list != NULL);
+ g_return_if_fail (list->ref_count > 0);
+
list->ref_count--;
if (list->ref_count == 0)
{
@@ -253,7 +258,7 @@ gtk_target_list_remove (GtkTargetList *list,
{
g_free (pair);
- list->list = g_list_remove (list->list, tmp_list);
+ list->list = g_list_remove_link (list->list, tmp_list);
g_list_free_1 (tmp_list);
return;
@@ -683,7 +688,7 @@ void
gtk_selection_data_set (GtkSelectionData *selection_data,
GdkAtom type,
gint format,
- guchar *data,
+ const guchar *data,
gint length)
{
if (selection_data->data)
@@ -840,6 +845,8 @@ gtk_selection_request (GtkWidget *widget,
gint length;
mult_atoms = NULL;
+
+ gdk_error_trap_push();
if (!gdk_property_get (info->requestor, event->property, 0, /* AnyPropertyType */
0, GTK_SELECTION_MAX_SIZE, FALSE,
&type, &format, &length, &mult_atoms))
@@ -850,6 +857,7 @@ gtk_selection_request (GtkWidget *widget,
g_free (info);
return TRUE;
}
+ gdk_error_trap_pop();
info->num_conversions = length / (2*sizeof (GdkAtom));
info->conversions = g_new (GtkIncrConversion, info->num_conversions);
@@ -960,9 +968,19 @@ gtk_selection_request (GtkWidget *widget,
mult_atoms, 2*info->num_conversions);
g_free (mult_atoms);
}
-
- gdk_selection_send_notify (event->requestor, event->selection, event->target,
- event->property, event->time);
+
+ if (info->num_conversions == 1 &&
+ info->conversions[0].property == GDK_NONE)
+ {
+ /* Reject the entire conversion */
+ gdk_selection_send_notify (event->requestor, event->selection,
+ event->target, GDK_NONE, event->time);
+ }
+ else
+ {
+ gdk_selection_send_notify (event->requestor, event->selection,
+ event->target, event->property, event->time);
+ }
if (info->num_incrs == 0)
{
@@ -1165,7 +1183,7 @@ gtk_selection_notify (GtkWidget *widget,
{
GList *tmp_list;
GtkRetrievalInfo *info = NULL;
- guchar *buffer;
+ guchar *buffer = NULL;
gint length;
GdkAtom type;
gint format;
@@ -1186,8 +1204,12 @@ gtk_selection_notify (GtkWidget *widget,
if (!tmp_list) /* no retrieval in progress */
return FALSE;
-
- if (event->property == GDK_NONE)
+
+ if (event->property != GDK_NONE)
+ length = gdk_selection_property_get (widget->window, &buffer,
+ &type, &format);
+
+ if (event->property == GDK_NONE || buffer == NULL)
{
current_retrievals = g_list_remove_link (current_retrievals, tmp_list);
g_list_free (tmp_list);
@@ -1198,9 +1220,6 @@ gtk_selection_notify (GtkWidget *widget,
return TRUE;
}
- length = gdk_selection_property_get (widget->window, &buffer,
- &type, &format);
-
if (type == gtk_selection_atoms[INCR])
{
/* The remainder of the selection will come through PropertyNotify
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index 771df76cf..eafc275bc 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -103,7 +103,7 @@ gint gtk_selection_convert (GtkWidget *widget,
void gtk_selection_data_set (GtkSelectionData *selection_data,
GdkAtom type,
gint format,
- guchar *data,
+ const guchar *data,
gint length);
/* Called when a widget is destroyed */
diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c
index 3288c90ae..97ea7cf1d 100644
--- a/gtk/gtksignal.c
+++ b/gtk/gtksignal.c
@@ -165,8 +165,8 @@ static gboolean gtk_signal_collect_params (GtkArg *params,
va_list var_args);
#define LOOKUP_SIGNAL_ID(signal_id) ( \
- signal_id > 0 && signal_id < gtk_n_signals ? \
- (GtkSignal*) gtk_signals + signal_id : \
+ signal_id > 0 && signal_id < _gtk_private_n_signals ? \
+ (GtkSignal*) _gtk_private_signals + signal_id : \
(GtkSignal*) 0 \
)
@@ -177,8 +177,8 @@ static GtkSignalDestroy global_destroy_notify = NULL;
static guint gtk_handler_id = 1;
static guint gtk_handler_quark = 0;
static GHashTable *gtk_signal_hash_table = NULL;
-static GtkSignal *gtk_signals = NULL;
-static guint gtk_n_signals = 0;
+ GtkSignal *_gtk_private_signals = NULL;
+ guint _gtk_private_n_signals = 0;
static GMemChunk *gtk_signal_hash_mem_chunk = NULL;
static GMemChunk *gtk_disconnect_info_mem_chunk = NULL;
static GtkHandler *gtk_handler_free_list = NULL;
@@ -207,24 +207,24 @@ gtk_signal_next_and_invalidate (void)
/* nearest pow
*/
- size = gtk_n_signals + SIGNAL_BLOCK_SIZE;
+ size = _gtk_private_n_signals + SIGNAL_BLOCK_SIZE;
size *= sizeof (GtkSignal);
i = 1;
while (i < size)
i <<= 1;
size = i;
- gtk_signals = g_realloc (gtk_signals, size);
+ _gtk_private_signals = g_realloc (_gtk_private_signals, size);
- gtk_n_free_signals = size / sizeof (GtkSignal) - gtk_n_signals;
+ gtk_n_free_signals = size / sizeof (GtkSignal) - _gtk_private_n_signals;
- memset (gtk_signals + gtk_n_signals, 0, gtk_n_free_signals * sizeof (GtkSignal));
+ memset (_gtk_private_signals + _gtk_private_n_signals, 0, gtk_n_free_signals * sizeof (GtkSignal));
}
- new_signal_id = gtk_n_signals++;
+ new_signal_id = _gtk_private_n_signals++;
gtk_n_free_signals--;
- g_assert (gtk_n_signals < 65535);
+ g_assert (_gtk_private_n_signals < 65535);
signal = LOOKUP_SIGNAL_ID (new_signal_id);
if (signal)
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 9988948b9..d13cd995e 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -307,8 +307,8 @@ gtk_socket_size_request (GtkWidget *widget,
gdk_error_trap_pop ();
}
- requisition->width = socket->request_width;
- requisition->height = socket->request_height;
+ requisition->width = MAX (socket->request_width, 1);
+ requisition->height = MAX (socket->request_height, 1);
}
static void
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index c98e8c56d..d107870d0 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -28,10 +28,8 @@
#include "gtkgc.h"
#include "gtkrc.h"
#include "gtkstyle.h"
-#include "gtkthemes.h"
#include "gtkwidget.h"
#include "gtkthemes.h"
-#include "gdkprivate.h"
#define LIGHTNESS_MULT 1.3
@@ -375,7 +373,7 @@ gtk_style_copy (GtkStyle *style)
if (style->engine)
{
new_style->engine = style->engine;
- gtk_theme_engine_ref(new_style->engine);
+ gtk_theme_engine_ref (new_style->engine);
new_style->engine->duplicate_style (new_style, style);
}
@@ -422,7 +420,7 @@ gtk_style_new (void)
style->attach_count = 0;
style->colormap = NULL;
style->depth = -1;
- style->klass = &default_class;
+ style->klass = (GtkStyleClass *)&default_class;
style->black.red = 0;
style->black.green = 0;
@@ -478,6 +476,39 @@ gtk_style_new (void)
return style;
}
+/*************************************************************
+ * gtk_style_attach:
+ * Attach a style to a window; this process allocates the
+ * colors and creates the GC's for the style - it specializes
+ * it to a particular visual and colormap. The process
+ * may involve the creation of a new style if the style
+ * has already been attached to a window with a different
+ * style and colormap.
+ * arguments:
+ * style:
+ * window:
+ * results:
+ * Either the style parameter, or a newly created style.
+ * If the style is newly created, the style parameter
+ * will be dereferenced, and the new style will have
+ * a reference count belonging to the caller.
+ *
+ * FIXME: The sequence -
+ * create a style => s1
+ * attach s1 to v1, c1 => s1
+ * attach s1 to v2, c2 => s2
+ * detach s1 from v1, c1
+ * attach s1 to v2, c2 => s3
+ * results in two separate, unlinked styles s2 and s3 which
+ * are identical and could be shared. To fix this, we would
+ * want to never remove a style from the list of linked
+ * styles as long as as it has a reference count. However, the
+ * disadvantage of doing it this way means that we would need two
+ * passes through the linked list when attaching (one to check for
+ * matching styles, one to look for empty unattached styles - but
+ * it will almost never be longer than 2 elements.
+ *************************************************************/
+
GtkStyle*
gtk_style_attach (GtkStyle *style,
GdkWindow *window)
@@ -519,9 +550,17 @@ gtk_style_attach (GtkStyle *style,
new_style = gtk_style_duplicate (style);
gtk_style_init (new_style, colormap, depth);
}
-
+
+ /* A style gets a refcount from being attached */
if (new_style->attach_count == 0)
gtk_style_ref (new_style);
+
+ /* Another refcount belongs to the parent */
+ if (style != new_style)
+ {
+ gtk_style_unref (style);
+ gtk_style_ref (new_style);
+ }
new_style->attach_count++;
@@ -563,6 +602,7 @@ GtkStyle*
gtk_style_ref (GtkStyle *style)
{
g_return_val_if_fail (style != NULL, NULL);
+ g_return_val_if_fail (style->ref_count > 0, NULL);
style->ref_count += 1;
return style;
@@ -572,6 +612,7 @@ void
gtk_style_unref (GtkStyle *style)
{
g_return_if_fail (style != NULL);
+ g_return_if_fail (style->ref_count > 0);
style->ref_count -= 1;
if (style->ref_count == 0)
diff --git a/gtk/gtkthemes.c b/gtk/gtkthemes.c
index e39646de8..4a5d484b0 100644
--- a/gtk/gtkthemes.c
+++ b/gtk/gtkthemes.c
@@ -163,14 +163,17 @@ void
gtk_theme_engine_unref (GtkThemeEngine *engine)
{
GtkThemeEnginePrivate *private;
+ private = (GtkThemeEnginePrivate *)engine;
g_return_if_fail (engine != NULL);
+ g_return_if_fail (private->refcount > 0);
- private = (GtkThemeEnginePrivate *)engine;
private->refcount--;
if (private->refcount == 0)
{
+ private->exit();
+
g_hash_table_remove (engine_hash, private->name);
g_module_close (private->library);
diff --git a/gtk/gtktipsquery.c b/gtk/gtktipsquery.c
index 0d5530cbd..aed085d9b 100644
--- a/gtk/gtktipsquery.c
+++ b/gtk/gtktipsquery.c
@@ -257,6 +257,11 @@ gtk_tips_query_destroy (GtkObject *object)
gtk_tips_query_set_caller (tips_query, NULL);
+ g_free (tips_query->label_inactive);
+ tips_query->label_inactive = NULL;
+ g_free (tips_query->label_no_tip);
+ tips_query->label_no_tip = NULL;
+
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index cb726aa67..fafb94cc5 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -42,6 +42,15 @@
#define SPACE_LINE_END 7
enum {
+ ARG_0,
+ ARG_ORIENTATION,
+ ARG_TOOLBAR_STYLE,
+ ARG_SPACE_SIZE,
+ ARG_SPACE_STYLE,
+ ARG_RELIEF
+};
+
+enum {
ORIENTATION_CHANGED,
STYLE_CHANGED,
LAST_SIGNAL
@@ -57,6 +66,12 @@ struct _GtkToolbarChildSpace
static void gtk_toolbar_class_init (GtkToolbarClass *class);
static void gtk_toolbar_init (GtkToolbar *toolbar);
+static void gtk_toolbar_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_toolbar_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_toolbar_destroy (GtkObject *object);
static void gtk_toolbar_map (GtkWidget *widget);
static void gtk_toolbar_unmap (GtkWidget *widget);
@@ -124,7 +139,7 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
container_class = (GtkContainerClass *) class;
parent_class = gtk_type_class (gtk_container_get_type ());
-
+
toolbar_signals[ORIENTATION_CHANGED] =
gtk_signal_new ("orientation_changed",
GTK_RUN_FIRST,
@@ -145,6 +160,8 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
gtk_object_class_add_signals (object_class, toolbar_signals, LAST_SIGNAL);
object_class->destroy = gtk_toolbar_destroy;
+ object_class->set_arg = gtk_toolbar_set_arg;
+ object_class->get_arg = gtk_toolbar_get_arg;
widget_class->map = gtk_toolbar_map;
widget_class->unmap = gtk_toolbar_unmap;
@@ -157,9 +174,20 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
container_class->remove = gtk_toolbar_remove;
container_class->forall = gtk_toolbar_forall;
container_class->focus = NULL;
-
+
class->orientation_changed = gtk_real_toolbar_orientation_changed;
class->style_changed = gtk_real_toolbar_style_changed;
+
+ gtk_object_add_arg_type ("GtkToolbar::orientation", GTK_TYPE_ORIENTATION,
+ GTK_ARG_READWRITE, ARG_ORIENTATION);
+ gtk_object_add_arg_type ("GtkToolbar::toolbar_style", GTK_TYPE_TOOLBAR_STYLE,
+ GTK_ARG_READWRITE, ARG_TOOLBAR_STYLE);
+ gtk_object_add_arg_type ("GtkToolbar::space_size", GTK_TYPE_UINT,
+ GTK_ARG_READWRITE, ARG_SPACE_SIZE);
+ gtk_object_add_arg_type ("GtkToolbar::space_style", GTK_TYPE_TOOLBAR_SPACE_STYLE,
+ GTK_ARG_READWRITE, ARG_SPACE_STYLE);
+ gtk_object_add_arg_type ("GtkToolbar::relief", GTK_TYPE_RELIEF_STYLE,
+ GTK_ARG_READWRITE, ARG_RELIEF);
}
static void
@@ -180,7 +208,64 @@ gtk_toolbar_init (GtkToolbar *toolbar)
toolbar->button_maxh = 0;
}
-GtkWidget *
+static void
+gtk_toolbar_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkToolbar *toolbar = GTK_TOOLBAR (object);
+
+ switch (arg_id)
+ {
+ case ARG_ORIENTATION:
+ gtk_toolbar_set_orientation (toolbar, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_TOOLBAR_STYLE:
+ gtk_toolbar_set_style (toolbar, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_SPACE_SIZE:
+ gtk_toolbar_set_space_size (toolbar, GTK_VALUE_UINT (*arg));
+ break;
+ case ARG_SPACE_STYLE:
+ gtk_toolbar_set_space_style (toolbar, GTK_VALUE_ENUM (*arg));
+ break;
+ case ARG_RELIEF:
+ gtk_toolbar_set_button_relief (toolbar, GTK_VALUE_ENUM (*arg));
+ break;
+ }
+}
+
+static void
+gtk_toolbar_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkToolbar *toolbar = GTK_TOOLBAR (object);
+
+ switch (arg_id)
+ {
+ case ARG_ORIENTATION:
+ GTK_VALUE_ENUM (*arg) = toolbar->orientation;
+ break;
+ case ARG_TOOLBAR_STYLE:
+ GTK_VALUE_ENUM (*arg) = toolbar->style;
+ break;
+ case ARG_SPACE_SIZE:
+ GTK_VALUE_UINT (*arg) = toolbar->space_size;
+ break;
+ case ARG_SPACE_STYLE:
+ GTK_VALUE_ENUM (*arg) = toolbar->space_style;
+ break;
+ case ARG_RELIEF:
+ GTK_VALUE_ENUM (*arg) = toolbar->relief;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
+GtkWidget*
gtk_toolbar_new (GtkOrientation orientation,
GtkToolbarStyle style)
{
@@ -921,22 +1006,21 @@ gtk_toolbar_insert_element (GtkToolbar *toolbar,
toolbar->num_children++;
if (type != GTK_TOOLBAR_CHILD_SPACE)
- gtk_widget_set_parent (child->widget, GTK_WIDGET (toolbar));
-
- if ((type != GTK_TOOLBAR_CHILD_SPACE) && GTK_WIDGET_VISIBLE (toolbar))
{
- if (GTK_WIDGET_REALIZED (toolbar)
- && !GTK_WIDGET_REALIZED (child->widget))
+ gtk_widget_set_parent (child->widget, GTK_WIDGET (toolbar));
+
+ if (GTK_WIDGET_REALIZED (child->widget->parent))
gtk_widget_realize (child->widget);
-
- if (GTK_WIDGET_MAPPED (toolbar)
- && !GTK_WIDGET_MAPPED (child->widget))
- gtk_widget_map (child->widget);
- }
- if (GTK_WIDGET_VISIBLE (toolbar) &&
- ((type == GTK_TOOLBAR_CHILD_SPACE) ||
- GTK_WIDGET_VISIBLE (child->widget)))
+ if (GTK_WIDGET_VISIBLE (child->widget->parent) && GTK_WIDGET_VISIBLE (child->widget))
+ {
+ if (GTK_WIDGET_MAPPED (child->widget->parent))
+ gtk_widget_map (child->widget);
+
+ gtk_widget_queue_resize (child->widget);
+ }
+ }
+ else
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
return child->widget;
diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h
index 78b9bcf23..3c82eb2bc 100644
--- a/gtk/gtktoolbar.h
+++ b/gtk/gtktoolbar.h
@@ -42,9 +42,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_TOOLBAR(obj) GTK_CHECK_CAST (obj, gtk_toolbar_get_type (), GtkToolbar)
-#define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass)
-#define GTK_IS_TOOLBAR(obj) GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ())
+#define GTK_TYPE_TOOLBAR (gtk_toolbar_get_type ())
+#define GTK_TOOLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TOOLBAR, GtkToolbar))
+#define GTK_TOOLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLBAR, GtkToolbarClass))
+#define GTK_IS_TOOLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TOOLBAR))
+#define GTK_IS_TOOLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLBAR))
typedef enum
{
@@ -103,25 +105,25 @@ struct _GtkToolbarClass
GtkType gtk_toolbar_get_type (void);
-GtkWidget *gtk_toolbar_new (GtkOrientation orientation,
+GtkWidget* gtk_toolbar_new (GtkOrientation orientation,
GtkToolbarStyle style);
/* Simple button items */
-GtkWidget *gtk_toolbar_append_item (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_append_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
const char *tooltip_private_text,
GtkWidget *icon,
GtkSignalFunc callback,
gpointer user_data);
-GtkWidget *gtk_toolbar_prepend_item (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_prepend_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
const char *tooltip_private_text,
GtkWidget *icon,
GtkSignalFunc callback,
gpointer user_data);
-GtkWidget *gtk_toolbar_insert_item (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_insert_item (GtkToolbar *toolbar,
const char *text,
const char *tooltip_text,
const char *tooltip_private_text,
@@ -137,7 +139,7 @@ void gtk_toolbar_insert_space (GtkToolbar *toolbar,
gint position);
/* Any element type */
-GtkWidget *gtk_toolbar_append_element (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_append_element (GtkToolbar *toolbar,
GtkToolbarChildType type,
GtkWidget *widget,
const char *text,
@@ -147,7 +149,7 @@ GtkWidget *gtk_toolbar_append_element (GtkToolbar *toolbar,
GtkSignalFunc callback,
gpointer user_data);
-GtkWidget *gtk_toolbar_prepend_element (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_prepend_element (GtkToolbar *toolbar,
GtkToolbarChildType type,
GtkWidget *widget,
const char *text,
@@ -157,7 +159,7 @@ GtkWidget *gtk_toolbar_prepend_element (GtkToolbar *toolbar,
GtkSignalFunc callback,
gpointer user_data);
-GtkWidget *gtk_toolbar_insert_element (GtkToolbar *toolbar,
+GtkWidget* gtk_toolbar_insert_element (GtkToolbar *toolbar,
GtkToolbarChildType type,
GtkWidget *widget,
const char *text,
diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c
index 578346dd2..d5e5a6a68 100644
--- a/gtk/gtktooltips.c
+++ b/gtk/gtktooltips.c
@@ -51,8 +51,7 @@ static void gtk_tooltips_widget_remove (GtkWidget *widget,
static void gtk_tooltips_set_active_widget (GtkTooltips *tooltips,
GtkWidget *widget);
static gint gtk_tooltips_timeout (gpointer data);
-static gint gtk_tooltips_expose (GtkTooltips *tooltips,
- GdkEventExpose *event);
+static gint gtk_tooltips_paint_window (GtkTooltips *tooltips);
static void gtk_tooltips_draw_tips (GtkTooltips *tooltips);
@@ -190,7 +189,11 @@ gtk_tooltips_force_window (GtkTooltips *tooltips)
gtk_widget_set_name (tooltips->tip_window, "gtk-tooltips");
gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window),
"expose_event",
- GTK_SIGNAL_FUNC (gtk_tooltips_expose),
+ GTK_SIGNAL_FUNC (gtk_tooltips_paint_window),
+ GTK_OBJECT (tooltips));
+ gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window),
+ "draw",
+ GTK_SIGNAL_FUNC (gtk_tooltips_paint_window),
GTK_OBJECT (tooltips));
gtk_signal_connect (GTK_OBJECT (tooltips->tip_window),
@@ -362,7 +365,9 @@ gtk_tooltips_set_tip (GtkTooltips *tooltips,
tooltipsdata->tip_text = g_strdup (tip_text);
tooltipsdata->tip_private = g_strdup (tip_private);
- gtk_tooltips_layout_text (tooltips, tooltipsdata);
+ /* Flag data as unitialized */
+ tooltipsdata->font = NULL;
+
tooltips->tips_data_list = g_list_append (tooltips->tips_data_list,
tooltipsdata);
gtk_signal_connect_after(GTK_OBJECT (widget), "event",
@@ -400,7 +405,7 @@ gtk_tooltips_set_colors (GtkTooltips *tooltips,
}
static gint
-gtk_tooltips_expose (GtkTooltips *tooltips, GdkEventExpose *event)
+gtk_tooltips_paint_window (GtkTooltips *tooltips)
{
GtkStyle *style;
gint y, baseline_skip, gap;
@@ -456,6 +461,7 @@ gtk_tooltips_draw_tips (GtkTooltips * tooltips)
else if (GTK_WIDGET_VISIBLE (tooltips->tip_window))
gtk_widget_hide (tooltips->tip_window);
+ gtk_widget_ensure_style (tooltips->tip_window);
style = tooltips->tip_window->style;
widget = tooltips->active_tips_data->widget;
@@ -464,6 +470,7 @@ gtk_tooltips_draw_tips (GtkTooltips * tooltips)
scr_h = gdk_screen_height ();
data = tooltips->active_tips_data;
+
if (data->font != style->font)
gtk_tooltips_layout_text (tooltips, data);
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 0c8cefd95..b3765f561 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -198,7 +198,7 @@ gtk_tree_append (GtkTree *tree,
g_return_if_fail (tree_item != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (tree_item));
- gtk_tree_insert(tree, tree_item, -1);
+ gtk_tree_insert (tree, tree_item, -1);
}
void
@@ -210,7 +210,7 @@ gtk_tree_prepend (GtkTree *tree,
g_return_if_fail (tree_item != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (tree_item));
- gtk_tree_insert(tree, tree_item, 0);
+ gtk_tree_insert (tree, tree_item, 0);
}
void
@@ -225,74 +225,59 @@ gtk_tree_insert (GtkTree *tree,
g_return_if_fail (tree_item != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (tree_item));
- /* set parent widget to item */
- gtk_widget_set_parent (tree_item, GTK_WIDGET (tree));
-
- if (GTK_WIDGET_VISIBLE (tree_item->parent))
- {
- if (GTK_WIDGET_REALIZED (tree_item->parent) &&
- !GTK_WIDGET_REALIZED (tree_item))
- gtk_widget_realize (tree_item);
-
- if (GTK_WIDGET_MAPPED (tree_item->parent) &&
- !GTK_WIDGET_MAPPED (tree_item))
- gtk_widget_map (tree_item);
- }
-
nchildren = g_list_length (tree->children);
if ((position < 0) || (position > nchildren))
position = nchildren;
if (position == nchildren)
- {
- tree->children = g_list_append(tree->children, tree_item);
- }
+ tree->children = g_list_append (tree->children, tree_item);
else
- {
- tree->children = g_list_insert(tree->children, tree_item, position);
- }
+ tree->children = g_list_insert (tree->children, tree_item, position);
- if (GTK_WIDGET_VISIBLE (tree))
- gtk_widget_queue_resize (GTK_WIDGET (tree));
+ gtk_widget_set_parent (tree_item, GTK_WIDGET (tree));
+ if (GTK_WIDGET_REALIZED (tree_item->parent))
+ gtk_widget_realize (tree_item);
+
+ if (GTK_WIDGET_VISIBLE (tree_item->parent) && GTK_WIDGET_VISIBLE (tree_item))
+ {
+ if (GTK_WIDGET_MAPPED (tree_item->parent))
+ gtk_widget_map (tree_item);
+
+ gtk_widget_queue_resize (tree_item);
+ }
}
static void
gtk_tree_add (GtkContainer *container,
- GtkWidget *widget)
+ GtkWidget *child)
{
GtkTree *tree;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_TREE (container));
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_TREE_ITEM (widget));
+ g_return_if_fail (GTK_IS_TREE_ITEM (child));
tree = GTK_TREE (container);
- gtk_widget_set_parent (widget, GTK_WIDGET (container));
- if (GTK_WIDGET_VISIBLE (widget->parent))
- {
- if (GTK_WIDGET_REALIZED (widget->parent) &&
- !GTK_WIDGET_REALIZED (widget))
- gtk_widget_realize (widget);
-
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
- }
+ tree->children = g_list_append (tree->children, child);
- tree->children = g_list_append (tree->children, widget);
+ gtk_widget_set_parent (child, GTK_WIDGET (container));
- if (!tree->selection && (tree->selection_mode == GTK_SELECTION_BROWSE))
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
- gtk_tree_select_child (tree, widget);
+ if (GTK_WIDGET_MAPPED (child->parent))
+ gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
}
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (widget);
-
+ if (!tree->selection && (tree->selection_mode == GTK_SELECTION_BROWSE))
+ gtk_tree_select_child (tree, child);
}
static gint
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index fe5fc7275..afcd8f46f 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -308,40 +308,36 @@ gtk_tree_item_set_subtree (GtkTreeItem *tree_item,
g_return_if_fail (subtree != NULL);
g_return_if_fail (GTK_IS_TREE (subtree));
- if(tree_item->subtree) {
- g_warning("there is already a subtree for this tree item\n");
- return;
- }
+ if (tree_item->subtree)
+ {
+ g_warning("there is already a subtree for this tree item\n");
+ return;
+ }
tree_item->subtree = subtree;
- GTK_TREE(subtree)->tree_owner = GTK_WIDGET(tree_item);
+ GTK_TREE (subtree)->tree_owner = GTK_WIDGET (tree_item);
/* show subtree button */
if (tree_item->pixmaps_box)
gtk_widget_show (tree_item->pixmaps_box);
- /* set parent widget */
- gtk_widget_set_parent(subtree, GTK_WIDGET(tree_item)->parent);
+ if (tree_item->expanded)
+ gtk_widget_show (subtree);
+ else
+ gtk_widget_hide (subtree);
- if(GTK_WIDGET_VISIBLE(GTK_WIDGET(tree_item)))
- {
- if(GTK_WIDGET_REALIZED (GTK_WIDGET(tree_item)) &&
- !GTK_WIDGET_REALIZED (GTK_WIDGET(subtree)))
- gtk_widget_realize (GTK_WIDGET(subtree));
+ gtk_widget_set_parent (subtree, GTK_WIDGET (tree_item)->parent);
- if(GTK_WIDGET_MAPPED (GTK_WIDGET(tree_item)) &&
- !GTK_WIDGET_MAPPED (GTK_WIDGET(subtree)))
- gtk_widget_map (GTK_WIDGET(subtree));
- }
+ if (GTK_WIDGET_REALIZED (subtree->parent))
+ gtk_widget_realize (subtree);
- if (tree_item->expanded)
- gtk_widget_show(subtree);
- else
- gtk_widget_hide(subtree);
-
- if (GTK_WIDGET_VISIBLE (tree_item) && GTK_WIDGET_VISIBLE (tree_item))
- gtk_widget_queue_resize (GTK_WIDGET(tree_item));
+ if (GTK_WIDGET_VISIBLE (subtree->parent) && GTK_WIDGET_VISIBLE (subtree))
+ {
+ if (GTK_WIDGET_MAPPED (subtree->parent))
+ gtk_widget_map (subtree);
+ gtk_widget_queue_resize (subtree);
+ }
}
void
@@ -531,7 +527,7 @@ gtk_tree_item_size_allocate (GtkWidget *widget,
GtkBin *bin;
GtkTreeItem* item;
GtkAllocation child_allocation;
- guint border_width;
+ gint border_width;
int temp;
g_return_if_fail (widget != NULL);
@@ -587,6 +583,9 @@ gtk_tree_item_draw_lines (GtkWidget *widget)
item = GTK_TREE_ITEM(widget);
tree = GTK_TREE(widget->parent);
+ if (!tree->view_line)
+ return;
+
/* draw vertical line */
lx1 = item->pixmaps_box->allocation.width;
lx1 = lx2 = ((lx1 / 2) + (lx1 % 2) +
@@ -649,6 +648,12 @@ gtk_tree_item_paint (GtkWidget *widget,
g_return_if_fail (GTK_IS_TREE_ITEM (widget));
g_return_if_fail (area != NULL);
+ /* FIXME: We should honor tree->view_mode, here - I think
+ * the desired effect is that when the mode is VIEW_ITEM,
+ * only the subitem is drawn as selected, not the entire
+ * line. (Like the way that the tree in Windows Explorer
+ * works).
+ */
if (GTK_WIDGET_DRAWABLE (widget))
{
bin = GTK_BIN (widget);
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c
index 5b04c3cae..e1ebaebc6 100644
--- a/gtk/gtkvpaned.c
+++ b/gtk/gtkvpaned.c
@@ -245,7 +245,7 @@ gtk_vpaned_draw (GtkWidget *widget,
GdkRectangle *area)
{
GtkPaned *paned;
- GdkRectangle child_area;
+ GdkRectangle handle_area, child_area;
guint16 border_width;
g_return_if_fail (widget != NULL);
@@ -253,11 +253,44 @@ gtk_vpaned_draw (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
{
+ gint width, height;
+
paned = GTK_PANED (widget);
border_width = GTK_CONTAINER (paned)->border_width;
gdk_window_clear_area (widget->window,
area->x, area->y, area->width, area->height);
+
+ /* Redraw the handle
+ */
+ gdk_window_get_size (paned->handle, &width, &height);
+
+ handle_area.x = paned->handle_xpos;
+ handle_area.y = paned->handle_ypos;
+ handle_area.width = width;
+ handle_area.height = height;
+
+ if (gdk_rectangle_intersect (&handle_area, area, &child_area))
+ {
+ child_area.x -= handle_area.x;
+ child_area.y -= handle_area.y;
+ gtk_paint_box (widget->style, paned->handle,
+ GTK_WIDGET_STATE(widget),
+ GTK_SHADOW_OUT,
+ &child_area, widget, "paned",
+ 0, 0,
+ width, height);
+ }
+
+ /* Redraw the groove
+ */
+ gtk_paint_hline(widget->style, widget->window, GTK_STATE_NORMAL,
+ area, widget, "vpaned",
+ 0, widget->allocation.width - 1,
+ border_width + paned->child1_size + paned->gutter_size / 2 - 1);
+
+ /* Redraw the children
+ */
if (paned->child1 &&
gtk_widget_intersect (paned->child1, area, &child_area))
gtk_widget_draw (paned->child1, &child_area);
@@ -265,10 +298,6 @@ gtk_vpaned_draw (GtkWidget *widget,
gtk_widget_intersect (paned->child2, area, &child_area))
gtk_widget_draw (paned->child2, &child_area);
- gtk_paint_hline(widget->style, widget->window, GTK_STATE_NORMAL,
- area, widget, "vpaned",
- 0, widget->allocation.width - 1,
- border_width + paned->child1_size + paned->gutter_size / 2 - 1);
}
}
@@ -283,12 +312,10 @@ gtk_vpaned_xor_line (GtkPaned *paned)
if (!paned->xor_gc)
{
- values.foreground = widget->style->white;
- values.function = GDK_XOR;
+ values.function = GDK_INVERT;
values.subwindow_mode = GDK_INCLUDE_INFERIORS;
paned->xor_gc = gdk_gc_new_with_values (widget->window,
&values,
- GDK_GC_FOREGROUND |
GDK_GC_FUNCTION |
GDK_GC_SUBWINDOW);
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 36cf93e46..d8b35ccb3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -36,7 +36,7 @@
#include "gtkbindings.h"
#include "gtkprivate.h"
#include "gdk/gdk.h"
-#include "gdkprivate.h" /* Used in gtk_reset_shapes_recurse to avoid copy */
+#include "gdk/gdkprivate.h" /* Used in gtk_reset_shapes_recurse to avoid copy */
#define WIDGET_CLASS(w) GTK_WIDGET_CLASS (GTK_OBJECT (w)->klass)
@@ -1338,17 +1338,7 @@ gtk_widget_unparent (GtkWidget *widget)
if (prev)
prev->next = slist;
else
- {
- /* it is really messy to have this signal disconnection
- * in gtkwidget.c, the resize_widgets invariants should
- * all be taken care off by gtkcontainer.c exclusively.
- */
- if (!slist)
- gtk_signal_disconnect_by_func (GTK_OBJECT (toplevel),
- GTK_SIGNAL_FUNC (gtk_container_clear_resize_widgets),
- NULL);
- GTK_CONTAINER (toplevel)->resize_widgets = slist;
- }
+ GTK_CONTAINER (toplevel)->resize_widgets = slist;
g_slist_free_1 (last);
}
@@ -1436,7 +1426,8 @@ gtk_widget_show (GtkWidget *widget)
if (!GTK_WIDGET_VISIBLE (widget))
{
- gtk_widget_queue_resize (widget);
+ if (!GTK_WIDGET_TOPLEVEL (widget))
+ gtk_widget_queue_resize (widget);
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[SHOW]);
}
}
@@ -1451,7 +1442,9 @@ gtk_widget_real_show (GtkWidget *widget)
{
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
- if (widget->parent && GTK_WIDGET_MAPPED (widget->parent))
+ if (widget->parent &&
+ GTK_WIDGET_MAPPED (widget->parent) &&
+ !GTK_WIDGET_MAPPED (widget))
gtk_widget_map (widget);
}
}
@@ -1517,7 +1510,8 @@ gtk_widget_hide (GtkWidget *widget)
if (GTK_WIDGET_VISIBLE (widget))
{
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[HIDE]);
- gtk_widget_queue_resize (widget);
+ if (!GTK_WIDGET_TOPLEVEL (widget))
+ gtk_widget_queue_resize (widget);
}
}
@@ -1586,8 +1580,8 @@ gtk_widget_hide_all (GtkWidget *widget)
void
gtk_widget_map (GtkWidget *widget)
{
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (GTK_WIDGET_VISIBLE (widget) == TRUE);
if (!GTK_WIDGET_MAPPED (widget))
{
@@ -1740,6 +1734,7 @@ gtk_widget_queue_draw_data (GtkWidget *widget,
GtkDrawData *data;
g_return_if_fail (widget != NULL);
+ g_return_if_fail (!(width < 0 || height < 0) || window == NULL);
if ((width != 0) && (height != 0) && GTK_WIDGET_DRAWABLE (widget))
{
@@ -1765,6 +1760,11 @@ gtk_widget_queue_draw_data (GtkWidget *widget,
data->rect.x = x;
data->rect.y = y;
+ if ((width < 1 && height < 1) ||
+ (width >= widget->allocation.width &&
+ height >= widget->allocation.height))
+ GTK_PRIVATE_SET_FLAG (widget, GTK_FULLDRAW_PENDING);
+
if ((width < 0) || (height < 0))
{
data->rect.width = 0;
@@ -1870,6 +1870,10 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
y -= wy - widget->allocation.y;
gdk_window_get_size (widget->window, &wwidth, &wheight);
+
+ if (x + width <= 0 || y + height <= 0 ||
+ x >= wwidth || y >= wheight)
+ return;
if (x < 0)
{
@@ -1913,6 +1917,7 @@ gtk_widget_redraw_queue_remove (GtkWidget *widget)
NULL);
GTK_PRIVATE_UNSET_FLAG (widget, GTK_REDRAW_PENDING);
+ GTK_PRIVATE_UNSET_FLAG (widget, GTK_FULLDRAW_PENDING);
}
void
@@ -2072,7 +2077,8 @@ gtk_widget_idle_draw (gpointer cb_data)
* flag GTK_REDRAW_PROCESSING or something.
*/
GTK_PRIVATE_UNSET_FLAG (widget, GTK_REDRAW_PENDING);
-
+ GTK_PRIVATE_UNSET_FLAG (widget, GTK_FULLDRAW_PENDING);
+
while (draw_data_list)
{
gboolean full_allocation = FALSE;
@@ -2089,23 +2095,23 @@ gtk_widget_idle_draw (gpointer cb_data)
NULL, NULL);
data->window = NULL;
}
- else
+ else if ((data->rect.width == 0) && (data->rect.height == 0))
+ full_allocation = TRUE;
+
+ if (full_allocation)
{
- if ((data->rect.width == 0) && (data->rect.height == 0))
+ if (GTK_WIDGET_NO_WINDOW (widget))
{
- if (GTK_WIDGET_NO_WINDOW (widget))
- {
- data->rect.x = widget->allocation.x;
- data->rect.y = widget->allocation.y;
- }
- else
- {
- data->rect.x = 0;
- data->rect.y = 0;
- }
- data->rect.width = widget->allocation.width;
- data->rect.height = widget->allocation.height;
+ data->rect.x = widget->allocation.x;
+ data->rect.y = widget->allocation.y;
}
+ else
+ {
+ data->rect.x = 0;
+ data->rect.y = 0;
+ }
+ data->rect.width = widget->allocation.width;
+ data->rect.height = widget->allocation.height;
}
draw_data_list = draw_data_list->next;
@@ -2229,7 +2235,7 @@ gtk_widget_idle_draw (gpointer cb_data)
while (tmp_list)
{
GtkDrawData *data = tmp_list->data;
- if ((data->rect.width != 0) || (data->rect.height != 0))
+ if ((data->rect.width != 0) && (data->rect.height != 0))
gtk_widget_draw (widget, &data->rect);
if (tmp_list->next)
@@ -2261,8 +2267,7 @@ gtk_widget_queue_resize (GtkWidget *widget)
if (GTK_IS_RESIZE_CONTAINER (widget))
gtk_container_clear_resize_widgets (GTK_CONTAINER (widget));
- if (GTK_WIDGET_DRAWABLE (widget))
- gtk_widget_queue_clear (widget);
+ gtk_widget_queue_clear (widget);
if (widget->parent)
gtk_container_queue_resize (GTK_CONTAINER (widget->parent));
@@ -2362,7 +2367,7 @@ gtk_widget_size_request (GtkWidget *widget,
#ifdef G_ENABLE_DEBUG
if (requisition == &widget->requisition)
- g_warning ("gtk_widget_size_request() called on child widget with widget equal\n to widget->requisition. gtk_widget_set_usize() may not work properly.");
+ g_warning ("gtk_widget_size_request() called on child widget with request equal\n to widget->requisition. gtk_widget_set_usize() may not work properly.");
#endif /* G_ENABLE_DEBUG */
gtk_widget_ref (widget);
@@ -2385,8 +2390,8 @@ gtk_widget_size_request (GtkWidget *widget,
*****************************************/
void
-gtk_widget_get_child_requisition (GtkWidget *widget,
- GtkRequisition *requisition)
+gtk_widget_get_child_requisition (GtkWidget *widget,
+ GtkRequisition *requisition)
{
GtkWidgetAuxInfo *aux_info;
@@ -2434,6 +2439,19 @@ gtk_widget_size_allocate (GtkWidget *widget,
if (aux_info->y != -1)
real_allocation.y = aux_info->y;
}
+
+ real_allocation.width = MAX (real_allocation.width, 1);
+ real_allocation.height = MAX (real_allocation.height, 1);
+
+ if (real_allocation.width > 32767 ||
+ real_allocation.height > 32767)
+ {
+ g_warning ("gtk_widget_size_allocate(): attempt to allocate widget with width %d and height %d",
+ real_allocation.width,
+ real_allocation.height);
+ real_allocation.width = MIN (real_allocation.width, 32767);
+ real_allocation.height = MIN (real_allocation.height, 32767);
+ }
if (GTK_WIDGET_NO_WINDOW (widget))
{
@@ -2452,10 +2470,17 @@ gtk_widget_size_allocate (GtkWidget *widget,
needs_draw = TRUE;
}
+ if (GTK_IS_RESIZE_CONTAINER (widget))
+ gtk_container_clear_resize_widgets (GTK_CONTAINER (widget));
+
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[SIZE_ALLOCATE], &real_allocation);
if (needs_draw)
- gtk_widget_queue_draw (widget);
+ {
+ gtk_widget_queue_draw (widget);
+ if (widget->parent && GTK_CONTAINER (widget->parent)->reallocate_redraws)
+ gtk_widget_queue_draw (widget->parent);
+ }
}
static void
@@ -2694,6 +2719,7 @@ gtk_widget_event (GtkWidget *widget,
switch (event->type)
{
+ GtkWidget *parent;
case GDK_NOTHING:
signal_num = -1;
break;
@@ -2767,8 +2793,37 @@ gtk_widget_event (GtkWidget *widget,
break;
case GDK_EXPOSE:
/* there is no sense in providing a widget with bogus expose events.
+ * also we make the optimization to discard expose events for widgets
+ * that have a full redraw pending (given that the event is !send_event,
+ * otherwise we assume we can trust the event).
*/
- if (!event->any.window)
+ if (event->any.send_event)
+ parent = NULL;
+ else if (event->any.window)
+ {
+ parent = widget;
+ while (parent)
+ {
+ if (GTK_WIDGET_FULLDRAW_PENDING (parent))
+ break;
+ parent = parent->parent;
+ }
+ /* <HACK> gnome-dock didn't propagate draws to torn off
+ * children. So don't consider those ancestors.
+ */
+ if (parent)
+ {
+ GdkWindow *parent_window = event->any.window;
+
+ while (parent_window && parent_window != parent->window)
+ parent_window = gdk_window_get_parent (parent_window);
+
+ if (!parent_window)
+ parent = NULL;
+ }
+ /* </HACK> */
+ }
+ if (!event->any.window || parent)
{
gtk_widget_unref (widget);
return TRUE;
@@ -3156,7 +3211,7 @@ gtk_widget_set_name (GtkWidget *widget,
g_free (widget->name);
widget->name = g_strdup (name);
- if (!GTK_WIDGET_USER_STYLE (widget))
+ if (GTK_WIDGET_RC_STYLE (widget))
gtk_widget_set_rc_style (widget);
}
@@ -3461,10 +3516,17 @@ gtk_widget_modify_style (GtkWidget *widget,
old_style = gtk_object_get_data_by_id (GTK_OBJECT (widget), rc_style_key_id);
if (style != old_style)
- gtk_object_set_data_by_id_full (GTK_OBJECT (widget),
- rc_style_key_id,
- style,
- (GtkDestroyNotify)gtk_rc_style_unref);
+ {
+ gtk_rc_style_ref (style);
+
+ gtk_object_set_data_by_id_full (GTK_OBJECT (widget),
+ rc_style_key_id,
+ style,
+ (GtkDestroyNotify)gtk_rc_style_unref);
+ }
+
+ if (GTK_WIDGET_RC_STYLE (widget))
+ gtk_widget_set_rc_style (widget);
}
static void
@@ -3696,18 +3758,16 @@ gtk_widget_set_uposition (GtkWidget *widget,
aux_info = gtk_widget_aux_info_new ();
gtk_object_set_data_by_id (GTK_OBJECT (widget), aux_info_key_id, aux_info);
}
+
+ /* keep this in sync with gtk_window_compute_reposition() */
if (x > -2)
aux_info->x = x;
if (y > -2)
aux_info->y = y;
- if (GTK_WIDGET_REALIZED (widget) && GTK_IS_WINDOW (widget) &&
- (aux_info->x != -1) && (aux_info->y != -1))
- {
- gdk_window_set_hints (widget->window, aux_info->x, aux_info->y, 0, 0, 0, 0, GDK_HINT_POS);
- gdk_window_move (widget->window, aux_info->x, aux_info->y);
- }
+ if (GTK_IS_WINDOW (widget) && (aux_info->x != -1) && (aux_info->y != -1))
+ gtk_window_reposition (GTK_WINDOW (widget), x, y);
if (GTK_WIDGET_VISIBLE (widget) && widget->parent)
gtk_widget_size_allocate (widget, &widget->allocation);
@@ -4400,10 +4460,10 @@ gtk_widget_finalize (GtkObject *object)
static void
gtk_widget_real_map (GtkWidget *widget)
{
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (GTK_WIDGET_REALIZED (widget) == TRUE);
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget))
+ if (!GTK_WIDGET_MAPPED (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@@ -4478,7 +4538,7 @@ gtk_widget_real_unrealize (GtkWidget *widget)
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
- /* printf ("unrealizing %s\n", gtk_type_name (GTK_OBJECT(widget)->klass->type));
+ /* printf ("unrealizing %s\n", gtk_type_name (GTK_OBJECT (widget)->klass->type));
*/
/* We must do unrealize child widget BEFORE container widget.
@@ -4488,9 +4548,9 @@ gtk_widget_real_unrealize (GtkWidget *widget)
*/
if (GTK_IS_CONTAINER (widget))
- gtk_container_foreach (GTK_CONTAINER (widget),
- (GtkCallback) gtk_widget_unrealize,
- NULL);
+ gtk_container_forall (GTK_CONTAINER (widget),
+ (GtkCallback) gtk_widget_unrealize,
+ NULL);
gtk_style_detach (widget->style);
if (!GTK_WIDGET_NO_WINDOW (widget))
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 29ce4afc9..ea0891863 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -36,6 +36,11 @@
#include "gtkbindings.h"
#include "gtkmain.h"
+/* TODO: remove this define and assorted code in 1.3 and fix up the
+ * real culprits.
+ */
+#define FIXME_ZVT_ME_HARDER
+
enum {
SET_FOCUS,
LAST_SIGNAL
@@ -48,17 +53,28 @@ enum {
ARG_ALLOW_SHRINK,
ARG_ALLOW_GROW,
ARG_MODAL,
- ARG_WIN_POS
+ ARG_WIN_POS,
+ ARG_DEFAULT_WIDTH,
+ ARG_DEFAULT_HEIGHT
};
typedef struct {
- GdkGeometry geometry;
- GdkWindowHints mask;
- GtkWidget *widget;
+ GdkGeometry geometry; /* Last set of geometry hints we set */
+ GdkWindowHints flags;
gint width;
gint height;
- gint last_width;
- gint last_height;
+} GtkWindowLastGeometryInfo;
+
+typedef struct {
+ /* Properties that the app has set on the window
+ */
+ GdkGeometry geometry; /* Geometry hints */
+ GdkWindowHints mask;
+ GtkWidget *widget; /* subwidget to which hints apply */
+ gint width; /* Default size */
+ gint height;
+
+ GtkWindowLastGeometryInfo last;
} GtkWindowGeometryInfo;
static void gtk_window_class_init (GtkWindowClass *klass);
@@ -100,9 +116,30 @@ static gint gtk_window_client_event (GtkWidget *widget,
static void gtk_window_check_resize (GtkContainer *container);
static void gtk_window_real_set_focus (GtkWindow *window,
GtkWidget *focus);
+
static void gtk_window_move_resize (GtkWindow *window);
-static void gtk_window_set_hints (GtkWidget *widget,
- GtkRequisition *requisition);
+static gboolean gtk_window_compare_hints (GdkGeometry *geometry_a,
+ guint flags_a,
+ GdkGeometry *geometry_b,
+ guint flags_b);
+static void gtk_window_compute_default_size (GtkWindow *window,
+ guint *width,
+ guint *height);
+static void gtk_window_constrain_size (GtkWindow *window,
+ GdkGeometry *geometry,
+ guint flags,
+ gint width,
+ gint height,
+ gint *new_width,
+ gint *new_height);
+static void gtk_window_compute_hints (GtkWindow *window,
+ GdkGeometry *new_geometry,
+ guint *new_flags);
+static void gtk_window_compute_reposition (GtkWindow *window,
+ gint new_width,
+ gint new_height,
+ gint *x,
+ gint *y);
static void gtk_window_read_rcfiles (GtkWidget *widget,
GdkEventClient *event);
@@ -171,7 +208,9 @@ gtk_window_class_init (GtkWindowClass *klass)
gtk_object_add_arg_type ("GtkWindow::allow_grow", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_GROW);
gtk_object_add_arg_type ("GtkWindow::modal", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_MODAL);
gtk_object_add_arg_type ("GtkWindow::window_position", GTK_TYPE_WINDOW_POSITION, GTK_ARG_READWRITE, ARG_WIN_POS);
-
+ gtk_object_add_arg_type ("GtkWindow::default_width", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_WIDTH);
+ gtk_object_add_arg_type ("GtkWindow::default_height", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_DEFAULT_HEIGHT);
+
window_signals[SET_FOCUS] =
gtk_signal_new ("set_focus",
GTK_RUN_LAST,
@@ -258,15 +297,15 @@ gtk_window_set_arg (GtkObject *object,
break;
case ARG_AUTO_SHRINK:
window->auto_shrink = (GTK_VALUE_BOOL (*arg) != FALSE);
- gtk_window_set_hints (GTK_WIDGET (window), &GTK_WIDGET (window)->requisition);
+ gtk_widget_queue_resize (GTK_WIDGET (window));
break;
case ARG_ALLOW_SHRINK:
window->allow_shrink = (GTK_VALUE_BOOL (*arg) != FALSE);
- gtk_window_set_hints (GTK_WIDGET (window), &GTK_WIDGET (window)->requisition);
+ gtk_widget_queue_resize (GTK_WIDGET (window));
break;
case ARG_ALLOW_GROW:
window->allow_grow = (GTK_VALUE_BOOL (*arg) != FALSE);
- gtk_window_set_hints (GTK_WIDGET (window), &GTK_WIDGET (window)->requisition);
+ gtk_widget_queue_resize (GTK_WIDGET (window));
break;
case ARG_MODAL:
gtk_window_set_modal (window, GTK_VALUE_BOOL (*arg));
@@ -274,6 +313,12 @@ gtk_window_set_arg (GtkObject *object,
case ARG_WIN_POS:
gtk_window_set_position (window, GTK_VALUE_ENUM (*arg));
break;
+ case ARG_DEFAULT_WIDTH:
+ gtk_window_set_default_size (window, GTK_VALUE_INT (*arg), -2);
+ break;
+ case ARG_DEFAULT_HEIGHT:
+ gtk_window_set_default_size (window, -2, GTK_VALUE_INT (*arg));
+ break;
default:
break;
}
@@ -290,6 +335,7 @@ gtk_window_get_arg (GtkObject *object,
switch (arg_id)
{
+ GtkWindowGeometryInfo *info;
case ARG_TYPE:
GTK_VALUE_ENUM (*arg) = window->type;
break;
@@ -311,6 +357,20 @@ gtk_window_get_arg (GtkObject *object,
case ARG_WIN_POS:
GTK_VALUE_ENUM (*arg) = window->position;
break;
+ case ARG_DEFAULT_WIDTH:
+ info = gtk_window_get_geometry_info (window, FALSE);
+ if (!info)
+ GTK_VALUE_INT (*arg) = -1;
+ else
+ GTK_VALUE_INT (*arg) = info->width;
+ break;
+ case ARG_DEFAULT_HEIGHT:
+ info = gtk_window_get_geometry_info (window, FALSE);
+ if (!info)
+ GTK_VALUE_INT (*arg) = -1;
+ else
+ GTK_VALUE_INT (*arg) = info->height;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
@@ -322,7 +382,9 @@ gtk_window_new (GtkWindowType type)
{
GtkWindow *window;
- window = gtk_type_new (gtk_window_get_type ());
+ g_return_val_if_fail (type >= GTK_WINDOW_TOPLEVEL && type <= GTK_WINDOW_POPUP, NULL);
+
+ window = gtk_type_new (GTK_TYPE_WINDOW);
window->type = type;
@@ -420,7 +482,7 @@ gtk_window_set_policy (GtkWindow *window,
window->allow_grow = (allow_grow != FALSE);
window->auto_shrink = (auto_shrink != FALSE);
- gtk_window_set_hints (GTK_WIDGET (window), &GTK_WIDGET (window)->requisition);
+ gtk_widget_queue_resize (GTK_WIDGET (window));
}
void
@@ -463,7 +525,8 @@ gtk_window_activate_focus (GtkWindow *window)
if (window->focus_widget)
{
- gtk_widget_activate (window->focus_widget);
+ if (GTK_WIDGET_IS_SENSITIVE (window->focus_widget))
+ gtk_widget_activate (window->focus_widget);
return TRUE;
}
@@ -476,7 +539,7 @@ gtk_window_activate_default (GtkWindow *window)
g_return_val_if_fail (window != NULL, FALSE);
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
- if (window->default_widget)
+ if (window->default_widget && GTK_WIDGET_IS_SENSITIVE (window->default_widget))
{
gtk_widget_activate (window->default_widget);
return TRUE;
@@ -549,6 +612,34 @@ gtk_window_remove_embedded_xid (GtkWindow *window, guint xid)
(GtkDestroyNotify) g_list_free : NULL);
}
+void
+gtk_window_reposition (GtkWindow *window,
+ gint x,
+ gint y)
+{
+ GtkWindowGeometryInfo *info;
+
+ g_return_if_fail (window != NULL);
+ g_return_if_fail (GTK_IS_WINDOW (window));
+
+ /* keep this in sync with gtk_window_compute_reposition()
+ */
+ if (GTK_WIDGET_REALIZED (window))
+ {
+ info = gtk_window_get_geometry_info (window, TRUE);
+
+ if (!(info->last.flags & GDK_HINT_POS))
+ {
+ info->last.flags |= GDK_HINT_POS;
+ gdk_window_set_geometry_hints (GTK_WIDGET (window)->window,
+ &info->last.geometry,
+ info->last.flags);
+ }
+
+ gdk_window_move (GTK_WIDGET (window)->window, x, y);
+ }
+}
+
static void
gtk_window_shutdown (GtkObject *object)
{
@@ -609,13 +700,13 @@ gtk_window_set_transient_for (GtkWindow *window,
if (window->transient_parent)
{
- gtk_window_unset_transient_for (window);
-
if (GTK_WIDGET_REALIZED (window) &&
GTK_WIDGET_REALIZED (window->transient_parent) &&
(!parent || !GTK_WIDGET_REALIZED (parent)))
gtk_window_transient_parent_unrealized (GTK_WIDGET (window->transient_parent),
GTK_WIDGET (window));
+
+ gtk_window_unset_transient_for (window);
}
window->transient_parent = parent;
@@ -649,8 +740,9 @@ gtk_window_geometry_destroy (GtkWindowGeometryInfo *info)
g_free (info);
}
-static GtkWindowGeometryInfo *
-gtk_window_get_geometry_info (GtkWindow *window, gboolean create)
+static GtkWindowGeometryInfo*
+gtk_window_get_geometry_info (GtkWindow *window,
+ gboolean create)
{
GtkWindowGeometryInfo *info;
@@ -658,17 +750,16 @@ gtk_window_get_geometry_info (GtkWindow *window, gboolean create)
if (!info && create)
{
- info = g_new (GtkWindowGeometryInfo, 1);
+ info = g_new0 (GtkWindowGeometryInfo, 1);
- info->width = - 1;
- info->height = -1;
- info->last_width = -1;
- info->last_height = -1;
+ info->width = 0;
+ info->height = 0;
+ info->last.width = -1;
+ info->last.height = -1;
info->widget = NULL;
info->mask = 0;
gtk_object_set_data_full (GTK_OBJECT (window),
-
"gtk-window-geometry",
info,
(GtkDestroyNotify) gtk_window_geometry_destroy);
@@ -704,6 +795,8 @@ gtk_window_set_geometry_hints (GtkWindow *window,
info->geometry = *geometry;
info->mask = geom_mask;
+
+ gtk_widget_queue_resize (GTK_WIDGET (window));
}
void
@@ -713,12 +806,16 @@ gtk_window_set_default_size (GtkWindow *window,
{
GtkWindowGeometryInfo *info;
- g_return_if_fail (window != NULL);
+ g_return_if_fail (GTK_IS_WINDOW (window));
info = gtk_window_get_geometry_info (window, TRUE);
- info->width = width;
- info->height = height;
+ if (width >= 0)
+ info->width = width;
+ if (height >= 0)
+ info->height = height;
+
+ gtk_widget_queue_resize (GTK_WIDGET (window));
}
static void
@@ -758,14 +855,53 @@ gtk_window_finalize (GtkObject *object)
static void
gtk_window_show (GtkWidget *widget)
{
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WINDOW (widget));
+ GtkWindow *window = GTK_WINDOW (widget);
+ GtkContainer *container = GTK_CONTAINER (window);
+ gboolean need_resize;
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
- gtk_container_check_resize (GTK_CONTAINER (widget));
+
+ need_resize = container->need_resize || !GTK_WIDGET_REALIZED (widget);
+ container->need_resize = FALSE;
+
+ if (need_resize)
+ {
+ GtkWindowGeometryInfo *info = gtk_window_get_geometry_info (window, TRUE);
+ GtkAllocation allocation = { 0, 0 };
+ GdkGeometry new_geometry;
+ guint width, height, new_flags;
+
+ /* determine default size to initially show the window with */
+ gtk_widget_size_request (widget, NULL);
+ gtk_window_compute_default_size (window, &width, &height);
+
+ /* save away the last default size for later comparisions */
+ info->last.width = width;
+ info->last.height = height;
+
+ /* constrain size to geometry */
+ gtk_window_compute_hints (window, &new_geometry, &new_flags);
+ gtk_window_constrain_size (window,
+ &new_geometry, new_flags,
+ width, height,
+ &width, &height);
+
+ /* and allocate the window */
+ allocation.width = width;
+ allocation.height = height;
+ gtk_widget_size_allocate (widget, &allocation);
+
+ if (GTK_WIDGET_REALIZED (widget))
+ gdk_window_resize (widget->window, width, height);
+ else
+ gtk_widget_realize (widget);
+ }
+
+ gtk_container_check_resize (container);
+
gtk_widget_map (widget);
- if (GTK_WINDOW (widget)->modal)
+ if (window->modal)
gtk_grab_add (widget);
}
@@ -803,7 +939,6 @@ gtk_window_map (GtkWidget *widget)
!GTK_WIDGET_MAPPED (window->bin.child))
gtk_widget_map (window->bin.child);
- gtk_window_set_hints (widget, &widget->requisition);
gdk_window_show (widget->window);
}
@@ -820,6 +955,8 @@ gtk_window_unmap (GtkWidget *widget)
window = GTK_WINDOW (widget);
window->use_uposition = TRUE;
+ window->resize_count = 0;
+ window->handling_resize = FALSE;
}
static void
@@ -829,11 +966,34 @@ gtk_window_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WINDOW (widget));
+
+ window = GTK_WINDOW (widget);
+
+ /* ensure widget tree is properly size allocated */
+ if (widget->allocation.x == -1 &&
+ widget->allocation.y == -1 &&
+ widget->allocation.width == 1 &&
+ widget->allocation.height == 1)
+ {
+ GtkRequisition requisition;
+ GtkAllocation allocation = { 0, 0, 200, 200 };
+
+ gtk_widget_size_request (widget, &requisition);
+ if (requisition.width || requisition.height)
+ {
+ /* non-empty window */
+ allocation.width = requisition.width;
+ allocation.height = requisition.height;
+ }
+ gtk_widget_size_allocate (widget, &allocation);
+
+ gtk_container_queue_resize (GTK_CONTAINER (widget));
+
+ g_return_if_fail (!GTK_WIDGET_REALIZED (widget));
+ }
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
- window = GTK_WINDOW (widget);
switch (window->type)
{
@@ -907,11 +1067,6 @@ gtk_window_size_request (GtkWidget *widget,
requisition->width += child_requisition.width;
requisition->height += child_requisition.height;
}
- else
- {
- if (!GTK_WIDGET_VISIBLE (window))
- GTK_CONTAINER (window)->need_resize = TRUE;
- }
}
static void
@@ -932,8 +1087,10 @@ gtk_window_size_allocate (GtkWidget *widget,
{
child_allocation.x = GTK_CONTAINER (window)->border_width;
child_allocation.y = GTK_CONTAINER (window)->border_width;
- child_allocation.width = allocation->width - child_allocation.x * 2;
- child_allocation.height = allocation->height - child_allocation.y * 2;
+ child_allocation.width =
+ MAX (1, (gint)allocation->width - child_allocation.x * 2);
+ child_allocation.height =
+ MAX (1, (gint)allocation->height - child_allocation.y * 2);
gtk_widget_size_allocate (window->bin.child, &child_allocation);
}
@@ -944,8 +1101,6 @@ gtk_window_configure_event (GtkWidget *widget,
GdkEventConfigure *event)
{
GtkWindow *window;
- GtkAllocation allocation;
- gboolean need_expose = FALSE;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
@@ -953,59 +1108,43 @@ gtk_window_configure_event (GtkWidget *widget,
window = GTK_WINDOW (widget);
- /* If the window was merely moved, do nothing */
- if ((widget->allocation.width == event->width) &&
- (widget->allocation.height == event->height))
+ /* we got a configure event specifying the new window size and position,
+ * in principle we have to distinguish 4 cases here:
+ * 1) the size didn't change and resize_count == 0
+ * -> the window was merely moved (sometimes not even that)
+ * 2) the size didn't change and resize_count > 0
+ * -> we requested a new size, but didn't get it
+ * 3) the size changed and resize_count > 0
+ * -> we asked for a new size and we got one
+ * 4) the size changed and resize_count == 0
+ * -> we got resized from outside the toolkit, and have to
+ * accept that size since we don't want to fight neither the
+ * window manager nor the user
+ * in the three latter cases we have to reallocate the widget tree,
+ * which happens in gtk_window_move_resize(), so we set a flag for
+ * that function and assign the new size. if resize_count > 1,
+ * we simply do nothing and wait for more configure events.
+ */
+
+ if (window->resize_count > 0 ||
+ widget->allocation.width != event->width ||
+ widget->allocation.height != event->height)
{
- if (window->resize_count == 0) /* The window was merely moved */
- return FALSE;
- else
+ if (window->resize_count > 0)
+ window->resize_count -= 1;
+
+ if (window->resize_count == 0)
{
- /* We asked for a new size, which was rejected, so the
- * WM sent us a synthetic configure event. We won't
- * get the expose event we would normally get (since
- * we have ForgetGravity), so we need to fake it.
- */
- need_expose = TRUE;
+ window->handling_resize = TRUE;
+
+ widget->allocation.width = event->width;
+ widget->allocation.height = event->height;
+
+ gtk_widget_queue_resize (widget);
}
}
-
-
- window->handling_resize = TRUE;
-
- allocation.x = 0;
- allocation.y = 0;
- allocation.width = event->width;
- allocation.height = event->height;
-
- gtk_widget_size_allocate (widget, &allocation);
-
- if (window->bin.child &&
- GTK_WIDGET_VISIBLE (window->bin.child) &&
- !GTK_WIDGET_MAPPED (window->bin.child))
- gtk_widget_map (window->bin.child);
-
- if (window->resize_count > 0)
- window->resize_count -= 1;
-
- if (need_expose)
- {
- GdkEvent temp_event;
- temp_event.type = GDK_EXPOSE;
- temp_event.expose.window = widget->window;
- temp_event.expose.send_event = TRUE;
- temp_event.expose.area.x = 0;
- temp_event.expose.area.y = 0;
- temp_event.expose.area.width = event->width;
- temp_event.expose.area.height = event->height;
- temp_event.expose.count = 0;
-
- gtk_widget_event (widget, &temp_event);
- }
- window->handling_resize = FALSE;
-
- return FALSE;
+ return TRUE;
}
static gint
@@ -1024,7 +1163,9 @@ gtk_window_key_press_event (GtkWidget *widget,
handled = FALSE;
- if (window->focus_widget && GTK_WIDGET_IS_SENSITIVE (window->focus_widget))
+ if (window->focus_widget &&
+ window->focus_widget != widget &&
+ GTK_WIDGET_IS_SENSITIVE (window->focus_widget))
{
handled = gtk_widget_event (window->focus_widget, (GdkEvent*) event);
}
@@ -1039,22 +1180,23 @@ gtk_window_key_press_event (GtkWidget *widget,
case GDK_space:
if (window->focus_widget)
{
- gtk_widget_activate (window->focus_widget);
+ if (GTK_WIDGET_IS_SENSITIVE (window->focus_widget))
+ gtk_widget_activate (window->focus_widget);
handled = TRUE;
}
break;
case GDK_Return:
case GDK_KP_Enter:
- if (window->default_widget &&
- (!window->focus_widget ||
- !GTK_WIDGET_RECEIVES_DEFAULT (window->focus_widget)))
+ if (window->default_widget && GTK_WIDGET_IS_SENSITIVE (window->default_widget) &&
+ (!window->focus_widget || !GTK_WIDGET_RECEIVES_DEFAULT (window->focus_widget)))
{
gtk_widget_activate (window->default_widget);
handled = TRUE;
}
else if (window->focus_widget)
{
- gtk_widget_activate (window->focus_widget);
+ if (GTK_WIDGET_IS_SENSITIVE (window->focus_widget))
+ gtk_widget_activate (window->focus_widget);
handled = TRUE;
}
break;
@@ -1062,20 +1204,28 @@ gtk_window_key_press_event (GtkWidget *widget,
case GDK_Down:
case GDK_Left:
case GDK_Right:
+ case GDK_KP_Up:
+ case GDK_KP_Down:
+ case GDK_KP_Left:
+ case GDK_KP_Right:
case GDK_Tab:
case GDK_ISO_Left_Tab:
switch (event->keyval)
{
case GDK_Up:
+ case GDK_KP_Up:
direction = GTK_DIR_UP;
break;
case GDK_Down:
+ case GDK_KP_Down:
direction = GTK_DIR_DOWN;
break;
case GDK_Left:
+ case GDK_KP_Left:
direction = GTK_DIR_LEFT;
break;
case GDK_Right:
+ case GDK_KP_Right:
direction = GTK_DIR_RIGHT;
break;
case GDK_Tab:
@@ -1118,7 +1268,9 @@ gtk_window_key_release_event (GtkWidget *widget,
window = GTK_WINDOW (widget);
handled = FALSE;
- if (window->focus_widget && GTK_WIDGET_SENSITIVE (window->focus_widget))
+ if (window->focus_widget &&
+ window->focus_widget != widget &&
+ GTK_WIDGET_SENSITIVE (window->focus_widget))
{
handled = gtk_widget_event (window->focus_widget, (GdkEvent*) event);
}
@@ -1170,7 +1322,9 @@ gtk_window_focus_in_event (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (widget))
{
window = GTK_WINDOW (widget);
- if (window->focus_widget && !GTK_WIDGET_HAS_FOCUS (window->focus_widget))
+ if (window->focus_widget &&
+ window->focus_widget != widget &&
+ !GTK_WIDGET_HAS_FOCUS (window->focus_widget))
{
fevent.type = GDK_FOCUS_CHANGE;
fevent.window = window->focus_widget->window;
@@ -1195,7 +1349,9 @@ gtk_window_focus_out_event (GtkWidget *widget,
g_return_val_if_fail (event != NULL, FALSE);
window = GTK_WINDOW (widget);
- if (window->focus_widget && GTK_WIDGET_HAS_FOCUS (window->focus_widget))
+ if (window->focus_widget &&
+ window->focus_widget != widget &&
+ GTK_WIDGET_HAS_FOCUS (window->focus_widget))
{
fevent.type = GDK_FOCUS_CHANGE;
fevent.window = window->focus_widget->window;
@@ -1279,236 +1435,9 @@ gtk_window_check_resize (GtkContainer *container)
g_return_if_fail (GTK_IS_WINDOW (container));
window = GTK_WINDOW (container);
- if (!window->handling_resize)
- {
- if (GTK_WIDGET_VISIBLE (container))
- gtk_window_move_resize (window);
- else
- GTK_CONTAINER (window)->need_resize = TRUE;
- }
-}
-
-/* FIXME: we leave container->resize_widgets set under some
- circumstances ? */
-static void
-gtk_window_move_resize (GtkWindow *window)
-{
- GtkWidget *widget;
- GtkWindowGeometryInfo *info;
- GtkRequisition requisition;
- GtkContainer *container;
- gint x, y;
- gint width, height;
- gint new_width, new_height;
- gint min_width, min_height;
- gint screen_width;
- gint screen_height;
- gboolean needed_resize;
- gboolean size_changed;
-
- g_return_if_fail (window != NULL);
- g_return_if_fail (GTK_IS_WINDOW (window));
-
- widget = GTK_WIDGET (window);
- container = GTK_CONTAINER (widget);
-
- info = gtk_window_get_geometry_info (window, FALSE);
-
- /* Remember old size, to know if we have to reset hints */
- if (info && (info->last_width > 0))
- width = info->last_width;
- else
- width = widget->requisition.width;
-
- if (info && (info->last_height > 0))
- height = info->last_height;
- else
- height = widget->requisition.height;
-
- size_changed = FALSE;
-
- gtk_widget_size_request (widget, &requisition);
- size_changed |= requisition.width != widget->requisition.width;
- size_changed |= requisition.height != widget->requisition.height;
- widget->requisition = requisition;
-
- /* Figure out the new desired size */
-
- if (info && info->width > 0)
- {
- size_changed |= width != info->last_width;
- info->last_width = width;
- new_width = info->width;
- }
- else
- {
- size_changed |= width != widget->requisition.width;
- new_width = widget->requisition.width;
- }
-
- if (info && info->height > 0)
- {
- size_changed |= height != info->last_height;
- info->last_height = height;
- new_height = info->height;
- }
- else
- {
- size_changed |= height != widget->requisition.height;
- new_height = widget->requisition.height;
- }
-
- /* Figure out the new minimum size */
-
- if (info && (info->mask & (GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE)))
- {
- if (info->mask && GDK_HINT_MIN_SIZE)
- {
- min_width = info->geometry.min_width;
- min_height = info->geometry.min_height;
- }
- else
- {
- min_width = info->geometry.base_width;
- min_height = info->geometry.base_height;
- }
-
- if (info->widget)
- {
- min_width += widget->requisition.width - info->widget->requisition.width;
- min_height += widget->requisition.height - info->widget->requisition.height;
- }
- }
- else
- {
- min_width = widget->requisition.width;
- min_height = widget->requisition.height;
- }
-
- if (size_changed)
- {
- gboolean saved_use_upos;
-
- saved_use_upos = window->use_uposition;
- gtk_window_set_hints (widget, &widget->requisition);
- window->use_uposition = saved_use_upos;
- }
-
- x = -1;
- y = -1;
-
- if (window->use_uposition)
- switch (window->position)
- {
- case GTK_WIN_POS_CENTER:
- x = (gdk_screen_width () - new_width) / 2;
- y = (gdk_screen_height () - new_height) / 2;
- gtk_widget_set_uposition (widget, x, y);
- break;
- case GTK_WIN_POS_MOUSE:
- gdk_window_get_pointer (NULL, &x, &y, NULL);
-
- x -= new_width / 2;
- y -= new_height / 2;
-
- screen_width = gdk_screen_width ();
- screen_height = gdk_screen_height ();
-
- if (x < 0)
- x = 0;
- else if (x > (screen_width - new_width))
- x = screen_width - new_width;
-
- if (y < 0)
- y = 0;
- else if (y > (screen_height - new_height))
- y = screen_height - new_height;
-
- gtk_widget_set_uposition (widget, x, y);
- break;
- }
-
- /* Now, do the resizing */
-
- needed_resize = container->need_resize;
- container->need_resize = FALSE;
-
- if ((new_width == 0) || (new_height == 0))
- {
- new_width = 200;
- new_height = 200;
- }
-
- if (!GTK_WIDGET_REALIZED (window))
- {
- GtkAllocation allocation;
-
- allocation.x = 0;
- allocation.y = 0;
- allocation.width = new_width;
- allocation.height = new_height;
-
- gtk_widget_size_allocate (widget, &allocation);
-
- return;
- }
-
- gdk_window_get_geometry (widget->window, NULL, NULL, &width, &height, NULL);
-
- /* As an optimization, we don't try to get a new size from the
- * window manager if we asked for the same size last time and
- * didn't get it */
-
- if (size_changed &&
- (((window->auto_shrink &&
- ((width != new_width) ||
- (height != new_height)))) ||
- ((width < min_width) ||
- (height < min_height))))
- {
- window->resize_count += 1;
-
- if (!window->auto_shrink)
- {
- new_width = MAX(width, min_width);
- new_height = MAX(height, min_height);
- }
-
- if ((x != -1) && (y != -1))
- gdk_window_move_resize (widget->window, x, y,
- new_width,
- new_height);
- else
- gdk_window_resize (widget->window,
- new_width,
- new_height);
- }
- else if (needed_resize)
- {
- /* The windows contents changed size while it was not
- * visible, so reallocate everything, since we didn't
- * keep track of what changed
- */
- GtkAllocation allocation;
-
- allocation.x = 0;
- allocation.y = 0;
- allocation.width = new_width;
- allocation.height = new_height;
-
- gtk_widget_size_allocate (widget, &allocation);
- gdk_window_resize (widget->window,
- new_width,
- new_height);
- }
- else
- {
- if ((x != -1) && (y != -1))
- gdk_window_move (widget->window, x, y);
-
- gtk_container_resize_children (GTK_CONTAINER (window));
- }
+ if (GTK_WIDGET_VISIBLE (container))
+ gtk_window_move_resize (window);
}
static void
@@ -1579,105 +1508,591 @@ gtk_window_real_set_focus (GtkWindow *window,
gtk_widget_queue_draw (window->default_widget);
}
+/*********************************
+ * Functions related to resizing *
+ *********************************/
+
static void
-gtk_window_set_hints (GtkWidget *widget,
- GtkRequisition *requisition)
+gtk_window_move_resize (GtkWindow *window)
{
- GtkWindow *window;
- GtkWidgetAuxInfo *aux_info;
- GtkWindowGeometryInfo *geometry_info;
+ GtkWidget *widget;
+ GtkContainer *container;
+ GtkWindowGeometryInfo *info;
+ GtkWindowLastGeometryInfo saved_last_info;
GdkGeometry new_geometry;
- gint flags;
- gint ux, uy;
- gint extra_width = 0;
- gint extra_height = 0;
+ guint new_flags;
+ gint x, y;
+ gint width, height;
+ gint new_width, new_height;
+ gboolean default_size_changed = FALSE;
+ gboolean hints_changed = FALSE;
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WINDOW (widget));
- g_return_if_fail (requisition != NULL);
+ g_return_if_fail (GTK_IS_WINDOW (window));
+ g_return_if_fail (GTK_WIDGET_REALIZED (window));
- if (GTK_WIDGET_REALIZED (widget))
+ widget = GTK_WIDGET (window);
+ container = GTK_CONTAINER (widget);
+ info = gtk_window_get_geometry_info (window, TRUE);
+ saved_last_info = info->last;
+
+ gtk_widget_size_request (widget, NULL);
+ gtk_window_compute_default_size (window, &new_width, &new_height);
+
+ if (info->last.width < 0 ||
+ info->last.width != new_width ||
+ info->last.height != new_height)
{
- window = GTK_WINDOW (widget);
+ default_size_changed = TRUE;
+ info->last.width = new_width;
+ info->last.height = new_height;
- geometry_info = gtk_window_get_geometry_info (GTK_WINDOW (widget), FALSE);
+ /* We need to force a reposition in this case
+ */
+ if (window->position == GTK_WIN_POS_CENTER_ALWAYS)
+ window->use_uposition = TRUE;
+ }
+
+ /* Compute new set of hints for the window
+ */
+ gtk_window_compute_hints (window, &new_geometry, &new_flags);
+ if (!gtk_window_compare_hints (&info->last.geometry, info->last.flags,
+ &new_geometry, new_flags))
+ {
+ hints_changed = TRUE;
+ info->last.geometry = new_geometry;
+ info->last.flags = new_flags;
+ }
+
+ /* From the default size and the allocation, figure out the size
+ * the window should be.
+ */
+ if (!default_size_changed ||
+ (!window->auto_shrink &&
+ new_width <= widget->allocation.width &&
+ new_height <= widget->allocation.height))
+ {
+ new_width = widget->allocation.width;
+ new_height = widget->allocation.height;
+ }
+
+ /* constrain the window size to the specified geometry */
+ gtk_window_constrain_size (window,
+ &new_geometry, new_flags,
+ new_width, new_height,
+ &new_width, &new_height);
+
+ /* compute new window position if a move is required
+ */
+ gtk_window_compute_reposition (window, new_width, new_height, &x, &y);
+ if (x != 1 && y != -1 && !(new_flags & GDK_HINT_POS))
+ {
+ new_flags |= GDK_HINT_POS;
+ hints_changed = TRUE;
+ }
- if (geometry_info)
+
+ /* handle actual resizing:
+ * - handle reallocations due to configure events
+ * - figure whether we need to request a new window size
+ * - handle simple resizes within our widget tree
+ * - reposition window if neccessary
+ */
+ width = widget->allocation.width;
+ height = widget->allocation.height;
+
+ if (window->handling_resize)
+ {
+ GtkAllocation allocation;
+
+ /* if we are just responding to a configure event, which
+ * might be due to a resize by the window manager, the
+ * user, or a response to a resizing request we made
+ * earlier, we go ahead, allocate the new size and we're done
+ * (see gtk_window_configure_event() for more details).
+ */
+
+ window->handling_resize = FALSE;
+
+ allocation = widget->allocation;
+
+ gtk_widget_size_allocate (widget, &allocation);
+ gtk_widget_queue_draw (widget);
+
+#ifdef FIXME_ZVT_ME_HARDER
+ if ((default_size_changed || hints_changed) && (width != new_width || height != new_height))
{
- flags = geometry_info->mask;
- new_geometry = geometry_info->geometry;
+ /* We could be here for two reasons
+ * 1) We coincidentally got a resize while handling
+ * another resize.
+ * 2) Our computation of default_size_changed was completely
+ * screwed up, probably because one of our children
+ * is broken (i.e. changes requisition during
+ * size allocation). It's probably a zvt widget.
+ *
+ * For 1), we could just go ahead and ask for the
+ * new size right now, but doing that for 2)
+ * might well be fighting the user (and can even
+ * trigger a loop). Since we really don't want to
+ * do that, we requeue a resize in hopes that
+ * by the time it gets handled, the child has seen
+ * the light and is willing to go along with the
+ * new size. (this happens for the zvt widget, since
+ * the size_allocate() above will have stored the
+ * requisition corresponding to the new size in the
+ * zvt widget)
+ *
+ * This doesn't buy us anything for 1), but it shouldn't
+ * hurt us too badly, since it is what would have
+ * happened if we had gotten the configure event before
+ * the new size had been set.
+ */
+
+ if (x != -1 && y != -1)
+ gdk_window_move (widget->window, x, y);
- if (geometry_info->widget)
- {
- extra_width = requisition->width - geometry_info->widget->requisition.width;
- extra_height = requisition->height - geometry_info->widget->requisition.height;
- }
+ /* we have to preserve the values and flags that are used
+ * for computation of default_size_changed and hints_changed
+ */
+
+ info->last = saved_last_info;
+
+ gtk_widget_queue_resize (widget);
+
+ return;
}
+#endif /* FIXME_ZVT_ME_HARDER */
+ }
+
+ /* Now set hints if necessary
+ */
+ if (hints_changed)
+ gdk_window_set_geometry_hints (widget->window,
+ &new_geometry,
+ new_flags);
+
+ if ((default_size_changed || hints_changed) &&
+ (width != new_width || height != new_height))
+ {
+ /* given that (width != new_width || height != new_height), we are in one
+ * of the following situations:
+ *
+ * default_size_changed
+ * our requisition has changed and we need a different window size,
+ * so we request it from the window manager.
+ *
+ * !default_size_changed
+ * the window manager wouldn't assign us the size we requested, in this
+ * case we don't try to request a new size with every resize.
+ *
+ * !default_size_changed && hints_changed
+ * the window manager rejects our size, but we have just changed the
+ * window manager hints, so there's a certain chance our request will
+ * be honoured this time, so we try again.
+ */
+
+ /* request a new window size */
+ if (x != -1 && y != -1)
+ gdk_window_move_resize (GTK_WIDGET (window)->window, x, y, new_width, new_height);
else
- flags = 0;
+ gdk_window_resize (GTK_WIDGET (window)->window, new_width, new_height);
+ window->resize_count += 1;
- ux = 0;
- uy = 0;
+ /* we are now awaiting the new configure event in response to our
+ * resizing request. the configure event will cause a new resize
+ * with ->handling_resize=TRUE.
+ * until then, we want to
+ * - discard expose events
+ * - coalesce resizes for our children
+ * - defer any window resizes until the configure event arrived
+ * to achive this, we queue a resize for the window, but remove its
+ * resizing handler, so resizing will not be handled from the next
+ * idle handler but when the configure event arrives.
+ *
+ * FIXME: we should also dequeue the pending redraws here, since
+ * we handle those ourselves in ->handling_resize==TRUE.
+ */
+ gtk_widget_queue_resize (GTK_WIDGET (container));
+ if (container->resize_mode == GTK_RESIZE_QUEUE)
+ gtk_container_dequeue_resize_handler (container);
+ }
+ else
+ {
+ if (x != -1 && y != -1)
+ gdk_window_move (widget->window, x, y);
- aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
- if (aux_info && (aux_info->x != -1) && (aux_info->y != -1))
+ if (container->resize_widgets)
+ gtk_container_resize_children (GTK_CONTAINER (window));
+ }
+}
+
+/* Compare two sets of Geometry hints for equality.
+ */
+static gboolean
+gtk_window_compare_hints (GdkGeometry *geometry_a,
+ guint flags_a,
+ GdkGeometry *geometry_b,
+ guint flags_b)
+{
+ if (flags_a != flags_b)
+ return FALSE;
+
+ if ((flags_a & GDK_HINT_MIN_SIZE) &&
+ (geometry_a->min_width != geometry_b->min_width ||
+ geometry_a->min_height != geometry_b->min_height))
+ return FALSE;
+
+ if ((flags_a & GDK_HINT_MAX_SIZE) &&
+ (geometry_a->max_width != geometry_b->max_width ||
+ geometry_a->max_height != geometry_b->max_height))
+ return FALSE;
+
+ if ((flags_a & GDK_HINT_BASE_SIZE) &&
+ (geometry_a->base_width != geometry_b->base_width ||
+ geometry_a->base_height != geometry_b->base_height))
+ return FALSE;
+
+ if ((flags_a & GDK_HINT_ASPECT) &&
+ (geometry_a->min_aspect != geometry_b->min_aspect ||
+ geometry_a->max_aspect != geometry_b->max_aspect))
+ return FALSE;
+
+ if ((flags_a & GDK_HINT_RESIZE_INC) &&
+ (geometry_a->width_inc != geometry_b->width_inc ||
+ geometry_a->height_inc != geometry_b->height_inc))
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Compute the default_size for a window. The result will
+ * be stored in *width and *height. The default size is
+ * the size the window should have when initially mapped.
+ * This routine does not attempt to constrain the size
+ * to obey the geometry hints - that must be done elsewhere.
+ */
+static void
+gtk_window_compute_default_size (GtkWindow *window,
+ guint *width,
+ guint *height)
+{
+ GtkRequisition requisition;
+ GtkWindowGeometryInfo *info;
+
+ gtk_widget_get_child_requisition (GTK_WIDGET (window), &requisition);
+ *width = requisition.width;
+ *height = requisition.height;
+
+ info = gtk_window_get_geometry_info (window, FALSE);
+
+ if (*width == 0 && *height == 0)
+ {
+ /* empty window */
+ *width = 200;
+ *height = 200;
+ }
+
+ if (info)
+ {
+ *width = info->width > 0 ? info->width : *width;
+ *height = info->height > 0 ? info->height : *height;
+ }
+}
+
+/* Constrain a window size to obey the hints passed in geometry
+ * and flags. The result will be stored in *new_width and *new_height
+ *
+ * This routine is partially borrowed from fvwm.
+ *
+ * Copyright 1993, Robert Nation
+ * You may use this code for any purpose, as long as the original
+ * copyright remains in the source code and all documentation
+ *
+ * which in turn borrows parts of the algorithm from uwm
+ */
+static void
+gtk_window_constrain_size (GtkWindow *window,
+ GdkGeometry *geometry,
+ guint flags,
+ gint width,
+ gint height,
+ gint *new_width,
+ gint *new_height)
+{
+ gint min_width = 0;
+ gint min_height = 0;
+ gint base_width = 0;
+ gint base_height = 0;
+ gint xinc = 1;
+ gint yinc = 1;
+ gint max_width = G_MAXINT;
+ gint max_height = G_MAXINT;
+
+#define FLOOR(value, base) ( ((gint) ((value) / (base))) * (base) )
+
+ if ((flags & GDK_HINT_BASE_SIZE) && (flags & GDK_HINT_MIN_SIZE))
+ {
+ base_width = geometry->base_width;
+ base_height = geometry->base_height;
+ min_width = geometry->min_width;
+ min_height = geometry->min_height;
+ }
+ else if (flags & GDK_HINT_BASE_SIZE)
+ {
+ base_width = geometry->base_width;
+ base_height = geometry->base_height;
+ min_width = geometry->base_width;
+ min_height = geometry->base_height;
+ }
+ else if (flags & GDK_HINT_MIN_SIZE)
+ {
+ base_width = geometry->min_width;
+ base_height = geometry->min_height;
+ min_width = geometry->min_width;
+ min_height = geometry->min_height;
+ }
+
+ if (flags & GDK_HINT_MAX_SIZE)
+ {
+ max_width = geometry->max_width ;
+ max_height = geometry->max_height;
+ }
+
+ if (flags & GDK_HINT_RESIZE_INC)
+ {
+ xinc = MAX (xinc, geometry->width_inc);
+ yinc = MAX (yinc, geometry->height_inc);
+ }
+
+ /* clamp width and height to min and max values
+ */
+ width = CLAMP (width, min_width, max_width);
+ height = CLAMP (height, min_height, max_height);
+
+ /* shrink to base + N * inc
+ */
+ width = base_width + FLOOR (width - base_width, xinc);
+ height = base_height + FLOOR (height - base_height, yinc);
+
+ /* constrain aspect ratio, according to:
+ *
+ * width
+ * min_aspect <= -------- <= max_aspect
+ * height
+ */
+
+ if (flags & GDK_HINT_ASPECT &&
+ geometry->min_aspect > 0 &&
+ geometry->max_aspect > 0)
+ {
+ gint delta;
+
+ if (geometry->min_aspect * height > width)
{
- ux = aux_info->x;
- uy = aux_info->y;
- flags |= GDK_HINT_POS;
+ delta = FLOOR (height - width * geometry->min_aspect, yinc);
+ if (height - delta >= min_height)
+ height -= delta;
+ else
+ {
+ delta = FLOOR (height * geometry->min_aspect - width, xinc);
+ if (width + delta <= max_width)
+ width += delta;
+ }
}
- if (flags & GDK_HINT_BASE_SIZE)
+ if (geometry->max_aspect * height < width)
{
- new_geometry.base_width += extra_width;
- new_geometry.base_height += extra_height;
+ delta = FLOOR (width - height * geometry->max_aspect, xinc);
+ if (width - delta >= min_width)
+ width -= delta;
+ else
+ {
+ delta = FLOOR (width / geometry->max_aspect - height, yinc);
+ if (height + delta <= max_height)
+ height += delta;
+ }
}
- else if (!(flags & GDK_HINT_MIN_SIZE) &&
- (flags & GDK_HINT_RESIZE_INC) &&
- ((extra_width != 0) || (extra_height != 0)))
- {
- flags |= GDK_HINT_BASE_SIZE;
+ }
- new_geometry.base_width = extra_width;
- new_geometry.base_height = extra_height;
- }
+#undef FLOOR
+
+ *new_width = width;
+ *new_height = height;
+}
- if (flags & GDK_HINT_MIN_SIZE)
- {
- new_geometry.min_width += extra_width;
- new_geometry.min_height += extra_height;
- }
- else if (!window->allow_shrink)
- {
- flags |= GDK_HINT_MIN_SIZE;
+/* Compute the set of geometry hints and flags for a window
+ * based on the application set geometry, and requisiition
+ * of the window. gtk_widget_size_request() must have been
+ * called first.
+ */
+static void
+gtk_window_compute_hints (GtkWindow *window,
+ GdkGeometry *new_geometry,
+ guint *new_flags)
+{
+ GtkWidget *widget;
+ GtkWidgetAuxInfo *aux_info;
+ gint ux, uy;
+ gint extra_width = 0;
+ gint extra_height = 0;
+ GtkWindowGeometryInfo *geometry_info;
+ GtkRequisition requisition;
- new_geometry.min_width = requisition->width;
- new_geometry.min_height = requisition->height;
- }
+ g_return_if_fail (GTK_IS_WINDOW (window));
+
+ widget = GTK_WIDGET (window);
+
+ gtk_widget_get_child_requisition (widget, &requisition);
+ geometry_info = gtk_window_get_geometry_info (GTK_WINDOW (widget), FALSE);
+
+ g_return_if_fail (geometry_info != NULL);
+
+ *new_flags = geometry_info->mask;
+ *new_geometry = geometry_info->geometry;
+
+ if (geometry_info->widget)
+ {
+ extra_width = widget->requisition.width - geometry_info->widget->requisition.width;
+ extra_height = widget->requisition.height - geometry_info->widget->requisition.height;
+ }
+
+ ux = 0;
+ uy = 0;
+
+ aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
+ if (aux_info && (aux_info->x != -1) && (aux_info->y != -1))
+ {
+ ux = aux_info->x;
+ uy = aux_info->y;
+ *new_flags |= GDK_HINT_POS;
+ }
+
+ if (*new_flags & GDK_HINT_BASE_SIZE)
+ {
+ new_geometry->base_width += extra_width;
+ new_geometry->base_height += extra_height;
+ }
+ else if (!(*new_flags & GDK_HINT_MIN_SIZE) &&
+ (*new_flags & GDK_HINT_RESIZE_INC) &&
+ ((extra_width != 0) || (extra_height != 0)))
+ {
+ *new_flags |= GDK_HINT_BASE_SIZE;
+
+ new_geometry->base_width = extra_width;
+ new_geometry->base_height = extra_height;
+ }
+
+ if (*new_flags & GDK_HINT_MIN_SIZE)
+ {
+ new_geometry->min_width += extra_width;
+ new_geometry->min_height += extra_height;
+ }
+ else if (!window->allow_shrink)
+ {
+ *new_flags |= GDK_HINT_MIN_SIZE;
+
+ new_geometry->min_width = requisition.width;
+ new_geometry->min_height = requisition.height;
+ }
+
+ if (*new_flags & GDK_HINT_MAX_SIZE)
+ {
+ new_geometry->max_width += extra_width;
+ new_geometry->max_height += extra_height;
+ }
+ else if (!window->allow_grow)
+ {
+ *new_flags |= GDK_HINT_MAX_SIZE;
+
+ new_geometry->max_width = requisition.width;
+ new_geometry->max_height = requisition.height;
+ }
+}
+
+/* Compute a new position for the window based on a new
+ * size. *x and *y will be set to the new coordinates, or to -1 if the
+ * window does not need to be moved
+ */
+static void
+gtk_window_compute_reposition (GtkWindow *window,
+ gint new_width,
+ gint new_height,
+ gint *x,
+ gint *y)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (window);
- if (flags & GDK_HINT_MAX_SIZE)
+ *x = -1;
+ *y = -1;
+
+ switch (window->position)
+ {
+ case GTK_WIN_POS_CENTER:
+ case GTK_WIN_POS_CENTER_ALWAYS:
+ if (window->use_uposition)
{
- new_geometry.max_width += extra_width;
- new_geometry.max_height += extra_height;
+ gint screen_width = gdk_screen_width ();
+ gint screen_height = gdk_screen_height ();
+
+ *x = (screen_width - new_width) / 2;
+ *y = (screen_height - new_height) / 2;
}
- else if (!window->allow_grow)
+ break;
+ case GTK_WIN_POS_MOUSE:
+ if (window->use_uposition)
{
- flags |= GDK_HINT_MAX_SIZE;
-
- new_geometry.max_width = requisition->width;
- new_geometry.max_height = requisition->height;
+ gint screen_width = gdk_screen_width ();
+ gint screen_height = gdk_screen_height ();
+
+ gdk_window_get_pointer (NULL, x, y, NULL);
+ *x -= new_width / 2;
+ *y -= new_height / 2;
+ *x = CLAMP (*x, 0, screen_width - new_width);
+ *y = CLAMP (*y, 0, screen_height - new_height);
}
-
- gdk_window_set_geometry_hints (widget->window, &new_geometry, flags);
-
- if (window->use_uposition && (flags & GDK_HINT_POS))
+ break;
+ default:
+ if (window->use_uposition)
{
- window->use_uposition = FALSE;
- gdk_window_move (widget->window, ux, uy);
+ GtkWidgetAuxInfo *aux_info;
+
+ aux_info = gtk_object_get_data (GTK_OBJECT (window), "gtk-aux-info");
+ if (aux_info &&
+ aux_info->x != -1 && aux_info->y != -1 &&
+ aux_info->x != -2 && aux_info->y != -2)
+ {
+ *x = aux_info->x;
+ *y = aux_info->y;
+ }
}
+ break;
+ }
+
+ if (*x != -1 && *y != -1)
+ {
+ GtkWidgetAuxInfo *aux_info;
+
+ /* we handle necessary window positioning by hand here,
+ * so we can coalesce the window movement with possible
+ * resizes to get only one configure event.
+ * keep this in sync with gtk_widget_set_uposition()
+ * and gtk_window_reposition().
+ */
+ gtk_widget_set_uposition (widget, -1, -1); /* ensure we have aux_info */
+
+ aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
+ aux_info->x = *x;
+ aux_info->y = *y;
+
+ window->use_uposition = FALSE;
}
}
+/***********************
+ * Redrawing functions *
+ ***********************/
+
static void
gtk_window_paint (GtkWidget *widget,
GdkRectangle *area)
@@ -1698,9 +2113,9 @@ gtk_window_expose (GtkWidget *widget,
gtk_window_paint (widget, &event->area);
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
- return (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
+ return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
- return FALSE;
+ return TRUE;
}
static void
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 8435978d7..53d22948a 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -135,6 +135,9 @@ void gtk_window_remove_embedded_xid (GtkWindow *window,
guint xid);
void gtk_window_add_embedded_xid (GtkWindow *window,
guint xid);
+void gtk_window_reposition (GtkWindow *window,
+ gint x,
+ gint y);
#ifdef __cplusplus
}
diff --git a/gtk/makeenums.h b/gtk/makeenums.h
index 97dd94e43..3d42f093d 100644
--- a/gtk/makeenums.h
+++ b/gtk/makeenums.h
@@ -1,5 +1,5 @@
+#include <gdk/gdkprivate.h>
#include <gdk/gdk.h>
-#include <gdkprivate.h>
#include <gtk/gtk.h>
#include <gtk/gtkprivate.h>
#include <gtk/gtkdebug.h>
diff --git a/gtk/simple.c b/gtk/simple.c
index 17ff562b7..f7a0822a0 100644
--- a/gtk/simple.c
+++ b/gtk/simple.c
@@ -1,5 +1,4 @@
#include <gtk/gtk.h>
-#include <gdkprivate.h>
void
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index 6a63cef7f..c8bc00899 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -29,8 +29,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/stat.h>
#include <math.h>
#include <time.h>
+#include <unistd.h>
#include "gtk.h"
#include "gdk/gdk.h"
#include "gdk/gdkkeysyms.h"
@@ -1559,7 +1561,7 @@ create_handle_box (void)
gtk_window_set_policy (GTK_WINDOW (window),
TRUE,
TRUE,
- FALSE);
+ TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
@@ -2392,12 +2394,12 @@ static GtkItemFactoryEntry menu_items[] =
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/Color/_Red", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
+ { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/Shape/_Square", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Square" },
+ { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Rectangle" },
{ "/_Help", NULL, 0, 0, "<LastBranch>" },
{ "/Help/_About", NULL, gtk_ifactory_cb, 0 },
@@ -2436,10 +2438,16 @@ create_item_factory (void)
item_factory,
(GtkDestroyNotify) gtk_object_unref);
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
- gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
gtk_window_set_title (GTK_WINDOW (window), "Item Factory");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-
+ gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
+
+ /* preselect /Preferences/Shape/Oval over the other radios
+ */
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_item_factory_get_item (item_factory,
+ "/Preferences/Shape/Oval")),
+ TRUE);
+
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
@@ -4774,7 +4782,7 @@ void create_ctree (void)
GtkWidget *check;
GtkAdjustment *adj;
GtkWidget *spinner;
- GdkColor transparent;
+ GdkColor transparent = { 0 };
char *title[] = { "Tree" , "Info" };
char buf[80];
@@ -5259,7 +5267,10 @@ void
font_selection_ok (GtkWidget *w,
GtkFontSelectionDialog *fs)
{
- g_print ("%s\n", gtk_font_selection_dialog_get_font_name (fs));
+ gchar *s = gtk_font_selection_dialog_get_font_name (fs);
+
+ g_print ("%s\n", s);
+ g_free (s);
gtk_widget_destroy (GTK_WIDGET (fs));
}
@@ -7882,7 +7893,7 @@ create_timeout_test (void)
* Idle Test
*/
-static int idle = 0;
+static int idle_id = 0;
static gint
idle_test (GtkWidget *label)
@@ -7900,9 +7911,9 @@ static void
start_idle_test (GtkWidget *widget,
GtkWidget *label)
{
- if (!idle)
+ if (!idle_id)
{
- idle = gtk_idle_add ((GtkFunction) idle_test, label);
+ idle_id = gtk_idle_add ((GtkFunction) idle_test, label);
}
}
@@ -7910,10 +7921,10 @@ static void
stop_idle_test (GtkWidget *widget,
gpointer data)
{
- if (idle)
+ if (idle_id)
{
- gtk_idle_remove (idle);
- idle = 0;
+ gtk_idle_remove (idle_id);
+ idle_id = 0;
}
}
@@ -8465,11 +8476,22 @@ int
main (int argc, char *argv[])
{
GtkBindingSet *binding_set;
+ struct stat statbuf;
srand (time (NULL));
gtk_set_locale ();
+ /* Check to see if we are being run from the correct
+ * directory.
+ */
+ if (stat("./testgtkrc", &statbuf) < 0)
+ {
+ fprintf (stderr, "*** The testgtk program must be run from within the\n"
+ "*** gtk/ subdirectory of the GTK+ distribution.\n");
+ exit (1);
+ }
+
gtk_rc_add_default_file ("testgtkrc");
gtk_init (&argc, &argv);
diff --git a/tests/simple.c b/tests/simple.c
index 17ff562b7..f7a0822a0 100644
--- a/tests/simple.c
+++ b/tests/simple.c
@@ -1,5 +1,4 @@
#include <gtk/gtk.h>
-#include <gdkprivate.h>
void
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 6a63cef7f..c8bc00899 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -29,8 +29,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/stat.h>
#include <math.h>
#include <time.h>
+#include <unistd.h>
#include "gtk.h"
#include "gdk/gdk.h"
#include "gdk/gdkkeysyms.h"
@@ -1559,7 +1561,7 @@ create_handle_box (void)
gtk_window_set_policy (GTK_WINDOW (window),
TRUE,
TRUE,
- FALSE);
+ TRUE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
@@ -2392,12 +2394,12 @@ static GtkItemFactoryEntry menu_items[] =
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/Color/_Red", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
+ { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/Shape/_Square", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Square" },
+ { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Rectangle" },
{ "/_Help", NULL, 0, 0, "<LastBranch>" },
{ "/Help/_About", NULL, gtk_ifactory_cb, 0 },
@@ -2436,10 +2438,16 @@ create_item_factory (void)
item_factory,
(GtkDestroyNotify) gtk_object_unref);
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
- gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
gtk_window_set_title (GTK_WINDOW (window), "Item Factory");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-
+ gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
+
+ /* preselect /Preferences/Shape/Oval over the other radios
+ */
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_item_factory_get_item (item_factory,
+ "/Preferences/Shape/Oval")),
+ TRUE);
+
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
@@ -4774,7 +4782,7 @@ void create_ctree (void)
GtkWidget *check;
GtkAdjustment *adj;
GtkWidget *spinner;
- GdkColor transparent;
+ GdkColor transparent = { 0 };
char *title[] = { "Tree" , "Info" };
char buf[80];
@@ -5259,7 +5267,10 @@ void
font_selection_ok (GtkWidget *w,
GtkFontSelectionDialog *fs)
{
- g_print ("%s\n", gtk_font_selection_dialog_get_font_name (fs));
+ gchar *s = gtk_font_selection_dialog_get_font_name (fs);
+
+ g_print ("%s\n", s);
+ g_free (s);
gtk_widget_destroy (GTK_WIDGET (fs));
}
@@ -7882,7 +7893,7 @@ create_timeout_test (void)
* Idle Test
*/
-static int idle = 0;
+static int idle_id = 0;
static gint
idle_test (GtkWidget *label)
@@ -7900,9 +7911,9 @@ static void
start_idle_test (GtkWidget *widget,
GtkWidget *label)
{
- if (!idle)
+ if (!idle_id)
{
- idle = gtk_idle_add ((GtkFunction) idle_test, label);
+ idle_id = gtk_idle_add ((GtkFunction) idle_test, label);
}
}
@@ -7910,10 +7921,10 @@ static void
stop_idle_test (GtkWidget *widget,
gpointer data)
{
- if (idle)
+ if (idle_id)
{
- gtk_idle_remove (idle);
- idle = 0;
+ gtk_idle_remove (idle_id);
+ idle_id = 0;
}
}
@@ -8465,11 +8476,22 @@ int
main (int argc, char *argv[])
{
GtkBindingSet *binding_set;
+ struct stat statbuf;
srand (time (NULL));
gtk_set_locale ();
+ /* Check to see if we are being run from the correct
+ * directory.
+ */
+ if (stat("./testgtkrc", &statbuf) < 0)
+ {
+ fprintf (stderr, "*** The testgtk program must be run from within the\n"
+ "*** gtk/ subdirectory of the GTK+ distribution.\n");
+ exit (1);
+ }
+
gtk_rc_add_default_file ("testgtkrc");
gtk_init (&argc, &argv);