Use common marshalling routines instead of having widget-private ones.
It compiles & links.
testgtk segfaults. I'm convinced that is Somebody Else's Problem
(marshalling routine gets func_data=0x0 and blithely passes it on) but the
fact that it happens now & not before makes me wrong :-)
Fri Jul 17 01:21:32 1998 Tim Janik <timj@gtk.org>
* gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation
instead of ypad (typo).
(gtk_arrow_set): clear all of the arrow's allocation (left a 1 pixel
border around the allocation).
(gtk_arrow_init): the static requisition needs to be setup in this
function rather than gtk_widget_new(), so arrow creation works without
the gtk_arrow_new() constructing.
(gtk_arrow_expose): return TRUE, since we actually handled the expose.
* gtk/gtkwidget.c (gtk_widget_real_size_request): provide a default
implementation for GtkWidget::size_request, so size requisition for
simple statically sized widgets like GtkArrow works.
Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
similar to gtk_widget_set_uposition(). that is: -1=unspecified,
-2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
to be gint16s rather than guint16s, since that's what the code expected
(for a long time actually).
* gtk/gtkviewport.c:
added support for object arguments: GtkViewport::shadow_type,
GtkViewport::vadjustment and GtkViewport::hadjustment.
(gtk_viewport_add): chain gtk_bin_add.
* gtk/gtkscrolledwindow.c:
added support for object argument: GtkScrolledWindow::hscrollbar_policy,
GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
* gtk/gtkadjustment.h:
* gtk/gtkadjustment.c:
* gtk/gtkctree.h:
* gtk/gtkclist.h:
* gtk/gtkctree.c:
* gtk/gtkclist.c:
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
* gtk/gtkviewport.h:
* gtk/gtkviewport.c:
GtkType and macro fixups.
Fri Jul 10 00:02:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: deleted most of the argument handling code, since
that is now implemented in gtkarg.c. similar to gtk_object_args_collect,
we now export a new function gtk_container_child_args_collect().
for consistency with the object arguments, a few functions got renamed:
gtk_container_child_arg_get -> gtk_container_child_get,
gtk_container_child_arg_set -> gtk_container_child_set,
gtk_container_child_arg_getv -> gtk_container_child_getv,
gtk_container_child_arg_setv -> gtk_container_child_setv,
gtk_container_add_with_argv -> gtk_container_addv.
note, gtk_container_add_with_args() remained, because its equivalent
would be gtk_container_add(,, ...) which would break all existing code.
(gtk_container_add_child_arg_type): similar to gtk_object_add_arg_type,
we expect the `arg_name' argument to be a const static string now.
(gtk_container_get_child_arg_type): function removed.
Thu Jul 9 07:03:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkargcollector.c: new file which holds gtk_arg_collect_value().
this is a static inline function that collects command line arguments
from a va_list. this file can just be included in all places that
need this functionality.
* gtk/gtkarg.h:
* gtk/gtkarg.c: new files which implement most of the argument
handling stuff from gtkobject.c. also collected a few more
gtk_arg_* utility functions from else places.
* gtk/gtkobject.h:
* gtk/gtkobject.c: moved most of the argument handling code into
gtkarg.c. we now export gtk_object_args_collect() as a non-public
method with a blind va_list pointer.
(gtk_object_add_arg_type): the `arg_name' argument is required to be a
const static string now.
(gtk_object_get_arg_type): function got removed.
* gtk/gtkwidget.c:
(gtk_widget_set):
(gtk_widget_new): adaptions for gtk_object_args_collect().
* gtk/gtktypeutils.c (gtk_type_init_builtin_types): changed the internal
fundamental type name so as to have a valid prefix, e.g. "bool"->
"gboolean", "string"->"GtkString" and somesuch, left "void" as is,
though that should probably be something like GtkNone since the
type itself is called GTK_TYPE_NONE.
even the internal type names need to avoid name clashes and must live
in their own namespace, several code portions rely on that.
we should relly have typedefs such as typedef gchar* GtkString; so the
fundamental type names can be used for code dumpers just like with all
the Gtk/Gdk types.
Sat Jul 4 13:16:24 1998 Tim Janik <timj@gtk.org>
* gtk/*.c: changed reversed_[12] to reserved_[12] in gtk_*_get_type
functions.
* gdk/gdkwindow.c:
* gdk/gdkvisual.c: check for some pointer values to be != NULL, prior
to XFree() calls.
Wed Jul 1 20:58:46 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: temporary implementation of action signal "debug_msg"
* gtk/gtkbindings.c (gtk_binding_entry_add_signal): fixed an off-by-one
error that prevented signal to entry addition for signals with
parameters.
Tue Jun 30 09:24:40 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_key_release_event): implemented
default handler for key-release events, which checks for activation
of GDK_RELEASE_MASK key bindings.
* gdk/gdktypes.h (enum): added GDK_RELEASE_MASK to GdkModifierType.
Sun Jun 28 04:29:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): call the base class init
fucntions from all parent types upon class initialization.
* gtk/gtkcontainer.c:
(gtk_container_get_type): announce gtk_container_base_class_init to
the type system.
(gtk_container_base_class_init): new function to feature base class
initialization.
(gtk_container_get_child_arg):
(gtk_container_set_child_arg): call the GtkContainerClass get_child_arg
and set_child_arg methods of the class indicated through the argument
name.
* gtk/gtkobject.c:
(gtk_object_base_class_init): new function to feature base class
initialization.
(gtk_object_init_type): announce gtk_object_base_class_init to the type
system.
(gtk_object_class_init): setup the get_arg and set_arg pointers for
GtkObjectClass.
(gtk_object_setv):
(gtk_object_getv): call the GtkObjectClass get_arg and set_arg methods,
instead of bothering the type system with this.
* gtk/gtkaccellabel.c:
* gtk/gtkbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktable.c:
* gtk/gtktogglebutton.c:
* gtk/gtktipsquery.c:
* gtk/gtkbox.c:
* gtk/gtkpacker.c:
* gtk/gtkwidget.c:
* gtk/gtkwindow.c:
* gtk/gtkframe.c:
* gtk/gtkmisc.c:
* gtk/gtklabel.c: set the object_class->{g|s}et_arg pointers to the
corresponding gtk_*_{g|s]et_arg functions and updated the gtk_*_get_type
functions wrt GtkTypeInfo initialization. changed a lot of the set/get
arg functions to take a GtkObject argument.
gtk/gtkadjustment.c:
gtk/gtkalignment.c:
gtk/gtkarrow.c:
gtk/gtkaspectframe.c:
gtk/gtkbbox.c:
gtk/gtkbin.c:
gtk/gtkcheckbutton.c:
gtk/gtkcheckmenuitem.c:
gtk/gtkclist.c:
gtk/gtkcolorsel.c:
gtk/gtkcombo.c:
gtk/gtkctree.c:
gtk/gtkcurve.c:
gtk/gtkdata.c:
gtk/gtkdialog.c:
gtk/gtkdrawingarea.c:
gtk/gtkeditable.c:
gtk/gtkentry.c:
gtk/gtkeventbox.c:
gtk/gtkfilesel.c:
gtk/gtkfixed.c:
gtk/gtkfontsel.c:
gtk/gtkgamma.c:
gtk/gtkhandlebox.c:
gtk/gtkhbbox.c:
gtk/gtkhbox.c:
gtk/gtkhpaned.c:
gtk/gtkhruler.c:
gtk/gtkhscale.c:
gtk/gtkhscrollbar.c:
gtk/gtkhseparator.c:
gtk/gtkimage.c:
gtk/gtkinputdialog.c:
gtk/gtkitem.c:
gtk/gtkitemfactory.c:
gtk/gtklist.c:
gtk/gtklistitem.c:
gtk/gtkmenu.c:
gtk/gtkmenubar.c:
gtk/gtkmenuitem.c:
gtk/gtkmenushell.c:
gtk/gtknotebook.c:
gtk/gtkoptionmenu.c:
gtk/gtkpaned.c:
gtk/gtkpixmap.c:
gtk/gtkpreview.c:
gtk/gtkprogressbar.c:
gtk/gtkradiomenuitem.c:
gtk/gtkrange.c:
gtk/gtkruler.c:
gtk/gtkscale.c:
gtk/gtkscrollbar.c:
gtk/gtkscrolledwindow.c:
gtk/gtkseparator.c:
gtk/gtkspinbutton.c:
gtk/gtkstatusbar.c:
gtk/gtktext.c:
gtk/gtktoolbar.c:
gtk/gtktooltips.c:
gtk/gtktree.c:
gtk/gtktreeitem.c:
gtk/gtkvbbox.c:
gtk/gtkvbox.c:
gtk/gtkviewport.c:
gtk/gtkvpaned.c:
gtk/gtkvruler.c:
gtk/gtkvscale.c:
gtk/gtkvscrollbar.c:
gtk/gtkvseparator.c: updated the GtkTypeInfo initialization code to
match the modified GtkTypeInfo structure.
Wed Jun 24 16:38:02 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_remove): do not avoid to queue for a resize
if the container is not visible, we might be a toplevel! this holds
for all other base container implementations as well, that are
candidates to derive toplevels from. in general the resizing code will
care about visibility itself.
* gtk/gtkmenushell.c (gtk_menu_shell_remove): likewise.
* gtk/gtkbox.c (gtk_box_remove): likewise.
* gtk/gtkwindow.c (gtk_window_move_resize): save ->use_uposition around
gtk_window_set_hints(), since we haven't calculated the new position
yet.
* gdk/gdkwindow.c (gdk_window_get_pointer): take care that *x, *y and
*mask are alway initialized in a sane way, regardless of the return
value.
Wed Jun 24 14:14:32 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c: new function gtk_container_child_arg_set, similar
to gtk_container_child_arg_setv, but takes a variable argument list.
new function gtk_container_get_child_arg_type, which is needed by
gtk_object_collect_args.
* gtk/gtkobject.c: changed prototype for gtk_object_collect_args, to
take a function pointer to figure the argument type.
adapted callers to pass gtk_object_get_arg_type.
* gtk/gtkwidget.c: adapted gtk_object_collect_args callers to pass
gtk_object_get_arg_type..
* gtk/gtkpacker.h:
* gtk/gtkpacker.c:
(gtk_packer_reorder_child): new function to change the packing order
of a child.
(gtk_packer_size_request):
(gtk_packer_size_allocate): take container->border_width into acount.
* gtk/gtkpacker.c: implemented widget arguments:
"GtkPacker::spacing", "GtkPacker::border_width", "GtkPacker::pad_x",
"GtkPacker::pad_y", "GtkPacker::ipad_x", "GtkPacker::ipad_y".
implemented child arguments:
"GtkPacker::side", "GtkPacker::anchor", "GtkPacker::expand",
"GtkPacker::fill_x", "GtkPacker::fill_y", "GtkPacker::use_default",
"GtkPacker::border_width", "GtkPacker::pad_x", "GtkPacker::pad_y",
"GtkPacker::ipad_x", "GtkPacker::ipad_y", "GtkPacker::position".
* gtk/gtkmisc.c (gtk_misc_set_arg): for padding args, set the padding,
not the alignment.
* gtk/gtkeventbox.h:
* gtk/gtkeventbox.c: GtkType and macro fixups.
* gtk/testgtk.c (entry_toggle_sensitive): new function to toggle
sensitivity of an entry.
* gtk/gtkstyle.c (gtk_style_new): support normal grey as default color
for insensitive base.
* gtk/gtkentry.c (gtk_entry_realize): set the window backgrounds
widget state dependent.
(gtk_entry_style_set): likewise.
(gtk_entry_state_changed): set background color on state changes.
(gtk_entry_draw_text): for non selected text, use state dependent
colors.
* gtk/gtktogglebutton.c: support for widget arguments
"GtkToggleButton::active" and "GtkToggleButton::draw_indicator".
Wed Jun 24 07:47:29 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_idle_test): added a frame with radio buttons
to select the resize_mode for the idle-labels container.
* gtk/gtkframe.h:
* gtk/gtkframe.c: GtkType and macro corrections.
* gtk/gtkradiobutton.c (gtk_radio_button_set_arg): new function to
support radio grouping.
Tue Jun 23 08:01:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_resize_mode): queue a resize
unconditionally if resize_mode has changed.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_init): set
GTK_RESIZE_QUEUE on the scrolled window.
(gtk_scrolled_window_construct): set GTK_RESIZE_PARENT for the vieport.
Tue Jun 23 04:20:30 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c:
(GTK_IS_RESIZE_CONTAINER): new macro to find out if
a given gtkobject is a container with resize_mode==GTK_RESIZE_PARENT.
(gtk_container_queue_resize): new function to queue a container for
a *size* reallocation (doesn't affect its position, and thus its
parent is left untouched usually).
(gtk_container_get_resize_container): new function to retrive the next
most resize container which is not itself queued for a resize.
(gtk_container_idle_sizer): new function to carefully process the
container_resize_queue since it can change during invokation of
gtk_container_check_resize().
(gtk_container_resize_children): total rework of this function to
properly handle resize containers. makes a lot of assumptions whitch
are stated in the comments.
* gtk/gtkcontainer.c:
(gtk_container_real_check_resize): only requeue ourselves if we are not
a resize container.
(gtk_container_clear_resize_widgets): care for automatic deletion of our
resize_widgets list on size_allocate through a handler connection.
* gtk/gtkwindow.c (gtk_window_shutdown): new functionm to reset the
focus and default widget of a window, so to take the burden from
gtk_widget_unparent.
* gtk/gtkviewport.c: removed gtk_viewport_check_resize, which tried
to be clever, but actually messed up the resize_children logic and
caused unneccessary allocations on its whole branch. besides this,
it messed up the display by not invoking a redraw after the allocation.
* gtk/gtktable.c (gtk_table_set_child_arg): reverted recent change, so
that it is the child again that is queued for a resize.
(gtk_table_attach): likewise.
(gtk_table_remove): likewise.
Fri Jun 19 06:18:19 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_resize_mode): fail silently
for toplevels. if resize_mode changes to GTK_RESIZE_PARENT, clear the
resize widget list before queuing the container for a new reize.
(gtk_container_need_resize): changed return value to FALSE, since this
used to indicate that no further resizes are needed.
(gtk_container_set_arg):
(gtk_container_get_arg):
(gtk_container_class_init): implemented GtkContainer::resize_mode
argument.
(gtk_container_resize_children): when we walk up the tree of a resize
widget we need to stop if we are the current parent.
* gtk/gtkwidget.c (gtk_widget_queue_resize): flag the resize child with
GTK_RESIZE_NEEDED for container->resize_mode==GTK_RESIZE_IMMEDIATE.
(gtk_widget_hide_all): retrive the toplevel widget from via
gtk_widget_get_resize_container().
Fri Jun 19 03:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.c:
* gtk/gtkbindings.c:
* gtk/gtkcontainer.c:
* gtk/gtkitemfactory.c:
* gtk/gtkobject.c:
* gtk/gtksignal.c:
* gtk/gtkwidget.c: replaced some gtk_object_data_force_id with
g_quark_from_static_string calls to save memory.
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): invoke the destroy
function _after_ the new data has been setup.
minor changes to object data functions to feature the GQuark type.
Thu Jun 18 21:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkmain.c (gtk_init): Remove --g-fatal-warnings flag
from argv.
Thu Jun 18 20:22:28 1998 Owen Taylor <otaylor@gtk.org>
* gtk/genmarshal.pl: Modified to be more idiomatic Perl,
to be more readable perl, to spit out stuff that looks
more like readable C, and to pipe output through indent
so output looks a lot like readable C. No functional
changes.
Thu Jun 18 17:43:31 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.[ch] (gtk_pixmap_set): Clear the background if
necessary when switching to a masked pixmap. (Based on a patch
from Ullrich Hafner <hafner@informatik.uni-wuerzburg.de>)
Thu Jun 18 16:18:10 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkeditable.[ch]: Added action signals for keyboard
bindings. (move_cursor, kill_word, etc, etc, etc).
removed the time argument from
gtk_editable_cut/copy/paste_clipboard (source but not
binary incompatible...) Instead get time from
gtk_get_current_event ().
* gtk/gtktext.c gtk/gtkentry.c: Support the new editable
signals.
Thu Jun 18 02:52:09 1998 Owen Taylor <otaylor@gtk.org>
Patches from Damon Chaplin <DAChaplin@email.msn.com>:
gtk/gtkfontsel.h: Fixed GtkFontSelectionClass - I forgot to change
parent class to GtkNotebookClass when splitting the widget in
two. Also updated some comments.
gtk/gtkfontsel.c: Fixed bug when toggling 'Allow scaled bitmaps'
button without a font selected.
Fixed bug in set_font_name - I hadn't updated the code to
search for the style in the font_style clist - it was
still assuming the style row was equal to its index,
but it isn't any more.
Changed 'Reset' button on filter page to 'Clear Filter'.
Deleted old code relating to the old 'Filter Fonts' toggle
Updated some comments.
Cleared 'Actual Fontname' if no font is set.
gtk/testgtk.c: Fixed problem when 'OK' button is pressed - it was
destroying the GtkFontSelection instead of the
GtkFontSelectionDialog.
Thu Jun 18 02:15:31 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkmain.c (gtk_init): Added --g-fatal-warnings
flag to make all warnings fatal errors.
* gtk/testthreads.c: moved <pthreads.h> include inside
#ifdef USE_PTHREADS
Thu Jun 18 01:37:31 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkenums.h gtk/gtkcontainer.[ch] gtk/gtkwidget.c
gtk/gtkmenu.c gtk/gtkviewport.c gtk/gtkwindow.c:
- Added new function gtk_container_set_resize_mode() for
fine-grained control of where resize-queueing is done.
- Removed GtkContainer::need_resize and GtkWindow::move_resize
- Added GtkContainer::check_resize to replace need_resize.
- Added function gtk_container_check_resize() to trigger
queued resizes, and gtk_container_resize_children() to
Figure which children need to be size-allocated. (logic
moved from gtkwindow.c)
- Reorganized code in gtkwindow.c
- Set the resize-mode for viewports so that resizes within
a viewport don't propagate out of it.
yeppers, accelerator changes to fix the gimp.
commit message dedicated to sopwith ;)
Thu Jun 18 03:30:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new function gtk_accel_label_accelerator_width to
request the size of the accelerator portion of an accel label.
(gtk_accel_label_size_request): don't request for the accelerators size.
(gtk_accel_label_expose_event): only draw the accelerator if we got
enough extra space.
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): request accelerator
width from children.
* gtk/gtkmenu.c (gtk_menu_key_press): when adding an accelerator to an
object (after removal has been requested) check if there is still an
accelerator remaining to avoid adding two accelerators on an object.
this can happen for locked accelerators (or accelerator-frozen widgets).
(gtk_menu_size_request): feature childrens accelerator width in size
requests.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): use
gtk_widget_freeze_accelerators() for dynamically created menu items.
* gtk/gtksignal.h:
* gtk/gtksignal.c: new function gtk_signal_handler_pending_by_func()
which will return a handler_id > 0 if the specified function is pending
for `signal_id'.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: remove gtk_widget_stop_accelerator, which was just
a signal handler function to stop accelerator addition.
added gtk_widget_freeze_accelerators and gtk_widget_thaw_accelerators
which will prevent (undo) any accelerators from being added to or
removed from a widget.
Wed Jun 17 03:47:40 1998 Tim Janik <timj@gtk.org>
* gdk/gdk.h:
* gdk/gdkwindow.c: new function gdk_window_at_pointer() to retrive
the current GdkWindow the pointer is on if there is any.
* gtk/gtktable.c (gtk_table_init): preallocate a table with one row
and one column, so we don't construction logic at all. changed a few
(x < y - 1) to (x + 1 < y), to avoid failing evaluations due to
unsigned int wraps.
* gtk/gtkwidget.c (gtk_widget_set_parent): removed left over code
portion, added an additional check for parent != widget.
* more GtkType and macro fixups.
Tue Jun 9 01:57:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtkselection.h:
* gtk/gtkselection.c: new functions gtk_selection_data_copy and
gtk_selection_data_free.
* gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call
for "selection_received", which was completely bogus.
* other fixups to gtk_signal_new() calls all over the place.
* gtk/gtktypebuiltins.h: types as variables (formerly macros).
* gtk/gtktypebuiltins_vars.c: type variable implementations.
* gtk/gtktypebuiltins_ids.c: array entries for builtin type
declarations.
* gtk/gtktypebuiltins_evals.c: enum value arrays.
* gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build
gtk.defs.
* gtk/gtk.defs: generated file with scheme syntax for type definitions
of gtk and gdk structures and enums.
* gtk/gtktypeutils.h:
* gtk/gtktypeutils.c: reworked type ids, so they are variables not
macros anymore (this fixes binary incompatibility with new enum
definitions).
* gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible
key bindings for this widget.
* gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class'
handler.
* gtk/gtkobject.h:
* gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse()
again. new functions gtk_object_class_user_signal_new () and
gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType
flag on the signal creation.
Mon Jun 8 20:52:21 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
[binray incompatibility]
Fri May 15 00:56:59 1998 Tim Janik <timj@gtk.org>
* glib.h: further support for gcc function attributes: G_GNUC_FORMAT,
G_GNUC_NORETURN and G_GNUC_CONST.
* gscanner.c (g_scanner_stat_mode): changed stat() to lstat().
(g_scanner_msg_handler): "\n" at end of line!
(g_scanner_foreach_symbol): new function to iterate over the symbol
table (GScanner does value-wrapping).
Fri May 15 09:44:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h (struct _GtkWidgetClass): corrected returntype of
the visibility_notify_event method and changed method order.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Sat May 9 20:11:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LIBS): Try to figure out if this
is Digital Unix and we need -std1 to get the
right prototypes.
Sat May 9 20:08:12 1998 Owen Taylor <otaylor@gtk.org>
* glib/gmem.c: Experimentally restore GMemChunk
to its primeval state - where mem areas are
freed incrementally instead of searching the tree
every time a mem area is completely empty. Also,
always keep one mem chunk around. (Reduced calls
to malloc() a lot, but doesn't really improve
performance significiantly)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
Thu May 7 09:44:22 1998 Owen Taylor <otaylor@gtk.org>
* style_set improvements for GtkText and GtkEntry
Tue May 5 19:49:27 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c: Patches from Gordon Matzigkeit
to speed things up and remove code duplication.
Reintegrated buffer overflow patches, and added
some extra paranoia.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
(Bug located by Juergen Haas <haas@forwiss.uni-passau.de>)
Tue May 5 19:11:27 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkdrawingarea.c (gtk_drawing_area_realize): Always
set GDK_EXPOSURE_MASK for DrawingAreas
Tue May 5 14:32:37 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.[ch]: removed gtk_widge_propagate_default_style
(superceded by RC file reparsing capabilities)
* gtk/gtkwindow.c: Add handling for _GDK_READ_RFCILES client
events. (Shouldn't be sent to the InputOnly leader, which
it is now by gdk_event_send_clientmessage_toall
* gtk/testgtk.c: Added extra button to rcfiles test
to send out _GDK_READ_RCFILES events.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): deprecated macro, since it caused
multiple processing of macro args.
* gtk/gtktypeutils.c:
* gtk/gtkobject.c:
* gtk/gtkwidget.c:
* gtk/gtksignal.c: reverted GTK_TYPE_IS_A back to gtk_type_is_a.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sun May 3 13:38:22 1998 Owen Taylor <otaylor@gtk.org>
* configure.in acheader.h gdk/gdkwindow.c
Check for Shape extension both on the client and server
side. (And, more importantly, check for the shape extension
so we may include -lXext even when compiling with --disable-xshm)
Don't set override_redirect on all shaped windows. It isn't
necessary.
* gdk/gdkwindow.c: Set ->colormap to NULL for root
and foreign windows. Use this to check if we
need to get the colormap from X.
Fri May 1 22:32:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkbutton.c (gtk_button_paint): Draw the areas
between the default and the button always in GTK_STATE_NORMAL.
* gtk/gtkrange.c (gtk_range_style_set): Added a style_set
callback.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpmp[_d]):
Fix a buffer overflow on pixmaps that claim to have
more than 31 characters per pixel.
(gdk_pixmap_read_string): Don't wrap around strings longer
than half of address space ;-)
* gtk/gtk[vh]ruler.c gtk/gtkinputdialog.c: Expand some buffers
that were used for printing integers.
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
^^^^^^^ This is why some many files changed
Even where there were proper prototypes elsewhere.
* gdk/gxid.c (handle_claim_device): Some extra checks.
It isn't safe against being fed bad X id's, but at
least it should be safe against deleting all your
files.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Fri May 1 12:06:43 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.[ch] (gtk_widget_reset_rc_styles): New
function to reset the RC styles for a heirarchy
Clear the window background if necessary in
gtk_window_style_set.
* gtk/gtkrc.[ch]: New function gtk_rc_reparse_all() which
rereads all previously read RC files.
* gdk/gdkwindow.c gdk/gdk.h: New function gdk_window_get_toplevels().
(Should it just be called gdk_get_toplevels?)
* gtk/testgtk.c: New test to reload RC files.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
this change is binary compatible, so just touch gtkaccelerator.h -r gtkwidget.h
Sun Apr 12 20:09:40 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtklabel.[ch] (gtk_label_expose): Set a flag so
instead of clearing the area in advance. That looked
_really_ bad.
* gtk/gtkcontainer.c (gtk_container_class_init): Changed
"focus" to RUN_LAST.
* gtk/gtkentry.c (gtk_entry_realize): Fixed place
where allocation was used where requisition was meant.
(Found by David J N Begley <david@avarice.nepean.uws.edu.au>)
* gtk/gtkwindow.c (gtk_window_set_default): Fixed
assertion in when setting default to NULL>
("Damon Chaplin" <DAChaplin@email.msn.com>)
* gtk/gtkwidget.c (gtk_widget_unparent): Unset the
default widget on the toplevel, if necessary.
Sun Apr 12 02:04:21 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkpreview.c: Removed unecessary and harmful
htons/ntohs when storing properties. (X does the byte
swapping itself)
Wed Apr 8 17:27:40 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c (gtk_widget_unparent): Make sure
widgets get removed from the resize queue before the
connection between them and the resize queue is broken
by unparenting their parent.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main
loop properly, makes it more obvious to the user
what is going on)
* gtk/gtkwidget.c (gtk_widget_unparent): Reset the
allocation _after_ clearing the window.
* configure.in: If can't find XShmAttach in Xext, check
in XextSam (for AIX).
* gtk/gtkmain.c (gtk_events_pending): Remember, small
numbers are _high_ priority for idle queues.
* gtk/gtkmain.c (gtk_handle_current_timeouts): Allow
removing the currently running timeout.
* gtk/testgtk.c (timeout_test): Use the right prototype
for callback.
Mon Mar 30 21:40:21 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.c (gtk_clist_row_from_ypixel): removed this function,
it was unneeded and not exported.
* gtk/gtkwidget.c (gtk_widget_ref) (gtk_widget_unref): don't check-cast
the widgets to volatile GtkObjects (which was there for debugging
purposes only). these functions should probably be macros, but that
would break binary compatibility again, sigh.
(gtk_widget_destroy): removed superfluous check-casts, since the
neccessary checks are done in gtk_object_destroy anyways. this should
be a macro as well but stays as a function for the above reasoonings.
Fri Mar 27 17:58:41 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkhandlebox.c (gtk_handle_box_paint): Don't clear
the window on an expose event. On draws, just clear the
portion we are redrawing.
* gdk/gdkfont.c (gdk_fontset_load): Corrected calculation
of fontset ascent/descent.
* gtk/gtkwidget.[ch]: Added new function to show a toplevel
window and wait for it to be mapped, gtk_window_show_now ()
Thu Mar 26 21:37:57 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiobutton.c (gtk_radio_button_draw_indicator): always
display the correct active state.
* gtk/gtkcheckbutton.c (gtk_real_check_button_draw_indicator): always
display the correct active state.
* gtk/gtkwidget.c (gtk_widget_set_arg): CAN_FOCUS and CAN_DEFAULT flag
changes need to queue a resize.
* gtk/gtkbutton.c (gtk_button_paint): take border_width into
consideration for restrict area.
* gtk/gtktogglebutton.c (gtk_toggle_button_class_init): enable the
draw_default member of GtkButton, otherwise the diplay is messed up
for CAN_DEFAULT toggles.
(gtk_toggle_button_draw_focus): always display whether the toggle button
is active or not.
* gtk/gtkwidget.c (gtk_widget_set_state):
(gtk_widget_set_sensitive):
(gtk_widget_set_parent):
(gtk_widget_propagate_state): take into consideration, whether we really
want to change childrens states, or just restauration of old states.
Thu Mar 26 15:33:50 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c: When gtk_widget_draw() is called on a
REDRAW_PENDING widget, draw it and remove it from the
queue instead of doing nothing.
* gtk/Makefile.am gdk/Makefile.am: Switch order of includes
directories, to make doubly sure that wrong glibconfig.h
isn't used. (See also glib/ChangeLog)
* gtk/gtkentry.c (gtk_entry_draw_focus): Don't draw the
cursor unless the entry is editable.
(From: Stefan Jeske <jeske@braunschweig.netsurf.de>)
Sat Mar 21 22:54:31 1998 Tim Janik <timj@gtk.org>
* gtk/gtkhandlebox.h:
* gtk/gtkhandlebox.c: major overhaul of the code, fixed all
known bugs (hopefully ;).
Sat Mar 20 15:33:17 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_show): queue the resize for the
parent.
Thu Mar 19 02:00:50 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_unrealize): unset flags after emission,
especially GTK_MAPPED, since that might not have been taken care of
by an UNMAP emission.
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 16:19:47 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c:
* gdk/gdkvisual.c: changed some debugging messages to be prefixed
by "Gdk:".
* gtk/gtkwidget.c (gtk_widget_real_draw): applied
gtk-shige-980317-0.patch.gz to set all event fields, but modified
the event.send_event field to be set to TRUE, since the event is not
really comming from the server.
* gtk/gtkwindow.c (gtk_window_init): applied gtk-ograf-980317-1.patch.gz
which cares about an initial setting of program name and program class.
* gdk/gdk.c (gdk_init): applied gtk-ograf-980317-0.patch.gz, which
strips leading pathnames from gdk_progname.
Sun Mar 15 20:13:42 1998 Tim Janik <timj@gimp.org>
* gtk/gtkmain.c (gtk_quit_destructor): removed the ugly check whether
we need gtk_widget_destroy or gtk_object_destroy. these functions are
by no means allowed to act differently!
* gtk/gtkmisc.c (gtk_misc_set_alignment): check for _DRAWABLE instead
of _VISIBLE to operate on widget->window.
(gtk_misc_set_padding): likewise.
* gtk/gtkwidget.c: slightly reordered object arguments.
* gtk/gtkobject.c (gtk_object_setv):
* gtk/gtkobject.c (gtk_object_getv):
operator `!' has precedence over `&'.
Sat Mar 14 02:03:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtksignal.c: make use of *_by_id() functions for handler key.
* gtk/gtkwidget.c: make use of *_by_id() functions for a bunch of keys.
(gtk_widget_shutdown): new function to perform pre-destruction shutdown
of the widget.
(gtk_widget_unparent): call gtk_widget_set_parent_window(widget,NULL)
* gtk/gtkobject.h:
* gtk/gtkobject.c: GtkObject destruction is now split into an internally
used shutdown class method and the usual GtkObject::destroy signal
emission. this allowes for class based shutdown functionality prior
to actuall object destruction.
added *_by_id() counterparts for gtk_object_data_* functions, meant for
internal use only.
* gtk/gtkmain.c (gtk_quit_add_destroy): new function which will destroy
a GtkObject once gtk_main() of a certain level finishes. it is save to
destroy the object prior to that, gtk_quit_add_destroy will only destroy
objects that are still existing.
Fri Mar 13 18:25:07 1998 Tim Janik <timj@gimp.org>
* gtk/gtkcombo.c: fix popup calculations (removal
of FIXMEs), changes from Lars Hamann.
Fri Mar 13 10:25:16 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: renamed gtk_widget_delete_hides to
gtk_widget_hide_on_delete at owens request, and because the
new name is much more descriptive.
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.h:
* gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
the erronerous gdk_query_visuals() function in favour of
gdk_list_visuals() which does a correct job.
* gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
a class cast check.
* gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
'+' sign acceptance.
* gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
cares about delayed tab label creation.
Mon Mar 9 15:48:10 1998 Tim Janik <timj@gimp.org>
* Signal signedness and naming corrections, plus GtkType fixes:
* gtk/gtkadjustment.c:
* gtk/gtkbutton.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkclist.c:
* gtk/gtkcolorsel.c:
* gtk/gtkcontainer.c:
* gtk/gtkcurve.c:
* gtk/gtkdata.c:
* gtk/gtkeditable.c:
* gtk/gtkentry.c:
* gtk/gtkhandlebox.c:
* gtk/gtkinputdialog.c:
* gtk/gtkitem.c:
* gtk/gtklist.c:
* gtk/gtkmenuitem.c:
* gtk/gtkmenushell.c:
* gtk/gtknotebook.c:
* gtk/gtkstatusbar.c:
* gtk/gtktoolbar.c:
* gtk/gtktree.c:
* gtk/gtktreeitem.c:
* gtk/gtkwidget.c:
* gtk/gtktogglebutton.c:
* gtk/gtkwindow.c:
made the <widget>_signals[] arrays of type guint rather than gint.
* gtk/gtkwidget.c (gtk_widget_get_ancestor): made widget_type a GtkType.
* gtk/gtkcombo.h:
handler ids need to be of type guint (entry_change_id, list_change_id).
* gtk/gtkaccelerator.c:
changed signal_num to signal_id and typed it guint.
* gtk/gtkmain.c: made gtk_ndebug_keys a guint.
* gtk/gtkmenu.h:
* gtk/gtkmenu.c:
(gtk_menu_popup): made button a guint.
(gtk_menu_set_active): made index a guint.
* gtk/gtkmenuitem.h:
* gtk/gtkmenuitem.c:
made accelerator_signal a guint.
* gtk/gtkoptionmenu.h:
* gtk/gtkoptionmenu.c:
(gtk_option_menu_set_history): made index a guint.
* gtk/gtksignal.h:
* gtk/gtksignal.c:
* gtk/gtkobject.h:
* gtk/gtkobject.c: changed a bunch of prototypes to take guints rather
than gints. also made some conversions from guint to GtkType, left over
from when the fundamental-types system was introduced.
* gtk/gtkobject.h:
* gtk/gtkobject.c: made object_data_id_index and obj_count guints.
made *signals and nsignals guints in GtkObjectClass.
Thu Mar 5 01:22:06 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c (gtk_widget_unparent): Unset allocation
on unparent, to force reallocation if we get adding back
to a new parent which is already size-allocated.
* gtk/gtktreeitem.c: Keep track of separate +/- pixmaps
for each colormap, removed the idle hack.
* gdk/gdk.c: Don't warn when unable to open XIM method,
since X11R5 apparently has no default method.
* gtk/gtkwidget.c (gtk_widget_set_style_internal): Don't
call size_request on initial emission - since the
widget size isn't set yet, it can't change.
* gtk/Makefile.am: New rules 'test' and 'test-debug' to run
testgtk with the correct working directory.
* gtk/gtkentry.c (gtk_move_forward_word):
Check for position at end of line.
* gtk/gtkinputdialog.h (struct _GtkInputDialogClass):
removed 'gpointer data' arguments from default handler
structures.
Sun Mar 1 22:59:09 1998 Tim Janik <timj@gimp.org>
* gtk/gtkstatusbar.h:
* gtk/gtkstatusbar.c: complete api change to honour message contexts.
unfortunaltely this also involved argument changes on the signal
emissions which will not be caught by the compiler. your callbacks
should look like:
void message_text_popped (GtkStatusbar *statusbar,
guint context_id,
const gchar *text,
gpointer func_data);
* gtk/gtkwidget.c (gtk_widget_set_rc_style): eliminated bug about
initial signal emission.
(gtk_widget_set_parent): don't ensure style, just call
gtk_widget_set_style_recurse.
(gtk_widget_set_style_recurse): only change a widget's rc styles if
if there has already been a lookup.
* gtk/testgtk.c: adaptions for statusbar widget.
substituted notebook pixmaps with pixmaps from fvwm, since
we don't know where the originals came from.
* gtk/gtkobject.c (gtk_object_data_destroy): call the destroy
notifier with the objects data, not its internal structure.
* gtk/gtkspinbutton.c (gtk_spin_button_button_press): small
fix from lars.
Sun Mar 1 18:41:07 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwidget.c (gtk_widget_restore_default_style): hm if we save the
default style, we should also provide a function to restore it ;).
* gtk/main.[hc]: small fixups to idle handlers, added support for quit
handlers.
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org>
* gtk/gtktipsquery.c: we make an active server grab now, this way we
can change the cursor globally and don't need to tweak event masks
of other windows.
* gtk/gtkframe.c (gtk_frame_style_set): recompute label size.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
New signal GtkWidget::style_set to be emitted when a widget's style
changed. New flag GTK_RC_STYLE to indicate whether an rc lookup has
been perfomed for the widget.
(gtk_widget_ensure_style): New function.
(gtk_widget_set_rc_style): New function.
* docs/styles.txt: new file.
Sat Feb 21 15:33:20 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: renamed signal GtkWidget::set_parent to
GtkWidget::parent_set. since it's purpose is pure notification,
it should have been named this way in the first place.
Thu Feb 19 06:56:52 1998 Tim Janik <timj@gimp.org>
* gtkbox.c:
* gtkbutton.c:
* gtkcontainer.c:
* gtkframe.c:
* gtklabel.c:
* gtkobject.c:
* gtkwidget.c:
* gtkwindow.c:
present the argument access masks on their announcement.
* gtk/gtkobject.h:
* gtk/gtkobject.c:
(gtk_object_add_arg_type): take an additional argument describing
the access mask of the new arg. this can be of GTK_ARG_READABLE,
GTK_ARG_WRITABLE or GTK_ARG_READWRITE (the latter is an alias for
the two previous ones).
(gtk_object_query_args): provide an access_mask array if desired.
* gtk/gtkwidget.c (gtk_widget_real_realize):
realized the assumtion that widget is a NO_WINDOW widget
in actuall code.
* gtkwindow.c:
slight changes to gtk_window_configure_event that will make
the resizing behaviour a little less odd.
sigh, for some (buggy) reason, there are still container resizes
triggered by manual resizing to very small window sizes.
the cointainer resizes will cause gtk_real_window_move_resize to
be invoked, which makes the app look like it wants to fight the users
resizing action. ;(
Wed Feb 18 04:38:24 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
new signal GtkWidget::set_parent. this signal will be emitted once a
widget gets a new/no parent assigned (i.e. from gtk_widget_unparent
and gtk_widget_set_parent).
Tue Feb 17 05:41:31 1998 Tim Janik <timj@gimp.org>
* gtk/gtkcheckbutton.c:
* gtk/gtkradiobutton.c:
* gtk/gtktogglebutton.c:
applied patch to fix draw_indicator behaviour from Lars Hamann
and Stefan Jeske.
* gtk/gtkmain.h:
* gtk/gtkmain.c (gtk_grab_get_current): new function
that returns the current grab widget or NULL.
* gdk/gdkwindow.c (gdk_window_shape_combine_mask): remove
shape mask if mask==NULL (provided by Stefan Wille).
* gtk/gtkentry.c gtk/gtkinputdialog.c gtk/gtklist.c
gtk/gtklistitem.c gtktree.c gtk/gtktreeitem.c testgtkrc:
Change style->white to style->base[] where appropriate.
Change the default style to make this apparent. (Yes, it's
ugly... it can be removed later)
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.
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/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.
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.)
Mon Jan 19 09:16:38 1998 Tim Janik <timj@psynet.net>
* gtk/gtkmain.c (gtk_grab_add) (gtk_grab_remove): this is a stack
of grabbing widgets now, having unique entries. the GTK_HAS_GRAB
flag of a widget is set while it is on the stack (wasn't
implemented before).
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sun Jan 18 03:57:52 1998 Tim Janik <timj@psynet.net>
* gtk/gtkframe.c: gtk_*_get_arg() and gtk_*_set_arg() implementations.
* gtk/gtkobject.c: new arg `GtkObject::object_signal' similar to
`GtkObject::signal'. check for class type in gtk_object_{setv|getv}.
* gtk/gtkobject.c:
* gtk/gtksignal.c:
* gtk/gtktypeutils.h:
* gtk/gtktypeutils.c: added GTK_TYPE_DOUBLE.
* gtk/gtkwidget.c: new args `has_focus' and `has_default'.
* gtk/gtkwindow.c: new arg `window_position'.
Sun Jan 18 03:57:52 1998 Tim Janik <timj@psynet.net>
* gtk/gtkbox.h:
* gtk/gtkbox.c: new functions gtk_box_reorder_child,
gtk_box_query_child_packing and gtk_box_set_child_packing to
allow modification of the child linkage after the widget tree
is setup.
* gtk/gtkbox.c:
* gtk/gtklabel.c:
* gtk/gtkwindow.c:
* gtk/gtkwidget.c:
* gtk/gtkobject.c: gtk_*_get_arg() and gtk_*_set_arg() fixes
and implementations.
fault; I wrote them hurriedly before going on vacation, and I never
did any testing. Sorry :-)
Apart from the fix in Gdk, I added the corresponding
"visibility_notify_event" to GtkWidget.
- Federico
* gtk/gtkviewport.c: corrects a small resize bug in the
viewport widget. The viewport widget provides a _set_shadow
function to draw its shadows. But if GTK_SHADOW_NONE is sent
to this function, the viewport isn't resized correctly (it's
still considered as a shadowed widget). (gtk-fortier-971213-0)
* gtk/gtknotebook.c: this patch fixes the redraw problems of
notebook tabs, without using gdk_gc_set_clip_rectangle.
(gtk-hamann_jeske-971218-0)
* add gtk_widget_(show/hide)_all (Stefan Wille)
(gtk-wille-301297-0) Patch for testgtk not included
because it did not patch clean.
-Shawn