[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (0988aa477a816841dff9ddd766a3287ed5a5d728)



The branch, master has been updated
       via  0988aa477a816841dff9ddd766a3287ed5a5d728 (commit)
       via  3d23e695a45c4b7c5b3d2aaec4bb1d755b75227a (commit)
      from  94fab06336d1c89369cd25b498323dbb16ebe371 (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
=========

 src/flags.c            |   10 ++++++++--
 src/hid/common/flags.c |    3 ++-
 src/hid/lesstif/main.c |    9 +++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)


=================
 Commit Messages
=================

commit 0988aa477a816841dff9ddd766a3287ed5a5d728
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Lesstif: force widget update on grid unit change
    
    If the grid units change, force a redraw of the coordinates window
    and allow a resize.

:100644 100644 ad10772... 30739e9... M	src/hid/lesstif/main.c

commit 3d23e695a45c4b7c5b3d2aaec4bb1d755b75227a
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix unitless menu flags.
    
    Numbers without units are counting numbers in flags, not cmil.
    Also, cache the lookup of units in flags.c

:100644 100644 a4e5fe5... 954d94a... M	src/flags.c
:100644 100644 669b2ab... 92032f9... M	src/hid/common/flags.c

=========
 Changes
=========

commit 0988aa477a816841dff9ddd766a3287ed5a5d728
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Lesstif: force widget update on grid unit change
    
    If the grid units change, force a redraw of the coordinates window
    and allow a resize.

diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index ad10772..30739e9 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -2573,7 +2573,9 @@ idle_proc (XtPointer dummy)
   {
     static int c_x = -2, c_y = -2;
     static MarkType saved_mark;
+    static Unit *old_grid_unit = NULL;
     if (crosshair_x != c_x || crosshair_y != c_y
+	|| Settings.grid_unit != old_grid_unit
 	|| memcmp (&saved_mark, &Marked, sizeof (MarkType)))
       {
 	static int last_state = 0;
@@ -2611,6 +2613,13 @@ idle_proc (XtPointer dummy)
 	  }
 	memcpy (&saved_mark, &Marked, sizeof (MarkType));
 
+	if (old_grid_unit != Settings.grid_unit)
+	  {
+	    old_grid_unit = Settings.grid_unit;
+	    /* Force a resize on units change.  */
+	    last_state ++;
+	  }
+
 	/* This is obtuse.  We want to enable XmRESIZE_ANY long enough
 	   to shrink to fit the new format (if any), then switch it
 	   back to XmRESIZE_GROW to prevent it from shrinking due to

commit 3d23e695a45c4b7c5b3d2aaec4bb1d755b75227a
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix unitless menu flags.
    
    Numbers without units are counting numbers in flags, not cmil.
    Also, cache the lookup of units in flags.c

diff --git a/src/flags.c b/src/flags.c
index a4e5fe5..954d94a 100644
--- a/src/flags.c
+++ b/src/flags.c
@@ -74,13 +74,19 @@ FlagGridSize (int dummy)
 static int
 FlagUnitsMm (int dummy)
 {
-  return (Settings.grid_unit == get_unit_struct ("mm"));
+  static Unit *u = NULL;
+  if (u == NULL)
+    u = get_unit_struct ("mm");
+  return (Settings.grid_unit == u);
 }
 
 static int
 FlagUnitsMil (int dummy)
 {
-  return (Settings.grid_unit == get_unit_struct ("mil"));
+  static Unit *u = NULL;
+  if (u == NULL)
+    u = get_unit_struct ("mil");
+  return (Settings.grid_unit == u);
 }
 
 static int
diff --git a/src/hid/common/flags.c b/src/hid/common/flags.c
index 669b2ab..92032f9 100644
--- a/src/hid/common/flags.c
+++ b/src/hid/common/flags.c
@@ -114,7 +114,8 @@ hid_get_flag (const char *name)
 	}
       memcpy (buf, name, cp - name);
       buf[cp - name] = 0;
-      wv = GetValue (cp + 1, NULL, NULL);
+      /* A number without units is just a number.  */
+      wv = GetValueEx (cp + 1, NULL, NULL, NULL, NULL);
       f = hid_find_flag (buf);
       if (!f)
 	return 0;




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs