Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* docs/refcounting.txt: backed out the section "Gnits to care about".
* docs/developers.txt: new file, kinda developers FAQ.
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
* gtk/gtksignal.h:
* gtk/gtksignal.c: new function gtk_signal_handler_pending() returning
the id of the next handler pending for that signal or 0.
put struct GtkHandler back into gtksignal.c along with
gtk_signal_get_handlers.
Tue Feb 10 13:04:36 1998 Owen Taylor <owt1@cornell.edu>
* configure.in: Add check to see if the C library's
iswalnum can actually be used. (Not true for
Linux libc-5.4.38)
Tue Feb 10 07:12:07 1998 Tim Janik <timj@gimp.org>
* gtk/gtksignal.h:
* gtk/gtksignal.c:
ok, there have been several severe bugs in the signal handler
referencing and ->next connection stuff. these bugs caused
invokations of handlers that are disconnected and - worse -
destroyed already. invokation of *destroyd* handlers mean:
anything can be executed , because the handler structure can just
as well be realocated.
at the cost of an extra ->prev field per handler we should have a
reasonable stable system now, because of the various places that
can cause a handler to be disconnected (*any* handler invokation can
cause *any* or *all* handlers to be disconnected, there is no way
around a doubly linked list, actually handler disconnection has never
worked correctly because of this.
handlers are connected together via a *doubly* linked list now, and it
is *not* valid to remove a handler out of this list untill all its
references have been droped, i.e. handler->ref_count==0.
to prevent emissions of disconnected but still referenced handlers,
disconnected handlers are simply marked as blocked and get an id of 0
which is an invalid signal handler id.
the handler->id has been changed to have 28 significant bits (using
alignment gaps), since 65536 (old range: guint16) signal connections
(as a total) can easily be reached by complex applications.
this whole handler thingy is at least as tedious as writing doubly
linked list implementations ;)
Mon Feb 9 23:08:16 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c (gtk_widget_unparent): Check for
the RESIZE_NEEDED flag and remove the widget from the list.
Remove the check from gtk_widget_destroy (no longer needed).
* Unrealize widget _before_ calling "destroy" signal, and
unset VISIBLE flag.
* Unrealize child widgets _after_ unrealizing parent to improve
visual appearance.
Mon Feb 9 16:42:21 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtksignal.c (gtk_signal_get_handlers): no longer a private
routine;
gtksignal.h: export gtk_signal_get_handlers and GtkHandlers type.
Sun Feb 8 07:06:54 1998 Tim Janik <timj@gimp.org>
* gtk/gtkmenu.c (gtk_menu_get_attach_widget): new fundtion to return
the widget that the menu is attached to.
Sat Feb 7 11:33:08 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c (gdk_gc_copy): use a mask of 0xffffffff
instead of 0xffff, since there are 22 flags currently
defined. (From: Jon Trowbridge <trow@emccta.com>)
Changed to something better. ~((~1) << GCLastBit)
(From: from Daniel Stephens <daniel@cheeseplant.org>)
Sat Feb 7 11:33:08 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c (gdk_gc_copy): use a mask of 0xffffffff
instead of 0xffff, since there are 22 flags currently
defined. (From: Jon Trowbridge <trow@emccta.com>)
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
* gtk/gtklist.c (gtk_list_remove_items_no_unref): new function
to perform the same actions as gtk_list_remove_items, but
supply the removed widgets with an additional reference count.
* gtk/gtkmain.c (gtk_main_iteration_do): ignore events
with event_widget == NULL, since they are bogus events
from destroyed GdkWindows, exept for the case where
event->type==GDK_PROPERTY_NOTIFY. Always handle expired
timeout functions when returning from this function.
* gtk/gtkwidget.c (gtk_widget_event): ignore GDK_EXPOSE events
if event->window == NULL. Also, if this function couldn't handle
the event for any reason (including failing assumptions), make
the return value to look as if the event had been handled to
avoid further processing (and warnings).
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: remove gtk_widget_sink, because there is
no point in providing such a function.
* gdk/gdk.c (gdk_init): changed options `-name' and `-class'
to `--name' and `--class', because the old names would
confuse getopt(). these arguments have been introduced in the
changes from gtk+970916 to gtk+970925 without a ChangeLog entry,
changing argument names is painful, it would be nice if people
would care about compatibility and consistency in the first place!
Tue Feb 3 15:09:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtksignal.c (gtk_signal_real_emit): for the emission
of AFTER signals, fetch the objects signals via
gtk_signal_get_handlers again. some handlers might have
been removed or added. not doing this would mess up the
memchunk allocation of signal handlers (this had been
triggered by multiple *_while_alive connections), bad, bad, bad!
(gtk_handlers_run): do the referencing on signal handlers
unconditionally, the invokation of AFTER handlers will now take
care of modified lists.
* gtk/gtksignal.h: added gtk_signal_connect_while_alive.
Tue Feb 3 15:34:27 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkcolor.c (gdk_colormap_get_system): Only query
the colormap for GRAYSCALE and PSEUDOCOLOR visuals,
and don't ask for more than 256 colors in any case.
* gdk/gdkwindow.c (gdk_window_internal_destroy): Remove
the input window information when we destroy the window,
not when we are notified of it.
* gdk/gdkinputcommon.h (gdk_input_device_new): Work around
bug in XFree86 3.3.1's handling of Wacom macro buttons.
by assumming no device will report exactly 25 buttons.
* gdk/gdkinputcommon.h (gdk_input_common_other_event): Fill
in string translation for generated key press events,
do sanity checking on received key codes.
* gdk/gdkcc.c (gdk_color_context_new): Allocate enough
room for a GdkColorContextPrivate, not just for a
GdkColorContext.
Tue Feb 3 15:09:55 1998 Tim Janik <timj@gimp.org>
* gtk/testgtk.c: don't add the same menu to different menuitems/
optionmenus.
* gtk/gtkmenuitem.h:
* gtk/gtkmenuitem.c: new function gtk_menu_item_remove_submenu ro
be consistent with optionmenu. use gtk_menu_attach_to_widget/
gtk_menu_detach for setting/removing the submenu.
invoke gtk_widget_destroy(submenu) in destructor to be consistent
with other destructors.
* gtk/gtkoptionmenu.h:
* gtk/gtkoptionmenu.c: attach/detach to menu widget via
gtk_menu_attach_to_widget/gtk_menu_detach.
invoke gtk_widget_destroy(menu) in destructor to be consistent
with other destructors.
Tue Feb 3 15:09:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtkoptionmenu.h:
* gtk/gtkoptionmenu.c: attach/detach to menu widget via
* gtk/gtkmenu.h:
* gtk/gtkmenu.c: new functions gtk_menu_attach_to_widget
and gtk_menu_detach that correspond to the action of
gtk_widget_set_parent and gtk_widget_unparent.
* gtk/widget.c: few fixups.
Tue Feb 3 00:12:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktable.c
Fixed problem with division by zero in row/column-spanned
tables. Also removed a bunch of conditionals by making
the observation that x/1 == x.
Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwindow.c:
* gtk/gtkwidget.c:
* gtk/gtkmain.c:
* gtk/gtkwidget.c:
* gtk/gtkcontainer.c:
* gtk/gtkprivate.h (GTK_PRIVATE_UNSET_FLAG) (GTK_PRIVATE_UNSET_FLAGS):
changed name to reflect that these macros in fact can't operate on
multiple flags.
Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtkmain.c (gtk_propagate_event): fixed a bad, bad referencing
bug that could caused unreferencing of finalized objects.
* gtk/testgtk.c: destroy fileselection on "OK" (this triggered the
above mentioned bug).
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
* gtk/gtkobject.h:
* gtk/gtkobject.c:
implemented and object reference tracer (gtk_trace_referencing) which
is activated if GTK_TRACE_OBJECTS is defined (currently per default).
in gdb: set the static variable `gtk_trace_object' to point to the
object that you want to have reference traced.
* gtk/gtkfileselection.c: few cleanups.
Mon Feb 2 04:15:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now.
(gtk_container_register_toplevel): new function.
(gtk_container_unregister_toplevel): new function.
* gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now.
* gtk/gtkmenu.c: call gtk_container_register_toplevel in
gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL)
hack. new default handler gtk_menu_destroy for calling
gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED.
* gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag.
* gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED
(object).
* gtk/gtkprivate.h: new file that will not be automatically included.
it holds the private flags for GtkWidget along with it's SET/UNSET
and examination macros.
* gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING,
GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is
replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT.
removed the gtk_widget_set_parent(, NULL) hack for toplevels.
upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK.
* gtk/gtkwidget.h: split up the widget flags into a public and a private
portion. added an extra field private_flags to GtkWidget without making
it bigger by using an alignment gap of 16 bit. macro cleanups.
* gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy
for calling gtk_container_unregister_toplevel. removed the
gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel
instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now.
* gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on
removal that cut off the handler list -> living_objects == 0
with testgtk. made some warnings more descriptive.
new function gtk_signal_connect_object_while_alive, which
will automatically destroy the connection once one of the objects
is destroyed. didn't include this before removal of the above
mentioned bug.
* reflected refcounting revolution in ChangeLog
Sat Jan 31 21:26:27 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c: Added a new GTK_IN_REPARENT flag and revised
gtk_widget_reparent so that the child would not be unrealized
unnecessarily. Changed gtk_widget_unrealize () to recursively
unrealize the children (since the child windows will be
destroyed too.)
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:
- Conformity to new reference counting schemes
- Font and color information is no-longer taken from
the (possibly unitialized) style before the widget
is realized, but is obtained when needed. (Fixes
problems with non-default styles)
- white_gc => base_gc where appropriate
- Handle graphics expose events correctly (or as
correctly as anywhere else) so that scrolling when
overlapped works.