Commit Graph

3 Commits

Author SHA1 Message Date
Matthias Clasen
cbc20c4dde Change the XML format: <Root> element is replaced by <ui>, <menu> element
2003-08-28  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkuimanager.c: Change the XML format:
	<Root> element is replaced by <ui>,
	<menu> element is replaced by <menubar>,
	<submenu> element is replaced by <menu>,
	<dockitem> element is replaced by <toolbar>,
	<popups> element is gone,
	verb attribute is replaced by action,
	name defaults to action or the element name.

	* gtk/gtkactiongroup.[hc]: Replace GtkActionGroupEntry by GtkActionEntry
	and GtkRadioActionEntry. GtkActionEntry is simplified by removing
	the user_data, entry_type and extra_data fields, GtkRadioActionEntry is
	further simplified by removing the callback. The user_data can now be
	specified as an argument to gtk_action_group_add_actions(). There is
	a new method gtk_action_group_add_radio_actions(), which is similar
	to gtk_action_group_add_actions(), but takes GtkRadioActionEntrys
	and a callback parameter in addition to the user_data. The callback
	is connected to the ::changed signal of the first group member.
	There are _full() variants taking a GDestroyNotify of
	gtk_action_group_add_[radio_]actions().

	* gtk/gtkradioaction.[hc]: Add a ::changed signal which gets emitted
	on every member of the radio group when the active member is changed.
	Add an integer property "value", and a getter for the value of "value"
	on the currently active group member.

	* tests/testactions.c:
	* tests/testmerge.c:
	* tests/merge-[123].ui:
	* demos/gtk-demo/appwindow.c: Adjust to these changes.

	* gtk/gtktoolbar.c (gtk_toolbar_append_element): Trivial doc fix.
2003-08-27 22:22:28 +00:00
Matthias Clasen
720bdb8daf Use gssize for length, not gsize.
2003-08-26  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkuimanager.[hc] (gtk_ui_manager_add_ui_from_string): Use gssize
	for length, not gsize.

	* gtk/gtkuimanager.c: Refactor the XML format a bit: rename <Root> to
	<ui> and make it optional in strings. Rename verb to action, <dockitem>
	to <toolbar>, <menu> to <menubar>, <submenu> to <menu>.

	* demos/gtk-demo/appwindow.c:
	* tests/testactions.c:
	* tests/testmerge.c:
	* tests/merge-1.ui:
	* tests/merge-2.ui:
	* tests/merge-3.ui: Adjust to the new XML format.
2003-08-26 00:13:59 +00:00
Matthias Clasen
e7e395652c A model-view separation for menus and toolbars, using the EggMenu code by
2003-08-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaction.[ch]:
	* gtk/gtktoggleaction.[ch]:
	* gtk/gtktoggleactionprivate.h:
	* gtk/gtkradioaction.[ch]:
	* gtk/gtkactiongroup.[ch]:
	* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
	toolbars, using the EggMenu code by James Henstridge.

	* gtk/gtk.h: Include new headers.
	* gtk/Makefile.am: Add new files.

	* tests/testactions.c: Test for actions.
	* tests/testmerge.c: Test for menu merging.
	* tests/merge-[123].ui: Test data for testmerge.
	* tests/Makefile.am: Add testactions and testmerge.

	* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
	menubar and toolbar.
2003-08-24 19:58:30 +00:00