# HG changeset patch # User zas_ # Date 1235684787 0 # Node ID 8b6e2a47adc7b8b58073c9a079301483b5dbedb9 # Parent 1fc356f629fe660d662304a9aa293ddb9fb78b63 Add a tooltip showing current histogram state on bar histogram. diff -r 1fc356f629fe -r 8b6e2a47adc7 src/bar_histogram.c --- a/src/bar_histogram.c Thu Feb 26 20:50:36 2009 +0000 +++ b/src/bar_histogram.c Thu Feb 26 21:46:27 2009 +0000 @@ -62,6 +62,10 @@ phd->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, phd->histogram_width, phd->histogram_height); gdk_pixbuf_fill(phd->pixbuf, 0xffffffff); histogram_draw(phd->histogram, histmap, phd->pixbuf, 0, 0, phd->histogram_width, phd->histogram_height); + +#if GTK_CHECK_VERSION(2,12,0) + gtk_widget_set_tooltip_text(phd->drawing_area, histogram_label(phd->histogram)); +#endif } @@ -328,6 +332,9 @@ g_signal_connect(G_OBJECT(phd->drawing_area), "button_press_event", G_CALLBACK(bar_pane_histogram_press_cb), phd); +#if GTK_CHECK_VERSION(2,12,0) + gtk_widget_set_tooltip_text(phd->drawing_area, histogram_label(phd->histogram)); +#endif gtk_widget_show(phd->widget); file_data_register_notify_func(bar_pane_histogram_notify_cb, phd, NOTIFY_PRIORITY_LOW);