summaryrefslogtreecommitdiff
path: root/tests/testactions.c
Commit message (Collapse)AuthorAgeFilesLines
* Add value parameter to allow setting the currently selected group memberMatthias Clasen2003-09-151-10/+22
| | | | | | | | | | | | | | | | | | | | 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].
* Change the XML format: <Root> element is replaced by <ui>, <menu> elementMatthias Clasen2003-08-271-71/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use gssize for length, not gsize.Matthias Clasen2003-08-261-41/+39
| | | | | | | | | | | | | | | | | | 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.
* Rename GtkMenuMerge to GtkUIManager.Matthias Clasen2003-08-251-6/+6
|
* Namespace the enum values properly. Sorry about the resize grip trouble,Matthias Clasen2003-08-241-10/+10
| | | | | | | | | | | | 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.
* A model-view separation for menus and toolbars, using the EggMenu code byMatthias Clasen2003-08-241-0/+268
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.