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

Switch from GtkItemFactory to GtkUIManager. The migration is almost

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

	Switch from GtkItemFactory to GtkUIManager. The migration is
	almost complete, still stuff missing/incomplete, definitely added
	a bunch of new bugs...

	* app/actions/*-commands.[ch]: converted all callback from
	GtkItemFactory callbacks to GtkAction callbacks.

	* app/actions/debug-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/help-actions.c
	* app/actions/plug-in-actions.c
	* app/actions/qmask-actions.c
	* app/actions/tool-options-actions.c: various fixes.

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.[ch]: move everything from
	GtkItemFactory to GtkUIManager.

	* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
	Needed because the action callbacks don't have a widget parameter
	and sometimes we need a parent window for showing dialogs.

	* app/gui/Makefile.am
	* app/gui/brushes-menu.[ch]
	* app/gui/buffers-menu.[ch]
	* app/gui/channels-menu.[ch]
	* app/gui/colormap-editor-menu.[ch]
	* app/gui/dialogs-menu.[ch]
	* app/gui/documents-menu.[ch]
	* app/gui/error-console-menu.[ch]
	* app/gui/fonts-menu.[ch]
	* app/gui/gradient-editor-menu.[ch]
	* app/gui/gradients-menu.[ch]
	* app/gui/images-menu.[ch]
	* app/gui/layers-menu.[ch]
	* app/gui/palette-editor-menu.[ch]
	* app/gui/palettes-menu.[ch]
	* app/gui/patterns-menu.[ch]
	* app/gui/qmask-menu.[ch]
	* app/gui/templates-menu.[ch]
	* app/gui/vectors-menu.[ch]: removed these files.

	* app/gui/gui.c: create a global UI manager for the image popup
	menu and the toolbox menubar.

	* app/gui/menus.[ch]: removed all GtkItemFactory code.

	* app/gui/image-menu.[ch]
	* app/gui/toolbox-menu.[ch]: removed everything except the trivial
	setup_funcs.

	* app/gui/file-open-menu.c
	* app/gui/file-save-menu.c
	* app/gui/tool-options-menu.c: don't use the macros from menus.h
	any more, they are gone.

	* app/gui/gui-vtable.c
	* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
	menu entries.

	* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
	gimp_ui_manager_update/g

	* app/widgets/gimpuimanager.[ch]: added API to get an action
	group by name.

	* app/widgets/gimpmenufactory.c: don't choke on the item_factory
	entries being NULL.

	* app/widgets/gimpactiongroup.c: make sure booleans set using
	g_object_set() only have TRUE or FALSE values.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdocked.[ch]
	* app/widgets/gimpeditor.[ch]
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
	code and enable the #if 0'ed UI manager stuff.

	* menus/gradient-editor-menu.xml: fixed typos.

	* menus/image-menu.xml: duplicate everything so we have both
	an image menubar and an image popup menu. Badly cries for an
	XSL processor.

	* menus/toolbox-menu.xml: added an "Extensions" placeholder.
parent c93c27e3
2004-04-29 Michael Natterer <mitch@gimp.org>
Switch from GtkItemFactory to GtkUIManager. The migration is
almost complete, still stuff missing/incomplete, definitely added
a bunch of new bugs...
* app/actions/*-commands.[ch]: converted all callback from
GtkItemFactory callbacks to GtkAction callbacks.
* app/actions/debug-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/help-actions.c
* app/actions/plug-in-actions.c
* app/actions/qmask-actions.c
* app/actions/tool-options-actions.c: various fixes.
* app/display/gimpdisplay.[ch]
* app/display/gimpdisplayshell-appearance.[ch]
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: move everything from
GtkItemFactory to GtkUIManager.
* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
Needed because the action callbacks don't have a widget parameter
and sometimes we need a parent window for showing dialogs.
* app/gui/Makefile.am
* app/gui/brushes-menu.[ch]
* app/gui/buffers-menu.[ch]
* app/gui/channels-menu.[ch]
* app/gui/colormap-editor-menu.[ch]
* app/gui/dialogs-menu.[ch]
* app/gui/documents-menu.[ch]
* app/gui/error-console-menu.[ch]
* app/gui/fonts-menu.[ch]
* app/gui/gradient-editor-menu.[ch]
* app/gui/gradients-menu.[ch]
* app/gui/images-menu.[ch]
* app/gui/layers-menu.[ch]
* app/gui/palette-editor-menu.[ch]
* app/gui/palettes-menu.[ch]
* app/gui/patterns-menu.[ch]
* app/gui/qmask-menu.[ch]
* app/gui/templates-menu.[ch]
* app/gui/vectors-menu.[ch]: removed these files.
* app/gui/gui.c: create a global UI manager for the image popup
menu and the toolbox menubar.
* app/gui/menus.[ch]: removed all GtkItemFactory code.
* app/gui/image-menu.[ch]
* app/gui/toolbox-menu.[ch]: removed everything except the trivial
setup_funcs.
* app/gui/file-open-menu.c
* app/gui/file-save-menu.c
* app/gui/tool-options-menu.c: don't use the macros from menus.h
any more, they are gone.
* app/gui/gui-vtable.c
* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
menu entries.
* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
gimp_ui_manager_update/g
* app/widgets/gimpuimanager.[ch]: added API to get an action
group by name.
* app/widgets/gimpmenufactory.c: don't choke on the item_factory
entries being NULL.
* app/widgets/gimpactiongroup.c: make sure booleans set using
g_object_set() only have TRUE or FALSE values.
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdockable.[ch]
* app/widgets/gimpdocked.[ch]
* app/widgets/gimpeditor.[ch]
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
code and enable the #if 0'ed UI manager stuff.
* menus/gradient-editor-menu.xml: fixed typos.
* menus/image-menu.xml: duplicate everything so we have both
an image menubar and an image popup menu. Badly cries for an
XSL processor.
* menus/toolbox-menu.xml: added an "Extensions" placeholder.
2004-04-27 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
......
......@@ -32,7 +32,7 @@
/* public functionss */
void
buffers_paste_buffer_cmd_callback (GtkWidget *widget,
buffers_paste_buffer_cmd_callback (GtkAction *action,
gpointer data)
{
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
......@@ -41,7 +41,7 @@ buffers_paste_buffer_cmd_callback (GtkWidget *widget,
}
void
buffers_paste_buffer_into_cmd_callback (GtkWidget *widget,
buffers_paste_buffer_into_cmd_callback (GtkAction *action,
gpointer data)
{
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
......@@ -50,7 +50,7 @@ buffers_paste_buffer_into_cmd_callback (GtkWidget *widget,
}
void
buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
buffers_paste_buffer_as_new_cmd_callback (GtkAction *action,
gpointer data)
{
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
......@@ -59,7 +59,7 @@ buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
}
void
buffers_delete_buffer_cmd_callback (GtkWidget *widget,
buffers_delete_buffer_cmd_callback (GtkAction *action,
gpointer data)
{
GimpBufferView *view = GIMP_BUFFER_VIEW (data);
......
......@@ -20,13 +20,13 @@
#define __BUFFERS_COMMANDS_H__
void buffers_paste_buffer_cmd_callback (GtkWidget *widget,
void buffers_paste_buffer_cmd_callback (GtkAction *action,
gpointer data);
void buffers_paste_buffer_into_cmd_callback (GtkWidget *widget,
void buffers_paste_buffer_into_cmd_callback (GtkAction *action,
gpointer data);
void buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
void buffers_paste_buffer_as_new_cmd_callback (GtkAction *action,
gpointer data);
void buffers_delete_buffer_cmd_callback (GtkWidget *widget,
void buffers_delete_buffer_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -43,6 +43,8 @@
#include "display/gimpdisplay.h"
#include "gui/dialogs.h"
#include "channels-commands.h"
#include "gimp-intl.h"
......@@ -79,21 +81,41 @@ static void channels_color_changed (GimpColorButton *button,
if (! channel) \
return
#define return_if_no_widget(widget,data) \
if (GIMP_IS_DISPLAY (data)) \
widget = ((GimpDisplay *) data)->shell; \
else if (GIMP_IS_GIMP (data)) \
widget = dialogs_get_toolbox (); \
else if (GIMP_IS_DOCK (data)) \
widget = data; \
else if (GIMP_IS_COMPONENT_EDITOR (data)) \
widget = data; \
else if (GIMP_IS_ITEM_TREE_VIEW (data)) \
widget = data; \
else \
widget = NULL; \
\
if (! widget) \
return
/* public functions */
void
channels_new_cmd_callback (GtkWidget *widget,
channels_new_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
GtkWidget *widget;
return_if_no_image (gimage, data);
return_if_no_widget (widget, data);
channels_new_channel_query (gimage, NULL, TRUE, widget);
}
void
channels_raise_cmd_callback (GtkWidget *widget,
channels_raise_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -105,7 +127,7 @@ channels_raise_cmd_callback (GtkWidget *widget,
}
void
channels_raise_to_top_cmd_callback (GtkWidget *widget,
channels_raise_to_top_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -117,7 +139,7 @@ channels_raise_to_top_cmd_callback (GtkWidget *widget,
}
void
channels_lower_cmd_callback (GtkWidget *widget,
channels_lower_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -129,7 +151,7 @@ channels_lower_cmd_callback (GtkWidget *widget,
}
void
channels_lower_to_bottom_cmd_callback (GtkWidget *widget,
channels_lower_to_bottom_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -141,7 +163,7 @@ channels_lower_to_bottom_cmd_callback (GtkWidget *widget,
}
void
channels_duplicate_cmd_callback (GtkWidget *widget,
channels_duplicate_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -193,7 +215,7 @@ channels_duplicate_cmd_callback (GtkWidget *widget,
}
void
channels_delete_cmd_callback (GtkWidget *widget,
channels_delete_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
......@@ -205,14 +227,14 @@ channels_delete_cmd_callback (GtkWidget *widget,
}
void
channels_to_selection_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
channels_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpChannelOps op;
GimpImage *gimage;
op = (GimpChannelOps) action;
op = (GimpChannelOps) value;
if (GIMP_IS_COMPONENT_EDITOR (data))
{
......@@ -239,12 +261,14 @@ channels_to_selection_cmd_callback (GtkWidget *widget,
}
void
channels_edit_attributes_cmd_callback (GtkWidget *widget,
channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
GimpChannel *active_channel;
GtkWidget *widget;
return_if_no_channel (gimage, active_channel, data);
return_if_no_widget (widget, data);
channels_edit_channel_query (active_channel, widget);
}
......
......@@ -20,24 +20,24 @@
#define __CHANNELS_COMMANDS_H__
void channels_new_cmd_callback (GtkWidget *widget,
void channels_new_cmd_callback (GtkAction *action,
gpointer data);
void channels_raise_cmd_callback (GtkWidget *widget,
void channels_raise_cmd_callback (GtkAction *action,
gpointer data);
void channels_raise_to_top_cmd_callback (GtkWidget *widget,
void channels_raise_to_top_cmd_callback (GtkAction *action,
gpointer data);
void channels_lower_cmd_callback (GtkWidget *widget,
void channels_lower_cmd_callback (GtkAction *action,
gpointer data);
void channels_lower_to_bottom_cmd_callback (GtkWidget *widget,
void channels_lower_to_bottom_cmd_callback (GtkAction *action,
gpointer data);
void channels_duplicate_cmd_callback (GtkWidget *widget,
void channels_duplicate_cmd_callback (GtkAction *action,
gpointer data);
void channels_delete_cmd_callback (GtkWidget *widget,
void channels_delete_cmd_callback (GtkAction *action,
gpointer data);
void channels_to_selection_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void channels_edit_attributes_cmd_callback (GtkWidget *widget,
void channels_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data);
void channels_new_channel_query (GimpImage *gimage,
......
......@@ -32,7 +32,7 @@
/* public functions */
void
colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
......@@ -42,13 +42,13 @@ colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
}
void
colormap_editor_add_color_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
if (GTK_WIDGET_SENSITIVE (editor->add_button))
gimp_button_extended_clicked (GIMP_BUTTON (editor->add_button),
action ? GDK_CONTROL_MASK : 0);
value ? GDK_CONTROL_MASK : 0);
}
......@@ -20,11 +20,11 @@
#define __COLORMAP_EDITOR_COMMANDS_H__
void colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
void colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
#endif /* __COLORMAP_EDITOR_COMMANDS_H__ */
......@@ -32,7 +32,7 @@
/* public functions */
void
colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
......@@ -42,13 +42,13 @@ colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
}
void
colormap_editor_add_color_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
if (GTK_WIDGET_SENSITIVE (editor->add_button))
gimp_button_extended_clicked (GIMP_BUTTON (editor->add_button),
action ? GDK_CONTROL_MASK : 0);
value ? GDK_CONTROL_MASK : 0);
}
......@@ -20,11 +20,11 @@
#define __COLORMAP_EDITOR_COMMANDS_H__
void colormap_editor_edit_color_cmd_callback (GtkWidget *widget,
void colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
#endif /* __COLORMAP_EDITOR_COMMANDS_H__ */
......@@ -30,7 +30,7 @@
void
data_new_data_cmd_callback (GtkWidget *widget,
data_new_data_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
......@@ -40,7 +40,7 @@ data_new_data_cmd_callback (GtkWidget *widget,
}
void
data_duplicate_data_cmd_callback (GtkWidget *widget,
data_duplicate_data_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
......@@ -50,7 +50,7 @@ data_duplicate_data_cmd_callback (GtkWidget *widget,
}
void
data_edit_data_cmd_callback (GtkWidget *widget,
data_edit_data_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
......@@ -60,7 +60,7 @@ data_edit_data_cmd_callback (GtkWidget *widget,
}
void
data_delete_data_cmd_callback (GtkWidget *widget,
data_delete_data_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
......@@ -70,7 +70,7 @@ data_delete_data_cmd_callback (GtkWidget *widget,
}
void
data_refresh_data_cmd_callback (GtkWidget *widget,
data_refresh_data_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (data);
......
......@@ -20,15 +20,15 @@
#define __DATA_COMMANDS_H__
void data_new_data_cmd_callback (GtkWidget *widget,
void data_new_data_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_data_cmd_callback (GtkWidget *widget,
void data_duplicate_data_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_data_cmd_callback (GtkWidget *widget,
void data_edit_data_cmd_callback (GtkAction *action,
gpointer data);
void data_delete_data_cmd_callback (GtkWidget *widget,
void data_delete_data_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_data_cmd_callback (GtkWidget *widget,
void data_refresh_data_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -32,8 +32,7 @@
static GimpActionEntry debug_actions[] =
{
{ "debug-menu", NULL,
"/File/D_ebug" },
{ "debug-menu", NULL, "D_ebug" },
{ "debug-mem-profile", NULL,
"_Mem Profile", NULL, NULL,
......
......@@ -28,7 +28,6 @@
#include "core/gimpobject.h"
#include "widgets/gimpitemfactory.h"
#include "widgets/gimpmenufactory.h"
#include "debug-commands.h"
......@@ -47,7 +46,7 @@ static void debug_dump_menus_recurse_menu (GtkWidget *menu,
/* public functions */
void
debug_dump_menus_cmd_callback (GtkWidget *widget,
debug_dump_menus_cmd_callback (GtkAction *action,
gpointer data)
{
GList *list;
......@@ -56,11 +55,11 @@ debug_dump_menus_cmd_callback (GtkWidget *widget,
list;
list = g_list_next (list))
{
GimpMenuFactoryEntry *entry;
#if 0
FIXME
GimpMenuFactoryEntry *entry = list->data;
GimpItemFactory *item_factory;
entry = list->data;
item_factory = gimp_item_factory_from_path (entry->identifier);
if (item_factory)
......@@ -80,11 +79,12 @@ debug_dump_menus_cmd_callback (GtkWidget *widget,
g_print ("\n");
}
#endif
}
}
void
debug_mem_profile_cmd_callback (GtkWidget *widget,
debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data)
{
extern gboolean gimp_debug_memsize;
......@@ -104,6 +104,7 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
gint depth,
gchar *path)
{
#if 0
GtkItemFactory *item_factory;
GtkWidget *menu_item;
GList *list;
......@@ -141,6 +142,7 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
g_free (full_path);
}
}
#endif
}
#endif /* ENABLE_DEBUG_MENU */
......@@ -27,9 +27,9 @@
#ifdef ENABLE_DEBUG_MENU
void debug_dump_menus_cmd_callback (GtkWidget *widget,
void debug_dump_menus_cmd_callback (GtkAction *action,
gpointer data);
void debug_mem_profile_cmd_callback (GtkWidget *widget,
void debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data);
#endif /* ENABLE_DEBUG_MENU */
......
......@@ -26,15 +26,34 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockable.h"
#include "widgets/gimpdockbook.h"
#include "widgets/gimpimagedock.h"
#include "display/gimpdisplay.h"
#include "gui/dialogs.h"
#include "dialogs-commands.h"
#define return_if_no_widget(widget,data) \
if (GIMP_IS_DISPLAY (data)) \
widget = ((GimpDisplay *) data)->shell; \
else if (GIMP_IS_GIMP (data)) \
widget = dialogs_get_toolbox (); \
else if (GIMP_IS_DOCK (data)) \
widget = data; \
else \
widget = NULL; \
\
if (! widget) \
return
/* local function prototypes */
static void dialogs_create_dock (GdkScreen *screen,
......@@ -46,50 +65,47 @@ static void dialogs_create_dock (GdkScreen *screen,
/* public functions */
void
dialogs_show_toolbox_cmd_callback (GtkWidget *widget,
dialogs_show_toolbox_cmd_callback (GtkAction *action,
gpointer data)
{
dialogs_show_toolbox ();
}
void
dialogs_create_toplevel_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
dialogs_create_toplevel_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data)
{
if (action)
{
const gchar *identifier = g_quark_to_string ((GQuark) action);
GtkWidget *widget;
return_if_no_widget (widget, data);
if (identifier)
gimp_dialog_factory_dialog_new (global_dialog_factory,
gtk_widget_get_screen (widget),
identifier, -1);
}
if (value)
gimp_dialog_factory_dialog_new (global_dialog_factory,
gtk_widget_get_screen (widget),
value, -1);
}
void
dialogs_create_dockable_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
dialogs_create_dockable_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data)
{
if (action)
{
const gchar *identifier = g_quark_to_string ((GQuark) action);
if (!identifier)
return;
GtkWidget *widget;
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
identifier, -1);
}
if (value)
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
value, -1);
}
void
dialogs_create_lc_cmd_callback (GtkWidget *widget,
dialogs_create_lc_cmd_callback (GtkAction *action,
gpointer data)
{
GtkWidget *widget;
return_if_no_widget (widget, data);
static const gchar *tabs[] =
{
"gimp-layer-list",
......@@ -103,9 +119,12 @@ dialogs_create_lc_cmd_callback (GtkWidget *widget,
}
void
dialogs_create_data_cmd_callback (GtkWidget *widget,
dialogs_create_data_cmd_callback (GtkAction *action,