remember and ref the created widgets. Added gimp_ui_manager_ui_popup()

2004-04-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.[ch]: remember and ref the created
	widgets.  Added gimp_ui_manager_ui_popup() which pops up a GtkMenu
	with a custom GimpMenuPositionFunc and a GtkDestroyNotify which is
	called on popdown.

	* app/widgets/gimpmenufactory.c (gimp_menu_factory_finalize):
	don't forget to free the list of managed UIs.

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpdocked.[ch]
	* app/widgets/gimpeditor.[ch]: added GimpUIManager stuff parallel
	to the to-be-removed GtkItemFactory stuff.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly and added
	#if 0'ed code which actually uses all the UI managers.

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell.c
	* app/gui/gui-vtable.c: disabled some gimp_ui_manager_update()
	calls because they were invoking toggle and radio callbacks
	which still have the wrong signature.
This commit is contained in:
Michael Natterer
2004-04-22 17:14:22 +00:00
committed by Michael Natterer
parent 505698be0a
commit 1071842535
26 changed files with 623 additions and 96 deletions

View File

@ -60,6 +60,7 @@
#include "gimphelp-ids.h"
#include "gimpitemfactory.h"
#include "gimpmenufactory.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
@ -304,10 +305,20 @@ gimp_error_console_button_press (GtkWidget *widget,
{
GimpEditor *editor = GIMP_EDITOR (console);
#if 0
gimp_ui_manager_update (editor->ui_manager,
editor->popup_data);
gimp_ui_manager_ui_popup (editor->ui_manager,
editor->ui_identifier,
editor->popup_data,
GTK_WIDGET (editor),
NULL, NULL, NULL);
#else
gimp_item_factory_popup_with_data (editor->item_factory,
editor->item_factory_data,
editor->popup_data,
GTK_WIDGET (editor),
NULL, NULL, NULL);
#endif
return TRUE;
}