SF.net SVN: geany:[3764] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sat May 2 17:27:59 UTC 2009
Revision: 3764
http://geany.svn.sourceforge.net/geany/?rev=3764&view=rev
Author: eht16
Date: 2009-05-02 17:27:59 +0000 (Sat, 02 May 2009)
Log Message:
-----------
Ignore the invert syntax highlighting colours setting when printing to not print characters on a dark background (closes #2785244).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/printing.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-02 17:04:35 UTC (rev 3763)
+++ trunk/ChangeLog 2009-05-02 17:27:59 UTC (rev 3764)
@@ -1,3 +1,10 @@
+2009-05-02 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/printing.c:
+ Ignore the invert syntax highlighting colours setting when printing
+ to not print characters on a dark background (closes #2785244).
+
+
2009-04-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/callbacks.c, src/callbacks.h, src/main.c:
Modified: trunk/src/printing.c
===================================================================
--- trunk/src/printing.c 2009-05-02 17:04:35 UTC (rev 3763)
+++ trunk/src/printing.c 2009-05-02 17:27:59 UTC (rev 3764)
@@ -117,10 +117,26 @@
}
+/* FIXME use the invert function in highlighting.c */
+static guint invert(guint icolour)
+{
+ if (interface_prefs.highlighting_invert_all)
+ {
+ guint r, g, b;
+
+ r = 0xffffff - icolour;
+ g = 0xffffff - (icolour >> 8);
+ b = 0xffffff - (icolour >> 16);
+ return (r | (g << 8) | (b << 16));
+ }
+ return icolour;
+}
+
+
/* split a RGB colour into the three colour components */
static void get_rgb_values(gint c, gint *r, gint *g, gint *b)
{
- c = ROTATE_RGB(c);
+ c = invert(ROTATE_RGB(c));
*r = c % 256;
*g = (c & - 16711936) / 256;
*b = (c & 0xff0000) / 65536;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list