Commit a6dbb78d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added GimpContext parameters and create the GimpView with that context.

2006-09-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpviewabledialog.[ch]: added GimpContext
	parameters and create the GimpView with that context.

	* app/widgets/gimpcolordialog.[ch]
	* app/dialogs/convert-dialog.[ch]
	* app/dialogs/desaturate-dialog.[ch]
	* app/dialogs/grid-dialog.[ch]
	* app/dialogs/image-properties-dialog.[ch]
	* app/dialogs/layer-add-mask-dialog.[ch]
	* app/dialogs/offset-dialog.[ch]
	* app/dialogs/print-size-dialog.[ch]
	* app/dialogs/resize-dialog.[ch]
	* app/dialogs/scale-dialog.[ch]
	* app/dialogs/stroke-dialog.[ch]
	* app/dialogs/template-options-dialog.[ch]
	* app/dialogs/vectors-options-dialog.[ch]: added GimpContext
	parameters here too and pass them to gimp_viewable_dialog_new().

	* app/actions/colormap-editor-commands.c
	* app/actions/drawable-commands.c
	* app/actions/gradient-editor-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palette-editor-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/actions/view-commands.c
	* app/dialogs/channel-options-dialog.c
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/image-merge-layers-dialog.c
	* app/dialogs/image-scale-dialog.c
	* app/dialogs/layer-options-dialog.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-scale.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimptoolbox-color-area.c: pass contexts to above
	dialog constructors.
