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

gEDA-cvs: pcb.git: branch: master updated (9071e457cf209a9e3d64f2645610ed0b93a4161f)



The branch, master has been updated
       via  9071e457cf209a9e3d64f2645610ed0b93a4161f (commit)
       via  d169b664c76ed589147bccd8461b7688df8bcde6 (commit)
       via  15f6f449143f65e564c33e4f63533ece1ec5ac87 (commit)
       via  ac5474faec1d4600a50cca1514f7ff6fad1a18aa (commit)
      from  b5818f0cb6f0647559b6265aaad8d4519670584e (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/Makefile.am                 |    3 +
 src/action.c                    |   36 +-
 src/find.c                      |  509 +++++++++++++++++----
 src/global.h                    |   17 +
 src/gpcb-menu.res               |    1 +
 src/hid.h                       |   12 +
 src/hid/batch/batch.c           |    3 +-
 src/hid/bom/bom.c               |    1 +
 src/hid/common/hidnogui.c       |    4 +-
 src/hid/gerber/gerber.c         |    4 +-
 src/hid/gtk/gtkhid-main.c       |   29 +-
 src/hid/gtk/gui-config.c        |    2 +
 src/hid/gtk/gui-drc-window.c    |  985 +++++++++++++++++++++++++++++++++++++++
 src/hid/gtk/gui-drc-window.h    |  102 ++++
 src/hid/gtk/gui-render-pixmap.c |   94 ++++
 src/hid/gtk/gui.h               |   17 +
 src/hid/lesstif/main.c          |    3 +-
 src/hid/lpr/lpr.c               |    3 +-
 src/hid/nelma/nelma.c           |    3 +-
 src/hid/png/png.c               |    3 +-
 src/hid/ps/eps.c                |    4 +-
 src/hid/ps/ps.c                 |    3 +-
 22 files changed, 1720 insertions(+), 118 deletions(-)
 create mode 100644 src/hid/gtk/gui-drc-window.c
 create mode 100644 src/hid/gtk/gui-drc-window.h
 create mode 100644 src/hid/gtk/gui-render-pixmap.c


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

commit 9071e457cf209a9e3d64f2645610ed0b93a4161f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Fix cursor warping on flipped boards

:100644 100644 e6d5226... abf0b3c... M	src/hid/gtk/gtkhid-main.c

commit d169b664c76ed589147bccd8461b7688df8bcde6
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Add preview images in the drc violations window

:100644 100644 3de6006... 270613c... M	src/Makefile.am
:100644 100644 a3ea4a5... 83247e8... M	src/hid/gtk/gui-drc-window.c
:100644 100644 04a221b... f48a944... M	src/hid/gtk/gui-drc-window.h
:000000 100644 0000000... 525bde6... A	src/hid/gtk/gui-render-pixmap.c
:100644 100644 7da320d... c94c2a3... M	src/hid/gtk/gui.h

commit 15f6f449143f65e564c33e4f63533ece1ec5ac87
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Add DRC list window using the new DRC_GUI hooks.

:100644 100644 944eea8... 3de6006... M	src/Makefile.am
:100644 100644 3abbcdc... e6d5226... M	src/hid/gtk/gtkhid-main.c
:100644 100644 1b50d32... 23c3164... M	src/hid/gtk/gui-config.c
:000000 100644 0000000... a3ea4a5... A	src/hid/gtk/gui-drc-window.c
:000000 100644 0000000... 04a221b... A	src/hid/gtk/gui-drc-window.h
:100644 100644 0b4eb21... 7da320d... M	src/hid/gtk/gui.h

commit ac5474faec1d4600a50cca1514f7ff6fad1a18aa
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Refactor DRC reporting to work around a DrcViolationType structure.
    
    Add hooks to the HID structure allowing a GUI to consume this data
    directly (if it wants), rather than being called to display ordinary
    message dialog boxes. No HID yet utilises this interface.
    
    Remove log messages for individual design rule violations, instead
    writing log entries based on the title in the DrcViolationType. This
    modifies some of the logged messages slightly. All now prefix:
    "WARNING!  Design Rule error - ", as was present on some of the old
    messges.

:100644 100644 3f2e74d... ab47e87... M	src/action.c
:100644 100644 766762c... 97424ce... M	src/find.c
:100644 100644 93af49b... 3c383be... M	src/global.h
:100644 100644 2dcf4b8... 6cde1f0... M	src/gpcb-menu.res
:100644 100644 dc73563... 3efb9ed... M	src/hid.h
:100644 100644 3e80139... 5479b46... M	src/hid/batch/batch.c
:100644 100644 18fca46... 9892269... M	src/hid/bom/bom.c
:100644 100644 57509dc... 5c33332... M	src/hid/common/hidnogui.c
:100644 100644 054208c... ee2a0ec... M	src/hid/gerber/gerber.c
:100644 100644 484cee0... 3abbcdc... M	src/hid/gtk/gtkhid-main.c
:100644 100644 d2b680b... 99f9851... M	src/hid/lesstif/main.c
:100644 100644 cbf19c6... 31d288e... M	src/hid/lpr/lpr.c
:100644 100644 d06193c... b186345... M	src/hid/nelma/nelma.c
:100644 100644 2f4d959... 4c97913... M	src/hid/png/png.c
:100644 100644 15febe8... ef00c52... M	src/hid/ps/eps.c
:100644 100644 d742a5f... 85e013f... M	src/hid/ps/ps.c

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

commit 9071e457cf209a9e3d64f2645610ed0b93a4161f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Fix cursor warping on flipped boards

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index e6d5226..abf0b3c 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1217,7 +1217,7 @@ ghid_set_crosshair (int x, int y, int action)
      * hopefully by avoiding the direct call to an X function we might still work under windows
      * and other non-X11 based gdk's
      */
-    gdk_display_warp_pointer (display, screen, xofs + Vx2 (x), yofs + Vy2 (y));
+    gdk_display_warp_pointer (display, screen, xofs + Vx (x), yofs + Vy (y));
 
 
 #else
@@ -1227,7 +1227,7 @@ ghid_set_crosshair (int x, int y, int action)
     XWarpPointer (GDK_DRAWABLE_XDISPLAY (gport->drawing_area->window),
 		  None, GDK_WINDOW_XID (gport->drawing_area->window),
 		  0, 0, 0, 0,
-		  xofs + Vx2 (x), yofs + Vy2 (y));
+		  xofs + Vx (x), yofs + Vy (y));
 #  else
 #    error  "sorry.  You need gtk+>=2.8.0 unless you are on X windows"
 #  endif

commit d169b664c76ed589147bccd8461b7688df8bcde6
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Add preview images in the drc violations window

diff --git a/src/Makefile.am b/src/Makefile.am
index 3de6006..270613c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -249,6 +249,7 @@ LIBGTK_SRCS = \
 	hid/gtk/gui-pinout-preview.c \
 	hid/gtk/gui-pinout-preview.h \
 	hid/gtk/gui-pinout-window.c \
+	hid/gtk/gui-render-pixmap.c \
 	hid/gtk/gui-top-window.c \
 	hid/gtk/gui-utils.c
 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index a3ea4a5..83247e8 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -42,6 +42,10 @@
 #include <dmalloc.h>
 #endif
 
+#define VIOLATION_PIXMAP_PIXEL_SIZE   100
+#define VIOLATION_PIXMAP_PIXEL_BORDER 5
+#define VIOLATION_PIXMAP_PCB_SIZE     10000
+
 RCSID ("$Id$");
 
 static GtkWidget *drc_window, *drc_list;
@@ -266,7 +270,8 @@ enum
   PROP_REQUIRED_VALUE,
   PROP_VALUE_DIGITS,
   PROP_VALUE_UNITS,
-  PROP_OBJECT_LIST
+  PROP_OBJECT_LIST,
+  PROP_PIXMAP
 };
 
 
@@ -291,6 +296,8 @@ ghid_drc_violation_finalize (GObject * object)
   g_free (violation->value_units);
   g_free (violation->object_id_list);
   g_free (violation->object_type_list);
+  if (violation->pixmap != NULL)
+    g_object_unref (violation->pixmap);
 
   G_OBJECT_CLASS (ghid_drc_violation_parent_class)->finalize (object);
 }
@@ -369,6 +376,11 @@ ghid_drc_violation_set_property (GObject * object, guint property_id,
       memcpy (violation->object_type_list, obj_list->type_list,
               sizeof (int)      * obj_list->count);
       break;
+    case PROP_PIXMAP:
+      if (violation->pixmap)
+	g_object_unref (violation->pixmap);           /* Frees our old reference */
+      violation->pixmap = g_value_dup_object (value); /* Takes a new reference */
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       return;
@@ -499,6 +511,12 @@ ghid_drc_violation_class_init (GhidViolationRendererClass * klass)
 							 "",
 							 "",
 							 G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_PIXMAP,
+				   g_param_spec_object ("pixmap",
+							"",
+							"",
+							GDK_TYPE_DRAWABLE,
+							G_PARAM_WRITABLE));
 }
 
 
@@ -540,7 +558,8 @@ ghid_drc_violation_get_type ()
 }
 
 
-GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation)
+GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation,
+					  GdkDrawable *pixmap)
 {
   struct object_list obj_list;
 
@@ -560,6 +579,7 @@ GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation)
 		       "value-digits",     violation->value_digits,
 		       "value-units",      violation->value_units,
 		       "object-list",      &obj_list,
+		       "pixmap",           pixmap,
 		       NULL);
 }
 
@@ -688,6 +708,77 @@ ghid_violation_renderer_get_property (GObject * object, guint property_id,
 
 }
 
