[gimp/gimp-2-8] app: enable scale image's resolution chain button only if xres == yres
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] app: enable scale image's resolution chain button only if xres == yres
- Date: Fri, 18 Apr 2014 17:22:16 +0000 (UTC)
commit 1f7df343dc2c0160c7b6255ed0aab12be8c8ec11
Author: Michael Natterer <mitch gimp org>
Date: Fri Apr 18 19:17:56 2014 +0200
app: enable scale image's resolution chain button only if xres == yres
(the edit_resolution feature of GimpSizeBox is currently used
only by the scale image dialog)
(cherry picked from commit be8f43ff06e33303ec3de3ac2ed343114d6c2af5)
app/widgets/gimpsizebox.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpsizebox.c b/app/widgets/gimpsizebox.c
index 12adcc4..b45326e 100644
--- a/app/widgets/gimpsizebox.c
+++ b/app/widgets/gimpsizebox.c
@@ -244,14 +244,19 @@ gimp_size_box_constructed (GObject *object)
if (box->edit_resolution)
{
+ gboolean chain_active;
+
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
+ chain_active = ABS (box->xresolution -
+ box->yresolution) < GIMP_MIN_RESOLUTION;
+
entry = gimp_coordinates_new (box->resolution_unit, _("pixels/%a"),
FALSE, FALSE, SB_WIDTH,
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION,
- TRUE, FALSE,
+ chain_active, FALSE,
_("_X resolution:"),
box->xresolution, 1.0,
1, 1, 1, 10,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]