parent 0051a859
2006-09-01 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewabledialog.[ch]: added GimpContext
parameters and create the GimpView with that context.
* app/widgets/gimpcolordialog.[ch]
* app/dialogs/convert-dialog.[ch]
* app/dialogs/desaturate-dialog.[ch]
* app/dialogs/grid-dialog.[ch]
* app/dialogs/image-properties-dialog.[ch]
* app/dialogs/layer-add-mask-dialog.[ch]
* app/dialogs/offset-dialog.[ch]
* app/dialogs/print-size-dialog.[ch]
* app/dialogs/resize-dialog.[ch]
* app/dialogs/scale-dialog.[ch]
* app/dialogs/stroke-dialog.[ch]
* app/dialogs/template-options-dialog.[ch]
* app/dialogs/vectors-options-dialog.[ch]: added GimpContext
parameters here too and pass them to gimp_viewable_dialog_new().
* app/actions/colormap-editor-commands.c
* app/actions/drawable-commands.c
* app/actions/gradient-editor-commands.c
* app/actions/image-commands.c
* app/actions/layers-commands.c
* app/actions/palette-editor-commands.c
* app/actions/select-commands.c
* app/actions/vectors-commands.c
* app/actions/view-commands.c
* app/dialogs/channel-options-dialog.c
* app/dialogs/dialogs-constructors.c
* app/dialogs/image-merge-layers-dialog.c
* app/dialogs/image-scale-dialog.c
* app/dialogs/layer-options-dialog.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-scale.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcontrollereditor.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimptoolbox-color-area.c: pass contexts to above
dialog constructors.
2006-09-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpviewrendererdrawable.c: fixed includes for
......
......@@ -77,9 +77,8 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
return_if_no_channel (image, channel, data);
return_if_no_widget (widget, data);
options = channel_options_dialog_new (image,
options = channel_options_dialog_new (image, channel,
action_data_get_context (data),
channel,
widget,
&channel->color,
gimp_object_get_name (GIMP_OBJECT (channel)),
......@@ -109,9 +108,8 @@ channels_new_cmd_callback (GtkAction *action,
return_if_no_image (image, data);
return_if_no_widget (widget, data);
options = channel_options_dialog_new (image,
options = channel_options_dialog_new (image, NULL,
action_data_get_context (data),
NULL,
widget,
&channel_color,
channel_name ? channel_name :
......
......@@ -73,6 +73,7 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Edit Colormap Entry"),
GIMP_STOCK_COLORMAP,
desc,
......@@ -93,7 +94,8 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (image));
GIMP_VIEWABLE (image),
action_data_get_context (data));
g_object_set (editor->color_dialog, "description", desc, NULL);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&color);
......
......@@ -73,6 +73,7 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Edit Colormap Entry"),
GIMP_STOCK_COLORMAP,
desc,
......@@ -93,7 +94,8 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (image));
GIMP_VIEWABLE (image),
action_data_get_context (data));
g_object_set (editor->color_dialog, "description", desc, NULL);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&color);
......
......@@ -75,7 +75,9 @@ drawable_desaturate_cmd_callback (GtkAction *action,
return;
}
dialog = desaturate_dialog_new (drawable, widget, desaturate_mode);
dialog = desaturate_dialog_new (drawable,
action_data_get_context (data),
widget, desaturate_mode);
g_signal_connect (dialog->dialog, "response",
G_CALLBACK (desaturate_response),
......@@ -151,7 +153,8 @@ drawable_offset_cmd_callback (GtkAction *action,
return_if_no_drawable (image, drawable, data);
return_if_no_widget (widget, data);
dialog = offset_dialog_new (drawable, widget);
dialog = offset_dialog_new (drawable, action_data_get_context (data),
widget);
gtk_widget_show (dialog);
}
......
......@@ -82,6 +82,7 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (gradient),
GIMP_DATA_EDITOR (editor)->context,
_("Left Endpoint Color"),
GIMP_STOCK_GRADIENT,
_("Gradient Segment's Left Endpoint Color"),
......@@ -232,6 +233,7 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (gradient),
GIMP_DATA_EDITOR (editor)->context,
_("Right Endpoint Color"),
GIMP_STOCK_GRADIENT,
_("Gradient Segment's Right Endpoint Color"),
......@@ -436,7 +438,8 @@ void
gradient_editor_replicate_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
......@@ -457,7 +460,8 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
}
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
gimp_viewable_dialog_new (GIMP_VIEWABLE (data_editor->data),
data_editor->context,
title, "gimp-gradient-segment-replicate",
GIMP_STOCK_GRADIENT, desc,
GTK_WIDGET (editor),
......@@ -535,7 +539,8 @@ void
gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
gpointer data)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (data);
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *label;
......@@ -556,7 +561,8 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
}
dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
gimp_viewable_dialog_new (GIMP_VIEWABLE (data_editor->data),
data_editor->context,
title, "gimp-gradient-segment-split-uniformly",
GIMP_STOCK_GRADIENT, desc,
GTK_WIDGET (editor),
......
......@@ -185,7 +185,9 @@ image_convert_cmd_callback (GtkAction *action,
if (! dialog)
{
dialog = convert_dialog_new (image, widget,
dialog = convert_dialog_new (image,
action_data_get_context (data),
widget,
GIMP_PROGRESS (display));
g_object_set_data (G_OBJECT (widget),
......@@ -229,6 +231,7 @@ image_resize_cmd_callback (GtkAction *action,
unit = GIMP_DISPLAY_SHELL (display->shell)->unit;
dialog = resize_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Set Image Canvas Size"), "gimp-image-resize",
widget,
gimp_standard_help_func, GIMP_HELP_IMAGE_RESIZE,
......@@ -278,6 +281,7 @@ image_print_size_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
dialog = print_size_dialog_new (display->image,
action_data_get_context (data),
_("Set Image Print Resolution"),
"gimp-image-print-size",
widget,
......@@ -446,7 +450,9 @@ image_configure_grid_cmd_callback (GtkAction *action,
if (! shell->grid_dialog)
{
shell->grid_dialog = grid_dialog_new (display->image, display->shell);
shell->grid_dialog = grid_dialog_new (display->image,
action_data_get_context (data),
display->shell);
gtk_window_set_transient_for (GTK_WINDOW (shell->grid_dialog),
GTK_WINDOW (display->shell));
......@@ -473,7 +479,9 @@ image_properties_cmd_callback (GtkAction *action,
shell = GIMP_DISPLAY_SHELL (display->shell);
image = display->image;
dialog = image_properties_dialog_new (display->image, display->shell);
dialog = image_properties_dialog_new (display->image,
action_data_get_context (data),
display->shell);
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (display->shell));
......
......@@ -195,8 +195,9 @@ layers_edit_attributes_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
dialog = layer_options_dialog_new (gimp_item_get_image (GIMP_ITEM (layer)),
layer,
action_data_get_context (data),
layer, widget,
widget,
gimp_object_get_name (GIMP_OBJECT (layer)),
layer_fill_type,
_("Layer Attributes"),
......@@ -233,8 +234,9 @@ layers_new_cmd_callback (GtkAction *action,
return;
}
dialog = layer_options_dialog_new (image, action_data_get_context (data),
NULL, widget,
dialog = layer_options_dialog_new (image, NULL,
action_data_get_context (data),
widget,
layer_name ? layer_name : _("New Layer"),
layer_fill_type,
_("New Layer"),
......@@ -532,6 +534,7 @@ layers_resize_cmd_callback (GtkAction *action,
unit = display ? GIMP_DISPLAY_SHELL (display->shell)->unit : GIMP_UNIT_PIXEL;
dialog = resize_dialog_new (GIMP_VIEWABLE (layer),
action_data_get_context (data),
_("Set Layer Boundary Size"), "gimp-layer-resize",
widget,
gimp_standard_help_func, GIMP_HELP_LAYER_RESIZE,
......@@ -575,6 +578,7 @@ layers_scale_cmd_callback (GtkAction *action,
unit = display ? GIMP_DISPLAY_SHELL (display->shell)->unit : GIMP_UNIT_PIXEL;
dialog = scale_dialog_new (GIMP_VIEWABLE (layer),
action_data_get_context (data),
_("Scale Layer"), "gimp-layer-scale",
widget,
gimp_standard_help_func, GIMP_HELP_LAYER_SCALE,
......@@ -629,7 +633,8 @@ layers_mask_add_cmd_callback (GtkAction *action,
return_if_no_layer (image, layer, data);
return_if_no_widget (widget, data);
dialog = layer_add_mask_dialog_new (layer, widget,
dialog = layer_add_mask_dialog_new (layer, action_data_get_context (data),
widget,
layer_add_mask_type, layer_mask_invert);
g_signal_connect (dialog->dialog, "response",
......
......@@ -65,6 +65,7 @@ palette_editor_edit_color_cmd_callback (GtkAction *action,
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (palette),
data_editor->context,
_("Edit Palette Color"),
GIMP_STOCK_PALETTE,
_("Edit Color Palette Entry"),
......@@ -85,7 +86,8 @@ palette_editor_edit_color_cmd_callback (GtkAction *action,
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (palette));
GIMP_VIEWABLE (palette),
data_editor->context);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&editor->color->color);
}
......
......@@ -97,9 +97,8 @@ quick_mask_configure_cmd_callback (GtkAction *action,
gimp_image_get_quick_mask_color (image, &color);
options = channel_options_dialog_new (image,
options = channel_options_dialog_new (image, NULL,
action_data_get_context (data),
NULL,
widget,
&color,
NULL,
......
......@@ -291,6 +291,7 @@ select_stroke_cmd_callback (GtkAction *action,
}
dialog = stroke_dialog_new (GIMP_ITEM (gimp_image_get_mask (image)),
action_data_get_context (data),
_("Stroke Selection"),
GIMP_STOCK_SELECTION_STROKE,
GIMP_HELP_SELECTION_STROKE,
......
......@@ -117,7 +117,7 @@ templates_new_cmd_callback (GtkAction *action,
context = gimp_container_view_get_context (editor->view);
options = template_options_dialog_new (context->gimp, NULL,
options = template_options_dialog_new (NULL, context,
GTK_WIDGET (editor),
_("New Template"),
"gimp-template-new",
......@@ -179,7 +179,7 @@ templates_edit_cmd_callback (GtkAction *action,
{
TemplateOptionsDialog *options;
options = template_options_dialog_new (context->gimp, template,
options = template_options_dialog_new (template, context,
GTK_WIDGET (editor),
_("Edit Template"),
"gimp-template-edit",
......
......@@ -135,8 +135,8 @@ vectors_edit_attributes_cmd_callback (GtkAction *action,
return_if_no_vectors (image, vectors, data);
return_if_no_widget (widget, data);
options = vectors_options_dialog_new (image,
vectors,
options = vectors_options_dialog_new (image, vectors,
action_data_get_context (data),
widget,
gimp_object_get_name (GIMP_OBJECT (vectors)),
_("Path Attributes"),
......@@ -162,8 +162,8 @@ vectors_new_cmd_callback (GtkAction *action,
return_if_no_image (image, data);
return_if_no_widget (widget, data);
options = vectors_options_dialog_new (image,
NULL,
options = vectors_options_dialog_new (image, NULL,
action_data_get_context (data),
widget,
vectors_name ? vectors_name :
_("New Path"),
......@@ -365,6 +365,7 @@ vectors_stroke_cmd_callback (GtkAction *action,
}
dialog = stroke_dialog_new (GIMP_ITEM (vectors),
action_data_get_context (data),
_("Stroke Path"),
GIMP_STOCK_PATH_STROKE,
GIMP_HELP_PATH_STROKE,
......
......@@ -565,14 +565,16 @@ view_padding_color_cmd_callback (GtkAction *action,
if (! color_dialog)
{
color_dialog = gimp_color_dialog_new (GIMP_VIEWABLE (display->image),
_("Set Canvas Padding Color"),
GTK_STOCK_SELECT_COLOR,
_("Set Custom Canvas Padding Color"),
display->shell,
NULL, NULL,
&options->padding_color,
FALSE, FALSE);
color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (display->image),
action_data_get_context (data),
_("Set Canvas Padding Color"),
GTK_STOCK_SELECT_COLOR,
_("Set Custom Canvas Padding Color"),
display->shell,
NULL, NULL,
&options->padding_color,
FALSE, FALSE);
g_signal_connect (color_dialog, "update",
G_CALLBACK (view_padding_color_dialog_update),
......
......@@ -49,8 +49,8 @@ static void channel_options_color_changed (GimpColorButton *button,
ChannelOptionsDialog *
channel_options_dialog_new (GimpImage *image,
GimpContext *context,
GimpChannel *channel,
GimpContext *context,
GtkWidget *parent,
const GimpRGB *channel_color,
const gchar *channel_name,
......@@ -71,8 +71,8 @@ channel_options_dialog_new (GimpImage *image,
GtkObject *opacity_adj;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (channel == NULL || GIMP_IS_CHANNEL (channel), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
g_return_val_if_fail (channel_color != NULL, NULL);
g_return_val_if_fail (title != NULL, NULL);
......@@ -102,7 +102,7 @@ channel_options_dialog_new (GimpImage *image,
viewable = GIMP_VIEWABLE (image);
options->dialog =
gimp_viewable_dialog_new (viewable,
gimp_viewable_dialog_new (viewable, context,
title, role, stock_id, desc,
parent,
gimp_standard_help_func, help_id,
......
......@@ -36,8 +36,8 @@ struct _ChannelOptionsDialog
ChannelOptionsDialog * channel_options_dialog_new (GimpImage *image,
GimpContext *context,
GimpChannel *channel,
GimpContext *context,
GtkWidget *parent,
const GimpRGB *channel_color,
const gchar *channel_name,
......
......@@ -85,6 +85,7 @@ static GimpPalette *saved_palette = NULL;
GtkWidget *
convert_dialog_new (GimpImage *image,
GimpContext *context,
GtkWidget *parent,
GimpProgress *progress)
{
......@@ -102,6 +103,7 @@ convert_dialog_new (GimpImage *image,
GtkWidget *combo;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
......@@ -116,7 +118,7 @@ convert_dialog_new (GimpImage *image,
dialog->palette_type = saved_palette_type;
dialog->dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (image),
gimp_viewable_dialog_new (GIMP_VIEWABLE (image), context,
_("Indexed Color Conversion"),
"gimp-image-convert-indexed",
GIMP_STOCK_CONVERT_INDEXED,
......
......@@ -21,6 +21,7 @@
GtkWidget * convert_dialog_new (GimpImage *image,
GimpContext *context,
GtkWidget *parent,
GimpProgress *progress);
......
......@@ -24,6 +24,7 @@
#include "dialogs-types.h"
#include "core/gimpcontext.h"
#include "core/gimplayer.h"
#include "widgets/gimphelp-ids.h"
......@@ -38,6 +39,7 @@
DesaturateDialog *
desaturate_dialog_new (GimpDrawable *drawable,
GimpContext *context,
GtkWidget *parent,
GimpDesaturateMode mode)
{
......@@ -47,6 +49,7 @@ desaturate_dialog_new (GimpDrawable *drawable,
GtkWidget *button;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
dialog = g_new0 (DesaturateDialog, 1);
......@@ -55,7 +58,7 @@ desaturate_dialog_new (GimpDrawable *drawable,
dialog->mode = mode;
dialog->dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (drawable),
gimp_viewable_dialog_new (GIMP_VIEWABLE (drawable), context,
_("Desaturate"), "gimp-drawable-desaturate",
GIMP_STOCK_CONVERT_GRAYSCALE,
_("Remove Colors"),
......
......@@ -32,6 +32,7 @@ struct _DesaturateDialog
DesaturateDialog * desaturate_dialog_new (GimpDrawable *drawable,
GimpContext *context,
GtkWidget *parent,
GimpDesaturateMode mode);
......
......@@ -100,7 +100,7 @@ dialogs_image_new_new (GimpDialogFactory *factory,
GimpContext *context,
gint view_size)
{
return image_new_dialog_new (context->gimp);
return image_new_dialog_new (context);
}
GtkWidget *
......
......@@ -32,6 +32,7 @@
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-grid.h"
#include "core/gimpimage-undo.h"
......@@ -62,8 +63,9 @@ static void grid_dialog_response (GtkWidget *widget,
GtkWidget *
grid_dialog_new (GimpImage *image,
GtkWidget *parent)
grid_dialog_new (GimpImage *image,
GimpContext *context,
GtkWidget *parent)
{
GimpGrid *grid;
GimpGrid *grid_backup;
......@@ -71,12 +73,13 @@ grid_dialog_new (GimpImage *image,
GtkWidget *editor;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
grid = gimp_image_get_grid (GIMP_IMAGE (image));
grid_backup = gimp_config_duplicate (GIMP_CONFIG (grid));
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (image),
dialog = gimp_viewable_dialog_new (GIMP_VIEWABLE (image), context,
_("Configure Grid"), "gimp-grid-configure",
GIMP_STOCK_GRID, _("Configure Image Grid"),
parent,
......
......@@ -22,8 +22,9 @@
#define __GRID_DIALOG_H__
GtkWidget * grid_dialog_new (GimpImage *image,
GtkWidget *parent);
GtkWidget * grid_dialog_new (GimpImage *image,
GimpContext *context,
GtkWidget *parent);
#endif /* __GRID_DIALOG_H__ */
......@@ -59,7 +59,7 @@ image_merge_layers_dialog_new (GimpImage *image,
dialog->merge_type = GIMP_EXPAND_AS_NECESSARY;
dialog->dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (image),
gimp_viewable_dialog_new (GIMP_VIEWABLE (image), context,
_("Merge Layers"), "gimp-image-merge-layers",
GIMP_STOCK_MERGE_DOWN,
_("Layers Merge Options"),
......
......@@ -31,6 +31,7 @@
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-new.h"
#include "core/gimptemplate.h"
......@@ -57,7 +58,7 @@ typedef struct
GtkWidget *combo;
GtkWidget *editor;
Gimp *gimp;
GimpContext *context;
GimpTemplate *template;
} ImageNewDialog;
......@@ -78,18 +79,18 @@ static void image_new_create_image (ImageNewDialog *dialog);
/* public functions */
GtkWidget *
image_new_dialog_new (Gimp *gimp)
image_new_dialog_new (GimpContext *context)