Commit Graph

7300 Commits

Author SHA1 Message Date
Matthias Clasen
cd6f16f5bb Add gtkcellview.h and gtkcellviewmenuitem.h.
2003-10-02  Matthias Clasen  <maclas@gmx.de>

	* gtk/Makefile.am (IGNORE_HFILES): Add gtkcellview.h and
	gtkcellviewmenuitem.h.

	* gtk/tmpl/gtkentrycompletion.sgml:
	* gtk/tmpl/gtktreemodelfilter.sgml:
	* gtk/tmpl/gtkcelllayout.sgml:
	* gtk/tmpl/gtkcombobox.sgml:
	* gtk/tmpl/gtkcomboboxentry.sgml: New templates.

	* gtk/gtk-sections.txt:
	* gtk/gtk-docs.sgml: Add sections for GtkEntryCompletion,
	GtkTreeModelFilter, GtkCellLayout, GtkComboBox, GtkComboBoxEntry.

	* gtk/tmpl/gtktreednd.sgml: Add short description.

	* gtk/gtk-docs.sgml: Move GtkItemFactory to the "Deprecated" chapter.

	* gtk/tmpl/gtktoggletoolbutton.sgml: Fix section title.
2003-10-01 22:43:30 +00:00
Federico Mena Quintero
feb412c194 Simplify with a macro. This bloats the compiled code, but at least it
2003-10-01  Federico Mena Quintero  <federico@ximian.com>

	* gtkfilechooserimpldefault.c (name_sort_func): Simplify with a
	macro.  This bloats the compiled code, but at least it makes the
	human-readable code not egregiously ugly.
	(size_sort_func): Likewise.
	(mtime_sort_func): Likewise.
2003-10-01 21:40:17 +00:00
Kristian Rietveld
40743e126f implement the GtkCellLayout interface, drop packing/attribute/cell data
Wed Oct  1 22:43:40 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
	packing/attribute/cell data functions from the header,
	(gtk_cell_view_set_cell_data): added support for cell data funcs.

	* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
	packing/attribute/cell data functions from the header, implemented
	cell data func support.

	* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
	for the move to GtkCellLayout.

	* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 20:51:54 +00:00
cinamod
c0addc2e40 be more protective about when we install properties 2003-10-01 20:49:44 +00:00
Federico Mena Quintero
da29352587 Use enum values instead of plain numbers for the file lists's sort
2003-10-01  Federico Mena Quintero  <federico@ximian.com>

	* gtkfilechooserimpldefault.c (tree_selection_changed): Use enum
	values instead of plain numbers for the file lists's sort columns.
	(create_file_list): Likewise.
	(tree_selection_changed): Make the file list start up sorted by
	name, and don't specify a default sorting function, so that there
	is no unsorted order.  This is for consistency with Nautilus.
	(list_sort_column_changed_cb): Callback; we cache whether the sort
	order for the file list's name column is ascending or not.
	(compare_with_folders_first): New helper function to sort
	directories before files.
	(name_sort_func): Use compare_with_folders_first().
	(size_sort_func): Likewise.
	(mtime_sort_func): Likewise.

	Of course this callback mess would be easy in a real language:

	  (set-sort-func sortable NAME_COLUMN
	    (make-comparer impl (lambda (a b) (strcmp (get-name a) (get-name b)))))
	  (set-sort-func sortable SIZE_COLUMN
	    (make-comparer impl (lambda (a b) (compare (get-size a) (get-size b)))))
	  ... etc ...

	  (define (make-comparer impl f)
	    (lambda (a b)
	      (if (eq (is-dir? a) (is-dir? b))
	          (f a b)
		  (if (sort-ascending? impl)
		      (if (is-dir? a) -1 1)
		      (if (is-dir? a) 1 -1)))))
2003-10-01 19:42:50 +00:00
Matthias Clasen
6e87629f1a Introduce a separate "hide_if_empty" property for empty menu handling.
2003-10-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaction.c (gtk_action_class_init):
	(gtk_action_[gs]et_property): Introduce a separate
	"hide_if_empty" property for empty menu handling.
	(_gtk_action_sync_menu_visible): ...and use it here.

	* tests/testmerge.c (main): ...and here.
