[gthumb] added some statistical information to the histogram view



commit 19b426a1be230a8a4a5b7c15c69812b08baf2a17
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Feb 27 20:41:16 2011 +0100

    added some statistical information to the histogram view

 data/ui/Makefile.am                                |    1 +
 data/ui/histogram-info.ui                          |  228 ++++++++++++++++++++
 .../file_tools/gth-file-tool-adjust-colors.c       |    3 +-
 extensions/image_viewer/gth-image-histogram.c      |    4 +-
 gthumb/glib-utils.h                                |    2 +
 gthumb/gth-histogram-view.c                        |  174 ++++++++++++++-
 gthumb/gth-histogram-view.h                        |    2 +
 po/POTFILES.in                                     |    1 +
 8 files changed, 402 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index 7ecb4af..fba4e66 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -2,6 +2,7 @@ uidir = $(pkgdatadir)/ui
 ui_DATA = 			\
 	extensions.ui		\
 	filter-editor.ui	\
+	histogram-info.ui	\
 	overwrite-dialog.ui	\
 	personalize-filters.ui	\
 	preferences.ui		\
diff --git a/data/ui/histogram-info.ui b/data/ui/histogram-info.ui
new file mode 100644
index 0000000..3a9c0b8
--- /dev/null
+++ b/data/ui/histogram-info.ui
@@ -0,0 +1,228 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkHBox" id="histogram_info">
+    <property name="visible">True</property>
+    <property name="border_width">3</property>
+    <property name="homogeneous">True</property>
+    <child>
+      <object class="GtkTable" id="table1">
+        <property name="visible">True</property>
+        <property name="n_rows">3</property>
+        <property name="n_columns">2</property>
+        <property name="column_spacing">6</property>
+        <property name="row_spacing">2</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes">Mean:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="mean_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">5</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes" comments="Short for &quot;Standard deviation&quot;">Std dev:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes">Median:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="std_dev_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">5</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="median_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">5</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkTable" id="table2">
+        <property name="visible">True</property>
+        <property name="n_rows">3</property>
+        <property name="n_columns">2</property>
+        <property name="column_spacing">6</property>
+        <property name="row_spacing">2</property>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes">Pixels:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="total_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">10</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes">Selected:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label6">
+            <property name="visible">True</property>
+            <property name="xalign">1</property>
+            <property name="label" translatable="yes">Percentile:</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="selected_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">10</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="percentile_label">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="width_chars">10</property>
+            <attributes>
+              <attribute name="absolute-size" value="10000"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+            <property name="x_options">GTK_FILL</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/extensions/file_tools/gth-file-tool-adjust-colors.c b/extensions/file_tools/gth-file-tool-adjust-colors.c
index 5fb6b0e..2519229 100644
--- a/extensions/file_tools/gth-file-tool-adjust-colors.c
+++ b/extensions/file_tools/gth-file-tool-adjust-colors.c
@@ -28,7 +28,6 @@
 
 #define GET_WIDGET(x) (_gtk_builder_get_widget (self->priv->builder, (x)))
 #define APPLY_DELAY 150
-#define SQR(x) ((x) * (x))
 
 
 static gpointer parent_class = NULL;
@@ -417,7 +416,7 @@ gth_file_tool_adjust_colors_get_options (GthFileTool *base)
 	self->priv->brightness_adj    = gimp_scale_entry_new (GET_WIDGET ("brightness_hbox"),
 							      GTK_LABEL (GET_WIDGET ("brightness_label")),
 							      0.0, -100.0, 100.0, 1.0, 10.0, 0);
