Revision: 1408
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1408&view=rev
Author:   zas_
Date:     2009-02-23 17:20:40 +0000 (Mon, 23 Feb 2009)

Log Message:
-----------
Introduce helpers histogram_toggle_channel() and histogram_toggle_mode().

Modified Paths:
--------------
    trunk/src/histogram.c
    trunk/src/histogram.h
    trunk/src/image-overlay.c

Modified: trunk/src/histogram.c
===================================================================
--- trunk/src/histogram.c       2009-02-22 17:46:42 UTC (rev 1407)
+++ trunk/src/histogram.c       2009-02-23 17:20:40 UTC (rev 1408)
@@ -97,6 +97,18 @@
        return histogram->log_mode;
 }
 
+gint histogram_toggle_channel(Histogram *histogram)
+{
+       if (!histogram) return 0;
+       return histogram_set_channel(histogram, 
(histogram_get_channel(histogram)+1)%HCHAN_COUNT);
+}
+
+gint histogram_toggle_mode(Histogram *histogram)
+{
+       if (!histogram) return 0;
+       return histogram_set_mode(histogram, !histogram_get_mode(histogram));
+}
+
 const gchar *histogram_label(Histogram *histogram)
 {
        const gchar *t1 = "";

Modified: trunk/src/histogram.h
===================================================================
--- trunk/src/histogram.h       2009-02-22 17:46:42 UTC (rev 1407)
+++ trunk/src/histogram.h       2009-02-23 17:20:40 UTC (rev 1408)
@@ -28,6 +28,8 @@
 gint histogram_get_channel(Histogram *histogram);
 gint histogram_set_mode(Histogram *histogram, gint mode);
 gint histogram_get_mode(Histogram *histogram);
+gint histogram_toggle_channel(Histogram *histogram);
+gint histogram_toggle_mode(Histogram *histogram);
 const gchar *histogram_label(Histogram *histogram);
 const HistMap *histmap_get(FileData *fd);
 gint histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf 
*pixbuf, gint x, gint y, gint width, gint height);

Modified: trunk/src/image-overlay.c
===================================================================
--- trunk/src/image-overlay.c   2009-02-22 17:46:42 UTC (rev 1407)
+++ trunk/src/image-overlay.c   2009-02-23 17:20:40 UTC (rev 1408)
@@ -130,7 +130,7 @@
 
        if (!osd || !osd->histogram) return;
 
-       histogram_set_channel(osd->histogram, 
(histogram_get_channel(osd->histogram) +1)%HCHAN_COUNT);
+       histogram_toggle_channel(osd->histogram);
        image_osd_update(imd);
 }
 
@@ -140,7 +140,7 @@
 
        if (!osd || !osd->histogram) return;
 
-       histogram_set_mode(osd->histogram, !histogram_get_mode(osd->histogram));
+       histogram_toggle_mode(osd->histogram);
        image_osd_update(imd);
 }
 


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

Reply via email to