2003-10-01 19:07:36 +00:00
Federico Mena Quintero
39e208d865 Added fields for the shortcuts tree and its model. (create_file_list):
2003-09-30  Federico Mena Quintero  <federico@ximian.com>

	* gtkfilechooserimpldefault.c (struct _GtkFileChooserImplDefault):
	Added fields for the shortcuts tree and its model.
	(create_file_list): Don't call
	gtk_tree_view_column_set_sort_column_id() twice.
	(create_shortcuts_model): New function.
	(list_icon_data_func): Use an ICON_SIZE macro instead of a
	hardcoded value.
	(list_row_activated): Use _gtk_file_chooser_set_current_folder_path()
	to avoid converting the GtkFilePath to a URI string.
	(gtk_file_chooser_impl_default_set_current_folder): Select the
	appropriate item from the shortcuts list when the current folder
	changes, to let the user know where he is.
	(tree_selection_changed): Likewise.

	* gtkfilesystem.h (struct _GtkFileSystemIface): Added methods for
	::supports_shortcuts(), ::list_shortcuts(), ::set_shortcuts().
2003-10-01 00:53:59 +00:00
Matthias Clasen
e8ea480893 Fix signal doc comments to pacify gtk-doc.
* gtk/gtktoolitem.c (gtk_tool_item_class_init): Fix signal doc
	comments to pacify gtk-doc.
2003-10-01 00:16:11 +00:00
Matthias Clasen
c34b0a094b Add two missing signals.
* gdk/tmpl/keys.sgml: Add two missing signals.
2003-09-30 23:25:48 +00:00
Matthias Clasen
dbdc43be4c Doc formatting tweaks.
2003-10-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmain.c: Doc formatting tweaks.

	* gtk/gtktoolitem.c (gtk_tool_item_set_is_important): Fix a typo.

	* gtk/gtkcheckmenuitem.h (gtk_check_menu_item_set_draw_as_radio):
	Use the same parameter names as in .c file, to pacify gtk-doc.

	* gtk/gtktoggletoolbutton.[hc]:
	* gtk/gtktoolbutton.[hc]:
	* gtk/gtktoolitem.[hc]:
	* gtk/gtktoolbar.[hc]:
	* gtk/gtkcolorbutton.[hc]:
	* gtk/gtkfontbutton.[hc]:
	* gtk/gtkalignment.[hc]: Define GET_PRIVATE macros in the
	source, not in the header.

	* gtk/gtkcheckmenuitem.c (gtk_check_menu_item_[sg]et_draw_as_radio):
	Document these as 2.4 API additions.

	* gtk/tmpl/gtkaction.sgml: Fix cross reference to GtkMenuMerge.

	* gtk/gtk-sections.txt: Additions.

	* gtk/tmpl/gtkitemfactory.sgml: Add hint to use #GtkUIManager instead.
2003-09-30 22:48:10 +00:00
Kristian Rietveld
881df5c460 Add API doc comments.
Tue Sep 30 23:42:56 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkentry.c (gtk_entry_set_completion),
	(gtk_entry_get_completion): Add API doc comments.

	* gtk/gtkentrycompletion.c: Fix #includes and add API doc comments.
2003-09-30 21:44:39 +00:00
Matthias Clasen
f99ba6c70f Add hint to use #GtkUIManager instead.
* gtk/tmpl/gtkitemfactory.sgml: Add hint to use #GtkUIManager instead.
2003-09-30 21:15:00 +00:00
Kristian Rietveld
b65b8538b5 Add "Since: 2.4" to all API doc comments.
Tue Sep 30 23:12:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelfilter.c: Add "Since: 2.4" to all API doc comments.
2003-09-30 21:14:09 +00:00
Kristian Rietveld
1c88b37f73 Some API doc comment fixes.
Tue Sep 30 22:59:58 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeviewcolumn.c: Some API doc comment fixes.

	* gtk/gtkcellayout.c: Fix #include and oooooh API doc comments!
