[balsa] Clean up GdkColor references



commit f6d46576a892c1c729807d3688f59bb076244e0e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Sep 30 18:50:33 2017 -0400

    Clean up GdkColor references
    
        Remove unused make_gradient function, and build with
        quote-color.[ch] only if spell-checker == internal
    
        * src/Makefile.am: move quote-color.[ch] to
        balsa_spell_extra[,_dist]
        * src/meson.build: move quote-color.[ch] to balsa_spell_extra
        * src/quote-color.c: remove unused make_gradient function.
        * src/quote-color.h: ditto.

 ChangeLog         |   11 +++++++++++
 src/Makefile.am   |    6 ++++--
 src/meson.build   |    4 ++--
 src/quote-color.c |   22 ----------------------
 src/quote-color.h |    1 -
 5 files changed, 17 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c9e8134..6eb5370 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-09-30  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Remove unused make_gradient function, and build with
+       quote-color.[ch] only if spell-checker == internal
+
+       * src/Makefile.am: move quote-color.[ch] to
+       balsa_spell_extra[,_dist]
+       * src/meson.build: move quote-color.[ch] to balsa_spell_extra
+       * src/quote-color.c: remove unused make_gradient function.
+       * src/quote-color.h: ditto.
+
 2017-09-28  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * libbalsa/imap/meson.build: fix prefix in marshal files.
diff --git a/src/Makefile.am b/src/Makefile.am
index 8e2df58..cdc0cb3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,8 +58,6 @@ balsa_BASE_SRCLIST =  \
        pref-manager.c          \
        pref-manager.h          \
        print.h                 \
-       quote-color.c           \
-       quote-color.h           \
        save-restore.c          \
        save-restore.h          \
        sendmsg-window.c        \
@@ -89,11 +87,15 @@ balsa_print_source = print-gtk.c    \
 if BUILD_WITH_SPELL_CHECKER
 balsa_spell_extra =
 balsa_spell_extra_dist =       \
+               quote-color.c           \
+               quote-color.h           \
                spell-check.c           \
                spell-check.h
 else
 balsa_spell_extra_dist =
 balsa_spell_extra =            \
+               quote-color.c           \
+               quote-color.h           \
                spell-check.c           \
                spell-check.h
 endif
diff --git a/src/meson.build b/src/meson.build
index 6841ed3..a783fbd 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -58,8 +58,6 @@ balsa_base_srclist = [
   'pref-manager.c',
   'pref-manager.h',
   'print.h',
-  'quote-color.c',
-  'quote-color.h',
   'save-restore.c',
   'save-restore.h',
   'sendmsg-window.c',
@@ -92,6 +90,8 @@ balsa_print_source = [
 balsa_sources = balsa_base_srclist + balsa_print_source
 if spell_checker == 'internal'
   balsa_spell_extra = [
+    'quote-color.c',
+    'quote-color.h',
     'spell-check.c',
     'spell-check.h'
     ]
diff --git a/src/quote-color.c b/src/quote-color.c
index 0344e54..eb908c5 100644
--- a/src/quote-color.c
+++ b/src/quote-color.c
@@ -26,28 +26,6 @@
 
 
 /*
- * void make_gradient()
- *
- * Makes a gradient color on the array, from the first entry to the last.
- */
-void
-make_gradient(GdkColor colors[], gint first, gint last)
-{
-    gint /*add, */ i;
-    double dr, dg, db;
-
-    dr = (double) (colors[last].red - colors[first].red) / (last - first + 1);
-    dg = (double) (colors[last].green - colors[first].green) / (last - first + 1);
-    db = (double) (colors[last].blue - colors[first].blue) / (last - first + 1);
-
-    for (i = (first + 1); i < last; i++) {
-       colors[i].red = colors[i - 1].red + dr;
-       colors[i].blue = colors[i - 1].blue + db;
-       colors[i].green = colors[i - 1].green + dg;
-    }
-}
-
-/*
  * static gint is_a_quote (const gchar *str, const regex_t *rex)
  *
  * Returns how deep a quotation is nested in str.  Uses quoted regex
diff --git a/src/quote-color.h b/src/quote-color.h
index c664606..7c13064 100644
--- a/src/quote-color.h
+++ b/src/quote-color.h
@@ -28,7 +28,6 @@
 
 G_BEGIN_DECLS
 
-    extern void make_gradient(GdkColor colors[], gint, gint);
     extern guint is_a_quote(const gchar *, GRegex * rex);
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]