[gimp] app: only enable the resolution chain button if xres and yres are the same
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: only enable the resolution chain button if xres and yres are the same
- Date: Fri, 18 Apr 2014 15:59:36 +0000 (UTC)
commit a8592e735276efbe11381538f7dfa8f004a2afbc
Author: Michael Natterer <mitch gimp org>
Date: Fri Apr 18 17:57:02 2014 +0200
app: only enable the resolution chain button if xres and yres are the same
app/dialogs/print-size-dialog.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/app/dialogs/print-size-dialog.c b/app/dialogs/print-size-dialog.c
index ac31433..0b847e0 100644
--- a/app/dialogs/print-size-dialog.c
+++ b/app/dialogs/print-size-dialog.c
@@ -270,7 +270,8 @@ print_size_dialog_new (GimpImage *image,
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 1, private->yres);
chain = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
- gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
+ if (ABS (private->xres - private->yres) < GIMP_MIN_RESOLUTION)
+ gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
gtk_table_attach_defaults (GTK_TABLE (entry), chain, 1, 2, 0, 2);
gtk_widget_show (chain);
@@ -398,13 +399,9 @@ print_size_dialog_set_resolution (PrintSizeDialog *private,
if (private->chain && gimp_chain_button_get_active (private->chain))
{
if (xres != private->xres)
- {
- yres = xres;
- }
+ yres = xres;
else
- {
- xres = yres;
- }
+ xres = yres;
}
private->xres = xres;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]