2003-09-30 21:02:05 +00:00
Matthias Clasen
57f13d815d Test handling of empty menus.
2003-09-30  Matthias Clasen  <maclas@gmx.de>

	* tests/merge-*.ui:
	* tests/testmerge.c: Test handling of empty menus.

	* gtk/gtkuimanager.c (_gtk_menu_is_empty): New function to determine
	whether a menu is empty. Used in gtkaction.c.
	(update_smart_separators): Also update the visibility of empty menus.
	(update_node): When creating a new menu proxy, insert an "Empty" menu
	item which only gets shown if the menu is empty.

	* gtk/gtkaction.c (gtk_action_class_init): Document the meaning of
	"is_important" for menu proxies.
	(_gtk_action_sync_menu_visible): New function to sync the visibility
	of menu proxies. Used in gtkuimanager.c.
	(gtk_action_sync_visible): New function to sync the visibility of
	proxies.
2003-09-30 20:55:24 +00:00
Kristian Rietveld
039c6b3bb1 set popup_in_progress to TRUE, (gtk_combo_box_menu_show): and back to
Tue Sep 30 21:43:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_button_press): set
	popup_in_progress to TRUE,
	(gtk_combo_box_menu_show): and back to FALSE here; the menu now
	won't disappear on the first button release. (Reported by Matthias
	Clasen).
2003-09-30 19:46:48 +00:00
Kristian Rietveld
b78ee57ea4 actually show the child.
Tue Sep 30 21:08:43 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcombobox.c (gtk_combo_box_init): actually show the child.

	* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): ditto. (#123543,
	Marco Pesenti Gritti).
2003-09-30 19:11:55 +00:00
Murray Cumming
fa7b750994 The render vfunc takes a GdkDrawable* instead of a GdkWindow*, because
2003-09-30  Murray Cumming  <murrayc@usa.net>

        * gtk/gtkcellrenderer.h: The render vfunc takes a GdkDrawable*
        instead of a GdkWindow*, because that what it is given. The
        documentation was already correct. This should cause no API/ABI
        breakage with C compilers.
        * gtk/gtkcellrenderertext.c, gtkcellrendererpixbuf.c,
        gtkcellrenderertogger.c: Updated the declarations of the render vfunc
        implementation accordingly.
2003-09-30 17:10:02 +00:00
Gustavo Maciel Dias Vieira
9cec9f2bc2 Applied revision by Augusta Marques da Silva <augusta.marques@gmx.net>.
2003-09-30  Gustavo Maciel Dias Vieira  <gdvieira@zaz.com.br>

        * pt_BR.po: Applied revision by Augusta Marques da Silva
        <augusta.marques@gmx.net>.
2003-09-30 15:32:06 +00:00
cinamod
f81a63fde9 add gtksetting 2003-09-30 14:44:11 +00:00
Matthias Clasen
f582c04a9c Document the "direction-changed" and "keys-changed" signals.
2003-09-30  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkkeys.c (gdk_keymap_class_init): Document the
	"direction-changed" and "keys-changed" signals.

	* gdk/gdkscreen.c (gdk_screen_class_init): Document the
	"size-changed" signal.

	* gdk/gdkdisplaymanager.c (gdk_display_manager_class_init):
	Document the "display-opened" signal.

	* gdk/gdkdisplay.c (gdk_display_close): Doc tweak.
	(gdk_display_class_init): Document the "closed" signal.

	* gdk/tmpl/keys.sgml: Small addition.

	* gdk/gdk-sections.txt: Add GdkDisplayClass and GdkScreenClass.

	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add GdkPixbufLoaderClass.
