[gimp/goat-invasion] app: display the precision in the image properties dialog
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion] app: display the precision in the image properties dialog
- Date: Sat, 28 Apr 2012 13:32:14 +0000 (UTC)
commit d15bd8b4cc349df9312170e126280ed387774f04
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 28 15:31:40 2012 +0200
app: display the precision in the image properties dialog
app/widgets/gimpimagepropview.c | 16 ++++++++++++++--
app/widgets/gimpimagepropview.h | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 0f6164a..31e172b 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -111,7 +111,7 @@ gimp_image_prop_view_init (GimpImagePropView *view)
GtkTable *table = GTK_TABLE (view);
gint row = 0;
- gtk_table_resize (table, 14, 2);
+ gtk_table_resize (table, 15, 2);
gtk_table_set_col_spacings (table, 6);
gtk_table_set_row_spacings (table, 3);
@@ -126,7 +126,10 @@ gimp_image_prop_view_init (GimpImagePropView *view)
gimp_image_prop_view_add_label (table, row++, _("Resolution:"));
view->colorspace_label =
- gimp_image_prop_view_add_label (table, row, _("Color space:"));
+ gimp_image_prop_view_add_label (table, row++, _("Color space:"));
+
+ view->precision_label =
+ gimp_image_prop_view_add_label (table, row, _("Precision:"));
gtk_table_set_row_spacing (GTK_TABLE (view), row++, 12);
@@ -426,6 +429,7 @@ gimp_image_prop_view_update (GimpImagePropView *view)
{
GimpImage *image = view->image;
GimpImageBaseType type;
+ GimpPrecision precision;
GimpUnit unit;
gdouble unit_factor;
gint unit_digits;
@@ -491,6 +495,14 @@ gimp_image_prop_view_update (GimpImagePropView *view)
gtk_label_set_text (GTK_LABEL (view->colorspace_label), buf);
+ /* precision */
+ precision = gimp_image_get_precision (image);
+
+ gimp_enum_get_value (GIMP_TYPE_PRECISION, precision,
+ NULL, NULL, &desc, NULL);
+
+ gtk_label_set_text (GTK_LABEL (view->precision_label), desc);
+
/* size in memory */
gimp_image_prop_view_label_set_memsize (view->memsize_label,
GIMP_OBJECT (image));
diff --git a/app/widgets/gimpimagepropview.h b/app/widgets/gimpimagepropview.h
index a34b4ae..f8fb758 100644
--- a/app/widgets/gimpimagepropview.h
+++ b/app/widgets/gimpimagepropview.h
@@ -42,6 +42,7 @@ struct _GimpImagePropView
GtkWidget *print_size_label;
GtkWidget *resolution_label;
GtkWidget *colorspace_label;
+ GtkWidget *precision_label;
GtkWidget *filename_label;
GtkWidget *filesize_label;
GtkWidget *filetype_label;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]