gtk2/docs/reference/gtk
Matthias Clasen 0ceb0db081 Install accelerators on actions, not on proxies, support accelerator-only
2003-09-18  Matthias Clasen  <maclas@gmx.de>

	Install accelerators on actions, not on proxies, support
	accelerator-only actions:

	* gtk/gtkmenu.c (get_accel_path): New function to get the accel path
	and its lock status either via _gtk_widget_get_accel_path() or by
	looking at the accel_path stored in the menu item itself and determining
	its lock status by peeking into the contained accel label. This was
	already (accidentally) committed a week ago.

	* gtk/gtkaction.h (gtk_action_set_accel_group):
	(gtk_action_[dis]connect_accelerator): New functions.

	* gtk/gtkaction.c (struct _GtkActionPrivate): Add accel_group,
	accel_closure and accel_count. We must have a reference to the accel_group,
	since we need it in connect_proxy. The count is necessary to ensure
	that the accelerator isn't removed before the last proxy requesting
	it has been unmerged.
	(connect_proxy): Connect the accelerator to the
	action now, only set the accel_path on the menuitem.
	(remove_proxy): Disconnect the accelerator from the action, not from
	the menuitem.
	(gtk_action_set_accel_group): Set the accel group.
	(gtk_action_[dis]connect_accelerator): Count the number of times
	this functions have been called and install/remove the accelerator if
	the count leaves/reaches zero.

	* gtk/gtkuimanager.h (GtkUIManagerItemType): Add
	GTK_UI_MANAGER_ACCELERATOR.

	* gtk/gtkuimanager.c (NodeType): Add NODE_TYPE_ACCELERATOR.
	(start_element_handler): Create NODE_TYPE_ACCELERATOR nodes from
	<accelerator> elements.
	(gtk_ui_manager_add_ui): Create NODE_TYPE_ACCELERATOR nodes when
	type is GTK_UI_MANAGER_ACCELERATOR.
	(update_node): Set the accel group on actions before creating their
	proxies. Don't set the accel group on created menus. For
	NODE_TYPE_ACCELERATOR nodes, [dis]connect the actions' accelerator.
	(print_node): Also emit <accelerator> elements.

	* tests/testmerge.c (dump_accels): Add a "Dump Accels" button.
2003-09-17 23:58:28 +00:00
..
tmpl Install accelerators on actions, not on proxies, support accelerator-only 2003-09-17 23:58:28 +00:00
.cvsignore Resurrected documentation that got lost when the window parameter was 2003-07-29 09:08:22 +00:00
building.sgml Typo fixes. 2003-04-09 18:18:23 +00:00
changes-1.2.sgml remove gtk- prefix from TreeView and a few other entities, more consistent 2002-01-06 21:09:26 +00:00
changes-2.0.sgml Add note about gtk_notebook_reorder_child(). 2002-03-01 15:40:12 +00:00
compiling.sgml Mention xxx_DISABLE_DEPRECATED and GDK_MULTIHEAD_SAFE. 2003-02-01 01:19:30 +00:00
framebuffer.sgml Minor updates for 2.2.0. (#67820) 2002-12-15 05:47:24 +00:00
gtk-docs.sgml Rename GtkMenuMerge to GtkUIManager 2003-08-25 23:15:12 +00:00
gtk-overrides.txt Remove GtkArgSetFunc, GtkArgGetFunc. 2001-06-04 19:08:59 +00:00
gtk-query-immodules-2.0.1 Add rule to regenerate man pages from Docbook. (man_MANS): Add 2003-06-17 00:37:28 +00:00
gtk-query-immodules-2.0.xml Add rule to regenerate man pages from Docbook. (man_MANS): Add 2003-06-17 00:37:28 +00:00
gtk-sections.txt Install accelerators on actions, not on proxies, support accelerator-only 2003-09-17 23:58:28 +00:00
gtk.types Additions. 2003-08-31 00:27:15 +00:00
Makefile.am Add gtktoggleactionprivate.h 2003-08-31 13:49:15 +00:00
objects_grouped.sgml remove GtkPacker. 2001-10-05 21:26:48 +00:00
other_software.sgml half-finished docs on merging GTK with existing hunks of code (event loop 2002-04-30 15:58:51 +00:00
question_index.sgml Another question. 2003-06-18 22:41:06 +00:00
resources.sgml Mention the need to subscribe to the GTK+ mailing lists. 2002-03-06 23:36:37 +00:00
running.sgml s/overwrite/override/g (#104627, Brian Cameron) 2003-01-30 00:05:24 +00:00
text_widget.sgml Fix some links. 2002-12-11 19:26:58 +00:00
tree_widget.sgml Delete EWMH properties if no private->state flags are set. (#66754) 2002-12-10 23:25:33 +00:00
version.xml.in Add package version info to API docs. 2002-11-21 20:19:01 +00:00
windows.sgml windows (file is blank) 2001-02-09 06:14:34 +00:00
x11.sgml link to new X11 section in a lot of places when mentioning the window 2002-01-19 18:51:48 +00:00