Mercurial > geeqie
comparison src/bar_histogram.c @ 1330:8b6e2a47adc7
Add a tooltip showing current histogram state on bar histogram.
author | zas_ |
---|---|
date | Thu, 26 Feb 2009 21:46:27 +0000 |
parents | 1fc356f629fe |
children | a5c15bf32cdb |
comparison
equal
deleted
inserted
replaced
1329:1fc356f629fe | 1330:8b6e2a47adc7 |
---|---|
60 if (!histmap) return; | 60 if (!histmap) return; |
61 | 61 |
62 phd->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, phd->histogram_width, phd->histogram_height); | 62 phd->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, phd->histogram_width, phd->histogram_height); |
63 gdk_pixbuf_fill(phd->pixbuf, 0xffffffff); | 63 gdk_pixbuf_fill(phd->pixbuf, 0xffffffff); |
64 histogram_draw(phd->histogram, histmap, phd->pixbuf, 0, 0, phd->histogram_width, phd->histogram_height); | 64 histogram_draw(phd->histogram, histmap, phd->pixbuf, 0, 0, phd->histogram_width, phd->histogram_height); |
65 | |
66 #if GTK_CHECK_VERSION(2,12,0) | |
67 gtk_widget_set_tooltip_text(phd->drawing_area, histogram_label(phd->histogram)); | |
68 #endif | |
65 } | 69 } |
66 | 70 |
67 | 71 |
68 static void bar_pane_histogram_set_fd(GtkWidget *pane, FileData *fd) | 72 static void bar_pane_histogram_set_fd(GtkWidget *pane, FileData *fd) |
69 { | 73 { |
326 gtk_widget_show(phd->drawing_area); | 330 gtk_widget_show(phd->drawing_area); |
327 gtk_widget_add_events(phd->drawing_area, GDK_BUTTON_PRESS_MASK); | 331 gtk_widget_add_events(phd->drawing_area, GDK_BUTTON_PRESS_MASK); |
328 | 332 |
329 g_signal_connect(G_OBJECT(phd->drawing_area), "button_press_event", G_CALLBACK(bar_pane_histogram_press_cb), phd); | 333 g_signal_connect(G_OBJECT(phd->drawing_area), "button_press_event", G_CALLBACK(bar_pane_histogram_press_cb), phd); |
330 | 334 |
335 #if GTK_CHECK_VERSION(2,12,0) | |
336 gtk_widget_set_tooltip_text(phd->drawing_area, histogram_label(phd->histogram)); | |
337 #endif | |
331 gtk_widget_show(phd->widget); | 338 gtk_widget_show(phd->widget); |
332 | 339 |
333 file_data_register_notify_func(bar_pane_histogram_notify_cb, phd, NOTIFY_PRIORITY_LOW); | 340 file_data_register_notify_func(bar_pane_histogram_notify_cb, phd, NOTIFY_PRIORITY_LOW); |
334 | 341 |
335 return phd->widget; | 342 return phd->widget; |