+static void
+ghid_violation_renderer_get_size (GtkCellRenderer      *cell,
+				  GtkWidget            *widget,
+				  GdkRectangle         *cell_area,
+				  gint                 *x_offset,
+				  gint                 *y_offset,
+				  gint                 *width,
+				  gint                 *height)
+{
+  GTK_CELL_RENDERER_CLASS (ghid_violation_renderer_parent_class)->get_size (cell,
+									    widget,
+									    cell_area,
+									    x_offset,
+									    y_offset,
+									    width,
+									    height);
+  if (width != NULL)
+    *width += VIOLATION_PIXMAP_PIXEL_SIZE;
+  if (height != NULL)
+    *height = MAX (*height, VIOLATION_PIXMAP_PIXEL_SIZE);
+}
+
+
+static void
+ghid_violation_renderer_render (GtkCellRenderer      *cell,
+				GdkDrawable          *window,
+				GtkWidget            *widget,
+				GdkRectangle         *background_area,
+				GdkRectangle         *cell_area,
+				GdkRectangle         *expose_area,
+				GtkCellRendererState  flags)
+{
+  GdkDrawable *mydrawable;
+  GhidViolationRenderer *renderer = GHID_VIOLATION_RENDERER (cell);
+  GhidDrcViolation *violation = renderer->violation;
+  int pixmap_size = VIOLATION_PIXMAP_PIXEL_SIZE - 2 * VIOLATION_PIXMAP_PIXEL_BORDER;
+
+  cell_area->width -= VIOLATION_PIXMAP_PIXEL_SIZE;
+  GTK_CELL_RENDERER_CLASS (ghid_violation_renderer_parent_class)->render (cell,
+									  window,
+									  widget,
+									  background_area,
+									  cell_area,
+									  expose_area,
+									  flags);
+
+  if (violation == NULL)
+    return;
+
+  if (violation->pixmap == NULL)
+    {
+      GdkPixmap *pixmap = ghid_render_pixmap (violation->x_coord,
+					      violation->y_coord,
+					      VIOLATION_PIXMAP_PCB_SIZE / pixmap_size,
+					      pixmap_size, pixmap_size,
+					      gdk_drawable_get_depth (window));
+      g_object_set (violation, "pixmap", pixmap, NULL);
+      g_object_unref (pixmap);
+    }
+
+  if (violation->pixmap == NULL)
+    return;
+
+  mydrawable = GDK_DRAWABLE (violation->pixmap);
+
+  gdk_draw_drawable (window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+		     mydrawable, 0, 0,
+		     cell_area->x + cell_area->width + VIOLATION_PIXMAP_PIXEL_BORDER,
+		     cell_area->y + VIOLATION_PIXMAP_PIXEL_BORDER, -1, -1);
+}
+
 
 /*! \brief GType class initialiser for GhidViolationRenderer
  *
@@ -701,11 +792,15 @@ static void
 ghid_violation_renderer_class_init (GhidViolationRendererClass * klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GtkCellRendererClass *cellrenderer_class = GTK_CELL_RENDERER_CLASS (klass);
 
   gobject_class->finalize = ghid_violation_renderer_finalize;
   gobject_class->set_property = ghid_violation_renderer_set_property;
   gobject_class->get_property = ghid_violation_renderer_get_property;
 
+  cellrenderer_class->get_size = ghid_violation_renderer_get_size;
+  cellrenderer_class->render = ghid_violation_renderer_render;
+
   ghid_violation_renderer_parent_class = g_type_class_peek_parent (klass);
 
   g_object_class_install_property (gobject_class, PROP_VIOLATION,
@@ -865,7 +960,7 @@ void ghid_drc_window_append_violation (DrcViolationType *violation)
 
   num_violations++;
 
-  violation_obj = ghid_drc_violation_new (violation);
+  violation_obj = ghid_drc_violation_new (violation, /* pixmap */ NULL);
 
   gtk_list_store_append (drc_list_model, &iter);
   gtk_list_store_set (drc_list_model, &iter,
diff --git a/src/hid/gtk/gui-drc-window.h b/src/hid/gtk/gui-drc-window.h
index 04a221b..f48a944 100644
--- a/src/hid/gtk/gui-drc-window.h
+++ b/src/hid/gtk/gui-drc-window.h
@@ -62,12 +62,14 @@ struct _GhidDrcViolation
   int object_count;
   long int *object_id_list;
   int *object_type_list;
+  GdkDrawable *pixmap;
 };
 
 
 GType ghid_drc_violation_get_type (void);
 
-GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation);
+GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation,
+					  GdkDrawable *pixmap);
 
 
 #define GHID_TYPE_VIOLATION_RENDERER           (ghid_violation_renderer_get_type())
diff --git a/src/hid/gtk/gui-render-pixmap.c b/src/hid/gtk/gui-render-pixmap.c
new file mode 100644
index 0000000..525bde6
--- /dev/null
+++ b/src/hid/gtk/gui-render-pixmap.c
@@ -0,0 +1,94 @@
+/* $Id$ */
+
+/*
+ *                            COPYRIGHT
+ *
+ *  PCB, interactive printed circuit board design
+ *  Copyright (C) 1994,1995,1996 Thomas Nau
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Contact addresses for paper mail and Email:
+ *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
+ *  Thomas.Nau@xxxxxxxxxxxxx
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+
+#ifdef HAVE_LIBDMALLOC
+#include <dmalloc.h>
+#endif
+
+RCSID ("$Id$");
+
+
+GdkPixmap *
+ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int depth)
+{
+  extern HID ghid_hid;
+  GdkPixmap *pixmap;
+  GdkDrawable *save_drawable;
+  double save_zoom;
+  int save_left, save_top;
+  int save_width, save_height;
+  int save_view_width, save_view_height;
+
+  save_drawable = gport->drawable;
+  save_zoom = gport->zoom;
+  save_width = gport->width;
+  save_height = gport->height;
+  save_left = gport->view_x0;
+  save_top = gport->view_y0;
+  save_view_width = gport->view_width;
+  save_view_height = gport->view_height;
+
+  pixmap = gdk_pixmap_new (NULL, width, height, depth);
+
+  /* Setup drawable and zoom factor for drawing routines
+   */
+
+  gport->drawable = pixmap;
+  gport->zoom = zoom;
+  gport->width = width;
+  gport->height = height;
+  gport->view_width = width * gport->zoom;
+  gport->view_height = height * gport->zoom;
+  gport->view_x0 = ghid_flip_x ? PCB->MaxWidth - cx : cx;
+  gport->view_x0 -= gport->view_height / 2;
+  gport->view_y0 = ghid_flip_y ? PCB->MaxHeight - cy : cy;
+  gport->view_y0 -= gport->view_width  / 2;
+
+  /* clear background */
+  gdk_draw_rectangle (pixmap, gport->bg_gc, TRUE, 0, 0, width, height);
+
+  /* call the drawing routine */
+  hid_expose_callback (&ghid_hid, NULL, NULL);
+
+  gport->drawable = save_drawable;
+  gport->zoom = save_zoom;
+  gport->width = save_width;
+  gport->height = save_height;
+  gport->view_x0 = save_left;
+  gport->view_y0 = save_top;
+  gport->view_width = save_view_width;
+  gport->view_height = save_view_height;
+
+  return pixmap;
+}
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 7da320d..c94c2a3 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -519,6 +519,14 @@ void ghid_logv (const char *fmt, va_list args);
 /* gui-pinout-window.c */
 void ghid_pinout_window_show (GHidPort * out, ElementTypePtr Element);
 
+/* gui-render-pixmap.c */
+GdkPixmap *ghid_render_pixmap (int cx,
+			       int cy,
+			       double zoom,
+			       int width,
+			       int height,
+			       int depth);
+
 /* gtkhid-main.c */
 void ghid_invalidate_all ();
 void ghid_get_coords (const char *msg, int *x, int *y);

commit 15f6f449143f65e564c33e4f63533ece1ec5ac87
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK HID: Add DRC list window using the new DRC_GUI hooks.

diff --git a/src/Makefile.am b/src/Makefile.am
index 944eea8..3de6006 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -237,6 +237,8 @@ LIBGTK_SRCS = \
 	hid/gtk/gui-dialog-print.c \
 	hid/gtk/gui-dialog-size.c \
 	hid/gtk/gui-dialog.c \
+	hid/gtk/gui-drc-window.c \
+	hid/gtk/gui-drc-window.h \
 	hid/gtk/gui-keyref-window.c \
 	hid/gtk/gui-library-window.c \
 	hid/gtk/gui-library-window.h \
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 3abbcdc..e6d5226 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1519,6 +1519,13 @@ ghid_progress (int so_far, int total, const char *message)
 }
 
 /* ---------------------------------------------------------------------- */
