Commit cf3533ba authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

put the image popup menu into a dummy menubar to work around the silly

2004-05-17  Michael Natterer  <mitch@gimp.org>

	* menus/menus.xsl: put the image popup menu into a dummy menubar
	to work around the silly GtkUIManager restriction that popup menus
	can't have tearoff items.

	* app/menus/menus.c
	* app/menus/image-menu.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c: changed accordingly.

	* app/gui/gui.c (gui_restore_after_callback): connect to
	"notify::tearoff-menus" of GimpGuiConfig and reconfigure the
	global image UI manager accordingly.

	* app/config/gimpguiconfig.c: removed GIMP_PARAM_RESTART from the
	"tearoff-menus" property because GtkUIManager can change this on
	the fly.

	* app/display/gimpdisplayshell.[ch]: added the menubar to the
	GimpDisplayShell struct. Some cleanup in gimp_display_shell_new().

	* app/display/gimpdisplayshell-appearance.c
	(gimp_display_shell_set_show_menubar): use shell->menubar instead
	of asking the UI manager.

	* app/widgets/gimpuimanager.[ch]: changed gimp_ui_manager_ui_get()
	to transparently load the XML files even if a sub-widget was
	requested. Reordered parameters of gimp_ui_manager_ui_popup().
	Lots of internal cleanups.

	* app/widgets/gimpdockable.c
	* app/widgets/gimptooloptionseditor.c: simplified accordingly.

	* app/widgets/gimpeditor.[ch]: added new function
	gimp_editor_popup_menu() which takes a GimpMenuPositionFunc and
	updates/shows the editor's menu.

	* 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: use gimp_editor_popup_menu().

	* app/widgets/gimptoolbox.c: moved all code from
	gimp_toolbox_new() to GObject::constructor().
