Histogram *histogram;
histogram = g_new0(Histogram, 1);
- histogram->histogram_chan = HCHAN_RGB;
- histogram->histogram_logmode = 1;
+ histogram->histogram_chan = options->histogram.last_channel_mode;
+ histogram->histogram_logmode = options->histogram.last_log_mode;
return histogram;
}
gint histogram_set_channel(Histogram *histogram, gint chan)
{
if (!histogram) return 0;
- histogram->histogram_chan = chan;
+ options->histogram.last_channel_mode = histogram->histogram_chan = chan;
return chan;
}
gint histogram_set_mode(Histogram *histogram, gint mode)
{
if (!histogram) return 0;
- histogram->histogram_logmode = mode;
+ options->histogram.last_log_mode = histogram->histogram_logmode = mode;
return mode;
}
#include "main.h"
#include "options.h"
+#include "histogram.h" /* HCHAN_RGB */
+
ConfOptions *init_options(ConfOptions *options)
{
if (!options) options = g_new0(ConfOptions, 1);
options->fullscreen.disable_saver = TRUE;
options->fullscreen.screen = -1;
+ options->histogram.last_channel_mode = HCHAN_RGB;
+ options->histogram.last_log_mode = 1;
+
memset(&options->image.border_color, 0, sizeof(options->image.border_color));
options->image.dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
options->image.enable_read_ahead = TRUE;
gint above;
} fullscreen;
+ /* histogram */
+ struct {
+ guint last_channel_mode;
+ guint last_log_mode;
+ } histogram;
+
/* image overlay */
struct {
struct {
WRITE_BOOL(fullscreen.disable_saver);
WRITE_BOOL(fullscreen.above);
+
+ WRITE_SUBTITLE("Histogram Options");
+ WRITE_UINT(histogram.last_channel_mode);
+ WRITE_UINT(histogram.last_log_mode);
+
+
WRITE_SUBTITLE("Image Overlay Options");
WRITE_BOOL(image_overlay.common.enabled);
WRITE_BOOL(image_overlay.common.show_at_startup);
WRITE_CHAR(image_overlay.common.template_string);
+
WRITE_SUBTITLE("Slideshow Options");
WRITE_INT_UNIT(slideshow.delay, SLIDESHOW_SUBSECOND_PRECISION);
READ_BOOL(fullscreen.disable_saver);
READ_BOOL(fullscreen.above);
+ /* histogram */
+ READ_UINT(histogram.last_channel_mode);
+ READ_UINT(histogram.last_log_mode);
+
/* image overlay */
COMPAT_READ_BOOL(fullscreen.show_info, image_overlay.common.show_at_startup);
COMPAT_READ_CHAR(fullscreen.info, image_overlay.common.template_string);