2002-03-22 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
text to the error message about missing charsets, and use
g_printerr() not g_warning() since this is typically not a
programming error (we do not export any API to ask whether
a font set will have missing charsets so apps realistically can't
do anything other than try the gdk_fontset_load())
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
if the text view isn't editable and the user presses Return,
so default buttons and such can be activated, #74937
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
if the insertion point is not editable and the paste
is interactive, #74125
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
debug spew
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
cut/copied data right before replacing it, when we know we are
going to replace it. Fixes#74049
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
a lot of warnings with Forte CC, mostly implicit
casts between void * and function pointers.
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
state field is not a GdkModifierType. (Also #73900)
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
the focus to NULL, clear the existing focus chain so
that when we focus into the window again, we start
at the beginning. (Pointed out by Tim Janik.)
Sun Mar 3 18:47:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): Fix
to properly take the default window into account by
setting a flag and in gtk_window_compute_configure_request_size ()
multiplying by the increments and adding in the base
size. (#72393)
* tests/testgtk.c (create_gridded_geometry): Add a
test for gridded geometry and for gtk_window_parse_geometry().
Tue Feb 26 18:47:44 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_add_mnemonic): Append
mnemonics rather than prepending them so that the
order is typically forward rather than typically
backward. (Partial fix for #52395)
Sat Feb 23 22:37:23 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_init): Sanity check default
font family name and size.
* gtk/gtkwindow.c (gtk_window_set_default_size): Remove
incorrect comment about the geometry widget.
* gtk/gtkwindow.c (gtk_window_move_resize): Unset the
gtk_window_resize)() information once we've set the size
once, to avoid it coming back next time we queue a resize.
(#72359)
* gtk/gtkwindow.c (gtk_window_move_resize): Remove
setthing of ->need_default_size from here, Havoc
says that it should correspond more or less exactly
to GTK_WIDGET_MAPPED (window).
Thu Feb 21 16:51:17 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
First_Group/Last_Group to list of invalid accelerators.
(A lot more that should be added, but probably would
want a range mechanism. These are the ones found in
the standard XFree86 config files.)
* gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
that broke bindings for menus.
* gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
privately.
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
_gtk_window_activate_key(), gtk_bindings_activate_event().
Wed Feb 20 14:26:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
allow matches on key and level but not group. Also, implement
ignoring "consumed modifiers correctly."
* gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
GtkKeyHash.
* gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
the group for key release events as well as key press events.
* gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
Rename unused_modifiers to consumed_modifiers, make the docs and
non-Xkb implementation match the Xkb implementation.
* gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
doc and parameter name changes.
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
XkbTranslateKeyCode doesn't handle LockMask, we need to handle
it ourselves.
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
<Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
to allow dealing with ISO_Left_Tab.
* gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
gtk/gtkpaned.c gtk/gtkcombo.c gtk/gtknotebook.c:
Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
or <Shift>Tab both are equivalent as a binding specifier.)
* gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
GTK_RUN_ACTION, so you can bind an accelerator to it.
* gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
gdk_unicode_to_keyval on the mnemonic character.
* tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Thu Feb 7 19:00:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
to using binding set for doing key bindings. (#62622,
Requested by Skip Montaro)
* gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
bindings as overrides along with control-tab bindings.
* gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
type for ::focus_tab signal.
2002-01-30 Manish Singh <yosh@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
variable.
* gtk/gtkwindow.c (gtk_window_get_icon): function returns a value,
so return NULL with g_return_val_if_fail instead of g_return_if_fail.
Wed Jan 30 13:55:59 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_show): Try to make
sure that we have some focused widget on map. (#50339)
* gtk/gtkdialog.c (gtk_dialog_map): Handling picking
a focus widget here differently so that if a
response button gets picked, it's the default one.
* tests/testgtk.c (make_message_dialog): Set the
default response for the dialogs.
Tue Jan 29 14:24:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
bindings for "move-focus" so that Control-Tab to escape from
something that eats Tab just works if not otherwise overriden.
* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
* gtk/gtkvscale.c (gtk_vscale_new_with_range)
* gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
of zero for the adjustment, since at times we think that the range
is lower to upper - page_size. A page size equally to the
step_increment is, in any case, not meaningful.
2002-01-19 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c: link to new X11 section in a lot of places when
mentioning the window manager.
* gtk/gtkwidget.c (gtk_widget_hide_on_delete): don't mention
window manager since we're portable.
2002-01-19 Havoc Pennington <hp@pobox.com>
* gtk/x11.sgml: add a mostly-empty X11 section
* gtk/framebuffer.sgml: make title consistent with windows section
* gtk/tmpl/gtkdrawingarea.sgml: couple of fixes
Mon Jan 14 16:35:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Unset
initial_pos_set after the first configure request.
Sun Jan 13 23:23:22 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
widget->requisition was being used instead of
gtk_widget_get_child_requisition (), causing geometry widgets
with usizes to misbehave.
Sat Dec 22 12:38:03 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: 1.3.12, interface, binary age 0.
* configure.in: Require new versions of Glib, Pango, ATK.
* NEWS: Updated.
* configure.in: Make explicit what libtool we are executing.
(Tomas Ogren)
* gdk/gdkcolor.c gdk/gdkgc.c gdk/gdkwindow.c: Doc fixes.
* gtk/gtkwidget.c (gtk_widget_[class]path) gtkrc.h : Fix
parameter names for docs.
Sat Dec 22 22:35:29 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_realize)
gtk/gtkplug.c (gtk_plug_realize): Include GDK_KEY_RELEASE_MASK.
* gtk/gtkentry.c (gtk_entry_key_release)
gtk/gtktextview.c (gtk_text_view_key_release_event): Pass
key release events to the input method.
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
Handle release of Control/Shift to end hex sequence.
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress): Handle key releases as well as presses.
Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org>
* applied patch from owen to get rid of accel map notifiers.
changed things to fix reentrancy and API as discussed on gtk-devel.
* gtk/gtkaccelgroup.[hc]:
(gtk_accel_group_finalize): unregister this accel group from all
accel map paths.
(accel_closure_invalidate): handle invalidation of closures by
disconnecting their accelerators.
(quick_accel_add): move closure connection and changed notification
into this function to reduce code duplication. don't emit change
notification on closurers without accelerators.
(quick_accel_remove): rewrite, do the exact opposite of quick_accel_add
for a GtkAccelGroupEntry.
(gtk_accel_group_connect): get rid of the accel_path_quark argument.
(gtk_accel_group_connect_by_path): new function to add accelerators
with an accel path.
(gtk_accel_group_disconnect_closure): new function, disconnect a
closure from of an accel group.
(gtk_accel_group_disconnect): loop over all closure for a accel_ley,
accel_mods pair and remove them.
(_gtk_accel_group_reconnect): new function that basically does
gtk_accel_group_disconnect_closure() and
gtk_accel_group_connect_by_path() once an accel path changed.
(gtk_accel_groups_disconnect_closure): remove this, there's
gtk_accel_group_disconnect_closure().
* gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now,
nuke notifiers.
(_gtk_accel_path_is_valid): make this non-static for
gtkwidget.c and gtkaccelgroup.c assertions.
(gtk_accel_map_add_notifer): removed this function.
(gtk_accel_map_remove_notifer): same.
(_gtk_accel_map_add_group):
(_gtk_accel_map_remove_group): (un-)register accel groups, with
accel paths for correct propagation.
(gtk_accel_map_add_entry): return void.
(gtk_accel_map_lookup): return gboolean instead of GQuark.
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always
set accel_path on widgets.
* gtk/gtkwidget.[hc]:
(accel_path_changed): got rid of this, changes are handled by
accel maps internally now.
(_gtk_widget_set_accel_path): get things to work without notifiers.
(gtk_widget_list_accel_closures): list accel closures of a widget.
* gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
key bindings in order of visibility - mnemonics, then
accelerators, then send key to the focus widget, then
bindings on the GtkWindow.
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
Removed the xoffset, yoffset fields of GtkLayout which were
identically zero for compat with 1.2, but were no longer
compatible with all uses of these fields in 1.2.
* gtk/gtkwindow.c (gtk_window_set_default): Remove
unused variable.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
gtk/*.c gtk/gtksignal.h: Make gtkmarshal.list/gtkmarshal.h
only for compatibility with GTK+-1.2; and deprecate it;
put all marshalers we actually use into gtkmarshalers.list
and use the _gtk_marshal_ prefix for these marshalers.
Fri Nov 16 19:44:35 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_default): Move
notification of "has_default" to here, so it
is safe to call gtk_window_set_default() instead
of gtk_widget_grab_default().
* gtk/gtkwindow.c (gtk_window_set_focus): Make it call
gtk_widget_grab_focus(), which then calls
_gtk_widget_internal_set_focus(). This makes
gtk_window_set_focus() a safe way of both setting
and unsetting the focus widget.
* gtk/gtkwidget.c (gtk_widget_propagate_state): Use
gtk_widget_get_toplevel(), instead of gtk_widget_ancestor
to find the toplevel.
* gtk/gtkwindow.h: Move gtk_window_set_focus/default
from the "internal functions" section.
Thu Nov 15 12:54:36 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_key_press_event): Propagate
key press events not just to focus/window but also to
intermediate widgets.
* gtk/gtknotebook.c: Handle Ctrl-PageUp/Ctrl-PageDown
to switch pages. (Needs some work on handling focus
when switching pages.)
Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org>
* added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org>
* gtk/maketypes.awk: fix type utils generation on unix.
* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
registry.
* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
introduced ::accel_changed signal for change notification, and
gtk_accel_group_connect/disconnect to connect closures to accel groups.
made gtk_accel_group_attach/detach and gtk_accel_group_activate private
functions.
deprecated gtk_accel_group_ref/unref.
* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
to accel group changed notification and basically operate on closures.
removed gtk_accel_label_get_accel_object and
gtk_accel_label_set_accel_object.
introduced gtk_accel_label_set_accel_closure, and for convenience,
gtk_accel_label_set_accel_widget.
* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
which mostly moved into gtkaccelmap.[hc].
removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
and gtk_item_factory_print_func.
* gtk/gtkmain.c: call _gtk_accel_map_init().
* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
that associates an accelerator path with menu items, through which
persistent accelerator settings on menu items are enabled.
* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
paths of menu item can be default constructed to allow installation
of accelerators on menu items that don't come with an accelerator
binding by default.
* gtk/gtksettings.c: fix STRING type rc settings by special casing
them appropriately in the parser.
* gtk/gtksignal.[hc]: allow a class function offset of 0 for
gtk_signal_newv().
* gtk/gtkwidget.[hc]: accelerator API revamp.
removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
gtk_widget_(un)lock_accelerators.
accelerators maintained through gtk_widget_add/remove_accelerator()
are not runtime changable now, the correct sequence to setup a
widget for runtime changable accelerators is now:
gtk_accel_map_add_entry(accel_path, key, mods);
_gtk_widget_set_accel_path(widget, accel_path, accel_group);
* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
group changes (as well as mnemonic changes) through the new signal
::accels_changed.
Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org>
* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
GString->string conversions.
Sun Nov 4 16:02:08 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.[ch]: Add a function gdk_window_invalidate_maybe_recurse()
for use in "shallow invalidation" of a widget. (Windows belonging
to the widget, but not to the widget's children)
* gtk/gtkprivate.h gtk/gtkwidget.c gtk/gtksizegroup.c: Add private
flags GTK_ALLOC_NEEDED, GTK_REQUEST_NEEDED. These flags are set
up on ancestors up to the resize container on queue_resize. Size
requests only actually take place if GTK_REQUEST_NEEDED, size
allocations only take place if GTK_ALLOC_NEEDED or the size
changed.
* gtk/gtkcontainer.c gtk/gtkwidget.c: Remove
container->resize_widgets and the RESIZE_NEEDED flag since the
above flags are sufficient to figure out what needs to be
resized/reallocated. Remove code manipulating
container->resize_widget.
* gtk/gtkwidget.[ch]: Add gtk_widget_set_redraw_on_alloc(); this
allows widgets to turn off being automatically invalidated is when
they are resized.
* gtk/gtkwidget.[ch] (gtk_widget_size_allocate): Invalidation when
a widget is resized or moved is "shallow" as described above -
only the windows that need to be invalidated are invalidated.
* gtk/gtkbox.c gtk/gtktable.c gtk/gtkalignment.c docs/Changes-2.0.txt:
Make these widget's init functions call
gtk_widget_set_redraw_on_allocate(widget,FALSE).
* gtk/gtkwindow.c (gtk_window_configure_event): Call
_gtk_container_queue_resize(), since we don't want
redrawing. (Probably could be done for other
calls to gtk_widget_queue_resize() in gtkwindow.c,
but this is the most important one.)
* gtk/gtkwindow.c (gtk_window_move_resize): Don't call
gtk_widget_queue_draw() - size_allocate() handles
that as appropriate.
* gtk/gtkframe.c (gtk_frame_size_allocate): Invalidate instead
of queue_clear() to avoid invalidating children.
2001-11-03 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
signal argument (was GtkWidget*).
* gtk/gtkwindow.c (gtk_window_frame_event),
gtk/gtkwindow-decorate.c (gtk_decorated_window_frame_event):
Fixed argument types as above, removed GTK_WINDOW casts and
added some GTK_WIDGET casts instead.
Wed Oct 31 15:38:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a
gtk_window_get_focus() getter to determine the currently
focused widget within the window. (#63145, request
from Damian Ivereigh)
2001-09-25 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c: Put notes in gtk_window_set_has_frame(),
etc. docs about how these are not going to do what you want for
the X/win32 ports. Futile attempt to avoid a FAQ...
Mon Sep 24 15:09:08 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_move_resize): Don't wait for a
response back from the window manager if our size hasn't changed
since we won't get a response back from the window manager;
there was code in there to do this, but it was in the wrong
place so if the hints change and the size didn't we'd expect
a response.
Also, optimize the position-only-changed case by running
the resize queue immediately, and clean up some comments
for the changes.
Mon Sep 24 12:48:25 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.h: Add a compat macro that got lost.
* gtk/gtktreestore.c: Doc fixes.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix reference
leak for windows that receive events after being destroyed.
(#60863, Joshua N. Pritikin)
* gtk/gtktable.c (gtk_table_remove): Use gtk_widget_queue_resize
rather than gtk_container_queue_resize().
* gtk/{gtkcontainer.c,gtkwidget.c,gtkwindow.c}: _gtk prefix
gtk_container_queue_resize, gtk_container_queue_resize_widgets,
gtk_container_child_composite_name. (#60217.)
Thu Sep 20 16:51:02 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtkwindow.c (gtk_window_get_frame_dimensions): returned
incorrect values for top, right and bottom due to cut-and-paste
bug. Pointed out by Vitaly Tishkov, fixes bug #59008
Wed Sep 19 15:46:29 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Add xgettext:no-c-format comment to
to handle '99% of the time. (#60473, reported by Christian Rose)
* gtk/gtkwidget.h: Remove prototype for gtk_widget_get_usize()
which no longer exists. (#60379, reported by Vitaly Tishkov)