parent bd95efd5
2004-05-17 Michael Natterer <mitch@gimp.org>
* menus/menus.xsl: put the image popup menu into a dummy menubar
to work around the silly GtkUIManager restriction that popup menus
can't have tearoff items.
* app/menus/menus.c
* app/menus/image-menu.c
* app/display/gimpdisplayshell-callbacks.c
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.c: changed accordingly.
* app/gui/gui.c (gui_restore_after_callback): connect to
"notify::tearoff-menus" of GimpGuiConfig and reconfigure the
global image UI manager accordingly.
* app/config/gimpguiconfig.c: removed GIMP_PARAM_RESTART from the
"tearoff-menus" property because GtkUIManager can change this on
the fly.
* app/display/gimpdisplayshell.[ch]: added the menubar to the
GimpDisplayShell struct. Some cleanup in gimp_display_shell_new().
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_show_menubar): use shell->menubar instead
of asking the UI manager.
* app/widgets/gimpuimanager.[ch]: changed gimp_ui_manager_ui_get()
to transparently load the XML files even if a sub-widget was
requested. Reordered parameters of gimp_ui_manager_ui_popup().
Lots of internal cleanups.
* app/widgets/gimpdockable.c
* app/widgets/gimptooloptionseditor.c: simplified accordingly.
* app/widgets/gimpeditor.[ch]: added new function
gimp_editor_popup_menu() which takes a GimpMenuPositionFunc and
updates/shows the editor's menu.
* 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: use gimp_editor_popup_menu().
* app/widgets/gimptoolbox.c: moved all code from
gimp_toolbox_new() to GObject::constructor().
2004-05-17 Michael Natterer <mitch@gimp.org>
* app/actions/tool-options-actions.c: added icons to the Save,
......
......@@ -184,7 +184,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TEAROFF_MENUS,
"tearoff-menus", TEAROFF_MENUS_BLURB,
TRUE,
GIMP_PARAM_RESTART);
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CAN_CHANGE_ACCELS,
"can-change-accels", CAN_CHANGE_ACCELS_BLURB,
FALSE,
......
......@@ -86,7 +86,6 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
GtkWidget *menubar;
GtkContainer *vbox;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
......@@ -95,14 +94,12 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
g_object_set (options, "show-menubar", show, NULL);
menubar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (shell->menubar_manager),
"/image-menubar");
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
vbox = GTK_CONTAINER (shell->qmask->parent->parent);
if (show)
gtk_widget_show (menubar);
gtk_widget_show (shell->menubar);
else
gtk_widget_hide (menubar);
gtk_widget_hide (shell->menubar);
if (options->show_menubar || options->show_statusbar)
gtk_container_set_border_width (vbox, 2);
......
......@@ -422,12 +422,11 @@ gimp_display_shell_popup_menu (GtkWidget *widget)
gimp_context_set_display (gimp_get_user_context (shell->gdisp->gimage->gimp),
shell->gdisp);
gimp_ui_manager_ui_popup (shell->popup_manager, "/image-popup",
shell->gdisp,
gimp_ui_manager_ui_popup (shell->popup_manager, "/dummy-menubar/image-popup",
GTK_WIDGET (shell),
gimp_display_shell_origin_menu_position,
shell->origin,
NULL);
NULL, NULL);
return TRUE;
}
......@@ -733,10 +732,10 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case 3:
state |= GDK_BUTTON3_MASK;
gimp_ui_manager_ui_popup (shell->popup_manager, "/image-popup",
gdisp,
gimp_ui_manager_ui_popup (shell->popup_manager,
"/dummy-menubar/image-popup",
GTK_WIDGET (shell),
NULL, NULL, NULL);
NULL, NULL, NULL, NULL);
return_val = TRUE;
break;
......@@ -1512,9 +1511,8 @@ gimp_display_shell_qmask_button_press (GtkWidget *widget,
if ((bevent->type == GDK_BUTTON_PRESS) && (bevent->button == 3))
{
gimp_ui_manager_ui_popup (shell->menubar_manager, "/qmask-popup",
shell,
GTK_WIDGET (shell),
NULL, NULL, NULL);
NULL, NULL, NULL, NULL);
return TRUE;
}
......
......@@ -486,7 +486,8 @@ gimp_display_shell_new (GimpDisplay *gdisp,
GimpUIManager *popup_manager)
{
GimpDisplayShell *shell;
GimpDisplayConfig *config;
GimpDisplayConfig *display_config;
GimpGuiConfig *gui_config;
GtkWidget *main_vbox;
GtkWidget *disp_vbox;
GtkWidget *upper_hbox;
......@@ -494,7 +495,6 @@ gimp_display_shell_new (GimpDisplay *gdisp,
GtkWidget *lower_hbox;
GtkWidget *inner_table;
GtkWidget *image;
GtkWidget *menubar;
GdkScreen *screen;
gint image_width, image_height;
gint n_width, n_height;
......@@ -514,13 +514,14 @@ gimp_display_shell_new (GimpDisplay *gdisp,
image_width = gdisp->gimage->width;
image_height = gdisp->gimage->height;
config = GIMP_DISPLAY_CONFIG (gdisp->gimage->gimp->config);
display_config = GIMP_DISPLAY_CONFIG (gdisp->gimage->gimp->config);
gui_config = GIMP_GUI_CONFIG (display_config);
shell->dot_for_dot = config->default_dot_for_dot;
shell->dot_for_dot = display_config->default_dot_for_dot;
gimp_config_sync (GIMP_CONFIG (config->default_view),
gimp_config_sync (GIMP_CONFIG (display_config->default_view),
GIMP_CONFIG (shell->options), 0);
gimp_config_sync (GIMP_CONFIG (config->default_fullscreen_view),
gimp_config_sync (GIMP_CONFIG (display_config->default_fullscreen_view),
GIMP_CONFIG (shell->fullscreen_options), 0);
/* adjust the initial scale -- so that window fits on screen the 75%
......@@ -529,15 +530,15 @@ gimp_display_shell_new (GimpDisplay *gdisp,
*/
screen = gtk_widget_get_screen (GTK_WIDGET (shell));
if (GIMP_DISPLAY_CONFIG (config)->monitor_res_from_gdk)
if (display_config->monitor_res_from_gdk)
{
gimp_get_screen_resolution (screen,
&shell->monitor_xres, &shell->monitor_yres);
}
else
{
shell->monitor_xres = GIMP_DISPLAY_CONFIG (config)->monitor_xres;
shell->monitor_yres = GIMP_DISPLAY_CONFIG (config)->monitor_yres;
shell->monitor_xres = display_config->monitor_xres;
shell->monitor_yres = display_config->monitor_yres;
}
s_width = gdk_screen_get_width (screen) * 0.75;
......@@ -546,7 +547,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
n_width = SCALEX (shell, image_width);
n_height = SCALEY (shell, image_height);
if (config->initial_zoom_to_fit)
if (display_config->initial_zoom_to_fit)
{
/* Limit to the size of the screen... */
if (n_width > s_width || n_height > s_height)
......@@ -636,27 +637,28 @@ gimp_display_shell_new (GimpDisplay *gdisp,
main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (shell), main_vbox);
menubar = gimp_ui_manager_ui_get (shell->menubar_manager, "/image-menubar");
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0);
shell->menubar = gimp_ui_manager_ui_get (shell->menubar_manager,
"/image-menubar");
gtk_box_pack_start (GTK_BOX (main_vbox), shell->menubar, FALSE, FALSE, 0);
if (shell->options->show_menubar)
gtk_widget_show (menubar);
gtk_widget_show (shell->menubar);
/* make sure we can activate accels even if the menubar is invisible
* (see http://bugzilla.gnome.org/show_bug.cgi?id=137151)
*/
g_signal_connect (menubar, "can-activate-accel",
g_signal_connect (shell->menubar, "can-activate-accel",
G_CALLBACK (gtk_true),
NULL);
/* active display callback */
g_signal_connect (menubar, "button_press_event",
g_signal_connect (shell->menubar, "button_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (menubar, "button_release_event",
g_signal_connect (shell->menubar, "button_release_event",
G_CALLBACK (gimp_display_shell_events),
shell);
g_signal_connect (menubar, "key_press_event",
g_signal_connect (shell->menubar, "key_press_event",
G_CALLBACK (gimp_display_shell_events),
shell);
......
......@@ -107,6 +107,7 @@ struct _GimpDisplayShell
GtkWidget *vrule;
GtkWidget *origin; /* origin button */
GtkWidget *menubar; /* menubar */
GtkWidget *statusbar; /* statusbar */
guchar *render_buf; /* buffer for rendering the image */
......
......@@ -245,15 +245,15 @@ gui_menus_create_entry (Gimp *gimp,
{
if (! strncmp (path->data, "<Toolbox>", 9))
{
plug_in_menus_add_proc (list->data, "/toolbox-menubar", proc_def,
path->data);
plug_in_menus_add_proc (list->data, "/toolbox-menubar",
proc_def, path->data);
}
else if (! strncmp (path->data, "<Image>", 7))
{
plug_in_menus_add_proc (list->data, "/image-menubar", proc_def,
path->data);
plug_in_menus_add_proc (list->data, "/image-popup", proc_def,
path->data);
plug_in_menus_add_proc (list->data, "/image-menubar",
proc_def, path->data);
plug_in_menus_add_proc (list->data, "/dummy-menubar/image-popup",
proc_def, path->data);
}
}
}
......
......@@ -94,9 +94,12 @@ static void gui_really_quit_callback (GtkWidget *button,
gboolean quit,
gpointer data);
static void gui_show_tooltips_notify (GObject *config,
GParamSpec *param_spec,
static void gui_show_tooltips_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
Gimp *gimp);
static void gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
GtkUIManager *manager);
static void gui_device_change_notify (Gimp *gimp);
static void gui_display_changed (GimpContext *context,
......@@ -343,7 +346,12 @@ gui_restore_after_callback (Gimp *gimp,
image_ui_manager = gimp_menu_factory_manager_new (global_menu_factory,
"<Image>",
gimp, TRUE);
gimp,
gui_config->tearoff_menus);
g_signal_connect_object (gui_config, "notify::tearoff-menus",
G_CALLBACK (gui_tearoff_menus_notify),
image_ui_manager, 0);
gimp_devices_restore (gimp);
......@@ -475,22 +483,24 @@ gui_really_quit_callback (GtkWidget *button,
}
static void
gui_show_tooltips_notify (GObject *config,
GParamSpec *param_spec,
Gimp *gimp)
gui_show_tooltips_notify (GimpGuiConfig *gui_config,
GParamSpec *param_spec,
Gimp *gimp)
{
gboolean show_tool_tips;
g_object_get (config,
"show-tool-tips", &show_tool_tips,
NULL);
if (show_tool_tips)
if (gui_config->show_tool_tips)
gimp_help_enable_tooltips ();
else
gimp_help_disable_tooltips ();
}
static void
gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
GtkUIManager *manager)
{
gtk_ui_manager_set_add_tearoffs (manager, gui_config->tearoff_menus);
}
static void
gui_device_change_notify (Gimp *gimp)
{
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "menus-types.h"
......@@ -31,6 +33,9 @@ void
image_menu_setup (GimpUIManager *manager,
const gchar *ui_path)
{
if (! strcmp (ui_path, "/dummy-menubar"))
ui_path = "/dummy-menubar/image-popup";
file_menu_setup (manager, ui_path);
plug_in_menus_setup (manager, ui_path);
}
......@@ -96,7 +96,7 @@ menus_init (Gimp *gimp)
"toolbox-menu.xml", toolbox_menu_setup,
"/image-menubar",
"image-menu.xml", image_menu_setup,
"/image-popup",
"/dummy-menubar",
"image-menu.xml", image_menu_setup,
"/qmask-popup",
"qmask-menu.xml", NULL,
......
......@@ -145,7 +145,7 @@ plug_in_menus_setup (GimpUIManager *manager,
! strcmp (ui_path, "/toolbox-menubar")) ||
(! strncmp (path->data, "<Image>", 7) &&
(! strcmp (ui_path, "/image-menubar") ||
! strcmp (ui_path, "/image-popup"))))
! strcmp (ui_path, "/dummy-menubar/image-popup"))))
{
PlugInMenuEntry *entry = g_new0 (PlugInMenuEntry, 1);
const gchar *progname;
......
......@@ -55,7 +55,6 @@
#include "gimpdialogfactory.h"
#include "gimphelp-ids.h"
#include "gimpmenufactory.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
#include "gui/color-notebook.h"
......@@ -766,14 +765,7 @@ gimp_colormap_preview_button_press (GtkWidget *widget,
case 3:
gimp_colormap_editor_set_index (editor, col);
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
GIMP_EDITOR (editor)->popup_data);
gimp_ui_manager_ui_popup (GIMP_EDITOR (editor)->ui_manager,
GIMP_EDITOR (editor)->ui_path,
GIMP_EDITOR (editor)->popup_data,
GTK_WIDGET (editor),
NULL, NULL, NULL);
gimp_editor_popup_menu (GIMP_EDITOR (editor), NULL, NULL);
return TRUE;
default:
......
......@@ -35,7 +35,6 @@
#include "gimpcomponenteditor.h"
#include "gimpmenufactory.h"
#include "gimppreviewrendererimage.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
......@@ -520,13 +519,7 @@ gimp_component_editor_button_press (GtkWidget *widget,
break;
case 3:
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
GIMP_EDITOR (editor)->popup_data);
gimp_ui_manager_ui_popup (GIMP_EDITOR (editor)->ui_manager,
GIMP_EDITOR (editor)->ui_path,
GIMP_EDITOR (editor)->popup_data,
GTK_WIDGET (editor),
NULL, NULL, NULL);
gimp_editor_popup_menu (GIMP_EDITOR (editor), NULL, NULL);
break;
default:
......
......@@ -257,19 +257,7 @@ gimp_container_editor_real_context_item (GimpContainerEditor *editor,
if (viewable && gimp_container_have (container, GIMP_OBJECT (viewable)))
{
GimpEditor *gimp_editor = GIMP_EDITOR (editor->view);
if (gimp_editor->ui_manager)
{
gimp_ui_manager_update (gimp_editor->ui_manager,
gimp_editor->popup_data);
gimp_ui_manager_ui_popup (gimp_editor->ui_manager,
gimp_editor->ui_path,
gimp_editor->popup_data,
GTK_WIDGET (editor),
NULL, NULL, NULL);
return;
}
gimp_editor_popup_menu (GIMP_EDITOR (editor->view), NULL, NULL);
}
}
......
......@@ -37,7 +37,6 @@
#include "gimpcontainerview.h"
#include "gimppreview.h"
#include "gimppreviewrenderer.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
#include "gtkhwrapbox.h"
......@@ -402,20 +401,12 @@ static gboolean
gimp_container_grid_view_popup_menu (GtkWidget *widget)
{
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (widget);
GimpEditor *editor = GIMP_EDITOR (widget);
if (grid_view->selected_item && editor->ui_manager)
if (grid_view->selected_item)
{
gimp_ui_manager_update (editor->ui_manager,
editor->popup_data);
gimp_ui_manager_ui_popup (editor->ui_manager,
editor->ui_path,
editor->popup_data,
GTK_WIDGET (editor),
gimp_container_grid_view_menu_position,
grid_view->selected_item,
NULL);
return TRUE;
return gimp_editor_popup_menu (GIMP_EDITOR (grid_view),
gimp_container_grid_view_menu_position,
grid_view->selected_item);
}
return FALSE;
......
......@@ -40,7 +40,6 @@
#include "gimpcontainerview.h"
#include "gimpdnd.h"
#include "gimppreviewrenderer.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
......@@ -362,21 +361,12 @@ static gboolean
gimp_container_tree_view_popup_menu (GtkWidget *widget)
{
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (widget);
GimpEditor *editor = GIMP_EDITOR (widget);
if (gtk_tree_selection_get_selected (tree_view->selection, NULL, NULL) &&
editor->ui_manager)
if (gtk_tree_selection_get_selected (tree_view->selection, NULL, NULL))
{
gimp_ui_manager_update (editor->ui_manager,
editor->popup_data);
gimp_ui_manager_ui_popup (editor->ui_manager,
editor->ui_path,
editor->popup_data,
GTK_WIDGET (editor),
gimp_container_tree_view_menu_position,
editor,
NULL);
return TRUE;
return gimp_editor_popup_menu (GIMP_EDITOR (tree_view),
gimp_container_tree_view_menu_position,
tree_view);
}
return FALSE;
......
......@@ -936,8 +936,6 @@ gimp_dockable_show_menu (GimpDockable *dockable)
if (! dockbook_ui_manager)
return FALSE;
gimp_ui_manager_ui_get (dockbook_ui_manager, "/dockable-popup");
dialog_ui_manager = gimp_dockable_get_menu (dockable,
&dialog_ui_path,
&dialog_popup_data);
......@@ -958,8 +956,8 @@ gimp_dockable_show_menu (GimpDockable *dockable)
dialog_ui_path);
parent_menu_widget =
gtk_ui_manager_get_widget (GTK_UI_MANAGER (dockbook_ui_manager),
"/dockable-popup/dockable-menu");
gimp_ui_manager_ui_get (dockbook_ui_manager,
"/dockable-popup/dockable-menu");
parent_menu_action =
gtk_ui_manager_get_action (GTK_UI_MANAGER (dockbook_ui_manager),
......@@ -1019,10 +1017,9 @@ gimp_dockable_show_menu (GimpDockable *dockable)
gimp_ui_manager_update (dockbook_ui_manager, dockable);
gimp_ui_manager_ui_popup (dockbook_ui_manager, "/dockable-popup",
dockable,
GTK_WIDGET (dockable),
gimp_dockable_menu_position, dockable,
(GtkDestroyNotify) gimp_dockable_menu_end);
(GtkDestroyNotify) gimp_dockable_menu_end, dockable);
return TRUE;
}
......
......@@ -390,6 +390,26 @@ gimp_editor_create_menu (GimpEditor *editor,
editor->popup_data = popup_data;
}
gboolean
gimp_editor_popup_menu (GimpEditor *editor,
GimpMenuPositionFunc position_func,
gpointer position_data)
{
g_return_val_if_fail (GIMP_IS_EDITOR (editor), FALSE);
if (editor->ui_manager && editor->ui_path)
{
gimp_ui_manager_update (editor->ui_manager, editor->popup_data);
gimp_ui_manager_ui_popup (editor->ui_manager, editor->ui_path,
GTK_WIDGET (editor),
position_func, position_data,
NULL, NULL);
return TRUE;
}
return FALSE;
}
GtkWidget *
gimp_editor_add_button (GimpEditor *editor,
const gchar *stock_id,
......
......@@ -59,32 +59,35 @@ GType gimp_editor_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_editor_new (void);
void gimp_editor_create_menu (GimpEditor *editor,
GimpMenuFactory *menu_factory,
const gchar *menu_identifier,
const gchar *ui_path,
gpointer popup_data);
GtkWidget * gimp_editor_add_button (GimpEditor *editor,
const gchar *stock_id,
const gchar *tooltip,
const gchar *help_id,
GCallback callback,
GCallback extended_callback,
gpointer callback_data);
GtkWidget * gimp_editor_add_stock_box (GimpEditor *editor,
GType enum_type,
const gchar *stock_prefix,
GCallback callback,
gpointer callback_data);
GtkWidget * gimp_editor_add_action_button (GimpEditor *editor,
const gchar *group_name,
const gchar *action_name,
void gimp_editor_create_menu (GimpEditor *editor,
GimpMenuFactory *menu_factory,
const gchar *menu_identifier,
const gchar *ui_path,
gpointer popup_data);
gboolean gimp_editor_popup_menu (GimpEditor *editor,
GimpMenuPositionFunc position_func,
gpointer position_data);
GtkWidget * gimp_editor_add_button (GimpEditor *editor,
const gchar *stock_id,
const gchar *tooltip,
const gchar *help_id,
GCallback callback,
GCallback extended_callback,
gpointer callback_data);
GtkWidget * gimp_editor_add_stock_box (GimpEditor *editor,
GType enum_type,
const gchar *stock_prefix,
GCallback callback,
gpointer callback_data);
GtkWidget * gimp_editor_add_action_button (GimpEditor *editor,
const gchar *group_name,