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.
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.
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.
Tue Apr 7 19:36:48 1998 Owen Taylor <owt1@cornell.edu>
* gutils.c (g_direct_compare): Removed, because that's what
a NULL comparison function means. And it wasn't 64 bit safe.
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdk.c: More extensive debugging output
* gtk/gtkalignment.c gtk/gtkbutton.c gtk/gtkcheckbutton.c
gtk/gtkclist.c gtk/gtkeventbox.c gtk/gtkhandlebox.c
gtk/gtk[hv]box.c gtk/gtk[hv]paned.c gtk/gtklist.c
gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtkmenuitem.c
gtk/gtknotebook.c gtk/gtktable.c gtk/gtktree.c
gtk/gtktreeitem.c gtk/gtkviewport.c
Avoid assigning negative values to unsigned allocation.width and
height
* gtk/gtkwindow.c:
Instead of realizing the widget, then size allocating, (resulting
in XMoveResizeWindows for all children, do the size allocation
first, then realize.
In gtk_real_window_move_resize, combine move and resize
into a single GDK/X call when possible.
* gtk/gtkclist.c gtk/gtkdrawingarea.c:
Remove assumption that the widget will be size allocated _after_
it is realized.
* gtk/gtklist.c (gtk_list_motion_notify): Removed useless
debugging message.
Tue Mar 24 00:17:42 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkcombo.c gtk/gtkmenu.c: Use reversed arrow for
menus ala Motif (and fix Options menus, which had X cursor
before), and show normal arrow when inside ComboBox.
* gtk/gtkfilesel.c: Various memory leaks removed, as
pointed out by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>
* docs/gtk_tut.sgml: Change compiling explaination
to refer to gtk-config.
(From: johannes@nada.kth.se (Johannes Keukelaar))
Sun Mar 15 13:25:28 1998 Tim Janik <timj@gimp.org>
* gtk/gtkwidget.h: added new flag GTK_EXCLUSIVE_GRAB.
* gtk/gtkmain.c: allow exclusive grabs.
* gtk/gtkmenu.c: grab exclusively.
* gtk/gtkmenushell.c: grab exclusively.
* gtk/gtkmenushell.c: don't activate insensitive menu items when
in click-selects mode.
* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): activate submenus
on popup.
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): don't take
*additional* button presses into account.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): don't take
foreign button releases into account.
oh boy, please check this out people, hope i covered all cases.
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.
Mon Feb 23 15:41:13 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
that just move the window, and don't resize it. Because we need
to make sure that a widget gets redrawn after a size_allocate -
and that only happens when the configure event changes the size
of the window. Plus, it's inefficient.
have the send_event field in all GdkEvents.
gtkmenu.c, gtkacceleratortable.c, gtkwindow.c: unreference accelerator_table.
gtk_object_query_args: removed seq_ids again, must have been quite tired
when i commited that change ;)
gtkoptionmenu.c: assure GTK_BIN()->child is empty when reparenting
a menu_items child.
gtkwindow.c: fixed some memory leaks.
-timj
Sun Feb 8 07:06:54 1998 Tim Janik <timj@gimp.org>
* gtk/gtkmenu.c (gtk_menu_get_attach_widget): new fundtion to return
the widget that the menu is attached to.
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/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
* 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