Commit Graph

66 Commits

Author SHA1 Message Date
Matthias Clasen
e902118f0f Pull accelerator key from the stock item if stock_id is given, but
Wed Dec 31 02:05:39 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full):
	(gtk_action_group_add_toggle_actions_full):
	(gtk_action_group_add_radio_actions_full): Pull accelerator key
	from the stock item if stock_id is given, but accelerator
	not.  (Noticed by Jeff Franks and Jody Goldberg)

	* tests/testmerge.c: Remove the accelerator from the "Open" entry
	to test the above change.
2003-12-31 01:05:57 +00:00
Matthias Clasen
a64ce01213 Don't use first_action without initializing it if n_entries is 0.
Fri Dec 26 23:24:35 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
	Don't use first_action without initializing it if n_entries is 0.
2003-12-26 22:23:50 +00:00
Matthias Clasen
03cd34e13c Add "name" as a construct-only property. (#125475, Murray Cumming)
Sat Oct 25 23:30:13 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_class_init): Add "name"
	as a construct-only property.  (#125475, Murray Cumming)
2003-10-25 21:34:24 +00:00
Matthias Clasen
cf639f4168 Initially activate the JUSTIFY_RIGHT group member to test the fix for
2003-09-22  Matthias Clasen  <maclas@gmx.de>

	* tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT
	group member to test the fix for #122904.

	* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
	Add the action to the group before activating it, otherwise we
	may end up with multiple active group members.  (#122904, Marco
	Pesenti Gritti)
2003-09-22 08:54:23 +00:00
Matthias Clasen
caf380c793 Add value parameter to allow setting the currently selected group member
2003-09-15  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.[hc]: (gtk_action_group_add_radio_actions):
	(gtk_action_group_add_radio_actions_full): Add value parameter to allow
	setting the currently selected group member before connecting signals.
	(GtkToggleActionEntry): Separate struct for constructing toggle actions,
	including a boolean to initialize the action state before connecting
	signals.
	(gtk_action_group_add_toggle_actions):
	(gtk_action_group_add_toggle_actions_full): New functions to construct
	toggle actions from an array of GtkToggleActionEntries.

	* demos/gtk-demo/appwindow.c:
	* tests/testactions.c:
	* tests/testmerge.c: Adjust to new action group API.

	* gtk/gtk-sections.txt: Add gtk_action_group_add_toggle_actions[_full].
2003-09-15 19:51:55 +00:00
Matthias Clasen
0a163c7fd7 Doc tweaks. 2003-09-04 00:49:37 +00:00
Matthias Clasen
2ece92c8f3 Doc addition.
* gtk/gtkactiongroup.c (gtk_action_group_new): Doc addition.
2003-09-01 23:45:54 +00:00
Matthias Clasen
0a49f658c5 Add some docs.
2003-08-31  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c: Add some docs.

	* gtk/gtkuimanager.[hc]: Get rid of the remove_widget signal. It
	wasn't emitted anyway.
2003-08-30 22:26:32 +00:00
Matthias Clasen
87248d53a2 Actually group the actions together rather than putting each in its own
2003-08-29  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full): Actually group the actions
	together rather than putting each in its own group.
2003-08-29 20:21:01 +00:00
Søren Sandmann Pedersen
9542740711 Forgot to actually commit this file 2003-08-29 19:28:44 +00:00
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
3cb958de19 Make the previous commit compile. 2003-08-25 22:56:02 +00:00
Matthias Clasen
04a47f28c2 Remove C99isms. (Morten Welinder)
2003-08-25  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_add_actions): Remove C99isms. (Morten
	Welinder)
2003-08-25 18:43:14 +00:00
Matthias Clasen
bfa5c5aa4e Hooks for translation of label and tooltip in GtkActionGroupEntries.
2003-08-25  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.[hc] (gtk_action_group_set_translate_func,
	gtk_action_group_set_translation_domain): Hooks for translation of
	label and tooltip in GtkActionGroupEntries.  (#120620)
2003-08-24 23:11:14 +00:00
Matthias Clasen
32c6a944cf Namespace the enum values properly. Sorry about the resize grip trouble,
2003-08-25  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.h (GtkActionGroupEntryType): Namespace the enum
	values properly. Sorry about the resize grip trouble, Owen.  (#120621)

	* gtk/gtkactiongroup.c:
	* demos/gtk-demo/appwindow.c:
	* tests/testmerge.c:
	* tests/testactions.c: Use new GtkActionGroupEntryType enum.
2003-08-24 22:06:52 +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