2003-09-30 00:36:29 +00:00
Matthias Clasen
f434562000 Add GdkPixbufLoaderClass.
* gdk-pixbuf/gdk-pixbuf-sections.txt: Add GdkPixbufLoaderClass.
2003-09-29 23:27:41 +00:00
Soeren Sandmann
dc423ba358 rename property tab_moves_focus to accepts_tab. (#122709 again).
Sat Sep 27 16:02:40 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktextview.[ch]: rename property tab_moves_focus to
	accepts_tab. (#122709 again).
2003-09-27 14:13:12 +00:00
Matthias Clasen
32a167b96a Document the fact that the newly created object does not come with a
2003-09-27  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwindow.c (gtk_window_new):
	* gtk/gtkitemfactory.c (gtk_item_factory_new): Document
	the fact that the newly created object does not come with
	a floating reference.  (#103068, patch by Frederic Lespez)
2003-09-27 00:42:20 +00:00
Matthias Clasen
08573c0879 Deprecate GtkItemFactory in favor of GtkUIManager. Just leave
2003-09-27  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkitemfactory.h: Deprecate GtkItemFactory in favor
	of GtkUIManager. Just leave GtkTranslateFunc undeprecated,
	since GtkActionGroup uses it.
2003-09-26 23:59:42 +00:00
Matthias Clasen
e4507b6018 Turn off GTK_DISABLE_DEPRECATED, since this test uses the
2003-09-27  Matthias Clasen  <maclas@gmx.de>

	* tests/testtext.c: Turn off GTK_DISABLE_DEPRECATED, since
	this test uses the soon-to-be-deprecated GtkItemFactory.

	* demos/gtk-demo/Makefile.am (demos): Add ui_manager.c,
	remove item_factory.c

	* demos/gtk-demo/ui_manager.c: Duplicate of item_factory.c
	using GtkUIManager instead of GtkItemFactory.
2003-09-26 23:33:46 +00:00
Matthias Clasen
eeed9d1890 Demonstrate the use of the connect-proxy signal.
2003-09-27  Matthias Clasen  <maclas@gmx.de>

	* tests/testmerge.c: Demonstrate the use of the
	connect-proxy signal.

	* gtk/gtkaction.c (connect_proxy): Add connect-proxy and
	disconnect-proxy signals to do small customizations
	like displaying tooltips in the statusbar without
	custom actions.  (#122894, Philip Langdale)

	* gtk/gtkuimanager.c (update_node): Don't leak tooltip.
2003-09-26 23:01:32 +00:00
Kristian Rietveld
c920afd9c5 Landing the new ComboBox. Note that only gtkcombobox.h and
Fri Sep 26 23:49:44 2003  Kristian Rietveld  <kris@gtk.org>

	Landing the new ComboBox. Note that only gtkcombobox.h and
	gtkcomboboxentry.h are public.

	* gtk/gtkcellview.[ch], gtk/gtkcellviewmenuitem.[ch],
	gtk/gtkcombobox.[ch], gtk/gtkcomboboxentry.[ch]: new files.

	* gtk/Makefile.am, gtk/gtk.h: adding the new files.

	* tests/testcombo.c: and a new test.

	* tests/Makefile.am: adding the new test.
2003-09-26 21:57:06 +00:00
Tor Lillqvist
4a2de86c44 Don't use hardcoded DEMOCODEDIR on Windows.
2003-09-25  Tor Lillqvist  <tml@iki.fi>

	* demos/gtk-demo/main.c: Don't use hardcoded DEMOCODEDIR on Windows.

2003-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (handle_wm_paint): New
	function. Code split out from gdk_event_translate(). Needed
	because gdk_event_get_graphics_expose() couldn't do anything
	sensible otherwise. (Not that I think graphics exposes work anyway
	in gdk/win32, but at least now the code could work.)

	(gdk_event_get_graphics_expose): Call handle_wm_paint() instead of
	gdk_event_translate(), which couldn't have worked as it doesn't
	take any pre-allocated GdkEvent parameter any longer.

	(gdk_event_translate): Handle WM_MOUSEACTIVATE: Don't let
	GDK_WINDOW_TEMP windows be activated. (#122578, John Ehresman)
2003-09-25 18:48:06 +00:00
cinamod
97f1b098af set delay on popdown menus 2003-09-25 15:07:02 +00:00
cinamod
86b43475c8 set delay on popdown menus 2003-09-25 15:04:16 +00:00
KAMAGASAKO Masatoshi
944d730d7c Updated Japanese translation.
2003-09-25  KAMAGASAKO Masatoshi  <emerald@gnome.gr.jp>

	* ja.po: Updated Japanese translation.
2003-09-24 16:58:53 +00:00
Matthias Clasen
33164c02dc Demonstrate tooltips on toolitems.
2003-09-24  Matthias Clasen  <maclas@gmx.de>

	* demos/gtk-demo/appwindow.c (do_appwindow): Demonstrate tooltips
	on toolitems.
2003-09-23 23:55:02 +00:00
Matthias Clasen
a93cee89c2 Sync tooltips on toolitems.
2003-09-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaction.c (connect_proxy): Sync tooltips on toolitems.

	* gtk/gtkuimanager.c (update_node): Don't complain about missing
	actions on popups. Re-set "tooltip" property on toolitems after
	adding them to parent to trigger proxy update.
2003-09-23 23:42:39 +00:00
cinamod
dc16c121f9 const some strings 2003-09-22 14:36:30 +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
df64ae4434 Fix a copy-and-paste error. (#122800)
2003-09-22  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtktable.sgml: Fix a copy-and-paste error.  (#122800)
2003-09-22 08:30:26 +00:00
Matthias Clasen
d381967d5c Changes to make cross-process merging feasible:
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.
2003-09-21 22:04:48 +00:00
Soeren Sandmann
8be8d7f61d Add new "tab moves focus" property (#122709)
Sun Sep 21 23:13:37 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktextview.[ch]: Add new "tab moves focus" property (#122709)
2003-09-21 21:17:44 +00:00
Tor Lillqvist
71e847d11c Don't use zip -r on the etc directory, to avoid including editor backup
2003-09-20  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Don't use zip -r on the etc directory, to avoid
	including editor backup files. List files we want explicitly.

	* gtk/gtkmain.c (_gtk_get_lc_ctype): New function. On Unix, just
	calls setlocale (LC_CTYPE, NULL). On Windows, looks for the
	LC_ALL, LC_CTYPE and LANG environment variables, than calls
	g_win32_getlocale().

	(gtk_get_default_language): Code snippet moved to above function,
	call it.

	* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave)
	* gtk/gtkrc.c (gtk_rc_context_parse_file): Call
	_gtk_get_lc_ctype() instead of setlocale().
2003-09-20 23:52:16 +00:00
Raymond Penners
e95ad99afe 0.4.3 2003-09-20 09:56:27 +00:00
Matthias Clasen
c0d62354d3 Remove a pointless check. (#122710, Kjartan Maraas)
2003-09-19  Matthias Clasen  <maclas@gmx.de>

	* io-tga.c (try_preload): Remove a pointless check.
	(#122710, Kjartan Maraas)
2003-09-19 19:20:09 +00:00
Soeren Sandmann
fc3f1ef30c implement RTL flipping (#96632)
Fri Sep 19 18:15:31 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkpaned.c, gtk/gtkhpaned.c: implement RTL flipping
	(#96632)
2003-09-19 16:18:16 +00:00
Soeren Sandmann
ad709dcfea Improve documentation. (#117306, Steve Chaplin)
Fri Sep 19 13:24:54 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktreeview.c (gtk_tree_view_get_cursor): Improve
	documentation. (#117306, Steve Chaplin)
2003-09-19 11:29:10 +00:00
Christophe Merlet
85e23e7121 Updated French translation. 2003-09-19 09:39:59 +00:00
Tor Lillqvist
c1aa7651b4 Handle dead keysyms present on the US-International keyboard. For clarity,
2003-09-19  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkkeys-win32.c (update_keymap): Handle dead keysyms
	present on the US-International keyboard. For clarity, order
	keysyms in case statement according to numeric value.

	(gdk_keymap_translate_keyboard_state): Handle Caps Lock
	correctly. (#120176, Ken Rastatter and Owen Taylor)
2003-09-19 00:30:35 +00:00
Danilo Šegan
96994c9ea2 Updated Serbian translation.
2003-09-18  Danilo Šegan  <dsegan@gmx.net>

	* sr.po, sr@Latn.po: Updated Serbian translation.
2003-09-18 21:24:04 +00:00
Raymond Penners
c2cee519e3 0.4.2 2003-09-18 19:30:06 +00:00
Matthias Clasen
8a72d4b383 Call g_closure_unref() to unref a closure, not g_object_unref(). (#122637,
2003-09-18  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaction.c (gtk_action_finalize): Call g_closure_unref() to
	unref a closure, not g_object_unref().  (#122637, Marco Pesenti Gritti)
2003-09-18 19:04:42 +00:00
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