Commit 9800f731 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

applied patch from owen to get rid of accel map notifiers. changed things

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.
parent 9ea603f1
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
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.
2001-11-20 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkcontainer.c (gtk_container_propagate_expose): Typo fix.
......
......@@ -8,12 +8,14 @@ GtkAccelGroup
gtk_accel_group_get_type
gtk_accel_group_new
gtk_accel_group_connect
gtk_accel_group_connect_by_path
gtk_accel_group_disconnect
gtk_accel_group_disconnect_key
gtk_accel_group_query
gtk_accel_group_activate
gtk_accel_groups_activate
gtk_accel_group_lock
gtk_accel_group_unlock
gtk_accel_group_from_accel_closure
gtk_accel_groups_activate
gtk_accelerator_valid
gtk_accelerator_parse
gtk_accelerator_name
......@@ -33,18 +35,16 @@ GTK_ACCEL_GROUP_GET_CLASS
<SECTION>
<FILE>gtkaccelmap</FILE>
<TITLE>Accelerator Maps</TITLE>
GtkAccelMapNotify
GtkAccelMapForeach
gtk_accel_map_add_entry
gtk_accel_map_lookup_entry
gtk_accel_map_change_entry
gtk_accel_map_add_notifer
gtk_accel_map_remove_notifer
gtk_accel_map_load
gtk_accel_map_save
gtk_accel_map_foreach
gtk_accel_map_load_fd
gtk_accel_map_save_fd
gtk_accel_map_load_scanner
</SECTION>
<SECTION>
......@@ -52,8 +52,8 @@ gtk_accel_map_save_fd
<TITLE>GtkAccelLabel</TITLE>
GtkAccelLabel
gtk_accel_label_new
gtk_accel_label_get_accel_object
gtk_accel_label_set_accel_object
gtk_accel_label_get_accel_closure
gtk_accel_label_set_accel_closure
gtk_accel_label_get_accel_widget
gtk_accel_label_set_accel_widget
gtk_accel_label_get_accel_width
......@@ -1290,9 +1290,6 @@ GtkItemFactoryEntry
GtkItemFactoryItem
gtk_item_factory_new
gtk_item_factory_construct
gtk_item_factory_parse_rc
gtk_item_factory_parse_rc_string
gtk_item_factory_parse_rc_scanner
gtk_item_factory_add_foreign
gtk_item_factory_from_widget
gtk_item_factory_path_from_widget
......@@ -1300,9 +1297,6 @@ gtk_item_factory_get_item
gtk_item_factory_get_widget
gtk_item_factory_get_widget_by_action
gtk_item_factory_get_item_by_action
gtk_item_factory_dump_items
gtk_item_factory_dump_rc
gtk_item_factory_print_func
gtk_item_factory_create_item
gtk_item_factory_create_items
gtk_item_factory_create_items_ac
......@@ -1674,7 +1668,6 @@ GTK_OBJECT_TYPE
GTK_OBJECT_TYPE_NAME
GtkObjectFlags
GTK_OBJECT_FLAGS
GTK_OBJECT_DESTROYED
GTK_OBJECT_FLOATING
GTK_OBJECT_CONNECTED
GTK_OBJECT_SET_FLAGS
......@@ -3467,8 +3460,7 @@ gtk_widget_get_child_requisition
gtk_widget_size_allocate
gtk_widget_add_accelerator
gtk_widget_remove_accelerator
gtk_widget_remove_accelerators
gtk_widget_accelerator_signal
gtk_widget_list_accel_closures
gtk_widget_event
gtk_widget_activate
gtk_widget_reparent
......@@ -3519,7 +3511,6 @@ gtk_widget_shape_combine_mask
gtk_widget_path
gtk_widget_class_path
gtk_widget_get_composite_name
gtk_widget_lock_accelerators
gtk_widget_modify_style
gtk_widget_get_modifier_style
gtk_widget_modify_fg
......@@ -3541,8 +3532,6 @@ gtk_widget_set_app_paintable
gtk_widget_set_double_buffered
gtk_widget_set_composite_name
gtk_widget_set_scroll_adjustments
gtk_widget_unlock_accelerators
gtk_widget_accelerators_locked
gtk_widget_mnemonic_activate
gtk_widget_class_install_style_property
gtk_widget_class_install_style_property_parser
......
......@@ -514,6 +514,19 @@ This is a private struct used by GTK+ internally, don't worry about it.
</para>
<!-- ##### USER_FUNCTION GtkAccelMapNotify ##### -->
<para>
</para>
@data:
@accel_path_quark:
@accel_key:
@accel_mods:
@accel_group:
@old_accel_key:
@old_accel_mods:
<!-- ##### ENUM GtkAnchorType ##### -->
<para>
......@@ -1299,6 +1312,13 @@ the #GtkAdjustment which sets the range of the scale.
</para>
<!-- ##### SIGNAL GtkWindow::accels-changed ##### -->
<para>
</para>
@window: the object which received the signal.
<!-- ##### ARG GtkWindow:auto-shrink ##### -->
<para>
If the window shrinks automatically when widgets within it shrink.
......@@ -1484,6 +1504,25 @@ If the window shrinks automatically when widgets within it shrink.
@accel_label:
@accel_object:
<!-- ##### FUNCTION gtk_accel_map_add_notifer ##### -->
<para>
</para>
@accel_path:
@notify_data:
@notify_func:
@accel_group:
<!-- ##### FUNCTION gtk_accel_map_remove_notifer ##### -->
<para>
</para>
@accel_path:
@notify_data:
@notify_func:
<!-- ##### FUNCTION gtk_arg_copy ##### -->
<para>
It will either copy data into an existing argument or allocate a new argument
......
......@@ -64,23 +64,35 @@ An object representing and maintaining a group of accelerators.
@accel_mods:
@accel_flags:
@closure:
@accel_path_quark:
<!-- # Unused Parameters # -->
@accel_path_quark:
@path_quark:
<!-- ##### FUNCTION gtk_accel_group_connect_by_path ##### -->
<para>
</para>
@accel_group:
@accel_path:
@closure:
<!-- ##### FUNCTION gtk_accel_group_disconnect ##### -->
<para>
</para>
@accel_group:
@closure:
@Returns:
<!-- # Unused Parameters # -->
@accel_key:
@accel_mods:
@Returns:
<!-- ##### FUNCTION gtk_accel_group_query ##### -->
<!-- ##### FUNCTION gtk_accel_group_disconnect_key ##### -->
<para>
</para>
......@@ -88,21 +100,19 @@ An object representing and maintaining a group of accelerators.
@accel_group:
@accel_key:
@accel_mods:
@n_entries:
@Returns:
<!-- ##### FUNCTION gtk_accel_groups_activate ##### -->
<!-- ##### FUNCTION gtk_accel_group_query ##### -->
<para>
</para>
@acceleratable:
@accel_group:
@accel_key:
@accel_mods:
@n_entries:
@Returns:
<!-- # Unused Parameters # -->
@object:
<!-- ##### FUNCTION gtk_accel_group_lock ##### -->
......@@ -121,6 +131,28 @@ An object representing and maintaining a group of accelerators.
@accel_group:
<!-- ##### FUNCTION gtk_accel_group_from_accel_closure ##### -->
<para>
</para>
@closure:
@Returns:
<!-- ##### FUNCTION gtk_accel_groups_activate ##### -->
<para>
</para>
@acceleratable:
@accel_key:
@accel_mods:
@Returns:
<!-- # Unused Parameters # -->
@object:
<!-- ##### FUNCTION gtk_accelerator_valid ##### -->
<para>
......
......@@ -94,6 +94,15 @@ Creates a new #GtkAccelLabel.
@Returns: a new #GtkAccelLabel.
<!-- ##### FUNCTION gtk_accel_label_set_accel_closure ##### -->
<para>
</para>
@accel_label:
@closure:
<!-- ##### FUNCTION gtk_accel_label_get_accel_widget ##### -->
<para>
......
......@@ -530,6 +530,15 @@ GtkWidget
@Returns:
<!-- ##### FUNCTION gtk_widget_list_accel_closures ##### -->
<para>
</para>
@widget:
@Returns:
<!-- ##### FUNCTION gtk_widget_event ##### -->
<para>
......
......@@ -694,35 +694,35 @@ it's larger
@height:
<!-- ##### SIGNAL GtkWindow::accels-changed ##### -->
<!-- ##### SIGNAL GtkWindow::activate-default ##### -->
<para>
</para>
@window: the object which received the signal.
<!-- ##### SIGNAL GtkWindow::activate-default ##### -->
<!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
<para>
</para>
@window: the object which received the signal.
<!-- ##### SIGNAL GtkWindow::activate-focus ##### -->
<!-- ##### SIGNAL GtkWindow::frame-event ##### -->
<para>
</para>
@window: the object which received the signal.
@event:
@Returns:
<!-- ##### SIGNAL GtkWindow::frame-event ##### -->
<!-- ##### SIGNAL GtkWindow::keys-changed ##### -->
<para>
</para>
@window: the object which received the signal.
@event:
@Returns:
<!-- ##### SIGNAL GtkWindow::move-focus ##### -->
<para>
......
......@@ -52,7 +52,7 @@ static guint default_accel_mod_mask = (GDK_SHIFT_MASK |
/* --- functions --- */
/**
* gtk_accel_map_change_entry
* gtk_accel_group_get_type
* @returns: the type ID for accelerator groups
*/
GType
......@@ -135,6 +135,19 @@ static void
gtk_accel_group_finalize (GObject *object)
{
GtkAccelGroup *accel_group = GTK_ACCEL_GROUP (object);
guint i;
for (i = 0; i < accel_group->n_accels; i++)
{
GtkAccelGroupEntry *entry = &accel_group->priv_accels[i];
if (entry->accel_path_quark)
{
const gchar *accel_path = g_quark_to_string (entry[i].accel_path_quark);
_gtk_accel_map_remove_group (accel_path, accel_group);
}
}
g_free (accel_group->priv_accels);
......@@ -300,10 +313,12 @@ gtk_accel_group_unlock (GtkAccelGroup *accel_group)
}
static void
accel_tag_func (gpointer data,
GClosure *closure)
accel_closure_invalidate (gpointer data,
GClosure *closure)
{
/* GtkAccelGroup *accel_group = data; */
GtkAccelGroup *accel_group = GTK_ACCEL_GROUP (data);
gtk_accel_group_disconnect (accel_group, closure);
}
static int
......@@ -330,11 +345,14 @@ quick_accel_add (GtkAccelGroup *accel_group,
guint pos, i = accel_group->n_accels++;
GtkAccelGroupEntry key;
/* find position */
key.key.accel_key = accel_key;
key.key.accel_mods = accel_mods;
for (pos = 0; pos < i; pos++)
if (bsearch_compare_accels (&key, accel_group->priv_accels + pos) < 0)
break;
/* insert at position, ref closure */
accel_group->priv_accels = g_renew (GtkAccelGroupEntry, accel_group->priv_accels, accel_group->n_accels);
g_memmove (accel_group->priv_accels + pos + 1, accel_group->priv_accels + pos,
(i - pos) * sizeof (accel_group->priv_accels[0]));
......@@ -344,9 +362,71 @@ quick_accel_add (GtkAccelGroup *accel_group,
accel_group->priv_accels