Commit d90ce3b9 authored by Michael Natterer's avatar Michael Natterer 😴

app: attach the "Set Canvas Size" dialog to the image

parent 8a59640b
......@@ -499,23 +499,28 @@ image_resize_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
return_if_no_display (display, data);
if (image_resize_unit != GIMP_UNIT_PERCENT)
image_resize_unit = gimp_display_get_shell (display)->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,
image_resize_unit,
image_resize_callback,
display);
g_signal_connect_object (display, "disconnect",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
gtk_widget_show (dialog);
#define RESIZE_DIALOG_KEY "gimp-resize-dialog"
dialog = dialogs_get_dialog (G_OBJECT (image), RESIZE_DIALOG_KEY);
if (! dialog)
{
if (image_resize_unit != GIMP_UNIT_PERCENT)
image_resize_unit = gimp_display_get_shell (display)->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,
image_resize_unit,
image_resize_callback,
display);
dialogs_attach_dialog (G_OBJECT (image), RESIZE_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment