Changeset 5484
- Timestamp:
- 08/19/09 01:49:54 (4 years ago)
- Location:
- trunk/eda/fped
- Files:
-
- 5 edited
-
gui_inst.c (modified) (1 diff)
-
gui_style.c (modified) (2 diffs)
-
inst.c (modified) (3 diffs)
-
inst.h (modified) (2 diffs)
-
unparse.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eda/fped/gui_inst.c
r5461 r5484 112 112 if (selected_inst == self) 113 113 return mode_selected; 114 if (self->active) 115 return self->in_path ? mode_active_in_path : mode_active; 116 return self->in_path ? mode_inactive_in_path : mode_inactive; 114 return self->active ? mode_active : mode_inactive; 117 115 } 118 116 -
trunk/eda/fped/gui_style.c
r5423 r5484 50 50 51 51 static void style(GdkGC *gcs[mode_n], 52 const char *in, const char *in_path, const char *act, const char *act_path, 53 const char *sel) 52 const char *in, const char *act, const char *sel) 54 53 { 55 54 gcs[mode_inactive] = gc(in, 1); 56 gcs[mode_inactive_in_path] = gc(in_path, 1);57 55 gcs[mode_active] = gc(act, 1); 58 gcs[mode_active_in_path] = gc(act_path, 1);59 56 gcs[mode_selected] = gc(sel, 2); 60 57 } … … 66 63 gc_bg_error = gc("#000040", 0); 67 64 gc_drag = gc("#ffffff", 2); 68 /* inactive in+path active act+pathselected */69 style(gc_vec, "#202000", "# 404020", "#909040", "#c0c080", "#ffff80");70 style(gc_obj, "#006060", INVALID, "#00ffff", INVALID,"#ffff80");71 style(gc_pad, "#400000", INVALID, "#ff0000", INVALID,"#ffff80");72 style(gc_ptext, "#404040", INVALID, "#ffffff", INVALID,"#ffffff");73 style(gc_meas, "#280040", INVALID, "#ff00ff", INVALID,"#ffff80");74 style(gc_frame, "#004000", "# 205020", "#009000", INVALID,"#ffff80");65 /* inactive active selected */ 66 style(gc_vec, "#202000", "#b0b050", "#ffff80"); 67 style(gc_obj, "#006060", "#00ffff", "#ffff80"); 68 style(gc_pad, "#400000", "#ff0000", "#ffff80"); 69 style(gc_ptext, "#404040", "#ffffff", "#ffffff"); 70 style(gc_meas, "#280040", "#ff00ff", "#ffff80"); 71 style(gc_frame, "#004000", "#009000", "#ffff80"); 75 72 76 73 gc_active_frame = gc("#00ff00", 2); -
trunk/eda/fped/inst.c
r5482 r5484 128 128 129 129 130 static void set_path(int on)131 {132 struct inst *inst;133 return;134 if (inst->ops != &vec_ops && inst->ops != &frame_ops)135 return;136 /* @@@ wrong */137 for (inst = selected_inst; inst; inst = inst->outer) {138 if (inst->ops != &vec_ops && inst->ops != &frame_ops)139 break;140 inst->in_path = on;141 }142 }143 144 145 130 static void inst_select_inst(struct inst *inst) 146 131 { 147 132 selected_inst = inst; 148 set_path(1);149 133 tool_selected_inst(inst); 150 134 gui_frame_select_inst(inst); … … 316 300 { 317 301 if (selected_inst) { 318 set_path(0);319 302 tool_selected_inst(NULL); 320 303 gui_frame_deselect_inst(selected_inst); … … 449 432 inst->outer = curr_frame; 450 433 inst->active = IS_ACTIVE; 451 inst->in_path = 0;452 434 inst->next = NULL; 453 435 *curr_pkg->next_inst[prio] = inst; -
trunk/eda/fped/inst.h
r5482 r5484 24 24 enum mode { 25 25 mode_inactive, /* on inactive frame */ 26 mode_inactive_in_path, /* inactive but is in path to selected */27 26 mode_active, /* on active frame */ 28 mode_active_in_path, /* active and is in path to selected */29 27 mode_selected, /* item is selected */ 30 28 mode_hover, /* hovering over item's contact area */ … … 81 79 struct inst *outer; /* frame containing this item */ 82 80 int active; 83 int in_path;84 81 union { 85 82 struct { -
trunk/eda/fped/unparse.c
r5421 r5484 91 91 return stralloc(expr->u.var); 92 92 if (expr->op == op_minus) 93 return merge2("-", unparse_op(expr->u.op.a, prec_ add));93 return merge2("-", unparse_op(expr->u.op.a, prec_unary)); 94 94 if (expr->op == op_add) 95 95 return merge3(unparse_op(expr->u.op.a, prec_add), "+",
Note: See TracChangeset
for help on using the changeset viewer.
