[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.1.0-20070705-13-g3cf1cca)
The branch, master has been updated
via 3cf1cca33ed2e567b959ad8486cad0d4cdbb47e9 (commit)
from 4f245d7023eec872e5dd484530dff9a77ff77dfc (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/src/o_cue.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
=================
Commit Messages
=================
commit 3cf1cca33ed2e567b959ad8486cad0d4cdbb47e9
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jul 8 13:55:38 2007 -0400
Added some missing code to controlling junction color (more for #1746675)
:100644 100644 24ae595... 1724b44... M gschem/src/o_cue.c
=========
Changes
=========
commit 3cf1cca33ed2e567b959ad8486cad0d4cdbb47e9
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Sun Jul 8 13:55:38 2007 -0400
Added some missing code to controlling junction color (more for #1746675)
diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index 24ae595..1724b44 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -75,6 +75,21 @@ void o_cue_redraw_all(TOPLEVEL *w_current, OBJECT *head, gboolean draw_selected)
w_current->DONT_REDRAW = redraw_state;
}
+
+/*!
+ * \brief Set the color on the gc depending on the passed in color id
+ */
+static void o_cue_set_color(TOPLEVEL *w_current, int color)
+{
+ if (w_current->override_color != -1 ) {
+ gdk_gc_set_foreground(w_current->gc,
+ x_get_color(w_current->override_color));
+ } else {
+ gdk_gc_set_foreground(w_current->gc, x_get_color(color));
+ }
+}
+
+
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
@@ -141,14 +156,6 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
size = SCREENabs(w_current, CUE_BOX_SIZE);
x2size = 2 * size;
- if (w_current->override_color != -1 ) {
- gdk_gc_set_foreground(w_current->gc,
- x_get_color(w_current->override_color));
- } else {
- gdk_gc_set_foreground(w_current->gc,
- x_get_color(w_current->net_endpoint_color));
- }
-
WORLDtoSCREEN(w_current, x, y, &screen_x, &screen_y);
switch(type) {
@@ -157,6 +164,7 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
if (object->type == OBJ_NET) { /* only nets have these cues */
if (count < 1) { /* Didn't find anything connected there */
if (w_current->DONT_REDRAW == 0) {
+ o_cue_set_color(w_current, w_current->net_endpoint_color);
gdk_draw_rectangle(w_current->window,
w_current->gc, TRUE,
screen_x - size,
@@ -180,6 +188,7 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
size = SCREENabs(w_current, CUE_CIRCLE_LARGE_SIZE);
}
if (w_current->DONT_REDRAW == 0) {
+ o_cue_set_color(w_current, w_current->junction_color);
gdk_draw_arc(w_current->window, w_current->gc,
TRUE,
screen_x - size / 2,
@@ -207,6 +216,7 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
}
if (w_current->DONT_REDRAW == 0) {
+ o_cue_set_color(w_current, w_current->net_endpoint_color);
if (object->line->y[whichone] == object->line->y[otherone]) {
/* horizontal line */
if (object->line->x[whichone] <= object->line->x[otherone]) {
@@ -259,6 +269,7 @@ void o_cue_draw_lowlevel(TOPLEVEL *w_current, OBJECT *object, int whichone)
}
if (w_current->DONT_REDRAW == 0) {
+ o_cue_set_color(w_current, w_current->junction_color);
gdk_draw_arc(w_current->window, w_current->gc,
TRUE,
screen_x - size / 2,
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs