Wed Jan 20 11:19:00 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c: Use floor() instead of truncating
to integer values so we get translation invariance.
* gtk/gtklayout.c (gtk_layout_size_allocate): Set upper
and lower values for adjustments in size_allocate().
* gdk/gdkwindow.c gdk/gdk.h gdk/gdkprivate.h: New
function gdk_window_set_static_gravities() to set
up a window for guffaw scrolling.
* gdk/gdkwindow.c (gdk_window_internal_destroy): Set flags
indicating destroyed state before cleanup.
* gtk/gtkprivate.h gtk/gtkwidget.c: Add a new
private flag IS_OFFSCREEN. If set, this indicates
to GTK+ that the widget is not to be considered
viewable regardless of its map state. Queued draws
on offscreen widgets are suppressed.
Added new function static gtk_widget_is_offscreen() to
check this flag on a widget and its ancestors.
* gtk/gtklayout.[ch]: Major revisions.
- Use gdk_window_set_static_gravities to set static gravity
on all child windows, and thus avoid having to create a window
for NO_WINDOW children.
- Adjust allocations of children as we scroll them
so queued draws work correctly.
- Don't allocate our children directly in a put()
or move(); just queue a resize() like every other
widget.
* gtk/testgtk.c: Make the arrows on the scrollbars
work, create a larger and more demanding test.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):
New functions to set the colormap or visual
of an existing widget. These functions should not
be called on a widget that has previosly been
realized.
* gtk/gtkcolorsel.c (gtk_color_selection_dialog_init):
Set the visual and colormap on the toplevel dialog,
then push them for the child widgets. As opposed
to push/pop in _new(), this way, things will work
properly with gtk_widget_new().
Mon Jan 25 11:05:10 1999 George Lebl <jirka@5z.com>
* gtk/gtkbutton.c: set RECEIVES_DEFAULT on init, and a
button press on the widget doesn't grab default anymore
* gtk/gtkcheckbutton.c,gtk/gtkoptionmenu.c,gtk/gtkradiobutton.c:
unset RECEIVES_DEFAULT on init
* gtk/gtkwidget.[ch]: add a RECEIVES_DEFAULT flag to widget
flags
* gtk/gtkwindow.c,gtk/gtkplug.c: on pressing <enter>, activate
the focused widget if it is a RECEIVES_DEFAULT widget,
no matter what the current default_widget is
* gtk/gtkwindow.c: on focus change, migrate the HAS_DEFAULT
flag to CAN_DEFAULT widgets if they RECEIVE_DEFAULT as well
or migrate it back to the default_widget if the focus widget
doesn't "RECEIVE_DEFAULT"
Thu Jan 21 16:03:02 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c (gtk_button_expose): Code cleanup.
* gtk/gtktree.c: Add a paint routine, fix up bugs
in drawing where if the expose area was contained
completely in the right side of the tree the background
wasn't redraw, etc.
* gtk/gtkwidget.c (gtk_widget_clip_rect): Fix a bug
in clipping draw regions while propagating them
upwards.
Sun Jan 17 22:47:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
* gtk/gtkspinbutton.[hc]:
* gtk/gtkscrolledwindow.[hc]:
* gtk/gtkprogressbar.[hc]:
* gtk/gtkpreview.[hc]:
* gtk/gtkobject.[hc]:
* gtk/gtkentry.[hc]:
* gtk/gtkctree.[hc]:
* gtk/gtkcontainer.[hc]:
* gtk/gtkclist.[hc]:
removed deprecated functions: gtk_clist_set_border,
gtk_container_block_resize, gtk_container_unblock_resize,
gtk_container_need_resize, gtk_ctree_set_reorderable,
gtk_ctree_show_stub, gtk_ctree_set_use_drag_icons,
gtk_entry_adjust_scroll, gtk_object_class_add_user_signal,
gtk_preview_put_row, gtk_progress_bar_construct,
gtk_scrolled_window_construct, gtk_spin_button_construct,
gtk_widget_freeze_accelerators, gtk_widget_thaw_accelerators.
* gtk/gtkcheckmenuitem.c: removed binary variant of
gtk_check_menu_item_set_state, this is still defined in gtkcompat.h
though.
* docs/Changes-1.2.txt:
removed section about gtk_idle_remove_by_data vs.
gtk_timeout_remove_by_data, we actually don't even provide a
gtk_timeout_remove_by_data() function.
added a table with removed functions and their replacements.
* NEWS: updates for 1.1.13.
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):
nparams for selection_get should be 3, not 2.
[ From Damon Chaplin <damon@karuna.freeserve.co.uk> ]
* gtk/gtkeventbox.c (gtk_event_box_paint): Add a paint
routine so queued redraws work inside event boxes.
Thu Jan 14 17:47:37 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable): Only
redraw character under cursor when not displaying
highlighted selection.
* gdk/gdkrgb.c (gdk_rgb_init): Add in a cast to
gpointer to make IRIX cc happy.
Thu Jan 14 12:29:50 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcheckbutton.c (gtk_check_button_draw): Restructure
the drawing code to remove a bit of duplication -
and to remove a call to gtk_widget_draw_focus()
that queues a redraw when an expose occurs.
* gtk/gtklabel.c (gtk_label_expose): Fix up handling
of ypadding.
* gtk/gtknotebook.c (gtk_notebook_draw): If we redraw
the whole widget, also redraw the corresponding
areas of the child widget. (have_visible_child
still has some problems)
* gdk/gdkpixmap.c: Change some g_new's to g_new0 so
that fields unused for pixmaps get initialzized
sanely.
* gdk/gdk.h gdk/gdkwindow.c gdk/gdkprivate.h: Add new calls
gdk_window_is_visible() and gdk_window_is_viewable()
and a mapped flag to the window private structure.
* gtk/gtkbin.c gtk/gtkclist.c gtk/gtkfixed.c gtk/gtkitem.c
gtk/gtklayout.c gtk/gtklist.c gtk/gtkmenushell.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtktree.c
gtk/gtktreeitem.c gtk/gtkviewport.c:
Map windows after mapping children.
* gtk/gtkwidget.c (gtk_widget_clip_rect): Handle
rectangles completely clipped away correctly.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
call gtk_widget_draw if width or height is 0.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Don't
rely on GTK_REDRAW_PENDING after we've cleared
it. (This was causing draw-combining to not
happen at all).
* gtk/gtkbin.c gtk/gtkscale.c: Remove uneccessary calls
to gtk_widget_queue_draw() when mapping.
Wed Jan 13 13:28:00 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
that expose events will be generated.
(gtk_widget_map): only queue_draw for NO_WINDOW widgets.
(gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
(gtk_widget_size_allocate): we don't need a queue_clear on changing
allocations of !NO_WINDOW widgets, we do still need a full redraw for
them though.
* gtk/gtklabel.c (gtk_label_set_text): check whether the new string
actually differs from the original.
Tue Jan 12 13:47:07 1999 Tim Janik <timj@gtk.org>
* reworked the redrawing heuristics somewhat, this fixed a bunch of
existing redrawing problems and majorly reduces overall redrawing needs
during normal operation. basically we now only queue redraws when
neccessary and much rely on the draw_area coalescing code in gtkwidget.c
to optimize the queued portions. widgets will now upon reallocation only
get redrawed if their allocation has changed. upon hide/show only the
area allocated by the child will be queued for the parent, this has the
side effect that parents which change their appearance in dependance on
the numer of visible children have to keep track of their children's
visiblity and eventually fully redraw themselves. this is a minor
constrain with great benefits in terms of redraw reduction, and only got
triggered by the notebook widget.
* gtk/gtkwidget.c:
(gtk_widget_queue_clear): don't bother if width and height == 0.
(gtk_widget_queue_clear_child): new static function to queue a redraw of
the area obscured by a child on a parent.
(gtk_widget_queue_resize): queue_clear the widget if it is drawable.
(gtk_widget_show): queue resize on the widget before showing.
(gtk_widget_hide): queue resize on the widget after hiding.
(gtk_widget_map): queue_draw the widget after mapping.
(gtk_widget_unmap): queue_clear_child the widget.
(gtk_widget_size_allocate): queue_clear_child and queue_draw if the
widget's allocation changed.
(gtk_widget_unparent): queue_clear_child so the parent redraws obscured
portions.
(gtk_widget_real_show):
(gtk_widget_real_hide):
(gtk_widget_real_map):
(gtk_widget_real_unmap):
(gtk_widget_real_size_allocate): don't bother with redraw queueing,
descendants that override these functions don't do either and we handle
all redrawing/resizing related stuff before or after the signal emission
now.
* gtk/gtkcontainer.c:
(gtk_container_resize_children): don't bother about redrawing anymore
since gtk_widget_size_allocate handles that for us now.
* gtk/gtknotebook.h:
* gtk/gtknotebook.c:
added a flag have_visible_child to indicate whether we need to draw
non child related portions at all, e.g. shadows etc.
(gtk_notebook_draw): if have_visible_child changed, do a full paint
instead of updating a small area only.
Mon Jan 11 20:44:35 1999 Tim Janik <timj@gtk.org>
* gtk/gtkstyle.c: changed gtk_style_apply_default_pixmap to
gtk_style_apply_default_background which takes an extra argument
copy_area to determine NO_WINDOW widget pixmap copying.
changed callers accordingly.
* gtk/gtktogglebutton.c:
(gtk_toggle_size_allocate):
(gtk_toggle_button_expose):
(gtk_toggle_button_paint): avoid messing with our parent's window if
toggle_button->draw_indicator == TRUE and we are a NO_WINDOW widget.
* gtk/gtkcheckbutton.c (gtk_real_check_button_draw_indicator): draw
the draw_indicator with GTK_STATE_ACTIVE if the toggle button is active.
* gtk/check-n.xpm:
* gtk/check-y.xpm:
* gtk/testgtkrc: set pixmaps for ACTIVE and NORMAL check button
bg_pixmaps.
Thu Jan 7 19:10:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkviewport.c (gtk_viewport_style_set): Fixes
to drawing the background of the bin window
so that clearing and redrawing of child
widgets work properly.
* gtk/gtkwidget.c (gtk_widget_idle_draw): Juggle around
data so that if somebody triggers more redraw queuing
from a expose_event handler, it doesn't confuse the
heck out of GTK+. (But is highly liable to cause
an infinite loop...)
Sat Dec 19 17:28:30 1998 Owen Taylor <otaylor@redhat.com>
* configure.in: Don't add the gthread libs to
GLIB_LIBS either, or -lgthread -lpthread will get
pulled into all applications because of shlib deps.
* gtk/gtkmain.h gtk/gtkwidget.c gtk/gtk gdk/gdk:
Use GLIB's priority #define. Revise scale of
priorities.
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
thread lock back to GDK - we need it there for locking
when translating events. Rename things appropriately.
Wed Dec 16 11:44:21 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_expose): Fix a x/y typo.
CVS:
Wed Dec 16 05:26:32 1998 Tim Janik <timj@gtk.org>
* configure.in: version bump to 1.1.8, binary age 0, interface age 0,
depend on GLib 1.1.8.
* gdk/gdkprivate.h:
* gdk/gdkglobals.c: removed last Gdk threads specific bits.
* gtk/gtkmain.c (gtk_init): s/g_thread_supported/g_thread_supported()/.
* gtk/gtkprivate.h: changed GTK_THREADS_ENTER and GTK_THREADS_LEAVE
to function macros GTK_THREADS_ENTER() and GTK_THREADS_LEAVE().
honour G_THREADS_ENABLED in the definition of GTK_THREADS_ENTER()
and GTK_THREADS_LEAVE(). changed callers accordingly.
Tue Dec 15 01:38:53 1998 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Commented out testthreads from
the build process, since we won't have any idea
how to create a thread.
* configure.in (LIBS): use glib-config ... gthread
so we always build a thread-compatible library.
* gtk/gtkaccellabel.c gtk/gtkclist.c gtk/gtkcolorsel.c
gtk/gtkcombo.c gtk/gtkcontainer.c gtk/gtkentry.c
gtk/gtklist.c gtk/gtkmenuitem.c gtk/gtknotebook.c
gtk/gtkrange.c gtk/gtkselection.c gtk/gtkspinbutton.c
gtk/gtktext.c gtk/gtktooltips.c gtk/gtkwidget.c:
Add GTK_THREADS_ENTER/LEAVE pairs around timeouts
and idles to account for the fact that they are no
longer called within the GTK+ lock.
* gtk/gtkprivate.h: Added definitions for locking
the main GTK+ mutex.
* gtk/gtkmain.c: Re-implement the main loop
in terms of the GLib main loop.
* gdk/gdk.h gdk/gdkthreads.c gdk/Makefile.am: Removed threading
functionality, as it seems better to subsume GDK within the
GTK+ lock than vice-versa.
* gdk/gdkevents.c: New file, containing event handling bits
from gdk.c.
* gdk/gdkevents.c: Implement event source for GDK
events.
* configure.in gdk/gdkevents.c: Removed attempts to
subtract base_id, which were already non-functional.
Mon Dec 14 02:42:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c: made GtkWidget::grab_focus a RUN_LAST and
RUN_ACTION signal. moved stuff from gtk_widget_grab_focus() into
gtk_widget_real_grab_focus() so a signal is always emitted
if the focus is grabbed on a widget.
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
signal for widgets. When the signal is emitted, the widget will
grab the focus. This is needed to let the user press an
accelerator key in a dialog box and have the corresponding widget
be focused.
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
signal. The default handler is simply gtk_widget_grab_focus().
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Thu Dec 3 06:20:59 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c: moved checks upon focus setting from
gtk_window_real_set_focus to gtk_window_set_focus, so we don't
emit the signal if unneccessary.
* gtk/gtkwidget.c (gtk_widget_grab_focus): clear up the old focus
containers when grabbing focus on a new widget. this is based on
a patch from Alexis Mikhailov, submitted to gtk-list on 4 Nov 1998.
* gtk/gtkclist.c (gtk_clist_focus_out): set CLIST_CHILD_HAS_FOCUS
flag, so we take the buttons into consideration upon the next focus
request.
* gtk/gtkcontainer.c (gtk_container_set_focus_child): fixed an
assertment.
Wed Dec 2 01:39:02 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: s/gtk_notebook_nth_page/gtk_notebook_get_nth_page/.
* incremented version number to 1.1.6 and made Gtk
dependant on GLib 1.1.6.
* gtk/gtkwidget.h (struct _GtkRequisition): changed width and height
from guint16 to gint16, since sizes bigger than 32767 are not supported
anyways, and aritmethics with intermediate negative values are possible
now.
Tue Dec 1 00:00:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c:
implementation of GTK_POLICY_NEVER functionality, added rationales
on the policy and size requisition handling at the top.
(gtk_scrolled_window_size_request):
we assume a default minimum for our child's width and height
if [hv]scrollbar_policy != GTK_POLICY_NEVER, except when the user
specified the dimension explicitely.
(gtk_scrolled_window_size_allocate):
do not show scrollbars if [hv]scrollbar_policy == GTK_POLICY_NEVER.
* gtk/gtkviewport.c (gtk_viewport_size_request): report the real
size we require (including the child).
* gtk/gtkclist.c:
(gtk_clist_size_request): report the real size required.
* gtk/gtkenums.h (enum GtkPolicyType): added GTK_POLICY_NEVER.
* gtk/gtkobject.c (gtk_object_init_type): object_type doesn't
need to be a static variable.
Mon Nov 30 22:41:25 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h:
* gtk/gtkclist.c:
* gtk/gtkviewport.h:
* gtk/gtkviewport.c:
* gtk/gtktext.h:
* gtk/gtktext.c:
* gtk/gtklayout.h:
* gtk/gtklayout.c:
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
s/scroll_adjustements/scroll_adjustments/
s/scroll_adjustments/set_scroll_adjustments/g
I submitted this patch twice to gtk-devel-list, and received no comments, so
am committing it. Although not exhaustively tested, I have been using this
gtk+ for a week w/o problems, and I did read the code to ensure that nothing
ever writes to these data structures. If by chance people encounter SEGV's in
gtk+ code that is setting values in global data structures, this patch could
be a possible culprit.
1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
* {gdk,gtk}/*.c: Make read-only data structures "static const" to
allow them to be shared, mainly including (but not limited to) the
GtkTypeInfo structures for each class.
* gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 03:13:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c: changed scrolled window inheritance,
it inherits from GtkBin now.
* gtk/gtkbin.c (gtk_bin_unmap): removed superfluous check for
visibility of child.
(gtk_bin_draw): removed superfluous check for GTK_WIDGET_DRAWABLE().
added check so a child gets only drawn if it's visible.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: removed gtk_widget_draw_children().
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: rmoved gtk_reset_widget_shapes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: removed crufty relict: gtk_widget_is_child().
added internal function gtk_widget_reset_shapes() from gtkstyle.c.
* gtk/gtkrc.h:
* gtk/gtkrc.c: (gtk_rc_find_pixmap_in_path): removed bogus gscanner
argument, changed callers.
* gtk/gtkmenufactory.c: GtkMenuFactory is deprecated for a long time,
it will issue a warning now.
* gtk/gtkcompat.h: new file to #define aliases for historic
function names.
* changed 8 function names for consistency and provided aliases to keep
source compatibility in gtkcompat.h:
(gtk_accel_label_get_accel_width): renamed from gtk_accel_label_accelerator_width
(gtk_container_set_border_width): renamed from gtk_container_border_width
(gtk_notebook_get_current_page): renamed from gtk_notebook_current_page
(gtk_packer_configure): renamed from gtk_packer_set_child_packing
(gtk_paned_set_gutter_size): renamed from gtk_paned_gutter_size
(gtk_paned_set_handle_size): renamed from gtk_paned_handle_size
(gtk_scale_get_value_width): renamed from gtk_scale_value_width
(gtk_window_set_position): renamed from gtk_window_position
* renamed a few recently added funtions for consistency:
(gtk_notebook_get_tab_label): renamed from gtk_notebook_query_tab_label.
(gtk_notebook_get_menu_label): renamed from gtk_notebook_query_menu_label.
(gtk_progress_configure): renamed from gtk_progress_reconfigure.
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: deprecated gtk_widget_freeze_accelerators and
gtk_widget_thaw_accelerators, we provide gtk_widget_lock_accelerators
and gtk_widget_unlock_accelerators.
* gtk/gtklayout.h:
* gtk/gtklayout.c: implemented incremental freezing facility.
* gtk/gtktext.h:
* gtk/gtktext.c: implemented incremental freezing facility.
* gtk/gtkenums.h:
* gtk/gtkaccelgroup.h: moved enum GtkAccelFlags into this place.
* gtk/gtkentry.h:
* gtk/gtkentry.c:
deprecated gtk_entry_adjust_scroll().
* random GtkType, macro and indentation fixes.
Fri Nov 27 22:50:15 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h:
* gtk/gtkclist.c: implemented incremental freezing facility, added
a new class member (*refresh)() which takes over the thaw
functionality. the clist FROZEN flag got removed on the way.
* gtk/gtkctree.c: adaptions to feature the clist refresh functionality
and incremental freezing.
* gtk/gtkcalendar.c: implemented incremental freezing facility.
Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org>
* gtk/gtkprogress.c: added args ::show_text, ::text_xalign,
::text_yalign, ::activity_mode.
* gtk/gtkprogressbar.c: added construct arg ::adjustment. added args
::bar_style, ::orientation, ::discrete_blocks, ::activity_step,
::activity_blocks.
(gtk_progress_bar_new):
(gtk_progress_bar_new_with_adjustment): use gtk_widget_new().
(gtk_progress_bar_construct): deprecated.
* gtk/gtkvscrollbar.c:
(gtk_vscrollbar_draw_step_back):
(gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for
gtk_paint_arrow, to be consistent with hscrollbar.
* gtk/gtktext.c
added construct args ::hadjustment, ::vadjustment.
added args ::line_wrap, ::word_wrap.
(gtk_text_class_init): added scroll_adjustments signal.
(gtk_text_new): use gtk_widget_new.
(gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments,
so we don't screw the reference counts and don't leave signals connected.
(gtk_text_destroy): disconnect adjustments signals.
(gtk_text_finalize): unref adjustments.
* gtk/gtkctree.c: added construct args ::n_columns and ::tree_column.
added args ::indent, ::spacing, ::show_stub, ::reorderable,
::use_drag_icons, ::line_style and ::expander_style.
(gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is
deprecated now.
* gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag.
* gtk/gtkclist.c:
removed ::vadjustment and ::hadjustment args, introduced
::scroll_adjustments signal.
added ::shadow_type, ::selection_mode and ::row_height args.
added n_columns construct arg.
(gtk_clist_construct): call gtk_object_constructed().
(gtk_clist_set_row_height): if height is passed as 0,
revert to automatic height calculation.
(gtk_clist_destroy): before unrefing the adjustments, disconnect our
signal handlers.
Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct
like gtk_object_new.
(gtk_widget_destroy): assert that we only destroy constructed widgets.
* gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY
to identify args that may only be used for construction.
GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction
time.
* gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct
at the end if the object is not fully constructed.
(gtk_object_newv): likewise.
(gtk_object_destroy): assert that we only destroy constructed objects.
(gtk_object_init): setup GTK_CONSTRUCTED from the
objects real klass.
(gtk_object_default_construct): new function to complete default
construction of an object by applying missing construtor args with
default values of 0, 0.0 or NULL.
(gtk_object_constructed): new function to mark an object as being
constructed (used from within constructors).
* gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer
so it is immediatedly available for the caller.
* gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to
the object initilizer (GtkObjectInitFunc takes a second arg now, the
real klass), and asure that object initializers may temporarily alter
the class pointer.
Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: change all occourances of gtk_container_add (
scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...)
for widget!=(clist, ctree, text, viewport).
* gtk/gtkcombo.c:
(gtk_combo_init): use gtk_scrolled_window_add_with_viewport()
to add children to the scrolled window.
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
changed scrolled_window->viewport to scrolled_window->child, and use
gtk_widget_scroll_adjustements() to set the scroll adjustments for the
widget, we do not create an additional viewport anymore.
added ::hadjustment and ::vadjustment constructor args.
(gtk_scrolled_window_new): use gtk_widget_new() to create the widget.
(gtk_scrolled_window_set_hadjustment):
(gtk_scrolled_window_set_vadjustment): new functions that superceed
gtk_scrolled_window_construct.
(gtk_scrolled_window_construct): deprecated this function.
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
support a constructor arg "::adjustment", and use gtk_widget_new() for
the widget creation.
* gtk/gtkrange.c: added ::update_policy arg.
(gtk_range_set_adjustment): if adjustment is passed in as NULL, create
a default adjustment so this function can be used for derived widgets
that depend on the adjustment's existance.
(gtk_range_destroy): disconnect the adjustment signal, so we don't
get called after we got destroyed, we don't destroy the adjustment
in here, because it might have been provided from another widget.
* gtk/gtkviewport.c: introduced ::scroll_adjustments signal.
(gtk_viewport_destroy): same as gtk_range_destroy.
* gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: changed gtk_widget_activate() to return a
gboolean, indicating whether this widget supports activation.
added gtk_widget_scroll_adjustements() to set the scrolling
adjustments of a widget.
Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c:
(gtk_option_menu_remove_contents):
(gtk_option_menu_update_contents): removed
gtk_container_[un]block_resize() pairs.
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: removed the tab_border field, since it shouldn't
be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a
wrtie-only argument.
* *.c: made deprecated functions issue a message:
gtk_clist_set_border, gtk_container_block_resize,
gtk_container_unblock_resize, gtk_container_need_resize,
gtk_object_class_add_user_signal, gtk_spin_button_construct,
gtk_scrolled_window_construct.
removed non-functional functions:
gtk_container_disable_resize, gtk_container_enable_resize,
gtk_clist_set_policy.
Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbox.c (gtk_box_init):
* gtk/gtkdrawingarea.c (gtk_drawing_area_init):
* gtk/gtkeventbox.c (gtk_event_box_init):
* gtk/gtkfixed.c (gtk_fixed_init):
* gtk/gtkframe.c (gtk_frame_init):
* gtk/gtkhandlebox.c (gtk_handle_box_init):
* gtk/gtkpacker.c (gtk_packer_init):
* gtk/gtkmisc.c (gtk_misc_init):
* gtk/gtkpreview.c (gtk_preview_init):
* gtk/gtkprogress.c (gtk_progress_init):
* gtk/gtkprogressbar.c (gtk_progress_bar_init):
* gtk/gtkseparator.c (gtk_separator_init):
* gtk/gtktable.c (gtk_table_init):
* gtk/gtkviewport.c (gtk_viewport_init):
* gtk/gtkalignment.c (gtk_alignment_init):
removed setting of the GTK_BASIC flag.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic.
* miscellaneous GtkType and macro fixups.
Sun Oct 18 20:52:22 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c gtkmarshal.list: Change signal
for drag_data_get to match the use that was being
made of it everywhere else...
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
Mon Oct 12 07:51:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_handlers_destroy): only unref those
handlers that have not yet been disconnected (finally managed to
trigger the gtk_signal_handler_unref() paranoid warning).
Sat Oct 10 03:37:50 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): fixed default value for x, y,
width and height which is -1 and not -2.
Thu Sep 3 04:22:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
GTK_MENU_DIR_CHILD: check for the existance of
menu_shell->active_menu_item before accessing its child.
GTK_MENU_DIR_PREV:
GTK_MENU_DIR_NEXT: if we haven't had an active item and still
don't, make a default selection.
Wed Sep 2 00:28:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_propagate_state): iterate
the children with _forall for sensitivity changes and with
_foreach on pure state changes. this fixes a lot of the
old inclusions of internal widgets into _foreach calls.
* gtk/gtktree.c: removed gtk_tree_foreach, let gtk_tree_forall
do the work. don't walk the subtrees of first level children.
* gtk/gtktreeitem.c: provide a _forall implementation,
which walks the subtrees as well for include_internals.
* gtk/gtkmenuitem.c: provide a _forall implementation, which walks
the submenus as well for include_internals.
* gtk/gtkscrolledwindow.c: removed gtk_scrolled_window_foreach and
implemented gtk_scrolled_window_forall, which will iterate over
the viewport and the scrollbars for gtk_container_forall or
iterate over the viewports children for gtk_container_foreach.
* gtk/gtktoolbar.c:
* gtk/gtktable.c:
* gtk/gtkpaned.c:
* gtk/gtkpacker.c:
* gtk/gtkmenushell.c:
* gtk/gtklist.c:
* gtk/gtkfixed.c:
* gtk/gtkclist.c:
* gtk/gtkbox.c:
* gtk/gtkbin.c:
* gtk/gtknotebook.c:
removed the old gtk_*_foreach functions and provided gtk_*_forall.
* gtk/gtknotebook.c:
(gtk_notebook_real_switch_page): expose tabs.
(gtk_notebook_page_num): new function to return the page number
of a distinct child.
(gtk_notebook_focus): minor fixups. foxus handling is still screwed
under some circumstances.
* gtk/gtktreeitem.c:
(gtk_real_tree_item_select):
(gtk_real_tree_item_deselect): major fixes.
some general fixups wrt queue_redraw, and tree items not being
NO_WINDOW widgets.
* gtk/gtklistitem.c:
(gtk_real_list_item_select):
(gtk_real_list_item_deselect):
(gtk_real_list_item_toggle):
removed unneccessary queue_redraw calls.
Wed Aug 30 09:42:07 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c: allow optionmenus to have the focus and
automatically popup the menu on space bar.
Wed Aug 26 06:40:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: implemented gtk_container_forall() (as a class
method), which acts similar to gtk_container_foreach(), but iterates
over internal children. the GtkContainer::foreach signal vanished in
favour of a new class method ->forall() that optionally includes
internal widgets.
* gtk/gtkclist.c (gtk_clist_init): provide no _foreach implementation
but a _forall implementation, since all child widgets we have are
internal ones.
(column_button_create): set the parent window prior
to gtk_widget_set_parent().
* gtk/gtkwidget.c:
exchanged all calls to gtk_container_foreach() with
gtk_container_forall().
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added the GTK_COMPOSITE_CHILD, exported through
the GtkWidget::composite_child argument. to have a widget created
with the flag initially, two new functions got added to wrap a widgets
creation:
gtk_widget_push_composite_flag() and gtk_widget_pop_composite_flag().
Wed Aug 25 23:37:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c: exported gtk_tooltips_create_window() as
gtk_tooltips_force_window(), so tooltips->tip_window can be accessed
prior to the first tip being set.
don't put an extra reference on the window, since it is a toplevel,
it wont get destroyed from anywhere else.
* overall macro and GtkType fixups.
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 02:36:53 1998 Tim Janik <timj@gtk.org>
* gtk/gtkarg.h:
* gtk/gtkarg.c:
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
* gtk/gtkobject.h:
* gtk/gtkobject.c:
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c:
(gtk_object_new):
(gtk_object_set):
(gtk_widget_new):
(gtk_widget_set):
(gtk_container_add_with_args):
(gtk_container_child_set):
begin the parameter elipsis (...) after the first argument name. this
change is source compatible, since it was always required, even as NULL.
(gtk_args_collect):
(gtk_object_args_collect):
(gtk_container_child_args_collect):
changed prototypes to pass first_arg_name, also, pass va_list variable
by value (portability concerns). callers changed.
* gtk/gtkargcollector.c: implemented gtk_arg_collect_value() as
a huge macro GTK_ARG_COLLECT_VALUE() <shrug>. this is needed because we
can't pass va_list variables by reference for portability reasons.
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments
to --g-fatal-warnings again. this option now causes log levels of
WARNING and CRITICAL to abort().
* gdk/gdk.c:
* gdk/gdkdnd.c:
* gdk/gdkcc.c:
* gdk/gdkfont.c:
* gdk/gdkwindow.c:
* gdk/gdkvisual.c:
* gtk/gtkwidget.c:
* gtk/gtktypeutils.c:
* gtk/gtktree.c:
* gtk/gtkfontsel.c:
* gtk/gtkmain.c:
* gtk/gtkobject.c:
* gtk/gtkpreview.c:
* gtk/gtkselection.c:
* gtk/gtktext.c:
* gtk/gtktree.c:
* gtk/gtktreeitem.c:
did a global search&replace to substitute g_print() calls with
g_message(). libraries shouldn't use printf(), g_print() or
g_printerr() at all.
a bunch of the replacements should probably be wrapped into the
G{D|T}K_NOTE() macros, so they are special cased for debugging
purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
things.
* gdk/gdkrgb.c: left this out currently.
* gdk/gdkdnd.c: added copyright notice.
Mon Aug 17 15:31:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c: removed gtk_input_add_interp.
* gtk/gtkeditable.c (gtk_editable_set_position): fixed bogus "return"
keyword.
(gtk_editable_get_event_time): fix default: case.
* gtk/gtkclist.c (gtk_clist_swap_rows): fixes for lvalue casts.
* gdk/gdkpixmap.c: made a bunch of unexported functions static.
* gdk/gdkcolor.c:
* gdk/gdkvisual.c: include "gdkx.h", since it exports prototypes
of our functions.
* various minor compilation cleanups, such as bogus commas in
enums and similar things.
M
Tue Jul 21 12:42:01 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.h gdk/gdkfont.c: Added gdk_text/string_extents() -
too calculate all the metrics at once of a string, including
things which weren't calculated before.
* gtk/Makefile.am gtk/gtk.h gtk/gtktearoffmenu.[ch]: New
MenuItem type, that when put as the first thing in a
menu, makes the menu tearoff. Currently drawn as a
dashed line.
* gtk/gtkmenuitem.h gtk/gtkcheckmenuitem.c: Added a flag
"hide_on_activate" to the MenuItem class structure to allow
check and radio buttons to be changed with <Space> without
hiding the menu.
* gtk/gtkaccellabel.[ch]: Added new capabilities to set
a underline_group and underline_mods for the label -
accelerators added in the underline group matching
underline_mods will be displayed as an underline character.
This doesn't work - Save As needs to be underlined
as Save _As.
* gtk/gtkitemfactory.c:
- Create a AccelGroup for each MenuShell we create.
- If an '&' appears before a character 'c' in the path,
then make 'c' an accelerator in the menu's accel group,
and if the menuitem is menubar <alt>C an accelerator
in the itemfactory's accel group.
* gtk/gtklabel.[ch]: Add support for a pattern arg -
which is a string. If an '_' appears in this string,
the corresponding position in the label is underlined.
Add gtk_label_parse_uline() convenience function which
takes a string with embedded underlines, sets the
pattern and label, and returns the accelerator keyval.
* gtk/gtkmenu.[ch]: Make menus no longer a toplevel widget.
Instead, they create a GtkWindow and add themselves
to that. (When torn off, another new feature, they
create another GtkWindow to hold the torn off menu)
New function gtk_menu_set_tearoff_state()
* gtk/gtkenums.h gtk/gtkmenushell.[ch] gtk/gtkenums.h:
Added action signals for keyboard navigation of menus.
* gtk/gtkmenushell.c: Key press handler which activates
bindings for navigation, and accelerators, for handling
underline accelerators. Exported functions to select
and activate menu items in a menushell.
* gtk/testgtk.c: Added a new "Item Factory" test which
tests GtkItemFactory and the new keyboard navigation
of menus.
Thu Jul 23 00:11:39 1998 Tim Janik <timj@gtk.org>
* gtk/testgtkrc: introduce testbindings on C-1 for buttons,
to check out binding priorities. someone should really write
gtkrc-mode for emacs.
* gtk/gtkwidget.c (gtk_widget_class_init): remove ugly bindings test.
* gtk/testgtk.c (main): and move it here ;). this test says something
on release of C-9. (this works only if the mouse pointer is on a
spinbutton and there is no focus widget).
* gtk/gtkrc.h:
* gtk/gtkrc.c:
export gtk_rc_parse_color, gtk_rc_parse_state and a new function
gtk_rc_parse_priority to parse path priority types.
export rc tokens.
feature binding parsing.
Wed Jul 22 23:41:17 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.h:
* gtk/gtkbindings.c: new function gtk_binding_parse_binding() to
feature binding parsing in rc files.
* gtk/gtkbindings.c (gtk_binding_set_new): bug fix.
* gtk/gtkbindings.c (gtk_binding_pattern_compare): bug fix, we used to
order the bindings with lowest priority first.
genmarshal.pl: Handle complex types, and functions with a return value but
no parameters.
genmarshal.pl gtkmarshal.* gtkwidget.c: Remove support for GDK_EVENT and
STYLE parameter types.
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