Commit 4827116a authored by Jehan's avatar Jehan

plug-ins: add a "Load Defaults" button to reset print resolution...

... in the print plug-in.
The resolution set during printing may be different from the print size,
for various reason (home printing vs. printshop for instance). The print
plug-in's resolution is saved and reused from a non-persistent parasite,
thus masking actual intended print resolution. Adding this button allows
to reset this temporary value to the intended resolution at any time.
parent 9f15ad65
......@@ -94,6 +94,7 @@ static void print_size_info_set_page_setup (PrintSizeInfo *info);
static void print_draw_crop_marks_toggled (GtkWidget *widget);
static void print_resolution_load_defaults (PrintSizeInfo *info);
static PrintSizeInfo info;
......@@ -235,6 +236,7 @@ print_size_frame (PrintData *data,
GtkWidget *chain;
GtkWidget *frame;
GtkWidget *label;
GtkWidget *button;
GtkAdjustment *adj;
gdouble image_width;
gdouble image_height;
......@@ -330,6 +332,13 @@ print_size_frame (PrintData *data,
_("_Y resolution:"), 1, 0, 0.0);
gtk_size_group_add_widget (label_group, label);
button = gtk_button_new_with_mnemonic (_("_Load Defaults"));
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (print_resolution_load_defaults),
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (entry), 0,
......@@ -923,3 +932,15 @@ print_draw_crop_marks_toggled (GtkWidget *widget)>draw_crop_marks = active;
static void
print_resolution_load_defaults (PrintSizeInfo *info)
gdouble xres;
gdouble yres;
gimp_image_get_resolution (info->data->image_id, &xres, &yres);
gimp_size_entry_set_refval (info->resolution_entry, 0, xres);
gimp_size_entry_set_refval (info->resolution_entry, 1, yres);
print_size_info_resolution_changed (GTK_WIDGET (info->resolution_entry));
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