+HID_DRC_GUI ghid_drc_gui = {
+  1,				/* log_drc_overview */
+  0,				/* log_drc_details */
+  ghid_drc_window_reset_message,
+  ghid_drc_window_append_violation,
+  ghid_drc_window_throw_dialog,
+};
 
 HID ghid_hid = {
   sizeof (HID),
@@ -1580,7 +1587,7 @@ HID ghid_hid = {
   ghid_show_item,
   ghid_beep,
   ghid_progress,
-  0 /* ghid_drc_gui */
+  &ghid_drc_gui
 };
 
 HID ghid_extents = {
@@ -2384,8 +2391,8 @@ CursorAction(int argc, char **argv, int x, int y)
 /* ------------------------------------------------------------ */
 
 static const char dowindows_syntax[] =
-"DoWindows(1|2|3|4)\n"
-"DoWindows(Layout|Library|Log|Netlist|Preferences)";
+"DoWindows(1|2|3|4|5|6)\n"
+"DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)";
 
 static const char dowindows_help[] =
 "Open various GUI windows.";
@@ -2415,6 +2422,10 @@ Open the netlist window.
 @itemx Preferences
 Open the preferences window.
 
+@item 6
+@itemx DRC
+Open the DRC violations window.
+
 @end table
 
 %end-doc */
@@ -2443,6 +2454,10 @@ DoWindows (int argc, char **argv, int x, int y)
     {
       ghid_config_window_show ();
     }
+  else if (strcmp (a, "6") == 0 || strcasecmp (a, "DRC") == 0)
+    {
+      ghid_drc_window_show (TRUE);
+    }
   else
     {
       AFAIL (dowindows);
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index 1b50d32..23c3164 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -130,6 +130,8 @@ static ConfigAttribute config_attributes[] = {
   {"top-window-height", CONFIG_Integer, &_ghidgui.top_window_height},
   {"log-window-width", CONFIG_Integer, &_ghidgui.log_window_width},
   {"log-window-height", CONFIG_Integer, &_ghidgui.log_window_height},
+  {"drc-window-width", CONFIG_Integer, &_ghidgui.drc_window_width},
+  {"drc-window-height", CONFIG_Integer, &_ghidgui.drc_window_height},
   {"library-window-width", CONFIG_Integer, &_ghidgui.library_window_width},
   {"library-window-height", CONFIG_Integer, &_ghidgui.library_window_height},
   {"netlist-window-height", CONFIG_Integer, &_ghidgui.netlist_window_height},
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
new file mode 100644
index 0000000..a3ea4a5
--- /dev/null
+++ b/src/hid/gtk/gui-drc-window.c
@@ -0,0 +1,890 @@
+/* $Id$ */
+
+/*
+ *                            COPYRIGHT
+ *
+ *  PCB, interactive printed circuit board design
+ *  Copyright (C) 1994,1995,1996 Thomas Nau
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Contact addresses for paper mail and Email:
+ *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
+ *  Thomas.Nau@xxxxxxxxxxxxx
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "error.h"
+#include "search.h"
+#include "draw.h"
+#include "undo.h"
+#include "set.h"
+#include "gui.h"
+#include "gui-drc-window.h"
+
+#ifdef HAVE_LIBDMALLOC
+#include <dmalloc.h>
+#endif
+
+RCSID ("$Id$");
+
+static GtkWidget *drc_window, *drc_list;
+static GtkListStore *drc_list_model = NULL;
+static int num_violations = 0;
+
+/* Remember user window resizes. */
+static gint
+drc_window_configure_event_cb (GtkWidget * widget,
+			       GdkEventConfigure * ev, gpointer data)
+{
+  ghidgui->drc_window_width = widget->allocation.width;
+  ghidgui->drc_window_height = widget->allocation.height;
+  ghidgui->config_modified = TRUE;
+
+  return FALSE;
+}
+
+static void
+drc_close_cb (gpointer data)
+{
+  gtk_widget_destroy (drc_window);
+  drc_window = NULL;
+}
+
+static void
+drc_destroy_cb (GtkWidget * widget, gpointer data)
+{
+  drc_window = NULL;
+}
+
+enum {
+  DRC_VIOLATION_NUM_COL = 0,
+  DRC_VIOLATION_OBJ_COL,
+  NUM_DRC_COLUMNS
+};
+
+
+static void
+unset_found_flags (int AndDraw)
+{
+  int flag = FOUNDFLAG;
+  int change = 0;
+
+  VIA_LOOP (PCB->Data);
+  {
+    if (TEST_FLAG (flag, via))
+      {
+	AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
+	CLEAR_FLAG (flag, via);
+	DrawVia (via, 0);
+	change = True;
+      }
+  }
+  END_LOOP;
+  ELEMENT_LOOP (PCB->Data);
+  {
+    PIN_LOOP (element);
+    {
+      if (TEST_FLAG (flag, pin))
+	{
+	  AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
+	  CLEAR_FLAG (flag, pin);
+	  DrawPin (pin, 0);
+	  change = True;
+	}
+    }
+    END_LOOP;
+    PAD_LOOP (element);
+    {
+      if (TEST_FLAG (flag, pad))
+	{
+	  AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
+	  CLEAR_FLAG (flag, pad);
+	  DrawPad (pad, 0);
+	  change = True;
+	}
+    }
+    END_LOOP;
+  }
+  END_LOOP;
+  RAT_LOOP (PCB->Data);
+  {
+    if (TEST_FLAG (flag, line))
+      {
+	AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
+	CLEAR_FLAG (flag, line);
+	DrawRat (line, 0);
+	change = True;
+      }
+  }
+  END_LOOP;
+  COPPERLINE_LOOP (PCB->Data);
+  {
+    if (TEST_FLAG (flag, line))
+      {
+	AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
+	CLEAR_FLAG (flag, line);
+	DrawLine (layer, line, 0);
+	change = True;
+      }
+  }
+  ENDALL_LOOP;
+  COPPERARC_LOOP (PCB->Data);
+  {
+    if (TEST_FLAG (flag, arc))
+      {
+	AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
+	CLEAR_FLAG (flag, arc);
+	DrawArc (layer, arc, 0);
+	change = True;
+      }
+  }
+  ENDALL_LOOP;
+  COPPERPOLYGON_LOOP (PCB->Data);
+  {
+    if (TEST_FLAG (flag, polygon))
+      {
+	AddObjectToFlagUndoList (POLYGON_TYPE, layer, polygon, polygon);
+	CLEAR_FLAG (flag, polygon);
+	DrawPolygon (layer, polygon, 0);
+	change = True;
+      }
+  }
+  ENDALL_LOOP;
+  if (change)
+    {
+      SetChangedFlag (True);
+      if (AndDraw)
+	{
+	  IncrementUndoSerialNumber ();
+	  Draw ();
+	}
+    }
+}
+
+static void
+selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
+{
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  GhidDrcViolation *violation;
+  int i;
+
+  if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+    {
+      unset_found_flags (True);
+      return;
+    }
+
+  /* Check the selected node has children, if so; return. */
+  if (gtk_tree_model_iter_has_child (model, &iter))
+    return;
+
+  gtk_tree_model_get (model, &iter, DRC_VIOLATION_OBJ_COL, &violation, -1);
+
+  unset_found_flags (False);
+
+  if (violation == NULL)
+    return;
+
+  /* Flag the objects listed against this DRC violation */
+  for (i = 0; i < violation->object_count; i++)
+    {
+      int object_id = violation->object_id_list[i];
+      int object_type = violation->object_type_list[i];
+      int found_type;
+      void *ptr1, *ptr2, *ptr3;
+
+      found_type = SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3,
+				     object_id, object_type);
+      if (found_type == NO_TYPE)
+	{
+	  Message (_("Object ID %i identified during DRC was not found. Stale DRC window?\n"),
+		   object_id);
+	  continue;
+	}
+      AddObjectToFlagUndoList (object_type, ptr1, ptr2, ptr3);
+      SET_FLAG (FOUNDFLAG, (AnyObjectType *)ptr2);
+      switch (violation->object_type_list[i])
+	{
+	case LINE_TYPE:
+	case ARC_TYPE:
+	case POLYGON_TYPE:
+	  ChangeGroupVisibility (GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1), True, True);
+	}
+      DrawObject (object_type, ptr1, ptr2, 0);
+    }
+  SetChangedFlag (True);
+  IncrementUndoSerialNumber ();
+  Draw();
+}
+
+static void
+row_activated_cb (GtkTreeView *view, GtkTreePath *path,
+		  GtkTreeViewColumn *column, gpointer user_data)
+{
+  GtkTreeModel *model = gtk_tree_view_get_model (view);
+  GtkTreeIter iter;
+  GhidDrcViolation *violation;
+
+  gtk_tree_model_get_iter (model, &iter, path);
+
+  gtk_tree_model_get (model, &iter, DRC_VIOLATION_OBJ_COL, &violation, -1);
+
+  if (violation == NULL)
+    return;
+
+  CenterDisplay (violation->x_coord, violation->y_coord, False);
+}
+
+
+enum
+{
+  PROP_TITLE = 1,
+  PROP_EXPLANATION,
+  PROP_X_COORD,
+  PROP_Y_COORD,
+  PROP_ANGLE,
+  PROP_HAVE_MEASURED,
+  PROP_MEASURED_VALUE,
+  PROP_REQUIRED_VALUE,
+  PROP_VALUE_DIGITS,
+  PROP_VALUE_UNITS,
+  PROP_OBJECT_LIST
+};
+
+
+static GObjectClass *ghid_drc_violation_parent_class = NULL;
+
+
+/*! \brief GObject finalise handler
+ *
+ *  \par Function Description
+ *  Just before the GhidDrcViolation GObject is finalized, free our
+ *  allocated data, and then chain up to the parent's finalize handler.
+ *
+ *  \param [in] widget  The GObject being finalized.
+ */
+static void
+ghid_drc_violation_finalize (GObject * object)
+{
+  GhidDrcViolation *violation = GHID_DRC_VIOLATION (object);
+
+  g_free (violation->title);
+  g_free (violation->explanation);
+  g_free (violation->value_units);
+  g_free (violation->object_id_list);
+  g_free (violation->object_type_list);
+
+  G_OBJECT_CLASS (ghid_drc_violation_parent_class)->finalize (object);
+}
+
+struct object_list
+{
+  int count;
+  long int *id_list;
+  int *type_list;
+};
+
+/*! \brief GObject property setter function
+ *
+ *  \par Function Description
+ *  Setter function for GhidDrcViolation's GObject properties,
+ *  "settings-name" and "toplevel"
+ *
+ *  \param [in]  object       The GObject whose properties we are setting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [in]  value        The GValue the property is being set from
+ *  \param [in]  pspec        A GParamSpec describing the property being set
+ */
+static void
+ghid_drc_violation_set_property (GObject * object, guint property_id,
+				  const GValue * value, GParamSpec * pspec)
+{
+  GhidDrcViolation *violation = GHID_DRC_VIOLATION (object);
+  struct object_list *obj_list;
+
+  switch (property_id)
+    {
+    case PROP_TITLE:
+      g_free (violation->title);
+      violation->title = g_value_dup_string (value);
+      break;
+    case PROP_EXPLANATION:
+      g_free (violation->explanation);
+      violation->explanation = g_value_dup_string (value);
+      break;
+    case PROP_X_COORD:
+      violation->x_coord = g_value_get_int (value);
+      break;
+    case PROP_Y_COORD:
+      violation->y_coord = g_value_get_int (value);
+      break;
+    case PROP_ANGLE:
+      violation->angle = g_value_get_int (value);
+      break;
+    case PROP_HAVE_MEASURED:
+      violation->have_measured = g_value_get_int (value);
+      break;
+    case PROP_MEASURED_VALUE:
+      violation->measured_value = g_value_get_double (value);
+      break;
+    case PROP_REQUIRED_VALUE:
+      violation->required_value = g_value_get_double (value);
+      break;
+    case PROP_VALUE_DIGITS:
+      violation->value_digits = g_value_get_int (value);
+      break;
+    case PROP_VALUE_UNITS:
+      g_free (violation->value_units);
+      violation->value_units = g_value_dup_string (value);
+      break;
+    case PROP_OBJECT_LIST:
+      /* Copy the passed data to make new lists */
+      g_free (violation->object_id_list);
+      g_free (violation->object_type_list);
+      obj_list = g_value_get_pointer (value);
+      violation->object_count = obj_list->count;
+      violation->object_id_list   = g_new (long int, obj_list->count);
+      violation->object_type_list = g_new (int,      obj_list->count);
+      memcpy (violation->object_id_list, obj_list->id_list,
+              sizeof (long int) * obj_list->count);
+      memcpy (violation->object_type_list, obj_list->type_list,
+              sizeof (int)      * obj_list->count);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      return;
+    }
+}
+
+
+/*! \brief GObject property getter function
+ *
+ *  \par Function Description
+ *  Getter function for GhidDrcViolation's GObject properties,
+ *  "settings-name" and "toplevel".
+ *
+ *  \param [in]  object       The GObject whose properties we are getting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [out] value        The GValue in which to return the value of the property
+ *  \param [in]  pspec        A GParamSpec describing the property being got
+ */
+static void
+ghid_drc_violation_get_property (GObject * object, guint property_id,
+				 GValue * value, GParamSpec * pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+
+}
+
+
+/*! \brief GType class initialiser for GhidDrcViolation
+ *
+ *  \par Function Description
+ *  GType class initialiser for GhidDrcViolation. We override our parent
+ *  virtual class methods as needed and register our GObject properties.
+ *
+ *  \param [in]  klass       The GhidDrcViolationClass we are initialising
+ */
+static void
+ghid_drc_violation_class_init (GhidViolationRendererClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->finalize = ghid_drc_violation_finalize;
+  gobject_class->set_property = ghid_drc_violation_set_property;
+  gobject_class->get_property = ghid_drc_violation_get_property;
+
+  ghid_drc_violation_parent_class = g_type_class_peek_parent (klass);
+
+  g_object_class_install_property (gobject_class, PROP_TITLE,
+				   g_param_spec_string ("title",
+							"",
+							"",
+							"",
+							G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_EXPLANATION,
+				   g_param_spec_string ("explanation",
+							"",
+							"",
+							"",
+							G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_X_COORD,
+				   g_param_spec_int ("x-coord",
+						     "",
+						     "",
+						     G_MININT,
+						     G_MAXINT,
+						     0,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_Y_COORD,
+				   g_param_spec_int ("y-coord",
+						     "",
+						     "",
+						     G_MININT,
+						     G_MAXINT,
+						     0,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_ANGLE,
+				   g_param_spec_int ("angle",
+						     "",
+						     "",
+						     G_MININT,
+						     G_MAXINT,
+						     0,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_HAVE_MEASURED,
+				   g_param_spec_int ("have-measured",
+						     "",
+						     "",
+						     G_MININT,
+						     G_MAXINT,
+						     0,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_MEASURED_VALUE,
+				   g_param_spec_double ("measured-value",
+						     "",
+						     "",
+						     -G_MAXDOUBLE,
+						     G_MAXDOUBLE,
+						     0.,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_REQUIRED_VALUE,
+				   g_param_spec_double ("required-value",
+						     "",
+						     "",
+						     -G_MINDOUBLE,
+						     G_MAXDOUBLE,
+						     0.,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_VALUE_DIGITS,
+				   g_param_spec_int ("value-digits",
+						     "",
+						     "",
+						     0,
+						     G_MAXINT,
+						     0,
+						     G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_VALUE_UNITS,
+				   g_param_spec_string ("value-units",
+							"",
+							"",
+							"",
+							G_PARAM_WRITABLE));
+  g_object_class_install_property (gobject_class, PROP_OBJECT_LIST,
+				   g_param_spec_pointer ("object-list",
+							 "",
+							 "",
+							 G_PARAM_WRITABLE));
+}
+
+
+
+/*! \brief Function to retrieve GhidViolationRenderer's GType identifier.
+ *
+ *  \par Function Description
+ *  Function to retrieve GhidViolationRenderer's GType identifier.
+ *  Upon first call, this registers the GhidViolationRenderer in the GType system.
+ *  Subsequently it returns the saved value from its first execution.
+ *
+ *  \return the GType identifier associated with GhidViolationRenderer.
+ */
+GType
+ghid_drc_violation_get_type ()
+{
+  static GType ghid_drc_violation_type = 0;
+
+  if (!ghid_drc_violation_type)
+    {
+      static const GTypeInfo ghid_drc_violation_info = {
+	sizeof (GhidDrcViolationClass),
+	NULL,			/* base_init */
+	NULL,			/* base_finalize */
+	(GClassInitFunc) ghid_drc_violation_class_init,
+	NULL,			/* class_finalize */
+	NULL,			/* class_data */
+	sizeof (GhidDrcViolation),
+	0,			/* n_preallocs */
+	NULL,			/* instance_init */
+      };
+
+      ghid_drc_violation_type =
+	g_type_register_static (G_TYPE_OBJECT, "GhidDrcViolation",
+				&ghid_drc_violation_info, 0);
+    }
+
+  return ghid_drc_violation_type;
+}
+
+
+GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation)
+{
+  struct object_list obj_list;
+
+  obj_list.count = violation->object_count;
+  obj_list.id_list = violation->object_id_list;
+  obj_list.type_list = violation->object_type_list;
+
+  return g_object_new (GHID_TYPE_DRC_VIOLATION,
+		       "title",            violation->title,
+		       "explanation",      violation->explanation,
+		       "x-coord",          violation->x,
+		       "y-coord",          violation->y,
+		       "angle",            violation->angle,
+		       "have-measured",    violation->have_measured,
+		       "measured-value",   violation->measured_value,
+		       "required-value",   violation->required_value,
+		       "value-digits",     violation->value_digits,
+		       "value-units",      violation->value_units,
+		       "object-list",      &obj_list,
+		       NULL);
+}
+
+enum
+{
+  PROP_VIOLATION = 1,
+};
+
+
+static GObjectClass *ghid_violation_renderer_parent_class = NULL;
+
+
+/*! \brief GObject finalise handler
+ *
+ *  \par Function Description
+ *  Just before the GhidViolationRenderer GObject is finalized, free our
+ *  allocated data, and then chain up to the parent's finalize handler.
+ *
+ *  \param [in] widget  The GObject being finalized.
+ */
+static void
+ghid_violation_renderer_finalize (GObject * object)
+{
+  GhidViolationRenderer *renderer = GHID_VIOLATION_RENDERER (object);
+
+  if (renderer->violation != NULL)
+    g_object_unref (renderer->violation);
+
+  G_OBJECT_CLASS (ghid_violation_renderer_parent_class)->finalize (object);
+}
+
+
+/*! \brief GObject property setter function
+ *
+ *  \par Function Description
+ *  Setter function for GhidViolationRenderer's GObject properties,
+ *  "settings-name" and "toplevel".
+ *
+ *  \param [in]  object       The GObject whose properties we are setting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [in]  value        The GValue the property is being set from
+ *  \param [in]  pspec        A GParamSpec describing the property being set
+ */
+static void
+ghid_violation_renderer_set_property (GObject * object, guint property_id,
+				  const GValue * value, GParamSpec * pspec)
+{
+  GhidViolationRenderer *renderer = GHID_VIOLATION_RENDERER (object);
+  char *markup;
+
+  switch (property_id)
+    {
+    case PROP_VIOLATION:
+      if (renderer->violation != NULL)
+	g_object_unref (renderer->violation);
+      renderer->violation = g_value_dup_object (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+      return;
+    }
+
+  if (renderer->violation == NULL)
+    return;
+
+  if (renderer->violation->have_measured)
+    {
+      markup = g_strdup_printf ("<b>%s (%.*f %s)</b>\n"
+				"<span font_size='1024'> </span>\n"
+				"<small>"
+				  "<i>%s</i>\n"
+				  "<span font_size='5120'> </span>\n"
+				  "Required: %.*f %s"
+				"</small>",
+				renderer->violation->title,
+				renderer->violation->value_digits,
+				renderer->violation->measured_value,
+				renderer->violation->value_units,
+				renderer->violation->explanation,
+				renderer->violation->value_digits,
+				renderer->violation->required_value,
+				renderer->violation->value_units);
+    }
+  else
+    {
+      markup = g_strdup_printf ("<b>%s</b>\n"
+				"<span font_size='1024'> </span>\n"
+				"<small>"
+				  "<i>%s</i>\n"
+				  "<span font_size='5120'> </span>\n"
+				  "Required: %.*f %s"
+				"</small>",
+				renderer->violation->title,
+				renderer->violation->explanation,
+				renderer->violation->value_digits,
+				renderer->violation->required_value,
+				renderer->violation->value_units);
+    }
+
+  g_object_set (object, "markup", markup, NULL);
+  g_free (markup);
+}
+
+
+/*! \brief GObject property getter function
+ *
+ *  \par Function Description
+ *  Getter function for GhidViolationRenderer's GObject properties.
+ *
+ *  \param [in]  object       The GObject whose properties we are getting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [out] value        The GValue in which to return the value of the property
+ *  \param [in]  pspec        A GParamSpec describing the property being got
+ */
+static void
+ghid_violation_renderer_get_property (GObject * object, guint property_id,
+				  GValue * value, GParamSpec * pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+
+}
+
+
+/*! \brief GType class initialiser for GhidViolationRenderer
+ *
+ *  \par Function Description
+ *  GType class initialiser for GhidViolationRenderer. We override our parent
+ *  virtual class methods as needed and register our GObject properties.
+ *
+ *  \param [in]  klass       The GhidViolationRendererClass we are initialising
+ */
+static void
+ghid_violation_renderer_class_init (GhidViolationRendererClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->finalize = ghid_violation_renderer_finalize;
+  gobject_class->set_property = ghid_violation_renderer_set_property;
+  gobject_class->get_property = ghid_violation_renderer_get_property;
+
+  ghid_violation_renderer_parent_class = g_type_class_peek_parent (klass);
+
+  g_object_class_install_property (gobject_class, PROP_VIOLATION,
+				   g_param_spec_object ("violation",
+							"",
+							"",
+							GHID_TYPE_DRC_VIOLATION,
+							G_PARAM_WRITABLE));
+}
+
+
+/*! \brief Function to retrieve GhidViolationRenderer's GType identifier.
+ *
+ *  \par Function Description
+ *  Function to retrieve GhidViolationRenderer's GType identifier.
+ *  Upon first call, this registers the GhidViolationRenderer in the GType system.
+ *  Subsequently it returns the saved value from its first execution.
+ *
+ *  \return the GType identifier associated with GhidViolationRenderer.
+ */
+GType
+ghid_violation_renderer_get_type ()
+{
+  static GType ghid_violation_renderer_type = 0;
+
+  if (!ghid_violation_renderer_type)
+    {
+      static const GTypeInfo ghid_violation_renderer_info = {
+	sizeof (GhidViolationRendererClass),
+	NULL,			/* base_init */
+	NULL,			/* base_finalize */
+	(GClassInitFunc) ghid_violation_renderer_class_init,
+	NULL,			/* class_finalize */
+	NULL,			/* class_data */
+	sizeof (GhidViolationRenderer),
+	0,			/* n_preallocs */
+	NULL,			/* instance_init */
+      };
+
+      ghid_violation_renderer_type =
+	g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT, "GhidViolationRenderer",
+				&ghid_violation_renderer_info, 0);
+    }
+
+  return ghid_violation_renderer_type;
+}
+
+
+/*! \brief Convenience function to create a new violation renderer
+ *
+ *  \par Function Description
+ *  Convenience function which creates a GhidViolationRenderer.
+ *
+ *  \return  The GhidViolationRenderer created.
+ */
+GtkCellRenderer *
+ghid_violation_renderer_new (void)
+{
+  GhidViolationRenderer *renderer;
+
+  renderer = g_object_new (GHID_TYPE_VIOLATION_RENDERER,
+			   "ypad", 6,
+			   NULL);
+
+  return GTK_CELL_RENDERER (renderer);
+}
+
+
+void
+ghid_drc_window_show (gboolean raise)
+{
+  GtkWidget *vbox, *hbox, *button, *scrolled_window;
+  GtkCellRenderer *violation_renderer;
+
+  if (drc_window)
+    {
+      if (raise)
+	gtk_window_present(GTK_WINDOW(drc_window));
+      return;
+    }
+
+ drc_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  g_signal_connect (G_OBJECT (drc_window), "destroy",
+		    G_CALLBACK (drc_destroy_cb), NULL);
+  g_signal_connect (G_OBJECT (drc_window), "configure_event",
+		    G_CALLBACK (drc_window_configure_event_cb), NULL);
+  gtk_window_set_title (GTK_WINDOW (drc_window), _("PCB DRC"));
+  gtk_window_set_wmclass (GTK_WINDOW (drc_window), "PCB_DRC", "PCB");
+  gtk_window_set_default_size (GTK_WINDOW (drc_window),
+			       ghidgui->drc_window_width,
+			       ghidgui->drc_window_height);
+
+  vbox = gtk_vbox_new (FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+  gtk_container_add (GTK_CONTAINER (drc_window), vbox);
+
+  drc_list_model = gtk_list_store_new (NUM_DRC_COLUMNS,
+				       G_TYPE_INT,      /* DRC_VIOLATION_NUM_COL */
+				       G_TYPE_OBJECT);  /* DRC_VIOLATION_OBJ_COL */
+
+  scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_window,
+		      TRUE /* EXPAND */, TRUE /* FILL */, 0 /* PADDING */);
+
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+				  GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  drc_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (drc_list_model));
+  gtk_container_add (GTK_CONTAINER (scrolled_window), drc_list);
+
+  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (drc_list), TRUE);
+  g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (drc_list)), "changed",
+		    G_CALLBACK (selection_changed_cb), NULL);
+  g_signal_connect (drc_list, "row-activated",
+		    G_CALLBACK (row_activated_cb), NULL);
+
+  violation_renderer = gtk_cell_renderer_text_new ();
+  gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (drc_list),
+					       -1, /* APPEND */
+					       _("No."), /* TITLE */
+					       violation_renderer,
+					       "text", DRC_VIOLATION_NUM_COL,
+					       NULL);
+
+  violation_renderer = ghid_violation_renderer_new ();
+  gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (drc_list),
+					       -1, /* APPEND */
+					       _("Violation details"), /* TITLE */
+					       violation_renderer,
+					       "violation", DRC_VIOLATION_OBJ_COL,
+					       NULL);
+
+  hbox = gtk_hbutton_box_new ();
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_END);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+  g_signal_connect (G_OBJECT (button), "clicked",
+		    G_CALLBACK (drc_close_cb), NULL);
+  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+
+  gtk_widget_realize (drc_window);
+  if (Settings.AutoPlace)
+    gtk_widget_set_uposition (GTK_WIDGET (drc_window), 10, 10);
+  gtk_widget_show_all (drc_window);
+}
+
+#define UNIT1(value) (Settings.grid_units_mm ? ((value) / 100000.0 * 25.4) : ((value) / 100.0))
+#define UNIT(value) UNIT1(value) , (Settings.grid_units_mm ? "mm" : "mils")
+
+void ghid_drc_window_append_violation (DrcViolationType *violation)
+{
+  GhidDrcViolation *violation_obj;
+  GtkTreeIter iter;
+
+  /* Ensure the required structures are setup */
+  ghid_drc_window_show (FALSE);
+
+  num_violations++;
+
+  violation_obj = ghid_drc_violation_new (violation);
+
+  gtk_list_store_append (drc_list_model, &iter);
+  gtk_list_store_set (drc_list_model, &iter,
+		      DRC_VIOLATION_NUM_COL, num_violations,
+		      DRC_VIOLATION_OBJ_COL, violation_obj,
+		      -1);
+
+  g_object_unref (violation_obj); /* The list store takes its own reference */
+}
+
+void ghid_drc_window_reset_message (void)
+{
+  if (drc_list_model != NULL)
+    gtk_list_store_clear (drc_list_model);
+  num_violations = 0;
+}
+
+int ghid_drc_window_throw_dialog (void)
+{
+  ghid_drc_window_show (TRUE);
+  return 1;
+}
diff --git a/src/hid/gtk/gui-drc-window.h b/src/hid/gtk/gui-drc-window.h
new file mode 100644
index 0000000..04a221b
--- /dev/null
+++ b/src/hid/gtk/gui-drc-window.h
@@ -0,0 +1,100 @@
+/* $Id$ */
+
+/*
+ *                            COPYRIGHT
+ *
+ *  PCB, interactive printed circuit board design
+ *  Copyright (C) 1994,1995,1996 Thomas Nau
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Contact addresses for paper mail and Email:
+ *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
+ *  Thomas.Nau@xxxxxxxxxxxxx
+ *
+ */
+
+#ifndef __GUI_DRC_WINDOW_H__
+#define __GUI_DRC_WINDOW_H__
+
+
+#define GHID_TYPE_DRC_VIOLATION           (ghid_drc_violation_get_type())
+#define GHID_DRC_VIOLATION(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_TYPE_DRC_VIOLATION, GhidDrcViolation))
+#define GHID_DRC_VIOLATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass),  GHID_TYPE_DRC_VIOLATION, GhidDrcViolationClass))
+#define GHID_IS_DRC_VIOLATION(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_TYPE_DRC_VIOLATION))
+#define GHID_DRC_VIOLATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),  GHID_TYPE_DRC_VIOLATION, GhidDrcViolationClass))
+
+typedef struct _GhidDrcViolationClass GhidDrcViolationClass;
+typedef struct _GhidDrcViolation GhidDrcViolation;
+
+
+struct _GhidDrcViolationClass
+{
+  GObjectClass parent_class;
+};
+
+struct _GhidDrcViolation
+{
+  GObject parent_instance;
+
+  char *title;
+  char *explanation;
+  int x_coord;
+  int y_coord;
+  int angle;
+  int have_measured;
+  double measured_value;
+  double required_value;
+  int value_digits;
+  char *value_units;
+  int object_count;
+  long int *object_id_list;
+  int *object_type_list;
+};
+
+
+GType ghid_drc_violation_get_type (void);
+
+GhidDrcViolation *ghid_drc_violation_new (DrcViolationType *violation);
+
+
+#define GHID_TYPE_VIOLATION_RENDERER           (ghid_violation_renderer_get_type())
+#define GHID_VIOLATION_RENDERER(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_TYPE_VIOLATION_RENDERER, GhidViolationRenderer))
+#define GHID_VIOLATION_RENDERER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass),  GHID_TYPE_VIOLATION_RENDERER, GhidViolationRendererClass))
+#define GHID_IS_VIOLATION_RENDERER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_TYPE_VIOLATION_RENDERER))
+#define GHID_VIOLATION_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),  GHID_TYPE_VIOLATION_RENDERER, GhidViolationRendererClass))
+
+typedef struct _GhidViolationRendererClass GhidViolationRendererClass;
+typedef struct _GhidViolationRenderer GhidViolationRenderer;
+
+
+struct _GhidViolationRendererClass
+{
+  GtkCellRendererTextClass parent_class;
+};
+
+struct _GhidViolationRenderer
+{
+  GtkCellRendererText parent_instance;
+
+  GhidDrcViolation *violation;
+};
+
+
+GType ghid_violation_renderer_get_type (void);
+
+GtkCellRenderer *ghid_violation_renderer_new (void);
+
+#endif /* __GUI_DRC_WINDOW_H__ */
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 0b4eb21..7da320d 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -177,6 +177,8 @@ typedef struct
     top_window_height,
     log_window_width,
     log_window_height,
+    drc_window_width,
+    drc_window_height,
     keyref_window_width,
     keyref_window_height,
     library_window_width,
@@ -379,6 +381,13 @@ void ghid_dialog_print (HID *);
 
 int ghid_attribute_dialog (HID_Attribute *, int, HID_Attr_Val *, const char *, const char *);
 
+/* gui-drc-window.c */
+void ghid_drc_window_show (gboolean raise);
+void ghid_drc_window_reset_message (void);
+void ghid_drc_window_append_violation (DrcViolationType *violation);
+void ghid_drc_window_append_messagev (const char *fmt, va_list va);
+int ghid_drc_window_throw_dialog (void);
+
 /* gui-route-style function prototypes.
 */
   /* In gui-dialog-size.c */

commit ac5474faec1d4600a50cca1514f7ff6fad1a18aa
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Refactor DRC reporting to work around a DrcViolationType structure.
    
    Add hooks to the HID structure allowing a GUI to consume this data
    directly (if it wants), rather than being called to display ordinary
    message dialog boxes. No HID yet utilises this interface.
    
    Remove log messages for individual design rule violations, instead
    writing log entries based on the title in the DrcViolationType. This
    modifies some of the logged messages slightly. All now prefix:
    "WARNING!  Design Rule error - ", as was present on some of the old
    messges.

diff --git a/src/action.c b/src/action.c
index 3f2e74d..ab47e87 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1746,23 +1746,29 @@ ActionDRCheck (int argc, char **argv, int x, int y)
 {
   int count;
 
-  Message (_("Rules are minspace %d.%02d, minoverlap %d.%d "
-	     "minwidth %d.%02d, minsilk %d.%02d\n"
-	     "min drill %d.%02d, min annular ring %d.%02d\n"),
-	   (PCB->Bloat + 1) / 100, (PCB->Bloat + 1) % 100,
-	   PCB->Shrink / 100, PCB->Shrink % 100,
-	   PCB->minWid / 100, PCB->minWid % 100,
-	   PCB->minSlk / 100, PCB->minSlk % 100,
-	   PCB->minDrill / 100, PCB->minDrill % 100,
-	   PCB->minRing / 100, PCB->minRing % 100);
+  if (gui->drc_gui == NULL || gui->drc_gui->log_drc_overview)
+    {
+      Message (_("Rules are minspace %d.%02d, minoverlap %d.%d "
+		 "minwidth %d.%02d, minsilk %d.%02d\n"
+		 "min drill %d.%02d, min annular ring %d.%02d\n"),
+	       (PCB->Bloat + 1) / 100, (PCB->Bloat + 1) % 100,
+	       PCB->Shrink / 100, PCB->Shrink % 100,
+	       PCB->minWid / 100, PCB->minWid % 100,
+	       PCB->minSlk / 100, PCB->minSlk % 100,
+	       PCB->minDrill / 100, PCB->minDrill % 100,
+	       PCB->minRing / 100, PCB->minRing % 100);
+    }
   HideCrosshair (True);
   count = DRCAll ();
-  if (count == 0)
-    Message (_("No DRC problems found.\n"));
-  else if (count > 0)
-    Message (_("Found %d design rule errors.\n"), count);
-  else
-    Message (_("Aborted DRC after %d design rule errors.\n"), -count);
+  if (gui->drc_gui == NULL || gui->drc_gui->log_drc_overview)
+    {
+      if (count == 0)
+	Message (_("No DRC problems found.\n"));
+      else if (count > 0)
+	Message (_("Found %d design rule errors.\n"), count);
+      else
+	Message (_("Aborted DRC after %d design rule errors.\n"), -count);
+    }
   RestoreCrosshair (True);
   return 0;
 }
diff --git a/src/find.c b/src/find.c
index 766762c..97424ce 100644
--- a/src/find.c
+++ b/src/find.c
@@ -157,11 +157,61 @@ RCSID ("$Id$");
 #define	IS_PV_ON_PAD(PV,Pad) \
 	( IsPointInPad((PV)->X, (PV)->Y, MAX((PV)->Thickness/2 +Bloat,0), (Pad)))
 
-static char drc_dialog_message[289];
+#define LENGTH_TO_HUMAN(value) (Settings.grid_units_mm ? ((value) / 100000.0 * 25.4) : ((value) / 100.0))
+#define LENGTH_DIGITS (Settings.grid_units_mm ? 4 : 2)
+#define LENGTH_UNITS_STRING (Settings.grid_units_mm ? "mm" : "mils")
+
+
+static DrcViolationType
+*pcb_drc_violation_new (char *title,
+                        char *explanation,
+                        int x, int y,
+                        int angle,
+                        int have_measured,
+                        double measured_value,
+                        double required_value,
+                        int value_digits,
+                        const char *value_units,
+                        int object_count,
+                        long int *object_id_list,
+                        int *object_type_list)
+{
+  DrcViolationType *violation = malloc (sizeof (DrcViolationType));
+
+  violation->title = strdup (title);
+  violation->explanation = strdup (explanation);
+  violation->x = x;
+  violation->y = y;
+  violation->angle = angle;
+  violation->have_measured = have_measured;
+  violation->measured_value = measured_value;
+  violation->required_value = required_value;
+  violation->value_digits = value_digits;
+  violation->value_units = value_units;
+  violation->object_count = object_count;
+  violation->object_id_list = object_id_list;
+  violation->object_type_list = object_type_list;
+
+  return violation;
+}
+
+static void
+pcb_drc_violation_free (DrcViolationType *violation)
+{
+  free (violation->title);
+  free (violation->explanation);
+  free (violation);
+}
+
+static char drc_dialog_message[289] = {0};
 static void
 reset_drc_dialog_message(void)
 {
-   drc_dialog_message[0] = 0;
+  drc_dialog_message[0] = 0;
+  if (gui->drc_gui != NULL)
+    {
+      gui->drc_gui->reset_drc_dialog_message ();
+    }
 }
 #ifdef __GNUC__
 static void append_drc_dialog_message(const char *fmt, ...)
@@ -170,7 +220,7 @@ static void append_drc_dialog_message(const char *fmt, ...)
 static void
 append_drc_dialog_message(const char *fmt, ...)
 {
-  size_t len = strlen (drc_dialog_message), 
+  size_t len = strlen (drc_dialog_message),
          remained = sizeof (drc_dialog_message) - len - 1;
   va_list ap;
   va_start (ap, fmt);
@@ -182,6 +232,33 @@ append_drc_dialog_message(const char *fmt, ...)
   va_end (ap);
 }
 
+static void GotoError (void);
+
+static void
+append_drc_violation (DrcViolationType *violation)
+{
+  if (gui->drc_gui != NULL)
+    {
+      gui->drc_gui->append_drc_violation (violation);
+    }
+  else
+    {
+      /* Fallback to formatting the violation message as text */
+      append_drc_dialog_message ("%s\n", violation->title);
+      append_drc_dialog_message (_("near (%.*f, %.*f)\n"),
+                                 LENGTH_DIGITS, LENGTH_TO_HUMAN (violation->x),
+                                 LENGTH_DIGITS, LENGTH_TO_HUMAN (violation->y));
+      GotoError ();
+    }
+
+  if (gui->drc_gui == NULL || gui->drc_gui->log_drc_violations )
+    {
+      Message (_("WARNING!  Design Rule error - %s\n"), violation->title);
+      Message (_("near location (%.*f, %.*f)\n"),
+               LENGTH_DIGITS, LENGTH_TO_HUMAN (violation->x),
+               LENGTH_DIGITS, LENGTH_TO_HUMAN (violation->y));
+    }
+}
 /*
  * message when asked about continuing DRC checks after next 
  * violation is found.
@@ -194,9 +271,18 @@ static int
 throw_drc_dialog(void)
 {
   int r;
-  append_drc_dialog_message (DRC_CONTINUE); 
-  r = gui->confirm_dialog (drc_dialog_message, DRC_CANCEL, DRC_NEXT);
-  reset_drc_dialog_message();
+
+  if (gui->drc_gui != NULL)
+    {
+      r = gui->drc_gui->throw_drc_dialog ();
+    }
+  else
+    {
+      /* Fallback to formatting the violation message as text */
+      append_drc_dialog_message (DRC_CONTINUE);
+      r = gui->confirm_dialog (drc_dialog_message, DRC_CANCEL, DRC_NEXT);
+      reset_drc_dialog_message();
+    }
   return r;
 }
 
@@ -261,6 +347,8 @@ static Boolean PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr,
 static void DrawNewConnections (void);
 static void ResetConnections (Boolean);
 static void DumpList (void);
+static void LocateError (LocationType *, LocationType *);
+static void BuildObjectList (int *, long int **, int **);
 static void GotoError (void);
 static Boolean DRCFind (int, void *, void *, void *);
 static Boolean ListStart (int, void *, void *, void *);
@@ -3470,7 +3558,12 @@ DumpList (void)
 static Boolean
 DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
 {
-  reset_drc_dialog_message();
+  LocationType x, y;
+  int object_count;
+  long int *object_id_list;
+  int *object_type_list;
+  DrcViolationType *violation;
+
   if (PCB->Shrink != 0)
     {
       Bloat = -PCB->Shrink;
@@ -3488,10 +3581,6 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
       if (DoIt (True, False))
         {
           DumpList ();
-          Message
-            (_
-             ("WARNING!!  Design Rule Error - potential for broken trace!\n"));
-          append_drc_dialog_message(_("potential for broken trace\n"));
           /* make the flag changes undoable */
           TheFlag = FOUNDFLAG | SELECTEDFLAG;
           ResetConnections (False);
@@ -3514,7 +3603,26 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
           User = False;
           drc = False;
           drcerr_count++;
-          GotoError ();
+          LocateError (&x, &y);
+          BuildObjectList (&object_count, &object_id_list, &object_type_list);
+          violation = pcb_drc_violation_new (_("Potential for broken trace"),
+                                             _("Insufficient overlap between objects can lead to broken tracks\n"
+                                               "due to registration errors with old wheel style photo-plotters."),
+                                             x, y,
+                                             0,     /* ANGLE OF ERROR UNKNOWN */
+                                             FALSE, /* MEASUREMENT OF ERROR UNKNOWN */
+                                             0,     /* MAGNITUDE OF ERROR UNKNOWN */
+                                             LENGTH_TO_HUMAN(PCB->Shrink),
+                                             LENGTH_DIGITS,
+                                             LENGTH_UNITS_STRING,
+                                             object_count,
+                                             object_id_list,
+                                             object_type_list);
+          append_drc_violation (violation);
+          pcb_drc_violation_free (violation);
+          free (object_id_list);
+          free (object_type_list);
+
           if (!throw_drc_dialog())
             return (True);
           IncrementUndoSerialNumber ();
@@ -3533,8 +3641,6 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
   while (DoIt (True, False))
     {
       DumpList ();
-      Message (_("WARNING!  Design Rule error - copper areas too close!\n"));
-      append_drc_dialog_message(_("copper areas too close\n"));
       /* make the flag changes undoable */
       TheFlag = FOUNDFLAG | SELECTEDFLAG;
       ResetConnections (False);
@@ -3555,7 +3661,25 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
       DoIt (True, True);
       DumpList ();
       drcerr_count++;
-      GotoError ();
+      LocateError (&x, &y);
+      BuildObjectList (&object_count, &object_id_list, &object_type_list);
+      violation = pcb_drc_violation_new (_("Copper areas too close"),
+                                         _("Circuits that are too close may bridge during imaging, etching,\n"
+                                           "plating, or soldering processes resulting in a direct short."),
+                                         x, y,
+                                         0,     /* ANGLE OF ERROR UNKNOWN */
+                                         FALSE, /* MEASUREMENT OF ERROR UNKNOWN */
+                                         0,     /* MAGNITUDE OF ERROR UNKNOWN */
+                                         LENGTH_TO_HUMAN(PCB->Bloat),
+                                         LENGTH_DIGITS,
+                                         LENGTH_UNITS_STRING,
+                                         object_count,
+                                         object_id_list,
+                                         object_type_list);
+      append_drc_violation (violation);
+      pcb_drc_violation_free (violation);
+      free (object_id_list);
+      free (object_type_list);
       User = False;
       drc = False;
       if (!throw_drc_dialog())
@@ -3606,6 +3730,13 @@ static int
 drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
               int type, void *ptr1, void *ptr2)
 {
+  char *message;
+  LocationType x, y;
+  int object_count;
+  long int *object_id_list;
+  int *object_type_list;
+  DrcViolationType *violation;
+
   LineTypePtr line = (LineTypePtr) ptr2;
   ArcTypePtr arc = (ArcTypePtr) ptr2;
   PinTypePtr pin = (PinTypePtr) ptr2;
@@ -3622,9 +3753,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
           SET_FLAG (TheFlag, line);
-          Message (_("Line with insufficient clearance inside polygon\n"));
-          append_drc_dialog_message(_("line inside polygon\n"
-            "with insufficient clearance\n"));
+          message = _("Line with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
       break;
@@ -3633,9 +3762,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
           SET_FLAG (TheFlag, arc);
-          Message (_("Arc with insufficient clearance inside polygon\n"));
-          append_drc_dialog_message(_("arc inside polygon\n"
-            "with insufficient clearance\n"));
+          message = _("Arc with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
       break;
@@ -3645,9 +3772,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
 	  {
 	    AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
 	    SET_FLAG (TheFlag, pad);
-	    Message (_("Pad with insufficient clearance inside polygon\n"));
-	    append_drc_dialog_message(_("pad inside polygon\n"
-          "with insufficient clearance\n"));
+	    message = _("Pad with insufficient clearance inside polygon\n");
 	    goto doIsBad;
 	  }
       break;
@@ -3656,9 +3781,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
           SET_FLAG (TheFlag, pin);
-          Message (_("Pin with insufficient clearance inside polygon\n"));
-          append_drc_dialog_message(_("pin inside polygon\n"
-            "with insufficient clearance\n"));
+          message = _("Pin with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
       break;
@@ -3667,16 +3790,12 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
           SET_FLAG (TheFlag, pin);
-          Message (_("Via with insufficient clearance inside polygon\n"));
-          append_drc_dialog_message(_("via inside polygon\n"
-            "with insufficient clearance\n"));
+          message = _("Via with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
       break;
     default:
       Message ("hace: Bad Plow object in callback\n");
-      append_drc_dialog_message(_("wrong object inside polygon\n"
-        "with insufficient clearance\n"));
     }
   return 0;
 
@@ -3686,7 +3805,25 @@ doIsBad:
   DrawPolygon (layer, polygon, 0);
   DrawObject (type, ptr1, ptr2, 0);
   drcerr_count++;
-  GotoError ();
+  LocateError (&x, &y);
+  BuildObjectList (&object_count, &object_id_list, &object_type_list);
+  violation = pcb_drc_violation_new (message,
+                                     _("Circuits that are too close may bridge during imaging, etching,\n"
+                                       "plating, or soldering processes resulting in a direct short."),
+                                     x, y,
+                                     0,     /* ANGLE OF ERROR UNKNOWN */
+                                     FALSE, /* MEASUREMENT OF ERROR UNKNOWN */
+                                     0,     /* MAGNITUDE OF ERROR UNKNOWN */
+                                     LENGTH_TO_HUMAN(PCB->Bloat),
+                                     LENGTH_DIGITS,
+                                     LENGTH_UNITS_STRING,
+                                     object_count,
+                                     object_id_list,
+                                     object_type_list);
+  append_drc_violation (violation);
+  pcb_drc_violation_free (violation);
+  free (object_id_list);
+  free (object_type_list);
   if (!throw_drc_dialog())
     {
       IsBad = True;
@@ -3704,9 +3841,16 @@ doIsBad:
 int
 DRCAll (void)
 {
+  LocationType x, y;
+  int object_count;
+  long int *object_id_list;
+  int *object_type_list;
+  DrcViolationType *violation;
   int tmpcnt;
   int nopastecnt = 0;
 
+  reset_drc_dialog_message();
+
   IsBad = False;
   drcerr_count = 0;
   SaveStackAndVisibility ();
@@ -3781,12 +3925,28 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
             SET_FLAG (TheFlag, line);
-            Message (_("Line is too thin\n"));
-            append_drc_dialog_message(_("too thin line\n"));
             DrawLine (layer, line, 0);
             drcerr_count++;
             SetThing (LINE_TYPE, layer, line, line);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Line width is too thin"),
+                                               _("Process specifications dictate a minimum feature-width\n"
+                                                 "that can reliably be reproduced"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(line->Thickness),
+                                               LENGTH_TO_HUMAN(PCB->minWid),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3809,12 +3969,28 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
             SET_FLAG (TheFlag, arc);
-            Message (_("Arc is too thin\n"));
-            append_drc_dialog_message(_("too thin arc\n"));
             DrawArc (layer, arc, 0);
             drcerr_count++;
             SetThing (ARC_TYPE, layer, arc, arc);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Arc width is too thin"),
+                                               _("Process specifications dictate a minimum feature-width\n"
+                                                 "that can reliably be reproduced"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(arc->Thickness),
+                                               LENGTH_TO_HUMAN(PCB->minWid),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3838,13 +4014,28 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
             SET_FLAG (TheFlag, pin);
-            Message (_
-                     ("Pin annular ring is too small based on minimum annular ring\n"));
-            append_drc_dialog_message(_("pin ring thinner\nthan min annular ring\n"));
             DrawPin (pin, 0);
             drcerr_count++;
             SetThing (PIN_TYPE, element, pin, pin);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Pin annular ring too small"),
+                                               _("Annular rings that are too small may erode during etching,\n"
+                                                 "resulting in a broken connection"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN((pin->Thickness - pin->DrillingHole) / 2),
+                                               LENGTH_TO_HUMAN(PCB->minRing),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3857,12 +4048,27 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
             SET_FLAG (TheFlag, pin);
-            Message (_("Pin drill size is too small\n"));
-            append_drc_dialog_message(_("too small pin drill\n"));
             DrawPin (pin, 0);
             drcerr_count++;
             SetThing (PIN_TYPE, element, pin, pin);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Pin drill size is too small"),
+                                               _("Process rules dictate the minimum drill size which can be used"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(pin->DrillingHole),
+                                               LENGTH_TO_HUMAN(PCB->minDrill),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3885,12 +4091,28 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
             SET_FLAG (TheFlag, pad);
-            Message (_("Pad is too thin\n"));
-            append_drc_dialog_message(_("too thin pad\n"));
             DrawPad (pad, 0);
             drcerr_count++;
             SetThing (PAD_TYPE, element, pad, pad);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Pad is too thin"),
+                                               _("Pads which are too thin may erode during etching,\n"
+                                                  "resulting in a broken or unreliable connection"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(pad->Thickness),
+                                               LENGTH_TO_HUMAN(PCB->minWid),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3914,13 +4136,28 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
             SET_FLAG (TheFlag, via);
-            Message (_
-                     ("Via annular ring is too small based on minimum annular ring\n"));
-            append_drc_dialog_message(_("via ring thinner\nthan min annular ring\n"));
             DrawVia (via, 0);
             drcerr_count++;
             SetThing (VIA_TYPE, via, via, via);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Via annular ring too small"),
+                                               _("Annular rings that are too small may erode during etching,\n"
+                                                 "resulting in a broken connection"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN((via->Thickness - via->DrillingHole) / 2),
+                                               LENGTH_TO_HUMAN(PCB->minRing),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3933,12 +4170,27 @@ DRCAll (void)
           {
             AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
             SET_FLAG (TheFlag, via);
-            Message (_("Via drill size is too small\n"));
-            append_drc_dialog_message(_("too small via drill\n"));
             DrawVia (via, 0);
             drcerr_count++;
             SetThing (VIA_TYPE, via, via, via);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Via drill size is too small"),
+                                               _("Process rules dictate the minimum drill size which can be used"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(via->DrillingHole),
+                                               LENGTH_TO_HUMAN(PCB->minDrill),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3966,12 +4218,28 @@ DRCAll (void)
         if (line->Thickness < PCB->minSlk)
           {
             SET_FLAG (TheFlag, line);
-            Message (_("Silk line is too thin\n"));
-            append_drc_dialog_message(_("too thin silk line\n"));
             DrawLine (layer, line, 0);
             drcerr_count++;
             SetThing (LINE_TYPE, layer, line, line);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+            violation = pcb_drc_violation_new (_("Silk line is too thin"),
+                                               _("Process specifications dictate a minimum silkscreen feature-width\n"
+                                                 "that can reliably be reproduced"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(line->Thickness),
+                                               LENGTH_TO_HUMAN(PCB->minSlk),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -3998,16 +4266,46 @@ DRCAll (void)
         END_LOOP;
         if (tmpcnt > 0)
           {
+            char *title;
+            char *name;
+            char *buffer;
+            int buflen;
+
             SET_FLAG (TheFlag, element);
-            Message (_("Element %s has %d silk lines which are too thin\n"),
-                     UNKNOWN (NAMEONPCB_NAME (element)), tmpcnt);
-            append_drc_dialog_message (_
-                     ("%i silk lines\n of element %s\nare too thin\n"),
-                     tmpcnt, UNKNOWN (NAMEONPCB_NAME (element)));
             DrawElement (element, 0);
             drcerr_count++;
             SetThing (ELEMENT_TYPE, element, element, element);
-            GotoError ();
+            LocateError (&x, &y);
+            BuildObjectList (&object_count, &object_id_list, &object_type_list);
+
+            title = _("Element %s has %i silk lines which are too thin");
+            name = UNKNOWN (NAMEONPCB_NAME (element));
+
+            /* -4 is for the %s and %i place-holders */
+            /* +11 is the max printed length for a 32 bit integer */
+            /* +1 is for the \0 termination */
+            buflen = strlen (title) - 4 + strlen (name) + 11 + 1;
+            buffer = malloc (buflen);
+            snprintf (buffer, buflen, title, name, tmpcnt);
+
+            violation = pcb_drc_violation_new (buffer,
+                                               _("Process specifications dictate a minimum silkscreen\n"
+                                               "feature-width that can reliably be reproduced"),
+                                               x, y,
+                                               0,    /* ANGLE OF ERROR UNKNOWN */
+                                               0,    /* MINIMUM OFFENDING WIDTH UNKNOWN */
+                                               TRUE, /* MEASUREMENT OF ERROR KNOWN */
+                                               LENGTH_TO_HUMAN(PCB->minSlk),
+                                               LENGTH_DIGITS,
+                                               LENGTH_UNITS_STRING,
+                                               object_count,
+                                               object_id_list,
+                                               object_type_list);
+            free (buffer);
+            append_drc_violation (violation);
+            pcb_drc_violation_free (violation);
+            free (object_id_list);
+            free (object_type_list);
             if (!throw_drc_dialog())
               {
                 IsBad = True;
@@ -4039,36 +4337,34 @@ DRCAll (void)
 }
 
 /*----------------------------------------------------------------------------
- * center the display to show the offending item (thing)
+ * Locate the coordinatates of offending item (thing)
  */
 static void
-GotoError (void)
+LocateError (LocationType *x, LocationType *y)
 {
-  LocationType X, Y;
-
   switch (thing_type)
     {
     case LINE_TYPE:
       {
         LineTypePtr line = (LineTypePtr) thing_ptr3;
-        X = (line->Point1.X + line->Point2.X) / 2;
-        Y = (line->Point1.Y + line->Point2.Y) / 2;
+        *x = (line->Point1.X + line->Point2.X) / 2;
+        *y = (line->Point1.Y + line->Point2.Y) / 2;
         break;
       }
     case ARC_TYPE:
       {
         ArcTypePtr arc = (ArcTypePtr) thing_ptr3;
-        X = arc->X;
-        Y = arc->Y;
+        *x = arc->X;
+        *y = arc->Y;
         break;
       }
     case POLYGON_TYPE:
       {
         PolygonTypePtr polygon = (PolygonTypePtr) thing_ptr3;
-        X =
+        *x =
           (polygon->Clipped->contours->xmin +
            polygon->Clipped->contours->xmax) / 2;
-        Y =
+        *y =
           (polygon->Clipped->contours->ymin +
            polygon->Clipped->contours->ymax) / 2;
         break;
@@ -4077,34 +4373,71 @@ GotoError (void)
     case VIA_TYPE:
       {
         PinTypePtr pin = (PinTypePtr) thing_ptr3;
-        X = pin->X;
-        Y = pin->Y;
+        *x = pin->X;
+        *y = pin->Y;
         break;
       }
     case PAD_TYPE:
       {
         PadTypePtr pad = (PadTypePtr) thing_ptr3;
-        X = (pad->Point1.X + pad->Point2.X) / 2;
-        Y = (pad->Point1.Y + pad->Point2.Y) / 2;
+        *x = (pad->Point1.X + pad->Point2.X) / 2;
+        *y = (pad->Point1.Y + pad->Point2.Y) / 2;
         break;
       }
     case ELEMENT_TYPE:
       {
         ElementTypePtr element = (ElementTypePtr) thing_ptr3;
-        X = element->MarkX;
-        Y = element->MarkY;
+        *x = element->MarkX;
+        *y = element->MarkY;
         break;
       }
     default:
       return;
     }
-  {
-    int digits = Settings.grid_units_mm ? 4: 2;
-    double scale = Settings.grid_units_mm ? COOR_TO_MM : 1./100,
-      x = X * scale, y = Y * scale;
-    Message (_("near location (%.*f,%.*f)\n"), digits, x, digits, y);
-    append_drc_dialog_message("near (%.*f,%.*f)\n", digits, x, digits, y);
-  }
+}
+
+
+/*----------------------------------------------------------------------------
+ * Build a list of the of offending items by ID. (Currently just "thing")
+ */
+static void
+BuildObjectList (int *object_count, long int **object_id_list, int **object_type_list)
+{
+  *object_count = 0;
+  *object_id_list = NULL;
+
+  switch (thing_type)
+    {
+    case LINE_TYPE:
+    case ARC_TYPE:
+    case POLYGON_TYPE:
+    case PIN_TYPE:
+    case VIA_TYPE:
+    case PAD_TYPE:
+    case ELEMENT_TYPE:
+      *object_count = 1;
+      *object_id_list = malloc (sizeof (long int));
+      *object_type_list = malloc (sizeof (int));
+      **object_id_list = ((AnyObjectType *)thing_ptr3)->ID;
+      **object_type_list = thing_type;
+      return;
+
+    default:
+      return;
+    }
+}
+
+
+/*----------------------------------------------------------------------------
+ * center the display to show the offending item (thing)
+ */
+static void
+GotoError (void)
+{
+  LocationType X, Y;
+
+  LocateError (&X, &Y);
+
   switch (thing_type)
     {
     case LINE_TYPE:
diff --git a/src/global.h b/src/global.h
index 93af49b..3c383be 100644
--- a/src/global.h
+++ b/src/global.h
@@ -53,6 +53,7 @@
 
 typedef struct BoxType BoxType, *BoxTypePtr;
 typedef struct polygon_st PolygonType, *PolygonTypePtr;
+typedef struct drc_violation_st DrcViolationType, *DrcViolationTypePtr;
 
 #include "hid.h"
 
@@ -701,6 +702,22 @@ typedef struct
 
 } BoxListType, *BoxListTypePtr;
 
+struct drc_violation_st
+{
+  char *title;
+  char *explanation;
+  int x;
+  int y;
+  int angle;
+  int have_measured;
+  double measured_value;
+  double required_value;
+  int value_digits;
+  const char *value_units;
+  int object_count;
+  long int *object_id_list;
+  int *object_type_list;
+};
 
 /* ---------------------------------------------------------------------------
  * define supported types of undo operations
diff --git a/src/gpcb-menu.res b/src/gpcb-menu.res
index 2dcf4b8..6cde1f0 100644
--- a/src/gpcb-menu.res
+++ b/src/gpcb-menu.res
@@ -447,6 +447,7 @@ MainMenu =
   {Window
    {"Library" DoWindows(Library) a={"i" "<Key>i"}}
    {"Message Log" DoWindows(Log)}
+   {"DRC Check" DoWindows(DRC)}
    {"Netlist" DoWindows(Netlist)}
    {"Command Entry" Command() a={":" "<Key>:"}}
    {"Pinout" Display(Pinout) a={"Shift-D" "Shift<Key>d"}}
diff --git a/src/hid.h b/src/hid.h
index dc73563..3efb9ed 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -227,6 +227,16 @@ typedef enum
   PCB_WATCH_HANGUP   = 1 << 3  /**< As in POLLHUP */
 } PCBWatchFlags;
 
+/* DRC GUI Hooks */
+  typedef struct
+  {
+    int log_drc_overview;
+    int log_drc_violations;
+    void (*reset_drc_dialog_message) (void);
+    void (*append_drc_violation) (DrcViolationType *violation);
+    int (*throw_drc_dialog) (void);
+  } HID_DRC_GUI;
+
 
 /* This is the main HID structure.  */
   typedef struct
@@ -534,6 +544,8 @@ typedef enum
        Returns nonzero if the user wishes to cancel the operation.  */
     int (*progress) (int so_far_, int total_, const char *message_);
 
+    HID_DRC_GUI *drc_gui;
+
   } HID;
 
 /* Call this as soon as possible from main().  No other HID calls are
diff --git a/src/hid/batch/batch.c b/src/hid/batch/batch.c
index 3e80139..5479b46 100644
--- a/src/hid/batch/batch.c
+++ b/src/hid/batch/batch.c
@@ -507,7 +507,8 @@ HID batch_gui = {
   batch_attribute_dialog,
   batch_show_item,
   batch_beep,
-  batch_progress
+  batch_progress,
+  0 /* batch_drc_gui */
 };
 
 #include "dolists.h"
diff --git a/src/hid/bom/bom.c b/src/hid/bom/bom.c
index 18fca46..9892269 100644
--- a/src/hid/bom/bom.c
+++ b/src/hid/bom/bom.c
@@ -587,6 +587,7 @@ HID bom_hid = {
   0,				/* bom_show_item */
   0,				/* bom_beep */
   0,				/* bom_progress */
+  0,				/* bom_drc_gui */
 };
 
 void
diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index 57509dc..5c33332 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -394,7 +394,8 @@ HID hid_nogui = {
   nogui_attribute_dialog,
   nogui_show_item,
   nogui_beep,
-  nogui_progress
+  nogui_progress,
+  0 /* nogui_drc_gui */
 };
 
 #define AD(x) if (!d->x) d->x = s->x
@@ -447,4 +448,5 @@ apply_default_hid (HID * d, HID * s)
   AD (show_item);
   AD (beep);
   AD (progress);
+  AD (drc_gui);
 }
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index 054208c..ee2a0ec 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -1120,7 +1120,9 @@ static HID gerber_hid = {
   0 /* gerber_fileselect */ ,
   0 /* gerber_attribute_dialog */ ,
   0 /* gerber_show_item */ ,
-  0				/* gerber_beep */
+  0 /* gerber_beep */ ,
+  0 /* gerber_progress */ ,
+  0 /* gerber_drc_gui */
 };
 
 void
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 484cee0..3abbcdc 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1579,7 +1579,8 @@ HID ghid_hid = {
   ghid_attribute_dialog,
   ghid_show_item,
   ghid_beep,
-  ghid_progress
+  ghid_progress,
+  0 /* ghid_drc_gui */
 };
 
 HID ghid_extents = {
@@ -1640,7 +1641,8 @@ HID ghid_extents = {
   0 /* ghid_attribute_dialog */ ,
   0 /* ghid_show_item */ ,
   0 /* ghid_beep */ ,
-  0 /* ghid_progress */
+  0 /* ghid_progress */ ,
+  0 /* ghid_drc_gui */
 };
 
 /* ------------------------------------------------------------ 
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index d2b680b..99f9851 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -3928,7 +3928,8 @@ HID lesstif_gui = {
   lesstif_attribute_dialog,
   lesstif_show_item,
   lesstif_beep,
-  lesstif_progress
+  lesstif_progress,
+  0 /* lesstif_drc_gui */
 };
 
 #include "dolists.h"
diff --git a/src/hid/lpr/lpr.c b/src/hid/lpr/lpr.c
index cbf19c6..31d288e 100644
--- a/src/hid/lpr/lpr.c
+++ b/src/hid/lpr/lpr.c
@@ -163,7 +163,8 @@ HID lpr_hid = {
   0 /* lpr_attribute_dialog */ ,
   0 /* lpr_show_item */ ,
   0 /* lpr_beep */ ,
-  0 /* lpr_progress */
+  0 /* lpr_progress */ ,
+  0 /* lpr_drc_gui */
 };
 
 void
diff --git a/src/hid/nelma/nelma.c b/src/hid/nelma/nelma.c
index d06193c..b186345 100644
--- a/src/hid/nelma/nelma.c
+++ b/src/hid/nelma/nelma.c
@@ -1098,7 +1098,8 @@ HID             nelma_hid = {
 	0 /* nelma_attribute_dialog */ ,
 	0 /* nelma_show_item */ ,
 	0 /* nelma_beep */ ,
-	0			/* nelma_progress */
+	0 /* nelma_progress */ ,
+	0 /* nelma_drc_gui */
 };
 
 #include "dolists.h"
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index 2f4d959..4c97913 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -1372,7 +1372,8 @@ HID png_hid = {
   0 /* png_attribute_dialog */ ,
   0 /* png_show_item */ ,
   0 /* png_beep */ ,
-  0 /* png_progress */
+  0 /* png_progress */ ,
+  0 /* png_drc_gui */
 };
 
 #include "dolists.h"
diff --git a/src/hid/ps/eps.c b/src/hid/ps/eps.c
index 15febe8..ef00c52 100644
--- a/src/hid/ps/eps.c
+++ b/src/hid/ps/eps.c
@@ -659,7 +659,9 @@ static HID eps_hid = {
   0 /* eps_prompt_for */ ,
   0 /* eps_attribute_dialog */ ,
   0 /* eps_show_item */ ,
-  0				/* eps_beep */
+  0 /* eps_beep */ ,
+  0 /* eps_progress */ ,
+  0 /* eps_drc_gui */
 };
 
 void
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index d742a5f..85e013f 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -1199,7 +1199,8 @@ HID ps_hid = {
   0 /* ps_attribute_dialog */ ,
   0 /* ps_show_item */ ,
   0 /* ps_beep */ ,
-  0 /* ps_progress */
+  0 /* ps_progress */ ,
+  0 /* ps_drc_gui */
 };
 
 #include "dolists.h"




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