[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-235-g2e83bf2)
The branch, master has been updated
via 2e83bf2b37e093578088eef616e15ee361e85199 (commit)
via ee89ff1fbf0364843861c0797bb4f0d3a425e5fe (commit)
via bbe251bc64ed2db2976a26116d22a69fe678b9fd (commit)
from f63b79f3483b54a064a2bb74f8355d28232e78fd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/include/prototype.h | 44 +++++++++---------
gschem/lib/gschem-darkbg | 72 +++++++++++--------------------
gschem/lib/gschem-lightbg | 80 +++++++++++++--------------------
gschem/scheme/auto-place-attribs.scm | 2 +-
gschem/src/g_hook.c | 22 +++------
gschem/src/g_rc.c | 26 +++--------
gschem/src/g_register.c | 44 +++++++++---------
libgeda/include/prototype.h | 5 +--
libgeda/include/struct.h | 2 -
libgeda/src/s_color.c | 78 +--------------------------------
10 files changed, 119 insertions(+), 256 deletions(-)
=================
Commit Messages
=================
commit 2e83bf2b37e093578088eef616e15ee361e85199
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 20:01:50 2008 +0100
Remove legacy PNG color specifications.
The configuration files provide a way of specifying colors for PNG
output, but these are never used -- the PNG output just uses the same
color map used for on-screen display. Remove the redundant
specification and associated data structures completely.
:100644 100644 fe4667d... f738faa... M gschem/include/prototype.h
:100644 100644 84efaac... f7b486d... M gschem/lib/gschem-darkbg
:100644 100644 1f17a31... e3db2a1... M gschem/lib/gschem-lightbg
:100644 100644 c355fda... 0a3c6a7... M gschem/src/g_rc.c
:100644 100644 8b5765b... 6a97f3c... M gschem/src/g_register.c
:100644 100644 4b1b524... 0c3ec4c... M libgeda/include/prototype.h
:100644 100644 4138482... 529cd2d... M libgeda/include/struct.h
:100644 100644 974bfc2... 526e747... M libgeda/src/s_color.c
commit ee89ff1fbf0364843861c0797bb4f0d3a425e5fe
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 20:09:09 2008 +0100
libgeda: Remove COLOR.image_color and two unused functions.
The image_color member of the COLOR struct is never used. Remove it.
Similarly, the s_color_get_name() and s_color_image_int() are unused
and therefore removed by this patch.
:100644 100644 d99ed68... 4b1b524... M libgeda/include/prototype.h
:100644 100644 87aeb49... 4138482... M libgeda/include/struct.h
:100644 100644 ea7236c... 974bfc2... M libgeda/src/s_color.c
commit bbe251bc64ed2db2976a26116d22a69fe678b9fd
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 18:57:16 2008 +0100
Get rid of s_color_get_index().
This function is very clearly the Wrong Thing, and could potentially
result in incorrect color indices ending up in schematic files if two
or more color map entries have the same value.
This patch removes the function entirely, and modifies the Scheme code
which uses it to simply pass color indices around instead. Note that
the results of s_color_get_index() were never actually *used* in the
existing code.
:100644 100644 be0f623... 6d52a8d... M gschem/scheme/auto-place-attribs.scm
:100644 100644 a614563... 32ff026... M gschem/src/g_hook.c
:100644 100644 e314d07... d99ed68... M libgeda/include/prototype.h
:100644 100644 3cbdca7... ea7236c... M libgeda/src/s_color.c
=========
Changes
=========
commit 2e83bf2b37e093578088eef616e15ee361e85199
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 20:01:50 2008 +0100
Remove legacy PNG color specifications.
The configuration files provide a way of specifying colors for PNG
output, but these are never used -- the PNG output just uses the same
color map used for on-screen display. Remove the redundant
specification and associated data structures completely.
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index fe4667d..f738faa 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -189,28 +189,28 @@ SCM g_get_selected_component_attributes(void);
/* g_rc.c */
void g_rc_parse_gtkrc();
SCM g_rc_gschem_version(SCM version);
-SCM g_rc_override_net_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_override_bus_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_override_pin_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_attribute_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_detachedattr_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_text_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_net_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_bus_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_pin_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_graphic_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_grid_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_background_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_select_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_boundingbox_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_zoom_box_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_net_endpoint_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_junction_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_logic_bubble_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_lock_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_output_color_background(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_stroke_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
-SCM g_rc_freestyle_color(SCM index, SCM color, SCM outline_color, SCM ps_color, SCM ir, SCM ig, SCM ib);
+SCM g_rc_override_net_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_override_bus_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_override_pin_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_attribute_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_detachedattr_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_text_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_net_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_bus_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_pin_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_graphic_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_grid_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_background_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_select_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_boundingbox_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_zoom_box_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_net_endpoint_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_junction_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_logic_bubble_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_lock_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_output_color_background(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_stroke_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
+SCM g_rc_freestyle_color(SCM index, SCM color, SCM outline_color, SCM ps_color);
SCM g_rc_net_endpoint_mode(SCM mode);
SCM g_rc_net_midpoint_mode(SCM mode);
SCM g_rc_net_direction_mode(SCM mode);
diff --git a/gschem/lib/gschem-darkbg b/gschem/lib/gschem-darkbg
index 84efaac..f7b486d 100644
--- a/gschem/lib/gschem-darkbg
+++ b/gschem/lib/gschem-darkbg
@@ -49,89 +49,78 @@
; the first string is the actual color name
; the second string is the outline color name
; the third string is the postscript color name
-; and the final 3 integers are the RGB values for PNG image files
;
; background-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default background color.
; DO NOT change the value of the index (first number)
;
-(background-color 0 "black" "null" "null" -1 -1 -1) ; dark background
+(background-color 0 "black" "null" "null") ; dark background
; pin-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new pins (does not effect existing pins).
; To change existing pins use the override-pin-color
; DO NOT change the value of the index (first number)
;
-(pin-color 1 "white" "grey" "1 1 1" 255 255 255) ; dark background
+(pin-color 1 "white" "grey" "1 1 1") ; dark background
; net-endpoint-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default net endpoint color.
; DO NOT change the value of the index (first number)
;
-(net-endpoint-color 2 "red" "red3" "1 0 0" 255 0 0) ; dark background
+(net-endpoint-color 2 "red" "red3" "1 0 0") ; dark background
; graphic-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default graphics color. All new Lines, Boxes, Circles, and Arcs
; are effected by this keyword. Existing graphic objects are not effected
; by this keyword.
; DO NOT change the value of the index (first number)
;
-(graphic-color 3 "green" "green3" "0 1 0" 0 255 0) ; dark background
+(graphic-color 3 "green" "green3" "0 1 0") ; dark background
; net-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new nets (does not effect existing nets).
; To change existing nets use the override-net-color
; DO NOT change the value of the index (first number)
;
-(net-color 4 "blue" "blue3" "0 0 1" 0 0 255) ; dark background
+(net-color 4 "blue" "blue3" "0 0 1") ; dark background
; attribute-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of attributes. Attributes are any object associated with
; another with the 'Attach Attribute' command.
; DO NOT change the value of the index (first number)
;
-(attribute-color 5 "yellow" "yellow3" "1 1 0" 255 255 0) ; dark background
+(attribute-color 5 "yellow" "yellow3" "1 1 0") ; dark background
; logic-bubble-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of logic bubbles / circles.
; DO NOT change the value of the index (first number)
;
; light background
-(logic-bubble-color 6 "cyan" "cyan3" "0 1 1" 0 255 255) ; dark background
+(logic-bubble-color 6 "cyan" "cyan3" "0 1 1") ; dark background
; grid-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default grid color.
; DO NOT change the value of the index (first number)
;
-(grid-color 7 "grey" "null" "null" -1 -1 -1) ; dark background
+(grid-color 7 "grey" "null" "null") ; dark background
; detached-attribute-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of detached attributes. Detached attributes are just
; text items which were attributes at one time. Detached attributes
; are created in conjunction with the 'Detach Attribute' command.
; DO NOT change the value of the index (first number)
;
-(detached-attribute-color 8 "red" "red3" "1 0 0" 255 0 0) ; dark background
+(detached-attribute-color 8 "red" "red3" "1 0 0") ; dark background
; text-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new text (does not effect attributes, see below).
; Existing graphic objects are not effected by this keyword.
; DO NOT change the value of the index (first number)
;
-(text-color 9 "green" "green3" "0 1 0" 0 255 0) ; dark background
+(text-color 9 "green" "green3" "0 1 0") ; dark background
; bus-color index color_name outline_color ps_color_string
; int_red int_green int_blue
@@ -139,101 +128,90 @@
; To change existing buses use the override-bus-color
; DO NOT change the value of the index (first number)
;
-(bus-color 10 "green" "green3" "0 1 0" 0 255 0) ; dark background
+(bus-color 10 "green" "green3" "0 1 0") ; dark background
; select-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default selection color. This include the bounding box in window
; selects and when objects are selected.
; DO NOT change the value of the index (first number)
;
-(select-color 11 "orange" "orange" "null" -1 -1 -1) ; dark background
+(select-color 11 "orange" "orange" "null") ; dark background
; boundingbox-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default bounding box color. The bounding box color is displayed
; whenever you request that actions (move/copy/place) use a bounding box
; instead of the default outline.
; DO NOT change the value of the index (first number)
;
-(boundingbox-color 12 "orange" "orange" "null" -1 -1 -1) ; dark background
+(boundingbox-color 12 "orange" "orange" "null") ; dark background
; zoom-box-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default zoom box color. The zoom box color is displayed
; whenever you use the zoom window / box option.
; DO NOT change the value of the index (first number)
;
-(zoom-box-color 13 "cyan" "cyan" "null" -1 -1 -1) ; dark background
+(zoom-box-color 13 "cyan" "cyan" "null") ; dark background
; stroke-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default stroke color which is displayed when you draw a stroke.
; Basically this color specifies what the mouse droppings color
; DO NOT change the value of the index (first number)
;
-(stroke-color 14 "grey90" "grey90" "null" -1 -1 -1) ; dark background
+(stroke-color 14 "grey90" "grey90" "null") ; dark background
; lock-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default lock color which is used when you lock an object down
; DO NOT change the value of the index (first number)
;
-(lock-color 15 "grey" "darkgrey" ".75 .75 .75" 190 190 190) ; dark background
+(lock-color 15 "grey" "darkgrey" ".75 .75 .75") ; dark background
; output-color-background index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Specifies the color of the background of the output (color postscript file)
; - string is one of the valid colors
; - Only used if ouput-color is "enabled" (see above)
; DO NOT change the value of the index (first number)
;
-(output-color-background 16 "black" "null" "0 0 0" 0 0 0) ; dark background
+(output-color-background 16 "black" "null" "0 0 0") ; dark background
; override-net-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL nets
; New net color will be applied to all nets in any file which is opened and
; then saved. Comment out if you don't want to override the net color.
; DO NOT change the value of the index (first number)
;
-;(override-net-color 4 "blue" "blue3" "0 0 1" 0 0 255)
+;(override-net-color 4 "blue" "blue3" "0 0 1")
; override-pin-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL pins
; New pin color will be applied to all pin in any file which is opened and
; then saved. Comment out if you don't want to override the pin color.
; DO NOT change the value of the index (first number)
;
-;(override-pin-color 1 "white" "grey" "1 1 1" 255 255 255)
+;(override-pin-color 1 "white" "grey" "1 1 1")
; override-bus-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL buses
; New net color will be applied to all buses in any file which is opened and
; then saved. Comment out if you don't want to override the bus color.
; DO NOT change the value of the index (first number)
;
-;(override-bus-color 10 "green" "green3" "0 1 0" 0 255 0)
+;(override-bus-color 10 "green" "green3" "0 1 0")
; freestyle-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set a freestyle color which can be used in whatever context you want.
; However, care should be taken with this facility since users might
; change this colors at will.
;
-;(freestyle-color 17 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 18 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 19 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 20 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
+;(freestyle-color 17 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 18 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 19 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 20 "color_name" "dark_color_name" "0.0 0.0 0.0")
; junction-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default junction color.
; DO NOT change the value of the index (first number)
;
-(junction-color 21 "yellow" "yellow3" "1 1 0" 255 255 0) ; dark background
+(junction-color 21 "yellow" "yellow3" "1 1 0") ; dark background
;
; End of color related keywords
diff --git a/gschem/lib/gschem-lightbg b/gschem/lib/gschem-lightbg
index 1f17a31..e3db2a1 100644
--- a/gschem/lib/gschem-lightbg
+++ b/gschem/lib/gschem-lightbg
@@ -49,190 +49,174 @@
; the first string is the actual color name
; the second string is the outline color name
; the third string is the postscript color name
-; and the final 3 integers are the RGB values for PNG image files
;
; background-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default background color.
; DO NOT change the value of the index (first number)
;
-(background-color 0 "grey94" "null" "1 1 1" 255 255 255) ; light background
+(background-color 0 "grey94" "null" "1 1 1") ; light background
; pin-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new pins (does not effect existing pins).
; To change existing pins use the override-pin-color
; DO NOT change the value of the index (first number)
;
-(pin-color 1 "black" "grey30" "0 0 0" 0 0 0) ; light background
+(pin-color 1 "black" "grey30" "0 0 0") ; light background
; net-endpoint-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default net endpoint color.
; DO NOT change the value of the index (first number)
;
-(net-endpoint-color 2 "red" "red3" "1 0 0" 255 0 0) ; light background
+(net-endpoint-color 2 "red" "red3" "1 0 0") ; light background
; graphic-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default graphics color. All new Lines, Boxes, Circles, and Arcs
; are effected by this keyword. Existing graphic objects are not effected
; by this keyword.
; DO NOT change the value of the index (first number)
;
-(graphic-color 3 "green4" "green4" "0 .54 0" 0 139 0) ; light background
+(graphic-color 3 "green4" "green4" "0 .54 0") ; light background
; net-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new nets (does not effect existing nets).
; To change existing nets use the override-net-color
; DO NOT change the value of the index (first number)
;
-(net-color 4 "blue2" "blue3" "0 0 1" 0 0 255) ; light background
+(net-color 4 "blue2" "blue3" "0 0 1") ; light background
; attribute-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the color of attributes. Attributes are any object associated with
; another with the 'Attach Attribute' command.
; DO NOT change the value of the index (first number)
;
-(attribute-color 5 "black" "grey30" "0 0 0" 0 0 0) ; light background
+(attribute-color 5 "black" "grey30" "0 0 0") ; light background
; logic-bubble-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of logic bubbles / circles.
; DO NOT change the value of the index (first number)
;
-(logic-bubble-color 6 "DarkCyan" "DarkCyan" "0 .54 .54" 0 139 139) ; light bg
+(logic-bubble-color 6 "DarkCyan" "DarkCyan" "0 .54 .54") ; light bg
; grid-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the default grid color.
; DO NOT change the value of the index (first number)
;
-(grid-color 7 "grey50" "null" "null" -1 -1 -1) ; light background
+(grid-color 7 "grey50" "null" "null") ; light background
; detached-attribute-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of detached attributes. Detached attributes are just
; text items which were attributes at one time. Detached attributes
; are created in conjunction with the 'Detach Attribute' command.
; DO NOT change the value of the index (first number)
;
-(detached-attribute-color 8 "red" "red3" "1 0 0" 255 0 0) ; light background
+(detached-attribute-color 8 "red" "red3" "1 0 0") ; light background
; text-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the color of any new text (does not effect attributes, see below).
; Existing graphic objects are not effected by this keyword.
; DO NOT change the value of the index (first number)
;
-(text-color 9 "green4" "green4" "0 .54 0" 0 139 0) ; light background
+(text-color 9 "green4" "green4" "0 .54 0") ; light background
; bus-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the color of any new buses (does not effect existing buses).
; To change existing buses use the override-bus-color
; DO NOT change the value of the index (first number)
;
-(bus-color 10 "green2" "green3" "0 .9333 0" 0 238 0) ; light background
+(bus-color 10 "green2" "green3" "0 .9333 0") ; light background
; select-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the default selection color. This include the bounding box in window
; selects and when objects are selected.
; DO NOT change the value of the index (first number)
;
-(select-color 11 "firebrick" "firebrick" "null" -1 -1 -1) ; light background
+(select-color 11 "firebrick" "firebrick" "null") ; light background
; boundingbox-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the default bounding box color. The bounding box color is displayed
; whenever you request that actions (move/copy/place) use a bounding box
; instead of the default outline.
; DO NOT change the value of the index (first number)
;
-(boundingbox-color 12 "orange" "orange" "null" -1 -1 -1) ; light background
+(boundingbox-color 12 "orange" "orange" "null") ; light background
; zoom-box-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default zoom box color. The zoom box color is displayed
; whenever you use the zoom window / box option.
; DO NOT change the value of the index (first number)
;
-(zoom-box-color 13 "DarkCyan" "DarkCyan" "null" -1 -1 -1) ; light background
+(zoom-box-color 13 "DarkCyan" "DarkCyan" "null") ; light background
; stroke-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Set the default stroke color which is displayed when you draw a stroke.
; Basically this color specifies what the mouse droppings color
; DO NOT change the value of the index (first number)
;
-(stroke-color 14 "purple" "purple" "null" -1 -1 -1) ; light background
+(stroke-color 14 "purple" "purple" "null") ; light background
; lock-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default lock color which is used when you lock an object down
; DO NOT change the value of the index (first number)
;
-(lock-color 15 "grey40" "darkgrey" ".4 .4 .4" 102 102 102) ; light background
+(lock-color 15 "grey40" "darkgrey" ".4 .4 .4") ; light background
; output-color-background index color_name outline_color ps_color_string
-; int_red int_green int_blue
+
; Specifies the color of the background of the output (color postscript file)
; - string is one of the valid colors
; - Only used if ouput-color is "enabled" (see above)
; DO NOT change the value of the index (first number)
;
-(output-color-background 16 "white" "null" "1 1 1" 255 255 255) ; light back
+(output-color-background 16 "white" "null" "1 1 1") ; light back
; override-net-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL nets
; New net color will be applied to all nets in any file which is opened and
; then saved. Comment out if you don't want to override the net color.
; DO NOT change the value of the index (first number)
;
-;(override-net-color 4 "blue" "blue3" "0 0 1" 0 0 255)
+;(override-net-color 4 "blue" "blue3" "0 0 1")
; override-pin-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL pins
; New pin color will be applied to all pin in any file which is opened and
; then saved. Comment out if you don't want to override the pin color.
; DO NOT change the value of the index (first number)
;
-;(override-pin-color 1 "white" "grey" "1 1 1" 255 255 255)
+;(override-pin-color 1 "white" "grey" "1 1 1")
; override-bus-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Override the color of ALL buses
; New net color will be applied to all buses in any file which is opened and
; then saved. Comment out if you don't want to override the bus color.
; DO NOT change the value of the index (first number)
;
-;(override-bus-color 10 "green" "green3" "0 1 0" 0 255 0)
+;(override-bus-color 10 "green" "green3" "0 1 0")
; freestyle-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set a freestyle color which can be used in whatever context you want.
; However, care should be taken with this facility since users might
; change this colors at will.
;
-;(freestyle-color 17 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 18 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 19 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
-;(freestyle-color 20 "color_name" "dark_color_name" "0.0 0.0 0.0" 0 0 0)
+;(freestyle-color 17 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 18 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 19 "color_name" "dark_color_name" "0.0 0.0 0.0")
+;(freestyle-color 20 "color_name" "dark_color_name" "0.0 0.0 0.0")
; junction-color index color_name outline_color ps_color_string
-; int_red int_green int_blue
; Set the default junction color.
; DO NOT change the value of the index (first number)
;
-(junction-color 21 "purple" "purple3" ".627 .125 .941" 160 32 240)
+(junction-color 21 "purple" "purple3" ".627 .125 .941")
; light background
;
diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c
index c355fda..0a3c6a7 100644
--- a/gschem/src/g_rc.c
+++ b/gschem/src/g_rc.c
@@ -102,17 +102,14 @@ SCM g_rc_gschem_version(SCM version)
*
*/
static SCM g_rc_color_general(SCM index, SCM color, SCM outline_color,
- SCM ps_color, SCM ir, SCM ig, SCM ib,
- const char *rc_name, int *color_var)
+ SCM ps_color, const char *rc_name,
+ int *color_var)
{
int status;
int color_index;
char *color_name;
char *outline_color_name;
char *ps_color_string;
- int image_red;
- int image_green;
- int image_blue;
SCM ret;
SCM_ASSERT (scm_is_integer (index), index, SCM_ARG1, rc_name);
@@ -121,26 +118,18 @@ static SCM g_rc_color_general(SCM index, SCM color, SCM outline_color,
outline_color, SCM_ARG3, rc_name);
SCM_ASSERT (scm_is_string (ps_color), ps_color,
SCM_ARG4, rc_name);
- SCM_ASSERT (scm_is_integer (ir), ir, SCM_ARG5, rc_name);
- SCM_ASSERT (scm_is_integer (ig), ig, SCM_ARG6, rc_name);
- SCM_ASSERT (scm_is_integer (ib), ib, SCM_ARG7, rc_name);
color_index = scm_to_int (index);
color_name = SCM_STRING_CHARS (color);
outline_color_name = SCM_STRING_CHARS (outline_color);
ps_color_string = SCM_STRING_CHARS (ps_color);
- image_red = scm_to_int (ir);
- image_green = scm_to_int (ig);
- image_blue = scm_to_int (ib);
status = s_color_request (color_index, color_name, outline_color_name,
- ps_color_string,
- image_red, image_green, image_blue);
+ ps_color_string);
#if DEBUG
- printf("%d %s %s %s %d %d %d\n", color_index, color_name,
- outline_color_name, ps_color_string,
- image_red, image_green, image_blue);
+ printf("%d %s %s %s\n", color_index, color_name,
+ outline_color_name, ps_color_string);
#endif
/* invalid color? */
@@ -159,11 +148,10 @@ static SCM g_rc_color_general(SCM index, SCM color, SCM outline_color,
}
#define DEFINE_G_RC_COLOR(func, rc, var) \
-SCM func(SCM index, SCM color, SCM outline_color, SCM ps_color, \
- SCM ir, SCM ig, SCM ib) \
+SCM func(SCM index, SCM color, SCM outline_color, SCM ps_color) \
{ \
return g_rc_color_general(index, color, outline_color, \
- ps_color, ir, ig, ib, (rc), &(var)); \
+ ps_color, (rc), &(var)); \
}
DEFINE_G_RC_COLOR(g_rc_override_net_color,
diff --git a/gschem/src/g_register.c b/gschem/src/g_register.c
index 8b5765b..6a97f3c 100644
--- a/gschem/src/g_register.c
+++ b/gschem/src/g_register.c
@@ -51,28 +51,28 @@ static struct gsubr_t gschem_funcs[] = {
/* rc file */
{ "gschem-version", 1, 0, 0, g_rc_gschem_version },
- { "override-net-color", 7, 0, 0, g_rc_override_net_color },
- { "override-bus-color", 7, 0, 0, g_rc_override_bus_color },
- { "override-pin-color", 7, 0, 0, g_rc_override_pin_color },
- { "attribute-color", 7, 0, 0, g_rc_attribute_color },
- { "detached-attribute-color", 7, 0, 0, g_rc_detachedattr_color },
- { "text-color", 7, 0, 0, g_rc_text_color },
- { "logic-bubble-color", 7, 0, 0, g_rc_logic_bubble_color },
- { "lock-color", 7, 0, 0, g_rc_lock_color },
- { "zoom-box-color", 7, 0, 0, g_rc_zoom_box_color },
- { "net-color", 7, 0, 0, g_rc_net_color },
- { "bus-color", 7, 0, 0, g_rc_bus_color },
- { "pin-color", 7, 0, 0, g_rc_pin_color },
- { "graphic-color", 7, 0, 0, g_rc_graphic_color },
- { "grid-color", 7, 0, 0, g_rc_grid_color },
- { "background-color", 7, 0, 0, g_rc_background_color },
- { "select-color", 7, 0, 0, g_rc_select_color },
- { "boundingbox-color", 7, 0, 0, g_rc_boundingbox_color },
- { "net-endpoint-color", 7, 0, 0, g_rc_net_endpoint_color },
- { "junction-color", 7, 0, 0, g_rc_junction_color },
- { "stroke-color", 7, 0, 0, g_rc_stroke_color },
- { "output-color-background", 7, 0, 0, g_rc_output_color_background },
- { "freestyle-color", 7, 0, 0, g_rc_freestyle_color },
+ { "override-net-color", 4, 0, 0, g_rc_override_net_color },
+ { "override-bus-color", 4, 0, 0, g_rc_override_bus_color },
+ { "override-pin-color", 4, 0, 0, g_rc_override_pin_color },
+ { "attribute-color", 4, 0, 0, g_rc_attribute_color },
+ { "detached-attribute-color", 4, 0, 0, g_rc_detachedattr_color },
+ { "text-color", 4, 0, 0, g_rc_text_color },
+ { "logic-bubble-color", 4, 0, 0, g_rc_logic_bubble_color },
+ { "lock-color", 4, 0, 0, g_rc_lock_color },
+ { "zoom-box-color", 4, 0, 0, g_rc_zoom_box_color },
+ { "net-color", 4, 0, 0, g_rc_net_color },
+ { "bus-color", 4, 0, 0, g_rc_bus_color },
+ { "pin-color", 4, 0, 0, g_rc_pin_color },
+ { "graphic-color", 4, 0, 0, g_rc_graphic_color },
+ { "grid-color", 4, 0, 0, g_rc_grid_color },
+ { "background-color", 4, 0, 0, g_rc_background_color },
+ { "select-color", 4, 0, 0, g_rc_select_color },
+ { "boundingbox-color", 4, 0, 0, g_rc_boundingbox_color },
+ { "net-endpoint-color", 4, 0, 0, g_rc_net_endpoint_color },
+ { "junction-color", 4, 0, 0, g_rc_junction_color },
+ { "stroke-color", 4, 0, 0, g_rc_stroke_color },
+ { "output-color-background", 4, 0, 0, g_rc_output_color_background },
+ { "freestyle-color", 4, 0, 0, g_rc_freestyle_color },
{ "net-endpoint-mode", 1, 0, 0, g_rc_net_endpoint_mode },
{ "net-midpoint-mode", 1, 0, 0, g_rc_net_midpoint_mode },
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 4b1b524..0c3ec4c 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -360,7 +360,7 @@ gchar *s_clib_symbol_get_data_by_name (const gchar *name);
GList *s_toplevel_get_symbols (const TOPLEVEL *toplevel);
/* s_color.c */
-int s_color_request(int color_index, char *color_name, char *outline_color_name, char *ps_color_string, int image_red, int image_green, int image_blue);
+int s_color_request(int color_index, char *color_name, char *outline_color_name, char *ps_color_string);
void s_color_destroy_all(void);
/* s_conn.c */
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index 4138482..529cd2d 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -646,7 +646,6 @@ struct st_color {
char *color_name;
char *outline_color_name;
char *ps_color_string;
- int image_red, image_green, image_blue;
GdkColor *gdk_color;
GdkColor *gdk_outline_color;
diff --git a/libgeda/src/s_color.c b/libgeda/src/s_color.c
index 974bfc2..526e747 100644
--- a/libgeda/src/s_color.c
+++ b/libgeda/src/s_color.c
@@ -46,9 +46,6 @@ void s_color_init(void)
colors[i].color_name = NULL;
colors[i].outline_color_name = NULL;
colors[i].ps_color_string = NULL;
- colors[i].image_red = -1;
- colors[i].image_green = -1;
- colors[i].image_blue = -1;
colors[i].gdk_color = NULL;
colors[i].gdk_outline_color = NULL;
}
@@ -63,8 +60,7 @@ void s_color_init(void)
/* you are allowed to call this function with the same color index again and */
/* and again, last call is the final color request */
int s_color_request(int color_index, char *color_name,
- char *outline_color_name, char *ps_color_string,
- int image_red, int image_green, int image_blue)
+ char *outline_color_name, char *ps_color_string)
{
#if 0
@@ -95,10 +91,6 @@ int s_color_request(int color_index, char *color_name,
} else {
colors[color_index].ps_color_string = NULL;
}
-
- colors[color_index].image_red = image_red;
- colors[color_index].image_green = image_green;
- colors[color_index].image_blue = image_blue;
return(0);
}
@@ -115,9 +107,6 @@ void s_color_destroy_all(void)
g_free(colors[i].color_name);
g_free(colors[i].outline_color_name);
g_free(colors[i].ps_color_string);
- colors[i].image_red = -1;
- colors[i].image_green = -1;
- colors[i].image_blue = -1;
/* free the colors */
}
}
commit ee89ff1fbf0364843861c0797bb4f0d3a425e5fe
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 20:09:09 2008 +0100
libgeda: Remove COLOR.image_color and two unused functions.
The image_color member of the COLOR struct is never used. Remove it.
Similarly, the s_color_get_name() and s_color_image_int() are unused
and therefore removed by this patch.
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index d99ed68..4b1b524 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -362,8 +362,6 @@ GList *s_toplevel_get_symbols (const TOPLEVEL *toplevel);
/* s_color.c */
int s_color_request(int color_index, char *color_name, char *outline_color_name, char *ps_color_string, int image_red, int image_green, int image_blue);
void s_color_destroy_all(void);
-int s_color_image_int(int color);
-int s_color_get_name(int index, char *string);
/* s_conn.c */
CONN *s_conn_return_new(OBJECT *other_object, int type, int x, int y, int whichone, int other_whichone);
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index 87aeb49..4138482 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -650,7 +650,6 @@ struct st_color {
GdkColor *gdk_color;
GdkColor *gdk_outline_color;
- int image_color;
};
diff --git a/libgeda/src/s_color.c b/libgeda/src/s_color.c
index ea7236c..974bfc2 100644
--- a/libgeda/src/s_color.c
+++ b/libgeda/src/s_color.c
@@ -51,7 +51,6 @@ void s_color_init(void)
colors[i].image_blue = -1;
colors[i].gdk_color = NULL;
colors[i].gdk_outline_color = NULL;
- colors[i].image_color = 0;
}
}
@@ -119,7 +118,6 @@ void s_color_destroy_all(void)
colors[i].image_red = -1;
colors[i].image_green = -1;
colors[i].image_blue = -1;
- colors[i].image_color = 0;
/* free the colors */
}
}
@@ -137,41 +135,3 @@ char *s_color_ps_string(int color)
return(NULL);
}
}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-int s_color_image_int(int color)
-{
- if (colors[color].image_color != -1) {
- return(colors[color].image_color);
- } else {
- return(0);
- }
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-int s_color_get_name(int index, char *string)
-{
- if (index > MAX_COLORS) {
- return(FALSE);
- }
-
- /* only if these two variables are not null is the color settable */
- if (colors[index].color_name && colors[index].outline_color_name) {
- if (string) {
- strcpy(string, colors[index].color_name);
- }
- return(TRUE);
- }
-
- string[0] = '\0';
- /* didn't find a color, but there still might be more */
- return(-1);
-}
commit bbe251bc64ed2db2976a26116d22a69fe678b9fd
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Oct 25 18:57:16 2008 +0100
Get rid of s_color_get_index().
This function is very clearly the Wrong Thing, and could potentially
result in incorrect color indices ending up in schematic files if two
or more color map entries have the same value.
This patch removes the function entirely, and modifies the Scheme code
which uses it to simply pass color indices around instead. Note that
the results of s_color_get_index() were never actually *used* in the
existing code.
diff --git a/gschem/scheme/auto-place-attribs.scm b/gschem/scheme/auto-place-attribs.scm
index be0f623..6d52a8d 100644
--- a/gschem/scheme/auto-place-attribs.scm
+++ b/gschem/scheme/auto-place-attribs.scm
@@ -708,7 +708,7 @@
(get-point-of-bound "min-y" new-attrib-bounds))))
)
(set-attribute-text-properties! attribute
- "" ; keep previous color
+ -1 ; keep previous color
-1 ; keep previous size
new-alignment
new-angle
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index a614563..32ff026 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -247,7 +247,7 @@ SCM g_get_pin_ends(SCM object)
*/
/*
* Sets several text properties of the given <B>attribute smob</B>:
- - <B>colorname</B>: The colorname of the text, or "" to keep previous color.
+ - <B>coloridx</B>: The index of the text color, or -1 to keep previous color.
- <B>size</B>: Size (numeric) of the text, or -1 to keep the previous size.
- <B>alignment</B>: String with the alignment of the text. Possible values are:
* "" : Keep the previous alignment.
@@ -263,7 +263,7 @@ SCM g_get_pin_ends(SCM object)
- <B>rotation</B>: Angle of the text, or -1 to keep previous angle.
- <B>x</B>, <B>y</B>: Coords of the text.
*/
-SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_colorname,
+SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_coloridx,
SCM scm_size, SCM scm_alignment,
SCM scm_rotation, SCM scm_x, SCM scm_y)
{
@@ -273,15 +273,14 @@ SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_colorname,
GSCHEM_TOPLEVEL *w_current = global_window_current;
TOPLEVEL *toplevel = w_current->toplevel;
- char *colorname=NULL;
- int color=0;
+ int color = -1;
int size = -1;
char *alignment_string;
int alignment = -2;
int rotation = 0;
int x = -1, y = -1;
- SCM_ASSERT (scm_is_string(scm_colorname), scm_colorname,
+ SCM_ASSERT (scm_is_integer(scm_coloridx), scm_coloridx,
SCM_ARG2, "set-attribute-text-properties!");
SCM_ASSERT ( scm_is_integer(scm_size),
scm_size, SCM_ARG3, "set-attribute-text-properties!");
@@ -294,16 +293,11 @@ SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_colorname,
SCM_ASSERT ( scm_is_integer(scm_y),
scm_y, SCM_ARG7, "set-attribute-text-properties!");
- colorname = SCM_STRING_CHARS(scm_colorname);
+ color = scm_to_int(scm_coloridx);
+
+ SCM_ASSERT ((color < -1 || color >= MAX_COLORS),
+ scm_coloridx, SCM_ARG2, "set-attribute-text-properties!");
- if (colorname && strlen(colorname) != 0) {
- SCM_ASSERT ( (color = s_color_get_index(colorname)) != -1,
- scm_colorname, SCM_ARG2, "set-attribute-text-properties!");
- }
- else {
- color = -1;
- }
-
size = scm_to_int(scm_size);
rotation = scm_to_int(scm_rotation);
x = scm_to_int(scm_x);
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index e314d07..d99ed68 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -364,7 +364,6 @@ int s_color_request(int color_index, char *color_name, char *outline_color_name,
void s_color_destroy_all(void);
int s_color_image_int(int color);
int s_color_get_name(int index, char *string);
-int s_color_get_index(char *string);
/* s_conn.c */
CONN *s_conn_return_new(OBJECT *other_object, int type, int x, int y, int whichone, int other_whichone);
diff --git a/libgeda/src/s_color.c b/libgeda/src/s_color.c
index 3cbdca7..ea7236c 100644
--- a/libgeda/src/s_color.c
+++ b/libgeda/src/s_color.c
@@ -175,28 +175,3 @@ int s_color_get_name(int index, char *string)
/* didn't find a color, but there still might be more */
return(-1);
}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- * \return The index of the given color name, -1 if index was not found.
- */
-int s_color_get_index(char *string)
-{
- int index;
-
- if (string == NULL) {
- return(-1);
- }
-
- for (index = 0; index < MAX_COLORS; index++) {
- if (strcasecmp(string, colors[index].color_name) == 0) {
- return (index);
- }
- }
-
- /* If the color was not found, return -1 */
- return (-1);
-
-}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs