Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r5774 - trunk/eda/fped (wer...@docs.openmoko.org)
   2. r5775 - trunk/gta02-core/docs (wer...@docs.openmoko.org)
   3. r5776 - trunk/eda/fped (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-01-03 00:58:03 +0100 (Sun, 03 Jan 2010)
New Revision: 5774

Modified:
   trunk/eda/fped/Makefile
   trunk/eda/fped/README
   trunk/eda/fped/TODO
Log:
The build process used dependencies only if they were explicitly generated. 
This often caused accidental builds without proper dependencies.

- Makefile: include .depend also if it doesn't exist yet. This way, GNU make
  will build it and all is fine.
- Makefile: use "-include" instead of "include" to avoid unnecessary nagging
- Makefile: make .depend depend on *.h and *.c, so that we catch all changes
  that _might_ affect the dependencies (this is a little inefficient but better
  safe than sorry)
- README: "make dep" is no longer needed
- TODO: added thoughts for more improvements



Modified: trunk/eda/fped/Makefile
===================================================================
--- trunk/eda/fped/Makefile     2010-01-02 23:27:36 UTC (rev 5773)
+++ trunk/eda/fped/Makefile     2010-01-02 23:58:03 UTC (rev 5774)
@@ -136,12 +136,10 @@
 
 # ----- Dependencies ----------------------------------------------------------
 
-dep depend .depend: lex.yy.c y.tab.h y.tab.c
+dep depend .depend: lex.yy.c y.tab.h y.tab.c *.h *.c
                $(DEPEND)
 
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
+-include .depend
 
 # ----- Cleanup ---------------------------------------------------------------
 

Modified: trunk/eda/fped/README
===================================================================
--- trunk/eda/fped/README       2010-01-02 23:27:36 UTC (rev 5773)
+++ trunk/eda/fped/README       2010-01-02 23:58:03 UTC (rev 5774)
@@ -46,7 +46,6 @@
 
 Compile:
 
-  make dep
   make
 
 Run an example:

Modified: trunk/eda/fped/TODO
===================================================================
--- trunk/eda/fped/TODO 2010-01-02 23:27:36 UTC (rev 5773)
+++ trunk/eda/fped/TODO 2010-01-02 23:58:03 UTC (rev 5774)
@@ -79,3 +79,8 @@
 - add a means to cut&paste and copy&paste objects, and perhaps also variables
   (to move objects, we need to make sure all references are included. besides
   that, copy&paste should be a slight variation of delete/undelete)
+- instead of blue screening, we could perhaps just skip the offending items and
+  replace them with a "here's a problem" marker that would still point to the
+  underlying object and allow repairs to be made
+- instead of the awkward lock-switch-anchor process for frame references, we
+  could just drag the frame name into the canvas




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-01-03 00:58:52 +0100 (Sun, 03 Jan 2010)
New Revision: 5775

Modified:
   trunk/gta02-core/docs/GETTING-STARTED
Log:
Fped no longer needs "mak dep".



Modified: trunk/gta02-core/docs/GETTING-STARTED
===================================================================
--- trunk/gta02-core/docs/GETTING-STARTED       2010-01-02 23:58:03 UTC (rev 
5774)
+++ trunk/gta02-core/docs/GETTING-STARTED       2010-01-02 23:58:52 UTC (rev 
5775)
@@ -87,7 +87,7 @@
   - Build and install it:
 
     cd fped
-    make dep all install
+    make all install
 
   - we're done here, go back
 




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-01-03 01:36:52 +0100 (Sun, 03 Jan 2010)
New Revision: 5776

Modified:
   trunk/eda/fped/TODO
   trunk/eda/fped/gui_frame.c
   trunk/eda/fped/gui_status.c
   trunk/eda/fped/gui_status.h
   trunk/eda/fped/inst.c
Log:
Added tooltips for editable status area items. All tools are now tipped.

- gui_status.h, gui_status.c (edit_*): edit functions now accept a tooltip
- added tooltips for editable status area items
- tooltips on setup_set_type_* looked strange. Show them only for the value
  field next to the type field.



Modified: trunk/eda/fped/TODO
===================================================================
--- trunk/eda/fped/TODO 2010-01-02 23:58:52 UTC (rev 5775)
+++ trunk/eda/fped/TODO 2010-01-03 00:36:52 UTC (rev 5776)
@@ -27,7 +27,6 @@
 - when changing the part, we should automatically switch to a configuration
   that generates any of its (non-global) elements
 - add zoom controls to top toolbar
-- add tooltips (in progress)
 
 Bugs:
 - default silk width has no business being hard-coded in obj.c

Modified: trunk/eda/fped/gui_frame.c
===================================================================
--- trunk/eda/fped/gui_frame.c  2010-01-02 23:58:52 UTC (rev 5775)
+++ trunk/eda/fped/gui_frame.c  2010-01-03 00:36:52 UTC (rev 5776)
@@ -541,11 +541,13 @@
 {
        inst_select_outside(var, unselect_var);
        label_in_box_bg(var->widget, COLOR_VAR_EDITING);
-       status_set_type_entry("Variable name", "name =");
+       status_set_type_entry(NULL, "name =");
        status_set_name("Variable name", "%s", var->name);
        edit_nothing();
        edit_unique_with_values(&var->name, validate_var_name, var,
-           set_values, user, max_values);
+           set_values, user, max_values,
+           "Variable name. "
+           "Shortcut:<b><i>name</i>=<i>value</i>,<i>...</i> </b>");
 }
 
 
@@ -578,7 +580,7 @@
        inst_select_outside(value, unselect_value);
        label_in_box_bg(value->widget, COLOR_EXPR_EDITING);
        edit_nothing();
-       edit_expr(&value->expr);
+       edit_expr(&value->expr, "Value");
 }
 
 
@@ -589,7 +591,7 @@
        inst_select_outside(value, unselect_value);
        label_in_box_bg(value->widget, COLOR_VAR_EDITING);
        edit_nothing();
-       edit_expr_list(value->expr, set_values, user);
+       edit_expr_list(value->expr, set_values, user, "Value(s)");
 }
 
 
@@ -1336,10 +1338,11 @@
        case 1:
                inst_select_outside(widget, unselect_pkg_name);
                label_in_box_bg(widget, COLOR_PART_NAME_EDITING);
-               status_set_type_entry("Package name", "package =");
+               status_set_type_entry(NULL, "package =");
                status_set_name("Package name (actual)", "%s", pkg_name);
                edit_nothing();
-               edit_name(&pkg_name, validate_pkg_name, NULL);
+               edit_name(&pkg_name, validate_pkg_name, NULL,
+                   "Package name (template)");
                break;
        }
        return TRUE;
@@ -1470,10 +1473,10 @@
        inst_select_outside(frame, unselect_frame);
        label_in_box_bg(frame->label, COLOR_FRAME_EDITING);
        tip = "Frame name";
-       status_set_type_entry(tip, "name =");
+       status_set_type_entry(NULL, "name =");
        status_set_name(tip, "%s", frame->name);
        edit_nothing();
-       edit_unique(&frame->name, validate_frame_name, frame);
+       edit_unique(&frame->name, validate_frame_name, frame, tip);
 }
 
 

Modified: trunk/eda/fped/gui_status.c
===================================================================
--- trunk/eda/fped/gui_status.c 2010-01-02 23:58:52 UTC (rev 5775)
+++ trunk/eda/fped/gui_status.c 2010-01-03 00:36:52 UTC (rev 5776)
@@ -159,8 +159,8 @@
 void status_set_xy(struct coord coord)
 {
        /* do dX/dY etc. stuff later */
-       status_set_type_x("Width", "X =");
-       status_set_type_y("Height", "Y =");
+       status_set_type_x(NULL, "X =");
+       status_set_type_y(NULL, "Y =");
 
        set_with_units(status_set_x, "", coord.x, "Width");
        set_with_units(status_set_y, "", coord.y, "Height");
@@ -301,7 +301,8 @@
 }
 
 
-static void setup_edit(GtkWidget *widget, struct edit_ops *ops, void *ctx)
+static void setup_edit(GtkWidget *widget, struct edit_ops *ops, void *ctx,
+    const char *tooltip)
 {
        gtk_object_set_data(GTK_OBJECT(widget), "edit-ops", ops);
        gtk_object_set_data(GTK_OBJECT(widget), "edit-ctx", ctx);
@@ -321,6 +322,7 @@
        else
                open_edits = widget;
        last_edit = widget;
+       gtk_widget_set_tooltip_markup(widget, tooltip);
 }
 
 
@@ -373,14 +375,14 @@
 
 
 void edit_unique(const char **s, int (*validate)(const char *s, void *ctx), 
-    void *ctx)
+    void *ctx, const char *tooltip)
 {
        static struct edit_unique_ctx unique_ctx;
 
        unique_ctx.s = s;
        unique_ctx.validate = validate;
        unique_ctx.ctx = ctx;
-       setup_edit(status_entry, &edit_ops_unique, &unique_ctx);
+       setup_edit(status_entry, &edit_ops_unique, &unique_ctx, tooltip);
 }
 
 
@@ -419,14 +421,14 @@
 
 
 void edit_unique_null(const char **s,
-    int (*validate)(const char *s, void *ctx), void *ctx)
+    int (*validate)(const char *s, void *ctx), void *ctx, const char *tooltip)
 {
        static struct edit_unique_ctx unique_ctx;
 
        unique_ctx.s = s;
        unique_ctx.validate = validate;
        unique_ctx.ctx = ctx;
-       setup_edit(status_entry, &edit_ops_null_unique, &unique_ctx);
+       setup_edit(status_entry, &edit_ops_null_unique, &unique_ctx, tooltip);
 }
 
 
@@ -490,7 +492,8 @@
 void edit_unique_with_values(const char **s,
     int (*validate)(const char *s, void *ctx), void *ctx,
     void (*set_values)(void *user, const struct value *values, int n_values),
-    void *user, int max_values)
+    void *user, int max_values,
+    const char *tooltip)
 {
        static struct edit_unique_with_values_ctx unique_ctx;
 
@@ -500,7 +503,8 @@
        unique_ctx.set_values = set_values;
        unique_ctx.user = user;
        unique_ctx.max_values = max_values;
-       setup_edit(status_entry, &edit_ops_unique_with_values, &unique_ctx);
+       setup_edit(status_entry, &edit_ops_unique_with_values, &unique_ctx,
+           tooltip);
 }
 
 
@@ -549,14 +553,15 @@
 };
 
 
-void edit_name(char **s, int (*validate)(const char *s, void *ctx), void *ctx)
+void edit_name(char **s, int (*validate)(const char *s, void *ctx), void *ctx,
+    const char *tooltip)
 {
        static struct edit_name_ctx name_ctx;
 
        name_ctx.s = s;
        name_ctx.validate = validate;
        name_ctx.ctx = ctx;
-       setup_edit(status_entry, &edit_ops_name, &name_ctx);
+       setup_edit(status_entry, &edit_ops_name, &name_ctx, tooltip);
 }
 
 
@@ -610,30 +615,31 @@
 };
 
 
-static void edit_any_expr(GtkWidget *widget, struct expr **expr)
+static void edit_any_expr(GtkWidget *widget, struct expr **expr,
+    const char *tooltip)
 {
-       setup_edit(widget, &edit_ops_expr, expr);
+       setup_edit(widget, &edit_ops_expr, expr, tooltip);
 }
 
 
-void edit_expr(struct expr **expr)
+void edit_expr(struct expr **expr, const char *tooltip)
 {
-       edit_any_expr(status_entry, expr);
+       edit_any_expr(status_entry, expr, tooltip);
 }
 
 
-void edit_x(struct expr **expr)
+void edit_x(struct expr **expr, const char *tooltip)
 {
        vacate_widget(status_box_x);
        gtk_container_add(GTK_CONTAINER(status_box_x), status_entry_x);
        gtk_widget_show(status_box_x);
-       edit_any_expr(status_entry_x, expr);
+       edit_any_expr(status_entry_x, expr, tooltip);
 }
 
 
-void edit_y(struct expr **expr)
+void edit_y(struct expr **expr, const char *tooltip)
 {
-       edit_any_expr(status_entry_y, expr);
+       edit_any_expr(status_entry_y, expr, tooltip);
 }
 
 
@@ -693,14 +699,14 @@
 
 void edit_expr_list(struct expr *expr,
     void (*set_values)(void *user, const struct value *values, int n_values),
-    void *user)
+    void *user, const char *tooltip)
 {
        static struct edit_expr_list_ctx expr_list_ctx;
 
        expr_list_ctx.expr = expr;
        expr_list_ctx.set_values = set_values;
        expr_list_ctx.user = user;
-       setup_edit(status_entry, &edit_ops_expr_list, &expr_list_ctx);
+       setup_edit(status_entry, &edit_ops_expr_list, &expr_list_ctx, tooltip);
 }
 
 

Modified: trunk/eda/fped/gui_status.h
===================================================================
--- trunk/eda/fped/gui_status.h 2010-01-02 23:58:52 UTC (rev 5775)
+++ trunk/eda/fped/gui_status.h 2010-01-03 00:36:52 UTC (rev 5776)
@@ -34,20 +34,21 @@
 void edit_pad_type(enum pad_type *type);
 
 void edit_unique(const char **s, int (*validate)(const char *s, void *ctx),
-    void *ctx);
+    void *ctx, const char *tooltip);
 void edit_unique_null(const char **s, int (*validate)(const char *s, void 
*ctx),
-    void *ctx);
+    void *ctx, const char *tooltip);
 void edit_unique_with_values(const char **s,
     int (*validate)(const char *s, void *ctx), void *ctx,
     void (*set_values)(void *user, const struct value *values, int n_values),
-    void *user, int max_values);
-void edit_name(char **s, int (*validate)(const char *s, void *ctx), void *ctx);
-void edit_expr(struct expr **expr);
+    void *user, int max_values, const char *tooltip);
+void edit_name(char **s, int (*validate)(const char *s, void *ctx), void *ctx,
+    const char *tooltip);
+void edit_expr(struct expr **expr, const char *tooltip);
 void edit_expr_list(struct expr *expr,
     void (*set_values)(void *user, const struct value *values, int n_values),
-    void *user);
-void edit_x(struct expr **expr);
-void edit_y(struct expr **expr);
+    void *user, const char *tooltip);
+void edit_x(struct expr **expr, const char *tooltip);
+void edit_y(struct expr **expr, const char *tooltip);
 void edit_nothing(void);
 
 void set_with_units(void (*set)(const char *tooltip, const char *fmt, ...),

Modified: trunk/eda/fped/inst.c
===================================================================
--- trunk/eda/fped/inst.c       2010-01-02 23:58:52 UTC (rev 5775)
+++ trunk/eda/fped/inst.c       2010-01-03 00:36:52 UTC (rev 5776)
@@ -492,9 +492,8 @@
        }
        set_with_units(status_set_r, "d = ", diag, "Length of diagonal");
        if (width != -1) {
-               tip = "Line width";
-               status_set_type_entry(tip, "width =");
-               set_with_units(status_set_name, "", width, tip);
+               status_set_type_entry(NULL, "width =");
+               set_with_units(status_set_name, "", width, "Line width");
        }
 }
 
@@ -573,19 +572,17 @@
 
 static void vec_edit(struct vec *vec)
 {
-       edit_x(&vec->x);
-       edit_y(&vec->y);
-       edit_unique_null(&vec->name, validate_vec_name, vec);
+       edit_x(&vec->x, "X distance");
+       edit_y(&vec->y, "Y distance");
+       edit_unique_null(&vec->name, validate_vec_name, vec, "Vector name");
 }
 
 
 static void vec_op_select(struct inst *self)
 {
-       const char *tip;
-
-       tip = "Vector reference (name)";
-       status_set_type_entry(tip, "ref =");
-       status_set_name(tip, "%s", self->vec->name ? self->vec->name : "");
+       status_set_type_entry(NULL, "ref =");
+       status_set_name("Vector reference (name)",
+           "%s", self->vec->name ? self->vec->name : "");
        rect_status(self->base, self->u.vec.end, -1, 0);
        vec_edit(self->vec);
 }
@@ -710,7 +707,7 @@
 
 static void obj_line_edit(struct obj *obj)
 {
-       edit_expr(&obj->u.line.width);
+       edit_expr(&obj->u.line.width, "Line width");
 }
 
 
@@ -760,7 +757,7 @@
 
 static void obj_rect_edit(struct obj *obj)
 {
-       edit_expr(&obj->u.rect.width);
+       edit_expr(&obj->u.rect.width, "Line width");
 }
 
 
@@ -814,13 +811,14 @@
 static void obj_pad_edit(struct obj *obj)
 {
        edit_pad_type(&obj->u.pad.type);
-       edit_name(&obj->u.pad.name, validate_pad_name, NULL);
+       edit_name(&obj->u.pad.name, validate_pad_name, NULL,
+           "Pad name (template)");
 }
 
 
 static void pad_op_select(struct inst *self)
 {
-       status_set_type_entry("Pad name", "label =");
+       status_set_type_entry(NULL, "label =");
        status_set_name("Pad name (actual)", "%s", self->u.pad.name);
        rect_status(self->base, self->u.pad.other, -1, 0);
        obj_pad_edit(self->obj);
@@ -848,7 +846,7 @@
 
 static void rpad_op_select(struct inst *self)
 {
-       status_set_type_entry("Pad name", "label =");
+       status_set_type_entry(NULL, "label =");
        status_set_name("Pad name (actual)", "%s", self->u.pad.name);
        rect_status(self->base, self->u.pad.other, -1, 1);
        obj_pad_edit(self->obj);
@@ -886,22 +884,19 @@
 
 static void obj_arc_edit(struct obj *obj)
 {
-       edit_expr(&obj->u.arc.width);
+       edit_expr(&obj->u.arc.width, "Line width");
 }
 
 
 static void arc_op_select(struct inst *self)
 {
-       const char *tip;
-
        status_set_xy(self->base);
        status_set_angle("Angle", "a = %3.1f deg",
            self->u.arc.a1 == self->u.arc.a2 ? 360 :
            self->u.arc.a2-self->u.arc.a1);
        set_with_units(status_set_r, "r = ", self->u.arc.r, "Radius");
-       tip = "Line width";
-       status_set_type_entry(tip, "width =");
-       set_with_units(status_set_name, "", self->u.arc.width, tip);
+       status_set_type_entry(NULL, "width =");
+       set_with_units(status_set_name, "", self->u.arc.width, "Line width");
        obj_arc_edit(self->obj);
 }
 
@@ -962,18 +957,16 @@
 
 static void obj_meas_edit(struct obj *obj)
 {
-       edit_expr(&obj->u.meas.offset);
+       edit_expr(&obj->u.meas.offset, "Measurement line offset");
 }
 
 
 static void meas_op_select(struct inst *self)
 {
-       const char *tip;
-
        rect_status(self->bbox.min, self->bbox.max, -1, 0);
-       tip = "Measurement line offset";
-       status_set_type_entry(tip, "offset =");
-       set_with_units(status_set_name, "", self->u.meas.offset, tip);
+       status_set_type_entry(NULL, "offset =");
+       set_with_units(status_set_name, "", self->u.meas.offset,
+           "Measurement line offset");
        obj_meas_edit(self->obj);
 }
 
@@ -1096,12 +1089,9 @@
 
 static void frame_op_select(struct inst *self)
 {
-       const char *tip;
-
-       tip = "Frame name";
        rect_status(self->bbox.min, self->bbox.max, -1, 0);
-       status_set_type_entry(tip, "name =");
-       status_set_name(tip, "%s", self->u.frame.ref->name);
+       status_set_type_entry(NULL, "name =");
+       status_set_name("Frame name", "%s", self->u.frame.ref->name);
 }
 
 




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to