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

To be multihead safe, each new window or menu needs to be associated with

2003-11-08  Michael Natterer  <mitch@gimp.org>

	To be multihead safe, each new window or menu needs to be
	associated with a GdkScreen or it will pop up on the default
	screen.

	* libgimpwidgets/gimpquerybox.[ch]
	* app/display/gimpdisplayshell-layer-select.[ch]
	* app/widgets/widgets-types.h
	* app/widgets/gimpitemfactory.[ch]
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimptemplateview.[ch]
	* app/widgets/gimptooldialog.[ch]
	* app/widgets/gimpviewabledialog.[ch]
	* app/gui/channels-commands.[ch]
	* app/gui/color-notebook.[ch]
	* app/gui/convert-dialog.[ch]
	* app/gui/edit-commands.[ch]
	* app/gui/grid-dialog.[ch]
	* app/gui/image-commands.[ch]
	* app/gui/info-dialog.[ch]
	* app/gui/layers-commands.[ch]
	* app/gui/offset-dialog.[ch]
	* app/gui/resize-dialog.[ch]
	* app/gui/stroke-dialog.[ch]
	* app/gui/templates-commands.[ch]
	* app/gui/vectors-commands.[ch]: added "GtkWidget *parent"
	paramaters to all functions which create menus, popups or windows
	and pass "parent" to gimp_dialog_new() or one of the various
	wrappers around it. As a side effect, this fixes bug #61092.

	* app/widgets/gimpdialogfactory.[ch]: added "GdkScreen *screen"
	instead of "parent" here since there are no possible parent
	windows on startup.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_origin_button_press): added a quick hack to
	send a display to another screen: click the origin button with the
	middle mouse button.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_screen_changed): don't chain up
	undonditionally (don't crash).

	* libgimpwidgets/gimpdialog.c (gimp_dialog_new_valist): set the
	dialog's screen from a non-GtkWidget parent widget. The rest of
	non-window parent widget handling is still unimplemented.

	* libgimpwidgets/gimpcolorbutton.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppreview-popup.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpsessioninfo.c
	* app/widgets/gimptoolbox-color-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpnavigationview.c
	* app/gui/module-browser.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/drawable-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor-commands.c
	* app/gui/gui-vtable.c
	* app/gui/gui.c
	* app/gui/info-window.c
	* app/gui/palette-import-dialog.c
	* app/gui/palettes-commands.c
	* app/gui/qmask-commands.c
	* app/gui/select-commands.c
	* app/gui/tool-options-commands.c
	* app/gui/view-commands.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c: changed addordingly. Changed all
	menu_position funcs to place the menu on the right screen.
parent 74c8218a
2003-11-08 Michael Natterer <mitch@gimp.org>
To be multihead safe, each new window or menu needs to be
associated with a GdkScreen or it will pop up on the default
screen.
* libgimpwidgets/gimpquerybox.[ch]
* app/display/gimpdisplayshell-layer-select.[ch]
* app/widgets/widgets-types.h
* app/widgets/gimpitemfactory.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimptemplateview.[ch]
* app/widgets/gimptooldialog.[ch]
* app/widgets/gimpviewabledialog.[ch]
* app/gui/channels-commands.[ch]
* app/gui/color-notebook.[ch]
* app/gui/convert-dialog.[ch]
* app/gui/edit-commands.[ch]
* app/gui/grid-dialog.[ch]
* app/gui/image-commands.[ch]
* app/gui/info-dialog.[ch]
* app/gui/layers-commands.[ch]
* app/gui/offset-dialog.[ch]
* app/gui/resize-dialog.[ch]
* app/gui/stroke-dialog.[ch]
* app/gui/templates-commands.[ch]
* app/gui/vectors-commands.[ch]: added "GtkWidget *parent"
paramaters to all functions which create menus, popups or windows
and pass "parent" to gimp_dialog_new() or one of the various
wrappers around it. As a side effect, this fixes bug #61092.
* app/widgets/gimpdialogfactory.[ch]: added "GdkScreen *screen"
instead of "parent" here since there are no possible parent
windows on startup.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_origin_button_press): added a quick hack to
send a display to another screen: click the origin button with the
middle mouse button.
* app/display/gimpdisplayshell.c
(gimp_display_shell_screen_changed): don't chain up
undonditionally (don't crash).
* libgimpwidgets/gimpdialog.c (gimp_dialog_new_valist): set the
dialog's screen from a non-GtkWidget parent widget. The rest of
non-window parent widget handling is still unimplemented.
* libgimpwidgets/gimpcolorbutton.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdockable.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpsessioninfo.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpwidgets-utils.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpnavigationview.c
* app/gui/module-browser.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor-commands.c
* app/gui/gui-vtable.c
* app/gui/gui.c
* app/gui/info-window.c
* app/gui/palette-import-dialog.c
* app/gui/palettes-commands.c
* app/gui/qmask-commands.c
* app/gui/select-commands.c
* app/gui/tool-options-commands.c
* app/gui/view-commands.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: changed addordingly. Changed all
menu_position funcs to place the menu on the right screen.
2003-11-08 Sven Neumann <sven@gimp.org>
 
* app/config/gimpconfig-error.h: added GIMP_CONFIG_ERROR_VERSION
......@@ -86,7 +86,7 @@ channels_new_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
channels_new_channel_query (gimage, NULL, TRUE);
channels_new_channel_query (gimage, NULL, TRUE, widget);
}
void
......@@ -219,7 +219,7 @@ channels_edit_attributes_cmd_callback (GtkWidget *widget,
GimpChannel *active_channel;
return_if_no_channel (gimage, active_channel, data);
channels_edit_channel_query (active_channel);
channels_edit_channel_query (active_channel, widget);
}
......@@ -280,7 +280,8 @@ new_channel_query_response (GtkWidget *widget,
void
channels_new_channel_query (GimpImage *gimage,
GimpChannel *template,
gboolean interactive)
gboolean interactive,
GtkWidget *parent)
{
NewChannelOptions *options;
GtkWidget *hbox;
......@@ -345,6 +346,7 @@ channels_new_channel_query (GimpImage *gimage,
_("New Channel"), "gimp-channel-new",
GIMP_STOCK_CHANNEL,
_("New Channel Options"),
parent,
gimp_standard_help_func,
GIMP_HELP_CHANNEL_NEW,
......@@ -478,7 +480,8 @@ edit_channel_query_response (GtkWidget *widget,
}
void
channels_edit_channel_query (GimpChannel *channel)
channels_edit_channel_query (GimpChannel *channel,
GtkWidget *parent)
{
EditChannelOptions *options;
GtkWidget *hbox;
......@@ -506,6 +509,7 @@ channels_edit_channel_query (GimpChannel *channel)
_("Channel Attributes"), "gimp-channel-edit",
GIMP_STOCK_EDIT,
_("Edit Channel Attributes"),
parent,
gimp_standard_help_func,
GIMP_HELP_CHANNEL_EDIT,
......
......@@ -38,8 +38,10 @@ void channels_edit_attributes_cmd_callback (GtkWidget *widget,
void channels_new_channel_query (GimpImage *gimage,
GimpChannel *template,
gboolean interactive);
void channels_edit_channel_query (GimpChannel *channel);
gboolean interactive,
GtkWidget *parent);
void channels_edit_channel_query (GimpChannel *channel,
GtkWidget *parent);
#endif /* __CHANNELS_COMMANDS_H__ */
......@@ -38,7 +38,8 @@
/* local function prototypes */
static void dialogs_create_dock (const gchar *tabs[],
static void dialogs_create_dock (GdkScreen *screen,
const gchar *tabs[],
gint n_tabs);
......@@ -62,7 +63,9 @@ dialogs_create_toplevel_cmd_callback (GtkWidget *widget,
const gchar *identifier = g_quark_to_string ((GQuark) action);
if (identifier)
gimp_dialog_factory_dialog_new (global_dialog_factory, identifier, -1);
gimp_dialog_factory_dialog_new (global_dialog_factory,
gtk_widget_get_screen (widget),
identifier, -1);
}
}
......@@ -97,6 +100,7 @@ dialogs_create_dockable_cmd_callback (GtkWidget *widget,
}
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
ids[i] ? ids[i] : ids[0], -1);
g_strfreev (ids);
......@@ -104,6 +108,7 @@ dialogs_create_dockable_cmd_callback (GtkWidget *widget,
else
{
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
identifier, -1);
}
}
......@@ -369,7 +374,8 @@ dialogs_create_lc_cmd_callback (GtkWidget *widget,
"gimp-indexed-palette"
};
dialogs_create_dock (tabs, G_N_ELEMENTS (tabs));
dialogs_create_dock (gtk_widget_get_screen (widget),
tabs, G_N_ELEMENTS (tabs));
}
void
......@@ -386,7 +392,8 @@ dialogs_create_data_cmd_callback (GtkWidget *widget,
"gimp-font-list"
};
dialogs_create_dock (tabs, G_N_ELEMENTS (tabs));
dialogs_create_dock (gtk_widget_get_screen (widget),
tabs, G_N_ELEMENTS (tabs));
}
void
......@@ -402,7 +409,8 @@ dialogs_create_stuff_cmd_callback (GtkWidget *widget,
"gimp-template-list"
};
dialogs_create_dock (tabs, G_N_ELEMENTS (tabs));
dialogs_create_dock (gtk_widget_get_screen (widget),
tabs, G_N_ELEMENTS (tabs));
}
void
......@@ -412,7 +420,8 @@ dialogs_show_toolbox (void)
{
GtkWidget *toolbox;
toolbox = gimp_dialog_factory_dock_new (global_toolbox_factory);
toolbox = gimp_dialog_factory_dock_new (global_toolbox_factory,
gdk_screen_get_default ());
gtk_widget_show (toolbox);
}
......@@ -437,7 +446,8 @@ dialogs_show_toolbox (void)
/* private functions */
static void
dialogs_create_dock (const gchar *tabs[],
dialogs_create_dock (GdkScreen *screen,
const gchar *tabs[],
gint n_tabs)
{
GtkWidget *dock;
......@@ -445,7 +455,7 @@ dialogs_create_dock (const gchar *tabs[],
GtkWidget *dockable;
gint i;
dock = gimp_dialog_factory_dock_new (global_dock_factory);
dock = gimp_dialog_factory_dock_new (global_dock_factory, screen);
dockbook = gimp_dockbook_new (global_dock_factory->menu_factory);
......@@ -454,6 +464,7 @@ dialogs_create_dock (const gchar *tabs[],
for (i = 0; i < n_tabs; i++)
{
dockable = gimp_dialog_factory_dialog_new (global_dock_factory,
screen,
tabs[i], -1);
if (dockable && ! GIMP_DOCKABLE (dockable)->dockbook)
......
......@@ -18,7 +18,7 @@
#include "config.h"
#include <string.h>
#include <string.h>
#include <gtk/gtk.h>
......@@ -210,5 +210,5 @@ drawable_offset_cmd_callback (GtkWidget *widget,
GimpDrawable *active_drawable;
return_if_no_drawable (gimage, active_drawable, data);
offset_dialog_create (active_drawable);
offset_dialog_create (active_drawable, widget);
}
......@@ -193,6 +193,7 @@ edit_named_cut_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp, data);
qbox = gimp_query_string_box (_("Cut Named"),
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_BUFFER_CUT,
_("Enter a name for this buffer"),
......@@ -206,17 +207,18 @@ void
edit_named_copy_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GtkWidget *qbox;
return_if_no_image (gimage, data);
GimpDisplay *gdisp;
GtkWidget *qbox;
return_if_no_display (gdisp, data);
qbox = gimp_query_string_box (_("Copy Named"),
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_BUFFER_COPY,
_("Enter a name for this buffer"),
NULL,
G_OBJECT (gimage), "disconnect",
copy_named_buffer_callback, gimage);
G_OBJECT (gdisp->gimage), "disconnect",
copy_named_buffer_callback, gdisp->gimage);
gtk_widget_show (qbox);
}
......@@ -224,7 +226,9 @@ void
edit_named_paste_cmd_callback (GtkWidget *widget,
gpointer data)
{
gimp_dialog_factory_dialog_raise (global_dock_factory, "gimp-buffer-list", -1);
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
"gimp-buffer-list", -1);
}
void
......@@ -264,11 +268,12 @@ edit_stroke_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
edit_stroke_selection (GIMP_ITEM (gimp_image_get_mask (gimage)));
edit_stroke_selection (GIMP_ITEM (gimp_image_get_mask (gimage)), widget);
}
void
edit_stroke_selection (GimpItem *item)
edit_stroke_selection (GimpItem *item,
GtkWidget *parent)
{
GimpImage *gimage;
GimpDrawable *active_drawable;
......@@ -287,7 +292,8 @@ edit_stroke_selection (GimpItem *item)
}
dialog = stroke_dialog_new (item, GIMP_STOCK_SELECTION_STROKE,
GIMP_HELP_SELECTION_STROKE);
GIMP_HELP_SELECTION_STROKE,
parent);
gtk_widget_show (dialog);
}
......
......@@ -48,7 +48,8 @@ void edit_fill_cmd_callback (GtkWidget *widget,
void edit_stroke_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_stroke_selection (GimpItem *item);
void edit_stroke_selection (GimpItem *item,
GtkWidget *parent);
#endif /* __EDIT_COMMANDS_H__ */
......@@ -107,10 +107,11 @@ file_new_cmd_callback (GtkWidget *widget,
/* if called from the image menu */
if (action)
gimage = gimp_context_get_image (gimp_get_user_context (gimp));
else
else
gimage = NULL;
dialog = gimp_dialog_factory_dialog_new (global_dialog_factory,
gtk_widget_get_screen (widget),
"gimp-file-new-dialog", -1);
if (dialog)
......@@ -288,6 +289,7 @@ file_save_template_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp, data);
qbox = gimp_query_string_box (_("Create New Template"),
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_FILE_SAVE_AS_TEMPLATE,
_("Enter a name for this template"),
......@@ -336,6 +338,7 @@ file_revert_cmd_callback (GtkWidget *widget,
g_free (basename);
query_box = gimp_query_boolean_box (_("Revert Image"),
gdisp->shell,
gimp_standard_help_func,
GIMP_HELP_FILE_REVERT,
GIMP_STOCK_QUESTION,
......
......@@ -86,6 +86,7 @@ gradient_editor_left_color_cmd_callback (GtkWidget *widget,
_("Left Endpoint Color"),
GIMP_STOCK_TOOL_BLEND,
_("Gradient Segment's Left Endpoint Color"),
GTK_WIDGET (editor),
global_dialog_factory,
"gimp-gradient-editor-color-dialog",
&editor->control_sel_l->left_color,
......@@ -204,6 +205,7 @@ gradient_editor_right_color_cmd_callback (GtkWidget *widget,
_("Right Endpoint Color"),
GIMP_STOCK_TOOL_BLEND,
_("Gradient Segment's Right Endpoint Color"),
GTK_WIDGET (editor),
global_dialog_factory,
"gimp-gradient-editor-color-dialog",
&editor->control_sel_l->right_color,
......@@ -526,6 +528,7 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget,
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
title, "gimp-gradient-segment-replicate",
GIMP_STOCK_TOOL_BLEND, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_REPLICATE,
......@@ -631,6 +634,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkWidget *widget,
gimp_viewable_dialog_new (GIMP_VIEWABLE (GIMP_DATA_EDITOR (editor)->data),
title, "gimp-gradient-segment_split-uniformly",
GIMP_STOCK_TOOL_BLEND, desc,
GTK_WIDGET (editor),
gimp_standard_help_func,
GIMP_HELP_GRADIENT_EDITOR_SPLIT_UNIFORM,
......
......@@ -122,7 +122,7 @@ image_convert_indexed_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
convert_to_indexed (gimage);
convert_to_indexed (gimage, widget);
}
void
......@@ -142,7 +142,7 @@ image_resize_cmd_callback (GtkWidget *widget,
image_resize->gimage = gimage;
image_resize->resize =
resize_widget_new (GIMP_VIEWABLE (gimage),
resize_widget_new (GIMP_VIEWABLE (gimage), gdisp->shell,
ResizeWidget,
gimage->width,
gimage->height,
......@@ -182,7 +182,7 @@ image_scale_cmd_callback (GtkWidget *widget,
image_scale->gimage = gimage;
image_scale->resize =
resize_widget_new (GIMP_VIEWABLE (gimage),
resize_widget_new (GIMP_VIEWABLE (gimage), gdisp->shell,
ScaleWidget,
gimage->width,
gimage->height,
......@@ -284,7 +284,7 @@ image_merge_layers_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
image_layers_merge_query (gimage, TRUE);
image_layers_merge_query (gimage, TRUE, widget);
}
void
......@@ -312,7 +312,7 @@ image_configure_grid_cmd_callback (GtkWidget *widget,
if (! shell->grid_dialog)
{
shell->grid_dialog = grid_dialog_new (GIMP_IMAGE (gimage));
shell->grid_dialog = grid_dialog_new (GIMP_IMAGE (gimage), widget);
gtk_window_set_transient_for (GTK_WINDOW (shell->grid_dialog),
GTK_WINDOW (shell));
......@@ -365,7 +365,8 @@ image_layers_merge_query_response (GtkWidget *widget,
void
image_layers_merge_query (GimpImage *gimage,
/* if FALSE, anchor active layer */
gboolean merge_visible)
gboolean merge_visible,
GtkWidget *parent)
{
LayerMergeOptions *options;
GtkWidget *vbox;
......@@ -383,6 +384,7 @@ image_layers_merge_query (GimpImage *gimage,
_("Merge Layers"), "gimp-image-merge-layers",
GIMP_STOCK_MERGE_DOWN,
_("Layers Merge Options"),
parent,
gimp_standard_help_func,
GIMP_HELP_IMAGE_MERGE_LAYERS,
......@@ -481,9 +483,7 @@ static void
image_scale_callback (GtkWidget *widget,
gpointer data)
{
ImageResize *image_scale;
image_scale = (ImageResize *) data;
ImageResize *image_scale = data;
g_assert (image_scale != NULL);
g_assert (image_scale->gimage != NULL);
......@@ -504,6 +504,7 @@ image_scale_callback (GtkWidget *widget,
dialog =
gimp_query_boolean_box (_("Layer Too Small"),
image_scale->resize->resize_shell,
gimp_standard_help_func,
GIMP_HELP_IMAGE_SCALE_WARNING,
GTK_STOCK_DIALOG_QUESTION,
......@@ -524,9 +525,7 @@ image_scale_warn_callback (GtkWidget *widget,
gboolean do_scale,
gpointer data)
{
ImageResize *image_scale;
image_scale = (ImageResize *) data;
ImageResize *image_scale = data;
if (do_scale) /* User doesn't mind losing layers... */
{
......
......@@ -49,7 +49,8 @@ void image_flatten_image_cmd_callback (GtkWidget *widet,
gpointer data);
void image_layers_merge_query (GimpImage *gimage,
gboolean merge_visible);
gboolean merge_visible,
GtkWidget *parent);
void image_configure_grid_cmd_callback (GtkWidget *widget,
gpointer data);
......
......@@ -57,11 +57,14 @@
/* local function prototypes */
static void layers_add_mask_query (GimpLayer *layer);
static void layers_add_mask_query (GimpLayer *layer,
GtkWidget *parent);
static void layers_scale_layer_query (GimpImage *gimage,
GimpLayer *layer);
GimpLayer *layer,
GtkWidget *parent);
static void layers_resize_layer_query (GimpImage *gimage,
GimpLayer *layer);
GimpLayer *layer,
GtkWidget *parent);
#define return_if_no_image(gimage,data) \
......@@ -230,7 +233,7 @@ layers_new_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
layers_new_layer_query (gimage, NULL, TRUE);
layers_new_layer_query (gimage, NULL, TRUE, widget);
}
void
......@@ -302,7 +305,7 @@ layers_resize_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_resize_layer_query (gimage, active_layer);
layers_resize_layer_query (gimage, active_layer, widget);
}
void
......@@ -325,7 +328,7 @@ layers_scale_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_scale_layer_query (gimage, active_layer);
layers_scale_layer_query (gimage, active_layer, widget);
}
void
......@@ -374,7 +377,7 @@ layers_mask_add_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_add_mask_query (active_layer);
layers_add_mask_query (active_layer, widget);
}
void
......@@ -479,7 +482,7 @@ layers_merge_layers_cmd_callback (GtkWidget *widget,
GimpImage *gimage;
return_if_no_image (gimage, data);
image_layers_merge_query (gimage, TRUE);
image_layers_merge_query (gimage, TRUE, widget);
}
void
......@@ -501,7 +504,7 @@ layers_edit_attributes_cmd_callback (GtkWidget *widget,
GimpLayer *active_layer;
return_if_no_layer (gimage, active_layer, data);
layers_edit_layer_query (active_layer);
layers_edit_layer_query (active_layer, widget);
}
......@@ -582,7 +585,8 @@ new_layer_query_response (GtkWidget *widget,
void
layers_new_layer_query (GimpImage *gimage,
GimpLayer *template,
gboolean interactive)
gboolean interactive,
GtkWidget *parent)
{
NewLayerOptions *options;
GimpLayer *floating_sel;
......@@ -668,6 +672,7 @@ layers_new_layer_query (GimpImage *gimage,
_("New Layer"), "gimp-layer-new",
GIMP_STOCK_LAYER,
_("Create a New Layer"),
parent,
gimp_standard_help_func,
GIMP_HELP_LAYER_NEW,
......@@ -832,7 +837,8 @@ edit_layer_query_activate (GtkWidget *widget,
}
void
layers_edit_layer_query (GimpLayer *layer)
layers_edit_layer_query (GimpLayer *layer,
GtkWidget *parent)
{
EditLayerOptions *options;
GtkWidget *vbox;
......@@ -848,6 +854,7 @@ layers_edit_layer_query (GimpLayer *layer)
_("Layer Attributes"), "gimp-layer-edit",
GIMP_STOCK_EDIT,
_("Edit Layer Attributes"),
parent,
gimp_standard_help_func,
GIMP_HELP_LAYER_EDIT,