1. 11 Oct, 2003 1 commit
    • Matthias Clasen's avatar
      Add G_BEGIN_DECLS/G_END_DECLS to make these usable in C++. (#124351, · c44e5b00
      Matthias Clasen authored
      Sat Oct 11 23:14:36 2003  Matthias Clasen  <maclas@gmx.de>
      
      	* gtk/gtkactiongroup.h:
      	* gtk/gtkaction.h:
      	* gtk/gtkradioaction.h:
      	* gtk/gtkradiotoolbutton.h:
      	* gtk/gtkseparatortoolitem.h:
      	* gtk/gtktoggleaction.h:
      	* gtk/gtktoolitem.h:
      	* gtk/gtkuimanager.h: Add G_BEGIN_DECLS/G_END_DECLS to make
      	these usable in C++.  (#124351, Murray Cumming)
      c44e5b00
  2. 21 Sep, 2003 1 commit
    • Matthias Clasen's avatar
      Changes to make cross-process merging feasible: · d381967d
      Matthias Clasen authored
      2003-09-21  Matthias Clasen  <maclas@gmx.de>
      
      	Changes to make cross-process merging feasible:
      
      	* gtk/gtkuimanager.[hc]: Add a readonly "ui" property which holds the
      	merged UI definition. Remove the "changed" signal, since its role
      	is now filled by "notify::ui". Instead add a "actions-changed" signal
      	which gets emitted when the set of actions changes.
      
      	* gtk/gtktoggleactionprivate.h:
      	* gtk/gtktoggleaction.[hc] (gtk_toggle_action_[sg]et_draw_as_radio):
      	Add a "draw_as_radio" property to toggle actions so that they can be
      	used as proxies for radio actions much like the "draw_as_radio"
      	property on check menu items enables them to operate as proxies for
      	radio actions.
      
      	Prevent the "show_all" trap for action-based menus (see
      	http://mail.gnome.org/archives/gtk-devel-list/2003-September/
      	msg00260.html):
      
      	* gtk/gtkmenu.c (gtk_menu_{hide,show}_all): Remove g_return_if_fail()
      	calls from static functions.
      
      	* gtk/gtkuimanager.c (update_node):
      	* gtk/gtkaction.c (connect_proxy): Set "no_show_all" on constructed
      	widgets whose visibility is externally controlled.
      
      	* gtk/gtkwidget.[hc] (gtk_widget_[gs]et_no_show_all): Add a boolean
      	"no_show_all" property with setter and getter. When TRUE, it keeps
      	gtk_widget_{hide,show}_all() from modifying the visibility of the
      	widget and its children.
      d381967d
  3. 17 Sep, 2003 1 commit
    • Matthias Clasen's avatar
      Install accelerators on actions, not on proxies, support accelerator-only · 0ceb0db0
      Matthias Clasen authored
      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.
      0ceb0db0
  4. 04 Sep, 2003 1 commit
    • Matthias Clasen's avatar
      Test gtk_ui_manager_add_ui(). · 02a963e1
      Matthias Clasen authored
      2003-09-04  Matthias Clasen  <maclas@gmx.de>
      
      	* tests/testmerge.c (toggle_dynamic): Test gtk_ui_manager_add_ui().
      
      	* gtk/gtkuimanager.h: Add GtkUIManagerItemType enum which is needed for the
      	'type' argument of gtk_ui_manager_add_ui().
      
      	* gtk/gtkuimanager.[hc] (gtk_ui_manager_add_ui): Add 'type' and 'top' arguments
      	to make this function as powerful as the XML methods of adding UI.  (#120647)
      
      	* gtk/gtk-sections.txt: Add GtkUIManagerItemType.
      02a963e1
  5. 01 Sep, 2003 1 commit
    • Matthias Clasen's avatar
      Shorten the names of some static functions. · cbbe97ab
      Matthias Clasen authored
      2003-09-02  Matthias Clasen  <maclas@gmx.de>
      
      	* gtk/gtkuimanager.c: Shorten the names of some static
      	functions.
      
      	Support adding and removing merge nodes dynamically (#120647,
      	Anders Carlsson):
      
      	* gtk/gtkuimanager.[ch] (gtk_ui_manager_new_merge_id): Renamed
      	gtk_ui_manager_next_merge_id to gtk_ui_manager_new_merge_id
      	and made it public.
      	(gtk_ui_manager_add_ui): New function to add UI elements
      	without juggling XML fragments, currently restricted to menuitems,
      	toolitems and separators. Actions still come from registered
      	action groups.
      cbbe97ab
  6. 31 Aug, 2003 2 commits
    • Matthias Clasen's avatar
      Make this public again, since it's occasionally useful. (#121128, Marco · 7cddc693
      Matthias Clasen authored
      2003-09-01  Matthias Clasen  <maclas@gmx.de>
      
      	* gtk/gtkuimanager.[ch] (gtk_ui_manager_ensure_update): Make
      	this public again, since it's occasionally useful.  (#121128,
      	Marco Pesenti Gritti)
      
      	* gtk/gtkaction.c: Add an "is_important" property and propagate
      	it to toolitem proxies.  (#121058, Marco Pesenti Gritti)
      7cddc693
    • Matthias Clasen's avatar
      Add gtktoggleactionprivate.h · 2c41fc09
      Matthias Clasen authored
      2003-08-31  Matthias Clasen  <maclas@gmx.de>
      
      	* gtk/Makefile.am (IGNORE_HFILES): Add gtktoggleactionprivate.h
      
      	* gtk/tmpl/gtkuimanager.sgml:
      	* gtk/gtk-sections.txt: Replace gtk_ui_manager_activate by
      	gtk_ui_manager_get_action.
      
      	* gtk/gtkuimanager.[ch] (gtk_ui_manager_get_action): New function,
      	replaces gtk_ui_manager_activate().  (#120658)
      
      	* tests/testmerge.c: Use gtk_ui_manager_get_action() instead of
      	gtk_ui_manager_activate().
      2c41fc09
  7. 30 Aug, 2003 2 commits
    • Matthias Clasen's avatar
      Add some docs. · 0a49f658
      Matthias Clasen authored
      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.
      0a49f658
    • Matthias Clasen's avatar
      Connect to "destroy" on toolbar, rather than to "remove" on handlebox. · e5eaa52b
      Matthias Clasen authored
      2003-08-30  Matthias Clasen  <maclas@gmx.de>
      
      	* tests/testmerge.c (add_widget): Connect to "destroy" on toolbar,
      	rather than to "remove" on handlebox.
      
      	* gtk/gtkuimanager.[hc] (gtk_ui_manager_activate): New method to
      	activate an action found by following a path.  (#120658)
      
      	* tests/testmerge.c: Add a button to test gtk_ui_manager_activate().
      e5eaa52b
  8. 29 Aug, 2003 2 commits
    • Matthias Clasen's avatar
      Put toolbars in handleboxes. · 5f6d00b4
      Matthias Clasen authored
      2003-08-30  Matthias Clasen  <maclas@gmx.de>
      
      	* tests/testmerge.c (add_widget): Put toolbars in handleboxes.
      
      	* gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
      	setter and getter. If it is set, add tearoff menu items to regular
      	menus, but not to popups. Add a signal "changed", which gets emitted
      	when the merged ui has changed.
      
      	* tests/testmerge.c: Add button to test the generation of tearoff
      	menu items.
      5f6d00b4
    • Matthias Clasen's avatar
      Add a boolean property, "add_tearoffs" with setter and getter. If it is · 879880e7
      Matthias Clasen authored
      2003-08-30  Matthias Clasen  <maclas@gmx.de>
      
      	* gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
      	setter and getter. If it is set, add tearoff menu items to regular
      	menus, but not to popups.
      
      	* tests/testmerge.c: Add button to test the generation of tearoff
      	menu items.
      879880e7
  9. 26 Aug, 2003 1 commit
    • Matthias Clasen's avatar
      Use gssize for length, not gsize. · 720bdb8d
      Matthias Clasen authored
      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.
      720bdb8d
  10. 25 Aug, 2003 1 commit