Revision: 1420
http://geeqie.svn.sourceforge.net/geeqie/?rev=1420&view=rev
Author: zas_
Date: 2009-02-25 20:54:38 +0000 (Wed, 25 Feb 2009)
Log Message:
-----------
Save bar pane histogram state to rc file.
Modified Paths:
--------------
trunk/src/bar_histogram.c
Modified: trunk/src/bar_histogram.c
===================================================================
--- trunk/src/bar_histogram.c 2009-02-25 20:42:35 UTC (rev 1419)
+++ trunk/src/bar_histogram.c 2009-02-25 20:54:38 UTC (rev 1420)
@@ -40,6 +40,8 @@
Histogram *histogram;
gint histogram_width;
gint histogram_height;
+ gint histogram_channel;
+ gint histogram_logmode;
GdkPixbuf *pixbuf;
FileData *fd;
};
@@ -89,6 +91,8 @@
indent++;
WRITE_CHAR(*phd, pane.title);
WRITE_BOOL(*phd, pane.expanded);
+ WRITE_INT(*phd, histogram_channel);
+ WRITE_INT(*phd, histogram_logmode);
indent--;
WRITE_STRING("/>\n");
}
@@ -163,6 +167,7 @@
if (channel == histogram_get_channel(phd->histogram)) return;
histogram_set_channel(phd->histogram, channel);
+ phd->histogram_channel = channel;
bar_pane_histogram_update(phd);
}
@@ -181,6 +186,7 @@
if (logmode == histogram_get_mode(phd->histogram)) return;
histogram_set_mode(phd->histogram, logmode);
+ phd->histogram_logmode = logmode;
bar_pane_histogram_update(phd);
}
@@ -288,7 +294,7 @@
}
-GtkWidget *bar_pane_histogram_new(const gchar *title, gint height, gint
expanded)
+GtkWidget *bar_pane_histogram_new(const gchar *title, gint height, gint
expanded, gint histogram_channel, gint histogram_logmode)
{
PaneHistogramData *phd;
@@ -301,8 +307,8 @@
phd->histogram = histogram_new();
- histogram_set_channel(phd->histogram, HCHAN_RGB);
- histogram_set_mode(phd->histogram, 0);
+ histogram_set_channel(phd->histogram, histogram_channel);
+ histogram_set_mode(phd->histogram, histogram_logmode);
phd->widget = gtk_vbox_new(FALSE, PREF_PAD_GAP);
@@ -338,6 +344,8 @@
gchar *title = g_strdup(_("NoName"));
gboolean expanded = TRUE;
gint height = 80;
+ gint histogram_channel = HCHAN_RGB;
+ gint histogram_logmode = 0;
while (*attribute_names)
{
@@ -346,12 +354,14 @@
if (READ_CHAR_FULL("pane.title", title)) continue;
if (READ_BOOL_FULL("pane.expanded", expanded)) continue;
+ if (READ_INT_FULL("histogram_channel", histogram_channel))
continue;
+ if (READ_INT_FULL("histogram_logmode", histogram_logmode))
continue;
+
-
DEBUG_1("unknown attribute %s = %s", option, value);
}
- return bar_pane_histogram_new(title, height, expanded);
+ return bar_pane_histogram_new(title, height, expanded,
histogram_channel, histogram_logmode);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn