Skip to content

Commit

Permalink
Add a tooltip showing current histogram state on bar histogram.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Monin committed Feb 26, 2009
1 parent 66b3259 commit 526bf4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bar_histogram.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ static void bar_pane_histogram_update(PaneHistogramData *phd)
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
}


Expand Down Expand Up @@ -328,6 +332,9 @@ GtkWidget *bar_pane_histogram_new(const gchar *title, gint height, gint expanded

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);
Expand Down

0 comments on commit 526bf4e

Please sign in to comment.