-	self->priv->contrast_adj      = gimp_scale_entry_new (GET_WIDGET ("contrast_hbox"), 
+	self->priv->contrast_adj      = gimp_scale_entry_new (GET_WIDGET ("contrast_hbox"),
 							      GTK_LABEL (GET_WIDGET ("contrast_label")),
 							      0.0, -100.0, 100.0, 1.0, 10.0, 0);
 	self->priv->gamma_adj         = gimp_scale_entry_new (GET_WIDGET ("gamma_hbox"),
diff --git a/extensions/image_viewer/gth-image-histogram.c b/extensions/image_viewer/gth-image-histogram.c
index b599682..7ab6e7f 100644
--- a/extensions/image_viewer/gth-image-histogram.c
+++ b/extensions/image_viewer/gth-image-histogram.c
@@ -20,13 +20,14 @@
  */
 
 #include <config.h>
+#include <math.h>
 #include <glib/gi18n.h>
 #include <gthumb.h>
 #include "gth-image-histogram.h"
 #include "gth-image-viewer-page.h"
 
 #define GTH_IMAGE_HISTOGRAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTH_TYPE_IMAGE_HISTOGRAM, GthImageHistogramPrivate))
-#define MIN_HISTOGRAM_HEIGHT 200
+#define MIN_HISTOGRAM_HEIGHT 250
 
 
 static gpointer parent_class = NULL;
@@ -113,6 +114,7 @@ gth_image_histogram_init (GthImageHistogram *self)
 	gtk_container_set_border_width (GTK_CONTAINER (self), 2);
 
 	self->priv->histogram_view = gth_histogram_view_new (self->priv->histogram);
+	gth_histogram_view_show_info (GTH_HISTOGRAM_VIEW (self->priv->histogram_view), TRUE);
 	gtk_widget_set_size_request (self->priv->histogram_view, -1, MIN_HISTOGRAM_HEIGHT);
 	gtk_widget_show (self->priv->histogram_view);
 	gtk_box_pack_start (GTK_BOX (self), self->priv->histogram_view, FALSE, FALSE, 0);
diff --git a/gthumb/glib-utils.h b/gthumb/glib-utils.h
index 7423b12..06ccc98 100644
--- a/gthumb/glib-utils.h
+++ b/gthumb/glib-utils.h
@@ -29,6 +29,8 @@
 
 G_BEGIN_DECLS
 
+#define SQR(x) ((x) * (x))
+
 #define GFILE_NAME_TYPE_ATTRIBUTES "standard::name,standard::type"
 #define GFILE_DISPLAY_ATTRIBUTES "standard::display-name,standard::icon"
 #define GFILE_BASIC_ATTRIBUTES GFILE_DISPLAY_ATTRIBUTES ",standard::name,standard::type"
diff --git a/gthumb/gth-histogram-view.c b/gthumb/gth-histogram-view.c
index dbc0f1f..5a48414 100644
--- a/gthumb/gth-histogram-view.c
+++ b/gthumb/gth-histogram-view.c
@@ -27,9 +27,10 @@
 #include "glib-utils.h"
 #include "gth-histogram-view.h"
 #include "gth-enum-types.h"
+#include "gtk-utils.h"
 
 
-#define GRID_STEP 50.0
+#define GET_WIDGET(x) (_gtk_builder_get_widget (self->priv->builder, (x)))
 
 
 /* Properties */
@@ -62,6 +63,7 @@ struct _GthHistogramViewPrivate {
 	GtkWidget           *linear_histogram_button;
 	GtkWidget           *logarithmic_histogram_button;
 	GtkWidget           *channel_combo_box;
+	GtkBuilder          *builder;
 
 };
 
@@ -84,7 +86,7 @@ gth_histogram_set_property (GObject      *object,
 		gth_histogram_view_set_current_channel (self, g_value_get_enum (value));
 		break;
 	case PROP_DISPLAY_MODE:
-		gth_histogram_view_set_histogram (self, g_value_get_object (value));
+		gth_histogram_view_set_display_mode (self, g_value_get_enum (value));
 		break;
 	case PROP_SCALE_TYPE:
 		gth_histogram_view_set_scale_type (self, g_value_get_enum (value));
@@ -133,6 +135,7 @@ gth_histogram_view_finalize (GObject *obj)
 	self = GTH_HISTOGRAM_VIEW (obj);
 
 	gth_histogram_view_set_histogram (self, NULL);
+	_g_object_unref (self->priv->builder);
 
 	G_OBJECT_CLASS (gth_histogram_view_parent_class)->finalize (obj);
 }
@@ -274,10 +277,12 @@ gth_histogram_paint_rgb (GthHistogramView *self,
 			 cairo_t          *cr,
 			 GtkAllocation    *allocation)
 {
-	double max;
-	double step;
-	int    i;
+	GtkStyle *style;
+	double    max;
+	double    step;
+	int       i;
 
+	style = gtk_widget_get_style (GTK_WIDGET (self));
 	max = gth_histogram_get_max (self->priv->histogram);
 	if (max > 0.0)
 		max = convert_to_scale (self->priv->scale_type, max);
@@ -351,7 +356,7 @@ gth_histogram_paint_rgb (GthHistogramView *self,
 		 * painted in black. */
 
 		cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
-		cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+		gdk_cairo_set_source_color (cr, &style->text[gtk_widget_get_state (GTK_WIDGET (self))]);
 		value = gth_histogram_get_value (self->priv->histogram, min_c, i);
 		y = (int) (allocation->height * convert_to_scale (self->priv->scale_type, value)) / max;
 		cairo_rectangle (cr, (i * step) + 0.5, allocation->height - y, step, allocation->height);
@@ -366,6 +371,7 @@ gth_histogram_paint_grid (GthHistogramView *self,
 			  GtkAllocation    *allocation)
 {
 	GtkStyle *style;
+	double    grid_step;
 	int       i;
 
 	cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
@@ -373,14 +379,15 @@ gth_histogram_paint_grid (GthHistogramView *self,
 	style = gtk_widget_get_style (GTK_WIDGET (self));
 	gdk_cairo_set_source_color (cr, &style->dark[gtk_widget_get_state (GTK_WIDGET (self))]);
 
-	cairo_rectangle (cr, 0, 0, allocation->width, allocation->height);
+	cairo_set_line_width (cr, 0.5);
+	cairo_rectangle (cr, 0.5, 0.5, allocation->width, allocation->height);
 	cairo_stroke (cr);
 
-	cairo_set_line_width (cr, 0.5);
-	for (i = 1; i <= 4; i++) {
+	grid_step = 255.0 / 5;
+	for (i = 1; i < 5; i++) {
 		int x;
 
-		x = (i * GRID_STEP) * ((double) allocation->width / 255.0);
+		x = (i * grid_step) * ((double) allocation->width / 255.0);
 
 		cairo_move_to (cr, x + 0.5, 0);
 		cairo_line_to (cr, x + 0.5, allocation->height);
@@ -594,6 +601,9 @@ gth_histogram_view_instance_init (GthHistogramView *self)
 	self->priv->current_channel = GTH_HISTOGRAM_CHANNEL_VALUE;
 	self->priv->display_mode = GTH_HISTOGRAM_MODE_ONE_CHANNEL;
 	self->priv->scale_type = GTH_HISTOGRAM_SCALE_LINEAR;
+	self->priv->builder = _gtk_builder_new_from_file ("histogram-info.ui", NULL);
+	self->priv->selection_start = 0;
+	self->priv->selection_end = 255;
 
 	gtk_box_set_spacing (GTK_BOX (self), 6);
 
@@ -739,6 +749,12 @@ gth_histogram_view_instance_init (GthHistogramView *self)
 			  G_CALLBACK (histogram_view_scroll_event_cb),
 			  self);
 
+	/* histogram info */
+
+	box = GET_WIDGET ("histogram_info");
+	gtk_widget_hide (box);
+	gtk_box_pack_start (GTK_BOX (self), box, FALSE, FALSE, 0);
+
 	/* update widgets when a property changes */
 
 	g_signal_connect (self,
@@ -814,6 +830,112 @@ update_channel_combo_box_sensitivity (GthHistogramView *self)
 
 
 static void
+_gth_histogram_view_update_info (GthHistogramView *self)
+{
+	GthHistogramChannel  first_channel;
+	GthHistogramChannel  last_channel;
+	GthHistogramChannel  channel;
+	guchar               start;
+	guchar               end;
+	goffset              total;
+	goffset              pixels;
+	double               mean;
+	double               std_dev;
+	double               sum;
+	int                  median;
+	int                  i;
+	char                *s;
+
+	if (gth_histogram_view_get_display_mode (self) == GTH_HISTOGRAM_MODE_ALL_CHANNELS) {
+		first_channel = GTH_HISTOGRAM_CHANNEL_RED;
+		last_channel = GTH_HISTOGRAM_CHANNEL_BLUE;
+	}
+	else
+		first_channel = last_channel = gth_histogram_view_get_current_channel (self);
+
+	start = self->priv->selection_start;
+	end = self->priv->selection_end;
+
+	/* total */
+
+	total = 0;
+	for (channel = first_channel; channel <= last_channel; channel++)
+		for (i = start; i <= end; i++)
+			total += gth_histogram_get_value (self->priv->histogram, channel, i);
+
+	/* mean / pixels */
+
+	pixels = 0;
+	mean = 0.0;
+	for (channel = first_channel; channel <= last_channel; channel++) {
+		for (i = start; i <= end; i++) {
+			double v = gth_histogram_get_value (self->priv->histogram, channel, i);
+			pixels += v;
+			mean += v * i;
+		}
+	}
+	mean = mean / pixels;
+
+	/* std_dev */
+
+	std_dev = 0.0;
+	for (channel = first_channel; channel <= last_channel; channel++) {
+		for (i = start; i <= end; i++) {
+			double v = gth_histogram_get_value (self->priv->histogram, channel, i);
+			std_dev += v * SQR (i - mean);
+		}
+	}
+	std_dev = sqrt (std_dev / pixels);
+
+	/* median */
+
+	median = 0;
+	sum = 0.0;
+	for (i = start; i <= end; i++) {
+		for (channel = first_channel; channel <= last_channel; channel++)
+			sum += gth_histogram_get_value (self->priv->histogram, channel, i);
+		if (sum * 2 > pixels) {
+			median = i;
+			break;
+		}
+	}
+
+	/*
+	g_print ("Mean: %.1f\n", mean);
+	g_print ("Standard deviation: %.1f\n", std_dev);
+	g_print ("Median: %d\n", median);
+	g_print ("Pixels: %" G_GOFFSET_FORMAT "\n", pixels);
+	g_print ("Total: %" G_GOFFSET_FORMAT "\n", total);
+	g_print ("Percentile: %.1f%%\n", ((double) pixels / total) * 100.0);
+	*/
+
+	s = g_strdup_printf ("%.1f", mean);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("mean_label")), s);
+	g_free (s);
+
+	s = g_strdup_printf ("%.1f", std_dev);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("std_dev_label")), s);
+	g_free (s);
+
+	s = g_strdup_printf ("%d", median);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("median_label")), s);
+	g_free (s);
+
+	s = g_strdup_printf ("%" G_GOFFSET_FORMAT, total);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("total_label")), s);
+	g_free (s);
+
+	s = g_strdup_printf ("%" G_GOFFSET_FORMAT, pixels);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("selected_label")), s);
+	g_free (s);
+
+	s = g_strdup_printf ("%.1f%%", ((double) pixels / total) * 100.0);
+	gtk_label_set_text (GTK_LABEL (GET_WIDGET ("percentile_label")), s);
+	g_free (s);
+}
+
+
+static void
 histogram_changed_cb (GthHistogram *histogram,
 		      gpointer      user_data)
 {
@@ -821,6 +943,9 @@ histogram_changed_cb (GthHistogram *histogram,
 
 	update_channel_combo_box_sensitivity (self);
 	gtk_widget_queue_draw (GTK_WIDGET (self));
+
+	if (gtk_widget_get_visible (GET_WIDGET ("histogram_info")))
+		_gth_histogram_view_update_info (self);
 }
 
 
@@ -847,6 +972,9 @@ gth_histogram_view_set_histogram (GthHistogramView *self,
 	self->priv->histogram_changed_event = g_signal_connect (self->priv->histogram, "changed", G_CALLBACK (histogram_changed_cb), self);
 
 	g_object_notify (G_OBJECT (self), "histogram");
+
+	if (gtk_widget_get_visible (GET_WIDGET ("histogram_info")))
+		_gth_histogram_view_update_info (self);
 }
 
 
@@ -864,10 +992,16 @@ gth_histogram_view_set_current_channel (GthHistogramView *self,
 {
 	g_return_if_fail (GTH_IS_HISTOGRAM_VIEW (self));
 
+	if (n_channel == self->priv->current_channel)
+		return;
+
 	self->priv->current_channel = CLAMP (n_channel, 0, GTH_HISTOGRAM_N_CHANNELS);
 	g_object_notify (G_OBJECT (self), "current-channel");
 
 	gtk_widget_queue_draw (GTK_WIDGET (self));
+
+	if (gtk_widget_get_visible (GET_WIDGET ("histogram_info")))
+		_gth_histogram_view_update_info (self);
 }
 
 
@@ -885,10 +1019,16 @@ gth_histogram_view_set_display_mode (GthHistogramView *self,
 {
 	g_return_if_fail (GTH_IS_HISTOGRAM_VIEW (self));
 
+	if (mode == self->priv->display_mode)
+		return;
+
 	self->priv->display_mode = mode;
 	g_object_notify (G_OBJECT (self), "display-mode");
 
 	gtk_widget_queue_draw (GTK_WIDGET (self));
+
+	if (gtk_widget_get_visible (GET_WIDGET ("histogram_info")))
+		_gth_histogram_view_update_info (self);
 }
 
 
@@ -930,4 +1070,18 @@ gth_histogram_view_set_selection (GthHistogramView *self,
 
 	self->priv->selection_start = start;
 	self->priv->selection_end = end;
+
+	if (gtk_widget_get_visible (GET_WIDGET ("histogram_info")))
+		_gth_histogram_view_update_info (self);
+}
+
+
+void
+gth_histogram_view_show_info (GthHistogramView *self,
+			      gboolean          show_info)
+{
+	if (show_info)
+		gtk_widget_show (GET_WIDGET ("histogram_info"));
+	else
+		gtk_widget_hide (GET_WIDGET ("histogram_info"));
 }
diff --git a/gthumb/gth-histogram-view.h b/gthumb/gth-histogram-view.h
index 4c1c720..e33152f 100644
--- a/gthumb/gth-histogram-view.h
+++ b/gthumb/gth-histogram-view.h
@@ -75,6 +75,8 @@ GthHistogramScale  gth_histogram_view_get_scale_type        (GthHistogramView  *
 void               gth_histogram_view_set_selection         (GthHistogramView  *self,
 							     guchar             start,
 							     guchar             end);
+void               gth_histogram_view_show_info             (GthHistogramView  *self,
+							     gboolean           show_info);
 
 G_END_DECLS
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0b8abe8..542e4fa 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,6 +12,7 @@ data/gthumb-import.desktop.in.in
 data/gthumb.schemas.in
 [type: gettext/glade]data/ui/extensions.ui
 [type: gettext/glade]data/ui/filter-editor.ui
+[type: gettext/glade]data/ui/histogram-info.ui
 [type: gettext/glade]data/ui/overwrite-dialog.ui
 [type: gettext/glade]data/ui/personalize-filters.ui
 [type: gettext/glade]data/ui/preferences.ui



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]