[hamradio-commits] [xnec2c] 01/07: New upstream version 3.6.1-beta

Dave Hibberd hibby-guest at moszumanska.debian.org
Sat Jan 20 15:57:35 UTC 2018


This is an automated email from the git hooks/post-receive script.

hibby-guest pushed a commit to branch master
in repository xnec2c.

commit beaf00cfd44751c4ff8a2a7bba243b8cecb88c7e
Author: hibby <d at vehibberd.com>
Date:   Sat Jan 20 13:34:13 2018 +0000

    New upstream version 3.6.1-beta
---
 ABOUT-NLS                                          |  1379 ++
 INSTALL                                            |   320 +-
 Makefile.am                                        |    88 +-
 Makefile.in                                        |   200 +-
 aclocal.m4                                         |   751 +-
 autogen.sh                                         |  1939 +-
 compile                                            |     9 +-
 config.guess                                       |  1421 ++
 config.h.in                                        |   468 +-
 config.rpath                                       |   684 +
 config.sub                                         |  1807 ++
 configure                                          |  8246 ++++++--
 configure.ac                                       |    18 +-
 depcomp                                            |     6 +-
 doc/xnec2c.1.gz                                    |   Bin 398 -> 466 bytes
 doc/xnec2c.html                                    |    37 +-
 examples/10-20m_horizomni.nec                      |    22 -
 .../{14-30MHz_logper.nec => 10-20m_logper.nec}     |     0
 examples/10-30m_inv_cone.nec                       |    14 +-
 examples/10-40m_windom.nec                         |    12 +
 examples/10-80m_G5RV.nec                           |     8 +-
 examples/10-80m_Inverted-L.nec                     |     8 +-
 examples/20-40m_ground_plane.nec                   |    10 +-
 examples/2m_bigwheel.nec                           |    18 +-
 examples/2m_xpol_omni.nec                          |     2 +-
 examples/30-80m_inv_L.nec                          |     2 +-
 examples/twin-loop.nec                             |     2 +-
 xnec2c.desktop => files/xnec2c.desktop             |     2 +-
 files/xnec2c.png                                   |   Bin 0 -> 7346 bytes
 install-sh                                         |     4 +-
 intltool-extract.in                                |     0
 intltool-merge.in                                  |     0
 intltool-update.in                                 |     0
 m4/codeset.m4                                      |    24 +
 m4/extern-inline.m4                                |   102 +
 m4/fcntl-o.m4                                      |   134 +
 m4/gettext.m4                                      |   420 +
 m4/glibc2.m4                                       |    31 +
 m4/glibc21.m4                                      |    34 +
 m4/iconv.m4                                        |   271 +
 m4/intdiv0.m4                                      |    87 +
 m4/intl.m4                                         |   304 +
 m4/intlmacosx.m4                                   |    56 +
 m4/intmax.m4                                       |    36 +
 m4/inttypes-pri.m4                                 |    42 +
 m4/inttypes_h.m4                                   |    29 +
 m4/lcmessage.m4                                    |    35 +
 m4/lib-ld.m4                                       |   119 +
 m4/lib-link.m4                                     |   777 +
 m4/lib-prefix.m4                                   |   224 +
 m4/lock.m4                                         |    42 +
 m4/longlong.m4                                     |   113 +
 m4/nls.m4                                          |    32 +
 m4/po.m4                                           |   453 +
 m4/printf-posix.m4                                 |    48 +
 m4/progtest.m4                                     |    91 +
 m4/size_max.m4                                     |    79 +
 m4/stdint_h.m4                                     |    27 +
 m4/threadlib.m4                                    |   389 +
 m4/uintmax_t.m4                                    |    30 +
 m4/visibility.m4                                   |    77 +
 m4/wchar_t.m4                                      |    24 +
 m4/wint_t.m4                                       |    32 +
 m4/xsize.m4                                        |    12 +
 missing                                            |     6 +-
 po/ChangeLog                                       |     0
 po/LINGUAS                                         |     0
 po/Makefile.in.in                                  |   556 +-
 po/Makevars                                        |    78 +
 po/POTFILES.in                                     |    15 +-
 po/Rules-quot                                      |    58 +
 po/boldquot.sed                                    |    10 +
 po/en at boldquot.header                              |    25 +
 po/en at quot.header                                  |    22 +
 po/insert-header.sin                               |    23 +
 po/quot.sed                                        |     6 +
 po/remove-potcdate.sin                             |    19 +
 po/stamp-po                                        |     1 +
 po/xnec2c.pot                                      |  2437 +++
 src/Makefile.am                                    |    10 +-
 src/Makefile.in                                    |   111 +-
 src/calculations.c                                 |   476 +-
 src/calculations.h                                 |     6 +-
 src/callback_func.c                                |   654 +-
 src/callback_func.h                                |    10 +-
 src/callbacks.c                                    |  2850 +--
 src/callbacks.h                                    |  1329 +-
 src/cmnd_edit.c                                    |   957 +-
 src/cmnd_edit.h                                    |     3 -
 src/common.h                                       |   834 +-
 src/draw.c                                         |   111 +-
 src/draw.h                                         |     3 -
 src/draw_radiation.c                               |   325 +-
 src/draw_radiation.h                               |     3 -
 src/draw_structure.c                               |   113 +-
 src/draw_structure.h                               |     3 -
 src/editors.h                                      |     2 -
 src/fields.c                                       |  1275 +-
 src/fields.h                                       |     2 -
 src/fork.c                                         |   365 +-
 src/fork.h                                         |     2 -
 src/geom_edit.c                                    |  1108 +-
 src/geom_edit.h                                    |     3 -
 src/geometry.c                                     |   272 +-
 src/geometry.h                                     |     3 -
 src/gnuplot.c                                      |    57 +-
 src/gnuplot.h                                      |     3 -
 src/ground.c                                       |    10 +-
 src/ground.h                                       |     3 -
 src/input.c                                        |  2536 ++-
 src/input.h                                        |     3 -
 src/interface.c                                    | 10398 +---------
 src/interface.h                                    |   792 +-
 src/main.c                                         |   133 +-
 src/main.h                                         |     4 +-
 src/matrix.c                                       |  1004 +-
 src/matrix.h                                       |     3 -
 src/nec2_model.c                                   |   277 +-
 src/nec2_model.h                                   |     3 -
 src/network.c                                      |    17 +-
 src/network.h                                      |     3 -
 src/plot_freqdata.c                                |  1545 +-
 src/plot_freqdata.h                                |     3 -
 src/radiation.c                                    |   131 +-
 src/radiation.h                                    |     3 -
 src/shared.c                                       |    83 +-
 src/shared.h                                       |   124 +-
 src/somnec.c                                       |  1324 +-
 src/somnec.h                                       |     3 -
 src/support.c                                      |   144 -
 src/support.h                                      |    69 -
 src/utils.c                                        |    53 +-
 src/utils.h                                        |     6 -
 src/xnec2c.c                                       |    81 +-
 src/xnec2c.h                                       |     4 +-
 xnec2c.glade                                       | 19636 -------------------
 xnec2c.gladep                                      |     8 -
 xnec2c.png                                         |   Bin 71540 -> 0 bytes
 xnec2c/xnec2c.glade                                | 13691 +++++++++++++
 139 files changed, 44988 insertions(+), 42903 deletions(-)

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..3cc8286
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1379 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is a
+way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this 'ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU 'gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU 'gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+1.1 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU 'gettext'.  Other packages have their own ways to
+internationalization, predating GNU 'gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU 'gettext' functions.  Installers may use special
+options at configuration time for changing the default behaviour.  The
+command:
+
+     ./configure --disable-nls
+
+will _totally_ disable translation of messages.
+
+   When you already have GNU 'gettext' installed on your system and run
+configure without an option for your new package, 'configure' will
+probably detect the previously built and installed 'libintl' library and
+will decide to use it.  If not, you may have to to use the
+'--with-libintl-prefix' option to tell 'configure' where to look for it.
+
+   Internationalized packages usually have many 'po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at 'configure' time by using the
+'--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable 'LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+'LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.2 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the 'LANG' environment variable to the appropriate
+'LL_CC' combination.  If you happen to have the 'LC_ALL' or some other
+'LC_xxx' environment variables set, you should unset them before setting
+'LANG', otherwise the setting of 'LANG' will not have the desired
+effect.  Here 'LL' is an ISO 639 two-letter language code, and 'CC' is
+an ISO 3166 two-letter country code.  For example, let's suppose that
+you speak German and live in Germany.  At the shell prompt, merely
+execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in
+'sh') or 'export LANG=de_DE' (in 'bash').  This can be done from your
+'.login' or '.profile' file, once and for all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of 'LL_CC', with 'LL' denoting the
+language and 'CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are used,
+such as 'LL' or 'LL_CC.ENCODING'.  You can get the list of locales
+supported by your system for your language by running the command
+'locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+'LANGUAGE'.  GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG'
+for the purpose of message handling, but you still need to have 'LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather read
+translations in German than English for when Swedish is not available,
+set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from 'no' to 'nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under 'nb' and some older ones under 'no', it's recommended
+for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and
+older translations are used.
+
+   In the 'LANGUAGE' environment variable, but not in the 'LANG'
+environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to
+denote the language's main dialect.  For example, 'de' is equivalent to
+'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese
+as spoken in Portugal) in this context.
+
+1.3 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+'http://translationproject.org/', in the "Teams" area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+'-request' appended.  For example, speakers of Swedish can send a
+message to 'sv-request at li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate _actively_
+in translations, or at solving translational difficulties, rather than
+merely lurking around.  If your team does not exist yet and you want to
+start one, or if you are unsure about what to do or how to get started,
+please write to 'coordinator at translationproject.org' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.4 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of Jun 2014.
+The matrix shows, in regard of each package, for which languages PO
+files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am an ar as ast az be bg bn bn_IN bs ca crh cs
+                        +---------------------------------------------------+
+     a2ps               |                       []                []     [] |
+     aegis              |                                                   |
+     anubis             |                                                   |
+     aspell             |                []                       []     [] |
+     bash               |                          []             []     [] |
+     bfd                |                                                   |
+     binutils           |                                         []        |
+     bison              |                                                   |
+     bison-runtime      |                []                                 |
+     buzztrax           |                                                [] |
+     ccd2cue            |                                                   |
+     ccide              |                                                   |
+     cflow              |                                                   |
+     clisp              |                                                   |
+     coreutils          |                                         []     [] |
+     cpio               |                                                   |
+     cppi               |                                                   |
+     cpplib             |                                         []        |
+     cryptsetup         |                                                [] |
+     datamash           |                                                   |
+     denemo             |                                         []     [] |
+     dfarc              |                                         []        |
+     dialog             |       []                                []     [] |
+     dico               |                                                   |
+     diffutils          |                                                [] |
+     dink               |                                         []        |
+     direvent           |                                                   |
+     doodle             |                                                [] |
+     dos2unix           |                                                   |
+     dos2unix-man       |                                                   |
+     e2fsprogs          |                                         []     [] |
+     enscript           |                                         []        |
+     exif               |                                                [] |
+     fetchmail          |                                         []     [] |
+     findutils          |                                                [] |
+     flex               |                                         []        |
+     freedink           |                                         []     [] |
+     fusionforge        |                                                   |
+     gas                |                                                   |
+     gawk               |                                         []        |
+     gcal               |                                         []        |
+     gcc                |                                                   |
+     gdbm               |                                                   |
+     gettext-examples   | []             []        []             []     [] |
+     gettext-runtime    |                          []             []     [] |
+     gettext-tools      |                          []             []        |
+     gjay               |                                                   |
+     glunarclock        |                []        []                    [] |
+     gnubiff            |                                                [] |
+     gnubik             |          []                                       |
+     gnucash            |          ()              ()             []        |
+     gnuchess           |                                                   |
+     gnulib             |                                                [] |
+     gnunet             |                                                   |
+     gnunet-gtk         |                                                   |
+     gold               |                                                   |
+     gphoto2            |                                                [] |
+     gprof              |                          []                       |
+     gramadoir          |                                                   |
+     grep               |                          []             []     [] |
+     grub               |                                         []        |
+     gsasl              |                                                   |
+     gss                |                                                   |
+     gst-plugins-bad    |                          []                    [] |
+     gst-plugins-base   |                          []             []     [] |
+     gst-plugins-good   |                          []             []     [] |
+     gst-plugins-ugly   |                          []             []     [] |
+     gstreamer          |                []        []             []     [] |
+     gtick              |                                                [] |
+     gtkam              |                       []                       [] |
+     gtkspell           | []             []     []                []     [] |
+     guix               |                                                   |
+     guix-packages      |                                                   |
+     gutenprint         |                                         []        |
+     hello              |                                         []        |
+     help2man           |                                                   |
+     help2man-texi      |                                                   |
+     hylafax            |                                                   |
+     idutils            |                                                   |
+     iso_15924          |                                                [] |
+     iso_3166           | []          []        [] [] []  []   [] [] []  [] |
+     iso_3166_2         |                                                   |
+     iso_4217           |                                                [] |
+     iso_639            |             [] []     [] [] []  []      [] []  [] |
+     iso_639_3          |                []                          []     |
+     iso_639_5          |                                                   |
+     jwhois             |                                                   |
+     kbd                |                                                [] |
+     klavaro            |          []              [] []          []     [] |
+     ld                 |                          []                       |
+     leafpad            |                       [] []             []     [] |
+     libc               |                          []             []     [] |
+     libexif            |                       ()                          |
+     libextractor       |                                                   |
+     libgnutls          |                                                [] |
+     libgphoto2         |                                                [] |
+     libgphoto2_port    |                                                [] |
+     libgsasl           |                                                   |
+     libiconv           |                          []                    [] |
+     libidn             |                                                [] |
+     liferea            |          []    []                       []     [] |
+     lilypond           |                                         []     [] |
+     lordsawar          |                                         []        |
+     lprng              |                                                   |
+     lynx               |                                         []     [] |
+     m4                 |                                                [] |
+     mailfromd          |                                                   |
+     mailutils          |                                                   |
+     make               |                                                [] |
+     man-db             |                                         []     [] |
+     man-db-manpages    |                                                   |
+     midi-instruments   |          []                             []     [] |
+     minicom            |                                                [] |
+     mkisofs            |                                                [] |
+     myserver           |                                                [] |
+     nano               |                          []             []     [] |
+     opcodes            |                                                   |
+     parted             |                                                [] |
+     pies               |                                                   |
+     pnmixer            |                                                   |
+     popt               |                                                [] |
+     procps-ng          |                                                   |
+     procps-ng-man      |                                                   |
+     psmisc             |                                                [] |
+     pspp               |                                         []        |
+     pushover           |                                                [] |
+     pwdutils           |                                                   |
+     pyspread           |                                                   |
+     radius             |                                         []        |
+     recode             |                       []                []     [] |
+     recutils           |                                                   |
+     rpm                |                                                   |
+     rush               |                                                   |
+     sarg               |                                                   |
+     sed                |                []        []             []     [] |
+     sharutils          |                                                [] |
+     shishi             |                                                   |
+     skribilo           |                                                   |
+     solfege            |                                         []     [] |
+     solfege-manual     |                                                   |
+     spotmachine        |                                                   |
+     sudo               |                                         []     [] |
+     sudoers            |                                         []     [] |
+     sysstat            |                                                [] |
+     tar                |                          []             []     [] |
+     texinfo            |                                         []     [] |
+     texinfo_document   |                                         []     [] |
+     tigervnc           |                          []                       |
+     tin                |                                                   |
+     tin-man            |                                                   |
+     tracgoogleappsa... |                                                   |
+     trader             |                                                   |
+     util-linux         |                                                [] |
+     ve                 |                                                   |
+     vice               |                                                   |
+     vmm                |                                                   |
+     vorbis-tools       |                                                [] |
+     wastesedge         |                                                   |
+     wcd                |                                                   |
+     wcd-man            |                                                   |
+     wdiff              |                                         []     [] |
+     wget               |                                                [] |
+     wyslij-po          |                                                   |
+     xboard             |                                                   |
+     xdg-user-dirs      | []    []    [] []     [] []     []      [] []  [] |
+     xkeyboard-config   |                          []             []     [] |
+                        +---------------------------------------------------+
+                          af am an ar as ast az be bg bn bn_IN bs ca crh cs
+                           4  0  2  5  3 11   0  8 25  3   3    1 55  4  74
+
+                          da  de  el en en_GB en_ZA eo es et eu fa fi  fr 
+                        +--------------------------------------------------+
+     a2ps               | []  []  []     []         [] [] []       []  []  |
+     aegis              | []  []                       []              []  |
+     anubis             | []  []                       []          []  []  |
+     aspell             | []  []         []         [] []          []  []  |
+     bash               |                           [] []              []  |
+     bfd                | []                           []          []  []  |
+     binutils           |                              []          []  []  |
+     bison              | []  []  []                [] [] []       []  []  |
+     bison-runtime      | []  []  []                [] [] []       []  []  |
+     buzztrax           | []  []                                   []  []  |
+     ccd2cue            | []  []                    []                 []  |
+     ccide              | []  []                    [] []          []  []  |
+     cflow              | []  []                    []             []  []  |
+     clisp              | []  []     []                []              []  |
+     coreutils          | []  []                       [] []           []  |
+     cpio               | []  []                       []          []  []  |
+     cppi               | []  []                    []             []  []  |
+     cpplib             | []  []                    [] []          []  []  |
+     cryptsetup         | []  []                       []          []  []  |
+     datamash           | []  []                    []                 []  |
+     denemo             | []                                               |
+     dfarc              | []  []                    [] []          []  []  |
+     dialog             | []  []  []                [] []    [] [] []  []  |
+     dico               | []  []                                   []  []  |
+     diffutils          | []  []  []                [] []              []  |
+     dink               | []  []                    [] []          []  []  |
+     direvent           | []  []                    []                 []  |
+     doodle             | []  []                    []             []      |
+     dos2unix           | []  []                    [] []              []  |
+     dos2unix-man       |     []                       []              []  |
+     e2fsprogs          | []  []                    [] []              []  |
+     enscript           | []  []         []         []             []  []  |
+     exif               | []  []                    [] []          []  []  |
+     fetchmail          | []  ()  []     []         [] []              []  |
+     findutils          | []  []  []                [] [] []       []  []  |
+     flex               | []  []                    [] []          []  []  |
+     freedink           | []  []  []                [] []    []    []  []  |
+     fusionforge        |     []                       []              []  |
+     gas                |                              []          []  []  |
+     gawk               | []  []                       []          []  []  |
+     gcal               | []  []                       []              []  |
+     gcc                |     []                                           |
+     gdbm               | []  []                    []             []  []  |
+     gettext-examples   | []  []  []                [] []          []  []  |
+     gettext-runtime    | []  []                    [] []          []  []  |
+     gettext-tools      | []  []                       []          []  []  |
+     gjay               |     []                    []             []  []  |
+     glunarclock        | []  []                    []             []  []  |
+     gnubiff            |     ()                    []             []  ()  |
+     gnubik             | []  []                    []             []  []  |
+     gnucash            | []  ()  ()     ()            ()          ()  ()  |
+     gnuchess           |     []                    [] []              []  |
+     gnulib             | []  []                    [] [] []       []  []  |
+     gnunet             |                              []                  |
+     gnunet-gtk         |     []                                           |
+     gold               |                              []          []  []  |
+     gphoto2            | []  ()                    []                 []  |
+     gprof              | []  []                    [] []          []  []  |
+     gramadoir          | []  []                    []             []  []  |
+     grep               | []  []                    [] [] []       []  []  |
+     grub               | []  []                       []          []  []  |
+     gsasl              | []  []                    []             []  []  |
+     gss                | []  []                    []             []  []  |
+     gst-plugins-bad    | []  []                                       []  |
+     gst-plugins-base   | []  []  []                   []          []  []  |
+     gst-plugins-good   | []  []  []                   []    []    []  []  |
+     gst-plugins-ugly   | []  []  []                [] []    []    []  []  |
+     gstreamer          | []  []  []                   []    []    []  []  |
+     gtick              | []  ()                    []             []  []  |
+     gtkam              | []  ()                    [] []          []  []  |
+     gtkspell           | []  []  []                [] []    []    []  []  |
+     guix               | []                        []                     |
+     guix-packages      |                                                  |
+     gutenprint         | []  []                                   []  []  |
+     hello              | []  []  []                [] [] []       []  []  |
+     help2man           | []  []  []                [] []          []  []  |
+     help2man-texi      |     []                       []              []  |
+     hylafax            |     []                       []                  |
+     idutils            | []  []                    []             []  []  |
+     iso_15924          | []  ()                    [] []    ()    []  ()  |
+     iso_3166           | []  ()  []                [] [] [] ()    []  ()  |
+     iso_3166_2         | []  ()                             ()        ()  |
+     iso_4217           | []  ()  []                   [] [] ()    []  ()  |
+     iso_639            | []  ()                    [] []    ()    []  ()  |
+     iso_639_3          |     ()                             ()        ()  |
+     iso_639_5          |     ()                             ()        ()  |
+     jwhois             |     []                    [] []          []  []  |
+     kbd                | []  []  []                [] []              []  |
+     klavaro            | []  []  []                [] []    []        []  |
+     ld                 | []                           []          []  []  |
+     leafpad            | []  []  []                [] []    []    []  []  |
+     libc               | []  []                       []          []  []  |
+     libexif            | []  []         ()            []              []  |
+     libextractor       |     []                                           |
+     libgnutls          |     []                    []             []  []  |
+     libgphoto2         | []  ()                                       []  |
+     libgphoto2_port    | []  ()                       []    []    []  []  |
+     libgsasl           | []  []                    []             []  []  |
+     libiconv           | []  []                    [] [] []       []  []  |
+     libidn             | []  []                    []             []  []  |
+     liferea            | []  ()  []                   []    []    []  []  |
+     lilypond           | []  []  []                [] []              []  |
+     lordsawar          | []  []                                           |
+     lprng              |                                                  |
+     lynx               | []  []                    []    []       []  []  |
+     m4                 | []  []  []                []             []  []  |
+     mailfromd          |                                              []  |
+     mailutils          |     []                       []          []  []  |
+     make               | []  []                       []          []  []  |
+     man-db             | []  []                    []                 []  |
+     man-db-manpages    |     []                                       []  |
+     midi-instruments   | []  []  []                [] [] []    [] []  []  |
+     minicom            | []  []                       []          []  []  |
+     mkisofs            |                           []             []  []  |
+     myserver           |     []                    []             []  []  |
+     nano               | []  []                    [] []    []    []  []  |
+     opcodes            | []  []                       []          []  []  |
+     parted             | []  []                                       []  |
+     pies               |     []                                           |
+     pnmixer            |     []                                       []  |
+     popt               | []  []                    [] []          []  []  |
+     procps-ng          |     []                                       []  |
+     procps-ng-man      |     []                                       []  |
+     psmisc             | []  []  []                []       []    []  []  |
+     pspp               |     []                       []              []  |
+     pushover           |     ()                    [] []              []  |
+     pwdutils           | []  []                                       []  |
+     pyspread           | []  []                                       []  |
+     radius             |                              []              []  |
+     recode             | []  []  []                [] []          []  []  |
+     recutils           |     []                       []          []  []  |
+     rpm                | []  []                    []             []  []  |
+     rush               |     []                                   []  []  |
+     sarg               | []                                           []  |
+     sed                | []  []  []                [] [] []       []  []  |
+     sharutils          |     []                    []    []           []  |
+     shishi             |     []                                   []  []  |
+     skribilo           | []                           []              []  |
+     solfege            | []  []                    [] [] []    [] []  []  |
+     solfege-manual     |     []                    [] [] []           []  |
+     spotmachine        | []  []                    []             []  []  |
+     sudo               | []  []                    [] []          []  []  |
+     sudoers            | []  []  []                []             []  []  |
+     sysstat            | []  []                    [] []          []  []  |
+     tar                | []  []                    [] [] []       []  []  |
+     texinfo            | []  []                    [] []              []  |
+     texinfo_document   |     []                    [] []              []  |
+     tigervnc           | []  []  []                []             []  []  |
+     tin                | []  []                          []           []  |
+     tin-man            |                []                                |
+     tracgoogleappsa... | []  []                    []             []  []  |
+     trader             | []  []         []         []             []  []  |
+     util-linux         | []  []                       []              []  |
+     ve                 |     []                    [] []          []  []  |
+     vice               | ()  ()                                       ()  |
+     vmm                |     []                                   []      |
+     vorbis-tools       | []  []                    []                 []  |
+     wastesedge         | []                                               |
+     wcd                |     []                    [] []          []      |
+     wcd-man            |     []                                           |
+     wdiff              | []  []                    [] [] []       []  []  |
+     wget               |     []                    [] [] []       []  []  |
+     wyslij-po          |     []                    []             []  []  |
+     xboard             | []  []                       []              []  |
+     xdg-user-dirs      | []  []  []                [] [] [] [] [] []  []  |
+     xkeyboard-config   | []  []  []                [] []          []  []  |
+                        +--------------------------------------------------+
+                          da  de  el en en_GB en_ZA eo es et eu fa fi  fr 
+                          119 131 32  1   6     0   94 95 22 13  4 102 139
+
+                          ga gd gl gu he hi hr hu hy ia id is it ja ka kk
+                        +-------------------------------------------------+
+     a2ps               |                   []          []    [] []       |
+     aegis              |                                     []          |
+     anubis             |                   [] []       []    []          |
+     aspell             | []                []          []    [] []       |
+     bash               |                      []       []    [] []       |
+     bfd                |                               []       []       |
+     binutils           |                               []    [] []       |
+     bison              |                   []                            |
+     bison-runtime      | []    []          [] []    [] []    [] []       |
+     buzztrax           |                                                 |
+     ccd2cue            |                      []                         |
+     ccide              |                   [] []                         |
+     cflow              | []                []          []                |
+     clisp              |                                                 |
+     coreutils          |                      []                []       |
+     cpio               | []                [] []       []    [] []       |
+     cppi               |       []          [] []             [] []       |
+     cpplib             |                               []       []       |
+     cryptsetup         |                                     []          |
+     datamash           |                                                 |
+     denemo             |                                     []          |
+     dfarc              |                   [] []             []          |
+     dialog             | [] [] []          [] []    [] [] [] [] []       |
+     dico               |                                                 |
+     diffutils          |                      []       []    [] []       |
+     dink               |                      []                         |
+     direvent           |                      []                         |
+     doodle             | []                                  []          |
+     dos2unix           |                      []                []       |
+     dos2unix-man       |                                                 |
+     e2fsprogs          |                      []       []                |
+     enscript           | []                []          []                |
+     exif               |       []          []          [] [] [] []       |
+     fetchmail          |                               []    [] []       |
+     findutils          | []    []          [] []       []    [] []       |
+     flex               | []                                              |
+     freedink           |                   [] []       []    []          |
+     fusionforge        |                                                 |
+     gas                |                               []                |
+     gawk               |                               []    () []       |
+     gcal               |                                                 |
+     gcc                |                                                 |
+     gdbm               |                                                 |
+     gettext-examples   | []    []          [] []       []    [] []       |
+     gettext-runtime    | []    []          [] []       []    [] []       |
+     gettext-tools      |                               []    [] []       |
+     gjay               |       []                                        |
+     glunarclock        | []    []          [] []       []    []          |
+     gnubiff            |                      []       []    ()          |
+     gnubik             |       []          []                []          |
+     gnucash            |          () () ()    ()             ()          |
+     gnuchess           |                                                 |
+     gnulib             | []    []             []             [] []       |
+     gnunet             |                                                 |
+     gnunet-gtk         |                                                 |
+     gold               |                               []    []          |
+     gphoto2            |                      []       []    [] []       |
+     gprof              | []                   []       []    []          |
+     gramadoir          | []                   []       []                |
+     grep               | []    []          [] []       []    [] []       |
+     grub               |       []             []             []          |
+     gsasl              | []                [] []       []    []          |
+     gss                | []                [] []       []    []          |
+     gst-plugins-bad    |                   [] []       []                |
+     gst-plugins-base   |       []          [] []       []                |
+     gst-plugins-good   |       []          [] []       []    [] []       |
+     gst-plugins-ugly   |       []          [] []       []    [] []       |
+     gstreamer          |       []          [] []       []    []          |
+     gtick              | []    []             []       []    []          |
+     gtkam              |                      []       [] [] [] []       |
+     gtkspell           | []    []    []    [] [] []    [] [] [] []       |
+     guix               |                                                 |
+     guix-packages      |                                                 |
+     gutenprint         |       []             []             []          |
+     hello              | []    []          [] []       []                |
+     help2man           |                   []                [] []       |
+     help2man-texi      |                                                 |
+     hylafax            |                               []                |
+     idutils            |                      []       []                |
+     iso_15924          |       []             []    [] [] [] []          |
+     iso_3166           | []    [] [] [] [] [] []    [] [] [] [] []    [] |
+     iso_3166_2         |                               []    []          |
+     iso_4217           |                   [] []       [] [] [] []       |
+     iso_639            | []    [] []       [] []       [] [] [] []       |
+     iso_639_3          |       []                            []          |
+     iso_639_5          |                                                 |
+     jwhois             |       []             []       []    []          |
+     kbd                |                      []       []    []          |
+     klavaro            |       []          [] []             []       [] |
+     ld                 | []                            []    [] []       |
+     leafpad            | []    []    []    [] []       []    [] ()       |
+     libc               |       []          []          []    [] []       |
+     libexif            |                                     []          |
+     libextractor       |                                                 |
+     libgnutls          |                                     []          |
+     libgphoto2         |                                     [] []       |
+     libgphoto2_port    |                                     [] []       |
+     libgsasl           | []                   []       []    []          |
+     libiconv           | []    []          [] []       []    [] []       |
+     libidn             |                   [] []       []    []          |
+     liferea            |       []    []       []             [] []       |
+     lilypond           |                                     []          |
+     lordsawar          |                                                 |
+     lprng              |                               []                |
+     lynx               |                      []       []    [] []       |
+     m4                 | []    []          []          []       []       |
+     mailfromd          |                                                 |
+     mailutils          |                                                 |
+     make               |                   []          []    [] []       |
+     man-db             |                               []       []       |
+     man-db-manpages    |                               []       []       |
+     midi-instruments   |       []    []    [] [] []    [] [] [] []       |
+     minicom            |                      []       []       []       |
+     mkisofs            |                               []    []          |
+     myserver           |                                     []          |
+     nano               | []    []          [] []             [] []       |
+     opcodes            | []                            []    []          |
+     parted             |       []             []       []    [] []       |
+     pies               |                                                 |
+     pnmixer            |                   []                []          |
+     popt               | []    [] []       [] []    [] [] [] [] []       |
+     procps-ng          |                                                 |
+     procps-ng-man      |                                                 |
+     psmisc             |                   [] []       []    []          |
+     pspp               |       []                               []       |
+     pushover           |                                     []          |
+     pwdutils           |                               []                |
+     pyspread           |                                                 |
+     radius             |                               []                |
+     recode             | []    []    []    [] []       []    []          |
+     recutils           |                                                 |
+     rpm                |                               []                |
+     rush               |       []                                        |
+     sarg               |                                                 |
+     sed                | []    []          [] []       []    [] []       |
+     sharutils          |                                                 |
+     shishi             |                                                 |
+     skribilo           |                      []                         |
+     solfege            |       []                            []          |
+     solfege-manual     |                                                 |
+     spotmachine        |                                                 |
+     sudo               |       []          []                [] []       |
+     sudoers            |                   []                [] []       |
+     sysstat            |                   [] []       []       []       |
+     tar                | []                [] []       []    [] []       |
+     texinfo            |                   []          []    []          |
+     texinfo_document   |                   [] []             []          |
+     tigervnc           |                                                 |
+     tin                |                                                 |
+     tin-man            |                                                 |
+     tracgoogleappsa... |       []    []    [] []                         |
+     trader             |                   [] []                         |
+     util-linux         |                                        []       |
+     ve                 |                                     []          |
+     vice               |                      ()             ()          |
+     vmm                |                                                 |
+     vorbis-tools       |                   []          []                |
+     wastesedge         |                                     []          |
+     wcd                |                                                 |
+     wcd-man            |                                                 |
+     wdiff              |       []             []             []          |
+     wget               |                   [] []             [] []       |
+     wyslij-po          |       []          []          []                |
+     xboard             |                                                 |
+     xdg-user-dirs      | [] [] [] [] [] [] [] []    [] [] [] [] []    [] |
+     xkeyboard-config   |       []          [] []       []    [] []       |
+                        +-------------------------------------------------+
+                          ga gd gl gu he hi hr hu hy ia id is it ja ka kk
+                          35  2 47  4  8  2 60 71  2  6 81 11 87 57  0  3
+
+                          kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl 
+                        +--------------------------------------------------+
+     a2ps               |                                  []          []  |
+     aegis              |                                              []  |
+     anubis             |                                  []    []    []  |
+     aspell             |                            []                []  |
+     bash               |                                        []    []  |
+     bfd                |                                                  |
+     binutils           |                                                  |
+     bison              |                                              []  |
+     bison-runtime      |          []    [] []             []    []    []  |
+     buzztrax           |                                                  |
+     ccd2cue            |                                                  |
+     ccide              |                   []                         []  |
+     cflow              |                                              []  |
+     clisp              |                                              []  |
+     coreutils          |                                        []    []  |
+     cpio               |                                              []  |
+     cppi               |                                                  |
+     cpplib             |                                              []  |
+     cryptsetup         |                                              []  |
+     datamash           |                                        []    []  |
+     denemo             |                                                  |
+     dfarc              |                      []                      []  |
+     dialog             |       []       [] []             []    []    []  |
+     dico               |                                                  |
+     diffutils          |                   []                   []    []  |
+     dink               |                                              []  |
+     direvent           |                                              []  |
+     doodle             |                                              []  |
+     dos2unix           |                                        []    []  |
+     dos2unix-man       |                                              []  |
+     e2fsprogs          |                                              []  |
+     enscript           |                                              []  |
+     exif               |    []             []                         []  |
+     fetchmail          |                                              []  |
+     findutils          |                                        []    []  |
+     flex               |                                              []  |
+     freedink           |                                        []    []  |
+     fusionforge        |                                                  |
+     gas                |                                                  |
+     gawk               |                                              []  |
+     gcal               |                                                  |
+     gcc                |                                                  |
+     gdbm               |                                                  |
+     gettext-examples   |          []       []             [] [] []    []  |
+     gettext-runtime    |    []                                  []    []  |
+     gettext-tools      |    []                                            |
+     gjay               |                                                  |
+     glunarclock        |                   []                         []  |
+     gnubiff            |                                              []  |
+     gnubik             |                                        []    []  |
+     gnucash            | () ()          () ()          ()       () () []  |
+     gnuchess           |                                        []    []  |
+     gnulib             |                                              []  |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                                  |
+     gold               |                                                  |
+     gphoto2            |                                              []  |
+     gprof              |                                  []          []  |
+     gramadoir          |                                              []  |
+     grep               |                                        []    []  |
+     grub               |                []                      []    []  |
+     gsasl              |                                              []  |
+     gss                |                                                  |
+     gst-plugins-bad    |                   []                   []    []  |
+     gst-plugins-base   |                   []                   []    []  |
+     gst-plugins-good   |                [] []                   []    []  |
+     gst-plugins-ugly   |                   []             [] [] []    []  |
+     gstreamer          |                []                      []    []  |
+     gtick              |                                              []  |
+     gtkam              |                                        []    []  |
+     gtkspell           |          []    [] []       []    []    []    []  |
+     guix               |                                                  |
+     guix-packages      |                                                  |
+     gutenprint         |                                              []  |
+     hello              |                   []                   []    []  |
+     help2man           |                                        []        |
+     help2man-texi      |                                                  |
+     hylafax            |                                              []  |
+     idutils            |                                              []  |
+     iso_15924          |                () []                         []  |
+     iso_3166           | [] [] []       () [] [] []    []       []    []  |
+     iso_3166_2         |                ()                            []  |
+     iso_4217           |                () []                   []    []  |
+     iso_639            | [] []          () []    []    []             []  |
+     iso_639_3          | []             ()             []                 |
+     iso_639_5          |                ()                                |
+     jwhois             |                   []                         []  |
+     kbd                |                                              []  |
+     klavaro            |                                        []    []  |
+     ld                 |                                                  |
+     leafpad            |    []    []    [] []                         []  |
+     libc               |    []                                        []  |
+     libexif            |                                              []  |
+     libextractor       |                                              []  |
+     libgnutls          |                                  []          []  |
+     libgphoto2         |                                              []  |
+     libgphoto2_port    |                                              []  |
+     libgsasl           |                                              []  |
+     libiconv           |                []                            []  |
+     libidn             |                                              []  |
+     liferea            |                [] []                         []  |
+     lilypond           |                                              []  |
+     lordsawar          |                                                  |
+     lprng              |                                                  |
+     lynx               |                                              []  |
+     m4                 |                                              []  |
+     mailfromd          |                                                  |
+     mailutils          |                                                  |
+     make               |    []                                        []  |
+     man-db             |                                              []  |
+     man-db-manpages    |                                              []  |
+     midi-instruments   |    [] []       []          []    []       [] []  |
+     minicom            |                                        []        |
+     mkisofs            |                                              []  |
+     myserver           |                                                  |
+     nano               |                                  []    []    []  |
+     opcodes            |                                              []  |
+     parted             |    []                                        []  |
+     pies               |                                                  |
+     pnmixer            |                                              []  |
+     popt               | [] []             []                   []    []  |
+     procps-ng          |                                                  |
+     procps-ng-man      |                                                  |
+     psmisc             |                                              []  |
+     pspp               |                []                            []  |
+     pushover           |                                                  |
+     pwdutils           |                                              []  |
+     pyspread           |                                                  |
+     radius             |                                              []  |
+     recode             |                                        []    []  |
+     recutils           |                                              []  |
+     rpm                |                                              []  |
+     rush               |                                              []  |
+     sarg               |                                                  |
+     sed                |                                        []    []  |
+     sharutils          |                                              []  |
+     shishi             |                                                  |
+     skribilo           |                                                  |
+     solfege            |                                        []    []  |
+     solfege-manual     |                                              []  |
+     spotmachine        |                                              []  |
+     sudo               |    []                                  []    []  |
+     sudoers            |    []                                  []    []  |
+     sysstat            |                                        []    []  |
+     tar                |          []                            []    []  |
+     texinfo            |                                              []  |
+     texinfo_document   |                                              []  |
+     tigervnc           |                                              []  |
+     tin                |                                                  |
+     tin-man            |                                                  |
+     tracgoogleappsa... |                   []                   []    []  |
+     trader             |                                        []        |
+     util-linux         |                                              []  |
+     ve                 |                                              []  |
+     vice               |                                              []  |
+     vmm                |                                              []  |
+     vorbis-tools       |                                              []  |
+     wastesedge         |                                              []  |
+     wcd                |                                              []  |
+     wcd-man            |                                              []  |
+     wdiff              |                                              []  |
+     wget               |                                        []    []  |
+     wyslij-po          |                                              []  |
+     xboard             |                                              []  |
+     xdg-user-dirs      | [] [] [] []    [] [] [] []    []       []    []  |
+     xkeyboard-config   |    []          []                            []  |
+                        +--------------------------------------------------+
+                          kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl 
+                           5 15  4  6  0 13 23  3  3  3  4 11  2 42  1 125
+
+                          nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr 
+                        +------------------------------------------------+
+     a2ps               |          []     []  []   [] []       []    []  |
+     aegis              |                     []      []                 |
+     anubis             |          []                 []             []  |
+     aspell             |          []         []   [] []    [] []    []  |
+     bash               |          []         []      []    [] []    []  |
+     bfd                |                             []             []  |
+     binutils           |                             []             []  |
+     bison              |          []         []                     []  |
+     bison-runtime      |          []     []  []   [] []       [] [] []  |
+     buzztrax           |                     []                         |
+     ccd2cue            |                     []                     []  |
+     ccide              |          []                 []             []  |
+     cflow              |          []         []                     []  |
+     clisp              |                             []                 |
+     coreutils          |          []                 []       []    []  |
+     cpio               |          []                 []             []  |
+     cppi               |          []         []                     []  |
+     cpplib             |                     []      []             []  |
+     cryptsetup         |          []         []                     []  |
+     datamash           |                     []                     []  |
+     denemo             |                                                |
+     dfarc              |          []         []                     []  |
+     dialog             |          []         []   [] []    [] []    []  |
+     dico               |          []                                    |
+     diffutils          |          []         []                     []  |
+     dink               |                                                |
+     direvent           |          []         []                     []  |
+     doodle             |                                         [] []  |
+     dos2unix           |          []         []      []             []  |
+     dos2unix-man       |          []         []                         |
+     e2fsprogs          |          []                                    |
+     enscript           |          []         []   [] []       []    []  |
+     exif               |          []         []   [] []    []       []  |
+     fetchmail          |          []                 []          []     |
+     findutils          |          []         []      []    [] []    []  |
+     flex               |          []         []   [] []             []  |
+     freedink           |          []         []      []       []    []  |
+     fusionforge        |                                                |
+     gas                |                                                |
+     gawk               |          []                                    |
+     gcal               |                                                |
+     gcc                |                                                |
+     gdbm               |          []         []                     []  |
+     gettext-examples   |          []     []  []   [] []    [] []    []  |
+     gettext-runtime    | []       []     []  []   [] []    [] []    []  |
+     gettext-tools      |          []         []   [] []    [] []    []  |
+     gjay               |                                            []  |
+     glunarclock        |          []         []   []       [] []    []  |
+     gnubiff            |                                            []  |
+     gnubik             |          []         []               []    []  |
+     gnucash            |          ()     ()  ()   () ()             []  |
+     gnuchess           |                     []                     []  |
+     gnulib             |          []         []      []       []    []  |
+     gnunet             |                                                |
+     gnunet-gtk         |                                                |
+     gold               |                                                |
+     gphoto2            |          []         []   [] []             []  |
+     gprof              |                     []   [] []             []  |
+     gramadoir          |                                   []       []  |
+     grep               |          []         []      []    [] []    []  |
+     grub               |          []         []      []       []    []  |
+     gsasl              |          []                       []       []  |
+     gss                |          []              []       []       []  |
+     gst-plugins-bad    |          []         []      []    []       []  |
+     gst-plugins-base   |          []         []      []    [] []    []  |
+     gst-plugins-good   |          []         []   [] []    [] []    []  |
+     gst-plugins-ugly   |          []         []   [] []    [] []    []  |
+     gstreamer          |          []         []   [] []    [] []    []  |
+     gtick              |          []         []      []    []       []  |
+     gtkam              |       [] []         []      []    []       []  |
+     gtkspell           |          []     []  []   [] []    [] [] [] []  |
+     guix               |                                                |
+     guix-packages      |                                                |
+     gutenprint         |                                   [] []        |
+     hello              |          []         []      []    [] []    []  |
+     help2man           |          []         []      []             []  |
+     help2man-texi      |          []                                    |
+     hylafax            |                                                |
+     idutils            |          []                 []             []  |
+     iso_15924          |          []     ()       [] []       []    []  |
+     iso_3166           | [] [] [] []     ()  []   [] [] [] [] [] [] []  |
+     iso_3166_2         |          []     ()                         []  |
+     iso_4217           | []       []     ()       [] [] []    []    []  |
+     iso_639            |    [] [] []     ()       [] [] [] [] []    []  |
+     iso_639_3          |       []        ()                             |
+     iso_639_5          |                 ()                         []  |
+     jwhois             |          []         []   []                []  |
+     kbd                |          []                 []                 |
+     klavaro            |       [] []         []      []       []        |
+     ld                 |                                                |
+     leafpad            | []       []     []  []      []    [] []    []  |
+     libc               |          []                 []    []           |
+     libexif            |          []         ()            []           |
+     libextractor       |          []                                    |
+     libgnutls          |          []                                    |
+     libgphoto2         |          []                                    |
+     libgphoto2_port    |          []         []      []    []       []  |
+     libgsasl           |          []              []       []       []  |
+     libiconv           |          []         []            [] []    []  |
+     libidn             |          []         []                     []  |
+     liferea            |          []     []  []   [] ()    []    []     |
+     lilypond           |                                                |
+     lordsawar          |                                                |
+     lprng              |          []                                    |
+     lynx               |                     []      []                 |
+     m4                 |          []         []   [] []             []  |
+     mailfromd          |          []                                    |
+     mailutils          |          []                                    |
+     make               |          []         []      []                 |
+     man-db             |          []                 []             []  |
+     man-db-manpages    |          []                 []             []  |
+     midi-instruments   |          []     []  []   [] []    [] []    []  |
+     minicom            |          []         []   [] []                 |
+     mkisofs            |          []                 []             []  |
+     myserver           |                                      []    []  |
+     nano               |          []         []   [] []       []    []  |
+     opcodes            |                                                |
+     parted             |          []         []      []    [] []    []  |
+     pies               |          []                                    |
+     pnmixer            |                             []                 |
+     popt               |          []     []  []      []       []    []  |
+     procps-ng          |          []                                    |
+     procps-ng-man      |          []                                    |
+     psmisc             |          []         []      []             []  |
+     pspp               |          []                 []                 |
+     pushover           |                                                |
+     pwdutils           |          []                                    |
+     pyspread           | []                  []                         |
+     radius             |          []                 []                 |
+     recode             |          []     []  []   [] []    [] []    []  |
+     recutils           |                     []                     []  |
+     rpm                |          []                                    |
+     rush               |          []         []                     []  |
+     sarg               |                     []      []                 |
+     sed                |          []     []  []   [] []    [] []    []  |
+     sharutils          |          []         []                     []  |
+     shishi             |          []                                []  |
+     skribilo           |                                            []  |
+     solfege            |          []         []      []                 |
+     solfege-manual     |          []         []                         |
+     spotmachine        |                     []                     []  |
+     sudo               |          []         []      []    [] []    []  |
+     sudoers            |          []         []               []    []  |
+     sysstat            |          []         []      []    []       []  |
+     tar                |          []         []      []       []    []  |
+     texinfo            |          []         []      []                 |
+     texinfo_document   |          []         []                         |
+     tigervnc           |                     []      []             []  |
+     tin                |                             []                 |
+     tin-man            |                                                |
+     tracgoogleappsa... |          []         []      []             []  |
+     trader             |                             []             []  |
+     util-linux         |          []         []                         |
+     ve                 |          []         []                     []  |
+     vice               |                                                |
+     vmm                |                                                |
+     vorbis-tools       |          []                          []    []  |
+     wastesedge         |                                                |
+     wcd                |                                                |
+     wcd-man            |                                                |
+     wdiff              |          []         []      []       []    []  |
+     wget               |          []         []      []    []       []  |
+     wyslij-po          | []       []         []                     []  |
+     xboard             |          []                 []             []  |
+     xdg-user-dirs      | [] [] [] []  [] []  []   [] []    [] [] [] []  |
+     xkeyboard-config   |          []         []      []       []        |
+                        +------------------------------------------------+
+                          nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr 
+                           7  3  6 114  1 12  88   32 82  3 40 45  7 101
+
+                          sv  sw ta te tg th tr uk  ur vi  wa wo zh_CN
+                        +----------------------------------------------+
+     a2ps               | []              [] [] []     []              |
+     aegis              |                              []              |
+     anubis             | []                 [] []     []              |
+     aspell             | []                    []     []  []     []   |
+     bash               | []                    []     []         []   |
+     bfd                | []                    []     []              |
+     binutils           | []                    []     []              |
+     bison              | []                    []     []         []   |
+     bison-runtime      | []              [] [] []     []         []   |
+     buzztrax           | []                           []         []   |
+     ccd2cue            |                       []     []         []   |
+     ccide              | []                    []     []         []   |
+     cflow              | []                    []     []         []   |
+     clisp              |                                              |
+     coreutils          | []                    []     []              |
+     cpio               | []                 [] []     []         []   |
+     cppi               | []                    []     []         []   |
+     cpplib             | []                 [] []     []         []   |
+     cryptsetup         |                       []     []         []   |
+     datamash           | []                    []     []              |
+     denemo             |                                         []   |
+     dfarc              | []                           []              |
+     dialog             | []  []          []           []  []     []   |
+     dico               |                       []                     |
+     diffutils          | []                 [] []     []         []   |
+     dink               | []                                           |
+     direvent           |                       []     []              |
+     doodle             | []                           []              |
+     dos2unix           | []                    []     []         []   |
+     dos2unix-man       | []                    []                []   |
+     e2fsprogs          | []                    []     []         []   |
+     enscript           | []                 [] []     []              |
+     exif               | []                 [] []     []         []   |
+     fetchmail          | []                 []        []         []   |
+     findutils          | []                 [] []     []         []   |
+     flex               | []                 []        []         []   |
+     freedink           | []              []           []              |
+     fusionforge        |                                              |
+     gas                |                       []                     |
+     gawk               | []                           []         []   |
+     gcal               | []                 []                   []   |
+     gcc                | []                                           |
+     gdbm               |                       []     []              |
+     gettext-examples   | []                 [] []     []         []   |
+     gettext-runtime    | []                 [] []     []         []   |
+     gettext-tools      | []                 [] []     []         []   |
+     gjay               |                 []           []         []   |
+     glunarclock        | []                           []  []     []   |
+     gnubiff            | []                           []              |
+     gnubik             | []                    []     []         []   |
+     gnucash            |        () ()              () ()         []   |
+     gnuchess           |                       []     []         []   |
+     gnulib             | []                    []     []         []   |
+     gnunet             |                                              |
+     gnunet-gtk         |                                              |
+     gold               |                       []     []              |
+     gphoto2            | []                    []     []         []   |
+     gprof              | []                 [] []     []              |
+     gramadoir          | []                           []         []   |
+     grep               | []              []    []     []         []   |
+     grub               | []                 [] []     []              |
+     gsasl              | []                    []     []         []   |
+     gss                | []                           []         []   |
+     gst-plugins-bad    | []                 [] []     []         []   |
+     gst-plugins-base   | []                 [] []     []         []   |
+     gst-plugins-good   | []                 [] []     []         []   |
+     gst-plugins-ugly   | []                 [] []     []         []   |
+     gstreamer          | []                 [] []     []         []   |
+     gtick              |                       []     []         []   |
+     gtkam              | []                    []     []         []   |
+     gtkspell           | []              [] [] []     []  []     []   |
+     guix               |                                              |
+     guix-packages      |                                              |
+     gutenprint         |                    [] []     []         []   |
+     hello              | []              [] [] []     []         []   |
+     help2man           |                       []     []         []   |
+     help2man-texi      |                       []                     |
+     hylafax            |                              []              |
+     idutils            |                       []     []         []   |
+     iso_15924          | []              () [] []     ()         []   |
+     iso_3166           | []        []    () [] []     ()  []     []   |
+     iso_3166_2         |                 () [] []     ()         []   |
+     iso_4217           | []              () [] []     ()         []   |
+     iso_639            | []     [] []    () [] []     ()  []     []   |
+     iso_639_3          |        []       () [] []     ()              |
+     iso_639_5          |                 ()    []     ()              |
+     jwhois             | []                 []        []         []   |
+     kbd                | []                    []     []         []   |
+     klavaro            | []                    []  [] []     []  []   |
+     ld                 | []                 [] []     []         []   |
+     leafpad            | []              [] [] []     []         []   |
+     libc               | []                 [] []     []         []   |
+     libexif            | []                           []         ()   |
+     libextractor       |                       []     []              |
+     libgnutls          | []                    []     []         []   |
+     libgphoto2         | []                    []     []              |
+     libgphoto2_port    | []                    []     []         []   |
+     libgsasl           | []                    []     []         []   |
+     libiconv           | []                    []     []  []     []   |
+     libidn             | ()                    []     []         []   |
+     liferea            | []                 [] []     []         []   |
+     lilypond           |                              []              |
+     lordsawar          |                                              |
+     lprng              |                              []              |
+     lynx               | []                 [] []     []              |
+     m4                 | []                           []         []   |
+     mailfromd          |                       []     []              |
+     mailutils          |                              []              |
+     make               | []                    []     []         []   |
+     man-db             | []                           []         []   |
+     man-db-manpages    | []                                      []   |
+     midi-instruments   | []              [] [] []     []         []   |
+     minicom            | []                           []              |
+     mkisofs            |                       []     []         []   |
+     myserver           |                              []              |
+     nano               | []                    []     []         []   |
+     opcodes            |                       []     []         []   |
+     parted             | []                 [] []     []         []   |
+     pies               |                       []     []              |
+     pnmixer            |                       []     []         []   |
+     popt               | []     []       [] [] []     []         []   |
+     procps-ng          |                       []     []              |
+     procps-ng-man      |                       []                     |
+     psmisc             | []                    []     []         []   |
+     pspp               |                    [] []                []   |
+     pushover           | []                                           |
+     pwdutils           | []                           []              |
+     pyspread           |                       []                     |
+     radius             |                       []     []              |
+     recode             | []                 []        []         []   |
+     recutils           | []                    []     []              |
+     rpm                | []                    []     []         []   |
+     rush               |                       []     []              |
+     sarg               |                                              |
+     sed                | []                 [] []     []         []   |
+     sharutils          | []                    []     []         []   |
+     shishi             |                              []         []   |
+     skribilo           | []                    []                     |
+     solfege            | []                 []        []         []   |
+     solfege-manual     |                    []                        |
+     spotmachine        | []                    []     []              |
+     sudo               | []                 [] []     []         []   |
+     sudoers            | []                    []     []         []   |
+     sysstat            | []                 [] []     []         []   |
+     tar                | []                 [] []     []         []   |
+     texinfo            |                    [] []     []              |
+     texinfo_document   |                       []                     |
+     tigervnc           | []                    []                []   |
+     tin                |                                         []   |
+     tin-man            |                                              |
+     tracgoogleappsa... | []              []    []     []         []   |
+     trader             | []                                           |
+     util-linux         | []                    []     []         []   |
+     ve                 | []                    []     []         []   |
+     vice               | ()                 ()                        |
+     vmm                |                                              |
+     vorbis-tools       | []                           []              |
+     wastesedge         |                                              |
+     wcd                |                       []     []         []   |
+     wcd-man            |                       []                     |
+     wdiff              | []                    []     []         []   |
+     wget               |                       []     []         []   |
+     wyslij-po          |                       []     []              |
+     xboard             |                       []                []   |
+     xdg-user-dirs      | []     [] []    [] [] []     []         []   |
+     xkeyboard-config   | []                 [] []     []              |
+                        +----------------------------------------------+
+                          sv  sw ta te tg th tr uk  ur vi  wa wo zh_CN
+                          106  1  4  3  0 13 51 115  1 125  7  1  100 
+
+                          zh_HK zh_TW
+                        +-------------+
+     a2ps               |             | 30
+     aegis              |             |  9
+     anubis             |             | 19
+     aspell             |             | 29
+     bash               |        []   | 23
+     bfd                |             | 11
+     binutils           |             | 12
+     bison              |        []   | 18
+     bison-runtime      |        []   | 38
+     buzztrax           |             |  9
+     ccd2cue            |             | 10
+     ccide              |             | 17
+     cflow              |             | 16
+     clisp              |             | 10
+     coreutils          |             | 18
+     cpio               |             | 20
+     cppi               |             | 17
+     cpplib             |        []   | 19
+     cryptsetup         |             | 14
+     datamash           |             | 11
+     denemo             |             |  5
+     dfarc              |             | 17
+     dialog             |        []   | 42
+     dico               |             |  6
+     diffutils          |             | 22
+     dink               |             | 10
+     direvent           |             | 11
+     doodle             |             | 12
+     dos2unix           |        []   | 18
+     dos2unix-man       |             |  9
+     e2fsprogs          |             | 15
+     enscript           |             | 21
+     exif               |             | 27
+     fetchmail          |             | 19
+     findutils          |             | 29
+     flex               |        []   | 19
+     freedink           |             | 24
+     fusionforge        |             |  3
+     gas                |             |  5
+     gawk               |             | 13
+     gcal               |             |  8
+     gcc                |             |  2
+     gdbm               |             | 10
+     gettext-examples   |  []    []   | 40
+     gettext-runtime    |  []    []   | 35
+     gettext-tools      |        []   | 24
+     gjay               |             |  9
+     glunarclock        |        []   | 27
+     gnubiff            |             |  9
+     gnubik             |             | 19
+     gnucash            |        ()   |  6
+     gnuchess           |             | 11
+     gnulib             |             | 23
+     gnunet             |             |  1
+     gnunet-gtk         |             |  1
+     gold               |             |  7
+     gphoto2            |        []   | 19
+     gprof              |             | 21
+     gramadoir          |             | 14
+     grep               |        []   | 31
+     grub               |             | 21
+     gsasl              |        []   | 19
+     gss                |             | 17
+     gst-plugins-bad    |             | 21
+     gst-plugins-base   |             | 27
+     gst-plugins-good   |             | 32
+     gst-plugins-ugly   |             | 34
+     gstreamer          |        []   | 32
+     gtick              |             | 19
+     gtkam              |             | 24
+     gtkspell           |  []    []   | 48
+     guix               |             |  2
+     guix-packages      |             |  0
+     gutenprint         |             | 15
+     hello              |        []   | 30
+     help2man           |             | 18
+     help2man-texi      |             |  5
+     hylafax            |             |  5
+     idutils            |             | 14
+     iso_15924          |        []   | 23
+     iso_3166           |  []    []   | 58
+     iso_3166_2         |             |  9
+     iso_4217           |  []    []   | 28
+     iso_639            |  []    []   | 46
+     iso_639_3          |             | 10
+     iso_639_5          |             |  2
+     jwhois             |        []   | 20
+     kbd                |             | 17
+     klavaro            |             | 30
+     ld                 |        []   | 15
+     leafpad            |        []   | 39
+     libc               |        []   | 24
+     libexif            |             | 10
+     libextractor       |             |  5
+     libgnutls          |             | 13
+     libgphoto2         |             | 10
+     libgphoto2_port    |        []   | 19
+     libgsasl           |             | 18
+     libiconv           |        []   | 29
+     libidn             |             | 17
+     liferea            |             | 29
+     lilypond           |             | 11
+     lordsawar          |             |  3
+     lprng              |             |  3
+     lynx               |             | 19
+     m4                 |        []   | 22
+     mailfromd          |             |  4
+     mailutils          |             |  6
+     make               |             | 19
+     man-db             |             | 15
+     man-db-manpages    |             | 10
+     midi-instruments   |        []   | 43
+     minicom            |        []   | 17
+     mkisofs            |             | 13
+     myserver           |             |  9
+     nano               |        []   | 30
+     opcodes            |             | 12
+     parted             |        []   | 23
+     pies               |             |  4
+     pnmixer            |             |  9
+     popt               |        []   | 36
+     procps-ng          |             |  5
+     procps-ng-man      |             |  4
+     psmisc             |        []   | 22
+     pspp               |             | 13
+     pushover           |             |  6
+     pwdutils           |             |  8
+     pyspread           |             |  6
+     radius             |             |  9
+     recode             |             | 31
+     recutils           |             | 10
+     rpm                |        []   | 13
+     rush               |             | 10
+     sarg               |             |  4
+     sed                |        []   | 35
+     sharutils          |             | 13
+     shishi             |             |  7
+     skribilo           |             |  7
+     solfege            |             | 21
+     solfege-manual     |             |  9
+     spotmachine        |             | 11
+     sudo               |             | 26
+     sudoers            |             | 22
+     sysstat            |             | 23
+     tar                |        []   | 30
+     texinfo            |             | 17
+     texinfo_document   |             | 13
+     tigervnc           |             | 14
+     tin                |        []   |  7
+     tin-man            |             |  1
+     tracgoogleappsa... |        []   | 22
+     trader             |             | 12
+     util-linux         |             | 13
+     ve                 |             | 14
+     vice               |             |  1
+     vmm                |             |  3
+     vorbis-tools       |             | 13
+     wastesedge         |             |  3
+     wcd                |             |  8
+     wcd-man            |             |  3
+     wdiff              |        []   | 23
+     wget               |             | 21
+     wyslij-po          |             | 14
+     xboard             |             | 10
+     xdg-user-dirs      |  []    []   | 68
+     xkeyboard-config   |        []   | 28
+                        +-------------+
+       89 teams           zh_HK zh_TW
+      166 domains           7    42    2809
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and distributed
+as such by its maintainer.  There might be an observable lag between the
+mere existence a PO file and its wide availability in a distribution.
+
+   If Jun 2014 seems to be old, you may fetch a more recent copy of this
+'ABOUT-NLS' file on most GNU archive sites.  The most up-to-date matrix
+with full percentage details can be found at
+'http://translationproject.org/extra/matrix.html'.
+
+1.5 Using 'gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU 'gettext' in your
+package.  Of course you have to respect the GNU Lesser General Public
+License which covers the use of the GNU 'gettext' library.  This means
+in particular that even non-free programs can use 'libintl' as a shared
+library, whereas only free software can use 'libintl' as a static
+library or use modified versions of 'libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of 'gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+'coordinator at translationproject.org' to make the '.pot' files available
+to the translation teams.
diff --git a/INSTALL b/INSTALL
index 2099840..8865734 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell command `./configure && make && make install'
+   Briefly, the shell command './configure && make && make install'
 should configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
+more-detailed instructions are generic; see the 'README' file for
 instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
+'INSTALL' file but do not implement all of the features documented
 below.  The lack of an optional feature in a given package is not
 necessarily a bug.  More recommendations for GNU packages can be found
 in *note Makefile Conventions: (standards)Makefile Conventions.
 
-   The `configure' shell script attempts to guess correct values for
+   The 'configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions.  Finally, it creates a shell script 'config.status' that
 you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
 
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+   It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring.  Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
 
    If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
 be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+   The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'.  You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
 
    The simplest way to compile this package is:
 
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
+  1. 'cd' to the directory containing the package's source code and type
+     './configure' to configure the package for your system.
 
-     Running `configure' might take a while.  While running, it prints
+     Running 'configure' might take a while.  While running, it prints
      some messages telling which features it is checking for.
 
-  2. Type `make' to compile the package.
+  2. Type 'make' to compile the package.
 
-  3. Optionally, type `make check' to run any self-tests that come with
+  3. Optionally, type 'make check' to run any self-tests that come with
      the package, generally using the just-built uninstalled binaries.
 
-  4. Type `make install' to install the programs and any data files and
+  4. Type 'make install' to install the programs and any data files and
      documentation.  When installing into a prefix owned by root, it is
      recommended that the package be configured and built as a regular
-     user, and only the `make install' phase executed with root
+     user, and only the 'make install' phase executed with root
      privileges.
 
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
+  5. Optionally, type 'make installcheck' to repeat any self-tests, but
      this time using the binaries in their final installed location.
      This target does not install anything.  Running this target as a
-     regular user, particularly if the prior `make install' required
+     regular user, particularly if the prior 'make install' required
      root privileges, verifies that the installation completed
      correctly.
 
   6. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
+     source code directory by typing 'make clean'.  To also remove the
+     files that 'configure' created (so you can compile the package for
+     a different kind of computer), type 'make distclean'.  There is
+     also a 'make maintainer-clean' target, but that is intended mainly
      for the package's developers.  If you use it, you may have to get
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  7. Often, you can also type `make uninstall' to remove the installed
+  7. Often, you can also type 'make uninstall' to remove the installed
      files again.  In practice, not all packages have tested that
      uninstallation works correctly, even though it is required by the
      GNU Coding Standards.
 
-  8. Some packages, particularly those that use Automake, provide `make
+  8. Some packages, particularly those that use Automake, provide 'make
      distcheck', which can by used by developers to test that all other
-     targets like `make install' and `make uninstall' work correctly.
+     targets like 'make install' and 'make uninstall' work correctly.
      This target is generally not run by end users.
 
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
+the 'configure' script does not know about.  Run './configure --help'
 for details on some of the pertinent environment variables.
 
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
+   You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here is
+an example:
 
      ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
@@ -113,21 +112,21 @@ Compiling For Multiple Architectures
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU 'make'.  'cd' to the
 directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.  This
-is known as a "VPATH" build.
+the 'configure' script.  'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'.  This is known
+as a "VPATH" build.
 
-   With a non-GNU `make', it is safer to compile the package for one
+   With a non-GNU 'make', it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
+installed the package for one architecture, use 'make distclean' before
 reconfiguring for another architecture.
 
    On MacOS X 10.5 and later systems, you can create libraries and
 executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor.  Like
 this:
 
      ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -136,105 +135,104 @@ this:
 
    This is not guaranteed to produce working output in all cases, you
 may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
+using the 'lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
+   By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc.  You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
 absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
 PREFIX as the prefix for installing programs and libraries.
 Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.  In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
+options like '--bindir=DIR' to specify different values for particular
+kinds of files.  Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
 specifications that were not explicitly provided.
 
    The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
+correct locations to 'configure'; however, many packages provide one or
 both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
+'make install' command line to change installation locations without
 having to reconfigure or recompile.
 
    The first method involves providing an override variable for each
-affected directory.  For example, `make install
+affected directory.  For example, 'make install
 prefix=/alternate/directory' will choose an alternate location for all
 directory configuration variables that were expressed in terms of
-`${prefix}'.  Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated.  The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
-   The second method involves providing the `DESTDIR' variable.  For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names.  The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
+'${prefix}'.  Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated.  The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation.  However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the 'DESTDIR' variable.  For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names.  The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
 does not work on platforms that have drive letters.  On the other hand,
 it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
 
 Optional Features
 =================
 
    If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+   Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System).  The
+'README' should mention any '--enable-' and '--with-' options that the
 package recognizes.
 
-   For packages that use the X Window System, `configure' can usually
+   For packages that use the X Window System, 'configure' can usually
 find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
 
    Some packages offer the ability to configure how verbose the
-execution of `make' will be.  For these packages, running `./configure
+execution of 'make' will be.  For these packages, running './configure
 --enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
+overridden with 'make V=1'; while running './configure
 --disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
+overridden with 'make V=0'.
 
 Particular systems
 ==================
 
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU CC
+is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
      ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved.  Use GNU `make'
-instead.
+   HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved.  Use GNU 'make' instead.
 
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
+parse its '<wchar.h>' header file.  The option '-nodtk' can be used as a
+workaround.  If GNU CC is not installed, it is therefore recommended to
+try
 
      ./configure CC="cc"
 
@@ -242,26 +240,26 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+   On Solaris, don't put '/usr/ucb' early in your 'PATH'.  This
 directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
+these programs are available in '/usr/bin'.  So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
 
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
+   On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'.  It is recommended to use the following options:
 
      ./configure --prefix=/boot/common
 
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' cannot figure out
+   There may be some features 'configure' cannot figure out
 automatically, but needs to determine by the type of machine the package
 will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
+_same_ architectures, 'configure' can figure that out, but if it prints
 a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
+'--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
 
      CPU-COMPANY-SYSTEM
 
@@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
      OS
      KERNEL-OS
 
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
+   See the file 'config.sub' for the possible values of each field.  If
+'config.sub' isn't included in this package, then this package doesn't
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the option '--target=TYPE' to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
 platform different from the build platform, you should specify the
 "host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
+eventually be run) with '--host=TYPE'.
 
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
+   If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists.  Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
 
 Defining Variables
 ==================
 
    Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
+environment passed to 'configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
+them in the 'configure' command line, using 'VAR=value'.  For example:
 
      ./configure CC=/usr/local2/bin/gcc
 
-causes the specified `gcc' to be used as the C compiler (unless it is
+causes the specified 'gcc' to be used as the C compiler (unless it is
 overridden in the site shell script).
 
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation.  Until the limitation is lifted, you can use
-this workaround:
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation.  Until the limitation is lifted, you can use this
+workaround:
 
      CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
 
-`configure' Invocation
+'configure' Invocation
 ======================
 
-   `configure' recognizes the following options to control how it
+   'configure' recognizes the following options to control how it
 operates.
 
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
+'--help'
+'-h'
+     Print a summary of all of the options to 'configure', and exit.
 
-`--help=short'
-`--help=recursive'
+'--help=short'
+'--help=recursive'
      Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
+     'configure', and exit.  The 'short' variant lists options used only
+     in the top level, while the 'recursive' variant lists options also
+     present in any nested packages.
 
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
+'--version'
+'-V'
+     Print the version of Autoconf used to generate the 'configure'
      script, and exit.
 
-`--cache-file=FILE'
+'--cache-file=FILE'
      Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     traditionally 'config.cache'.  FILE defaults to '/dev/null' to
      disable caching.
 
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
+'--config-cache'
+'-C'
+     Alias for '--cache-file=config.cache'.
 
-`--quiet'
-`--silent'
-`-q'
+'--quiet'
+'--silent'
+'-q'
      Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
+     suppress all normal output, redirect it to '/dev/null' (any error
      messages will still be shown).
 
-`--srcdir=DIR'
+'--srcdir=DIR'
      Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
+     'configure' can determine that directory automatically.
 
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
+'--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names:: for
+     more details, including other options available for fine-tuning the
+     installation locations.
 
-`--no-create'
-`-n'
+'--no-create'
+'-n'
      Run the configure checks, but stop before creating any output
      files.
 
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
+'configure' also accepts some other, not widely useful, options.  Run
+'configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
index 03e34d0..c92de3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,44 +2,68 @@
 
 SUBDIRS = src po
 
-INTLTOOL_FILES = intltool-extract.in \
-                 intltool-merge.in \
-                 intltool-update.in
-
 EXTRA_DIST = \
 	autogen.sh \
-	xnec2c.glade \
-	xnec2c.gladep \
-	xnec2c.png \
-	xnec2c.desktop \
+	xnec2c \
+	files \
 	examples \
-	doc \
-	$(INTLTOOL_FILES)
+	doc
 
 DISTCLEANFILES = \
-	intltool-extract* \
-    intltool-merge* \
-    intltool-update* \
-    po/.intltool-merge-cache*
+				 autom4te.cache/* \
+				 intl/* \
+				 m4/* \
+				 aclocal.m4 \
+				 compile \
+				 config.guess \
+				 config.rpath \
+				 config.status \
+				 config.sub \
+				 configure \
+				 depcomp \
+				 install-sh \
+				 missing \
+				 ABOUT-NLS \
+				 Makefile.in \
+				 config.h \
+				 config.h.in \
+				 config.log \
+				 configure \
+				 stamp-h1 \
+				 stamp-h.in \
+				 src/Makefile.in \
+				 po/Rules-quot \
+				 po/en at quot.header \
+				 po/remove-potcdate.sin \
+				 po/Makevars.template \
+				 po/boldquot.sed \
+				 po/insert-header.sin \
+				 po/stamp-po \
+				 po/en at boldquot.header \
+				 po/quot.sed \
+				 po/Makefile.in.in \
+				 po/xnec2c.pot \
+				 Makefile
 
 install-data-local:
 	@$(NORMAL_INSTALL)
-	if test -d $(srcdir)/pixmaps; then \
-	  $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
-	  for pixmap in $(srcdir)/pixmaps/*; do \
-	    if test -f $$pixmap; then \
-	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
-	    fi \
-	  done \
-	fi
-
-dist-hook:
-	if test -d pixmaps; then \
-	  mkdir $(distdir)/pixmaps; \
-	  for pixmap in pixmaps/*; do \
-	    if test -f $$pixmap; then \
-	      cp -p $$pixmap $(distdir)/pixmaps; \
-	    fi \
-	  done \
-	fi
+	if test -d files/; then \
+	  cp files/$(PACKAGE).desktop $(DESTDIR)/usr/share/applications/; \
+	  cp files/$(PACKAGE).png $(DESTDIR)/usr/share/pixmaps/; \
+	fi; \
+	if !(test -d $(DESTDIR)/usr/share/doc/$(PACKAGE)); then \
+	  mkdir $(DESTDIR)/usr/share/doc/$(PACKAGE)/; \
+	  mkdir $(DESTDIR)/usr/share/doc/$(PACKAGE)/examples/; \
+	fi; \
+	if test -d doc/; then \
+	  cp -r doc/* $(DESTDIR)/usr/share/doc/$(PACKAGE)/; \
+	  cp -r doc/$(PACKAGE).1.gz $(DESTDIR)/usr/share/man/man1/; \
+	  cp examples/* $(DESTDIR)/usr/share/doc/$(PACKAGE)/examples/; \
+	fi; \
+	if !(test -d /home/`logname`/$(PACKAGE)); then \
+	  cp -r $(PACKAGE) /home/`logname`/; \
+	else \
+	  cp $(PACKAGE)/$(PACKAGE).glade /home/`logname`/$(PACKAGE); \
+	fi; \
+	chown -R `logname`:`logname` /home/`logname`/$(PACKAGE);
 
diff --git a/Makefile.in b/Makefile.in
index d05cbbf..15dfbe3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -85,9 +85,27 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
+	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
+	$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
+	$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
+	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
+	$(top_srcdir)/m4/inttypes-pri.m4 \
+	$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/lock.m4 \
+	$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
+	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/size_max.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/threadlib.m4 \
+	$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
+	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -155,8 +173,9 @@ ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
-	COPYING ChangeLog INSTALL NEWS README compile install-sh \
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README \
+	compile config.guess config.rpath config.sub install-sh \
 	missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -201,18 +220,19 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
+ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
@@ -227,35 +247,53 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GENCAT = @GENCAT@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
-INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
-INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
-INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+INTLOBJS = @INTLOBJS@
+INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
 LIBS = @LIBS@
+LIBTHREAD = @LIBTHREAD@
+LTLIBC = @LTLIBC@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -271,17 +309,23 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PROGRAMNAME_LOCALEDIR = @PROGRAMNAME_LOCALEDIR@
+RANLIB = @RANLIB@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WINDRES = @WINDRES@
+WOE32 = @WOE32@
+WOE32DLL = @WOE32DLL@
 XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -294,20 +338,26 @@ am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
 bindir = @bindir@
+build = @build@
 build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
+host = @host@
 host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
 htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
-intltool__v_merge_options_ = @intltool__v_merge_options_@
-intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -328,25 +378,48 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = src po
-INTLTOOL_FILES = intltool-extract.in \
-                 intltool-merge.in \
-                 intltool-update.in
-
 EXTRA_DIST = \
 	autogen.sh \
-	xnec2c.glade \
-	xnec2c.gladep \
-	xnec2c.png \
-	xnec2c.desktop \
+	xnec2c \
+	files \
 	examples \
-	doc \
-	$(INTLTOOL_FILES)
+	doc
 
 DISTCLEANFILES = \
-	intltool-extract* \
-    intltool-merge* \
-    intltool-update* \
-    po/.intltool-merge-cache*
+				 autom4te.cache/* \
+				 intl/* \
+				 m4/* \
+				 aclocal.m4 \
+				 compile \
+				 config.guess \
+				 config.rpath \
+				 config.status \
+				 config.sub \
+				 configure \
+				 depcomp \
+				 install-sh \
+				 missing \
+				 ABOUT-NLS \
+				 Makefile.in \
+				 config.h \
+				 config.h.in \
+				 config.log \
+				 configure \
+				 stamp-h1 \
+				 stamp-h.in \
+				 src/Makefile.in \
+				 po/Rules-quot \
+				 po/en at quot.header \
+				 po/remove-potcdate.sin \
+				 po/Makevars.template \
+				 po/boldquot.sed \
+				 po/insert-header.sin \
+				 po/stamp-po \
+				 po/en at boldquot.header \
+				 po/quot.sed \
+				 po/Makefile.in.in \
+				 po/xnec2c.pot \
+				 Makefile
 
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -564,9 +637,6 @@ distdir: $(DISTFILES)
 	      || exit 1; \
 	  fi; \
 	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
 	-test -n "$(am__skip_mode_fix)" \
 	|| find "$(distdir)" -type d ! -perm -755 \
 		-exec chmod u+rwx,go+rx {} \; -o \
@@ -575,7 +645,7 @@ distdir: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -601,7 +671,7 @@ dist-shar: distdir
 	@echo WARNING: "Support for shar distribution archives is" \
 	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -619,7 +689,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -629,7 +699,7 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
@@ -643,6 +713,7 @@ distcheck: dist
 	  && am__cwd=`pwd` \
 	  && $(am__cd) $(distdir)/_build/sub \
 	  && ../../configure \
+	    --with-included-gettext \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	    --srcdir=../.. --prefix="$$dc_install_base" \
@@ -808,8 +879,8 @@ uninstall-am:
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--refresh check check-am clean clean-cscope clean-generic \
 	cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
-	dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
-	dist-zip distcheck distclean distclean-generic distclean-hdr \
+	dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-hdr \
 	distclean-tags distcleancheck distdir distuninstallcheck dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-data install-data-am install-data-local install-dvi \
@@ -826,24 +897,25 @@ uninstall-am:
 
 install-data-local:
 	@$(NORMAL_INSTALL)
-	if test -d $(srcdir)/pixmaps; then \
-	  $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
-	  for pixmap in $(srcdir)/pixmaps/*; do \
-	    if test -f $$pixmap; then \
-	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
-	    fi \
-	  done \
-	fi
-
-dist-hook:
-	if test -d pixmaps; then \
-	  mkdir $(distdir)/pixmaps; \
-	  for pixmap in pixmaps/*; do \
-	    if test -f $$pixmap; then \
-	      cp -p $$pixmap $(distdir)/pixmaps; \
-	    fi \
-	  done \
-	fi
+	if test -d files/; then \
+	  cp files/$(PACKAGE).desktop $(DESTDIR)/usr/share/applications/; \
+	  cp files/$(PACKAGE).png $(DESTDIR)/usr/share/pixmaps/; \
+	fi; \
+	if !(test -d $(DESTDIR)/usr/share/doc/$(PACKAGE)); then \
+	  mkdir $(DESTDIR)/usr/share/doc/$(PACKAGE)/; \
+	  mkdir $(DESTDIR)/usr/share/doc/$(PACKAGE)/examples/; \
+	fi; \
+	if test -d doc/; then \
+	  cp -r doc/* $(DESTDIR)/usr/share/doc/$(PACKAGE)/; \
+	  cp -r doc/$(PACKAGE).1.gz $(DESTDIR)/usr/share/man/man1/; \
+	  cp examples/* $(DESTDIR)/usr/share/doc/$(PACKAGE)/examples/; \
+	fi; \
+	if !(test -d /home/`logname`/$(PACKAGE)); then \
+	  cp -r $(PACKAGE) /home/`logname`/; \
+	else \
+	  cp $(PACKAGE)/$(PACKAGE).glade /home/`logname`/$(PACKAGE); \
+	fi; \
+	chown -R `logname`:`logname` /home/`logname`/$(PACKAGE);
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/aclocal.m4 b/aclocal.m4
index e8cab04..9c4ed4e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,669 +20,9 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995, 1996
-#
-# Modified to never use included libintl. 
-# Owen Taylor <otaylor at redhat.com>, 12/15/1998
-#
-# Major rework to remove unused code
-# Owen Taylor <otaylor at redhat.com>, 12/11/2002
-#
-# Added better handling of ALL_LINGUAS from GNU gettext version 
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
-#
-# Modified to require ngettext
-# Matthias Clasen <mclasen at redhat.com> 08/06/2004
-#
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
-
-dnl
-dnl We go to great lengths to make sure that aclocal won't 
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
-
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
-  [AC_CHECK_HEADERS([locale.h])
-    if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1,
-        [Define if your <locale.h> file defines LC_MESSAGES.])
-    fi
-  fi])
-
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-	ac_cv_path_$1="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
-  dnl NLS is obligatory
-  [USE_NLS=yes
-    AC_SUBST(USE_NLS)
-
-    gt_cv_have_gettext=no
-
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
-
-    AC_CHECK_HEADER(libintl.h,
-     [gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
-
-      #
-      # First check in libc
-      #
-      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
-        [AC_TRY_LINK([
-#include <libintl.h>
-],
-         [return !ngettext ("","", 1)],
-	  gt_cv_func_ngettext_libc=yes,
-          gt_cv_func_ngettext_libc=no)
-        ])
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
-        	[AC_TRY_LINK([
-#include <libintl.h>
-],
-	          [return !dgettext ("","")],
-		  gt_cv_func_dgettext_libc=yes,
-	          gt_cv_func_dgettext_libc=no)
-        	])
-      fi
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        AC_CHECK_FUNCS(bind_textdomain_codeset)
-      fi
-
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-	 || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-        
-        AC_CHECK_LIB(intl, bindtextdomain,
-	    [AC_CHECK_LIB(intl, ngettext,
-		    [AC_CHECK_LIB(intl, dgettext,
-			          gt_cv_func_dgettext_libintl=yes)])])
-
-	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
-	  AC_MSG_RESULT([])
-  	  AC_CHECK_LIB(intl, ngettext,
-          	[AC_CHECK_LIB(intl, dcgettext,
-		       [gt_cv_func_dgettext_libintl=yes
-			libintl_extra_libs=-liconv],
-			:,-liconv)],
-		:,-liconv)
-        fi
-
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          AC_CHECK_FUNCS(bind_textdomain_codeset)
-          LIBS="$glib_save_LIBS"
-
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
-
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-  
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
-  
-      if test "$gt_cv_have_gettext" = "yes"; then
-	AC_DEFINE(HAVE_GETTEXT,1,
-	  [Define if the GNU gettext() function is already present or preinstalled.])
-	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-	if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-	  AC_CHECK_FUNCS(dcgettext)
-	  MSGFMT_OPTS=
-	  AC_MSG_CHECKING([if msgfmt accepts -c])
-	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo at bar.xx>\n"
-"Language-Team: C <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
-], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
-	  AC_SUBST(MSGFMT_OPTS)
-	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-			 return _nl_msg_cat_cntr],
-	    [CATOBJEXT=.gmo 
-             DATADIRNAME=share],
-	    [case $host in
-	    *-*-solaris*)
-	    dnl On Solaris, if bind_textdomain_codeset is in libc,
-	    dnl GNU format message catalog is always supported,
-            dnl since both are added to the libc all together.
-	    dnl Hence, we'd like to go with DATADIRNAME=share and
-	    dnl and CATOBJEXT=.gmo in this case.
-            AC_CHECK_FUNC(bind_textdomain_codeset,
-	      [CATOBJEXT=.gmo 
-               DATADIRNAME=share],
-	      [CATOBJEXT=.mo
-               DATADIRNAME=lib])
-	    ;;
-	    *-*-openbsd*)
-	    CATOBJEXT=.mo
-            DATADIRNAME=share
-	    ;;
-	    *)
-	    CATOBJEXT=.mo
-            DATADIRNAME=lib
-	    ;;
-	    esac])
-          LIBS="$glib_save_LIBS"
-	  INSTOBJEXT=.mo
-	else
-	  gt_cv_have_gettext=no
-	fi
-      fi
-    ])
-
-    if test "$gt_cv_have_gettext" = "yes" ; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [always defined to indicate that i18n is enabled])
-    fi
-
-    dnl Test whether we really found GNU xgettext.
-    if test "$XGETTEXT" != ":"; then
-      dnl If it is not GNU xgettext we define it as : so that the
-      dnl Makefiles still can work.
-      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        AC_MSG_RESULT(
-	  [found xgettext program is not GNU xgettext; ignore it])
-        XGETTEXT=":"
-      fi
-    fi
-
-    # We need to process the po/ directory.
-    POSUB=po
-
-    AC_OUTPUT_COMMANDS(
-      [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
-
-    dnl These rules are solely for the distribution goal.  While doing this
-    dnl we only have to keep exactly one list of the available catalogs
-    dnl in configure.ac.
-    for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(CATALOGS)
-    AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
-    AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
-    AC_SUBST(INTLLIBS)
-    AC_SUBST(PO_IN_DATADIR_TRUE)
-    AC_SUBST(PO_IN_DATADIR_FALSE)
-    AC_SUBST(POFILES)
-    AC_SUBST(POSUB)
-  ])
-
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation 
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by 
-# glib-gettextize.
-dnl
-AU_DEFUN([GLIB_GNU_GETTEXT],
-  [AC_REQUIRE([AC_PROG_CC])dnl
-   
-   GLIB_LC_MESSAGES
-   GLIB_WITH_NLS
-
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
- 	   # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
-   dnl Try to locate is.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
-
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
-  ],
-  [[$0: This macro is deprecated. You should use upstream gettext instead.]])
-
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-glib_save_datarootdir="$datarootdir"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-datarootdir=`eval echo "${datarootdir}"`
-if test "x$CATOBJEXT" = "x.mo" ; then
-  localedir=`eval echo "${libdir}/locale"`
-else
-  localedir=`eval echo "${datadir}/locale"`
-fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-datarootdir="$glib_save_datarootdir"
-AC_DEFINE_UNQUOTED($1, "$localedir",
-  [Define the location where the catalogs will be installed])
-])
-
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_ac,[],[
-AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
-
-# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
-# 
-# Create a temporary file with TEST-FILE as its contents and pass the
-# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
-# 0 and perform ACTION-IF-FAIL for any other exit status.
-AC_DEFUN([GLIB_RUN_PROG],
-[cat >conftest.foo <<_ACEOF
-$2
-_ACEOF
-if AC_RUN_LOG([$1 conftest.foo]); then
-  m4_ifval([$3], [$3], [:])
-m4_ifvaln([$4], [else $4])dnl
-echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
-sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
-fi])
-
-
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 42 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL], [
-AC_PREREQ([2.50])dnl
-AC_REQUIRE([AM_NLS])dnl
-
-case "$am__api_version" in
-    1.[01234])
-	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
-    ;;
-    *)
-    ;;
-esac
-
-INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-if test -n "$1"; then
-    AC_MSG_CHECKING([for intltool >= $1])
-    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
-fi
-
-AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
-AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
-AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
-fi
-
-if test -z "$AM_DEFAULT_VERBOSITY"; then
-  AM_DEFAULT_VERBOSITY=1
-fi
-AC_SUBST([AM_DEFAULT_VERBOSITY])
-
-INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
-INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
-INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
-AC_SUBST(INTLTOOL_V_MERGE)
-AC_SUBST(INTLTOOL__v_MERGE_)
-AC_SUBST(INTLTOOL__v_MERGE_0)
-
-INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
-intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
-intltool__v_merge_options_0='-q'
-AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
-AC_SUBST(intltool__v_merge_options_)
-AC_SUBST(intltool__v_merge_options_0)
-
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
-else
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
-fi
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-_IT_SUBST(INTLTOOL_DESKTOP_RULE)
-_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
-_IT_SUBST(INTLTOOL_KEYS_RULE)
-_IT_SUBST(INTLTOOL_PROP_RULE)
-_IT_SUBST(INTLTOOL_OAF_RULE)
-_IT_SUBST(INTLTOOL_PONG_RULE)
-_IT_SUBST(INTLTOOL_SERVER_RULE)
-_IT_SUBST(INTLTOOL_SHEET_RULE)
-_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
-_IT_SUBST(INTLTOOL_UI_RULE)
-_IT_SUBST(INTLTOOL_XAM_RULE)
-_IT_SUBST(INTLTOOL_KBD_RULE)
-_IT_SUBST(INTLTOOL_XML_RULE)
-_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-_IT_SUBST(INTLTOOL_CAVES_RULE)
-_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
-_IT_SUBST(INTLTOOL_THEME_RULE)
-_IT_SUBST(INTLTOOL_SERVICE_RULE)
-_IT_SUBST(INTLTOOL_POLICY_RULE)
-
-# Check the gettext tools to make sure they are GNU
-AC_PATH_PROG(XGETTEXT, xgettext)
-AC_PATH_PROG(MSGMERGE, msgmerge)
-AC_PATH_PROG(MSGFMT, msgfmt)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
-   AC_MSG_ERROR([perl not found])
-fi
-AC_MSG_CHECKING([for perl >= 5.8.1])
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
-else
-   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
-   AC_MSG_RESULT([$IT_PERL_VERSION])
-fi
-if test "x$2" != "xno-xml"; then
-   AC_MSG_CHECKING([for XML::Parser])
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       AC_MSG_RESULT([ok])
-   else
-       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-   fi
-fi
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
+# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
 
-IT_PO_SUBDIR([po])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be executed at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
-  AC_CONFIG_COMMANDS([$1/stamp-it], [
-    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
-       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
-    fi
-    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
-    >"$1/stamp-it.tmp"
-    [sed '/^#/d
-	 s/^[[].*] *//
-	 /^[ 	]*$/d
-	'"s|^|	$ac_top_srcdir/|" \
-      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
-    ]
-    [sed '/^POTFILES =/,/[^\\]$/ {
-		/^POTFILES =/!d
-		r $1/POTFILES
-	  }
-	 ' "$1/Makefile.in" >"$1/Makefile"]
-    rm -f "$1/Makefile.tmp"
-    mv "$1/stamp-it.tmp" "$1/stamp-it"
-  ])
-])dnl
-])
-
-# _IT_SUBST(VARIABLE)
-# -------------------
-# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
-#
-AC_DEFUN([_IT_SUBST],
-[
-AC_SUBST([$1])
-m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
-]
-)
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
-
-# nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
-dnl Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
-
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_NLS],
-[
-  AC_MSG_CHECKING([whether NLS is requested])
-  dnl Default is enabled NLS
-  AC_ARG_ENABLE([nls],
-    [  --disable-nls           do not use Native Language Support],
-    USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT([$USE_NLS])
-  AC_SUBST([USE_NLS])
-])
-
-dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29.1)
-dnl
 dnl Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists at gmail.com>
 dnl
@@ -723,7 +63,7 @@ dnl
 dnl See the "Since" comment for each macro you use to see what version
 dnl of the macros you require.
 m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29.1])
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
@@ -824,7 +164,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -834,11 +174,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
+        else
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
@@ -855,7 +195,7 @@ installed software in a non-standard prefix.
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
 	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -956,7 +296,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 ])dnl PKG_CHECK_VAR
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -971,7 +311,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -987,14 +327,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1046,7 +386,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1077,7 +417,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1268,7 +608,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1344,7 +684,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1541,7 +881,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1562,7 +902,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1584,7 +924,7 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1619,7 +959,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1669,7 +1009,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1708,7 +1048,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1737,7 +1077,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1784,7 +1124,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1803,7 +1143,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1884,7 +1224,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1944,7 +1284,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1972,7 +1312,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1991,7 +1331,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2122,3 +1462,34 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([m4/codeset.m4])
+m4_include([m4/extern-inline.m4])
+m4_include([m4/fcntl-o.m4])
+m4_include([m4/gettext.m4])
+m4_include([m4/glibc2.m4])
+m4_include([m4/glibc21.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/intdiv0.m4])
+m4_include([m4/intl.m4])
+m4_include([m4/intlmacosx.m4])
+m4_include([m4/intmax.m4])
+m4_include([m4/inttypes-pri.m4])
+m4_include([m4/inttypes_h.m4])
+m4_include([m4/lcmessage.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/lock.m4])
+m4_include([m4/longlong.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/po.m4])
+m4_include([m4/printf-posix.m4])
+m4_include([m4/progtest.m4])
+m4_include([m4/size_max.m4])
+m4_include([m4/stdint_h.m4])
+m4_include([m4/threadlib.m4])
+m4_include([m4/uintmax_t.m4])
+m4_include([m4/visibility.m4])
+m4_include([m4/wchar_t.m4])
+m4_include([m4/wint_t.m4])
+m4_include([m4/xsize.m4])
diff --git a/autogen.sh b/autogen.sh
index 0be28e8..5bce9ba 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,539 +1,1578 @@
 #!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-#name of package
-test "$PKG_NAME" || PKG_NAME=Package
-test "$srcdir" || srcdir=.
-
-# default version requirements ...
-test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53
-test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9
-test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3
-test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40
-test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0
-test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25
-test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0
-test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0
-test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0
-test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2
-
-# a list of required m4 macros.  Package can set an initial value
-test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS=
-test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS=
-
-# Not all echo versions allow -n, so we check what is possible. This test is
-# based on the one in autoconf.
-ECHO_C=
-ECHO_N=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ;;
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
+#                        a u t o g e n . s h
+#
+# Copyright (c) 2005-2009 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+#
+# Script for automatically preparing the sources for compilation by
+# performing the myriad of necessary steps.  The script attempts to
+# detect proper version support, and outputs warnings about particular
+# systems that have autotool peculiarities.
+#
+# Basically, if everything is set up and installed correctly, the
+# script will validate that minimum versions of the GNU Build System
+# tools are installed, account for several common configuration
+# issues, and then simply run autoreconf for you.
+#
+# If autoreconf fails, which can happen for many valid configurations,
+# this script proceeds to run manual preparation steps effectively
+# providing a POSIX shell script (mostly complete) reimplementation of
+# autoreconf.
+#
+# The AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER
+# environment variables and corresponding _OPTIONS variables (e.g.
+# AUTORECONF_OPTIONS) may be used to override the default automatic
+# detection behaviors.  Similarly the _VERSION variables will override
+# the minimum required version numbers.
+#
+# Examples:
+#
+#   To obtain help on usage:
+#     ./autogen.sh --help
+#
+#   To obtain verbose output:
+#     ./autogen.sh --verbose
+#
+#   To skip autoreconf and prepare manually:
+#     AUTORECONF=false ./autogen.sh
+#
+#   To verbosely try running with an older (unsupported) autoconf:
+#     AUTOCONF_VERSION=2.50 ./autogen.sh --verbose
+#
+# Author:
+#   Christopher Sean Morrison <morrison at brlcad.org>
+#
+# Patches:
+#   Sebastian Pipping <sebastian at pipping.org>
+#
+######################################################################
 
-# some terminal codes ...
-if tty < /dev/null 1>/dev/null 2>&1; then
-    boldface="`tput bold 2>/dev/null`"
-    normal="`tput sgr0 2>/dev/null`"
-else
-    boldface=
-    normal=
-fi
-printbold() {
-    echo $ECHO_N "$boldface" $ECHO_C
-    echo "$@"
-    echo $ECHO_N "$normal" $ECHO_C
-}    
-printerr() {
-    echo "$@" >&2
+# set to minimum acceptable version of autoconf
+if [ "x$AUTOCONF_VERSION" = "x" ] ; then
+    AUTOCONF_VERSION=2.52
+fi
+# set to minimum acceptable version of automake
+if [ "x$AUTOMAKE_VERSION" = "x" ] ; then
+    AUTOMAKE_VERSION=1.6.0
+fi
+# set to minimum acceptable version of libtool
+if [ "x$LIBTOOL_VERSION" = "x" ] ; then
+    LIBTOOL_VERSION=1.4.2
+fi
+
+
+##################
+# ident function #
+##################
+ident ( ) {
+    # extract copyright from header
+    __copyright="`grep Copyright $AUTOGEN_SH | head -${HEAD_N}1 | awk '{print $4}'`"
+    if [ "x$__copyright" = "x" ] ; then
+	__copyright="`date +%Y`"
+    fi
+
+    # extract version from CVS Id string
+    __id="$Id: autogen.sh 33925 2009-03-01 23:27:06Z brlcad $"
+    __version="`echo $__id | sed 's/.*\([0-9][0-9][0-9][0-9]\)[-\/]\([0-9][0-9]\)[-\/]\([0-9][0-9]\).*/\1\2\3/'`"
+    if [ "x$__version" = "x" ] ; then
+	__version=""
+    fi
+
+    echo "autogen.sh build preparation script by Christopher Sean Morrison"
+    echo "  + config.guess download patch by Sebastian Pipping (2008-12-03)"
+    echo "revised 3-clause BSD-style license, copyright (c) $__copyright"
+    echo "script version $__version, ISO/IEC 9945 POSIX shell script"
 }
 
-# Usage:
-#     compare_versions MIN_VERSION ACTUAL_VERSION
-# returns true if ACTUAL_VERSION >= MIN_VERSION
-compare_versions() {
-    ch_min_version=$1
-    ch_actual_version=$2
-    ch_status=0
-    IFS="${IFS=         }"; ch_save_IFS="$IFS"; IFS="."
-    set $ch_actual_version
-    for ch_min in $ch_min_version; do
-        ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
-        if [ -z "$ch_min" ]; then break; fi
-        if [ -z "$ch_cur" ]; then ch_status=1; break; fi
-        if [ $ch_cur -gt $ch_min ]; then break; fi
-        if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
-    done
-    IFS="$ch_save_IFS"
-    return $ch_status
+
+##################
+# USAGE FUNCTION #
+##################
+usage ( ) {
+    echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [-d|--download] [--version]"
+    echo "    --help      Help on $NAME_OF_AUTOGEN usage"
+    echo "    --verbose   Verbose progress output"
+    echo "    --quiet     Quiet suppressed progress output"
+    echo "    --download  Download the latest config.guess from gnulib"
+    echo "    --version   Only perform GNU Build System version checks"
+    echo
+    echo "Description: This script will validate that minimum versions of the"
+    echo "GNU Build System tools are installed and then run autoreconf for you."
+    echo "Should autoreconf fail, manual preparation steps will be run"
+    echo "potentially accounting for several common preparation issues.  The"
+
+    echo "AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER,"
+    echo "PROJECT, & CONFIGURE environment variables and corresponding _OPTIONS"
+    echo "variables (e.g. AUTORECONF_OPTIONS) may be used to override the"
+    echo "default automatic detection behavior."
+    echo
+
+    ident
+
+    return 0
 }
 
-# Usage:
-#     version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
-# checks to see if the package is available
-version_check() {
-    vc_package=$1
-    vc_variable=$2
-    vc_checkprogs=$3
-    vc_min_version=$4
-    vc_source=$5
-    vc_status=1
-
-    vc_checkprog=`eval echo "\\$$vc_variable"`
-    if [ -n "$vc_checkprog" ]; then
-	printbold "using $vc_checkprog for $vc_package"
-	return 0
+
+##########################
+# VERSION_ERROR FUNCTION #
+##########################
+version_error ( ) {
+    if [ "x$1" = "x" ] ; then
+	echo "INTERNAL ERROR: version_error was not provided a version"
+	exit 1
     fi
+    if [ "x$2" = "x" ] ; then
+	echo "INTERNAL ERROR: version_error was not provided an application name"
+	exit 1
+    fi
+    $ECHO
+    $ECHO "ERROR:  To prepare the ${PROJECT} build system from scratch,"
+    $ECHO "        at least version $1 of $2 must be installed."
+    $ECHO
+    $ECHO "$NAME_OF_AUTOGEN does not need to be run on the same machine that will"
+    $ECHO "run configure or make.  Either the GNU Autotools will need to be installed"
+    $ECHO "or upgraded on this system, or $NAME_OF_AUTOGEN must be run on the source"
+    $ECHO "code on another system and then transferred to here. -- Cheers!"
+    $ECHO
+}
 
-    if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then
-	vc_comparator="="
-    else
-	vc_comparator=">="
-    fi
-    printbold "checking for $vc_package $vc_comparator $vc_min_version..."
-    for vc_checkprog in $vc_checkprogs; do
-	echo $ECHO_N "  testing $vc_checkprog... " $ECHO_C
-	if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
-	    vc_actual_version=`$vc_checkprog --version | head -n 1 | \
-                               sed 's/^.*[ 	]\([0-9.]*[a-z]*\).*$/\1/'`
-	    if compare_versions $vc_min_version $vc_actual_version; then
-		echo "found $vc_actual_version"
-		# set variables
-		eval "$vc_variable=$vc_checkprog; \
-			${vc_variable}_VERSION=$vc_actual_version"
-		vc_status=0
-		break
-	    else
-		echo "too old (found version $vc_actual_version)"
+##########################
+# VERSION_CHECK FUNCTION #
+##########################
+version_check ( ) {
+    if [ "x$1" = "x" ] ; then
+	echo "INTERNAL ERROR: version_check was not provided a minimum version"
+	exit 1
+    fi
+    _min="$1"
+    if [ "x$2" = "x" ] ; then
+	echo "INTERNAL ERROR: version check was not provided a comparison version"
+	exit 1
+    fi
+    _cur="$2"
+
+    # needed to handle versions like 1.10 and 1.4-p6
+    _min="`echo ${_min}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`"
+    _cur="`echo ${_cur}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`"
+
+    _min_major="`echo $_min | cut -d. -f1`"
+    _min_minor="`echo $_min | cut -d. -f2`"
+    _min_patch="`echo $_min | cut -d. -f3`"
+
+    _cur_major="`echo $_cur | cut -d. -f1`"
+    _cur_minor="`echo $_cur | cut -d. -f2`"
+    _cur_patch="`echo $_cur | cut -d. -f3`"
+
+    if [ "x$_min_major" = "x" ] ; then
+	_min_major=0
+    fi
+    if [ "x$_min_minor" = "x" ] ; then
+	_min_minor=0
+    fi
+    if [ "x$_min_patch" = "x" ] ; then
+	_min_patch=0
+    fi
+    if [ "x$_cur_minor" = "x" ] ; then
+	_cur_major=0
+    fi
+    if [ "x$_cur_minor" = "x" ] ; then
+	_cur_minor=0
+    fi
+    if [ "x$_cur_patch" = "x" ] ; then
+	_cur_patch=0
+    fi
+
+    $VERBOSE_ECHO "Checking if ${_cur_major}.${_cur_minor}.${_cur_patch} is greater than ${_min_major}.${_min_minor}.${_min_patch}"
+
+    if [ $_min_major -lt $_cur_major ] ; then
+	return 0
+    elif [ $_min_major -eq $_cur_major ] ; then
+	if [ $_min_minor -lt $_cur_minor ] ; then
+	    return 0
+	elif [ $_min_minor -eq $_cur_minor ] ; then
+	    if [ $_min_patch -lt $_cur_patch ] ; then
+		return 0
+	    elif [ $_min_patch -eq $_cur_patch ] ; then
+		return 0
 	    fi
-	else
-	    echo "not found."
 	fi
-    done
-    if [ "$vc_status" != 0 ]; then
-	printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed"
-	printerr "  to build $PKG_NAME.  Download the appropriate package for"
-	printerr "  from your distribution or get the source tarball at"
-        printerr "    $vc_source"
-	printerr
-	exit $vc_status
-    fi
-    return $vc_status
+    fi
+    return 1
 }
 
-# Usage:
-#     require_m4macro filename.m4
-# adds filename.m4 to the list of required macros
-require_m4macro() {
-    case "$REQUIRED_M4MACROS" in
-	$1\ * | *\ $1\ * | *\ $1) ;;
-	*) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
-    esac
-}
 
-forbid_m4macro() {
-    case "$FORBIDDEN_M4MACROS" in
-	$1\ * | *\ $1\ * | *\ $1) ;;
-	*) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
-    esac
+######################################
+# LOCATE_CONFIGURE_TEMPLATE FUNCTION #
+######################################
+locate_configure_template ( ) {
+    _pwd="`pwd`"
+    if test -f "./configure.ac" ; then
+	echo "./configure.ac"
+    elif test -f "./configure.in" ; then
+	echo "./configure.in"
+    elif test -f "$_pwd/configure.ac" ; then
+	echo "$_pwd/configure.ac"
+    elif test -f "$_pwd/configure.in" ; then
+	echo "$_pwd/configure.in"
+    elif test -f "$PATH_TO_AUTOGEN/configure.ac" ; then
+	echo "$PATH_TO_AUTOGEN/configure.ac"
+    elif test -f "$PATH_TO_AUTOGEN/configure.in" ; then
+	echo "$PATH_TO_AUTOGEN/configure.in"
+    fi
 }
 
-# Usage:
-#     add_to_cm_macrodirs dirname
-# Adds the dir to $cm_macrodirs, if it's not there yet.
-add_to_cm_macrodirs() {
-    case $cm_macrodirs in
-    "$1 "* | *" $1 "* | *" $1") ;;
-    *) cm_macrodirs="$cm_macrodirs $1";;
+
+##################
+# argument check #
+##################
+ARGS="$*"
+PATH_TO_AUTOGEN="`dirname $0`"
+NAME_OF_AUTOGEN="`basename $0`"
+AUTOGEN_SH="$PATH_TO_AUTOGEN/$NAME_OF_AUTOGEN"
+
+LIBTOOL_M4="${PATH_TO_AUTOGEN}/misc/libtool.m4"
+
+if [ "x$HELP" = "x" ] ; then
+    HELP=no
+fi
+if [ "x$QUIET" = "x" ] ; then
+    QUIET=no
+fi
+if [ "x$VERBOSE" = "x" ] ; then
+    VERBOSE=no
+fi
+if [ "x$VERSION_ONLY" = "x" ] ; then
+    VERSION_ONLY=no
+fi
+if [ "x$DOWNLOAD" = "x" ] ; then
+    DOWNLOAD=no
+fi
+if [ "x$AUTORECONF_OPTIONS" = "x" ] ; then
+    AUTORECONF_OPTIONS="-i -f"
+fi
+if [ "x$AUTOCONF_OPTIONS" = "x" ] ; then
+    AUTOCONF_OPTIONS="-f"
+fi
+if [ "x$AUTOMAKE_OPTIONS" = "x" ] ; then
+    AUTOMAKE_OPTIONS="-a -c -f"
+fi
+ALT_AUTOMAKE_OPTIONS="-a -c"
+if [ "x$LIBTOOLIZE_OPTIONS" = "x" ] ; then
+    LIBTOOLIZE_OPTIONS="--automake -c -f"
+fi
+ALT_LIBTOOLIZE_OPTIONS="--automake --copy --force"
+if [ "x$ACLOCAL_OPTIONS" = "x" ] ; then
+    ACLOCAL_OPTIONS=""
+fi
+if [ "x$AUTOHEADER_OPTIONS" = "x" ] ; then
+    AUTOHEADER_OPTIONS=""
+fi
+if [ "x$CONFIG_GUESS_URL" = "x" ] ; then
+    CONFIG_GUESS_URL="http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.guess;hb=HEAD"
+fi
+for arg in $ARGS ; do
+    case "x$arg" in
+	x--help) HELP=yes ;;
+	x-[hH]) HELP=yes ;;
+	x--quiet) QUIET=yes ;;
+	x-[qQ]) QUIET=yes ;;
+	x--verbose) VERBOSE=yes ;;
+	x-[dD]) DOWNLOAD=yes ;;
+	x--download) DOWNLOAD=yes ;;
+	x-[vV]) VERBOSE=yes ;;
+	x--version) VERSION_ONLY=yes ;;
+	*)
+	    echo "Unknown option: $arg"
+	    echo
+	    usage
+	    exit 1
+	    ;;
     esac
-}
+done
+
+
+#####################
+# environment check #
+#####################
+
+# sanity check before recursions potentially begin
+if [ ! -f "$AUTOGEN_SH" ] ; then
+    echo "INTERNAL ERROR: $AUTOGEN_SH does not exist"
+    if [ ! "x$0" = "x$AUTOGEN_SH" ] ; then
+	echo "INTERNAL ERROR: dirname/basename inconsistency: $0 != $AUTOGEN_SH"
+    fi
+    exit 1
+fi
+
+# force locale setting to C so things like date output as expected
+LC_ALL=C
+
+# commands that this script expects
+for __cmd in echo head tail pwd ; do
+    echo "test" | $__cmd > /dev/null 2>&1
+    if [ $? != 0 ] ; then
+	echo "INTERNAL ERROR: '${__cmd}' command is required"
+	exit 2
+    fi
+done
+echo "test" | grep "test" > /dev/null 2>&1
+if test ! x$? = x0 ; then
+    echo "INTERNAL ERROR: grep command is required"
+    exit 1
+fi
+echo "test" | sed "s/test/test/" > /dev/null 2>&1
+if test ! x$? = x0 ; then
+    echo "INTERNAL ERROR: sed command is required"
+    exit 1
+fi
+
+
+# determine the behavior of echo
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+    *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+    *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+    *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+# determine the behavior of head
+case "x`echo 'head' | head -n 1 2>&1`" in
+    *xhead*) HEAD_N="n " ;;
+    *) HEAD_N="" ;;
+esac
+
+# determine the behavior of tail
+case "x`echo 'tail' | tail -n 1 2>&1`" in
+    *xtail*) TAIL_N="n " ;;
+    *) TAIL_N="" ;;
+esac
+
+VERBOSE_ECHO=:
+ECHO=:
+if [ "x$QUIET" = "xyes" ] ; then
+    if [ "x$VERBOSE" = "xyes" ] ; then
+	echo "Verbose output quelled by quiet option.  Further output disabled."
+    fi
+else
+    ECHO=echo
+    if [ "x$VERBOSE" = "xyes" ] ; then
+	echo "Verbose output enabled"
+	VERBOSE_ECHO=echo
+    fi
+fi
+
+
+# allow a recursive run to disable further recursions
+if [ "x$RUN_RECURSIVE" = "x" ] ; then
+    RUN_RECURSIVE=yes
+fi
+
 
-# Usage:
-#     print_m4macros_error
-# Prints an error message saying that autoconf macros were misused
-print_m4macros_error() {
-    printerr "***Error***: some autoconf macros required to build $PKG_NAME"
-    printerr "  were not found in your aclocal path, or some forbidden"
-    printerr "  macros were found.  Perhaps you need to adjust your"
-    printerr "  ACLOCAL_FLAGS?"
-    printerr
+################################################
+# check for help arg and bypass version checks #
+################################################
+if [ "x`echo $ARGS | sed 's/.*[hH][eE][lL][pP].*/help/'`" = "xhelp" ] ; then
+    HELP=yes
+fi
+if [ "x$HELP" = "xyes" ] ; then
+    usage
+    $ECHO "---"
+    $ECHO "Help was requested.  No preparation or configuration will be performed."
+    exit 0
+fi
+
+
+#######################
+# set up signal traps #
+#######################
+untrap_abnormal ( ) {
+    for sig in 1 2 13 15; do
+	trap - $sig
+    done
 }
 
-# Usage:
-#     check_m4macros
-# Checks that all the requested macro files are in the aclocal macro path
-# Uses REQUIRED_M4MACROS and ACLOCAL variables.
-check_m4macros() {
-    # construct list of macro directories
-    cm_macrodirs=`$ACLOCAL --print-ac-dir`
-    # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
-    # but it contains only Automake's own macros, so we can ignore it.
-
-    # Read the dirlist file, supported by Automake >= 1.7.
-    # If AUTOMAKE was defined, no version was detected.
-    if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
-	cm_dirlist=`sed 's/[ 	]*#.*//;/^$/d' $cm_macrodirs/dirlist`
-	if [ -n "$cm_dirlist" ] ; then
-	    for cm_dir in $cm_dirlist; do
-		if [ -d $cm_dir ]; then
-		    add_to_cm_macrodirs $cm_dir
-		fi
-	    done
+# do this cleanup whenever we exit.
+trap '
+    # start from the root
+    if test -d "$START_PATH" ; then
+	cd "$START_PATH"
+    fi
+
+    # restore/delete backup files
+    if test "x$PFC_INIT" = "x1" ; then
+	recursive_restore
+    fi
+' 0
+
+# trap SIGHUP (1), SIGINT (2), SIGPIPE (13), SIGTERM (15)
+for sig in 1 2 13 15; do
+    trap '
+	$ECHO ""
+	$ECHO "Aborting $NAME_OF_AUTOGEN: caught signal '$sig'"
+
+	# start from the root
+	if test -d "$START_PATH" ; then
+	    cd "$START_PATH"
+	fi
+
+	# clean up on abnormal exit
+	$VERBOSE_ECHO "rm -rf autom4te.cache"
+	rm -rf autom4te.cache
+
+	if test -f "acinclude.m4.$$.backup" ; then
+	    $VERBOSE_ECHO "cat acinclude.m4.$$.backup > acinclude.m4"
+	    chmod u+w acinclude.m4
+	    cat acinclude.m4.$$.backup > acinclude.m4
+
+	    $VERBOSE_ECHO "rm -f acinclude.m4.$$.backup"
+	    rm -f acinclude.m4.$$.backup
+        fi
+
+	{ (exit 1); exit 1; }
+' $sig
+done
+
+
+#############################
+# look for a configure file #
+#############################
+if [ "x$CONFIGURE" = "x" ] ; then
+    CONFIGURE="`locate_configure_template`"
+    if [ ! "x$CONFIGURE" = "x" ] ; then
+	$VERBOSE_ECHO "Found a configure template: $CONFIGURE"
+    fi
+else
+    $ECHO "Using CONFIGURE environment variable override: $CONFIGURE"
+fi
+if [ "x$CONFIGURE" = "x" ] ; then
+    if [ "x$VERSION_ONLY" = "xyes" ] ; then
+	CONFIGURE=/dev/null
+    else
+	$ECHO
+	$ECHO "A configure.ac or configure.in file could not be located implying"
+	$ECHO "that the GNU Build System is at least not used in this directory.  In"
+	$ECHO "any case, there is nothing to do here without one of those files."
+	$ECHO
+	$ECHO "ERROR: No configure.in or configure.ac file found in `pwd`"
+	exit 1
+    fi
+fi
+
+####################
+# get project name #
+####################
+if [ "x$PROJECT" = "x" ] ; then
+    PROJECT="`grep AC_INIT $CONFIGURE | grep -v '.*#.*AC_INIT' | tail -${TAIL_N}1 | sed 's/^[ 	]*AC_INIT(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    if [ "x$PROJECT" = "xAC_INIT" ] ; then
+	# projects might be using the older/deprecated arg-less AC_INIT .. look for AM_INIT_AUTOMAKE instead
+	PROJECT="`grep AM_INIT_AUTOMAKE $CONFIGURE | grep -v '.*#.*AM_INIT_AUTOMAKE' | tail -${TAIL_N}1 | sed 's/^[ 	]*AM_INIT_AUTOMAKE(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    fi
+    if [ "x$PROJECT" = "xAM_INIT_AUTOMAKE" ] ; then
+	PROJECT="project"
+    fi
+    if [ "x$PROJECT" = "x" ] ; then
+	PROJECT="project"
+    fi
+else
+    $ECHO "Using PROJECT environment variable override: $PROJECT"
+fi
+$ECHO "Preparing the $PROJECT build system...please wait"
+$ECHO
+
+
+########################
+# check for autoreconf #
+########################
+HAVE_AUTORECONF=no
+if [ "x$AUTORECONF" = "x" ] ; then
+    for AUTORECONF in autoreconf ; do
+	$VERBOSE_ECHO "Checking autoreconf version: $AUTORECONF --version"
+	$AUTORECONF --version > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    HAVE_AUTORECONF=yes
+	    break
 	fi
+    done
+else
+    HAVE_AUTORECONF=yes
+    $ECHO "Using AUTORECONF environment variable override: $AUTORECONF"
+fi
+
+
+##########################
+# autoconf version check #
+##########################
+_acfound=no
+if [ "x$AUTOCONF" = "x" ] ; then
+    for AUTOCONF in autoconf ; do
+	$VERBOSE_ECHO "Checking autoconf version: $AUTOCONF --version"
+	$AUTOCONF --version > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    _acfound=yes
+	    break
+	fi
+    done
+else
+    _acfound=yes
+    $ECHO "Using AUTOCONF environment variable override: $AUTOCONF"
+fi
+
+_report_error=no
+if [ ! "x$_acfound" = "xyes" ] ; then
+    $ECHO "ERROR:  Unable to locate GNU Autoconf."
+    _report_error=yes
+else
+    _version="`$AUTOCONF --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`"
+    if [ "x$_version" = "x" ] ; then
+	_version="0.0.0"
+    fi
+    $ECHO "Found GNU Autoconf version $_version"
+    version_check "$AUTOCONF_VERSION" "$_version"
+    if [ $? -ne 0 ] ; then
+	_report_error=yes
     fi
+fi
+if [ "x$_report_error" = "xyes" ] ; then
+    version_error "$AUTOCONF_VERSION" "GNU Autoconf"
+    exit 1
+fi
+
 
-    # Parse $ACLOCAL_FLAGS
-    set - $ACLOCAL_FLAGS
-    while [ $# -gt 0 ]; do
-	if [ "$1" = "-I" ]; then
-	    add_to_cm_macrodirs "$2"
-	    shift
+##########################
+# automake version check #
+##########################
+_amfound=no
+if [ "x$AUTOMAKE" = "x" ] ; then
+    for AUTOMAKE in automake ; do
+	$VERBOSE_ECHO "Checking automake version: $AUTOMAKE --version"
+	$AUTOMAKE --version > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    _amfound=yes
+	    break
 	fi
-	shift
     done
+else
+    _amfound=yes
+    $ECHO "Using AUTOMAKE environment variable override: $AUTOMAKE"
+fi
+
+
+_report_error=no
+if [ ! "x$_amfound" = "xyes" ] ; then
+    $ECHO
+    $ECHO "ERROR: Unable to locate GNU Automake."
+    _report_error=yes
+else
+    _version="`$AUTOMAKE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`"
+    if [ "x$_version" = "x" ] ; then
+	_version="0.0.0"
+    fi
+    $ECHO "Found GNU Automake version $_version"
+    version_check "$AUTOMAKE_VERSION" "$_version"
+    if [ $? -ne 0 ] ; then
+	_report_error=yes
+    fi
+fi
+if [ "x$_report_error" = "xyes" ] ; then
+    version_error "$AUTOMAKE_VERSION" "GNU Automake"
+    exit 1
+fi
 
-    cm_status=0
-    if [ -n "$REQUIRED_M4MACROS" ]; then
-	printbold "Checking for required M4 macros..."
-	# check that each macro file is in one of the macro dirs
-	for cm_macro in $REQUIRED_M4MACROS; do
-	    cm_macrofound=false
-	    for cm_dir in $cm_macrodirs; do
-		if [ -f "$cm_dir/$cm_macro" ]; then
-		    cm_macrofound=true
-		    break
+
+########################
+# check for libtoolize #
+########################
+HAVE_LIBTOOLIZE=yes
+HAVE_ALT_LIBTOOLIZE=no
+_ltfound=no
+if [ "x$LIBTOOLIZE" = "x" ] ; then
+    LIBTOOLIZE=libtoolize
+    $VERBOSE_ECHO "Checking libtoolize version: $LIBTOOLIZE --version"
+    $LIBTOOLIZE --version > /dev/null 2>&1
+    if [ ! $? = 0 ] ; then
+	HAVE_LIBTOOLIZE=no
+	$ECHO
+	if [ "x$HAVE_AUTORECONF" = "xno" ] ; then
+	    $ECHO "Warning:  libtoolize does not appear to be available."
+	else
+	    $ECHO "Warning:  libtoolize does not appear to be available.  This means that"
+	    $ECHO "the automatic build preparation via autoreconf will probably not work."
+	    $ECHO "Preparing the build by running each step individually, however, should"
+	    $ECHO "work and will be done automatically for you if autoreconf fails."
+	fi
+
+	# look for some alternates
+	for tool in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do
+	    $VERBOSE_ECHO "Checking libtoolize alternate: $tool --version"
+	    _glibtoolize="`$tool --version > /dev/null 2>&1`"
+	    if [ $? = 0 ] ; then
+		$VERBOSE_ECHO "Found $tool --version"
+		_glti="`which $tool`"
+		if [ "x$_glti" = "x" ] ; then
+		    $VERBOSE_ECHO "Cannot find $tool with which"
+		    continue;
 		fi
-		# The macro dir in Cygwin environments may contain a file
-		# called dirlist containing other directories to look in.
-		if [ -f "$cm_dir/dirlist" ]; then
-		    for cm_otherdir in `cat $cm_dir/dirlist`; do
-			if [ -f "$cm_otherdir/$cm_macro" ]; then
-			    cm_macrofound=true
-		            break
-			fi
-		    done
+		if test ! -f "$_glti" ; then
+		    $VERBOSE_ECHO "Cannot use $tool, $_glti is not a file"
+		    continue;
 		fi
-	    done
-	    if $cm_macrofound; then
-		:
-	    else
-		printerr "  $cm_macro not found"
-		cm_status=1
-	    fi
-	done
-    fi
-    if [ "$cm_status" != 0 ]; then
-        print_m4macros_error
-        exit $cm_status
-    fi
-    if [ -n "$FORBIDDEN_M4MACROS" ]; then
-	printbold "Checking for forbidden M4 macros..."
-	# check that each macro file is in one of the macro dirs
-	for cm_macro in $FORBIDDEN_M4MACROS; do
-	    cm_macrofound=false
-	    for cm_dir in $cm_macrodirs; do
-		if [ -f "$cm_dir/$cm_macro" ]; then
-		    cm_macrofound=true
-		    break
+		_gltidir="`dirname $_glti`"
+		if [ "x$_gltidir" = "x" ] ; then
+		    $VERBOSE_ECHO "Cannot find $tool path with dirname of $_glti"
+		    continue;
 		fi
-	    done
-	    if $cm_macrofound; then
-		printerr "  $cm_macro found (should be cleared from macros dir)"
-		cm_status=1
+		if test ! -d "$_gltidir" ; then
+		    $VERBOSE_ECHO "Cannot use $tool, $_gltidir is not a directory"
+		    continue;
+		fi
+		HAVE_ALT_LIBTOOLIZE=yes
+		LIBTOOLIZE="$tool"
+		$ECHO
+		$ECHO "Fortunately, $tool was found which means that your system may simply"
+		$ECHO "have a non-standard or incomplete GNU Autotools install.  If you have"
+		$ECHO "sufficient system access, it may be possible to quell this warning by"
+		$ECHO "running:"
+		$ECHO
+		sudo -V > /dev/null 2>&1
+		if [ $? = 0 ] ; then
+		    $ECHO "   sudo ln -s $_glti $_gltidir/libtoolize"
+		    $ECHO
+		else
+		    $ECHO "   ln -s $_glti $_gltidir/libtoolize"
+		    $ECHO
+		    $ECHO "Run that as root or with proper permissions to the $_gltidir directory"
+		    $ECHO
+		fi
+		_ltfound=yes
+		break
 	    fi
 	done
+    else
+	_ltfound=yes
     fi
-    if [ "$cm_status" != 0 ]; then
-        print_m4macros_error
-	exit $cm_status
-    fi
-}
+else
+    _ltfound=yes
+    $ECHO "Using LIBTOOLIZE environment variable override: $LIBTOOLIZE"
+fi
 
-# try to catch the case where the macros2/ directory hasn't been cleared out.
-forbid_m4macro gnome-cxx-check.m4
-
-want_libtool=false
-want_gettext=false
-want_glib_gettext=false
-want_intltool=false
-want_pkg_config=false
-want_gtk_doc=false
-want_gnome_doc_utils=false
-want_maintainer_mode=false
-
-#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
-WANT_AUTOCONF_2_5=1
-export WANT_AUTOCONF_2_5
-version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \
-    "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz"
-AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
-
-find_configure_files() {
-    configure_ac=
-    if test -f "$1/configure.ac"; then
-	configure_ac="$1/configure.ac"
-    elif test -f "$1/configure.in"; then
-	configure_ac="$1/configure.in"
-    fi
-    if test "x$configure_ac" != x; then
-	echo "$configure_ac"
-	$AUTOCONF -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do
-	    find_configure_files "$1/$dir"
-	done
+
+############################
+# libtoolize version check #
+############################
+_report_error=no
+if [ ! "x$_ltfound" = "xyes" ] ; then
+    $ECHO
+    $ECHO "ERROR: Unable to locate GNU Libtool."
+    _report_error=yes
+else
+    _version="`$LIBTOOLIZE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`"
+    if [ "x$_version" = "x" ] ; then
+	_version="0.0.0"
     fi
+    $ECHO "Found GNU Libtool version $_version"
+    version_check "$LIBTOOL_VERSION" "$_version"
+    if [ $? -ne 0 ] ; then
+	_report_error=yes
+    fi
+fi
+if [ "x$_report_error" = "xyes" ] ; then
+    version_error "$LIBTOOL_VERSION" "GNU Libtool"
+    exit 1
+fi
+
+
+#####################
+# check for aclocal #
+#####################
+if [ "x$ACLOCAL" = "x" ] ; then
+    for ACLOCAL in aclocal ; do
+	$VERBOSE_ECHO "Checking aclocal version: $ACLOCAL --version"
+	$ACLOCAL --version > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    break
+	fi
+    done
+else
+    $ECHO "Using ACLOCAL environment variable override: $ACLOCAL"
+fi
+
+
+########################
+# check for autoheader #
+########################
+if [ "x$AUTOHEADER" = "x" ] ; then
+    for AUTOHEADER in autoheader ; do
+	$VERBOSE_ECHO "Checking autoheader version: $AUTOHEADER --version"
+	$AUTOHEADER --version > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    break
+	fi
+    done
+else
+    $ECHO "Using AUTOHEADER environment variable override: $AUTOHEADER"
+fi
+
+
+#########################
+# check if version only #
+#########################
+$VERBOSE_ECHO "Checking whether to only output version information"
+if [ "x$VERSION_ONLY" = "xyes" ] ; then
+    $ECHO
+    ident
+    $ECHO "---"
+    $ECHO "Version requested.  No preparation or configuration will be performed."
+    exit 0
+fi
+
+
+#################################
+# PROTECT_FROM_CLOBBER FUNCTION #
+#################################
+protect_from_clobber ( ) {
+    PFC_INIT=1
+
+    # protect COPYING & INSTALL from overwrite by automake.  the
+    # automake force option will (inappropriately) ignore the existing
+    # contents of a COPYING and/or INSTALL files (depending on the
+    # version) instead of just forcing *missing* files like it does
+    # for AUTHORS, NEWS, and README. this is broken but extremely
+    # prevalent behavior, so we protect against it by keeping a backup
+    # of the file that can later be restored.
+
+    for file in COPYING INSTALL ; do
+	if test -f ${file} ; then
+	    if test -f ${file}.$$.protect_from_automake.backup ; then
+		$VERBOSE_ECHO "Already backed up ${file} in `pwd`"
+	    else
+		$VERBOSE_ECHO "Backing up ${file} in `pwd`"
+		$VERBOSE_ECHO "cp -p ${file} ${file}.$$.protect_from_automake.backup"
+		cp -p ${file} ${file}.$$.protect_from_automake.backup
+	    fi
+	fi
+    done
 }
 
-configure_files="`find_configure_files $srcdir`"
 
-for configure_ac in $configure_files; do
-    dirname=`dirname $configure_ac`
-    if [ -f $dirname/NO-AUTO-GEN ]; then
-	echo skipping $dirname -- flagged as no auto-gen
-	continue
-    fi
-    if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null ||
-       grep "^LT_INIT" $configure_ac >/dev/null; then
-	want_libtool=true
-    fi
-    if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
-	want_gettext=true
+##############################
+# RECURSIVE_PROTECT FUNCTION #
+##############################
+recursive_protect ( ) {
+
+    # for projects using recursive configure, run the build
+    # preparation steps for the subdirectories.  this function assumes
+    # START_PATH was set to pwd before recursion begins so that
+    # relative paths work.
+
+    # git 'r done, protect COPYING and INSTALL from being clobbered
+    protect_from_clobber
+
+    if test -d autom4te.cache ; then
+	$VERBOSE_ECHO "Found an autom4te.cache directory, deleting it"
+	$VERBOSE_ECHO "rm -rf autom4te.cache"
+	rm -rf autom4te.cache
     fi
-    if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
-	want_glib_gettext=true
+
+    # find configure template
+    _configure="`locate_configure_template`"
+    if [ "x$_configure" = "x" ] ; then
+	return
     fi
-    if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null ||
-       grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then
-	want_intltool=true
+    # $VERBOSE_ECHO "Looking for configure template found `pwd`/$_configure"
+
+    # look for subdirs
+    # $VERBOSE_ECHO "Looking for subdirs in `pwd`"
+    _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ 	]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    CHECK_DIRS=""
+    for dir in $_det_config_subdirs ; do
+	if test -d "`pwd`/$dir" ; then
+	    CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\""
+	fi
+    done
+
+    # process subdirs
+    if [ ! "x$CHECK_DIRS" = "x" ] ; then
+	$VERBOSE_ECHO "Recursively scanning the following directories:"
+	$VERBOSE_ECHO "  $CHECK_DIRS"
+	for dir in $CHECK_DIRS ; do
+	    $VERBOSE_ECHO "Protecting files from automake in $dir"
+	    cd "$START_PATH"
+	    eval "cd $dir"
+
+	    # recursively git 'r done
+	    recursive_protect
+	done
     fi
-    if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
-	want_pkg_config=true
+} # end of recursive_protect
+
+
+#############################
+# RESTORE_CLOBBERED FUNCION #
+#############################
+restore_clobbered ( ) {
+
+    # The automake (and autoreconf by extension) -f/--force-missing
+    # option may overwrite COPYING and INSTALL even if they do exist.
+    # Here we restore the files if necessary.
+
+    spacer=no
+
+    for file in COPYING INSTALL ; do
+	if test -f ${file}.$$.protect_from_automake.backup ; then
+	    if test -f ${file} ; then
+	    # compare entire content, restore if needed
+	    if test "x`cat ${file}`" != "x`cat ${file}.$$.protect_from_automake.backup`" ; then
+		if test "x$spacer" = "xno" ; then
+		    $VERBOSE_ECHO
+		    spacer=yes
+		fi
+		# restore the backup
+		$VERBOSE_ECHO "Restoring ${file} from backup (automake -f likely clobbered it)"
+		$VERBOSE_ECHO "rm -f ${file}"
+		rm -f ${file}
+		$VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}"
+		mv ${file}.$$.protect_from_automake.backup ${file}
+	    fi # check contents
+	    elif test -f ${file}.$$.protect_from_automake.backup ; then
+		$VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}"
+		mv ${file}.$$.protect_from_automake.backup ${file}
+	    fi # -f ${file}
+	
+	    # just in case
+	    $VERBOSE_ECHO "rm -f ${file}.$$.protect_from_automake.backup"
+	    rm -f ${file}.$$.protect_from_automake.backup
+	fi # -f ${file}.$$.protect_from_automake.backup
+    done
+
+    CONFIGURE="`locate_configure_template`"
+    if [ "x$CONFIGURE" = "x" ] ; then
+	return
     fi
-    if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
-	want_gtk_doc=true
+
+    _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ 	]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    if test ! -d "$_aux_dir" ; then
+	_aux_dir=.
     fi
-    if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then
-        want_gnome_doc_utils=true
+
+    for file in config.guess config.sub ltmain.sh ; do
+	if test -f "${_aux_dir}/${file}" ; then
+	    $VERBOSE_ECHO "rm -f \"${_aux_dir}/${file}.backup\""
+	    rm -f "${_aux_dir}/${file}.backup"
+	fi
+    done
+} # end of restore_clobbered
+
+
+##############################
+# RECURSIVE_RESTORE FUNCTION #
+##############################
+recursive_restore ( ) {
+
+    # restore COPYING and INSTALL from backup if they were clobbered
+    # for each directory recursively.
+
+    # git 'r undone
+    restore_clobbered
+
+    # find configure template
+    _configure="`locate_configure_template`"
+    if [ "x$_configure" = "x" ] ; then
+	return
     fi
 
-    # check that AM_MAINTAINER_MODE is used
-    if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then
-	want_maintainer_mode=true
+    # look for subdirs
+    _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ 	]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    CHECK_DIRS=""
+    for dir in $_det_config_subdirs ; do
+	if test -d "`pwd`/$dir" ; then
+	    CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\""
+	fi
+    done
+
+    # process subdirs
+    if [ ! "x$CHECK_DIRS" = "x" ] ; then
+	$VERBOSE_ECHO "Recursively scanning the following directories:"
+	$VERBOSE_ECHO "  $CHECK_DIRS"
+	for dir in $CHECK_DIRS ; do
+	    $VERBOSE_ECHO "Checking files for automake damage in $dir"
+	    cd "$START_PATH"
+	    eval "cd $dir"
+
+	    # recursively git 'r undone
+	    recursive_restore
+	done
     fi
+} # end of recursive_restore
+
 
-    if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then
-        require_m4macro yelp.m4
+#######################
+# INITIALIZE FUNCTION #
+#######################
+initialize ( ) {
+
+    # this routine performs a variety of directory-specific
+    # initializations.  some are sanity checks, some are preventive,
+    # and some are necessary setup detection.
+    #
+    # this function sets:
+    #   CONFIGURE
+    #   SEARCH_DIRS
+    #   CONFIG_SUBDIRS
+
+    ##################################
+    # check for a configure template #
+    ##################################
+    CONFIGURE="`locate_configure_template`"
+    if [ "x$CONFIGURE" = "x" ] ; then
+	$ECHO
+	$ECHO "A configure.ac or configure.in file could not be located implying"
+	$ECHO "that the GNU Build System is at least not used in this directory.  In"
+	$ECHO "any case, there is nothing to do here without one of those files."
+	$ECHO
+	$ECHO "ERROR: No configure.in or configure.ac file found in `pwd`"
+	exit 1
     fi
 
-    # check to make sure gnome-common macros can be found ...
-    if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null ||
-       grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null ||
-       grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then
-        require_m4macro gnome-common.m4
+    #####################
+    # detect an aux dir #
+    #####################
+    _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ 	]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    if test ! -d "$_aux_dir" ; then
+	_aux_dir=.
+    else
+	$VERBOSE_ECHO "Detected auxillary directory: $_aux_dir"
     fi
-    if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null ||
-       grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then
-        require_m4macro gnome-compiler-flags.m4
+
+    ################################
+    # detect a recursive configure #
+    ################################
+    CONFIG_SUBDIRS=""
+    _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $CONFIGURE | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ 	]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`"
+    for dir in $_det_config_subdirs ; do
+	if test -d "`pwd`/$dir" ; then
+	    $VERBOSE_ECHO "Detected recursive configure directory: `pwd`/$dir"
+	    CONFIG_SUBDIRS="$CONFIG_SUBDIRS `pwd`/$dir"
+	fi
+    done
+
+    ###########################################################
+    # make sure certain required files exist for GNU projects #
+    ###########################################################
+    _marker_found=""
+    _marker_found_message_intro='Detected non-GNU marker "'
+    _marker_found_message_mid='" in '
+    for marker in foreign cygnus ; do
+	_marker_found_message=${_marker_found_message_intro}${marker}${_marker_found_message_mid}
+	_marker_found="`grep 'AM_INIT_AUTOMAKE.*'${marker} $CONFIGURE`"
+	if [ ! "x$_marker_found" = "x" ] ; then
+	    $VERBOSE_ECHO "${_marker_found_message}`basename \"$CONFIGURE\"`"
+	    break
+	fi
+	if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+	    _marker_found="`grep 'AUTOMAKE_OPTIONS.*'${marker} Makefile.am`"
+	    if [ ! "x$_marker_found" = "x" ] ; then
+		$VERBOSE_ECHO "${_marker_found_message}Makefile.am"
+		break
+	    fi
+	fi
+    done
+    if [ "x${_marker_found}" = "x" ] ; then
+	_suggest_foreign=no
+	for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
+	    if [ ! -f $file ] ; then
+		$VERBOSE_ECHO "Touching ${file} since it does not exist"
+		_suggest_foreign=yes
+		touch $file
+	    fi
+	done
+
+	if [ "x${_suggest_foreign}" = "xyes" ] ; then
+	    $ECHO
+	    $ECHO "Warning: Several files expected of projects that conform to the GNU"
+	    $ECHO "coding standards were not found.  The files were automatically added"
+	    $ECHO "for you since you do not have a 'foreign' declaration specified."
+	    $ECHO
+	    $ECHO "Considered adding 'foreign' to AM_INIT_AUTOMAKE in `basename \"$CONFIGURE\"`"
+	    if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+		$ECHO "or to AUTOMAKE_OPTIONS in your top-level Makefile.am file."
+	    fi
+	    $ECHO
+	fi
     fi
-    if grep "^GNOME_CODE_COVERAGE" $configure_ac >/dev/null; then
-        require_m4macro gnome-code-coverage.m4
+
+    ##################################################
+    # make sure certain generated files do not exist #
+    ##################################################
+    for file in config.guess config.sub ltmain.sh ; do
+	if test -f "${_aux_dir}/${file}" ; then
+	    $VERBOSE_ECHO "mv -f \"${_aux_dir}/${file}\" \"${_aux_dir}/${file}.backup\""
+	    mv -f "${_aux_dir}/${file}" "${_aux_dir}/${file}.backup"
+	fi
+    done
+
+    ############################
+    # search alternate m4 dirs #
+    ############################
+    SEARCH_DIRS=""
+    for dir in m4 ; do
+	if [ -d $dir ] ; then
+	    $VERBOSE_ECHO "Found extra aclocal search directory: $dir"
+	    SEARCH_DIRS="$SEARCH_DIRS -I $dir"
+	fi
+    done
+
+    ######################################
+    # remove any previous build products #
+    ######################################
+    if test -d autom4te.cache ; then
+	$VERBOSE_ECHO "Found an autom4te.cache directory, deleting it"
+	$VERBOSE_ECHO "rm -rf autom4te.cache"
+	rm -rf autom4te.cache
     fi
-done
+# tcl/tk (and probably others) have a customized aclocal.m4, so can't delete it
+#     if test -f aclocal.m4 ; then
+# 	$VERBOSE_ECHO "Found an aclocal.m4 file, deleting it"
+# 	$VERBOSE_ECHO "rm -f aclocal.m4"
+# 	rm -f aclocal.m4
+#     fi
 
-case $REQUIRED_AUTOMAKE_VERSION in
-    1.4*) automake_progs="automake-1.4" ;;
-    1.5*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;;
-    1.6*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;;
-    1.7*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;;
-    1.8*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;;
-    1.9*) automake_progs="automake-1.15 automake-1.14 automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;;
-    1.10*) automake_progs="automake-1.15 automake-1.14 automake-1.13 automake-1.12 automake-1.11 automake-1.10" ;;
-    1.11*) automake_progs="automake-1.15 automake-1.14 automake-1.13 automake-1.12 automake-1.11" ;;
-    1.12*) automake_progs="automake-1.15 automake-1.14 automake-1.13 automake-1.12" ;;
-    1.13*) automake_progs="automake-1.15 automake-1.14 automake-1.13" ;;
-    1.14*) automake_progs="automake-1.15 automake-1.14 " ;;
-    1.15*) automake_progs="automake-1.15 " ;;
-esac
-version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
-    "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz"
-ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
+} # end of initialize()
 
-if $want_libtool; then
-    version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION \
-        "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz"
-    require_m4macro libtool.m4
-fi
 
-if $want_gettext; then
-    version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
-        "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz"
-    require_m4macro gettext.m4
-fi
+##############
+# initialize #
+##############
 
-if $want_glib_gettext; then
-    version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
-        "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz"
-    require_m4macro glib-gettext.m4
-fi
+# stash path
+START_PATH="`pwd`"
 
-if $want_intltool; then
-    version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
-        "http://ftp.gnome.org/pub/GNOME/sources/intltool/"
-    require_m4macro intltool.m4
-fi
+# Before running autoreconf or manual steps, some prep detection work
+# is necessary or useful.  Only needs to occur once per directory, but
+# does need to traverse the entire subconfigure hierarchy to protect
+# files from being clobbered even by autoreconf.
+recursive_protect
 
-if $want_pkg_config; then
-    version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
-        "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz"
-    require_m4macro pkg.m4
-fi
+# start from where we started
+cd "$START_PATH"
 
-if $want_gtk_doc; then
-    version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
-        "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
-    require_m4macro gtk-doc.m4
-fi
+# get ready to process
+initialize
 
-if $want_gnome_doc_utils; then
-    version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \
-        "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/"
-fi
 
-if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
-    version_check gnome-common DOC_COMMON gnome-doc-common \
-        $REQUIRED_DOC_COMMON_VERSION " "
-fi
+#########################################
+# DOWNLOAD_GNULIB_CONFIG_GUESS FUNCTION #
+#########################################
 
-check_m4macros
+# TODO - should make sure wget/curl exist and/or work before trying to
+# use them.
 
-if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
-  printerr "**Warning**: I am going to run \`configure' with no arguments."
-  printerr "If you wish to pass any to it, please specify them on the"
-  printerr \`$0\'" command line."
-  printerr
-fi
+download_gnulib_config_guess () {
+    # abuse gitweb to download gnulib's latest config.guess via HTTP
+    config_guess_temp="config.guess.$$.download"
+    ret=1
+    for __cmd in wget curl fetch ; do
+	$VERBOSE_ECHO "Checking for command ${__cmd}"
+	${__cmd} --version > /dev/null 2>&1
+	ret=$?
+	if [ ! $ret = 0 ] ; then
+	    continue
+        fi
 
-topdir=`pwd`
-for configure_ac in $configure_files; do 
-    dirname=`dirname $configure_ac`
-    basename=`basename $configure_ac`
-    if [ -f $dirname/NO-AUTO-GEN ]; then
-	echo skipping $dirname -- flagged as no auto-gen
-    elif [ ! -w $dirname ]; then
-        echo skipping $dirname -- directory is read only
-    else
-	printbold "Processing $configure_ac"
-	cd $dirname
-
-        # Note that the order these tools are called should match what
-        # autoconf's "autoupdate" package does.  See bug 138584 for
-        # details.
-
-        # programs that might install new macros get run before aclocal
-	if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null ||
-	   grep "^LT_INIT" $basename >/dev/null; then
-	    printbold "Running $LIBTOOLIZE..."
-	    $LIBTOOLIZE --force --copy || exit 1
+	__cmd_version=`${__cmd} --version | head -n 1 | sed -e 's/^[^0-9]\+//' -e 's/ .*//'`
+	$VERBOSE_ECHO "Found ${__cmd} ${__cmd_version}"
+
+	opts=""
+	case ${__cmd} in
+	    wget)
+		opts="-O" 
+		;;
+	    curl)
+		opts="-o"
+		;;
+	    fetch)
+		opts="-t 5 -f"
+		;;
+	esac
+
+	$VERBOSE_ECHO "Running $__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\""
+	eval "$__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" > /dev/null 2>&1
+	if [ $? = 0 ] ; then
+	    mv -f "${config_guess_temp}" ${_aux_dir}/config.guess
+	    ret=0
+	    break
 	fi
+    done
+
+    if [ ! $ret = 0 ] ; then
+	$ECHO "Warning: config.guess download failed from: $CONFIG_GUESS_URL"
+	rm -f "${config_guess_temp}"
+    fi
+}
+
+
+##############################
+# LIBTOOLIZE_NEEDED FUNCTION #
+##############################
+libtoolize_needed () {
+    ret=1 # means no, don't need libtoolize
+    for feature in AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT ; do
+	$VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
+	found="`grep \"^$feature.*\" $CONFIGURE`"
+	if [ ! "x$found" = "x" ] ; then
+	    ret=0 # means yes, need to run libtoolize
+	    break
+	fi
+    done
+    return ${ret}
+}
+
 
-	if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
-	    printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
-	    echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
-	elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
-	   if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
-	   	printbold "Running autopoint..."
-		autopoint --force || exit 1
-	   else
-	    	printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
-	    	echo "no" | $GETTEXTIZE --force --copy || exit 1
-	   fi
+
+############################################
+# prepare build via autoreconf or manually #
+############################################
+reconfigure_manually=no
+if [ "x$HAVE_AUTORECONF" = "xyes" ] ; then
+    $ECHO
+    $ECHO $ECHO_N "Automatically preparing build ... $ECHO_C"
+
+    $VERBOSE_ECHO "$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS"
+    autoreconf_output="`$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS 2>&1`"
+    ret=$?
+    $VERBOSE_ECHO "$autoreconf_output"
+
+    if [ ! $ret = 0 ] ; then
+	if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then
+	    if [ ! "x`echo \"$autoreconf_output\" | grep libtoolize | grep \"No such file or directory\"`" = "x" ] ; then
+		$ECHO
+		$ECHO "Warning: autoreconf failed but due to what is usually a common libtool"
+		$ECHO "misconfiguration issue.  This problem is encountered on systems that"
+		$ECHO "have installed libtoolize under a different name without providing a"
+		$ECHO "symbolic link or without setting the LIBTOOLIZE environment variable."
+		$ECHO
+		$ECHO "Restarting the preparation steps with LIBTOOLIZE set to $LIBTOOLIZE"
+
+		export LIBTOOLIZE
+		RUN_RECURSIVE=no
+		export RUN_RECURSIVE
+		untrap_abnormal
+
+		$VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+		sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+		exit $?
+	    fi
 	fi
 
-	if grep "^AC_PROG_INTLTOOL" $basename >/dev/null ||
-           grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then
-	    printbold "Running $INTLTOOLIZE..."
-	    $INTLTOOLIZE --force --copy --automake || exit 1
+	$ECHO "Warning: $AUTORECONF failed"
+
+	if test -f ltmain.sh ; then
+	    $ECHO "libtoolize being run by autoreconf is not creating ltmain.sh in the auxillary directory like it should"
 	fi
-	if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
-	    printbold "Running $GTKDOCIZE..."
-	    $GTKDOCIZE --copy || exit 1
+
+	$ECHO "Attempting to run the preparation steps individually"
+	reconfigure_manually=yes
+    else
+	if [ "x$DOWNLOAD" = "xyes" ] ; then
+	    if libtoolize_needed ; then
+		download_gnulib_config_guess
+	    fi
 	fi
+    fi
+else
+    reconfigure_manually=yes
+fi
+
+
+############################
+# LIBTOOL_FAILURE FUNCTION #
+############################
+libtool_failure ( ) {
+
+    # libtool is rather error-prone in comparison to the other
+    # autotools and this routine attempts to compensate for some
+    # common failures.  the output after a libtoolize failure is
+    # parsed for an error related to AC_PROG_LIBTOOL and if found, we
+    # attempt to inject a project-provided libtool.m4 file.
+
+    _autoconf_output="$1"
+
+    if [ "x$RUN_RECURSIVE" = "xno" ] ; then
+	# we already tried the libtool.m4, don't try again
+	return 1
+    fi
+
+    if test -f "$LIBTOOL_M4" ; then
+	found_libtool="`$ECHO $_autoconf_output | grep AC_PROG_LIBTOOL`"
+	if test ! "x$found_libtool" = "x" ; then
+	    if test -f acinclude.m4 ; then
+		rm -f acinclude.m4.$$.backup
+		$VERBOSE_ECHO "cat acinclude.m4 > acinclude.m4.$$.backup"
+		cat acinclude.m4 > acinclude.m4.$$.backup
+	    fi
+	    $VERBOSE_ECHO "cat \"$LIBTOOL_M4\" >> acinclude.m4"
+	    chmod u+w acinclude.m4
+	    cat "$LIBTOOL_M4" >> acinclude.m4
+
+	    # don't keep doing this
+	    RUN_RECURSIVE=no
+	    export RUN_RECURSIVE
+	    untrap_abnormal
 
-	if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
-	    printbold "Running gnome-doc-common..."
-	    gnome-doc-common --copy || exit 1
+	    $ECHO
+	    $ECHO "Restarting the preparation steps with libtool macros in acinclude.m4"
+	    $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+	    sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
+	    exit $?
 	fi
-	if grep "^GNOME_DOC_INIT" $basename >/dev/null; then
-	    printbold "Running $GNOME_DOC_PREPARE..."
-	    $GNOME_DOC_PREPARE --force --copy || exit 1
+    fi
+}
+
+
+###########################
+# MANUAL_AUTOGEN FUNCTION #
+###########################
+manual_autogen ( ) {
+
+    ##################################################
+    # Manual preparation steps taken are as follows: #
+    #   aclocal [-I m4]                              #
+    #   libtoolize --automake -c -f                  #
+    #   aclocal [-I m4]                              #
+    #   autoconf -f                                  #
+    #   autoheader                                   #
+    #   automake -a -c -f                            #
+    ##################################################
+
+    ###########
+    # aclocal #
+    ###########
+    $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS"
+    aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`"
+    ret=$?
+    $VERBOSE_ECHO "$aclocal_output"
+    if [ ! $ret = 0 ] ; then $ECHO "ERROR: $ACLOCAL failed" && exit 2 ; fi
+
+    ##############
+    # libtoolize #
+    ##############
+    if libtoolize_needed ; then
+	if [ "x$HAVE_LIBTOOLIZE" = "xyes" ] ; then
+	    $VERBOSE_ECHO "$LIBTOOLIZE $LIBTOOLIZE_OPTIONS"
+	    libtoolize_output="`$LIBTOOLIZE $LIBTOOLIZE_OPTIONS 2>&1`"
+	    ret=$?
+	    $VERBOSE_ECHO "$libtoolize_output"
+
+	    if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi
+	else
+	    if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then
+		$VERBOSE_ECHO "$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS"
+		libtoolize_output="`$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS 2>&1`"
+		ret=$?
+		$VERBOSE_ECHO "$libtoolize_output"
+
+		if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi
+	    fi
 	fi
 
-        # Now run aclocal to pull in any additional macros needed
+	###########
+	# aclocal #
+	###########
+	# re-run again as instructed by libtoolize
+	$VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS"
+	aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`"
+	ret=$?
+	$VERBOSE_ECHO "$aclocal_output"
 
-	# if the AC_CONFIG_MACRO_DIR() macro is used, pass that
-	# directory to aclocal.
-	m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
-	if [ -n "$m4dir" ]; then
-	    m4dir="-I $m4dir"
+	# libtoolize might put ltmain.sh in the wrong place
+	if test -f ltmain.sh ; then
+	    if test ! -f "${_aux_dir}/ltmain.sh" ; then
+		$ECHO
+		$ECHO "Warning:  $LIBTOOLIZE is creating ltmain.sh in the wrong directory"
+		$ECHO
+		$ECHO "Fortunately, the problem can be worked around by simply copying the"
+		$ECHO "file to the appropriate location (${_aux_dir}/).  This has been done for you."
+		$ECHO
+		$VERBOSE_ECHO "cp -p ltmain.sh \"${_aux_dir}/ltmain.sh\""
+		cp -p ltmain.sh "${_aux_dir}/ltmain.sh"
+		$ECHO $ECHO_N "Continuing build preparation ... $ECHO_C"
+	    fi
+	fi # ltmain.sh
+
+	if [ "x$DOWNLOAD" = "xyes" ] ; then
+	    download_gnulib_config_guess
 	fi
-	printbold "Running $ACLOCAL..."
-	$ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
+    fi # libtoolize_needed
+
+    ############
+    # autoconf #
+    ############
+    $VERBOSE_ECHO
+    $VERBOSE_ECHO "$AUTOCONF $AUTOCONF_OPTIONS"
+    autoconf_output="`$AUTOCONF $AUTOCONF_OPTIONS 2>&1`"
+    ret=$?
+    $VERBOSE_ECHO "$autoconf_output"
 
-	if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
-	    printerr "*** obsolete gnome macros were used in $configure_ac"
+    if [ ! $ret = 0 ] ; then
+	# retry without the -f and check for usage of macros that are too new
+	ac2_59_macros="AC_C_RESTRICT AC_INCLUDES_DEFAULT AC_LANG_ASSERT AC_LANG_WERROR AS_SET_CATFILE"
+	ac2_55_macros="AC_COMPILER_IFELSE AC_FUNC_MBRTOWC AC_HEADER_STDBOOL AC_LANG_CONFTEST AC_LANG_SOURCE AC_LANG_PROGRAM AC_LANG_CALL AC_LANG_FUNC_TRY_LINK AC_MSG_FAILURE AC_PREPROC_IFELSE"
+	ac2_54_macros="AC_C_BACKSLASH_A AC_CONFIG_LIBOBJ_DIR AC_GNU_SOURCE AC_PROG_EGREP AC_PROG_FGREP AC_REPLACE_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_REALLOC AC_TYPE_MBSTATE_T"
+
+	macros_to_search=""
+	ac_major="`echo ${AUTOCONF_VERSION}. | cut -d. -f1 | sed 's/[^0-9]//g'`"
+	ac_minor="`echo ${AUTOCONF_VERSION}. | cut -d. -f2 | sed 's/[^0-9]//g'`"
+
+	if [ $ac_major -lt 2 ] ; then
+	    macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros"
+	else
+	    if [ $ac_minor -lt 54 ] ; then
+		macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros"
+	    elif [ $ac_minor -lt 55 ] ; then
+		macros_to_search="$ac2_59_macros $ac2_55_macros"
+	    elif [ $ac_minor -lt 59 ] ; then
+		macros_to_search="$ac2_59_macros"
+	    fi
 	fi
 
-	# Now that all the macros are sorted, run autoconf and autoheader ...
-	printbold "Running $AUTOCONF..."
-	$AUTOCONF || exit 1
-	if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
-	    printbold "Running $AUTOHEADER..."
-	    $AUTOHEADER || exit 1
-	    # this prevents automake from thinking config.h.in is out of
-	    # date, since autoheader doesn't touch the file if it doesn't
-	    # change.
-	    test -f config.h.in && touch config.h.in
+	configure_ac_macros=__none__
+	for feature in $macros_to_search ; do
+	    $VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
+	    found="`grep \"^$feature.*\" $CONFIGURE`"
+	    if [ ! "x$found" = "x" ] ; then
+		if [ "x$configure_ac_macros" = "x__none__" ] ; then
+		    configure_ac_macros="$feature"
+		else
+		    configure_ac_macros="$feature $configure_ac_macros"
+		fi
+	    fi
+	done
+	if [ ! "x$configure_ac_macros" = "x__none__" ] ; then
+	    $ECHO
+	    $ECHO "Warning:  Unsupported macros were found in $CONFIGURE"
+	    $ECHO
+	    $ECHO "The `basename \"$CONFIGURE\"` file was scanned in order to determine if any"
+	    $ECHO "unsupported macros are used that exceed the minimum version"
+	    $ECHO "settings specified within this file.  As such, the following macros"
+	    $ECHO "should be removed from configure.ac or the version numbers in this"
+	    $ECHO "file should be increased:"
+	    $ECHO
+	    $ECHO "$configure_ac_macros"
+	    $ECHO
+	    $ECHO $ECHO_N "Ignorantly continuing build preparation ... $ECHO_C"
 	fi
 
-	# Finally, run automake to create the makefiles ...
-	printbold "Running $AUTOMAKE..."
-        if [ -f COPYING ]; then
-          cp -pf COPYING COPYING.autogen_bak
-        fi
-        if [ -f INSTALL ]; then
-          cp -pf INSTALL INSTALL.autogen_bak
-        fi
-	if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then
-	    $AUTOMAKE --gnu --add-missing --copy -Wno-portability || exit 1
+	###################
+	# autoconf, retry #
+	###################
+	$VERBOSE_ECHO
+	$VERBOSE_ECHO "$AUTOCONF"
+	autoconf_output="`$AUTOCONF 2>&1`"
+	ret=$?
+	$VERBOSE_ECHO "$autoconf_output"
+
+	if [ ! $ret = 0 ] ; then
+	    # test if libtool is busted
+	    libtool_failure "$autoconf_output"
+
+	    # let the user know what went wrong
+	    cat <<EOF
+$autoconf_output
+EOF
+	    $ECHO "ERROR: $AUTOCONF failed"
+	    exit 2
 	else
-	    $AUTOMAKE --gnu --add-missing --copy || exit 1
+	    # autoconf sans -f and possibly sans unsupported options succeed so warn verbosely
+	    $ECHO
+	    $ECHO "Warning: autoconf seems to have succeeded by removing the following options:"
+	    $ECHO "	AUTOCONF_OPTIONS=\"$AUTOCONF_OPTIONS\""
+	    $ECHO
+	    $ECHO "Removing those options should not be necessary and indicate some other"
+	    $ECHO "problem with the build system.  The build preparation is highly suspect"
+	    $ECHO "and may result in configuration or compilation errors.  Consider"
+	    if [ "x$VERBOSE_ECHO" = "x:" ] ; then
+		$ECHO "rerunning the build preparation with verbose output enabled."
+		$ECHO "	$AUTOGEN_SH --verbose"
+	    else
+		$ECHO "reviewing the minimum GNU Autotools version settings contained in"
+		$ECHO "this script along with the macros being used in your `basename \"$CONFIGURE\"` file."
+	    fi
+	    $ECHO
+	    $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C"
+	fi # autoconf ret = 0
+    fi # autoconf ret = 0
+
+    ##############
+    # autoheader #
+    ##############
+    need_autoheader=no
+    for feature in AM_CONFIG_HEADER AC_CONFIG_HEADER ; do
+	$VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
+	found="`grep \"^$feature.*\" $CONFIGURE`"
+	if [ ! "x$found" = "x" ] ; then
+	    need_autoheader=yes
+	    break
 	fi
-        if [ -f COPYING.autogen_bak ]; then
-          cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING
-          rm -f COPYING.autogen_bak
-        fi
-        if [ -f INSTALL.autogen_bak ]; then
-          cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL
-          rm -f INSTALL.autogen_bak
-        fi
+    done
+    if [ "x$need_autoheader" = "xyes" ] ; then
+	$VERBOSE_ECHO "$AUTOHEADER $AUTOHEADER_OPTIONS"
+	autoheader_output="`$AUTOHEADER $AUTOHEADER_OPTIONS 2>&1`"
+	ret=$?
+	$VERBOSE_ECHO "$autoheader_output"
+	if [ ! $ret = 0 ] ; then $ECHO "ERROR: $AUTOHEADER failed" && exit 2 ; fi
+    fi # need_autoheader
+
+    ############
+    # automake #
+    ############
+    need_automake=no
+    for feature in AM_INIT_AUTOMAKE ; do
+	$VERBOSE_ECHO "Searching for $feature in $CONFIGURE"
+	found="`grep \"^$feature.*\" $CONFIGURE`"
+	if [ ! "x$found" = "x" ] ; then
+	    need_automake=yes
+	    break
+	fi
+    done
+
+    if [ "x$need_automake" = "xyes" ] ; then
+	$VERBOSE_ECHO "$AUTOMAKE $AUTOMAKE_OPTIONS"
+	automake_output="`$AUTOMAKE $AUTOMAKE_OPTIONS 2>&1`"
+	ret=$?
+	$VERBOSE_ECHO "$automake_output"
+
+	if [ ! $ret = 0 ] ; then
+
+	    ###################
+	    # automake, retry #
+	    ###################
+	    $VERBOSE_ECHO
+	    $VERBOSE_ECHO "$AUTOMAKE $ALT_AUTOMAKE_OPTIONS"
+	    # retry without the -f
+	    automake_output="`$AUTOMAKE $ALT_AUTOMAKE_OPTIONS 2>&1`"
+	    ret=$?
+	    $VERBOSE_ECHO "$automake_output"
+
+	    if [ ! $ret = 0 ] ; then
+	 	# test if libtool is busted
+		libtool_failure "$automake_output"
+
+		# let the user know what went wrong
+		cat <<EOF
+$automake_output
+EOF
+		$ECHO "ERROR: $AUTOMAKE failed"
+		exit 2
+	    fi # automake retry
+	fi # automake ret = 0
+    fi # need_automake
+} # end of manual_autogen
+
+
+#####################################
+# RECURSIVE_MANUAL_AUTOGEN FUNCTION #
+#####################################
+recursive_manual_autogen ( ) {
+
+    # run the build preparation steps manually for this directory
+    manual_autogen
+
+    # for projects using recursive configure, run the build
+    # preparation steps for the subdirectories.
+    if [ ! "x$CONFIG_SUBDIRS" = "x" ] ; then
+	$VERBOSE_ECHO "Recursively configuring the following directories:"
+	$VERBOSE_ECHO "  $CONFIG_SUBDIRS"
+	for dir in $CONFIG_SUBDIRS ; do
+	    $VERBOSE_ECHO "Processing recursive configure in $dir"
+	    cd "$START_PATH"
+	    cd "$dir"
+
+	    # new directory, prepare
+	    initialize
 
-	cd "$topdir"
+	    # run manual steps for the subdir and any others below
+	    recursive_manual_autogen
+	done
     fi
-done
+}
 
-conf_flags=""
 
-if $want_maintainer_mode; then
-    conf_flags="--enable-maintainer-mode"
+################################
+# run manual preparation steps #
+################################
+if [ "x$reconfigure_manually" = "xyes" ] ; then
+    $ECHO
+    $ECHO $ECHO_N "Preparing build ... $ECHO_C"
+
+    recursive_manual_autogen
 fi
 
-if test x$NOCONFIGURE = x; then
-    printbold Running $srcdir/configure $conf_flags "$@" ...
-    $srcdir/configure $conf_flags "$@" \
-	&& echo Now type \`make\' to compile $PKG_NAME || exit 1
+
+#########################
+# restore and summarize #
+#########################
+cd "$START_PATH"
+
+# restore COPYING and INSTALL from backup if necessary
+recursive_restore
+
+# make sure we end up with a configure script
+config_ac="`locate_configure_template`"
+config="`echo $config_ac | sed 's/\.ac$//' | sed 's/\.in$//'`"
+if [ "x$config" = "x" ] ; then
+    $VERBOSE_ECHO "Could not locate the configure template (from `pwd`)"
+fi
+
+# summarize
+$ECHO "done"
+$ECHO
+if test "x$config" = "x" -o ! -f "$config" ; then
+    $ECHO "WARNING: The $PROJECT build system should now be prepared but there"
+    $ECHO "does not seem to be a resulting configure file.  This is unexpected"
+    $ECHO "and likely the result of an error.  You should run $NAME_OF_AUTOGEN"
+    $ECHO "with the --verbose option to get more details on a potential"
+    $ECHO "misconfiguration."
 else
-    echo Skipping configure process.
+    $ECHO "The $PROJECT build system is now prepared.  To build here, run:"
+    $ECHO "  $config"
+    $ECHO "  make"
 fi
+
+
+# Local Variables:
+# mode: sh
+# tab-width: 8
+# sh-basic-offset: 4
+# sh-indentation: 4
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=4 tabstop=8
diff --git a/compile b/compile
index 531136b..2ab71e4 100755
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -342,6 +343,6 @@ exit $ret
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..6c32c86
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1421 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-11-04'
+
+# This file 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches at gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/lslpp ] ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    *:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
index 33f8c8e..32f71f4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,54 +1,190 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* always defined to indicate that i18n is enabled */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
 #undef ENABLE_NLS
 
 /* Gettext package. */
 #undef GETTEXT_PACKAGE
 
-/* Define to 1 if you have the `bind_textdomain_codeset' function. */
-#undef HAVE_BIND_TEXTDOMAIN_CODESET
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the `argz_count' function. */
+#undef HAVE_ARGZ_COUNT
+
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define to 1 if you have the `argz_next' function. */
+#undef HAVE_ARGZ_NEXT
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#undef HAVE_ARGZ_STRINGIFY
+
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
+
+/* Define to 1 if the compiler understands __builtin_expect. */
+#undef HAVE_BUILTIN_EXPECT
+
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
 
-/* Define to 1 if you have the `dcgettext' function. */
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
 #undef HAVE_DCGETTEXT
 
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNWPRINTF
+
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
+/* Define to 1 if you have the <features.h> header file. */
+#undef HAVE_FEATURES_H
+
 /* Define to 1 if you have the `floor' function. */
 #undef HAVE_FLOOR
 
 /* Define to 1 if you have the `fork' function. */
 #undef HAVE_FORK
 
+/* Define to 1 if you have the `fwprintf' function. */
+#undef HAVE_FWPRINTF
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgid' function. */
+#undef HAVE_GETGID
+
+/* Define to 1 if you have the `getlocalename_l' function. */
+#undef HAVE_GETLOCALENAME_L
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
 /* Define if the GNU gettext() function is already present or preinstalled. */
 #undef HAVE_GETTEXT
 
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
+/* Define to 1 if you have the `gmodule-2.0' library (-lgmodule-2.0). */
+#undef HAVE_LIBGMODULE_2_0
+
 /* Define to 1 if you have the <libintl.h> header file. */
 #undef HAVE_LIBINTL_H
 
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
+/* Define to 1 if the system has the type 'long long int'. */
+#undef HAVE_LONG_LONG_INT
+
 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
    to 0 otherwise. */
 #undef HAVE_MALLOC
 
+/* Define to 1 if you have the `mbrtowc' function. */
+#undef HAVE_MBRTOWC
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define to 1 if you have the `newlocale' function. */
+#undef HAVE_NEWLOCALE
+
+/* Define if your printf() function supports format strings with positions. */
+#undef HAVE_POSIX_PRINTF
+
 /* Define to 1 if you have the `pow' function. */
 #undef HAVE_POW
 
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
    and to 0 otherwise. */
 #undef HAVE_REALLOC
@@ -56,48 +192,128 @@
 /* Define to 1 if you have the `select' function. */
 #undef HAVE_SELECT
 
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
 /* Define to 1 if you have the `setlocale' function. */
 #undef HAVE_SETLOCALE
 
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
 /* Define to 1 if you have the `sqrt' function. */
 #undef HAVE_SQRT
 
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
 /* Define to 1 if you have the `strstr' function. */
 #undef HAVE_STRSTR
 
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if the system has the type 'unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
 /* Define to 1 if you have the `vfork' function. */
 #undef HAVE_VFORK
 
 /* Define to 1 if you have the <vfork.h> header file. */
 #undef HAVE_VFORK_H
 
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#undef HAVE_VISIBILITY
+
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#undef HAVE_WCRTOMB
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define to 1 if you have the `wcsnlen' function. */
+#undef HAVE_WCSNLEN
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
 /* Define to 1 if `fork' works. */
 #undef HAVE_WORKING_FORK
 
+/* Define to 1 if O_NOATIME works. */
+#undef HAVE_WORKING_O_NOATIME
+
+/* Define to 1 if O_NOFOLLOW works. */
+#undef HAVE_WORKING_O_NOFOLLOW
+
 /* Define to 1 if `vfork' works. */
 #undef HAVE_WORKING_VFORK
 
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#undef INTDIV0_RAISES_SIGFPE
+
 /* Name of package */
 #undef PACKAGE
 
@@ -119,18 +335,217 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#undef USE_POSIX_THREADS_WEAK
+
+/* Define if the GNU Pth multithreading library can be used. */
+#undef USE_PTH_THREADS
+
+/* Define if references to the GNU Pth multithreading library should be made
+   weak. */
+#undef USE_PTH_THREADS_WEAK
+
+/* Define if the old Solaris multithreading library can be used. */
+#undef USE_SOLARIS_THREADS
+
+/* Define if references to the old Solaris multithreading library should be
+   made weak. */
+#undef USE_SOLARIS_THREADS_WEAK
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define if the native Windows multithreading API can be used. */
+#undef USE_WINDOWS_THREADS
+
 /* Version number of package */
 #undef VERSION
 
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
+     && (defined __header_inline \
+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+            && ! defined __clang__) \
+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
+             && (defined __GNUC__ || defined __cplusplus)) \
+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+                && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !defined __PGI \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+   suppress bogus "no previous prototype for 'FOO'"
+   and "no previous declaration for 'FOO'" diagnostics,
+   when FOO is an inline function in the header; see
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif
+
+/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#ifndef _GL_UNUSED
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_UNUSED __attribute__ ((__unused__))
+# else
+#  define _GL_UNUSED
+# endif
+#endif
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
+#endif
+
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
 /* Define to rpl_malloc if the replacement function should be used. */
 #undef malloc
 
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#undef ptrdiff_t
+
 /* Define to rpl_realloc if the replacement function should be used. */
 #undef realloc
 
@@ -140,5 +555,50 @@
 /* Define to `int' if <sys/types.h> does not define. */
 #undef ssize_t
 
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
 /* Define as `fork' if `vfork' does not work. */
 #undef vfork
+
+
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init_func     libintl_lock_init_func
+#define glthread_lock_lock_func     libintl_lock_lock_func
+#define glthread_lock_unlock_func   libintl_lock_unlock_func
+#define glthread_lock_destroy_func  libintl_lock_destroy_func
+#define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
+#define glthread_rwlock_init_func              libintl_rwlock_init_func
+#define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
+#define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
+#define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
+#define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
+#define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
+#define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
+#define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
+#define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
+#define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
+#define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
+#define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
+#define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
+#define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
+#define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
+#define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
+#define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
+#define glthread_once_func            libintl_once_func
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+#define glthread_once_multithreaded   libintl_once_multithreaded
+
diff --git a/config.rpath b/config.rpath
new file mode 100755
index 0000000..98183ff
--- /dev/null
+++ b/config.rpath
@@ -0,0 +1,684 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2016 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+        ecc*)
+          wl='-Wl,'
+          ;;
+        icc* | ifort*)
+          wl='-Wl,'
+          ;;
+        lf95*)
+          wl='-Wl,'
+          ;;
+        nagfor*)
+          wl='-Wl,-Wl,,'
+          ;;
+        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        xl* | bgxl* | bgf* | mpixl*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ F* | *Sun*Fortran*)
+              wl=
+              ;;
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    newsos6)
+      ;;
+    *nto* | *qnx*)
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    rdos*)
+      ;;
+    solaris*)
+      case $cc_basename in
+        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+          wl='-Qoption ld '
+          ;;
+        *)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      wl='-Wl,'
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    haiku*)
+      ;;
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            :
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd2.[01]*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    *nto* | *qnx*)
+      ;;
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+        hardcode_direct=yes
+        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        else
+          case "$host_os" in
+            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+              hardcode_libdir_flag_spec='-R$libdir'
+              ;;
+            *)
+              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+              ;;
+          esac
+        fi
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec=      # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    library_names_spec='$libname.a'
+    ;;
+  aix[4-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  amigaos*)
+    case "$host_cpu" in
+      powerpc*)
+        library_names_spec='$libname$shrext' ;;
+      m68k)
+        library_names_spec='$libname.a' ;;
+    esac
+    ;;
+  beos*)
+    library_names_spec='$libname$shrext'
+    ;;
+  bsdi[45]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  cygwin* | mingw* | pw32* | cegcc*)
+    shrext=.dll
+    library_names_spec='$libname.dll.a $libname.lib'
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    library_names_spec='$libname$shrext'
+    ;;
+  dgux*)
+    library_names_spec='$libname$shrext'
+    ;;
+  freebsd[23].*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  freebsd* | dragonfly*)
+    library_names_spec='$libname$shrext'
+    ;;
+  gnu*)
+    library_names_spec='$libname$shrext'
+    ;;
+  haiku*)
+    library_names_spec='$libname$shrext'
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    library_names_spec='$libname$shrext'
+    ;;
+  interix[3-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  irix5* | irix6* | nonstopux*)
+    library_names_spec='$libname$shrext'
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  knetbsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  netbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  newsos6)
+    library_names_spec='$libname$shrext'
+    ;;
+  *nto* | *qnx*)
+    library_names_spec='$libname$shrext'
+    ;;
+  openbsd*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    library_names_spec='$libname.a'
+    ;;
+  osf3* | osf4* | osf5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  rdos*)
+    ;;
+  solaris*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sunos4*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  sysv4 | sysv4.3*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv4*MP*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    library_names_spec='$libname$shrext'
+    ;;
+  tpf*)
+    library_names_spec='$libname$shrext'
+    ;;
+  uts4*)
+    library_names_spec='$libname$shrext'
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..7ffe373
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1807 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-12-03'
+
+# This file 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches at gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
+	| c4x | c8051 | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| k1om \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
+	| ns16k | ns32k \
+	| open8 | or1k | or1knd | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| riscv32 | riscv64 \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| visium \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	leon|leon[3-9])
+		basic_machine=sparc-$basic_machine
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| k1om-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| or1k*-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| visium-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	leon-*|leon[3-9]-*)
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	moxiebox)
+		basic_machine=moxie-unknown
+		os=-moxiebox
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	c8051-*)
+		os=-elf
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
index 42de81b..253c95a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xnec2c 3.5.1.
+# Generated by GNU Autoconf 2.69 for xnec2c 3.6.1-beta.
 #
 # Report bugs to <nkcyham at yahoo.com>.
 #
@@ -580,12 +580,13 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xnec2c'
 PACKAGE_TARNAME='xnec2c'
-PACKAGE_VERSION='3.5.1'
-PACKAGE_STRING='xnec2c 3.5.1'
+PACKAGE_VERSION='3.6.1-beta'
+PACKAGE_STRING='xnec2c 3.6.1-beta'
 PACKAGE_BUGREPORT='nkcyham at yahoo.com'
 PACKAGE_URL=''
 
 ac_unique_file="src/common.h"
+gt_needs=
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -622,62 +623,77 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
+ac_header_list=
+gl_use_threads_default=
+ac_func_list=
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 PROGRAMNAME_LOCALEDIR
-MKINSTALLDIRS
 POSUB
-POFILES
-PO_IN_DATADIR_FALSE
-PO_IN_DATADIR_TRUE
+LTLIBINTL
+LIBINTL
 INTLLIBS
+INTL_LIBTOOL_SUFFIX_PREFIX
+INTLOBJS
+GENCAT
 INSTOBJEXT
-GMOFILES
 DATADIRNAME
 CATOBJEXT
-CATALOGS
-MSGFMT_OPTS
+USE_INCLUDED_LIBINTL
+BUILD_INCLUDED_LIBINTL
+LTLIBC
+WINDRES
+WOE32
+WOE32DLL
+HAVE_WPRINTF
+HAVE_NEWLOCALE
+HAVE_SNPRINTF
+HAVE_ASPRINTF
+HAVE_POSIX_PRINTF
+INTL_DEFAULT_VERBOSITY
+INTL_MACOSX_LIBS
+GLIBC21
+INTLBISON
+LTLIBICONV
+LIBICONV
+LTLIBMULTITHREAD
+LIBMULTITHREAD
+LTLIBTHREAD
+LIBTHREAD
+LIBPTH_PREFIX
+LTLIBPTH
+LIBPTH
+PRI_MACROS_BROKEN
+ALLOCA
+HAVE_VISIBILITY
+CFLAG_VISIBILITY
+RANLIB
+GLIBC2
 EGREP
 GREP
 CPP
-GETTEXT_PACKAGE
-ALL_LINGUAS
-INTLTOOL_PERL
-GMSGFMT
-MSGFMT
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+XGETTEXT_EXTRA_OPTIONS
 MSGMERGE
+XGETTEXT_015
 XGETTEXT
-INTLTOOL_POLICY_RULE
-INTLTOOL_SERVICE_RULE
-INTLTOOL_THEME_RULE
-INTLTOOL_SCHEMAS_RULE
-INTLTOOL_CAVES_RULE
-INTLTOOL_XML_NOMERGE_RULE
-INTLTOOL_XML_RULE
-INTLTOOL_KBD_RULE
-INTLTOOL_XAM_RULE
-INTLTOOL_UI_RULE
-INTLTOOL_SOUNDLIST_RULE
-INTLTOOL_SHEET_RULE
-INTLTOOL_SERVER_RULE
-INTLTOOL_PONG_RULE
-INTLTOOL_OAF_RULE
-INTLTOOL_PROP_RULE
-INTLTOOL_KEYS_RULE
-INTLTOOL_DIRECTORY_RULE
-INTLTOOL_DESKTOP_RULE
-intltool__v_merge_options_0
-intltool__v_merge_options_
-INTLTOOL_V_MERGE_OPTIONS
-INTLTOOL__v_MERGE_0
-INTLTOOL__v_MERGE_
-INTLTOOL_V_MERGE
-INTLTOOL_EXTRACT
-INTLTOOL_MERGE
-INTLTOOL_UPDATE
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
 USE_NLS
+SED
+GETTEXT_PACKAGE
 PACKAGE_LIBS
 PACKAGE_CFLAGS
 PKG_CONFIG_LIBDIR
@@ -781,6 +797,13 @@ enable_silent_rules
 enable_maintainer_mode
 enable_dependency_tracking
 enable_nls
+enable_threads
+with_gnu_ld
+enable_rpath
+with_libpth_prefix
+with_libiconv_prefix
+with_included_gettext
+with_libintl_prefix
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1339,7 +1362,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xnec2c 3.5.1 to adapt to many kinds of systems.
+\`configure' configures xnec2c 3.6.1-beta to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1400,12 +1423,16 @@ Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed program names
   --program-suffix=SUFFIX            append SUFFIX to installed program names
   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xnec2c 3.5.1:";;
+     short | recursive ) echo "Configuration of xnec2c 3.6.1-beta:";;
    esac
   cat <<\_ACEOF
 
@@ -1423,6 +1450,22 @@ Optional Features:
   --disable-dependency-tracking
                           speeds up one-time build
   --disable-nls           do not use Native Language Support
+  --enable-threads={posix|solaris|pth|windows}
+                          specify multithreading API
+  --disable-threads       build without multithread safety
+  --disable-rpath         do not hardcode runtime library paths
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
+  --without-libpth-prefix     don't search for libpth in includedir and libdir
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-included-gettext use the GNU gettext library included here
+  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+  --without-libintl-prefix     don't search for libintl in includedir and libdir
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -1511,7 +1554,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xnec2c configure 3.5.1
+xnec2c configure 3.6.1-beta
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1684,96 +1727,59 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
 if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
-#include <$2>
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <$2>
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------- ##
-## Report this to nkcyham at yahoo.com ##
-## -------------------------------- ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  eval "$3=\$ac_header_compiler"
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-fi
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_c_check_header_mongrel
+} # ac_fn_c_check_type
 
 # ac_fn_c_try_run LINENO
 # ----------------------
@@ -1915,50 +1921,133 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
 if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
-int
-main ()
-{
-if (sizeof ($2))
-	 return 0;
-  ;
-  return 0;
-}
+#include <$2>
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------- ##
+## Report this to nkcyham at yahoo.com ##
+## -------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
 int
 main ()
 {
-if (sizeof (($2)))
-	    return 0;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-else
   eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  eval "$3=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
@@ -1967,29 +2056,212 @@ eval ac_res=\$$3
 $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_c_check_type
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by xnec2c $as_me 3.5.1, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
+} # ac_fn_c_check_decl
 
-  $ $0 $@
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
 _ACEOF
-exec 5>>config.log
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by xnec2c $as_me 3.6.1-beta, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
@@ -2252,6 +2524,12 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
+gt_needs="$gt_needs "
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/param.h"
+as_fn_append ac_func_list " symlink"
+gt_needs="$gt_needs "
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
@@ -2835,7 +3113,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xnec2c'
- VERSION='3.5.1'
+ VERSION='3.6.1-beta'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2965,7 +3243,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cflags_setting" >&5
 $as_echo "$enable_cflags_setting" >&6; }
-test "x$enable_cflags_setting" = xyes && CFLAGS="-Wall -O2"
+test "x$enable_cflags_setting" = xyes && CFLAGS=""
 
 # Checks for programs.
 ac_ext=cpp
@@ -4425,7 +4703,7 @@ fi
 
 
 # Checks for libraries.
-pkg_modules="gtk+-2.0 >= 2.0.0"
+pkg_modules="gtk+-3.0 >= 3.22.0"
 
 
 
@@ -4548,8 +4826,8 @@ $as_echo "no" >&6; }
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5
-$as_echo_n "checking for PACKAGE... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_modules" >&5
+$as_echo_n "checking for $pkg_modules... " >&6; }
 
 if test -n "$PACKAGE_CFLAGS"; then
     pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS"
@@ -4589,7 +4867,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -4616,7 +4894,7 @@ Alternatively, you may set the environment variables PACKAGE_CFLAGS
 and PACKAGE_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -4685,9 +4963,131 @@ _ACEOF
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_module_open in -lgmodule-2.0" >&5
+$as_echo_n "checking for g_module_open in -lgmodule-2.0... " >&6; }
+if ${ac_cv_lib_gmodule_2_0_g_module_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgmodule-2.0  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char g_module_open ();
+int
+main ()
+{
+return g_module_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gmodule_2_0_g_module_open=yes
+else
+  ac_cv_lib_gmodule_2_0_g_module_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmodule_2_0_g_module_open" >&5
+$as_echo "$ac_cv_lib_gmodule_2_0_g_module_open" >&6; }
+if test "x$ac_cv_lib_gmodule_2_0_g_module_open" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGMODULE_2_0 1
+_ACEOF
+
+  LIBS="-lgmodule-2.0 $LIBS"
+
+fi
+
 
 # Internationalization tools
 
+GETTEXT_PACKAGE=xnec2c
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
 $as_echo_n "checking whether NLS is requested... " >&6; }
     # Check whether --enable-nls was given.
@@ -4703,76 +5103,89 @@ $as_echo "$USE_NLS" >&6; }
 
 
 
-case "$am__api_version" in
-    1.01234)
-	as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
-    ;;
-    *)
-    ;;
-esac
+      GETTEXT_MACRO_VERSION=0.19
 
-INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.50.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-if test -n "0.50.0"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.50.0" >&5
-$as_echo_n "checking for intltool >= 0.50.0... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
-$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-	as_fn_error $? "Your intltool is too old.  You need intltool 0.50.0 or later." "$LINENO" 5
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
 fi
+rm -f conf$$.file
 
-# Extract the first word of "intltool-update", so it can be a program name with args.
-set dummy intltool-update; ac_word=$2
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
+if ${ac_cv_path_MSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_UPDATE in
+  case "$MSGFMT" in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
-  ;;
+    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+    ;;
   *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+    ;;
 esac
 fi
-INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
-if test -n "$INTLTOOL_UPDATE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
-$as_echo "$INTLTOOL_UPDATE" >&6; }
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-
-# Extract the first word of "intltool-merge", so it can be a program name with args.
-set dummy intltool-merge; ac_word=$2
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
+if ${ac_cv_path_GMSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_MERGE in
+  case $GMSGFMT in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4782,7 +5195,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4790,203 +5203,60 @@ done
   done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
   ;;
 esac
 fi
-INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
-if test -n "$INTLTOOL_MERGE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
-$as_echo "$INTLTOOL_MERGE" >&6; }
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "intltool-extract", so it can be a program name with args.
-set dummy intltool-extract; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $INTLTOOL_EXTRACT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
-if test -n "$INTLTOOL_EXTRACT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
-$as_echo "$INTLTOOL_EXTRACT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
-fi
-
-if test -z "$AM_DEFAULT_VERBOSITY"; then
-  AM_DEFAULT_VERBOSITY=1
-fi
-
-
-INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
-INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
-INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
-
-
 
+    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
 
-INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
-intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
-intltool__v_merge_options_0='-q'
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
 
 
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
 
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
 else
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
+  ac_executable_p="test -f"
 fi
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+rm -f conf$$.file
 
-
-# Check the gettext tools to make sure they are GNU
 # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4994,31 +5264,33 @@ $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_XGETTEXT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $XGETTEXT in
+  case "$XGETTEXT" in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
+    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+    ;;
   *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+    ;;
 esac
 fi
-XGETTEXT=$ac_cv_path_XGETTEXT
-if test -n "$XGETTEXT"; then
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
 $as_echo "$XGETTEXT" >&6; }
 else
@@ -5026,6 +5298,41 @@ else
 $as_echo "no" >&6; }
 fi
 
+    rm -f messages.po
+
+    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
 
 # Extract the first word of "msgmerge", so it can be a program name with args.
 set dummy msgmerge; ac_word=$2
@@ -5034,31 +5341,32 @@ $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_MSGMERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $MSGMERGE in
+  case "$MSGMERGE" in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
-  ;;
+    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+    ;;
   *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+    ;;
 esac
 fi
-MSGMERGE=$ac_cv_path_MSGMERGE
-if test -n "$MSGMERGE"; then
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
 $as_echo "$MSGMERGE" >&6; }
 else
@@ -5067,187 +5375,99 @@ $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MSGFMT+:} false; then :
+        test -n "$localedir" || localedir='${datadir}/locale'
+
+
+    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+  ac_config_commands="$ac_config_commands po-directories"
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $MSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
-  ;;
-esac
 fi
-MSGFMT=$ac_cv_path_MSGFMT
-if test -n "$MSGFMT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-# Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GMSGFMT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
-fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
-fi
-
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_INTLTOOL_PERL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $INTLTOOL_PERL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
-if test -n "$INTLTOOL_PERL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
-$as_echo "$INTLTOOL_PERL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test -z "$INTLTOOL_PERL"; then
-   as_fn_error $? "perl not found" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5
-$as_echo_n "checking for perl >= 5.8.1... " >&6; }
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5
-else
-   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
-$as_echo "$IT_PERL_VERSION" >&6; }
-fi
-if test "x" != "xno-xml"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5
-$as_echo_n "checking for XML::Parser... " >&6; }
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-   else
-       as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5
-   fi
-fi
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-
-
-
-
-
-GETTEXT_PACKAGE=xnec2c
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
-_ACEOF
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -5503,6 +5723,260 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
 
 
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; }
+if ${ac_cv_gnu_library_2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+  ac_cv_gnu_library_2=yes
+else
+  ac_cv_gnu_library_2=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5
+$as_echo "$ac_cv_gnu_library_2" >&6; }
+
+    GLIBC2="$ac_cv_gnu_library_2"
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+$as_echo_n "checking whether the -Werror option is usable... " >&6; }
+    if ${gl_cv_cc_vis_werror+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_cc_vis_werror=yes
+else
+  gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS="$gl_save_CFLAGS"
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+$as_echo "$gl_cv_cc_vis_werror" >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+$as_echo_n "checking for simple visibility declarations... " >&6; }
+    if ${gl_cv_cc_visibility+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -fvisibility=hidden"
+                                    if test $gl_cv_cc_vis_werror = yes; then
+        CFLAGS="$CFLAGS -Werror"
+      fi
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+             extern __attribute__((__visibility__("default"))) int exportedvar;
+             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+             void dummyfunc (void) {}
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_cc_visibility=yes
+else
+  gl_cv_cc_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS="$gl_save_CFLAGS"
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+$as_echo "$gl_cv_cc_visibility" >&6; }
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_VISIBILITY $HAVE_VISIBILITY
+_ACEOF
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
 if ${ac_cv_header_stdc+:} false; then :
@@ -5584,44 +6058,3647 @@ else
 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 #endif
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if ${gl_cv_header_stdint_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_h=yes
+else
+  gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+  if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+			  if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+				    if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+
+
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+	mmap private not fixed
+	mmap private fixed at somewhere currently unmapped
+	mmap private fixed at somewhere already mapped
+	mmap shared not fixed
+	mmap shared fixed at somewhere currently unmapped
+	mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  const char *cdata2;
+  int i, pagesize;
+  int fd, fd2;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    return 2;
+  if (write (fd, data, pagesize) != pagesize)
+    return 3;
+  close (fd);
+
+  /* Next, check that the tail of a page is zero-filled.  File must have
+     non-zero length, otherwise we risk SIGBUS for entire page.  */
+  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+  if (fd2 < 0)
+    return 4;
+  cdata2 = "";
+  if (write (fd2, cdata2, 1) != 1)
+    return 5;
+  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+  if (data2 == MAP_FAILED)
+    return 6;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data2 + i))
+      return 7;
+  close (fd2);
+  if (munmap (data2, pagesize))
+    return 8;
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    return 9;
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    return 10;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      return 11;
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    return 12;
+  if (read (fd, data3, pagesize) != pagesize)
+    return 13;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      return 14;
+  close (fd);
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+rm -f conftest.mmap conftest.txt
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
+$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
+if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      gt_cv_int_divbyzero_sigfpe=
+      case "$host_os" in
+        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+          # On Mac OS X 10.2 or newer, just assume the same as when cross-
+          # compiling. If we were to perform the real test, 1 Crash Report
+          # dialog window would pop up.
+          case "$host_cpu" in
+            i[34567]86 | x86_64)
+              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+          esac
+          ;;
+      esac
+      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+        if test "$cross_compiling" = yes; then :
+
+            # Guess based on the CPU.
+            case "$host_cpu" in
+              alpha* | i[34567]86 | x86_64 | m68k | s390*)
+                gt_cv_int_divbyzero_sigfpe="guessing yes";;
+              *)
+                gt_cv_int_divbyzero_sigfpe="guessing no";;
+            esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+sigfpe_handler (int sig)
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  _exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (2);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gt_cv_int_divbyzero_sigfpe=yes
+else
+  gt_cv_int_divbyzero_sigfpe=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
+$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define INTDIV0_RAISES_SIGFPE $value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if ${gl_cv_header_inttypes_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <inttypes.h>
+
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_inttypes_h=yes
+else
+  gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+  if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+
+    test $ac_cv_type_unsigned_long_long_int = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+  else
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+  fi
+
+
+  for ac_header in inttypes.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+  if test $ac_cv_header_inttypes_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if ${gt_cv_inttypes_pri_broken+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_inttypes_pri_broken=no
+else
+  gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
+
+    PRI_MACROS_BROKEN=1
+  else
+    PRI_MACROS_BROKEN=0
+  fi
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+  # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+  enableval=$enable_threads; gl_use_threads=$enableval
+else
+  if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+       case "$host_os" in
+                                                               osf*) gl_use_threads=no ;;
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+     fi
+
+fi
+
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+
+
+
+
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${acl_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break
+        ;;
+      *)
+        test "$with_gnu_ld" != yes && break
+        ;;
+      esac
+    fi
+  done
+  IFS="$acl_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${acl_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if ${acl_cv_rpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if ${gl_cv_solaris_64bit+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+  gl_cv_solaris_64bit=yes
+else
+  gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS= 	}"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
+if ${gl_cv_have_weak+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_have_weak=no
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void xyzzy ();
+#pragma weak xyzzy
+int
+main ()
+{
+xyzzy();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       if test $gl_cv_have_weak = maybe; then
+                           if test "$cross_compiling" = yes; then :
+                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+               Extensible Linking Format
+               #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
+  gl_cv_have_weak="guessing yes"
+else
+  gl_cv_have_weak="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_have_weak=yes
+else
+  gl_cv_have_weak=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+$as_echo "$gl_cv_have_weak" >&6; }
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+      ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  gl_have_pthread_h=yes
+else
+  gl_have_pthread_h=no
+fi
+
+
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        #
+        # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+        # needs -pthread for some reason.  See:
+        # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+        save_LIBS=$LIBS
+        for gl_pthread in '' '-pthread'; do
+          LIBS="$LIBS $gl_pthread"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+                 pthread_mutex_t m;
+                 pthread_mutexattr_t ma;
+
+int
+main ()
+{
+pthread_mutex_lock (&m);
+                 pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_pthread=yes
+             LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+             LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          LIBS=$save_LIBS
+          test -n "$gl_have_pthread" && break
+        done
+
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+             esac
+
+fi
+
+        elif test -z "$gl_have_pthread"; then
+          # Some library is needed. Try libpthread and libc_r.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+fi
+
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_kill=yes
+else
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
+  gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
+fi
+
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+
+$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
+
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
+
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <thread.h>
+#include <synch.h>
+
+int
+main ()
+{
+thr_self();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_solaristhread=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
+
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
+
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
+$as_echo_n "checking how to link with libpth... " >&6; }
+if ${ac_cv_libpth_libs+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libpth-prefix was given.
+if test "${with_libpth_prefix+set}" = set; then :
+  withval=$with_libpth_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBPTH=
+  LTLIBPTH=
+  INCPTH=
+  LIBPTH_PREFIX=
+      HAVE_LIBPTH=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='pth '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
+              else
+                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBPTH; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
+                    LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+            LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+    ac_cv_libpth_libs="$LIBPTH"
+    ac_cv_libpth_ltlibs="$LTLIBPTH"
+    ac_cv_libpth_cppflags="$INCPTH"
+    ac_cv_libpth_prefix="$LIBPTH_PREFIX"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
+$as_echo "$ac_cv_libpth_libs" >&6; }
+  LIBPTH="$ac_cv_libpth_libs"
+  LTLIBPTH="$ac_cv_libpth_ltlibs"
+  INCPTH="$ac_cv_libpth_cppflags"
+  LIBPTH_PREFIX="$ac_cv_libpth_prefix"
+
+  for element in $INCPTH; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+
+
+      HAVE_LIBPTH=yes
+
+
+
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBPTH"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pth.h>
+int
+main ()
+{
+pth_self();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_have_pth=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
+
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
+
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+
+$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
+
+          fi
+          ;;
+      esac
+    fi
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
+$as_echo_n "checking for multithread API to use... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
+$as_echo "$gl_threads_api" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
+
+$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
+
+fi
+
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+      #include <pthread.h>
+int
+main ()
+{
+
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  LIBICONV_PREFIX=
+      HAVE_LIBICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if ${am_cv_func_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if ${am_cv_func_iconv_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                  am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      am_cv_func_iconv_works=no
+      for ac_iconv_const in '' 'const'; do
+        if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+             *)            am_cv_func_iconv_works="guessing yes" ;;
+           esac
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+
+int
+main ()
+{
+int result = 0;
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\263";
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    result |= 16;
+  return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  am_cv_func_iconv_works=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        test "$am_cv_func_iconv_works" = no || break
+      done
+      LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+    if ${am_cv_proto_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_cv_proto_iconv_arg1=""
+else
+  am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+         $am_cv_proto_iconv" >&5
+$as_echo "
+         $am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+
+  fi
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+  for ac_header in argz.h inttypes.h limits.h unistd.h sys/param.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+  for ac_func in getcwd getegid geteuid getgid getuid mempcpy munmap \
+    stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
+    argz_stringify argz_next __fsetlocking
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+      if test $ac_cv_func_uselocale = yes; then
+    for ac_func in getlocalename_l
+do :
+  ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
+if test "x$ac_cv_func_getlocalename_l" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETLOCALENAME_L 1
+_ACEOF
+
+fi
+done
+
+  fi
+
+          ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+
+
+                    for ac_prog in bison
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_INTLBISON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$INTLBISON"; then
+  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_INTLBISON="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+INTLBISON=$ac_cv_prog_INTLBISON
+if test -n "$INTLBISON"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
+$as_echo "$INTLBISON" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$INTLBISON" && break
+done
+
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
+$as_echo_n "checking version of bison... " >&6; }
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      2.[7-9]* | [3-9].*)
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
+int
+main ()
+{
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if ${gt_cv_c_wchar_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if ${gt_cv_c_wint_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wint_t=yes
+else
+  gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if ${gt_cv_c_intmax_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1;
+            return !x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_intmax_t=yes
+else
+  gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+  if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
+$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
+if ${gt_cv_func_printf_posix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "notposix" >/dev/null 2>&1; then :
+  gt_cv_func_printf_posix="guessing no"
+else
+  gt_cv_func_printf_posix="guessing yes"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gt_cv_func_printf_posix=yes
+else
+  gt_cv_func_printf_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5
+$as_echo "$gt_cv_func_printf_posix" >&6; }
+  case $gt_cv_func_printf_posix in
+    *yes)
+
+$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
+$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
+if ${ac_cv_gnu_library_2_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky" >/dev/null 2>&1; then :
+  ac_cv_gnu_library_2_1=yes
+else
+  ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+    GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+if ${gl_cv_size_max+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    gl_cv_size_max=
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1; then :
+  gl_cv_size_max=yes
+fi
+rm -f conftest*
+
+    if test -z "$gl_cv_size_max"; then
+                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
+#include <limits.h>"; then :
+
+else
+  size_t_bits_minus_1=
+fi
+
+      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
+
+else
+  fits_in_uint=
+fi
+
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        fi
+                                if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+                gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+$as_echo "$gl_cv_size_max" >&6; }
+  if test "$gl_cv_size_max" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $gl_cv_size_max
+_ACEOF
+
+  fi
+
+
+
+
+  for ac_header in stdint.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+  for ac_func in $ac_func_list
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if ${gl_cv_header_working_fcntl_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_header_working_fcntl_h=cross-compiling
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+
+int
+main ()
+{
+
+            int result = !constants;
+            #if HAVE_SYMLINK
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            #endif
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_fcntl_h=yes
+else
+  case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+  gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+  fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <CoreFoundation/CFLocale.h>
 int
 main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
+CFLocaleCopyCurrent();
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_CFLocaleCopyCurrent=yes
 else
-  ac_cv_header_stdc=no
+  gt_cv_func_CFLocaleCopyCurrent=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     LIBS="$gt_save_LIBS"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+    case "$enable_silent_rules" in
+    yes) INTL_DEFAULT_VERBOSITY=0;;
+    no)  INTL_DEFAULT_VERBOSITY=1;;
+    *)   INTL_DEFAULT_VERBOSITY=1;;
+  esac
+
+
+  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
+  for ac_header in features.h stddef.h stdlib.h string.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -5631,1436 +9708,2074 @@ fi
 
 done
 
-
-
-   for ac_header in locale.h
+  for ac_func in asprintf fwprintf newlocale putenv setenv setlocale \
+    snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
-if test "x$ac_cv_header_locale_h" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALE_H 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
-
 done
 
-    if test $ac_cv_header_locale_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
-$as_echo_n "checking for LC_MESSAGES... " >&6; }
-if ${am_cv_val_LC_MESSAGES+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snprintf" = xyes; then :
+  ac_have_decl=1
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <locale.h>
-int
-main ()
-{
-return LC_MESSAGES
-  ;
-  return 0;
-}
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNPRINTF $ac_have_decl
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_val_LC_MESSAGES=yes
+ac_fn_c_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snwprintf" = xyes; then :
+  ac_have_decl=1
 else
-  am_cv_val_LC_MESSAGES=no
+  ac_have_decl=0
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNWPRINTF $ac_have_decl
+_ACEOF
+
+
+          ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
-$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
-    if test $am_cv_val_LC_MESSAGES = yes; then
 
-$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
 
-    fi
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
   fi
-     USE_NLS=yes
 
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+
+  if test "$ac_cv_func_newlocale" = yes; then
+    HAVE_NEWLOCALE=1
+  else
+    HAVE_NEWLOCALE=0
+  fi
 
-    gt_cv_have_gettext=no
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
 
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
 
-    ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = xyes; then :
-  gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
 
-      #
-      # First check in libc
-      #
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
-$as_echo_n "checking for ngettext in libc... " >&6; }
-if ${gt_cv_func_ngettext_libc+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if ${am_cv_langinfo_codeset+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
+#include <langinfo.h>
 int
 main ()
 {
-return !ngettext ("","", 1)
+char* cs = nl_langinfo(CODESET); return !cs;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gt_cv_func_ngettext_libc=yes
+  am_cv_langinfo_codeset=yes
 else
-  gt_cv_func_ngettext_libc=no
+  am_cv_langinfo_codeset=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
-$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+  if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+  fi
+
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
-$as_echo_n "checking for dgettext in libc... " >&6; }
-if ${gt_cv_func_dgettext_libc+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if ${gt_cv_val_LC_MESSAGES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
+#include <locale.h>
 int
 main ()
 {
-return !dgettext ("","")
+return LC_MESSAGES
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gt_cv_func_dgettext_libc=yes
+  gt_cv_val_LC_MESSAGES=yes
 else
-  gt_cv_func_dgettext_libc=no
+  gt_cv_val_LC_MESSAGES=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
-$as_echo "$gt_cv_func_dgettext_libc" >&6; }
-      fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
+$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
+  if test $gt_cv_val_LC_MESSAGES = yes; then
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        for ac_func in bind_textdomain_codeset
-do :
-  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-_ACEOF
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
 
-fi
+  fi
+
+
+                if test "$enable_shared" = yes; then
+    case "$host_os" in
+      mingw* | cygwin*) is_woe32dll=yes ;;
+      *) is_woe32dll=no ;;
+    esac
+  else
+    is_woe32dll=no
+  fi
+  WOE32DLL=$is_woe32dll
+
+
+      case "$host_os" in
+    mingw* | cygwin*) is_woe32=yes ;;
+    *) is_woe32=no ;;
+  esac
+  WOE32=$is_woe32
+
+  if test $WOE32 = yes; then
+        if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_WINDRES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
+IFS=$as_save_IFS
 
-      fi
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-	 || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
-$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
-if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
+fi
+if test -z "$ac_cv_prog_WINDRES"; then
+  ac_ct_WINDRES=$WINDRES
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  if test -n "$ac_ct_WINDRES"; then
+  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_WINDRES="windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bindtextdomain ();
-int
-main ()
-{
-return bindtextdomain ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_bindtextdomain=yes
+fi
+fi
+ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
+if test -n "$ac_ct_WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
+$as_echo "$ac_ct_WINDRES" >&6; }
 else
-  ac_cv_lib_intl_bindtextdomain=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+  if test "x$ac_ct_WINDRES" = x; then
+    WINDRES=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    WINDRES=$ac_ct_WINDRES
+  fi
+else
+  WINDRES="$ac_cv_prog_WINDRES"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
-$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_ngettext+:} false; then :
+
+  fi
+
+              case "$host_os" in
+    hpux*) LTLIBC="" ;;
+    *)     LTLIBC="-lc" ;;
+  esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ngettext ();
+#include <CoreFoundation/CFPreferences.h>
 int
 main ()
 {
-return ngettext ();
+CFPreferencesCopyAppValue(NULL, NULL)
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_ngettext=yes
+  gt_cv_func_CFPreferencesCopyAppValue=yes
 else
-  ac_cv_lib_intl_ngettext=no
+  gt_cv_func_CFPreferencesCopyAppValue=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+     LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
-$as_echo_n "checking for dgettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_dgettext+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+  fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dgettext ();
+#include <CoreFoundation/CFLocale.h>
 int
 main ()
 {
-return dgettext ();
+CFLocaleCopyCurrent();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_dgettext=yes
+  gt_cv_func_CFLocaleCopyCurrent=yes
 else
-  ac_cv_lib_intl_dgettext=no
+  gt_cv_func_CFLocaleCopyCurrent=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
-$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
-if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
-  gt_cv_func_dgettext_libintl=yes
+     LIBS="$gt_save_LIBS"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
-fi
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
 
-fi
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
 
 
-	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
-$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
-  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_ngettext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ngettext ();
-int
-main ()
-{
-return ngettext ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_ngettext=yes
+
+
+
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
+$as_echo_n "checking whether included gettext is requested... " >&6; }
+
+# Check whether --with-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then :
+  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
 else
-  ac_cv_lib_intl_ngettext=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  nls_cv_force_use_gnu_gettext=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
-$as_echo_n "checking for dcgettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_dcgettext+:} false; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
+$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval \${$gt_func_gnugettext_libc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
 #endif
-char dcgettext ();
+$gt_revision_test_code
+
 int
 main ()
 {
-return dcgettext ();
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_dcgettext=yes
+  eval "$gt_func_gnugettext_libc=yes"
 else
-  ac_cv_lib_intl_dcgettext=no
+  eval "$gt_func_gnugettext_libc=no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
-$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
-if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
-  gt_cv_func_dgettext_libintl=yes
-			libintl_extra_libs=-liconv
-else
-  :
 fi
+eval ac_res=\$$gt_func_gnugettext_libc
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-else
-  :
-fi
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
 
-        fi
 
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          for ac_func in bind_textdomain_codeset
-do :
-  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-_ACEOF
 
-fi
-done
 
-          LIBS="$glib_save_LIBS"
 
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
 
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
 
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
 
-      if test "$gt_cv_have_gettext" = "yes"; then
+    use_additional=yes
 
-$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
 
-	# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MSGFMT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+  withval=$with_libintl_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
       fi
     fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != "no"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-	if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-	  for ac_func in dcgettext
-do :
-  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
-if test "x$ac_cv_func_dcgettext" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DCGETTEXT 1
-_ACEOF
 
 fi
-done
 
-	  MSGFMT_OPTS=
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
-$as_echo_n "checking if msgfmt accepts -c... " >&6; }
-	  cat >conftest.foo <<_ACEOF
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  LIBINTL_PREFIX=
+      HAVE_LIBINTL=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
 
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo at bar.xx>\n"
-"Language-Team: C <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
 
-_ACEOF
-if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
-  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-echo "$as_me: failed input was:" >&5
-sed 's/^/| /' conftest.foo >&5
-fi
 
-	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GMSGFMT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-	  # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XGETTEXT+:} false; then :
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval \${$gt_func_gnugettext_libintl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
+int
+main ()
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$gt_func_gnugettext_libintl=yes"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  eval "$gt_func_gnugettext_libintl=no"
 fi
-
-	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
 int
 main ()
 {
-extern int _nl_msg_cat_cntr;
-			 return _nl_msg_cat_cntr
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  CATOBJEXT=.gmo
-             DATADIRNAME=share
-else
-  case $host in
-	    *-*-solaris*)
-	    	                	    	                ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  CATOBJEXT=.gmo
-               DATADIRNAME=share
-else
-  CATOBJEXT=.mo
-               DATADIRNAME=lib
-fi
+  LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
 
-	    ;;
-	    *-*-openbsd*)
-	    CATOBJEXT=.mo
-            DATADIRNAME=share
-	    ;;
-	    *)
-	    CATOBJEXT=.mo
-            DATADIRNAME=lib
-	    ;;
-	    esac
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-          LIBS="$glib_save_LIBS"
-	  INSTOBJEXT=.mo
-	else
-	  gt_cv_have_gettext=no
-	fi
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        fi
+
+                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+                              nls_cv_use_gnu_gettext=yes
+        fi
       fi
 
-fi
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+                BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                CATOBJEXT=.gmo
+      fi
 
 
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
 
-    if test "$gt_cv_have_gettext" = "yes" ; then
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
 
+    else
+      USE_NLS=no
     fi
+  fi
 
-        if test "$XGETTEXT" != ":"; then
-                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
       else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
-$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
-        XGETTEXT=":"
+        gt_source="libc"
       fi
+    else
+      gt_source="included intl directory"
     fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+  fi
 
-    # We need to process the po/ directory.
-    POSUB=po
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
 
-    ac_config_commands="$ac_config_commands default-1"
+      fi
 
 
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
 
 
+$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
 
+    fi
 
+        POSUB=po
+  fi
 
 
+            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
 
 
 
 
 
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
 
+        DATADIRNAME=share
 
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
- 	   # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
-     fi
 
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
+        INSTOBJEXT=.mo
 
-            MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
 
+        GENCAT=gencat
 
-         test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
 
-PROGRAMNAME_LOCALEDIR=${datadir}/locale
+        INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
 
 
-# Gettext setup
-GETTEXT_PACKAGE=xnec2c
+        INTL_LIBTOOL_SUFFIX_PREFIX=
 
 
-cat >>confdefs.h <<_ACEOF
-#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
-_ACEOF
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+PROGRAMNAME_LOCALEDIR=${datadir}/locale
 
 
 # Add the languages which your application supports here.
 ALL_LINGUAS=""
 
-   for ac_header in locale.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
-if test "x$ac_cv_header_locale_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALE_H 1
-_ACEOF
 
-fi
 
-done
 
-    if test $ac_cv_header_locale_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
-$as_echo_n "checking for LC_MESSAGES... " >&6; }
-if ${am_cv_val_LC_MESSAGES+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <locale.h>
-int
-main ()
-{
-return LC_MESSAGES
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_val_LC_MESSAGES=yes
-else
-  am_cv_val_LC_MESSAGES=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
-$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
-    if test $am_cv_val_LC_MESSAGES = yes; then
 
-$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
 
-    fi
-  fi
-     USE_NLS=yes
 
 
-    gt_cv_have_gettext=no
 
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
 
-    ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = xyes; then :
-  gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
 
-      #
-      # First check in libc
-      #
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
-$as_echo_n "checking for ngettext in libc... " >&6; }
-if ${gt_cv_func_ngettext_libc+:} false; then :
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
+#include <CoreFoundation/CFPreferences.h>
 int
 main ()
 {
-return !ngettext ("","", 1)
+CFPreferencesCopyAppValue(NULL, NULL)
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gt_cv_func_ngettext_libc=yes
+  gt_cv_func_CFPreferencesCopyAppValue=yes
 else
-  gt_cv_func_ngettext_libc=no
+  gt_cv_func_CFPreferencesCopyAppValue=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
+     LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
-$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
-$as_echo_n "checking for dgettext in libc... " >&6; }
-if ${gt_cv_func_dgettext_libc+:} false; then :
+  fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
+#include <CoreFoundation/CFLocale.h>
 int
 main ()
 {
-return !dgettext ("","")
+CFLocaleCopyCurrent();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gt_cv_func_dgettext_libc=yes
+  gt_cv_func_CFLocaleCopyCurrent=yes
 else
-  gt_cv_func_dgettext_libc=no
+  gt_cv_func_CFLocaleCopyCurrent=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
+     LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
-$as_echo "$gt_cv_func_dgettext_libc" >&6; }
-      fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        for ac_func in bind_textdomain_codeset
-do :
-  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-_ACEOF
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
 
-fi
-done
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
 
-      fi
 
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-	 || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
-$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
-if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bindtextdomain ();
-int
-main ()
-{
-return bindtextdomain ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_bindtextdomain=yes
+
+
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
+$as_echo_n "checking whether included gettext is requested... " >&6; }
+
+# Check whether --with-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then :
+  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
 else
-  ac_cv_lib_intl_bindtextdomain=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  nls_cv_force_use_gnu_gettext=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
-$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_ngettext+:} false; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
+$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval \${$gt_func_gnugettext_libc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
 #endif
-char ngettext ();
+$gt_revision_test_code
+
 int
 main ()
 {
-return ngettext ();
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_ngettext=yes
+  eval "$gt_func_gnugettext_libc=yes"
 else
-  ac_cv_lib_intl_ngettext=no
+  eval "$gt_func_gnugettext_libc=no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
-$as_echo_n "checking for dgettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_dgettext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+eval ac_res=\$$gt_func_gnugettext_libc
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+  withval=$with_libintl_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+
+fi
+
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  LIBINTL_PREFIX=
+      HAVE_LIBINTL=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
+
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dgettext ();
-int
-main ()
-{
-return dgettext ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_dgettext=yes
-else
-  ac_cv_lib_intl_dgettext=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
-$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
-if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
-  gt_cv_func_dgettext_libintl=yes
-fi
 
-fi
 
-fi
 
 
-	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
-$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
-$as_echo "" >&6; }
-  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_ngettext+:} false; then :
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval \${$gt_func_gnugettext_libintl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
 #endif
-char ngettext ();
+$gt_revision_test_code
+
 int
 main ()
 {
-return ngettext ();
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_ngettext=yes
+  eval "$gt_func_gnugettext_libintl=yes"
 else
-  ac_cv_lib_intl_ngettext=no
+  eval "$gt_func_gnugettext_libintl=no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
-$as_echo_n "checking for dcgettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_dcgettext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
 #endif
-char dcgettext ();
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+
 int
 main ()
 {
-return dcgettext ();
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_intl_dcgettext=yes
-else
-  ac_cv_lib_intl_dcgettext=no
+  LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
-$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
-if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
-  gt_cv_func_dgettext_libintl=yes
-			libintl_extra_libs=-liconv
-else
-  :
-fi
-
-else
-  :
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
 fi
-
+eval ac_res=\$$gt_func_gnugettext_libintl
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
         fi
 
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          for ac_func in bind_textdomain_codeset
-do :
-  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-_ACEOF
-
-fi
-done
+                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
 
-          LIBS="$glib_save_LIBS"
 
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+                              nls_cv_use_gnu_gettext=yes
         fi
       fi
 
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+                BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
       fi
 
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                CATOBJEXT=.gmo
       fi
 
-      if test "$gt_cv_have_gettext" = "yes"; then
 
-$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
-
-	# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MSGFMT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
       fi
     fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != "no"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-	if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-	  for ac_func in dcgettext
-do :
-  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
-if test "x$ac_cv_func_dcgettext" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DCGETTEXT 1
-_ACEOF
-
-fi
-done
-
-	  MSGFMT_OPTS=
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
-$as_echo_n "checking if msgfmt accepts -c... " >&6; }
-	  cat >conftest.foo <<_ACEOF
 
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo at bar.xx>\n"
-"Language-Team: C <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
-_ACEOF
-if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
-  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-echo "$as_me: failed input was:" >&5
-sed 's/^/| /' conftest.foo >&5
-fi
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
 
-	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GMSGFMT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+    else
+      USE_NLS=no
+    fi
   fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+  fi
 
-	  # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XGETTEXT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
       fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
     fi
   done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+      fi
 
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
-			 return _nl_msg_cat_cntr
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  CATOBJEXT=.gmo
-             DATADIRNAME=share
-else
-  case $host in
-	    *-*-solaris*)
-	    	                	    	                ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
-  CATOBJEXT=.gmo
-               DATADIRNAME=share
-else
-  CATOBJEXT=.mo
-               DATADIRNAME=lib
-fi
 
-	    ;;
-	    *-*-openbsd*)
-	    CATOBJEXT=.mo
-            DATADIRNAME=share
-	    ;;
-	    *)
-	    CATOBJEXT=.mo
-            DATADIRNAME=lib
-	    ;;
-	    esac
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-          LIBS="$glib_save_LIBS"
-	  INSTOBJEXT=.mo
-	else
-	  gt_cv_have_gettext=no
-	fi
-      fi
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
 
-fi
 
+$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
 
+    fi
 
-    if test "$gt_cv_have_gettext" = "yes" ; then
+        POSUB=po
+  fi
 
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
 
+            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
     fi
 
-        if test "$XGETTEXT" != ":"; then
-                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
-$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
-        XGETTEXT=":"
-      fi
-    fi
 
-    # We need to process the po/ directory.
-    POSUB=po
 
-    ac_config_commands="$ac_config_commands default-2"
 
 
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
 
+        DATADIRNAME=share
 
 
+        INSTOBJEXT=.mo
 
 
+        GENCAT=gencat
 
 
+        INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
 
 
+        INTL_LIBTOOL_SUFFIX_PREFIX=
 
 
 
+    INTLLIBS="$LIBINTL"
 
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
- 	   # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
-     fi
 
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
 
-            MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
 
 
-         test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
 
 
 # Checks for header files.
@@ -7618,10 +12333,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-  ac_config_commands="$ac_config_commands po/stamp-it"
-
-
-
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
@@ -8018,7 +12729,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xnec2c $as_me 3.5.1, which was
+This file was extended by xnec2c $as_me 3.6.1-beta, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8084,7 +12795,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xnec2c config.status 3.5.1
+xnec2c config.status 3.6.1-beta
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -8204,7 +12915,12 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # INIT-COMMANDS
 #
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
 
 
 _ACEOF
@@ -8217,12 +12933,10 @@ do
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
-    "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
+    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
-    "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -8911,32 +13625,120 @@ $as_echo X"$file" |
   done
 }
  ;;
-    "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac ;;
-    "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac ;;
-    "po/stamp-it":C)
-    if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
-       as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
-    fi
-    rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
-    >"po/stamp-it.tmp"
-    sed '/^#/d
-	 s/^[[].*] *//
-	 /^[ 	]*$/d
-	'"s|^|	$ac_top_srcdir/|" \
-      "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
-
-    sed '/^POTFILES =/,/[^\\]$/ {
-		/^POTFILES =/!d
-		r po/POTFILES
-	  }
-	 ' "po/Makefile.in" >"po/Makefile"
-    rm -f "po/Makefile.tmp"
-    mv "po/stamp-it.tmp" "po/stamp-it"
-   ;;
+    "po-directories":C)
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done ;;
 
   esac
 done # for ac_tag
diff --git a/configure.ac b/configure.ac
index 36d6d0c..d169ed9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
-AC_INIT([xnec2c], [3.5.1], [nkcyham at yahoo.com])
+AC_INIT([xnec2c], [3.6.1-beta], [nkcyham at yahoo.com])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([src/common.h])
 AC_CONFIG_HEADERS([config.h])
@@ -16,7 +16,7 @@ else
    enable_cflags_setting=yes
 fi
 AC_MSG_RESULT($enable_cflags_setting)
-test "x$enable_cflags_setting" = xyes && CFLAGS="-Wall -O2"
+test "x$enable_cflags_setting" = xyes && CFLAGS=""
 
 # Checks for programs.
 AC_PROG_CXX
@@ -24,29 +24,25 @@ AC_PROG_CC
 AC_PROG_MAKE_SET
 
 # Checks for libraries.
-pkg_modules="gtk+-2.0 >= 2.0.0"
+pkg_modules="gtk+-3.0 >= 3.22.0"
 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 AC_CHECK_LIB([m], [atan2l])
+AC_CHECK_LIB([gmodule-2.0], [g_module_open])
 
 # Internationalization tools
-IT_PROG_INTLTOOL([0.50.0])
+AM_GNU_GETTEXT_VERSION([0.19.8])
 GETTEXT_PACKAGE=xnec2c
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.])
-AM_GLIB_GNU_GETTEXT
+AM_GNU_GETTEXT
 PROGRAMNAME_LOCALEDIR=[${datadir}/locale]
 AC_SUBST(PROGRAMNAME_LOCALEDIR)
 
-# Gettext setup
-GETTEXT_PACKAGE=xnec2c
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
-
 # Add the languages which your application supports here.
 ALL_LINGUAS=""
-AM_GLIB_GNU_GETTEXT
+AM_GNU_GETTEXT
 
 # Checks for header files.
 AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h unistd.h])
diff --git a/depcomp b/depcomp
index fc98710..b39f98f 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
 # 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
@@ -786,6 +786,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/doc/xnec2c.1.gz b/doc/xnec2c.1.gz
index b9e2d3a..e426160 100644
Binary files a/doc/xnec2c.1.gz and b/doc/xnec2c.1.gz differ
diff --git a/doc/xnec2c.html b/doc/xnec2c.html
index 3441eec..3cc31bd 100644
--- a/doc/xnec2c.html
+++ b/doc/xnec2c.html
@@ -2,13 +2,13 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-<meta name="generator" content="Bluefish 2.2.9" >
+<meta name="generator" content="Bluefish 2.2.10" >
 <title>Xnec2c User Manual</title>
-<meta name="author" content="Neoklis Kyriazis" >
+<meta name="author" content="Neoklis" >
 <meta name="copyright" content="GPL v2.0 or higher">
-<meta name="keywords" content="xnec2c GTK2 graphical nec2c NEC2 C">
+<meta name="keywords" content="xnec2c GTK3 graphical nec2c NEC2 C">
 <meta name="description" content=
-"xnec2c: GTK+v2-based GUI version of nec2c">
+"xnec2c: GTK+-3 based GUI version of nec2c">
 <meta name="ROBOTS" content="INDEX, FOLLOW">
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 </head>
@@ -17,7 +17,7 @@
 <h2>Xnec2c User Manual</h2>
 </div>
 <div align="center">
-<h4>Xnec2c is a GTK2-based Graphical version of nec2c, the C
+<h4>Xnec2c is a GTK3-based Graphical version of nec2c, the C
 translation of NEC2</h4>
 </div>
 <ol>
@@ -54,7 +54,7 @@ Window</a></li>
 </ol>
 <b><a name="Introduction" id="Introduction">1.
 Introduction:</a></b><br>
-<p>Xnec2c is a GTK2-based Graphical version of nec2c, my
+<p>Xnec2c is a GTK3-based Graphical version of nec2c, my
 translation to the C language of NEC2, the FORTRAN Numerical
 Electromagnetics Code commonly used for antenna simulation and
 analysis. The original nec2c is a non-interactive command-line
@@ -209,8 +209,8 @@ Please note that I use <a href="http://www.voidlinux.eu">Void Linux
 AMD64</a> which is a "bleeding edge" type distribution, so there
 may be compilation and/or run time difficulties if you are using a
 relatively old distro. This is mostly true of the basic
-dependencies like GTK+ 2 and Glade-2, and there can also be sound
-card incompatibility problems at run time.</p>
+dependencies like GTK+-3, and there can also be sound card
+incompatibility problems at run time.</p>
 <p>To compile the package, it may be preferable to first run the
 included "autogen.sh" script in the package's top directory, to
 produce a fresh build environment. Then the "configure" script can
@@ -953,9 +953,26 @@ Fixed a bug in the Helix editor which caused incorrect calculation
 of the segment length as a percentage of wavelength or of the
 number of segments/turn that correspond to a given segment length
 as a percentage of wavelength.</p>
-<p><b>Version 3.5.1:</b> After a request by FanJun BH1SCW, I
+<p><b>Version 3.5.1:</b> After a request by Fan Jun BH1SCW, I
 replaced the original makeshift desktop icon with one provided by
 Serge ON4AA.</p>
+<p><b>Version 3.6-beta:</b> I migrated Xnec2c to the latest
+GTK+-3.22 toolkit to bring it up to date. A lot of changes were
+needed to both the GUI and parts of the Xnec2c source code, mainly
+the use of GTK3's GUI Builder for creating the User Interface and
+the revised drawing model of GDK for presenting the Graphics
+displays. A new autogen.sh script has also been incorporated in the
+source package and internationalization has been migrated to the
+GNU GetText system. Because Xnec2c is very complicated and thorough
+testing is difficult, I am releasing this version as a beta.</p>
+<p><b>Version 3.6.1-beta:</b> After a request by Don Walters W9DKI
+I modified the xnec2c.glade file to reduce the default size of the
+drawing areas as they would not fit in displays with reduced
+resolution. I also removed some legacy code, left over from the
+migration of xnec2c to GTK3, which was producing error messages
+from GTK3 during the dragging of structure or radiation pattern
+displays. And I modified the Makefile.am file to get "make install"
+to install program files and documentation to the right places.</p>
 <p><b><a name="Bugs" id="Bugs">9. Bugs and
 Inadequacies:</a></b><br>
 Xnec2c is based on nec2c, my translation to C of the original
@@ -985,7 +1002,7 @@ pattern, near fields pattern etc. Specifically, dragging these
 drawings with the mouse to rotate or incline them seems very heavy
 on processor loading, and with most structures the movement is
 jerky. This is my first attempt at animated wire frame drawings and
-I lack experience with GTK2 in this field, so I probably went about
+I lack experience with GTK3 in this field, so I probably went about
 this the wrong way. I am open to any suggestions that may solve
 this problem! -;)</p>
 <p><b><a name="Acknowledgement" id="Acknowledgement">10.
diff --git a/examples/10-20m_horizomni.nec b/examples/10-20m_horizomni.nec
deleted file mode 100644
index f6fc6e1..0000000
--- a/examples/10-20m_horizomni.nec
+++ /dev/null
@@ -1,22 +0,0 @@
-CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
-CM A generally Omnidirectional Horzontally Polarized Antenna
-CE --- End Comments ---
-GW     1    15  -1.27000E+00 -1.27000E+00  0.00000E+00  1.27000E+00 -1.27000E+00  0.00000E+00  1.50000E-03
-GW     1    15   1.27000E+00 -1.27000E+00  0.00000E+00  1.27000E+00  1.27000E+00  0.00000E+00  1.50000E-03
-GW     1    15  -1.27000E+00 -1.27000E+00  0.00000E+00 -1.27000E+00  1.27000E+00  0.00000E+00  1.50000E-03
-GW     1     7  -5.00000E-02  1.27000E+00  0.00000E+00 -1.27000E+00  1.27000E+00  0.00000E+00  1.50000E-03
-GW     1     7   5.00000E-02  1.27000E+00  0.00000E+00  1.27000E+00  1.27000E+00  0.00000E+00  1.50000E-03
-GM     1     4   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.00000E+00
-GS     2     2   8.05000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GS     3     3   6.90000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GS     4     4   5.95000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GS     5     5   5.30000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GE     0     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-EX     0     5     8      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-FR     0   161     0      0  1.40000E+01  1.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
-RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
-TL     1     8     2      8  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-TL     2     8     3      8  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-TL     3     8     4      8  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-TL     4     8     5      8  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/14-30MHz_logper.nec b/examples/10-20m_logper.nec
similarity index 100%
rename from examples/14-30MHz_logper.nec
rename to examples/10-20m_logper.nec
diff --git a/examples/10-30m_inv_cone.nec b/examples/10-30m_inv_cone.nec
index 9fb5e69..ebdffbe 100644
--- a/examples/10-30m_inv_cone.nec
+++ b/examples/10-30m_inv_cone.nec
@@ -1,13 +1,13 @@
 CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
 CM Skeleton bi-pyramid antenna for 14-52 MHz
 CE --- End Comments ---
-GW     1    25  0.00000E+00  0.00000E+00  1.90400E-01  1.80200E+00  0.00000E+00  5.10000E+00  1.00000E-03
-GW     2     9  9.01000E-01  1.56060E+00  5.10000E+00  1.80200E+00  0.00000E+00  5.10000E+00  1.00000E-03
-GW     3     9  0.00000E+00  0.00000E+00  5.10000E+00  1.80200E+00  0.00000E+00  5.10000E+00  3.00000E-03
-GR     0     6  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GW     4     1  0.00000E+00  0.00000E+00  1.90400E-01  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E-02
-GW     5    25  0.00000E+00  0.00000E+00  1.90400E-01  0.00000E+00  0.00000E+00  5.10000E+00  1.25000E-02
-GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     1    25   0.00000E+00  0.00000E+00  1.90400E-01  1.80200E+00  0.00000E+00  5.10000E+00  1.00000E-03
+GW     2     9   9.01000E-01  1.56060E+00  5.10000E+00  1.80200E+00  0.00000E+00  5.10000E+00  1.00000E-03
+GW     3     9   0.00000E+00  0.00000E+00  5.10000E+00  1.80200E+00  0.00000E+00  5.10000E+00  3.00000E-03
+GR     0     6   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1   0.00000E+00  0.00000E+00  1.90400E-01  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E-02
+GW     5    25   0.00000E+00  0.00000E+00  1.90400E-01  0.00000E+00  0.00000E+00  5.10000E+00  1.25000E-02
+GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 FR     0    41     0      0  1.00000E+01  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
 RP     4    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
diff --git a/examples/10-40m_windom.nec b/examples/10-40m_windom.nec
new file mode 100644
index 0000000..f19f10d
--- /dev/null
+++ b/examples/10-40m_windom.nec
@@ -0,0 +1,12 @@
+CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
+CM A classical Windom Antenna for 10-80m
+CE --- End Comments ---
+GW     1    60  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.20000E+01  1.25000E-03
+GW     2    65  0.00000E+00  0.00000E+00  1.20000E+01 -7.30000E+00  0.00000E+00  1.20000E+01  1.25000E-03
+GW     3   130  0.00000E+00  0.00000E+00  1.20000E+01  1.35000E+01  0.00000E+00  1.20000E+01  1.25000E-03
+GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0    16     0     0  1.20000E+01  5.00000E-02  1.00000E+01  5.00000E-03  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-80m_G5RV.nec b/examples/10-80m_G5RV.nec
index 92c2650..7aa8c31 100644
--- a/examples/10-80m_G5RV.nec
+++ b/examples/10-80m_G5RV.nec
@@ -1,12 +1,12 @@
 CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
 CM G5RV antenna for 10 - 80m
 CE --- End Comments ---
-GW     1    61   1.55500E+01  0.00000E+00  9.65000E+00 -1.55500E+01  0.00000E+00  9.65000E+00  2.00000E-03
-GW     2     1   2.00000E-01  0.00000E+00  2.00000E-01 -2.00000E-01  0.00000E+00  2.00000E-01  1.50000E-02
+GW     1   101   1.42500E+01  0.00000E+00  1.35000E+01 -1.42500E+01  0.00000E+00  1.35000E+01  1.50000E-03
+GW     2     1   1.00000E-01  0.00000E+00  2.00000E-01 -1.00000E-01  0.00000E+00  2.00000E-01  1.50000E-02
 GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0   136     0      0  3.00000E+00  2.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
 RP     0    37    74   1000  0.00000E+00  0.00000E+00  2.50000E+00  5.00000E+00  0.00000E+00  0.00000E+00
-TL     1    31     2      1  4.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     1    51     2      1  4.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 GN     2     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-80m_Inverted-L.nec b/examples/10-80m_Inverted-L.nec
index b302842..bbd10d9 100644
--- a/examples/10-80m_Inverted-L.nec
+++ b/examples/10-80m_Inverted-L.nec
@@ -1,11 +1,11 @@
 CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
 CM Inverted L antenna for 10 - 80m
 CE --- End Comments ---
-GW     1    21  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  9.00000E+00  2.00000E-03
-GW     2    62  0.00000E+00  0.00000E+00  9.00000E+00  2.50000E+01  0.00000E+00  9.00000E+00  2.00000E-03
-GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     1    21   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  9.00000E+00  2.00000E-03
+GW     2    62   0.00000E+00  0.00000E+00  9.00000E+00  2.50000E+01  0.00000E+00  9.00000E+00  2.00000E-03
+GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
 RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
-GN     0     4     0      0  1.20000E+01  5.00000E-03  8.00000E+00  5.00000E-03  0.00000E+00  0.00000E+00
+GN     0     8     0     0  1.20000E+01  5.00000E-03  8.00000E+00  5.00000E-03  0.00000E+00  0.00000E+00
 EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20-40m_ground_plane.nec b/examples/20-40m_ground_plane.nec
index 23f20c9..76cc4f5 100644
--- a/examples/20-40m_ground_plane.nec
+++ b/examples/20-40m_ground_plane.nec
@@ -2,12 +2,12 @@ CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
 CM Dual band base-loaded 7 & 14 MHz Ground Plane.
 CM Infinite perfect ground
 CE --- End Comments ---
-GW     1    20  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.30000E+01  2.50000E-02
-GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     1    20   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E+01  2.50000E-02
+GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    16     0      0  1.20000E+01  5.00000E-02  1.00000E+01  1.00000E-02  0.00000E+00  0.00000E+00
 EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-FR     0    19     0      0  6.00000E+00  5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-LD     0     1     1      1  0.00000E+00  4.80000E-06  6.20000E-11  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    46     0     0  6.00000E+00  2.00000E-01  1.50000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1     1  0.00000E+00  5.80000E-06  5.80000E-11  0.00000E+00  0.00000E+00  0.00000E+00
 NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 NE     0     1    20     15  0.00000E+00 -9.50000E+00  1.00000E+00  0.00000E+00  1.00000E+00  1.00000E+00
 RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
diff --git a/examples/2m_bigwheel.nec b/examples/2m_bigwheel.nec
index 877a3b9..85e951e 100644
--- a/examples/2m_bigwheel.nec
+++ b/examples/2m_bigwheel.nec
@@ -1,16 +1,16 @@
 CM --- NEC2 Input File created or edited by xnec2c 3.5 ---
 CM Big Wheel horizontally polarized omni antenna for 2m
 CE --- End Comments ---
-GA     1    21  6.65000E-01  0.00000E+00  7.00000E+01  3.00000E-03  2.06474E+00  0.00000E+00  0.00000E+00
-GM     0     0  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GW     2    17  0.00000E+00  0.00000E+00  1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
-GM     0     0  0.00000E+00  0.00000E+00  7.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GW     3    17  0.00000E+00  0.00000E+00 -1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
-GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-GW     4     1  0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  0.00000E+00  1.00000E-02  3.00000E-03
-GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GA     1    21   6.65000E-01  0.00000E+00  7.00000E+01  3.00000E-03  1.90989E+00  0.00000E+00  0.00000E+00
+GM     0     0   9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    17   0.00000E+00  0.00000E+00  1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
+GM     0     0   0.00000E+00  0.00000E+00  7.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    17   0.00000E+00  0.00000E+00 -1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
+GR     0     4   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1   0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  0.00000E+00  1.00000E-02  3.00000E-03
+GE     0     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-FR     0    21     0      0  1.44000E+02  2.00000E-01  1.48000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0     0  1.44000E+02  2.00000E-01  1.48000E+02  0.00000E+00  0.00000E+00  0.00000E+00
 NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 NE     0    15     1     15 -1.40000E+00  0.00000E+00 -1.40000E+00  2.00000E-01  0.00000E+00  2.00000E-01
 RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
diff --git a/examples/2m_xpol_omni.nec b/examples/2m_xpol_omni.nec
index 52194f7..f45f323 100644
--- a/examples/2m_xpol_omni.nec
+++ b/examples/2m_xpol_omni.nec
@@ -8,6 +8,6 @@ GR     0     4   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 GW     4     1   0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  0.00000E+00  1.00000E-02  1.50000E-02
 GE     0     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-FR     0    31     0      0  1.20000E+02  2.00000E+00  1.80000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    61     0     0  1.20000E+02  1.00000E+00  1.80000E+02  0.00000E+00  0.00000E+00  0.00000E+00
 RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
 EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/30-80m_inv_L.nec b/examples/30-80m_inv_L.nec
index 2994969..58938c6 100644
--- a/examples/30-80m_inv_L.nec
+++ b/examples/30-80m_inv_L.nec
@@ -7,5 +7,5 @@ GE     1     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 FR     0    46     0      0  3.00000E+00  2.00000E-01  1.20000E+01  0.00000E+00  0.00000E+00  0.00000E+00
 GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-RP     0    19    37  1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
 EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/twin-loop.nec b/examples/twin-loop.nec
index b241925..4de266d 100644
--- a/examples/twin-loop.nec
+++ b/examples/twin-loop.nec
@@ -16,7 +16,7 @@ GW     3     1   0.00000E+00  0.00000E+00 -3.00000E-02  0.00000E+00  0.00000E+00
 GE     0     0   0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 EX     0     3     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 TL     1   109     3      1  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
-TL     2   109     3     1 -3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     2   109     3      1 -3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
 FR     0    21     0      0  8.00000E+00  2.00000E-01  1.20000E+01  0.00000E+00  0.00000E+00  0.00000E+00
 RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
 EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/xnec2c.desktop b/files/xnec2c.desktop
similarity index 91%
rename from xnec2c.desktop
rename to files/xnec2c.desktop
index 92cfcc6..7b59242 100644
--- a/xnec2c.desktop
+++ b/files/xnec2c.desktop
@@ -4,7 +4,7 @@ Encoding=UTF-8
 Name=xnec2c
 Comment=Antenna analysis
 Exec=xnec2c -j4
-Icon=xnec2c.png
+Icon=xnec2c
 Terminal=false
 Type=Application
 Categories=HamRadio;Science;Utility
diff --git a/files/xnec2c.png b/files/xnec2c.png
new file mode 100644
index 0000000..5621961
Binary files /dev/null and b/files/xnec2c.png differ
diff --git a/install-sh b/install-sh
index 0b0fdcb..0360b79 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2013-12-25.23; # UTC
+scriptversion=2016-01-11.22; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -496,6 +496,6 @@ done
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/intltool-extract.in b/intltool-extract.in
deleted file mode 100644
index e69de29..0000000
diff --git a/intltool-merge.in b/intltool-merge.in
deleted file mode 100644
index e69de29..0000000
diff --git a/intltool-update.in b/intltool-update.in
deleted file mode 100644
index e69de29..0000000
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644
index 0000000..bc98201
--- /dev/null
+++ b/m4/codeset.m4
@@ -0,0 +1,24 @@
+# codeset.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <langinfo.h>]],
+          [[char* cs = nl_langinfo(CODESET); return !cs;]])],
+       [am_cv_langinfo_codeset=yes],
+       [am_cv_langinfo_codeset=no])
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
new file mode 100644
index 0000000..1e578f3
--- /dev/null
+++ b/m4/extern-inline.m4
@@ -0,0 +1,102 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+  AH_VERBATIM([extern_inline],
+[/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+   OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+   for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
+     && (defined __header_inline \
+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+            && ! defined __clang__) \
+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
+             && (defined __GNUC__ || defined __cplusplus)) \
+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+                && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !defined __PGI \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+   suppress bogus "no previous prototype for 'FOO'"
+   and "no previous declaration for 'FOO'" diagnostics,
+   when FOO is an inline function in the header; see
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
new file mode 100644
index 0000000..24fcf88
--- /dev/null
+++ b/m4/fcntl-o.m4
@@ -0,0 +1,134 @@
+# fcntl-o.m4 serial 4
+dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+  dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  AC_CHECK_FUNCS_ONCE([symlink])
+  AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+          ]],
+          [[
+            int result = !constants;
+            #if HAVE_SYMLINK
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            #endif
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;]])],
+       [gl_cv_header_working_fcntl_h=yes],
+       [case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac],
+       [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+    [Define to 1 if O_NOATIME works.])
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+  AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+    [Define to 1 if O_NOFOLLOW works.])
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..eef5073
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,420 @@
+# gettext.m4 serial 68 (gettext-0.19.8)
+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value '$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH([included-gettext],
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+               ]],
+               [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+               ]])],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+                 ]],
+                 [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+                 ]])],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+                   ]],
+                   [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+                   ]])],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+                ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE([ENABLE_NLS], [1],
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE([HAVE_GETTEXT], [1],
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE([HAVE_DCGETTEXT], [1],
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST([BUILD_INCLUDED_LIBINTL])
+    AC_SUBST([USE_INCLUDED_LIBINTL])
+    AC_SUBST([CATOBJEXT])
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST([DATADIRNAME])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST([INSTOBJEXT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST([GENCAT])
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST([INTLOBJS])
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST([INTLLIBS])
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+
+dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
new file mode 100644
index 0000000..785bba0
--- /dev/null
+++ b/m4/glibc2.m4
@@ -0,0 +1,31 @@
+# glibc2.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+  [
+    AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
+      [ac_cv_gnu_library_2],
+      [AC_EGREP_CPP([Lucky GNU user],
+        [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+  Lucky GNU user
+ #endif
+#endif
+        ],
+        [ac_cv_gnu_library_2=yes],
+        [ac_cv_gnu_library_2=no])
+      ]
+    )
+    AC_SUBST([GLIBC2])
+    GLIBC2="$ac_cv_gnu_library_2"
+  ]
+)
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644
index 0000000..dafebf5
--- /dev/null
+++ b/m4/glibc21.m4
@@ -0,0 +1,34 @@
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+  [
+    AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
+      [ac_cv_gnu_library_2_1],
+      [AC_EGREP_CPP([Lucky],
+        [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
+        ],
+        [ac_cv_gnu_library_2_1=yes],
+        [ac_cv_gnu_library_2_1=no])
+      ]
+    )
+    AC_SUBST([GLIBC21])
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..aa159c5
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,271 @@
+# iconv.m4 serial 19 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[
+#include <stdlib.h>
+#include <iconv.h>
+         ]],
+         [[iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);]])],
+      [am_cv_func_iconv=yes])
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+           ]],
+           [[iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);]])],
+        [am_cv_lib_iconv=yes]
+        [am_cv_func_iconv=yes])
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+      dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+      dnl Solaris 10.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      am_cv_func_iconv_works=no
+      for ac_iconv_const in '' 'const'; do
+        AC_RUN_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+             ]],
+             [[int result = 0;
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\263";
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    result |= 16;
+  return result;
+]])],
+          [am_cv_func_iconv_works=yes], ,
+          [case "$host_os" in
+             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+             *)            am_cv_func_iconv_works="guessing yes" ;;
+           esac])
+        test "$am_cv_func_iconv_works" = no || break
+      done
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE([HAVE_ICONV], [1],
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST([LIBICONV])
+  AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl   warnings.
+m4_define([gl_iconv_AC_DEFUN],
+  m4_version_prereq([2.64],
+    [[AC_DEFUN_ONCE(
+        [$1], [$2])]],
+    [m4_ifdef([gl_00GNULIB],
+       [[AC_DEFUN_ONCE(
+           [$1], [$2])]],
+       [[AC_DEFUN(
+           [$1], [$2])]])]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL([am_cv_proto_iconv], [
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+           ]],
+           [[]])],
+        [am_cv_proto_iconv_arg1=""],
+        [am_cv_proto_iconv_arg1="const"])
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([
+         $am_cv_proto_iconv])
+    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+      [Define as const if the declaration of iconv() needs const.])
+    dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+    m4_ifdef([gl_ICONV_H_DEFAULTS],
+      [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+       if test -n "$am_cv_proto_iconv_arg1"; then
+         ICONV_CONST="const"
+       fi
+      ])
+  fi
+])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
new file mode 100644
index 0000000..744b99e
--- /dev/null
+++ b/m4/intdiv0.m4
@@ -0,0 +1,87 @@
+# intdiv0.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002, 2007-2008, 2010-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+      case "$host_os" in
+        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+          # On Mac OS X 10.2 or newer, just assume the same as when cross-
+          # compiling. If we were to perform the real test, 1 Crash Report
+          # dialog window would pop up.
+          case "$host_cpu" in
+            i[34567]86 | x86_64)
+              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+          esac
+          ;;
+      esac
+changequote([,])dnl
+      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+sigfpe_handler (int sig)
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  _exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (2);
+}
+]])],
+          [gt_cv_int_divbyzero_sigfpe=yes],
+          [gt_cv_int_divbyzero_sigfpe=no],
+          [
+            # Guess based on the CPU.
+changequote(,)dnl
+            case "$host_cpu" in
+              alpha* | i[34567]86 | x86_64 | m68k | s390*)
+                gt_cv_int_divbyzero_sigfpe="guessing yes";;
+              *)
+                gt_cv_int_divbyzero_sigfpe="guessing no";;
+            esac
+changequote([,])dnl
+          ])
+      fi
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
+    [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/m4/intl.m4 b/m4/intl.m4
new file mode 100644
index 0000000..42fac95
--- /dev/null
+++ b/m4/intl.m4
@@ -0,0 +1,304 @@
+# intl.m4 serial 29 (gettext-0.19)
+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2009.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([gt_GLIBC2])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([gl_VISIBILITY])dnl
+  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gt_TYPE_INTMAX_T])
+  AC_REQUIRE([gt_PRINTF_POSIX])
+  AC_REQUIRE([gl_GLIBC21])dnl
+  AC_REQUIRE([gl_XSIZE])dnl
+  AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
+  AC_REQUIRE([gt_INTL_MACOSX])dnl
+  AC_REQUIRE([gl_EXTERN_INLINE])dnl
+  AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
+
+  dnl Support for automake's --enable-silent-rules.
+  case "$enable_silent_rules" in
+    yes) INTL_DEFAULT_VERBOSITY=0;;
+    no)  INTL_DEFAULT_VERBOSITY=1;;
+    *)   INTL_DEFAULT_VERBOSITY=1;;
+  esac
+  AC_SUBST([INTL_DEFAULT_VERBOSITY])
+
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+    ])
+  AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h])
+  AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
+    snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_newlocale" = yes; then
+    HAVE_NEWLOCALE=1
+  else
+    HAVE_NEWLOCALE=0
+  fi
+  AC_SUBST([HAVE_NEWLOCALE])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
+  AM_LANGINFO_CODESET
+  gt_LC_MESSAGES
+
+  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+  dnl 1. when we install a shared library, we must arrange to export
+  dnl    auxiliary pointer variables for every exported variable,
+  dnl 2. when we install a shared library and a static library simultaneously,
+  dnl    the include file specifies __declspec(dllimport) and therefore we
+  dnl    must arrange to define the auxiliary pointer variables for the
+  dnl    exported variables _also_ in the static library.
+  if test "$enable_shared" = yes; then
+    case "$host_os" in
+      mingw* | cygwin*) is_woe32dll=yes ;;
+      *) is_woe32dll=no ;;
+    esac
+  else
+    is_woe32dll=no
+  fi
+  WOE32DLL=$is_woe32dll
+  AC_SUBST([WOE32DLL])
+
+  dnl On mingw and Cygwin, we can activate special Makefile rules which add
+  dnl version information to the shared libraries and executables.
+  case "$host_os" in
+    mingw* | cygwin*) is_woe32=yes ;;
+    *) is_woe32=no ;;
+  esac
+  WOE32=$is_woe32
+  AC_SUBST([WOE32])
+  if test $WOE32 = yes; then
+    dnl Check for a program that compiles Windows resource files.
+    AC_CHECK_TOOL([WINDRES], [windres])
+  fi
+
+  dnl Determine whether when creating a library, "-lc" should be passed to
+  dnl libtool or not. On many platforms, it is required for the libtool option
+  dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
+  dnl in the *.la files - makes it impossible to create multithreaded programs,
+  dnl because libtool also reorders the -lc to come before the -pthread, and
+  dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
+  case "$host_os" in
+    hpux*) LTLIBC="" ;;
+    *)     LTLIBC="-lc" ;;
+  esac
+  AC_SUBST([LTLIBC])
+
+  dnl Rename some macros and functions used for locking.
+  AH_BOTTOM([
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init_func     libintl_lock_init_func
+#define glthread_lock_lock_func     libintl_lock_lock_func
+#define glthread_lock_unlock_func   libintl_lock_unlock_func
+#define glthread_lock_destroy_func  libintl_lock_destroy_func
+#define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
+#define glthread_rwlock_init_func              libintl_rwlock_init_func
+#define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
+#define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
+#define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
+#define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
+#define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
+#define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
+#define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
+#define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
+#define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
+#define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
+#define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
+#define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
+#define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
+#define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
+#define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
+#define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
+#define glthread_once_func            libintl_once_func
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+#define glthread_once_multithreaded   libintl_once_multithreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl   dcigettext.c
+dnl   eval-plural.h
+dnl   explodename.c
+dnl   finddomain.c
+dnl   gettextP.h
+dnl   gmo.h
+dnl   hash-string.h hash-string.c
+dnl   l10nflist.c
+dnl   libgnuintl.h.in (except the *printf stuff)
+dnl   loadinfo.h
+dnl   loadmsgcat.c
+dnl   localealias.c
+dnl   log.c
+dnl   plural-exp.h plural-exp.c
+dnl   plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_LOCK])dnl
+
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]],
+       [[]])],
+    [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
+       [Define to 1 if the compiler understands __builtin_expect.])])
+
+  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+    stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
+    argz_stringify argz_next __fsetlocking])
+
+  dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
+  dnl it nor the equivalent.
+  if test $ac_cv_func_uselocale = yes; then
+    AC_CHECK_FUNCS([getlocalename_l])
+  fi
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>])
+
+  AM_ICONV
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-2.7 for %define api.pure.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      2.[7-9]* | [3-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
+dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
+AC_DEFUN([gt_GL_ATTRIBUTE], [
+  m4_ifndef([gl_[]COMMON],
+    AH_VERBATIM([gt_gl_attribute],
+[/* Define as a marker that can be attached to declarations that might not
+    be used.  This helps to reduce warnings, such as from
+    GCC -Wunused-parameter.  */
+#ifndef _GL_UNUSED
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_UNUSED __attribute__ ((__unused__))
+# else
+#  define _GL_UNUSED
+# endif
+#endif
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
+#endif
+]))])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
new file mode 100644
index 0000000..aca924c
--- /dev/null
+++ b/m4/intlmacosx.m4
@@ -0,0 +1,56 @@
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in Mac OS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    [gt_cv_func_CFPreferencesCopyAppValue],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in Mac OS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/m4/intmax.m4 b/m4/intmax.m4
new file mode 100644
index 0000000..1a47107
--- /dev/null
+++ b/m4/intmax.m4
@@ -0,0 +1,36 @@
+# intmax.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002-2005, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+          ]],
+          [[intmax_t x = -1;
+            return !x;]])],
+       [gt_cv_c_intmax_t=yes],
+       [gt_cv_c_intmax_t=no])])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE([HAVE_INTMAX_T], [1],
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644
index 0000000..ae20183
--- /dev/null
+++ b/m4/inttypes-pri.m4
@@ -0,0 +1,42 @@
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.53])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_CHECK_HEADERS([inttypes.h])
+  if test $ac_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      [gt_cv_inttypes_pri_broken],
+      [
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+             ]],
+             [[]])],
+          [gt_cv_inttypes_pri_broken=no],
+          [gt_cv_inttypes_pri_broken=yes])
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+    PRI_MACROS_BROKEN=1
+  else
+    PRI_MACROS_BROKEN=0
+  fi
+  AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644
index 0000000..7657119
--- /dev/null
+++ b/m4/inttypes_h.m4
@@ -0,0 +1,29 @@
+# inttypes_h.m4 serial 10
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+#include <sys/types.h>
+#include <inttypes.h>
+          ]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_inttypes_h=yes],
+       [gl_cv_header_inttypes_h=no])])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644
index 0000000..1c24d6d
--- /dev/null
+++ b/m4/lcmessage.m4
@@ -0,0 +1,35 @@
+# lcmessage.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
+dnl Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>]],
+          [[return LC_MESSAGES]])],
+       [gt_cv_val_LC_MESSAGES=yes],
+       [gt_cv_val_LC_MESSAGES=no])])
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE([HAVE_LC_MESSAGES], [1],
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 0000000..6209de6
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,119 @@
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
+
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-2.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break
+        ;;
+      *)
+        test "$with_gnu_ld" != yes && break
+        ;;
+      esac
+    fi
+  done
+  IFS="$acl_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT([$LD])
+else
+  AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 0000000..2f51855
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,777 @@
+# lib-link.m4 serial 26 (gettext-0.18.2)
+dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+    dnl because these -l options might require -L options that are present in
+    dnl LIBS. -l options benefit only from the -L options listed before it.
+    dnl Otherwise, add it to the front of LIBS, because it may be a static
+    dnl library that depends on another static library that is present in LIBS.
+    dnl Static libraries benefit only from the static libraries listed after
+    dnl it.
+    case " $LIB[]NAME" in
+      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+      *)       LIBS="$LIB[]NAME $LIBS" ;;
+    esac
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_libname_spec,
+dnl   acl_library_names_spec,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE([rpath],
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_frompackage_]NAME, [$2])
+  popdef([NAME])
+  pushdef([PACK],[$2])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_libsinpackage_]PACKUP,
+    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+  popdef([PACKUP])
+  popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_ARG_WITH(P_A_C_K[-prefix],
+[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
+  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+  dnl computed. So it has to be reset here.
+  HAVE_LIB[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+  popdef([P_A_C_K])
+  popdef([PACKLIBS])
+  popdef([PACKUP])
+  popdef([PACK])
+  popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem" \
+             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 0000000..6851031
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,224 @@
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl   "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl   "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64.
+  dnl On glibc systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+  dnl the compiler's default mode by looking at the compiler's library search
+  dnl path. If at least one of its elements ends in /lib64 or points to a
+  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+  dnl Otherwise we use the default, namely "lib".
+  dnl On Solaris systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+      dnl symlink is missing, so we set acl_libdirstem2 too.
+      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+        [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+        ])
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS= 	}"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/m4/lock.m4 b/m4/lock.m4
new file mode 100644
index 0000000..1e83e23
--- /dev/null
+++ b/m4/lock.m4
@@ -0,0 +1,42 @@
+# lock.m4 serial 13 (gettext-0.18.2)
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_LOCK],
+[
+  AC_REQUIRE([gl_THREADLIB])
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    AC_CHECK_TYPE([pthread_rwlock_t],
+      [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+         [Define if the POSIX multithreading library has read/write locks.])],
+      [],
+      [#include <pthread.h>])
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [[#include <pthread.h>]],
+        [[
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+        ]])],
+      [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+         [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+  fi
+  gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644
index 0000000..36d8b12
--- /dev/null
+++ b/m4/longlong.m4
@@ -0,0 +1,113 @@
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[@%:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'long long int'.])
+  fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'unsigned long long int'.])
+  fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+  AC_LANG_PROGRAM(
+    [[/* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;]],
+    [[/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));]])
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..afdb9ca
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,32 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
+dnl Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE([nls],
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644
index 0000000..c5a2f6b
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,453 @@
+# po.m4 serial 24 (gettext-0.19)
+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+  AC_REQUIRE([AC_PROG_SED])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  tab=`printf '\t'`
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+  # Seen the first line of the variable definition.
+  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assignment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCL [...]
+  tab=`printf '\t'`
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
new file mode 100644
index 0000000..f9088c0
--- /dev/null
+++ b/m4/printf-posix.m4
@@ -0,0 +1,48 @@
+# printf-posix.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}]])],
+        [gt_cv_func_printf_posix=yes],
+        [gt_cv_func_printf_posix=no],
+        [
+          AC_EGREP_CPP([notposix], [
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+            ],
+            [gt_cv_func_printf_posix="guessing no"],
+            [gt_cv_func_printf_posix="guessing yes"])
+        ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE([HAVE_POSIX_PRINTF], [1],
+        [Define if your printf() function supports format strings with positions.])
+      ;;
+  esac
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..9ace7c3
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,91 @@
+# progtest.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$][$1])
+else
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/m4/size_max.m4 b/m4/size_max.m4
new file mode 100644
index 0000000..de69025
--- /dev/null
+++ b/m4/size_max.m4
@@ -0,0 +1,79 @@
+# size_max.m4 serial 10
+dnl Copyright (C) 2003, 2005-2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS([stdint.h])
+  dnl First test whether the system already has SIZE_MAX.
+  AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
+    gl_cv_size_max=
+    AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], [gl_cv_size_max=yes])
+    if test -z "$gl_cv_size_max"; then
+      dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+      dnl than the type 'unsigned long'. Try hard to find a definition that can
+      dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+      AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
+        [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+      AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
+        [#include <stddef.h>], [fits_in_uint=])
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+          dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+          dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+          AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
+               ]],
+               [[]])],
+            [fits_in_uint=0])
+        fi
+        dnl We cannot use 'expr' to simplify this expression, because 'expr'
+        dnl works only with 'long' integers in the host environment, while we
+        dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+        if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+        dnl Shouldn't happen, but who knows...
+        gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+  ])
+  if test "$gl_cv_size_max" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+  fi
+  dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
+  dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
+  dnl #define by AC_DEFINE_UNQUOTED.
+  AH_VERBATIM([SIZE_MAX],
+[/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
new file mode 100644
index 0000000..f823b94
--- /dev/null
+++ b/m4/stdint_h.m4
@@ -0,0 +1,27 @@
+# stdint_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+            #include <stdint.h>]],
+          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+       [gl_cv_header_stdint_h=yes],
+       [gl_cv_header_stdint_h=no])])
+  if test $gl_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
new file mode 100644
index 0000000..b43534e
--- /dev/null
+++ b/m4/threadlib.m4
@@ -0,0 +1,389 @@
+# threadlib.m4 serial 11 (gettext-0.18.2)
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+  dnl influences the result of the autoconf tests that test for *_unlocked
+  dnl declarations, on AIX 5 at least. Therefore it must come early.
+  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+  AC_BEFORE([$0], [gl_ARGP])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+  dnl AC_GNU_SOURCE.
+  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+    [AC_REQUIRE([AC_GNU_SOURCE])])
+  dnl Check for multithreading.
+  m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+  AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+    [gl_use_threads=$enableval],
+    [if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+changequote(,)dnl
+       case "$host_os" in
+         dnl Disable multithreading by default on OSF/1, because it interferes
+         dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+         dnl child process gets an endless segmentation fault inside execvp().
+         dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+         dnl bugs that lead to endless loops or crashes. See
+         dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+         osf*) gl_use_threads=no ;;
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+changequote([,])dnl
+     fi
+    ])
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+    dnl Check whether the compiler and linker support weak declarations.
+    AC_CACHE_CHECK([whether imported symbols can be declared weak],
+      [gl_cv_have_weak],
+      [gl_cv_have_weak=no
+       dnl First, test whether the compiler accepts it syntactically.
+       AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern void xyzzy ();
+#pragma weak xyzzy]],
+            [[xyzzy();]])],
+         [gl_cv_have_weak=maybe])
+       if test $gl_cv_have_weak = maybe; then
+         dnl Second, test whether it actually works. On Cygwin 1.7.2, with
+         dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}]])],
+           [gl_cv_have_weak=yes],
+           [gl_cv_have_weak=no],
+           [dnl When cross-compiling, assume that only ELF platforms support
+            dnl weak symbols.
+            AC_EGREP_CPP([Extensible Linking Format],
+              [#ifdef __ELF__
+               Extensible Linking Format
+               #endif
+              ],
+              [gl_cv_have_weak="guessing yes"],
+              [gl_cv_have_weak="guessing no"])
+           ])
+       fi
+      ])
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+      AC_CHECK_HEADER([pthread.h],
+        [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        #
+        # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+        # needs -pthread for some reason.  See:
+        # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+        save_LIBS=$LIBS
+        for gl_pthread in '' '-pthread'; do
+          LIBS="$LIBS $gl_pthread"
+          AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[#include <pthread.h>
+                 pthread_mutex_t m;
+                 pthread_mutexattr_t ma;
+               ]],
+               [[pthread_mutex_lock (&m);
+                 pthread_mutexattr_init (&ma);]])],
+            [gl_have_pthread=yes
+             LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+             LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
+          LIBS=$save_LIBS
+          test -n "$gl_have_pthread" && break
+        done
+
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                   [Define if the pthread_in_use() detection is hard.])
+             esac
+            ])
+        elif test -z "$gl_have_pthread"; then
+          # Some library is needed. Try libpthread and libc_r.
+          AC_CHECK_LIB([pthread], [pthread_kill],
+            [gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            AC_CHECK_LIB([c_r], [pthread_kill],
+              [gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+          AC_DEFINE([USE_POSIX_THREADS], [1],
+            [Define if the POSIX multithreading library can be used.])
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+                [Define if references to the POSIX multithreading library should be made weak.])
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <thread.h>
+#include <synch.h>
+             ]],
+             [[thr_self();]])],
+          [gl_have_solaristhread=yes])
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+          AC_DEFINE([USE_SOLARIS_THREADS], [1],
+            [Define if the old Solaris multithreading library can be used.])
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+              [Define if references to the old Solaris multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+      AC_LIB_LINKFLAGS([pth])
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBPTH"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
+        [gl_have_pth=yes])
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+        AC_DEFINE([USE_PTH_THREADS], [1],
+          [Define if the GNU Pth multithreading library can be used.])
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+            AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+              [Define if references to the GNU Pth multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+            AC_DEFINE([USE_WINDOWS_THREADS], [1],
+              [Define if the native Windows multithreading API can be used.])
+          fi
+          ;;
+      esac
+    fi
+  fi
+  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_RESULT([$gl_threads_api])
+  AC_SUBST([LIBTHREAD])
+  AC_SUBST([LTLIBTHREAD])
+  AC_SUBST([LIBMULTITHREAD])
+  AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY])
+  AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+  m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform           Available  Compiler    Supports   test-lock
+dnl                    flavours   option      weak       result
+dnl ---------------    ---------  ---------   --------   ---------
+dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
+dnl
+dnl GNU Hurd/glibc     posix
+dnl
+dnl Ubuntu 14.04       posix      -pthread        Y      OK
+dnl
+dnl FreeBSD 5.3        posix      -lc_r           Y
+dnl                    posix      -lkse ?         Y
+dnl                    posix      -lpthread ?     Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 5.2        posix      -lc_r           Y
+dnl                    posix      -lkse           Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
+dnl
+dnl NetBSD 1.6         --
+dnl
+dnl OpenBSD 3.4        posix      -lpthread       Y      OK
+dnl
+dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
+dnl
+dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
+dnl                    solaris    -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11           posix      -lpthread       N (cc) OK
+dnl                                               Y (gcc)
+dnl
+dnl IRIX 6.5           posix      -lpthread       Y      0.5
+dnl
+dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
+dnl                               -lpthread (gcc) Y
+dnl
+dnl Cygwin             posix      -lpthread       Y      OK
+dnl
+dnl Any of the above   pth        -lpth                  0.0
+dnl
+dnl Mingw              windows                    N      OK
+dnl
+dnl BeOS 5             --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl   OK if all three tests terminate OK,
+dnl   0.5 if the first test terminates OK but the second one loops endlessly,
+dnl   0.0 if the first test already loops endlessly.
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
new file mode 100644
index 0000000..30f4dd5
--- /dev/null
+++ b/m4/uintmax_t.m4
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 12
+dnl Copyright (C) 1997-2004, 2007-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ([2.13])
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+    AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+    test $ac_cv_type_unsigned_long_long_int = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE([HAVE_UINTMAX_T], [1],
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/visibility.m4 b/m4/visibility.m4
new file mode 100644
index 0000000..e99e3fb
--- /dev/null
+++ b/m4/visibility.m4
@@ -0,0 +1,77 @@
+# visibility.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl Mac OS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+    dnl First, check whether -Werror can be added to the command line, or
+    dnl whether it leads to an error because of some other option that the
+    dnl user has put into $CC $CFLAGS $CPPFLAGS.
+    AC_MSG_CHECKING([whether the -Werror option is usable])
+    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror"
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[]], [[]])],
+        [gl_cv_cc_vis_werror=yes],
+        [gl_cv_cc_vis_werror=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+    dnl Now check whether visibility declarations are supported.
+    AC_MSG_CHECKING([for simple visibility declarations])
+    AC_CACHE_VAL([gl_cv_cc_visibility], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -fvisibility=hidden"
+      dnl We use the option -Werror and a function dummyfunc, because on some
+      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+      dnl "visibility attribute not supported in this configuration; ignored"
+      dnl at the first function definition in every compilation unit, and we
+      dnl don't want to use the option in this case.
+      if test $gl_cv_cc_vis_werror = yes; then
+        CFLAGS="$CFLAGS -Werror"
+      fi
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+             extern __attribute__((__visibility__("default"))) int exportedvar;
+             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+             void dummyfunc (void) {}
+           ]],
+           [[]])],
+        [gl_cv_cc_visibility=yes],
+        [gl_cv_cc_visibility=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_visibility])
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
+  AC_SUBST([CFLAG_VISIBILITY])
+  AC_SUBST([HAVE_VISIBILITY])
+  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
new file mode 100644
index 0000000..2db8c3f
--- /dev/null
+++ b/m4/wchar_t.m4
@@ -0,0 +1,24 @@
+# wchar_t.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wchar_t=yes],
+       [gt_cv_c_wchar_t=no])])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+  fi
+])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644
index 0000000..8ff2a5b
--- /dev/null
+++ b/m4/wint_t.m4
@@ -0,0 +1,32 @@
+# wint_t.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+   before <wchar.h>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';]],
+          [[]])],
+       [gt_cv_c_wint_t=yes],
+       [gt_cv_c_wint_t=no])])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+  fi
+])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
new file mode 100644
index 0000000..16764e8
--- /dev/null
+++ b/m4/xsize.m4
@@ -0,0 +1,12 @@
+# xsize.m4 serial 5
+dnl Copyright (C) 2003-2004, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_CHECK_HEADERS([stdint.h])
+])
diff --git a/missing b/missing
index f62bbae..c6e3795 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -210,6 +210,6 @@ exit $st
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/po/ChangeLog b/po/ChangeLog
deleted file mode 100644
index e69de29..0000000
diff --git a/po/LINGUAS b/po/LINGUAS
deleted file mode 100644
index e69de29..0000000
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index fcd2c3b..38c293d 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,220 +1,482 @@
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
-# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
 #
-# This file may be copied and used freely without restrictions.  It may
-# be used in projects which are not available under a GNU Public License,
-# but which still want to provide support for the GNU gettext functionality.
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without any warranty.
 #
-# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
-#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
-#
-# - Modified by jacob berkman <jacob at ximian.com> to install
-#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey.pwns at gmail.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
+# Origin: gettext-0.19.8
+GETTEXT_MACRO_VERSION = 0.19
 
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 
-SHELL = @SHELL@
+SED = @SED@
+SHELL = /bin/sh
+ at SET_MAKE@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
 VPATH = @srcdir@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-datadir = @datadir@
 datarootdir = @datarootdir@
-libdir = @libdir@
+datadir = @datadir@
 localedir = @localedir@
-subdir = po
-install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p at .
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
+gettextsrcdir = $(datadir)/gettext/po
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT   = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+# When building gettext-tools, we prefer to use the built programs
+# rather than installed programs.  However, we can't do that when we
+# are cross compiling.
+CROSS_COMPILING = @CROSS_COMPILING@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
 
-USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+POTFILES = \
 
-POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+CATALOGS = @CATALOGS@
 
-DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
 
-POTFILES = \
-# This comment gets stripped out
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 
-CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+# Makevars gets inserted here. (Don't remove this line!)
 
 .SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
-
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
-INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
-INTLTOOL__v_MSGFMT_0 = @echo "  MSGFMT" $@;
-
-.po.pox:
-	$(MAKE) $(GETTEXT_PACKAGE).pot
-	$(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
 
 .po.mo:
-	$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
+	@echo "$(MSGFMT) -c -o $@ $<"; \
+	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
 
 .po.gmo:
-	$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
-	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+	@lang=`echo $* | sed -e 's,.*/,,'`; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
 
-.po.cat:
-	sed -f ../intl/po2msg.sed < $< > $*.msg \
-	  && rm -f $@ && gencat $@ $*.msg
+.sin.sed:
+	sed -e '/^#/d' $< > t-$@
+	mv t-$@ $@
 
 
 all: all- at USE_NLS@
 
-all-yes: $(CATALOGS)
+all-yes: stamp-po
 all-no:
 
-$(GETTEXT_PACKAGE).pot: $(POTFILES)
-	$(GENPOT)
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+CHECK_MACRO_VERSION = \
+	test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+	  || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+	       exit 1; \
+	     }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+	@$(CHECK_MACRO_VERSION)
+	test ! -f $(srcdir)/$(DOMAIN).pot || \
+	  test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
+	  echo "touch stamp-po" && \
+	  echo timestamp > stamp-poT && \
+	  mv stamp-poT stamp-po; \
+	}
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+	package_gnu="$(PACKAGE_GNU)"; \
+	test -n "$$package_gnu" || { \
+	  if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+		 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+			       -size -10000000c -exec grep 'GNU @PACKAGE@' \
+			       /dev/null '{}' ';' 2>/dev/null; \
+	       else \
+		 LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+	       fi; \
+	     } | grep -v 'libtool:' >/dev/null; then \
+	     package_gnu=yes; \
+	   else \
+	     package_gnu=no; \
+	   fi; \
+	}; \
+	if test "$$package_gnu" = "yes"; then \
+	  package_prefix='GNU '; \
+	else \
+	  package_prefix=''; \
+	fi; \
+	if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+	  msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+	else \
+	  msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+	fi; \
+	case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --files-from=$(srcdir)/POTFILES.in \
+	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	      --msgid-bugs-address="$$msgid_bugs_address" \
+	    ;; \
+	  *) \
+	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --files-from=$(srcdir)/POTFILES.in \
+	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	      --package-name="$${package_prefix}@PACKAGE@" \
+	      --package-version='@VERSION@' \
+	      --msgid-bugs-address="$$msgid_bugs_address" \
+	    ;; \
+	esac
+	test ! -f $(DOMAIN).po || { \
+	  if test -f $(srcdir)/$(DOMAIN).pot-header; then \
+	    sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
+	    cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
+	    rm -f $(DOMAIN).1po; \
+	  fi; \
+	  if test -f $(srcdir)/$(DOMAIN).pot; then \
+	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+	    sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+	    if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+	    else \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+	      mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	    fi; \
+	  else \
+	    mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	  fi; \
+	}
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+	$(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(POFILESDEPS)
+	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+	if test -f "$(srcdir)/$${lang}.po"; then \
+	  test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
+	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+	  cd $(srcdir) \
+	    && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	           '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+	           *) \
+	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+	         esac; \
+	       }; \
+	else \
+	  $(MAKE) $${lang}.po-create; \
+	fi
+
 
-install: install-data
+install: install-exec install-data
+install-exec:
 install-data: install-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    $(INSTALL_DATA) $(srcdir)/$$file \
+			    $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	  for file in Makevars; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
 install-data-no: all
 install-data-yes: all
-	linguas="$(USE_LINGUAS)"; \
-	for lang in $$linguas; do \
-	  dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
-	  $(mkdir_p) $$dir; \
-	  if test -r $$lang.gmo; then \
-	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
-	  else \
-	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-	    echo "installing $(srcdir)/$$lang.gmo as" \
-		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
-	  fi; \
-	  if test -r $$lang.gmo.m; then \
-	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
-	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
-	  else \
-	    if test -r $(srcdir)/$$lang.gmo.m ; then \
-	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
-		$$dir/$(GETTEXT_PACKAGE).mo.m; \
-	      echo "installing $(srcdir)/$$lang.gmo.m as" \
-		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
-	    else \
-	      true; \
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+	  $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+	  echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
 	    fi; \
-	  fi; \
+	  done; \
 	done
 
-# Empty stubs to satisfy archaic automake needs
-dvi info ctags tags CTAGS TAGS ID:
-
-# Define this as empty until I found a useful application.
-install-exec installcheck:
+install-strip: install
 
-uninstall:
-	linguas="$(USE_LINGUAS)"; \
-	for lang in $$linguas; do \
-	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
-	  rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	else \
+	  : ; \
+	fi
+installdirs-data-no:
+installdirs-data-yes:
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	    fi; \
+	  done; \
 	done
 
-check: all $(GETTEXT_PACKAGE).pot
-	rm -f missing notexist
-	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
-	if [ -r missing -o -r notexist ]; then \
-	  exit 1; \
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data- at USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
 	fi
+uninstall-data-no:
+uninstall-data-yes:
+	catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+	    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	  done; \
+	done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
 
 mostlyclean:
-	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
-	rm -f .intltool-merge-cache
+	rm -f remove-potcdate.sed
+	rm -f stamp-poT
+	rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+	rm -fr *.o
 
 clean: mostlyclean
 
 distclean: clean
-	rm -f Makefile Makefile.in POTFILES stamp-it
-	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+	rm -f Makefile Makefile.in POTFILES *.mo
 
 maintainer-clean: distclean
 	@echo "This command is intended for maintainers to use;"
 	@echo "it deletes files that may require special tools to rebuild."
-	rm -f Makefile.in.in
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
+	rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+	test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
+	@$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
 	dists="$(DISTFILES)"; \
-	extra_dists="$(EXTRA_DISTFILES)"; \
-	for file in $$extra_dists; do \
-	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  dists="$$dists Makevars.template"; \
+	fi; \
+	if test -f $(srcdir)/$(DOMAIN).pot; then \
+	  dists="$$dists $(DOMAIN).pot stamp-po"; \
+	fi; \
+	if test -f $(srcdir)/ChangeLog; then \
+	  dists="$$dists ChangeLog"; \
+	fi; \
+	for i in 0 1 2 3 4 5 6 7 8 9; do \
+	  if test -f $(srcdir)/ChangeLog.$$i; then \
+	    dists="$$dists ChangeLog.$$i"; \
+	  fi; \
 	done; \
+	if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
 	for file in $$dists; do \
-	  test -f $$file || file="$(srcdir)/$$file"; \
-	  ln $$file $(distdir) 2> /dev/null \
-	    || cp -p $$file $(distdir); \
+	  if test -f $$file; then \
+	    cp -p $$file $(distdir) || exit 1; \
+	  else \
+	    cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+	  fi; \
 	done
 
 update-po: Makefile
-	$(MAKE) $(GETTEXT_PACKAGE).pot
+	$(MAKE) $(DOMAIN).pot-update
+	test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+	$(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+	@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+	echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+	exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+	@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+	if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
 	tmpdir=`pwd`; \
-	linguas="$(USE_LINGUAS)"; \
-	for lang in $$linguas; do \
-	  echo "$$lang:"; \
-	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
-	  if $$result; then \
-	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
-	      rm -f $$tmpdir/$$lang.new.po; \
-            else \
-	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
-	        :; \
-	      else \
-	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
-	        rm -f $$tmpdir/$$lang.new.po; \
-	        exit 1; \
-	      fi; \
-	    fi; \
-	  else \
-	    echo "msgmerge for $$lang.gmo failed!"; \
+	echo "$$lang:"; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	cd $(srcdir); \
+	if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	       '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+	         $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+	       *) \
+	         $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+	     esac; \
+	   }; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
 	  fi; \
-	done
-
-Makefile POTFILES: stamp-it
-	@if test ! -f $@; then \
-	  rm -f stamp-it; \
-	  $(MAKE) stamp-it; \
+	else \
+	  echo "msgmerge for $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
 	fi
 
-stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+	@:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
 	cd $(top_builddir) \
-	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
-	       $(SHELL) ./config.status
+	  && @SHELL@ ./config.status $(subdir)/$@.in po-directories
+
+force:
 
 # Tell versions [3.59,3.63) of GNU make not to export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..5aadcec
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,78 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Neoklis Kyriazis nkcyham at yahoo.com
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty.  If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = nkcyham at yahoo.com
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context.  Possible values are "yes" and "no".  Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+#   --previous            to keep previous msgids of translated messages,
+#   --quiet               to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed.  Possible values are "yes" and "no".  Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = yes
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist".  Possible values are "yes" and
+# "no".  Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b48df4f..ce417ca 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,4 @@
 # List of source files containing translatable strings.
-
-src/main.c
-src/interface.c
 src/calculations.c
 src/callback_func.c
 src/callbacks.c
@@ -9,12 +6,18 @@ src/cmnd_edit.c
 src/draw_radiation.c
 src/geom_edit.c
 src/geometry.c
+src/gnuplot.c
 src/ground.c
+src/input.c
+src/main.c
 src/matrix.c
-src/misc.c
 src/nec2_model.c
+src/network.c
 src/plot_freqdata.c
 src/radiation.c
-src/support.c
+src/somnec.c
+src/utils.c
 src/xnec2c.c
-xnec2c.glade
+src/common.h
+xnec2c/xnec2c.glade
+
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..baf6528
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,58 @@
+# This file, Rules-quot, can be copied and used freely without restrictions.
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en at quot.header en at boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en at quot.po-create:
+	$(MAKE) en at quot.po-update
+en at boldquot.po-create:
+	$(MAKE) en at boldquot.po-update
+
+en at quot.po-update: en at quot.po-update-en
+en at boldquot.po-update: en at boldquot.po-update-en
+
+.insert-header.po-update-en:
+	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+	if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	ll=`echo $$lang | sed -e 's/@.*//'`; \
+	LC_ALL=C; export LC_ALL; \
+	cd $(srcdir); \
+	if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
+	   | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
+	   { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
+	       $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
+	       ;; \
+	     *) \
+	       $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
+	       ;; \
+	     esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
+	     ; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	else \
+	  echo "creation of $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
+	fi
+
+en at quot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en at quot.header/g' $(srcdir)/insert-header.sin > en at quot.insert-header
+
+en at boldquot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en at boldquot.header/g' $(srcdir)/insert-header.sin > en at boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+	rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“/g
+s/”/”/g
+s/‘/‘/g
+s/’/’/g
diff --git a/po/en at boldquot.header b/po/en at boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/po/en at boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en at quot.header b/po/en at quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/po/en at quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/po/stamp-po
@@ -0,0 +1 @@
+timestamp
diff --git a/po/xnec2c.pot b/po/xnec2c.pot
new file mode 100644
index 0000000..1ec9602
--- /dev/null
+++ b/po/xnec2c.pot
@@ -0,0 +1,2437 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Neoklis Kyriazis nkcyham at yahoo.com
+# This file is distributed under the same license as the xnec2c package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: xnec2c 3.6.1-beta\n"
+"Report-Msgid-Bugs-To: nkcyham at yahoo.com\n"
+"POT-Creation-Date: 2017-12-23 08:21+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/calculations.c:116
+msgid "Segment connection error in tbf()"
+msgstr ""
+
+#: src/calculations.c:1055
+msgid "Segment connection error in sbf()"
+msgstr ""
+
+#: src/calculations.c:1278
+msgid "Segment connention error in trio()"
+msgstr ""
+
+#: src/callback_func.c:242
+msgid ""
+"The frequency loop is running\n"
+"Really end operation?"
+msgstr ""
+
+#: src/callback_func.c:246
+msgid ""
+"The frequency loop is running\n"
+"Really close this window?"
+msgstr ""
+
+#: src/callback_func.c:499
+msgid ""
+"Not available for Incident Field or\n"
+"Elementary Current Source Excitation.\n"
+"(Excitation Types 1 to 4)"
+msgstr ""
+
+#: src/callback_func.c:688
+msgid "View Currents"
+msgstr ""
+
+#: src/callback_func.c:714 src/callback_func.c:781
+msgid "View Geometry"
+msgstr ""
+
+#: src/callback_func.c:755
+msgid "View Charges"
+msgstr ""
+
+#: src/callback_func.c:828
+msgid "PNG images (*.png)"
+msgstr ""
+
+#: src/callback_func.c:830
+msgid "GNUplot files (*.gplot)"
+msgstr ""
+
+#: src/callback_func.c:832
+msgid "NEC2 files (*.nec)"
+msgstr ""
+
+#: src/callbacks.c:51 src/callbacks.c:181
+msgid "Really quit xnec2c?"
+msgstr ""
+
+#: src/callbacks.c:63
+msgid ""
+"A new NEC2 input file may not be created\n"
+"while the Frequency Loop is running"
+msgstr ""
+
+#: src/callbacks.c:70
+msgid ""
+"Saving already open NEC2 file\n"
+"before opening new default file"
+msgstr ""
+
+#: src/callbacks.c:94
+msgid ""
+"A new NEC2 input file may not be opened\n"
+"while the Frequency Loop is running"
+msgstr ""
+
+#: src/callbacks.c:631 src/callbacks.c:845
+msgid "Really close window?"
+msgstr ""
+
+#: src/callbacks.c:687 src/callbacks.c:894
+msgid "untitled.png"
+msgstr ""
+
+#: src/callbacks.c:704 src/callbacks.c:910
+msgid "untitled.gplot"
+msgstr ""
+
+#: src/callbacks.c:1296
+msgid "Really quit Xnec2c?"
+msgstr ""
+
+#: src/callbacks.c:1588
+msgid "No open NEC2 input file"
+msgstr ""
+
+#: src/callbacks.c:1616 src/callbacks.c:1666 src/callbacks.c:1693
+msgid "untitled.nec"
+msgstr ""
+
+#: src/callbacks.c:1624
+msgid "Really close NEC2 Editor?"
+msgstr ""
+
+#: src/callbacks.c:1653 src/callbacks.c:1684
+msgid ""
+"NEC2 Editor's data may not be saved\n"
+"while the Frequency Loop is running"
+msgstr ""
+
+#: src/cmnd_edit.c:79
+msgid ""
+"Get_Command_Data(): Error reading\n"
+"row data: Invalid list iterator"
+msgstr ""
+
+#: src/cmnd_edit.c:115
+msgid ""
+"Set_Command_Data(): Error writing row data\n"
+"Please re-select row"
+msgstr ""
+
+#: src/cmnd_edit.c:430 xnec2c/xnec2c.glade:305 xnec2c/xnec2c.glade:1311
+#: xnec2c/xnec2c.glade:3668 xnec2c/xnec2c.glade:13022
+msgid "Tag Number"
+msgstr ""
+
+#: src/cmnd_edit.c:431 xnec2c/xnec2c.glade:1324
+msgid "Segment Number"
+msgstr ""
+
+#: src/cmnd_edit.c:432
+msgid "Voltage Real Part"
+msgstr ""
+
+#: src/cmnd_edit.c:433
+msgid "Voltage Imaginary Part"
+msgstr ""
+
+#: src/cmnd_edit.c:434 src/cmnd_edit.c:1597
+msgid "Normalization Factor"
+msgstr ""
+
+#: src/cmnd_edit.c:435 src/cmnd_edit.c:436 src/cmnd_edit.c:437
+#: src/cmnd_edit.c:473 src/cmnd_edit.c:474 src/cmnd_edit.c:1834
+#: src/cmnd_edit.c:1845 src/cmnd_edit.c:1846
+msgid "  ** NOT USED **"
+msgstr ""
+
+#: src/cmnd_edit.c:455
+msgid "Num of Theta Angles"
+msgstr ""
+
+#: src/cmnd_edit.c:456
+msgid "Num of Phi Angles"
+msgstr ""
+
+#: src/cmnd_edit.c:457
+msgid "Theta Angle (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:458
+msgid "Phi Angle (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:459
+msgid "Eta Angle (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:460
+msgid "Theta Increment (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:461
+msgid "Phi Increment (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:462
+msgid "Minor/Major Axis"
+msgstr ""
+
+#: src/cmnd_edit.c:475
+msgid "X Position (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:476
+msgid "Y Position (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:477
+msgid "Z Position (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:478
+msgid "alpha Angle (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:479
+msgid "beta Angle (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:480
+msgid "Current Moment (A.m)"
+msgstr ""
+
+#: src/cmnd_edit.c:1574
+msgid "Points in Z"
+msgstr ""
+
+#: src/cmnd_edit.c:1575
+msgid "Initial Z (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:1576
+msgid "Increment in Z"
+msgstr ""
+
+#: src/cmnd_edit.c:1577
+msgid "Field Point R (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:1585 xnec2c/xnec2c.glade:8444
+msgid "Points in Phi"
+msgstr ""
+
+#: src/cmnd_edit.c:1586 xnec2c/xnec2c.glade:8368
+msgid "Initial Theta (deg)"
+msgstr ""
+
+#: src/cmnd_edit.c:1587 src/cmnd_edit.c:2504 xnec2c/xnec2c.glade:8381
+msgid "Increment in Theta"
+msgstr ""
+
+#: src/cmnd_edit.c:1588
+msgid "R (m) (Optional)"
+msgstr ""
+
+#: src/cmnd_edit.c:1601
+msgid "** NOT USED **"
+msgstr ""
+
+#: src/cmnd_edit.c:1808 src/cmnd_edit.c:1832
+msgid "Resistance Ohm"
+msgstr ""
+
+#: src/cmnd_edit.c:1809
+msgid "Inductance uH"
+msgstr ""
+
+#: src/cmnd_edit.c:1810
+msgid "Capacitance pF"
+msgstr ""
+
+#: src/cmnd_edit.c:1820
+msgid "Resistance Ohm/m"
+msgstr ""
+
+#: src/cmnd_edit.c:1821
+msgid "Inductance uH/m"
+msgstr ""
+
+#: src/cmnd_edit.c:1822
+msgid "Capacitance pF/m"
+msgstr ""
+
+#: src/cmnd_edit.c:1833
+msgid "Reactance Ohm"
+msgstr ""
+
+#: src/cmnd_edit.c:1844 xnec2c/xnec2c.glade:463 xnec2c/xnec2c.glade:3968
+#: xnec2c/xnec2c.glade:13352
+msgid "Conductivity S/m"
+msgstr ""
+
+#: src/cmnd_edit.c:2480
+msgid "Points in X-axis"
+msgstr ""
+
+#: src/cmnd_edit.c:2481
+msgid "Points in Y-axis"
+msgstr ""
+
+#: src/cmnd_edit.c:2482
+msgid "Points in Z-axis"
+msgstr ""
+
+#: src/cmnd_edit.c:2483
+msgid "First Point X (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2484
+msgid "First Point Y (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2485
+msgid "First Point Z (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2486
+msgid "Increment in X (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2487
+msgid "Increment in Y (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2488
+msgid "Increment in Z (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2496
+msgid "Points along R"
+msgstr ""
+
+#: src/cmnd_edit.c:2497
+msgid "Points along Phi"
+msgstr ""
+
+#: src/cmnd_edit.c:2498
+msgid "Points along Theta"
+msgstr ""
+
+#: src/cmnd_edit.c:2499
+msgid "First Point R (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2500
+msgid "First Point Phi"
+msgstr ""
+
+#: src/cmnd_edit.c:2501
+msgid "First Point Theta"
+msgstr ""
+
+#: src/cmnd_edit.c:2502
+msgid "Increment in R (m)"
+msgstr ""
+
+#: src/cmnd_edit.c:2503 xnec2c/xnec2c.glade:8470
+msgid "Increment in Phi"
+msgstr ""
+
+#: src/draw_radiation.c:960
+msgid "Total Gain"
+msgstr ""
+
+#: src/draw_radiation.c:961
+msgid "Horizontal Polarization"
+msgstr ""
+
+#: src/draw_radiation.c:962
+msgid "Vertical Polarization"
+msgstr ""
+
+#: src/draw_radiation.c:963
+msgid "RH Circular Polarization"
+msgstr ""
+
+#: src/draw_radiation.c:964
+msgid "LH Circular Polarization"
+msgstr ""
+
+#: src/draw_radiation.c:969 xnec2c/xnec2c.glade:9814
+msgid "Linear Power"
+msgstr ""
+
+#: src/draw_radiation.c:970 xnec2c/xnec2c.glade:9824
+msgid "Linear Voltage"
+msgstr ""
+
+#: src/draw_radiation.c:971
+msgid "ARRL Scale"
+msgstr ""
+
+#: src/draw_radiation.c:972
+msgid "Logarithmic Scale"
+msgstr ""
+
+#: src/draw_radiation.c:981 xnec2c/xnec2c.glade:10616
+msgid "Radiation Patterns"
+msgstr ""
+
+#: src/draw_radiation.c:984
+msgid "Radiation Pattern: - "
+msgstr ""
+
+#: src/draw_radiation.c:991
+msgid "Near Fields:"
+msgstr ""
+
+#: src/draw_radiation.c:993
+msgid " - E Field"
+msgstr ""
+
+#: src/draw_radiation.c:995
+msgid " - H Field"
+msgstr ""
+
+#: src/draw_radiation.c:997
+msgid " - Poynting Vector"
+msgstr ""
+
+#: src/draw_radiation.c:1007
+msgid "Frequency Data Plots - "
+msgstr ""
+
+#: src/geom_edit.c:79 src/geom_edit.c:1733 src/geom_edit.c:1983
+#: src/geom_edit.c:2372
+msgid ""
+"Error reading row data\n"
+"Invalid list iterator"
+msgstr ""
+
+#: src/geom_edit.c:115 src/geom_edit.c:148
+msgid ""
+"Error writing row data\n"
+"Please re-select row"
+msgstr ""
+
+#: src/geom_edit.c:537
+msgid ""
+"GC card preceded by GW card\n"
+"with non-zero wire radius"
+msgstr ""
+
+#: src/geom_edit.c:541
+msgid "No GW card before GC card"
+msgstr ""
+
+#: src/geom_edit.c:567
+msgid ""
+"No GC card after a GW card\n"
+"with a zero wire radius"
+msgstr ""
+
+#: src/geom_edit.c:573
+msgid ""
+"GC card follows a GW card\n"
+"with non-zero wire radius"
+msgstr ""
+
+#: src/geom_edit.c:953
+msgid ""
+"SC card preceded by SP card\n"
+"with arbitrary patch type"
+msgstr ""
+
+#: src/geom_edit.c:965
+msgid "No SP or SM card before SC card"
+msgstr ""
+
+#: src/geom_edit.c:985
+msgid ""
+"No SC card after an SP card\n"
+"with non-arbitrary patch type"
+msgstr ""
+
+#: src/geom_edit.c:992
+msgid ""
+"SC card follows an SP card\n"
+"with arbitrary patch type"
+msgstr ""
+
+#: src/geom_edit.c:1005
+msgid "No SC card after an SM card"
+msgstr ""
+
+#: src/geom_edit.c:1075 xnec2c/xnec2c.glade:7192
+msgid "Center - X"
+msgstr ""
+
+#: src/geom_edit.c:1077 xnec2c/xnec2c.glade:7252
+msgid "Center - Y"
+msgstr ""
+
+#: src/geom_edit.c:1079 xnec2c/xnec2c.glade:7312
+msgid "Center - Z"
+msgstr ""
+
+#: src/geom_edit.c:1081 xnec2c/xnec2c.glade:7222
+msgid "Normal - Elev."
+msgstr ""
+
+#: src/geom_edit.c:1083 xnec2c/xnec2c.glade:7282
+msgid "Normal - Azim."
+msgstr ""
+
+#: src/geom_edit.c:1085 xnec2c/xnec2c.glade:7342
+msgid "Patch Area"
+msgstr ""
+
+#: src/geom_edit.c:1090
+msgid "Corner 1 - X"
+msgstr ""
+
+#: src/geom_edit.c:1092
+msgid "Corner 1 - Y"
+msgstr ""
+
+#: src/geom_edit.c:1094
+msgid "Corner 1 - Z"
+msgstr ""
+
+#: src/geom_edit.c:1096
+msgid "Corner 2 - X"
+msgstr ""
+
+#: src/geom_edit.c:1098
+msgid "Corner 2 - Y"
+msgstr ""
+
+#: src/geom_edit.c:1100
+msgid "Corner 2 - Z"
+msgstr ""
+
+#: src/geom_edit.c:2465
+msgid "NEC2 editor window not open"
+msgstr ""
+
+#: src/geometry.c:64
+msgid "arc(): Number of segments < 1"
+msgstr ""
+
+#: src/geometry.c:117
+msgid "arc(): Arc angle exceeds 360 degrees"
+msgstr ""
+
+#: src/geometry.c:271
+msgid "Error in conect(): np > n"
+msgstr ""
+
+#: src/geometry.c:309 src/geometry.c:361
+msgid ""
+"conect(): Geometry data error\n"
+"Segment extends below ground"
+msgstr ""
+
+#: src/geometry.c:373
+msgid ""
+"conect(): Geometry data error\n"
+"Segment lies in ground plane"
+msgstr ""
+
+#: src/geometry.c:473
+msgid "conect(): Error: ipsym = 0"
+msgstr ""
+
+#: src/geometry.c:722
+msgid ""
+"isegno(): Parameter specifying segment\n"
+"position in a group of equal tags is zero"
+msgstr ""
+
+#: src/geometry.c:756
+msgid "isegno(): Segment tag number error"
+msgstr ""
+
+#: src/geometry.c:1069
+msgid ""
+"patch(): Corners of quadrilateral\n"
+"patch do not lie in a plane"
+msgstr ""
+
+#: src/geometry.c:1202 src/geometry.c:1306 src/geometry.c:1412
+msgid ""
+"reflc(): Geometry data error\n"
+"Segment lies in plane of symmetry"
+msgstr ""
+
+#: src/geometry.c:1253 src/geometry.c:1357 src/geometry.c:1461
+msgid ""
+"reflc(): Geometry data error\n"
+"Patch lies in plane of symmetry"
+msgstr ""
+
+#: src/gnuplot.c:62
+#, c-format
+msgid "# Gain and F/B Ratio vs Frequency\n"
+msgstr ""
+
+#: src/gnuplot.c:138
+#, c-format
+msgid "# Direction of gain in theta and phi\n"
+msgstr ""
+
+#: src/gnuplot.c:161
+#, c-format
+msgid "# VSWR vs Frequency\n"
+msgstr ""
+
+#: src/gnuplot.c:182
+#, c-format
+msgid "# Z real & Z imaginary vs Frequency\n"
+msgstr ""
+
+#: src/gnuplot.c:194
+#, c-format
+msgid "# Z magnitude & Z phase vs Frequency\n"
+msgstr ""
+
+#: src/gnuplot.c:289
+#, c-format
+msgid "# Near E field\n"
+msgstr ""
+
+#: src/gnuplot.c:312
+#, c-format
+msgid "# Near H field\n"
+msgstr ""
+
+#: src/gnuplot.c:359
+#, c-format
+msgid "# Poynting Vector\n"
+msgstr ""
+
+#: src/gnuplot.c:428
+#, c-format
+msgid "# Radiation Pattern"
+msgstr ""
+
+#: src/gnuplot.c:494
+#, c-format
+msgid "# structure patch segmenets\n"
+msgstr ""
+
+#: src/gnuplot.c:519
+#, c-format
+msgid "# structure wire segmenets\n"
+msgstr ""
+
+#: src/ground.c:88
+msgid "rom2(): b less than a"
+msgstr ""
+
+#: src/input.c:65
+msgid ""
+"Read_Comments(): Error reading Comments\n"
+"Unexpected EOF (End of File)"
+msgstr ""
+
+#: src/input.c:76
+msgid ""
+"Read_Comments(): Error reading Comments\n"
+"Comment mnemonic short or missing"
+msgstr ""
+
+#: src/input.c:87
+msgid ""
+"Read_Comments():\n"
+" Error reading input file\n"
+"Comment mnemonic incorrect"
+msgstr ""
+
+#: src/input.c:114
+msgid ""
+"Tag_Seg_Error(): Geometry data error\n"
+"Tag number is less than 1"
+msgstr ""
+
+#: src/input.c:124
+msgid ""
+"Tag_Seg_Error(): Geometry data error\n"
+"Number of segments is less than 1"
+msgstr ""
+
+#: src/input.c:200
+msgid ""
+"datagn(): Geometry data error\n"
+"No GC card for tapered wire"
+msgstr ""
+
+#: src/input.c:208
+msgid "datagn(): Geometry GC data card error"
+msgstr ""
+
+#: src/input.c:225
+msgid "datagn(): Geometry GX data card error"
+msgstr ""
+
+#: src/input.c:249
+msgid "datagn(): Geometry GR data card error"
+msgstr ""
+
+#: src/input.c:306
+msgid "No geometry data cards"
+msgstr ""
+
+#: src/input.c:352
+msgid "datagn(): Segment data error"
+msgstr ""
+
+#: src/input.c:388
+msgid "datagn(): Move GM data card error"
+msgstr ""
+
+#: src/input.c:405 src/input.c:448 src/input.c:466 src/input.c:485
+#: src/input.c:494
+msgid "datagn(): Patch data card error"
+msgstr ""
+
+#: src/input.c:428
+msgid "datagn(): Patch data error"
+msgstr ""
+
+#: src/input.c:543
+msgid ""
+"datagn(): \"GF\" card (NGF solution)\n"
+"is not supported"
+msgstr ""
+
+#: src/input.c:549
+msgid "datagn(): Ignoring CM card in geometry"
+msgstr ""
+
+#: src/input.c:559
+msgid "datagn(): Geometry data card error"
+msgstr ""
+
+#: src/input.c:746
+msgid "Read_Commands(): Ignoring CM card in commands"
+msgstr ""
+
+#: src/input.c:751
+msgid ""
+"Read_Commands(): CP card is ignored\n"
+"Coupling calculation not implemented"
+msgstr ""
+
+#: src/input.c:926
+msgid ""
+"Read_Commands(): Theta > 90 deg with ground specified\n"
+"Please check RP card data and correct"
+msgstr ""
+
+#: src/input.c:938
+msgid ""
+"Read_Commands(): radial wire g.s. approximation\n"
+"may not be used with Sommerfeld ground option"
+msgstr ""
+
+#: src/input.c:993
+msgid ""
+"Read_Commands(): Data fault on loading card\n"
+"itag step1 is greater than itag step2"
+msgstr ""
+
+#: src/input.c:1129
+msgid ""
+"Read_Commands(): Transmission Line impedance = 0\n"
+"is not valid. Please correct NT or TL card"
+msgstr ""
+
+#: src/input.c:1140
+msgid ""
+"Read_Commands(): Segment number\n"
+"error in NT or TL card"
+msgstr ""
+
+#: src/input.c:1164
+msgid ""
+"Read_Commands(): PQ and PT cards are ignored\n"
+"Printing to file not implemented"
+msgstr ""
+
+#: src/input.c:1174
+msgid ""
+"Read_Commands(): Surface wave option (I1=1)\n"
+"of RP command not implemented"
+msgstr ""
+
+#: src/input.c:1200
+msgid ""
+"Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"
+"of RP command not supported"
+msgstr ""
+
+#: src/input.c:1220
+msgid ""
+"Read_Commands(): Theta > 90 deg. with ground specified\n"
+"Please check RP card data and correct"
+msgstr ""
+
+#: src/input.c:1273
+msgid ""
+"Read_Commands(): Faulty data card\n"
+"label after geometry section"
+msgstr ""
+
+#: src/input.c:1326
+msgid ""
+"readmn(): Command data card error\n"
+"Unexpected EOF while reading input file\n"
+"Uppending a default EN card"
+msgstr ""
+
+#: src/input.c:1343
+msgid ""
+"readmn(): Command data card error\n"
+"Mnemonic code too short or missing"
+msgstr ""
+
+#: src/input.c:1390
+msgid ""
+"readmn(): Command data card error\n"
+"Spurious character in command card"
+msgstr ""
+
+#: src/input.c:1481
+msgid ""
+"readgm(): Geometry data card error\n"
+"Unexpected EOF while reading input file\n"
+"Uppending a default GE card"
+msgstr ""
+
+#: src/input.c:1498
+msgid ""
+"readgm(): Geometry data card error\n"
+"Card's mnemonic code too short or missing"
+msgstr ""
+
+#: src/input.c:1546
+msgid ""
+"readmn(): Geometry data card error\n"
+"Spurious character in command card"
+msgstr ""
+
+#: src/main.c:61
+#, c-format
+msgid "xnec2c: input file name too long (>80 char)\n"
+msgstr ""
+
+#: src/main.c:94
+#, c-format
+msgid "xnec2c: input file path name too long (>80 char)\n"
+msgstr ""
+
+#: src/main.c:126 src/main.c:135
+#, c-format
+msgid "xnec2c: exiting after fatal error (pipe() failed)"
+msgstr ""
+
+#: src/main.c:145
+#, c-format
+msgid "xnec2c: exiting after fatal error (fork() failed)"
+msgstr ""
+
+#: src/main.c:388
+#, c-format
+msgid "xnec2c: exiting via user interrupt\n"
+msgstr ""
+
+#: src/main.c:392
+#, c-format
+msgid "xnec2c: segmentation fault, exiting\n"
+msgstr ""
+
+#: src/main.c:396
+#, c-format
+msgid "xnec2c: floating point exception, exiting\n"
+msgstr ""
+
+#: src/main.c:400
+#, c-format
+msgid "xnec2c: abort signal received, exiting\n"
+msgstr ""
+
+#: src/main.c:404
+#, c-format
+msgid "xnec2c: termination request received, exiting\n"
+msgstr ""
+
+#: src/main.c:415
+#, c-format
+msgid "xnec2c: not forked, ignoring SIGCHLD from pid %d\n"
+msgstr ""
+
+#: src/main.c:423
+#, c-format
+msgid "xnec2c: child process pid %d exited\n"
+msgstr ""
+
+#: src/main.c:432
+#, c-format
+msgid "xnec2c: default exit with signal: %d\n"
+msgstr ""
+
+#: src/matrix.c:1270
+msgid "fblock(): Symmetry error"
+msgstr ""
+
+#: src/nec2_model.c:71 src/nec2_model.c:75 src/nec2_model.c:79
+msgid "Card"
+msgstr ""
+
+#: src/nec2_model.c:71 xnec2c/xnec2c.glade:5854
+msgid "Comments"
+msgstr ""
+
+#: src/nec2_model.c:156
+msgid "--- NEC2 Input File created or edited by "
+msgstr ""
+
+#: src/nec2_model.c:171
+msgid "--- End Comments ---"
+msgstr ""
+
+#: src/nec2_model.c:309
+msgid ""
+"List_Comments():\n"
+"Error reading input file\n"
+"Unexpected EOF (End of File)"
+msgstr ""
+
+#: src/nec2_model.c:316
+msgid ""
+"List_Comments():\n"
+"Error reading input file\n"
+"Comment mnemonic short or missing"
+msgstr ""
+
+#: src/nec2_model.c:573
+msgid "End Comments"
+msgstr ""
+
+#: src/nec2_model.c:602
+msgid ""
+"Cannot save treeview data\n"
+"Please use the Save button\n"
+"to specify a file path"
+msgstr ""
+
+#: src/network.c:648
+msgid "load(): Improper load type chose"
+msgstr ""
+
+#: src/network.c:739
+msgid ""
+"load(): Loading data card\n"
+"Tag number mismatch error"
+msgstr ""
+
+#: src/plot_freqdata.c:600
+msgid "Draw_Graph():Memory allocation for points failed"
+msgstr ""
+
+#: src/plot_freqdata.c:1018 src/plot_freqdata.c:1039 src/plot_freqdata.c:1065
+msgid "Raw Gain dbi"
+msgstr ""
+
+#: src/plot_freqdata.c:1021
+msgid "Max Gain & Net Gain vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1022
+msgid "Net Gain dbi"
+msgstr ""
+
+#: src/plot_freqdata.c:1029 src/plot_freqdata.c:1040
+msgid "Max Gain & F/B Ratio vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1041
+msgid "F/B Ratio db"
+msgstr ""
+
+#: src/plot_freqdata.c:1051
+msgid "Rad Angle - deg"
+msgstr ""
+
+#: src/plot_freqdata.c:1052
+msgid "Max Gain Direction vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1053
+msgid "Phi - deg"
+msgstr ""
+
+#: src/plot_freqdata.c:1066
+msgid "Gain in Viewer Direction vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1092
+msgid "Net gain dbi"
+msgstr ""
+
+#: src/plot_freqdata.c:1113 xnec2c/xnec2c.glade:9241
+msgid "VSWR"
+msgstr ""
+
+#: src/plot_freqdata.c:1114
+msgid "VSWR vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1124
+msgid "Plot_Frequency_Data():Memory allocation for vswr failed"
+msgstr ""
+
+#: src/plot_freqdata.c:1152
+msgid "Z-real"
+msgstr ""
+
+#: src/plot_freqdata.c:1153 src/plot_freqdata.c:1167
+msgid "Impedance vs Frequency"
+msgstr ""
+
+#: src/plot_freqdata.c:1154
+msgid "Z-imag"
+msgstr ""
+
+#: src/plot_freqdata.c:1166
+msgid "Z-magn"
+msgstr ""
+
+#: src/plot_freqdata.c:1168
+msgid "Z-phase"
+msgstr ""
+
+#: src/radiation.c:652
+msgid ""
+"rdpat(): Theta > 90 deg with ground specified\n"
+"Please check RP card data and correct"
+msgstr ""
+
+#: src/somnec.c:236
+msgid "hankel(): Hankel not valid for z = 0"
+msgstr ""
+
+#: src/somnec.c:748
+msgid "gshank(): No convergencn"
+msgstr ""
+
+#: src/utils.c:31
+#, c-format
+msgid ""
+"Usage: xnec2c <input-file-name>\n"
+"              [-i <input-file-name>]\n"
+"              [-j <number of processors in SMP machine>]\n"
+"              [-h: print this usage information and exit]\n"
+"              [-v: print xnec2c version number and exit]\n"
+msgstr ""
+
+#: src/utils.c:52
+#, c-format
+msgid "xnec2c: fatal: child process %d exiting\n"
+msgstr ""
+
+#: src/utils.c:211
+#, c-format
+msgid "Memory allocation denied %s\n"
+msgstr ""
+
+#: src/utils.c:230
+#, c-format
+msgid "Memory re-allocation denied %s\n"
+msgstr ""
+
+#: src/utils.c:266
+#, c-format
+msgid "xnec2c: %s: Failed to open file\n"
+msgstr ""
+
+#: src/xnec2c.c:133
+msgid "Ground_Parameters():Error in ground parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12
+msgid "(C) 2007-2017 Neoklis Kyriazis"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13
+msgid ""
+"xnec2c is an interactive graphical wrapper around a modified version of "
+"nec2c, which is itself a translation to C of the original FORTRAN NEC2 "
+"Numerical Electromagnetics Code.\n"
+"\n"
+"xnec2c can display frequency-dependent data (gain, input impedance, vswr "
+"etc) in a graphical format. It can also display radiation pattern data in a "
+"rotatable wire frame format and near-field (E, H, S vectors) in a grid "
+"format.\n"
+"\n"
+"xnec2c has a built-in NEC2 input file editor that makes it easier to create "
+"or edit antenna description files and specify NEC2 commands.\n"
+"\n"
+"PLEASE read the documantation in the doc/ sub-directory as xnec2c is not "
+"fully compatible with NEC2 input files and it works in different ways!"
+msgstr ""
+
+#. TRANSLATORS: Replace this string with your names, one name per line.
+#: xnec2c/xnec2c.glade:25
+msgid "translator-credits"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:69
+msgid "Near Field Animation"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:154
+msgid "Steps/Cycle"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:167
+msgid "Animate Freq (Hz)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:280
+msgid "Arc Element (GA card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:318 xnec2c/xnec2c.glade:13111
+msgid "No. Segments"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:331 xnec2c/xnec2c.glade:3847 xnec2c/xnec2c.glade:13201
+#, c-format
+msgid "Segs % lambda"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:344 xnec2c/xnec2c.glade:3877 xnec2c/xnec2c.glade:13291
+msgid "Wire Diameter"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:424
+msgid "Radius from Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:437
+msgid "End 1 Angle"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:450
+msgid "End 2 Angle"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:553
+msgid "Wire Arc Data"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:615 xnec2c/xnec2c.glade:844 xnec2c/xnec2c.glade:1622
+#: xnec2c/xnec2c.glade:1842 xnec2c/xnec2c.glade:2288 xnec2c/xnec2c.glade:2479
+#: xnec2c/xnec2c.glade:2779 xnec2c/xnec2c.glade:3441 xnec2c/xnec2c.glade:4096
+#: xnec2c/xnec2c.glade:4291 xnec2c/xnec2c.glade:4450 xnec2c/xnec2c.glade:4966
+#: xnec2c/xnec2c.glade:5564 xnec2c/xnec2c.glade:6805 xnec2c/xnec2c.glade:7678
+#: xnec2c/xnec2c.glade:8665 xnec2c/xnec2c.glade:8933 xnec2c/xnec2c.glade:10820
+#: xnec2c/xnec2c.glade:12253 xnec2c/xnec2c.glade:12830
+#: xnec2c/xnec2c.glade:13627
+msgid "Delete Card"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:694
+msgid "Cylindrical Structure (GR card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:720 xnec2c/xnec2c.glade:8835
+msgid "Tag Number Increment"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:733
+msgid "Number of Structures"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:783
+msgid "Cylindrical Structure"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:910
+msgid "Xnec2c Error"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1013
+msgid "Error"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1095
+msgid "Excitation Command (EX Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1117
+msgid "Incident LH Wave"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1133
+msgid "Incident Linear Wave "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1149
+msgid "Current Source"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1165
+msgid "Incident RH Wave"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1181
+msgid "Current Slope Discontinuity"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1197
+msgid "Voltage Source"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1219
+msgid "Excitation Type"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1244
+msgid "Maximum Admittance Matrix Asymmetry"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1260
+msgid "Impedance of Source Segment"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1282
+msgid "Print Control"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1369
+msgid "Voltage - Real Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1382
+msgid "Voltage - Imaginary Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1395
+msgid "Eta"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1459
+msgid "Theta"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1472
+msgid "Phi"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1485
+msgid "Ratio"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1560
+msgid "Excitation Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1688
+msgid "Execute Command (XQ Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1711
+msgid "No Pattern Cuts"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1727
+msgid "Pattern in XZ Plane"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1743
+msgid "Pattern in YZ Plane"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1759
+msgid "Both XZ/YZ Patterns"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1781
+msgid "Execute Command"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:1907
+msgid "xnec2c"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2012
+msgid "Frequecy Command (FR Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2034
+msgid "Additive Stepping"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2051
+msgid "Multiplicative Stepping"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2074
+msgid "Frequency Stepping"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2103
+msgid "No. Frequency Points"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2132
+msgid "Start Frequency (MHz)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2162
+msgid "Frequency Step (MHz)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2193
+msgid "End Frequency (MHz)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2227
+msgid "Frequency Stepping Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2354
+msgid "Geometry End (GE Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2376
+msgid "No Ground, Free Space condition"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2393
+msgid "Ground present, Strucure reflection"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2410
+msgid "Ground present, no Structure reflection"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2433
+msgid "Ground Plane type"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2569
+msgid "Ground Parameters (GD Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2594 xnec2c/xnec2c.glade:3051 xnec2c/xnec2c.glade:3132
+msgid "Relative Dielectric Const."
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2624 xnec2c/xnec2c.glade:3163
+msgid "Distance to 2nd Medium"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2654 xnec2c/xnec2c.glade:3081 xnec2c/xnec2c.glade:3193
+msgid "Ground Conductivity S/m"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2684 xnec2c/xnec2c.glade:3223
+msgid "Dist. below 1st Medium"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2718 xnec2c/xnec2c.glade:3257
+msgid "2nd Medium Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2900
+msgid "Ground Parameters (GN & GD Cards)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2923
+msgid "Perfect Ground"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2939
+msgid "Sommerfeld/Norton"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2955
+msgid "Radial Ground Screen"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2970
+msgid "Reflection Coeff. Approx"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:2986
+msgid "Nullify Previous Params"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3002
+msgid "Second Medium (Cliff)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3023
+msgid "Ground Type"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3145
+msgid "0.00000"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3287
+msgid "Number of Radials"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3300
+msgid "Radial Screen Radius"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3346
+msgid "Radial Wire Diameter"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3380
+msgid "Radial Screen Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3581
+msgid "Helical Element (GA card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3603 xnec2c/xnec2c.glade:9163 xnec2c/xnec2c.glade:9792
+#: xnec2c/xnec2c.glade:11094
+msgid "Left Hand"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3618
+msgid "Link all Radii"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3634
+msgid "Link @ Z=0"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3650
+msgid "Link @ Z=HL"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3697
+msgid "Turns Spacing"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3727
+msgid "Radius @ X,Z=0"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3757
+msgid "Segments/Turn"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3786
+msgid "Helix Length"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3817
+msgid "Radius @ Y,Z=0"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3908
+msgid "Rad. @ X,Z=HL"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3938
+msgid "Num. of Turns"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:3998
+msgid "Rad. @ Y,Z=HL"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4032
+msgid "GH Card"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4170
+msgid "Interaction Approx Range (KH Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4194
+msgid "Approximation Range (W/lengths)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4230
+msgid "Interaction Approximation Range"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4357
+msgid "Thin Wire Kernel (EK Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4372
+msgid "Extended Thin Wire Kernel"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4389
+msgid "Thin Wire Kernel"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4553
+msgid "Loading Command (LD Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4575
+msgid "Short all Loads (Nulls previous Loading Cards)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4592
+msgid "Series, Lumped"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4608
+msgid "Parallel, Distributed"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4624
+msgid "Parallel, Lumped"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4640
+msgid "Resistance & Reactance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4656
+msgid "Series, Distributed"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4672
+msgid "Wire Conductivity"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4694
+msgid "Loading Type"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4723
+msgid "Load Tag Number"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4752
+msgid "Resistance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4782
+msgid "From Segment #"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4811
+msgid "Inductance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4841
+msgid "To Segment #"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4870
+msgid "Capacitance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:4904
+msgid "Loading Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5113
+msgid "Near Fields Command (NE/NH Cards)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5136
+msgid "Near Electric Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5152
+msgid "Rectangular Co-ordinates"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5168
+msgid "Near Magnetic Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5183
+msgid "Spherical Co-ordinates"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5205
+msgid "Field Type & Co-ordinates"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5234
+msgid "NX"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5263 xnec2c/xnec2c.glade:10339 xnec2c/xnec2c.glade:11537
+msgid "X"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5293
+msgid "DX"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5322
+msgid "NY"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5351 xnec2c/xnec2c.glade:10354 xnec2c/xnec2c.glade:11552
+msgid "Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5381
+msgid "DY"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5410
+msgid "NZ"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5439 xnec2c/xnec2c.glade:10369 xnec2c/xnec2c.glade:11567
+msgid "Z"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5469
+msgid "DZ"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5502
+msgid "Field Pattern Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5630
+msgid "Xnec2c: NEC2 Input File Editor"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5710
+msgid "Manage Cards"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5801
+msgid "File Save"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5880
+msgid "Wire"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5894
+msgid "Arc"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5908
+msgid "Helix"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5922
+msgid "Patch"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5936
+msgid "Cylinder"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5950
+msgid "Move"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5964
+msgid "Reflect"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5978
+msgid "Scale"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:5998
+msgid "Edit Geometry Data"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6046
+msgid "Geometry"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6072
+msgid "Excitation"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6086
+msgid "Radiation"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6100
+msgid "Frequency"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6114
+msgid "Near Fields"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6128
+msgid "Ground (GN)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6142
+msgid "Ground (GD)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6156
+msgid "Loading"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6170
+msgid "Kernel"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6184
+msgid "Network"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6198
+msgid "Interaction"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6212
+msgid "Trans. Line"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6226
+msgid "Execute"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6246
+msgid "Edit Control Commands"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6294
+msgid "Commands"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6386
+msgid "Network Command (NT Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6411
+msgid "Tag Number, Port 1  "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6440
+msgid "Tag Number, Port 2  "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6469
+msgid "Segment Num, Port 1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6498
+msgid "Segment Num, Port 2"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6531 xnec2c/xnec2c.glade:12537
+msgid "Segment Identity"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6560
+msgid "Element 1,1 Real Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6590
+msgid "Element 1,2 Real Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6620
+msgid "Element 2,2 Real Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6650
+msgid "Element 1,1 Imag Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6680
+msgid "Element 1,2 Imag Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6710
+msgid "Element 2,2 Imag Part"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6744
+msgid "Admittance Matrix Elements"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6960
+msgid "Patch Element (SP & SC Cards)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6981
+msgid "Arbitary"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:6998
+msgid "Rectangle"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7015
+msgid "Triangle"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7032
+msgid "Quadrilateral"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7049
+msgid "Surface"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7072
+msgid "Patch Type"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7101
+msgid "Corners 1-2 sub-division (NX)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7130
+msgid "Corners 2-3 sub-division (NY)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7163
+msgid "Surface Sub-division"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7376
+msgid "SP/SM Cards"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7411
+msgid "Corner 3 - X"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7441
+msgid "Corner 3 - Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7471
+msgid "Corner 3 - Z"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7516
+msgid "Corner 4 - X"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7546
+msgid "Corner 4 - Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7576
+msgid "Corner 4 - Z"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7617
+msgid "SC Card"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7744
+msgid "Confirmation"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7831
+msgid "Quit xnec2c?"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7914
+msgid "Radiation Pattern (RP Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7938
+msgid "Normal (Space) Wave"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7954
+msgid "Space + Ground Wave"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7970
+msgid "Linear Cliff"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:7986
+msgid "Radial wire screen"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8002
+msgid "Circular Cliff + Radials"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8018
+msgid "Circular Cliff"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8034
+msgid "Linear Cliff + Radials"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8052
+msgid "<b>See GN/GD Card Documentation</b>"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8070
+msgid "Wave Type and Ground (I1)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8097
+msgid "Major & Minor Axis & Total Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8113
+msgid "Vertical, Horizontal & Total Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8129
+msgid "Major Axis Gain Normalized"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8145
+msgid "Vertical Axis Gain Normalized"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8161
+msgid "Total Gain Normalized"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8177
+msgid "Print/Normalize Directive Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8193
+msgid "No Normalized Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8209
+msgid "Minor Axis Gain Normalized"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8225
+msgid "Horizontal Axis Gain Normalized"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8241
+msgid "Print/Normalize Power Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8257
+msgid "No Gain Averaging"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8273
+msgid "Points in Average Not Printed"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8289
+msgid "Average Gain Computed"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8307
+msgid "<b>See RP Card Documentation</b>"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8325
+msgid "Data Output Control (XNDA)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8354
+msgid "Points in Theta"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8457
+msgid "Initial Phi (deg)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8533
+msgid "Field Point Distance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8563
+msgid "Gain Normalization"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8603
+msgid "Radiation Pattern Parameters"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8764
+msgid "Reflect Structure (GX card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8788
+msgid "Reflect in YZ plane"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8803
+msgid "Reflect in XY plane"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8818
+msgid "Reflect in XZ plane"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:8872
+msgid "Reflect Options"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9005
+msgid "Xnec2c: Frequency Data Plots"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9028 xnec2c/xnec2c.glade:9656 xnec2c/xnec2c.glade:10932
+msgid "File"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9074 xnec2c/xnec2c.glade:10988
+msgid "Save as gnuplot"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9106 xnec2c/xnec2c.glade:9734 xnec2c/xnec2c.glade:11020
+msgid "View"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9114 xnec2c/xnec2c.glade:9743 xnec2c/xnec2c.glade:11045
+msgid "Polarization"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9123 xnec2c/xnec2c.glade:9752 xnec2c/xnec2c.glade:11054
+msgid "Total"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9133 xnec2c/xnec2c.glade:9762 xnec2c/xnec2c.glade:11064
+msgid "Horizontal"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9143 xnec2c/xnec2c.glade:9772 xnec2c/xnec2c.glade:11074
+msgid "Vertical"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9153 xnec2c/xnec2c.glade:9782 xnec2c/xnec2c.glade:11084
+msgid "Right Hand"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9177
+msgid "Net Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9199
+msgid "Max Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9213
+msgid "Direct."
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9227
+msgid "Viewer"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9255
+msgid "Zr/Zi"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9269
+msgid "Zm/Zph"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9287
+msgid "  Freq Loop "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9395
+msgid "F MHz"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9411 xnec2c/xnec2c.glade:9440 xnec2c/xnec2c.glade:10220
+#: xnec2c/xnec2c.glade:11404
+msgid " - - - - -"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9424
+msgid " Max Gain"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9453
+msgid " VSWR"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9469 xnec2c/xnec2c.glade:9498 xnec2c/xnec2c.glade:9527
+msgid " - - - -"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9482
+msgid " Zreal"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9511
+msgid " Zim"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9540
+msgid " Zo"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9611
+msgid "Frequency Data Plots"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9633
+msgid "Xnec2c: Radiation Patterns"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9702
+msgid "Save As gnuplot"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9806
+msgid "Gain Scaling"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9834
+msgid "ARRL Style"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9844
+msgid "Logarithmic"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9858
+msgid "Near Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9866
+msgid "Near E Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9876
+msgid "Near H Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9886
+msgid "Poynting Vector"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9896
+msgid "Animate Dialog"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9904
+msgid "Total Field"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9912
+msgid "Peak Value"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9922
+msgid "Snapshot"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9940 xnec2c/xnec2c.glade:11108
+msgid "Common Projection"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9949 xnec2c/xnec2c.glade:11117
+msgid "Common Frequency"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9958
+msgid "Overlay Structure"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:9992
+msgid "Gain Pattern"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10006
+msgid "E/H Fields"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10034 xnec2c/xnec2c.glade:11216
+msgid "Frequency Loop "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10112 xnec2c/xnec2c.glade:11296
+msgid " Step "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10130 xnec2c/xnec2c.glade:11314
+msgid "1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10174 xnec2c/xnec2c.glade:11358
+msgid "0.0"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10203 xnec2c/xnec2c.glade:11387
+msgid "0.00"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10233
+msgid "dB"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10267
+msgid "MHz"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10279 xnec2c/xnec2c.glade:11475
+msgid "Apply"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10481 xnec2c/xnec2c.glade:11685
+msgid " Zoom % "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10654
+msgid "Scale Structure (GS card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10681
+msgid "Structure Scale Factor"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10694
+msgid "From Tag No."
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10740
+msgid "To Tag No."
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10774
+msgid "Scale Strucure"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:10908
+msgid "Xnec2c: Structure Display"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11029
+msgid "Radiation Pattern"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11037
+msgid "Frequency Plots"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11130
+msgid "Help"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11136
+msgid "About"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11173
+msgid "Currents"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11187
+msgid "Charges"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11417
+msgid "dB "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11463
+msgid "MHz "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11821
+msgid "Structure Geometry"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11894
+msgid "Co-ordinate Transformation (GM card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11920
+msgid "Tag Increment"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11949
+msgid "Rotate about X"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:11979
+msgid "Move along X"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12009
+msgid "New Structures"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12038
+msgid "Rotate about Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12068
+msgid "Move along Y"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12098
+msgid "Start From Tag"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12128
+msgid "Rotate about Z"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12158
+msgid "Move along Z"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12192
+msgid "Co-ordinate Transformation Data"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12389
+msgid "Trans. Line Command (TL Card)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12415
+msgid "Tag Number, End 1  "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12445
+msgid "Tag Number, End 2  "
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12474
+msgid "Segment Num, End 1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12504
+msgid "Segment Num, End 2"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12565
+msgid "Crossed Transmission Line"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12582
+msgid "Characteristic Impedance"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12612
+msgid "End 1 Y Real Part (S)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12642
+msgid "End 2 Y Real Part (S)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12672
+msgid "Length of Tx Line (m)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12702
+msgid "End 1 Y Imag Part (S)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12732
+msgid "End 2 Y Imag Part (S)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12769
+msgid "Transmission Line"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:12997
+msgid "Wire Element (GW & GC cards)"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13051
+msgid "Wire X1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13081
+msgid "Wire X2"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13140
+msgid "Wire Y1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13171
+msgid "Wire Y2"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13231
+msgid "Wire Z1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13261
+msgid "Wire Z2"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13322
+msgid "Wire Length"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13386
+msgid "Wire Data"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13413
+msgid "Tapered Wire"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13430
+msgid "Length Taper"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13460
+msgid "Diameter Seg 1"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13490
+msgid "Diameter Seg N"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13520
+msgid "Diam. Taper"
+msgstr ""
+
+#: xnec2c/xnec2c.glade:13563
+msgid "Wire Taper Data"
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 0652ba4..8bb383f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,11 @@
 ## Process this file with automake to produce Makefile.in
-AM_LDFLAGS = -Wl,--as-needed
+AM_LDFLAGS = -Wl,--export-dynamic -Wl,--as-needed
 
-AM_CFLAGS = --pedantic -Wall -std=gnu99 -O2 -D_FORTIFY_SOURCE=2 \
-		 -fstack-protector -Wformat -Werror=format-security -fpie
+AM_CFLAGS = --pedantic -Wall -std=gnu11 -O2 -g -D_FORTIFY_SOURCE=2 \
+			-fstack-protector-strong -Wformat -Werror=format-security -fpie \
+			-DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED \
+			-DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE \
+			-DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED
 
 AM_CPPFLAGS = \
 	-DPROGRAMNAME_LOCALEDIR=\""$(PROGRAMNAME_LOCALEDIR)"\" \
@@ -14,7 +17,6 @@ bin_PROGRAMS = xnec2c
 
 xnec2c_SOURCES = \
 	main.c		 	main.h \
-	support.c	 	support.h \
 	interface.c	 	interface.h \
 	callbacks.c	 	callbacks.h \
 	callback_func.c	callback_func.h \
diff --git a/src/Makefile.in b/src/Makefile.in
index 5b598f8..0c3d1f0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -86,10 +86,28 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
 bin_PROGRAMS = xnec2c$(EXEEXT)
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
+	$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
+	$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
+	$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
+	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
+	$(top_srcdir)/m4/inttypes-pri.m4 \
+	$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/lock.m4 \
+	$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
+	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/size_max.m4 \
+	$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/threadlib.m4 \
+	$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \
+	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
+	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -99,11 +117,10 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_xnec2c_OBJECTS = main.$(OBJEXT) support.$(OBJEXT) \
-	interface.$(OBJEXT) callbacks.$(OBJEXT) \
-	callback_func.$(OBJEXT) calculations.$(OBJEXT) \
-	cmnd_edit.$(OBJEXT) geom_edit.$(OBJEXT) gnuplot.$(OBJEXT) \
-	draw.$(OBJEXT) draw_structure.$(OBJEXT) \
+am_xnec2c_OBJECTS = main.$(OBJEXT) interface.$(OBJEXT) \
+	callbacks.$(OBJEXT) callback_func.$(OBJEXT) \
+	calculations.$(OBJEXT) cmnd_edit.$(OBJEXT) geom_edit.$(OBJEXT) \
+	gnuplot.$(OBJEXT) draw.$(OBJEXT) draw_structure.$(OBJEXT) \
 	draw_radiation.$(OBJEXT) fields.$(OBJEXT) fork.$(OBJEXT) \
 	geometry.$(OBJEXT) ground.$(OBJEXT) xnec2c.$(OBJEXT) \
 	input.$(OBJEXT) matrix.$(OBJEXT) utils.$(OBJEXT) \
@@ -169,18 +186,19 @@ CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
+ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
@@ -195,35 +213,53 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GENCAT = @GENCAT@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
-INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
-INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
-INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+INTLOBJS = @INTLOBJS@
+INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
 LIBS = @LIBS@
+LIBTHREAD = @LIBTHREAD@
+LTLIBC = @LTLIBC@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGFMT_015 = @MSGFMT_015@
 MSGMERGE = @MSGMERGE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -239,17 +275,23 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PROGRAMNAME_LOCALEDIR = @PROGRAMNAME_LOCALEDIR@
+RANLIB = @RANLIB@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WINDRES = @WINDRES@
+WOE32 = @WOE32@
+WOE32DLL = @WOE32DLL@
 XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -262,20 +304,26 @@ am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
 bindir = @bindir@
+build = @build@
 build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
+host = @host@
 host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
 htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
-intltool__v_merge_options_ = @intltool__v_merge_options_@
-intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -295,9 +343,12 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_LDFLAGS = -Wl,--as-needed
-AM_CFLAGS = --pedantic -Wall -std=gnu99 -O2 -D_FORTIFY_SOURCE=2 \
-		 -fstack-protector -Wformat -Werror=format-security -fpie
+AM_LDFLAGS = -Wl,--export-dynamic -Wl,--as-needed
+AM_CFLAGS = --pedantic -Wall -std=gnu11 -O2 -g -D_FORTIFY_SOURCE=2 \
+			-fstack-protector-strong -Wformat -Werror=format-security -fpie \
+			-DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED \
+			-DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE \
+			-DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED
 
 AM_CPPFLAGS = \
 	-DPROGRAMNAME_LOCALEDIR=\""$(PROGRAMNAME_LOCALEDIR)"\" \
@@ -307,7 +358,6 @@ AM_CPPFLAGS = \
 
 xnec2c_SOURCES = \
 	main.c		 	main.h \
-	support.c	 	support.h \
 	interface.c	 	interface.h \
 	callbacks.c	 	callbacks.h \
 	callback_func.c	callback_func.h \
@@ -444,7 +494,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/radiation.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shared.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/somnec.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/support.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utils.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xnec2c.Po at am__quote@
 
diff --git a/src/calculations.c b/src/calculations.c
index 759694e..4852dca 100644
--- a/src/calculations.c
+++ b/src/calculations.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -46,6 +44,226 @@
 
 /*-------------------------------------------------------------------*/
 
+/* compute basis function i */
+  static void
+tbf( int i, int icap )
+{
+  int ix, jcox, jcoxx, jend, iend, njun1=0, njun2, jsnop, jsnox;
+  double pp, sdh, cdh, sd, omc, aj, pm=0, cd, ap, qp, qm, xxi;
+  double d, sig; /*** also global ***/
+
+  segj.jsno=0;
+  pp=0.0;
+  ix = i-1;
+  jcox= data.icon1[ix];
+
+  if( jcox > PCHCON)
+	jcox= i;
+
+  jend=-1;
+  iend=-1;
+  sig=-1.0;
+
+  do
+  {
+	if( jcox != 0 )
+	{
+	  if( jcox < 0 )
+		jcox= -jcox;
+	  else
+	  {
+		sig= -sig;
+		jend= -jend;
+	  }
+
+	  jcoxx = jcox-1;
+	  segj.jsno++;
+	  jsnox = segj.jsno-1;
+	  segj.jco[jsnox]= jcox;
+	  d= M_PI* data.si[jcoxx];
+	  sdh= sin( d);
+	  cdh= cos( d);
+	  sd=2.0* sdh* cdh;
+
+	  if( d <= 0.015)
+	  {
+		omc=4.0* d* d;
+		omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
+	  }
+	  else omc=1.0- cdh* cdh+ sdh* sdh;
+
+	  aj=1.0/( log(1.0/( M_PI* data.bi[jcoxx]))-.577215664);
+	  pp= pp- omc/ sd* aj;
+	  segj.ax[jsnox]= aj/ sd* sig;
+	  segj.bx[jsnox]= aj/(2.0* cdh);
+	  segj.cx[jsnox]= -aj/(2.0* sdh)* sig;
+
+	  if( jcox != i)
+	  {
+		if( jend == 1)
+		  jcox= data.icon2[jcoxx];
+		else
+		  jcox= data.icon1[jcoxx];
+
+		if( abs(jcox) != i )
+		{
+		  if( jcox != 0 )
+			continue;
+		  else
+		  {
+			fprintf( stderr,
+				"xnec2c: tbf(): segment connection error for segment %5d\n", i );
+			stop( _("Segment connection error in tbf()"), ERR_STOP );
+		  }
+		}
+
+	  } /* if( jcox != i) */
+	  else segj.bx[jsnox] = -segj.bx[jsnox];
+
+	  if( iend == 1) break;
+
+	} /* if( jcox != 0 ) */
+
+	pm= -pp;
+	pp=0.0;
+	njun1= segj.jsno;
+
+	jcox= data.icon2[ix];
+	if( jcox > PCHCON)
+	  jcox= i;
+
+	jend=1;
+	iend=1;
+	sig=-1.0;
+
+  } /* do */
+  while( jcox != 0 );
+
+  njun2= segj.jsno- njun1;
+  jsnop= segj.jsno;
+  segj.jco[jsnop]= i;
+  d= M_PI* data.si[ix];
+  sdh= sin( d);
+  cdh= cos( d);
+  sd=2.0* sdh* cdh;
+  cd= cdh* cdh- sdh* sdh;
+
+  if( d <= 0.015)
+  {
+	omc=4.0* d* d;
+	omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
+  }
+  else omc=1.0- cd;
+
+  ap=1.0/( log(1.0/( M_PI* data.bi[ix]))-.577215664);
+  aj= ap;
+
+  if( njun1 == 0)
+  {
+	if( njun2 == 0)
+	{
+	  segj.bx[jsnop]=0.0;
+
+	  if( icap == 0)
+		xxi=0.0;
+	  else
+	  {
+		qp= M_PI* data.bi[ix];
+		xxi= qp* qp;
+		xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	  }
+
+	  segj.cx[jsnop]=1.0/( cdh- xxi* sdh);
+	  segj.jsno= jsnop+1;
+	  segj.ax[jsnop]=-1.0;
+	  return;
+
+	} /* if( njun2 == 0) */
+
+	if( icap == 0) xxi=0.0;
+	else
+	{
+	  qp= M_PI* data.bi[ix];
+	  xxi= qp* qp;
+	  xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	}
+
+	qp=-( omc+ xxi* sd)/( sd*( ap+ xxi* pp)+ cd*( xxi* ap- pp));
+	d= cd- xxi* sd;
+	segj.bx[jsnop]=( sdh+ ap* qp*( cdh- xxi* sdh))/ d;
+	segj.cx[jsnop]=( cdh+ ap* qp*( sdh+ xxi* cdh))/ d;
+
+	for( iend = 0; iend < njun2; iend++ )
+	{
+	  segj.ax[iend]= -segj.ax[iend]* qp;
+	  segj.bx[iend]= segj.bx[iend]* qp;
+	  segj.cx[iend]= -segj.cx[iend]* qp;
+	}
+
+	segj.jsno= jsnop+1;
+	segj.ax[jsnop]=-1.0;
+	return;
+
+  } /* if( njun1 == 0) */
+
+  if( njun2 == 0)
+  {
+	if( icap == 0)
+	  xxi=0.0;
+	else
+	{
+	  qm= M_PI* data.bi[ix];
+	  xxi= qm* qm;
+	  xxi= qm*(1.0-.5* xxi)/(1.0- xxi);
+	}
+
+	qm=( omc+ xxi* sd)/( sd*( aj- xxi* pm)+ cd*( pm+ xxi* aj));
+	d= cd- xxi* sd;
+	segj.bx[jsnop]=( aj* qm*( cdh- xxi* sdh)- sdh)/ d;
+	segj.cx[jsnop]=( cdh- aj* qm*( sdh+ xxi* cdh))/ d;
+
+	for( iend = 0; iend < njun1; iend++ )
+	{
+	  segj.ax[iend]= segj.ax[iend]* qm;
+	  segj.bx[iend]= segj.bx[iend]* qm;
+	  segj.cx[iend]= segj.cx[iend]* qm;
+	}
+
+	segj.jsno= jsnop+1;
+	segj.ax[jsnop]=-1.0;
+	return;
+
+  } /* if( njun2 == 0) */
+
+  qp= sd*( pm* pp+ aj* ap)+ cd*( pm* ap- pp* aj);
+  qm=( ap* omc- pp* sd)/ qp;
+  qp=-( aj* omc+ pm* sd)/ qp;
+  segj.bx[jsnop]=( aj* qm+ ap* qp)* sdh/ sd;
+  segj.cx[jsnop]=( aj* qm- ap* qp)* cdh/ sd;
+
+  for( iend = 0; iend < njun1; iend++ )
+  {
+	segj.ax[iend]= segj.ax[iend]* qm;
+	segj.bx[iend]= segj.bx[iend]* qm;
+	segj.cx[iend]= segj.cx[iend]* qm;
+  }
+
+  jend= njun1;
+  for( iend = jend; iend < segj.jsno; iend++ )
+  {
+	segj.ax[iend]= -segj.ax[iend]* qp;
+	segj.bx[iend]= segj.bx[iend]* qp;
+	segj.cx[iend]= -segj.cx[iend]* qp;
+  }
+
+  segj.jsno= jsnop+1;
+  segj.ax[jsnop]=-1.0;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
 /* fill incident field array for charge discontinuity voltage source */
 void qdsrc( int is, complex double v, complex double *e )
 {
@@ -60,8 +278,8 @@ void qdsrc( int is, complex double v, complex double *e )
   data.icon1[is]= i;
   dataj.s= data.si[is]*.5;
   curd= CCJ* v/(( log(2.0 * dataj.s/ data.bi[is])-1.0) *
-	  ( segj.bx[segj.jsno-1] * cos( TWOPI* dataj.s) +
-		segj.cx[segj.jsno-1] * sin( TWOPI* dataj.s))* data.wlam);
+	  ( segj.bx[segj.jsno-1] * cos( M_2PI* dataj.s) +
+		segj.cx[segj.jsno-1] * sin( M_2PI* dataj.s))* data.wlam);
   vsorc.vqds[vsorc.nqds]= v;
   vsorc.iqds[vsorc.nqds]= is+1;
   vsorc.nqds++;
@@ -290,8 +508,8 @@ void cabc( complex double *curx)
 		data.icon1[i]= jx;
 		sh= data.si[i]*.5;
 		curd= CCJ* vsorc.vqds[is]/( (log(2.0* sh/ data.bi[i])-1.0) *
-			(segj.bx[segj.jsno-1]* cos(TWOPI* sh)+ segj.cx[segj.jsno-1] *
-			 sin(TWOPI* sh))* data.wlam );
+			(segj.bx[segj.jsno-1]* cos(M_2PI* sh)+ segj.cx[segj.jsno-1] *
+			 sin(M_2PI* sh))* data.wlam );
 		ar= creal( curd);
 		ai= cimag( curd);
 
@@ -724,9 +942,9 @@ void intx( double el1, double el2, double b,
 int min( int a, int b )
 {
   if( a < b )
-	return(a);
+	return( a );
   else
-	return(b);
+	return( b );
 }
 
 /*-----------------------------------------------------------------------*/
@@ -761,7 +979,7 @@ void test( double f1r, double f2r, double *tr,
 /*-----------------------------------------------------------------------*/
 
 /* compute component of basis function i on segment is. */
-  void
+  static void
 sbf( int i, int is, double *aa, double *bb, double *cc )
 {
   int ix, jsno, june, jcox, jcoxx, jend, iend, njun1=0, njun2;
@@ -798,7 +1016,7 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
 
 	  jcoxx = jcox-1;
 	  jsno++;
-	  d= PI* data.si[jcoxx];
+	  d= M_PI* data.si[jcoxx];
 	  sdh= sin( d);
 	  cdh= cos( d);
 	  sd=2.0* sdh* cdh;
@@ -810,7 +1028,7 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
 	  }
 	  else omc=1.0- cdh* cdh+ sdh* sdh;
 
-	  aj=1.0/( log(1.0/( PI* data.bi[jcoxx]))-.577215664);
+	  aj=1.0/( log(1.0/( M_PI* data.bi[jcoxx]))-.577215664);
 	  pp -= omc/ sd* aj;
 
 	  if( jcox == is)
@@ -863,7 +1081,7 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
   while( jcox != 0 );
 
   njun2= jsno- njun1;
-  d= PI* data.si[ix];
+  d= M_PI* data.si[ix];
   sdh= sin( d);
   cdh= cos( d);
   sd=2.0* sdh* cdh;
@@ -876,7 +1094,7 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
   }
   else omc=1.0- cd;
 
-  ap=1.0/( log(1.0/( PI* data.bi[ix])) -.577215664);
+  ap=1.0/( log(1.0/( M_PI* data.bi[ix])) -.577215664);
   aj= ap;
 
   if( njun1 == 0)
@@ -884,14 +1102,14 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
 	if( njun2 == 0)
 	{
 	  *aa =-1.0;
-	  qp= PI* data.bi[ix];
+	  qp= M_PI* data.bi[ix];
 	  xxi= qp* qp;
 	  xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
 	  *cc=1.0/( cdh- xxi* sdh);
 	  return;
 	}
 
-	qp= PI* data.bi[ix];
+	qp= M_PI* data.bi[ix];
 	xxi= qp* qp;
 	xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
 	qp=-( omc+ xxi* sd)/( sd*( ap+ xxi* pp)+ cd*( xxi* ap- pp));
@@ -915,7 +1133,7 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
 
   if( njun2 == 0)
   {
-	qm= PI* data.bi[ix];
+	qm= M_PI* data.bi[ix];
 	xxi= qm* qm;
 	xxi= qm*(1.0-.5* xxi)/(1.0- xxi);
 	qm=( omc+ xxi* sd)/( sd*( aj- xxi* pm)+ cd*( pm+ xxi* aj));
@@ -970,226 +1188,6 @@ sbf( int i, int is, double *aa, double *bb, double *cc )
 
 /*-----------------------------------------------------------------------*/
 
-/* compute basis function i */
-  void
-tbf( int i, int icap )
-{
-  int ix, jcox, jcoxx, jend, iend, njun1=0, njun2, jsnop, jsnox;
-  double pp, sdh, cdh, sd, omc, aj, pm=0, cd, ap, qp, qm, xxi;
-  double d, sig; /*** also global ***/
-
-  segj.jsno=0;
-  pp=0.0;
-  ix = i-1;
-  jcox= data.icon1[ix];
-
-  if( jcox > PCHCON)
-	jcox= i;
-
-  jend=-1;
-  iend=-1;
-  sig=-1.0;
-
-  do
-  {
-	if( jcox != 0 )
-	{
-	  if( jcox < 0 )
-		jcox= -jcox;
-	  else
-	  {
-		sig= -sig;
-		jend= -jend;
-	  }
-
-	  jcoxx = jcox-1;
-	  segj.jsno++;
-	  jsnox = segj.jsno-1;
-	  segj.jco[jsnox]= jcox;
-	  d= PI* data.si[jcoxx];
-	  sdh= sin( d);
-	  cdh= cos( d);
-	  sd=2.0* sdh* cdh;
-
-	  if( d <= 0.015)
-	  {
-		omc=4.0* d* d;
-		omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
-	  }
-	  else omc=1.0- cdh* cdh+ sdh* sdh;
-
-	  aj=1.0/( log(1.0/( PI* data.bi[jcoxx]))-.577215664);
-	  pp= pp- omc/ sd* aj;
-	  segj.ax[jsnox]= aj/ sd* sig;
-	  segj.bx[jsnox]= aj/(2.0* cdh);
-	  segj.cx[jsnox]= -aj/(2.0* sdh)* sig;
-
-	  if( jcox != i)
-	  {
-		if( jend == 1)
-		  jcox= data.icon2[jcoxx];
-		else
-		  jcox= data.icon1[jcoxx];
-
-		if( abs(jcox) != i )
-		{
-		  if( jcox != 0 )
-			continue;
-		  else
-		  {
-			fprintf( stderr,
-				"xnec2c: tbf(): segment connection error for segment %5d\n", i );
-			stop( _("Segment connection error in tbf()"), ERR_STOP );
-		  }
-		}
-
-	  } /* if( jcox != i) */
-	  else segj.bx[jsnox] = -segj.bx[jsnox];
-
-	  if( iend == 1) break;
-
-	} /* if( jcox != 0 ) */
-
-	pm= -pp;
-	pp=0.0;
-	njun1= segj.jsno;
-
-	jcox= data.icon2[ix];
-	if( jcox > PCHCON)
-	  jcox= i;
-
-	jend=1;
-	iend=1;
-	sig=-1.0;
-
-  } /* do */
-  while( jcox != 0 );
-
-  njun2= segj.jsno- njun1;
-  jsnop= segj.jsno;
-  segj.jco[jsnop]= i;
-  d= PI* data.si[ix];
-  sdh= sin( d);
-  cdh= cos( d);
-  sd=2.0* sdh* cdh;
-  cd= cdh* cdh- sdh* sdh;
-
-  if( d <= 0.015)
-  {
-	omc=4.0* d* d;
-	omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
-  }
-  else omc=1.0- cd;
-
-  ap=1.0/( log(1.0/( PI* data.bi[ix]))-.577215664);
-  aj= ap;
-
-  if( njun1 == 0)
-  {
-	if( njun2 == 0)
-	{
-	  segj.bx[jsnop]=0.0;
-
-	  if( icap == 0)
-		xxi=0.0;
-	  else
-	  {
-		qp= PI* data.bi[ix];
-		xxi= qp* qp;
-		xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
-	  }
-
-	  segj.cx[jsnop]=1.0/( cdh- xxi* sdh);
-	  segj.jsno= jsnop+1;
-	  segj.ax[jsnop]=-1.0;
-	  return;
-
-	} /* if( njun2 == 0) */
-
-	if( icap == 0) xxi=0.0;
-	else
-	{
-	  qp= PI* data.bi[ix];
-	  xxi= qp* qp;
-	  xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
-	}
-
-	qp=-( omc+ xxi* sd)/( sd*( ap+ xxi* pp)+ cd*( xxi* ap- pp));
-	d= cd- xxi* sd;
-	segj.bx[jsnop]=( sdh+ ap* qp*( cdh- xxi* sdh))/ d;
-	segj.cx[jsnop]=( cdh+ ap* qp*( sdh+ xxi* cdh))/ d;
-
-	for( iend = 0; iend < njun2; iend++ )
-	{
-	  segj.ax[iend]= -segj.ax[iend]* qp;
-	  segj.bx[iend]= segj.bx[iend]* qp;
-	  segj.cx[iend]= -segj.cx[iend]* qp;
-	}
-
-	segj.jsno= jsnop+1;
-	segj.ax[jsnop]=-1.0;
-	return;
-
-  } /* if( njun1 == 0) */
-
-  if( njun2 == 0)
-  {
-	if( icap == 0)
-	  xxi=0.0;
-	else
-	{
-	  qm= PI* data.bi[ix];
-	  xxi= qm* qm;
-	  xxi= qm*(1.0-.5* xxi)/(1.0- xxi);
-	}
-
-	qm=( omc+ xxi* sd)/( sd*( aj- xxi* pm)+ cd*( pm+ xxi* aj));
-	d= cd- xxi* sd;
-	segj.bx[jsnop]=( aj* qm*( cdh- xxi* sdh)- sdh)/ d;
-	segj.cx[jsnop]=( cdh- aj* qm*( sdh+ xxi* cdh))/ d;
-
-	for( iend = 0; iend < njun1; iend++ )
-	{
-	  segj.ax[iend]= segj.ax[iend]* qm;
-	  segj.bx[iend]= segj.bx[iend]* qm;
-	  segj.cx[iend]= segj.cx[iend]* qm;
-	}
-
-	segj.jsno= jsnop+1;
-	segj.ax[jsnop]=-1.0;
-	return;
-
-  } /* if( njun2 == 0) */
-
-  qp= sd*( pm* pp+ aj* ap)+ cd*( pm* ap- pp* aj);
-  qm=( ap* omc- pp* sd)/ qp;
-  qp=-( aj* omc+ pm* sd)/ qp;
-  segj.bx[jsnop]=( aj* qm+ ap* qp)* sdh/ sd;
-  segj.cx[jsnop]=( aj* qm- ap* qp)* cdh/ sd;
-
-  for( iend = 0; iend < njun1; iend++ )
-  {
-	segj.ax[iend]= segj.ax[iend]* qm;
-	segj.bx[iend]= segj.bx[iend]* qm;
-	segj.cx[iend]= segj.cx[iend]* qm;
-  }
-
-  jend= njun1;
-  for( iend = jend; iend < segj.jsno; iend++ )
-  {
-	segj.ax[iend]= -segj.ax[iend]* qp;
-	segj.bx[iend]= segj.bx[iend]* qp;
-	segj.cx[iend]= -segj.cx[iend]* qp;
-  }
-
-  segj.jsno= jsnop+1;
-  segj.ax[jsnop]=-1.0;
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* compute the components of all basis functions on segment j */
   void
 trio( int j )
@@ -1350,8 +1348,8 @@ zint( double sigl, double rolam, complex double *zint )
 
 #define th(d) ( (((((cc1*(d)+cc2)*(d)+cc3)*(d)+cc4)*(d)+cc5)*(d)+cc6)*(d) + cc7 )
 #define ph(d) ( (((((cc8*(d)+cc9)*(d)+cc10)*(d)+cc11)*(d)+cc12)*(d)+cc13)*(d)+cc14 )
-#define f(d)  ( csqrt(PITWO/(d))*cexp(-cn*(d)+th(-8.0/x)) )
-#define g(d)  ( cexp(cn*(d)+th(8.0/x))/csqrt(TWOPI*(d)) )
+#define f(d)  ( csqrt(M_PI_2/(d))*cexp(-cn*(d)+th(-8.0/x)) )
+#define g(d)  ( cexp(cn*(d)+th(8.0/x))/csqrt(M_2PI*(d)) )
 
   double x;
   double tpcmu = 2.368705e+3;
@@ -1390,7 +1388,7 @@ zint( double sigl, double rolam, complex double *zint )
 	} /* if( x <= 8.0) */
 	else
 	{
-	  br2= CPLX_01* f(x)/ PI;
+	  br2= CPLX_01* f(x)/ M_PI;
 	  br1= g( x)+ br2;
 	  br2= g( x)* ph(8.0/ x)- br2* ph(-8.0/ x);
 	  br1= br1/ br2;
diff --git a/src/calculations.h b/src/calculations.h
index a9e7d21..fd6e48e 100644
--- a/src/calculations.h
+++ b/src/calculations.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,8 +18,8 @@
 #define CALCULATIONS_H		1
 
 #include "common.h"
-#include "support.h"
 
-#define	CCJ		(0.0-I*0.01666666667)
+#define	CCJ		(0.0 - I * 0.01666666667)
 
 #endif
+
diff --git a/src/callback_func.c b/src/callback_func.c
index 2dbd0bd..de522ee 100644
--- a/src/callback_func.c
+++ b/src/callback_func.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,62 +14,36 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* callback_func.c
- *
- * Functions to handle GTK callbacks for xnec2c
- */
-
 #include "callback_func.h"
 #include "shared.h"
 
 /*-----------------------------------------------------------------------*/
 
-/* Save_Pixmap()
+/* Save_Pixbuf()
  *
- * Saves pixmaps as png files
+ * Saves pixbufs as png files
  */
-  void
-Save_Pixmap(
-	GdkPixmap *pixmap, int pixmap_width,
-	int pixmap_height, char *filename )
+  gboolean
+Save_Pixbuf( gpointer save_data )
 {
   GdkPixbuf *pixbuf;
   GError *error = NULL;
+  GdkWindow *window = gtk_widget_get_window(
+	  ((save_data_t *)save_data)->drawingarea );
 
-  /* Get image from pixmap */
-  gtk_widget_grab_focus( structure_drawingarea );
-  pixbuf = gdk_pixbuf_get_from_drawable(
-	  NULL, pixmap, gdk_drawable_get_colormap(pixmap),
-	  0, 0, 0, 0, pixmap_width, pixmap_height );
+  /* Get image from pixbuf */
+  pixbuf = gdk_pixbuf_get_from_window( window, 0, 0,
+	  ((save_data_t *)save_data)->width,
+	  ((save_data_t *)save_data)->height );
 
   /* Save image as PNG file */
-  gdk_pixbuf_save( pixbuf, filename, "png", &error, NULL );
+  gdk_pixbuf_save( pixbuf,
+	  ((save_data_t *)save_data)->filename, "png", &error, NULL );
   g_object_unref( pixbuf );
 
-} /* Save_Pixmap() */
-
-/*-----------------------------------------------------------------------*/
-
-/* New_Viewer_Angle()
- *
- * Sets parameters for a new viewer angle
- */
-void
-New_Viewer_Angle(
-	double wr, double wi,
-	GtkSpinButton *wr_spb,
-	GtkSpinButton *wi_spb,
-	projection_parameters_t *params )
-{
-  /* Recalculate projection paramenters */
-  params->Wr = wr;
-  params->Wi = wi;
-
-  /* Set new value */
-  Set_Spin_Button( wr_spb, (gdouble)params->Wr );
-  Set_Spin_Button( wi_spb, (gdouble)params->Wi );
+  return( FALSE );
 
-} /* New_Viewer_Angle() */
+} /* Save_Pixbuf() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -79,7 +51,7 @@ New_Viewer_Angle(
  *
  * Sets the value of a spin button
  */
-  void
+  static void
 Set_Spin_Button( GtkSpinButton *spin, gdouble value )
 {
   /* Save original value and set new */
@@ -94,38 +66,26 @@ Set_Spin_Button( GtkSpinButton *spin, gdouble value )
 
 /*-----------------------------------------------------------------------*/
 
-/* Create_Pixmap()
+/* New_Viewer_Angle()
  *
- * Creates or resizes a pixmap after a configure event
+ * Sets parameters for a new viewer angle
  */
 void
-Create_Pixmap(
-	GdkPixmap **pixmap,
-	int *pixmap_width,
-	int *pixmap_height,
-	GtkWidget *widget,
-	GdkEventConfigure *event,
+New_Viewer_Angle(
+	double wr, double wi,
+	GtkSpinButton *wr_spb,
+	GtkSpinButton *wi_spb,
 	projection_parameters_t *params )
 {
-  /* Create or resize pixmap */
-  if( *pixmap != NULL )
-  {
-	g_object_unref( *pixmap );
-	*pixmap = NULL;
-  }
-
-  *pixmap = gdk_pixmap_new(
-	  widget->window,
-	  event->width,
-	  event->height, -1 );
-  *pixmap_width  = event->width;
-  *pixmap_height = event->height;
+  /* Recalculate projection paramenters */
+  params->Wr = wr;
+  params->Wi = wi;
 
-  /* Calculate new projection parameters */
-  if( params != NULL )
-	New_Projection_Parameters( *pixmap_width, *pixmap_height, params );
+  /* Set new value */
+  Set_Spin_Button( wr_spb, (gdouble)params->Wr );
+  Set_Spin_Button( wi_spb, (gdouble)params->Wi );
 
-} /* Create_Pixmap() */
+} /* New_Viewer_Angle() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -147,6 +107,8 @@ Motion_Event(
   gchar value[6];
   size_t s = sizeof( value );
 
+  SetFlag( BLOCK_MOTION_EV );
+  
   /* Initialize saved x,y */
   if( params->reset )
   {
@@ -178,8 +140,7 @@ Motion_Event(
 	}
 
 	/* Set the rdpattern rotate/incline spinbuttons */
-	if( (isFlagSet(DRAW_ENABLED) &&
-		  isFlagSet(COMMON_PROJECTION)) ||
+	if( (isFlagSet(DRAW_ENABLED) && isFlagSet(COMMON_PROJECTION)) ||
 		(params->type == RDPATTERN_DRAWINGAREA) )
 	{
 	  rdpattern_proj_params.Wr -= dx / (gdouble)MOTION_EVENTS_COUNT;
@@ -211,12 +172,24 @@ Motion_Event(
 	/* Move structure or rdpattern axes on screen */
 	params->x_center += dx;
 	params->y_center -= dy;
+
 	if( params->type == STRUCTURE_DRAWINGAREA )
-	  Draw_Structure( structure_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( structure_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
+
 	if( params->type == RDPATTERN_DRAWINGAREA )
-	  Draw_Radiation( rdpattern_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
   }
 
+  ClearFlag( BLOCK_MOTION_EV );
+
 } /* Motion_Event() */
 
 /*-----------------------------------------------------------------------*/
@@ -241,7 +214,11 @@ Plot_Select( GtkToggleButton *togglebutton, unsigned long long int flag )
 
   /* Trigger a redraw of frequency plots drawingarea */
   if( isFlagSet(PLOT_ENABLED) && isFlagSet(FREQ_LOOP_DONE) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
 } /* Plot_Select() */
 
@@ -254,23 +231,23 @@ Plot_Select( GtkToggleButton *togglebutton, unsigned long long int flag )
  void
 Delete_Event( gchar *mesg )
 {
-  quit_dialog = create_quit_dialog();
+  quit_dialog = create_quit_dialog( &quit_dialog_builder );
   gtk_widget_show( quit_dialog );
 
   if( isFlagSet(FREQ_LOOP_RUNNING) )
   {
 	if( isFlagSet(MAIN_QUIT) )
-	  gtk_label_set_text( GTK_LABEL(lookup_widget(
-			  quit_dialog, "quit_label")),
-		  _("The frequency loop is running\n"\
+	  gtk_label_set_text( GTK_LABEL(
+			Builder_Get_Object(quit_dialog_builder, "quit_label")),
+		  _("The frequency loop is running\n"
 			"Really end operation?") );
-	else gtk_label_set_text( GTK_LABEL(lookup_widget(
-			quit_dialog, "quit_label")),
-		_("The frequency loop is running\n"\
+	else gtk_label_set_text( GTK_LABEL(
+		  Builder_Get_Object(quit_dialog_builder, "quit_label")),
+		_("The frequency loop is running\n"
 		  "Really close this window?") );
   }
-  else gtk_label_set_text( GTK_LABEL(lookup_widget(
-		  quit_dialog, "quit_label")), mesg );
+  else gtk_label_set_text( GTK_LABEL(
+		Builder_Get_Object(quit_dialog_builder, "quit_label")), mesg );
 
 } /* Delete_Event() */
 
@@ -281,9 +258,27 @@ Delete_Event( gchar *mesg )
  * Sets the polarization type menuitem to current setting
  */
   void
-Set_Pol_Menuitem( GtkMenuItem *menuitem )
+Set_Pol_Menuitem( int window )
 {
-  gchar *pol_menu[NUM_POL] =
+  gchar *main_pol_menu[NUM_POL] =
+  {
+	"main_total",
+	"main_horizontal",
+	"main_vertical",
+	"main_right_hand",
+	"main_left_hand",
+  };
+
+  gchar *freqplots_pol_menu[NUM_POL] =
+  {
+	"freqplots_total",
+	"freqplots_horizontal",
+	"freqplots_vertical",
+	"freqplots_right_hand",
+	"freqplots_left_hand",
+  };
+
+  gchar *rdpattern_pol_menu[NUM_POL] =
   {
 	"rdpattern_total",
 	"rdpattern_horizontal",
@@ -292,37 +287,28 @@ Set_Pol_Menuitem( GtkMenuItem *menuitem )
 	"rdpattern_left_hand",
   };
 
-  gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(lookup_widget(
-		  GTK_WIDGET(menuitem), pol_menu[calc_data.pol_type])), TRUE );
-
-} /* Set_Pol_Menuitem() */
-
-/*-----------------------------------------------------------------------*/
-
-/* Close_Windows()
- *
- * Closes some open windows
- */
-  void
-Close_Windows( void )
-{
-  if( isFlagSet(PLOT_ENABLED) )
+  switch( window )
   {
-	gtk_widget_destroy( freqplots_window );
-	gtk_check_menu_item_set_active(
-		GTK_CHECK_MENU_ITEM(lookup_widget(
-			main_window, "main_freqplots")), FALSE );
-  }
+	case MAIN_WINDOW:
+	  gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+			Builder_Get_Object(main_window_builder,
+			  main_pol_menu[calc_data.pol_type])), TRUE );
+	  break;
+
+	case FREQPLOTS_WINDOW:
+	  gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+			Builder_Get_Object(freqplots_window_builder,
+			  freqplots_pol_menu[calc_data.pol_type])), TRUE );
+	  break;
+
+	case RDPATTERN_WINDOW:
+	  gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+			Builder_Get_Object(rdpattern_window_builder,
+			  rdpattern_pol_menu[calc_data.pol_type])), TRUE );
+	  break;
+  } /* switch( window ) */
 
-  if( isFlagSet(DRAW_ENABLED) )
-  {
-	gtk_widget_destroy( rdpattern_window );
-	gtk_check_menu_item_set_active(
-		GTK_CHECK_MENU_ITEM(lookup_widget(
-			main_window, "main_rdpattern")), FALSE );
-  }
-
-} /* Close_Windows() */
+} /* Set_Pol_Menuitem() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -349,6 +335,10 @@ Open_Editor( GtkTreeView *view )
   gtk_tree_model_get( model, &iter, 0, &card, -1);
   size_t s = strlen( card ) + 1;
 
+  /* Ignore cards from comments */
+  if( (strcmp(card, "CM") == 0) || (strcmp(card, "CE") == 0) )
+	return( TRUE );
+
   /* Some "cards" have common editors */
   if( strcmp(card, "GC") == 0 )
 	Strlcpy( card, "GW", s );
@@ -369,7 +359,7 @@ Open_Editor( GtkTreeView *view )
   /* Send a "clicked" signal to the appropriate editor button */
   card[0] = (gchar)tolower((int)card[0]);
   card[1] = (gchar)tolower((int)card[1]);
-  button = lookup_widget( GTK_WIDGET(view), card );
+  button = Builder_Get_Object( nec2_editor_builder, card );
   g_free(card);
   if( button != NULL )
 	g_signal_emit_by_name( button, "clicked" );
@@ -391,15 +381,15 @@ Main_Rdpattern_Activate( gboolean from_menu )
   if( fpat.nfeh & NEAR_EFIELD )
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_e_field")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_e_field")),
+		TRUE );
 	SetFlag( DRAW_EFIELD );
   }
   else
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_e_field")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_e_field")),
+		FALSE );
 	ClearFlag( DRAW_EFIELD );
   }
 
@@ -407,15 +397,15 @@ Main_Rdpattern_Activate( gboolean from_menu )
   if( fpat.nfeh & NEAR_HFIELD )
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_h_field")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_h_field")),
+		TRUE );
 	SetFlag( DRAW_HFIELD );
   }
   else
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_h_field")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_h_field")),
+		FALSE );
 	ClearFlag( DRAW_HFIELD );
   }
 
@@ -423,27 +413,30 @@ Main_Rdpattern_Activate( gboolean from_menu )
   if( (fpat.nfeh & NEAR_EHFIELD) == NEAR_EHFIELD )
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_poynting_vector")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_poynting_vector")),
+		TRUE );
 	SetFlag( DRAW_POYNTING );
   }
   else
   {
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_poynting_vector")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder,
+			"rdpattern_poynting_vector")),
+		FALSE );
 	ClearFlag( DRAW_POYNTING );
   }
 
   /* Set structure overlay in Rad Pattern window */
   if( isFlagClear(OVERLAY_STRUCT) )
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_overlay_structure")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder,
+			"rdpattern_overlay_structure")),
+		FALSE );
   else
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"rdpattern_overlay_structure")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder,
+			"rdpattern_overlay_structure")),
+		TRUE );
 
 
   /* Sync common projection spinbuttons */
@@ -503,8 +496,8 @@ Main_Freqplots_Activate( void )
    * Elementary Current Source Excitation */
   if( (fpat.ixtyp != 0) && (fpat.ixtyp != 5) )
   {
-	stop( _("Not available for Incident Field or\n"\
-		  "Elementary Current Source Excitation.\n"\
+	stop( _("Not available for Incident Field or\n"
+		  "Elementary Current Source Excitation.\n"
 		  "(Excitation Types 1 to 4)"), ERR_OK );
 	return( FALSE );
   }
@@ -533,16 +526,19 @@ Rdpattern_Gain_Togglebutton_Toggled( gboolean flag )
   {
 	SetFlag( DRAW_GAIN );
 	ClearFlag( DRAW_EHFIELD );
-	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(
-			rdpattern_window, "rdpattern_eh_togglebutton")), FALSE );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_eh_togglebutton")),
+		FALSE );
 
 	/* Redraw radiation pattern drawingarea */
-	if( isFlagSet(DRAW_ENABLED) &&
-		isFlagClear(FREQ_LOOP_RUNNING) )
+	if( isFlagSet(DRAW_ENABLED) && isFlagClear(FREQ_LOOP_RUNNING) )
 	{
 	  if( !crnt.valid ) Redo_Currents( NULL );
 	  SetFlag( DRAW_NEW_RDPAT );
-	  Draw_Radiation( rdpattern_drawingarea );
+
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
 	}
 
 	Set_Window_Labels();
@@ -551,9 +547,12 @@ Rdpattern_Gain_Togglebutton_Toggled( gboolean flag )
   {
 	ClearFlag( DRAW_GAIN );
 	/* Clear radiation pattern drawingarea */
-	if( isFlagClear(DRAW_EHFIELD) &&
-		isFlagSet(DRAW_ENABLED) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	if( isFlagClear(DRAW_EHFIELD) && isFlagSet(DRAW_ENABLED) )
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
 	Free_Draw_Buffers();
   }
 
@@ -577,8 +576,9 @@ Rdpattern_EH_Togglebutton_Toggled( gboolean flag )
   {
 	SetFlag( DRAW_EHFIELD );
 	ClearFlag( DRAW_GAIN );
-	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(
-			rdpattern_window, "rdpattern_gain_togglebutton")), FALSE );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_gain_togglebutton")),
+		FALSE );
 
 	/* Delegate near field calcuations to child
 	 * processes if forked and near field data valid */
@@ -589,13 +589,15 @@ Rdpattern_EH_Togglebutton_Toggled( gboolean flag )
 	}
 
 	/* Redraw radiation pattern drawingarea */
-	if( isFlagSet(DRAW_ENABLED) &&
-		isFlagClear(FREQ_LOOP_RUNNING) )
+	if( isFlagSet(DRAW_ENABLED) && isFlagClear(FREQ_LOOP_RUNNING) )
 	{
 	  if( !near_field.valid ) Redo_Currents(NULL);
 	  Near_Field_Pattern();
 	  SetFlag( DRAW_NEW_EHFIELD );
-	  Draw_Radiation( rdpattern_drawingarea );
+
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
 	}
 
 	Set_Window_Labels();
@@ -606,9 +608,12 @@ Rdpattern_EH_Togglebutton_Toggled( gboolean flag )
 	ClearFlag( DRAW_EHFIELD );
 
 	/* Clear radiation pattern drawingarea */
-	if( isFlagClear(DRAW_GAIN)  &&
-		isFlagSet(DRAW_ENABLED) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	if( isFlagClear(DRAW_GAIN) && isFlagSet(DRAW_ENABLED) )
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
 
 	/* Disable near field calcuations
 	 * by child processes if forked */
@@ -619,6 +624,46 @@ Rdpattern_EH_Togglebutton_Toggled( gboolean flag )
 
 /*-----------------------------------------------------------------------*/
 
+/* Alloc_Crnt_Buffs()
+ *
+ * Allocates memory for current/charge draw buffers
+ */
+  static void
+Alloc_Crnt_Buffs( void )
+{
+  /* Patch currents buffer */
+  if( data.m > 0 )
+  {
+	size_t mreq = (size_t)data.m * sizeof( double );
+	mem_realloc( (void **)&ct1m, mreq, "in callback_func.c" );
+	mem_realloc( (void **)&ct2m, mreq, "in callback_func.c" );
+  }
+
+  /* Segment currents buffer */
+  if( data.n > 0 )
+  {
+	size_t mreq = (size_t)data.n * sizeof( double );
+	mem_realloc( (void **)&cmag, mreq, "in callback_func.c" );
+  }
+
+} /* Alloc_Crnt_Buffs() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Free_Crnt_Buffs()
+ *
+ * Frees current/charge draw buffers
+ */
+  static void
+Free_Crnt_Buffs( void )
+{
+  free_ptr( (void **)&ct1m );
+  free_ptr( (void **)&ct2m );
+  free_ptr( (void **)&cmag );
+} /* Free_Crnt_Buffs() */
+
+/*-----------------------------------------------------------------------*/
+
 /* Main_Currents_Togglebutton_Toggled()
  *
  * Callback function for Main Currents toggle button
@@ -635,19 +680,28 @@ Main_Currents_Togglebutton_Toggled( gboolean flag )
 	Alloc_Crnt_Buffs();
 
 	gtk_toggle_button_set_active(
-		GTK_TOGGLE_BUTTON(lookup_widget(main_window,
-			"main_charges_togglebutton")), FALSE );
-	gtk_label_set_text(
-		GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		GTK_TOGGLE_BUTTON(Builder_Get_Object(
+			main_window_builder, "main_charges_togglebutton")),
+		FALSE );
+	gtk_label_set_text(GTK_LABEL(Builder_Get_Object(
+			main_window_builder, "struct_label")),
 		_("View Currents") );
 
 	if( !crnt.valid && isFlagClear(FREQ_LOOP_RUNNING) )
 	  Redo_Currents( NULL );
 	else if( crnt.valid )
-	  Draw_Structure( structure_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( structure_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
 
 	if( isFlagSet(OVERLAY_STRUCT) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
   }
   else
   {
@@ -655,16 +709,25 @@ Main_Currents_Togglebutton_Toggled( gboolean flag )
 	if( isFlagClear(DRAW_CHARGES) )
 	{
 	  /* Redraw structure on screen if frequency loop is not running */
-	  gtk_label_set_text(
-		  GTK_LABEL(lookup_widget(main_window, "struct_label")),
+	  gtk_label_set_text( GTK_LABEL(
+			Builder_Get_Object(main_window_builder, "struct_label")),
 		  _("View Geometry") );
 	  if( isFlagClear(FREQ_LOOP_RUNNING) )
-		Draw_Structure( structure_drawingarea );
+	  {
+		/* Wait for GTK to complete its tasks */
+		gtk_widget_queue_draw( structure_drawingarea );
+		while( g_main_context_iteration(NULL, FALSE) );
+	  }
 	  Free_Crnt_Buffs();
 	}
 	if( isFlagSet(OVERLAY_STRUCT) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
   }
+
 } /* Main_Currents_Togglebutton_Toggled() */
 
 /*-----------------------------------------------------------------------*/
@@ -684,19 +747,28 @@ Main_Charges_Togglebutton_Toggled( gboolean flag )
 	Alloc_Crnt_Buffs();
 
 	gtk_toggle_button_set_active(
-		GTK_TOGGLE_BUTTON(lookup_widget(main_window,
-			"main_currents_togglebutton")), FALSE );
-	gtk_label_set_text(
-		GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(main_window_builder, "main_currents_togglebutton")),
+		FALSE );
+	gtk_label_set_text(GTK_LABEL(
+		  Builder_Get_Object(main_window_builder, "struct_label")),
 		_("View Charges") );
 
 	if( !crnt.valid && isFlagClear(FREQ_LOOP_RUNNING) )
 	  Redo_Currents( NULL );
 	else if( crnt.valid )
-	  Draw_Structure( structure_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( structure_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
 
 	if( isFlagSet(OVERLAY_STRUCT) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
   }
   else
   {
@@ -705,19 +777,200 @@ Main_Charges_Togglebutton_Toggled( gboolean flag )
 	{
 	  /* Redraw structure on screen if frequency loop is not running */
 	  gtk_label_set_text(
-		  GTK_LABEL(lookup_widget(main_window, "struct_label")),
-		  _("View Geometry") );
+		  GTK_LABEL(Builder_Get_Object(
+			  main_window_builder, "struct_label")), _("View Geometry") );
+
 	  if( isFlagClear(FREQ_LOOP_RUNNING) )
-		Draw_Structure( structure_drawingarea );
+	  {
+		/* Wait for GTK to complete its tasks */
+		gtk_widget_queue_draw( structure_drawingarea );
+		while( g_main_context_iteration(NULL, FALSE) );
+	  }
+
 	  Free_Crnt_Buffs();
 	}
+
 	if( isFlagSet(OVERLAY_STRUCT) )
-	  Draw_Radiation( rdpattern_drawingarea );
+	{
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+	}
   }
+
 } /* Main_Charges_Togglebutton_Toggled() */
 
 /*-----------------------------------------------------------------------*/
 
+/* Open_Filechooser()
+ *
+ * Opens the file chooser dialog to select open or save files
+ */
+  GtkWidget *
+Open_Filechooser(
+	GtkFileChooserAction action,
+	char *pattern,
+	char *prefix,
+	char *filename,
+	char *foldername )
+{
+  /* Create file chooser and set action */
+  GtkBuilder *builder;
+  GtkWidget *file_chooser = create_filechooserdialog( &builder );
+  gtk_file_chooser_set_action( GTK_FILE_CHOOSER(file_chooser), action );
+
+  /* Create and set a filter for the file pattern */
+  GtkFileFilter *filter = gtk_file_filter_new();
+  gtk_file_filter_add_pattern( filter, pattern );
+
+  /* Set the filter name */
+  if( strcmp(pattern, "*.png") == 0 )
+	gtk_file_filter_set_name( filter, _("PNG images (*.png)") );
+  else if( strcmp(pattern, "*.gplot") == 0 )
+	gtk_file_filter_set_name( filter, _("GNUplot files (*.gplot)") );
+  else if( strcmp(pattern, "*.nec") == 0 )
+	gtk_file_filter_set_name( filter, _("NEC2 files (*.nec)") );
+
+  /* Add and set filter */
+  gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), filter );
+  gtk_file_chooser_set_filter( GTK_FILE_CHOOSER(file_chooser), filter );
+
+  /* Set current filename if given */
+  if( filename != NULL )
+  {
+	char fname[144];
+	if( prefix != NULL )
+	{
+	  Strlcpy( fname, xnec2c_files, sizeof(fname) );
+	  Strlcat( fname, filename, sizeof(fname) );
+	}
+	else
+	  Strlcpy( fname, filename, sizeof(fname) );
+
+	gtk_file_chooser_set_current_name(
+		GTK_FILE_CHOOSER(file_chooser), fname );
+  }
+
+  /* Set folder name if given */
+  if( foldername != NULL )
+	gtk_file_chooser_set_current_folder(
+		GTK_FILE_CHOOSER(file_chooser), foldername );
+  gtk_widget_show( file_chooser);
+  g_object_unref( builder );
+
+  return( file_chooser );
+
+} /* Open_Filechooser() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Filechooser_Response()
+ *
+ * Handles the on_filechooserdialog_response callback
+ */
+  void
+Filechooser_Response(
+	GtkDialog *dialog,
+	gint response_id,
+	int saveas_width,
+	int saveas_height )
+{
+  /* User selects a file name to save a pixbuf to file */
+  if( response_id == GTK_RESPONSE_OK )
+  {
+	gchar *fname;
+	gchar filename[128];
+	gboolean new = TRUE;
+	char *str;
+
+
+	/* Get the "save as" file name */
+	fname = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
+	Strlcpy( filename, fname, sizeof(filename) );
+	gtk_widget_destroy( GTK_WIDGET(dialog) );
+
+	if( isFlagSet(OPEN_INPUT) )
+	{
+	  ClearFlag( FREQLOOP_READY );
+
+	  /* Save any changes to an open file */
+	  Save_Nec2_Input_File( nec2_edit_window, infile );
+	  Strlcpy( infile, fname, sizeof(infile) );
+
+	  /* Open new file */
+	  Open_Input_File( (gpointer)&new );
+	}
+	else if( isFlagSet(NEC2_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".nec" );
+	  if( (str == NULL) || (str[4] != '\0') )
+		Strlcat( filename, ".nec", sizeof(filename) );
+
+	  /* Use new file name as input file */
+	  Strlcpy( infile, filename, sizeof(infile) );
+	  Save_Nec2_Input_File( nec2_edit_window, infile );
+
+	  /* Re-open NEC2 input file */
+	  if( Nec2_Apply_Checkbutton() )
+		Open_Input_File( (gpointer)&new );
+	}
+	else if( isFlagSet(IMAGE_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".png" );
+	  if( (str == NULL) || (str[4] != '\0') )
+		Strlcat( filename, ".png", sizeof(filename) );
+
+	  /* Save screen shots after redraw and when GTK is finished tasks */
+	  static save_data_t save_data;
+
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( saveas_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
+
+	  save_data.drawingarea = saveas_drawingarea;
+	  save_data.width  = saveas_width;
+	  save_data.height = saveas_height;
+	  Strlcpy( save_data.filename, filename, sizeof(save_data.filename) );
+	  g_idle_add( Save_Pixbuf, (gpointer)&save_data );
+	}
+	else if( isFlagSet(RDPAT_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", sizeof(filename) );
+	  Save_RadPattern_Gnuplot_Data( filename );
+	}
+	else if( isFlagSet(PLOTS_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", sizeof(filename) );
+	  Save_FreqPlots_Gnuplot_Data( filename );
+	}
+	else if( isFlagSet(STRCT_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", sizeof(filename) );
+	  Save_Struct_Gnuplot_Data( filename );
+	}
+	g_free( fname );
+
+	if( (kill_window == nec2_edit_window) &&
+		(kill_window != NULL) )
+	  gtk_widget_destroy( nec2_edit_window );
+
+  } /* if( response_id == GTK_RESPONSE_OK ) */
+
+} /* Filechooser_Response() */
+
+/*-----------------------------------------------------------------------*/
+
 /* Open_Nec2_Editor()
  *
  * Opens NEC2 editor window and fills
@@ -726,22 +979,23 @@ Main_Charges_Togglebutton_Toggled( gboolean flag )
   void
 Open_Nec2_Editor( int action )
 {
-  nec2_edit_window = create_nec2_editor();
+  nec2_edit_window = create_nec2_editor( &nec2_editor_builder );
   gtk_widget_show( nec2_edit_window );
 
   geom_treeview = GTK_TREE_VIEW(
-	  lookup_widget(nec2_edit_window, "nec2_geom_treeview") );
+	  Builder_Get_Object(nec2_editor_builder, "nec2_geom_treeview") );
   cmnd_treeview = GTK_TREE_VIEW(
-	  lookup_widget(nec2_edit_window, "nec2_cmnd_treeview") );
+	  Builder_Get_Object(nec2_editor_builder, "nec2_cmnd_treeview") );
 
   Nec2_Input_File_Treeview( action );
 
-  geom_adjustment = gtk_scrolled_window_get_vadjustment(
-	  GTK_SCROLLED_WINDOW(lookup_widget(nec2_edit_window,
-		  "scrolledwindow4")) );
-  cmnd_adjustment = gtk_scrolled_window_get_vadjustment(
-	  GTK_SCROLLED_WINDOW(lookup_widget(nec2_edit_window,
-		  "scrolledwindow3")) );
+  geom_adjustment =
+	gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(
+		Builder_Get_Object(nec2_editor_builder, "geom_scrolledwindow")) );
+  cmnd_adjustment =
+	gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(
+		Builder_Get_Object(nec2_editor_builder, "cmnd_scrolledwindow")) );
+
 } /* Open_Nec2_Editor() */
 
 /*-----------------------------------------------------------------------*/
@@ -755,8 +1009,7 @@ Open_Nec2_Editor( int action )
 Nec2_Apply_Checkbutton( void )
 {
   return( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
-		  lookup_widget(nec2_edit_window,
-			"nec2_apply_checkbutton" ))) );
+		  Builder_Get_Object(nec2_editor_builder, "nec2_apply_checkbutton" ))) );
 }
 
 /*-----------------------------------------------------------------------*/
@@ -824,43 +1077,24 @@ Pass_EH_Flags( void )
 
 /*-----------------------------------------------------------------------*/
 
-/* Alloc_Crnt_Buffs()
- *
- * Allocates memory for current/charge draw buffers
- */
   void
-Alloc_Crnt_Buffs( void )
+Draw_Colorcode( cairo_t *cr )
 {
-  /* Patch currents buffer */
-  if( data.m > 0 )
-  {
-	size_t mreq = (size_t)data.m * sizeof( double );
-	mem_realloc( (void **)&ct1m, mreq, "in callback_func.c" );
-	mem_realloc( (void **)&ct2m, mreq, "in callback_func.c" );
-  }
+  double red = 0.0, grn = 0.0, blu = 0.0;
+  int idx;
 
-  /* Segment currents buffer */
-  if( data.n > 0 )
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) ) return;
+
+  /* Draw color-code bar in main window */
+  for( idx = 0; idx < 160; idx++ )
   {
-	size_t mreq = (size_t)data.n * sizeof( double );
-	mem_realloc( (void **)&cmag, mreq, "in callback_func.c" );
+	Value_to_Color( &red, &grn, &blu,(double) (8 * idx), 1280.0 );
+	cairo_set_source_rgb( cr, red, grn, blu );
+	Cairo_Draw_Line( cr, idx, 0, idx, 28 );
   }
 
-} /* Alloc_Crnt_Buffs() */
-
-/*-----------------------------------------------------------------------*/
-
-/* Free_Crnt_Buffs()
- *
- * Frees current/charge draw buffers
- */
-  void
-Free_Crnt_Buffs( void )
-{
-  free_ptr( (void **)&ct1m );
-  free_ptr( (void **)&ct2m );
-  free_ptr( (void **)&cmag );
-} /* Free_Crnt_Buffs() */
+} /* Draw_Colorcode() */
 
 /*-----------------------------------------------------------------------*/
 
diff --git a/src/callback_func.h b/src/callback_func.h
index 238ba4e..0f669c6 100644
--- a/src/callback_func.h
+++ b/src/callback_func.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -22,10 +20,16 @@
 #include <ctype.h>
 #include "callbacks.h"
 #include "interface.h"
-#include "support.h"
 #include "editors.h"
 #include "fork.h"
 #include "common.h"
 
+typedef struct save_data
+{
+  GtkWidget *drawingarea;
+  int width, height;
+  char filename[128];
+} save_data_t;
+
 #endif
 
diff --git a/src/callbacks.c b/src/callbacks.c
index 4b82f1b..075813b 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,72 +14,60 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-
 #include "callbacks.h"
-#include "interface.h"
-#include "support.h"
-#include "fork.h"
-#include "xnec2c.h"
-#include "editors.h"
-#include "nec2_model.h"
 #include "shared.h"
-#include <gdk/gdkkeysyms.h>
 
 /* File chooser/select widgets */
-static GtkWidget *file_chooser   = NULL;
-static GtkWidget *file_selection = NULL;
+static GtkWidget *file_chooser = NULL;
 
 /* Tree view clicked on by user */
 static GtkTreeView *selected_treeview = NULL;
 
-/* Pixmap for saving drawable images */
-static GdkPixmap *saveas_pixmap = NULL;
-static int saveas_pixmap_width, saveas_pixmap_height;
-
 /* Action flag for NEC2 "card" editors */
 static int action = EDITOR_NEW;
 
+static int saveas_width;
+static int saveas_height;
+
 /*-----------------------------------------------------------------------*/
 
   void
-on_main_window_destroy                 (GtkObject       *object,
-										gpointer         user_data)
+on_main_window_destroy(
+	GObject     *object,
+	gpointer	user_data)
 {
   Gtk_Quit();
 }
 
 
   gboolean
-on_main_window_delete_event            (GtkWidget       *widget,
-										GdkEvent        *event,
-										gpointer         user_data)
+on_main_window_delete_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   kill_window = main_window;
   SetFlag( MAIN_QUIT );
   Delete_Event( _("Really quit xnec2c?") );
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_new_activate     	              (GtkMenuItem     *menuitem,
-									   gpointer         user_data)
+on_new_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* No save/open file while freq loop is running */
   if( !Nec2_Save_Warn(
-		_("A new NEC2 input file may not be created\n"\
+		_("A new NEC2 input file may not be created\n"
 		  "while the Frequency Loop is running") ) )
 	return;
 
   /* Save open file, if any */
   if( (input_fp != NULL) && (nec2_edit_window != NULL) )
   {
-	stop( _("Saving already open NEC2 file\n"\
+	stop( _("Saving already open NEC2 file\n"
 		  "before opening new default file"), ERR_OK );
 	Save_Nec2_Input_File( nec2_edit_window, infile );
 	infile[0] = '\0';
@@ -99,29 +85,31 @@ on_new_activate     	              (GtkMenuItem     *menuitem,
 
 
   void
-on_open_input_activate     		       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_open_input_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* No save/open file while freq loop is running */
   if( !Nec2_Save_Warn(
-		_("A new NEC2 input file may not be opened\n"\
+		_("A new NEC2 input file may not be opened\n"
 		  "while the Frequency Loop is running")) )
 	return;
 
   /* Open file chooser to select a NEC2 input file */
-  file_chooser = create_filechooserdialog();
-  gtk_widget_show( file_chooser );
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( OPEN_INPUT );
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_OPEN, "*.nec", NULL, NULL, xnec2c_files );
 
-  /* Set filechooser file name to previously selected, if any */
   if( (strlen(infile) != 0) && (infile[0] == '/') )
-	gtk_file_chooser_set_filename(
-		GTK_FILE_CHOOSER(file_chooser), infile );
+	gtk_file_chooser_set_filename( GTK_FILE_CHOOSER(file_chooser), infile );
 }
 
 
   void
-on_main_save_activate        (GtkMenuItem     *menuitem,
-							  gpointer         user_data)
+on_main_save_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   char saveas[96];
   size_t s = sizeof( saveas );
@@ -130,8 +118,7 @@ on_main_save_activate        (GtkMenuItem     *menuitem,
    * currents or charges, to avoid over-writing saved files */
   static int cgm = 0, ccr = 0, cch = 0;
 
-  if( strlen(infile) == 0 )
-	return;
+  if( strlen(infile) == 0 ) return;
 
   /* Make the structure image save file name from input file
    * name. The count of each image type saved is incremented */
@@ -142,53 +129,52 @@ on_main_save_activate        (GtkMenuItem     *menuitem,
   else
 	snprintf( saveas, s, "%s-%s_%03d.%s", infile, "geometry", ++cgm, "png" );
 
-  saveas_pixmap = structure_pixmap;
-  saveas_pixmap_width  = structure_pixmap_width;
-  saveas_pixmap_height = structure_pixmap_height;
+  saveas_drawingarea = structure_drawingarea;
+  saveas_width  = structure_width;
+  saveas_height = structure_height;
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( IMAGE_SAVE );
 
-  /* Open file selector to specify file  */
-  /* name for saving the structure image */
-  file_selection = create_fileselection();
-  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
-  gtk_widget_show( file_selection );
+  /* Open file chooser to save structure image */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.png", NULL, saveas, xnec2c_files );
 }
 
 
   void
-on_main_save_as_activate               (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_main_save_as_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  saveas_pixmap = structure_pixmap;
-  saveas_pixmap_width  = structure_pixmap_width;
-  saveas_pixmap_height = structure_pixmap_height;
+  saveas_drawingarea = structure_drawingarea;
+  saveas_width  = structure_width;
+  saveas_height = structure_height;
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( IMAGE_SAVE );
 
-  /* Open file selector to specify file  */
-  /* name for saving the structure image */
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+  /* Open file chooser to save structure image */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.png", NULL, "untitled.png", xnec2c_files );
 }
 
-
   void
-on_struct_save_as_gnuplot_activate     (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_struct_save_as_gnuplot_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  /* Open file selector to specify a file
-   * name for saving the rad pattern image */
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( STRCT_GNUPLOT_SAVE );
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+
+  /* Open file chooser to save structure image */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.gplot", NULL, "untitled.gplot", xnec2c_files );
 }
 
 
   void
-on_quit_activate                       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_quit_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   kill_window = main_window;
   SetFlag( MAIN_QUIT );
@@ -197,45 +183,49 @@ on_quit_activate                       (GtkMenuItem     *menuitem,
 
 
   void
-on_main_rdpattern_activate             (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_main_rdpattern_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Open radiation pattern rendering window */
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
   {
-	rdpattern_window = create_rdpattern_window();
+	rdpattern_window = create_rdpattern_window( &rdpattern_window_builder );
 	gtk_widget_show( rdpattern_window );
-	rdpattern_drawingarea = lookup_widget(
-		rdpattern_window, "rdpattern_drawingarea" );
-	rdpattern_motion_handler = g_signal_connect (
-		(gpointer) rdpattern_drawingarea,
-		"motion_notify_event",
-		G_CALLBACK (on_rdpattern_drawingarea_motion_notify_event),
-		NULL);
-	gtk_widget_add_events(
-		GTK_WIDGET(rdpattern_drawingarea),
-		GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK );
-	rotate_rdpattern  = GTK_SPIN_BUTTON(lookup_widget(
-		  rdpattern_window, "rdpattern_rotate_spinbutton"));
-	incline_rdpattern = GTK_SPIN_BUTTON(lookup_widget(
-		  rdpattern_window, "rdpattern_incline_spinbutton"));
-	rdpattern_frequency = GTK_SPIN_BUTTON(lookup_widget(
-		  rdpattern_window, "rdpattern_freq_spinbutton"));
-	rdpattern_zoom = GTK_SPIN_BUTTON(lookup_widget(
-		  rdpattern_window, "rdpattern_zoom_spinbutton"));
-	rdpattern_fstep_entry = GTK_ENTRY(lookup_widget(
-		  rdpattern_window, "rdpattern_fstep_entry")) ;
+	rdpattern_drawingarea =
+	  Builder_Get_Object( rdpattern_window_builder, "rdpattern_drawingarea" );
+
+	GtkAllocation alloc;
+	gtk_widget_get_allocation( rdpattern_drawingarea, &alloc );
+	rdpattern_width  = alloc.width;
+	rdpattern_height = alloc.height;
+	New_Projection_Parameters(
+		rdpattern_width,
+		rdpattern_height,
+		&rdpattern_proj_params );
+
+	rotate_rdpattern  = GTK_SPIN_BUTTON(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_rotate_spinbutton") );
+	incline_rdpattern = GTK_SPIN_BUTTON(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_incline_spinbutton") );
+	rdpattern_frequency = GTK_SPIN_BUTTON(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_freq_spinbutton") );
+	rdpattern_zoom = GTK_SPIN_BUTTON(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_zoom_spinbutton") );
+	rdpattern_fstep_entry = GTK_ENTRY(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_fstep_entry") ) ;
 
 	Main_Rdpattern_Activate( TRUE );
   }
   else if( isFlagSet(DRAW_ENABLED) )
-	  gtk_widget_destroy( rdpattern_window );
+	gtk_widget_destroy( rdpattern_window );
 }
 
 
   void
-on_main_freqplots_activate             (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_main_freqplots_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Open window for plotting frequency
    * related data (gain, vswr etc) */
@@ -243,12 +233,18 @@ on_main_freqplots_activate             (GtkMenuItem     *menuitem,
   {
 	if( Main_Freqplots_Activate() )
 	{
-	  freqplots_window = create_freqplots_window();
+	  freqplots_window = create_freqplots_window( &freqplots_window_builder );
 	  gtk_widget_show( freqplots_window );
-	  freqplots_drawingarea = lookup_widget(
-		  freqplots_window, "freqplots_drawingarea" );
+	  freqplots_drawingarea =
+		Builder_Get_Object( freqplots_window_builder, "freqplots_drawingarea" );
 	  Set_Window_Labels();
 	  calc_data.ngraph = 0;
+
+	  GtkAllocation alloc;
+	  gtk_widget_get_allocation( freqplots_drawingarea, &alloc );
+	  freqplots_width  = alloc.width;
+	  freqplots_height = alloc.height;
+
 	} /* if( Main_Freqplots_Activate() */
 	else gtk_check_menu_item_set_active(
 		GTK_CHECK_MENU_ITEM(menuitem), FALSE );
@@ -259,48 +255,54 @@ on_main_freqplots_activate             (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_total_activate            (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_total_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   Set_Polarization( POL_TOTAL );
 }
 
 
   void
-on_rdpattern_horizontal_activate       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_horizontal_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   Set_Polarization( POL_HORIZ );
 }
 
 
   void
-on_rdpattern_vertical_activate         (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_vertical_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   Set_Polarization( POL_VERT );
 }
 
 
   void
-on_rdpattern_right_hand_activate       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_right_hand_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   Set_Polarization( POL_RHCP );
 }
 
 
   void
-on_rdpattern_left_hand_activate        (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_left_hand_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   Set_Polarization( POL_LHCP );
 }
 
 
   void
-on_common_projection_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_common_projection_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Enable syncing of projection params
    * for structure and rad pattern drawing */
@@ -325,13 +327,13 @@ on_common_projection_activate          (GtkMenuItem     *menuitem,
 
 
   void
-on_common_freq_activate                (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_common_freq_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Enable syncing of frequency spinbuttons
    * between main and rad pattern windows */
-  if( gtk_check_menu_item_get_active(
-		GTK_CHECK_MENU_ITEM(menuitem)) )
+  if( gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( COMMON_FREQUENCY );
   else
 	ClearFlag( COMMON_FREQUENCY );
@@ -339,8 +341,9 @@ on_common_freq_activate                (GtkMenuItem     *menuitem,
 
 
   void
-on_main_x_axis_clicked                 (GtkButton       *button,
-										gpointer         user_data)
+on_main_x_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 0.0, 0.0, rotate_structure,
@@ -352,8 +355,9 @@ on_main_x_axis_clicked                 (GtkButton       *button,
 
 
   void
-on_main_y_axis_clicked                 (GtkButton       *button,
-										gpointer         user_data)
+on_main_y_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 90.0, 0.0, rotate_structure,
@@ -365,8 +369,9 @@ on_main_y_axis_clicked                 (GtkButton       *button,
 
 
   void
-on_main_z_axis_clicked                 (GtkButton       *button,
-										gpointer         user_data)
+on_main_z_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 0.0, 90.0, rotate_structure,
@@ -378,8 +383,9 @@ on_main_z_axis_clicked                 (GtkButton       *button,
 
 
   void
-on_main_default_view_clicked           (GtkButton       *button,
-										gpointer         user_data)
+on_main_default_view_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Projection at 45 deg rotation and inclination */
   New_Viewer_Angle( 45.0, 45.0, rotate_structure,
@@ -390,7 +396,7 @@ on_main_default_view_clicked           (GtkButton       *button,
 }
 
 
-void
+  void
 on_main_rotate_spinbutton_value_changed(
 	GtkSpinButton   *spinbutton,
 	gpointer         user_data)
@@ -435,8 +441,9 @@ on_main_incline_spinbutton_value_changed(
 
 
   void
-on_main_currents_togglebutton_toggled  (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_main_currents_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable calculation and rendering of structure curents */
   Main_Currents_Togglebutton_Toggled(
@@ -445,8 +452,9 @@ on_main_currents_togglebutton_toggled  (GtkToggleButton *togglebutton,
 
 
   void
-on_main_charges_togglebutton_toggled   (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_main_charges_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable calculation and rendering of structure charge density */
   Main_Charges_Togglebutton_Toggled(
@@ -454,36 +462,21 @@ on_main_charges_togglebutton_toggled   (GtkToggleButton *togglebutton,
 }
 
 
-gboolean
-on_main_colorcode_drawingarea_expose_event(	GtkWidget       *widget,
-											GdkEventExpose  *event,
-											gpointer         user_data)
+  gboolean
+on_main_colorcode_drawingarea_draw(
+	GtkWidget       *widget,
+	cairo_t         *cr,
+	gpointer         user_data)
 {
-  double red = 0.0, grn = 0.0, blu = 0.0;
-  int idx;
-
-  /* No redraws if new input pending */
-  if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
-
-  cairo_t *cr = gdk_cairo_create( widget-> window );
-
-  /* Draw color-code bar in main window */
-  for( idx = 0; idx < 160; idx++ )
-  {
-	Value_to_Color( &red, &grn, &blu, (double) (8*idx), 1280.0 );
-	cairo_set_source_rgb( cr, red, grn, blu );
-	Cairo_Draw_Line( cr, idx, 0, idx, 28 );
-  }
-
-  cairo_destroy( cr );
-  return TRUE;
+  Draw_Colorcode( cr );
+  return( TRUE );
 }
 
 
   void
-on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-										gpointer         user_data)
+on_main_freq_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   static gdouble fmhz_save = 0.0;
 
@@ -493,8 +486,12 @@ on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 
   /* Frequency spinbutton value changed by frequency loop */
   if( isFlagSet(FREQ_LOOP_RUNNING) )
-	Draw_Structure( structure_drawingarea );
-  else /* by user */
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( structure_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
+  else if( isFlagClear(FREQ_LOOP_INIT) ) /* by user */
   {
 	/* Get freq from spin button, avoid double signal by GTK */
 	gdouble fmhz = (gdouble)gtk_spin_button_get_value(spinbutton);
@@ -506,10 +503,9 @@ on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 	 * checkbutton next to freq spinbutton or
 	 * freq line plotting enabled, redo currents */
 	if( isFlagSet(PLOT_FREQ_LINE) ||
-		(isFlagSet(MAIN_NEW_FREQ) &&
-		(isFlagSet(DRAW_CURRENTS) ||
+	   (isFlagSet(MAIN_NEW_FREQ) &&
+	   (isFlagSet(DRAW_CURRENTS) ||
 		isFlagSet(DRAW_CHARGES))) )
-
 	{
 	  /* Recalc currents in structure */
 	  calc_data.fmhz = (double)fmhz;
@@ -517,21 +513,25 @@ on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 	}
 
 	/* Sync rad pattern frequency spinbutton */
+	/* Show current frequency */
 	if( isFlagSet(DRAW_ENABLED) 	&&
 		isFlagSet(COMMON_FREQUENCY) &&
 		isFlagSet(MAIN_NEW_FREQ) )
-	  /* Show current frequency */
 	  gtk_spin_button_set_value( rdpattern_frequency, fmhz );
 
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( structure_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
   } /* else */
 
   gtk_spin_button_update( spinbutton );
 }
 
 
-void
-on_main_freq_checkbutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_main_freq_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	SetFlag(MAIN_NEW_FREQ);
@@ -541,8 +541,9 @@ on_main_freq_checkbutton_toggled       (GtkToggleButton *togglebutton,
 
 
   void
-on_main_new_freq_clicked               (GtkButton       *button,
-										gpointer         user_data)
+on_main_new_freq_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate (and redraw) currents on user command */
   if( isFlagClear(FREQ_LOOP_RUNNING) )
@@ -554,190 +555,97 @@ on_main_new_freq_clicked               (GtkButton       *button,
 }
 
 
-gboolean
-on_structure_drawingarea_configure_event( GtkWidget       *widget,
-										  GdkEventConfigure *event,
-										  gpointer         user_data)
-{
-  /* Create or resize structure drawing pixmap */
-  Create_Pixmap(
-	  &structure_pixmap,
-	  &structure_pixmap_width,
-	  &structure_pixmap_height,
-	  widget, event,
+  gboolean
+on_structure_drawingarea_configure_event(
+	GtkWidget       *widget,
+	GdkEventConfigure *event,
+	gpointer         user_data)
+{
+  structure_width  = event->width;
+  structure_height = event->height;
+  New_Projection_Parameters(
+	  structure_width,
+	  structure_height,
 	  &structure_proj_params );
-  return TRUE;
+  return( TRUE );
 }
 
 
-gboolean
-on_structure_drawingarea_motion_notify_event( GtkWidget       *widget,
-											  GdkEventMotion  *event,
-											  gpointer         user_data)
+  gboolean
+on_structure_drawingarea_motion_notify_event(
+	GtkWidget       *widget,
+	GdkEventMotion  *event,
+	gpointer         user_data)
 {
-  /* Use only 1 in MOTION_EVENTS_COUNT event */
   static int cnt = 0;
-  if( cnt++ < MOTION_EVENTS_COUNT )
-	return FALSE;
-  cnt = 0;
 
-  /* Block motion events */
-  g_signal_handler_block
-	( (gpointer)structure_drawingarea, structure_motion_handler );
+  /* No redraws if new input pending or event blocked */
+  /* Use only 1 in MOTION_EVENTS_COUNT event */
+  if( (cnt++ < MOTION_EVENTS_COUNT) ||
+	  isFlagSet(INPUT_PENDING) ||
+	  isFlagSet(BLOCK_MOTION_EV) )
+	return( FALSE );
 
-  /* No redraws if new input pending */
-  if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
+  cnt = 0;
 
   /* Handle motion events */
   Motion_Event( event, &structure_proj_params );
 
-  /* Unblock motion events */
-  g_signal_handler_unblock(
-	  (gpointer)structure_drawingarea, structure_motion_handler );
-
-  return TRUE;
+  return( TRUE );
 }
 
 
   gboolean
-on_structure_drawingarea_expose_event  (GtkWidget       *widget,
-										GdkEventExpose  *event,
-										gpointer         user_data)
+on_structure_drawingarea_draw(
+	GtkWidget       *widget,
+	cairo_t         *cr,
+	gpointer         user_data)
 {
   /* No redraws if new input pending */
   if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
-
-  Draw_Structure( widget );
-  return TRUE;
-}
+	return( FALSE );
 
-
-  void
-on_filechooserdialog_response          (GtkDialog       *dialog,
-										gint             response_id,
-										gpointer         user_data)
-{
-  if( response_id == GTK_RESPONSE_OK )
-  {
-	gchar *filename;
-	gboolean new = TRUE;
-
-	/* Save any changes to an open file */
-	Save_Nec2_Input_File( nec2_edit_window, infile );
-
-	/* Get filename of NEC2 input file */
-	filename =
-	  gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
-	Strlcpy( infile, filename, sizeof(infile) );
-	g_free( filename );
-	gtk_widget_destroy( file_chooser );
-
-	/* Open new file */
-	Open_Input_File( (gpointer)&new );
-  }
+  Draw_Structure( cr );
+  return( TRUE );
 }
 
 
   void
-on_fileselection_response(  GtkDialog       *dialog,
-							gint             response_id,
-							gpointer         user_data)
+on_filechooserdialog_response(
+	GtkDialog       *dialog,
+	gint             response_id,
+	gpointer         user_data)
 {
-  gchar filename[81];
-  size_t s = sizeof( filename );
-  char *str;
-  gboolean new = FALSE;
-
-  /* User selects a file name to save a pixmap to file */
-  if( response_id == GTK_RESPONSE_OK )
-  {
-	/* Get the "save as" file name */
-	Strlcpy( filename,
-		gtk_file_selection_get_filename(
-		  GTK_FILE_SELECTION(dialog)), s );
-
-	if( isFlagSet(IMAGE_SAVE) )
-	{
-	  /* cat a file extension if not already there */
-	  str = strstr( filename, ".png" );
-	  if( (str == NULL) || (str[4] != '\0') )
-		Strlcat( filename, ".png", s );
-	  Save_Pixmap(
-		  saveas_pixmap, saveas_pixmap_width,
-		  saveas_pixmap_height, filename );
-	}
-	else if( isFlagSet(NEC2_SAVE) )
-	{
-	  /* cat a file extension if not already there */
-	  str = strstr( filename, ".nec" );
-	  if( (str == NULL) || (str[4] != '\0') )
-		Strlcat( filename, ".nec", s );
-
-	  /* Use new file name as input file */
-	  Strlcpy( infile, filename, sizeof(infile) );
-	  Save_Nec2_Input_File( nec2_edit_window, filename );
-
-	  /* Re-open NEC2 input file */
-	  if( Nec2_Apply_Checkbutton() )
-		Open_Input_File( (gpointer)&new );
-	}
-	else if( isFlagSet(RDPAT_GNUPLOT_SAVE) )
-	{
-	  /* cat a file extension if not already there */
-	  str = strstr( filename, ".gplot" );
-	  if( (str == NULL) || (str[6] != '\0') )
-		Strlcat( filename, ".gplot", s );
-	  Save_RadPattern_Gnuplot_Data( filename );
-	}
-	else if( isFlagSet(PLOTS_GNUPLOT_SAVE) )
-	{
-	  /* cat a file extension if not already there */
-	  str = strstr( filename, ".gplot" );
-	  if( (str == NULL) || (str[6] != '\0') )
-		Strlcat( filename, ".gplot", s );
-	  Save_FreqPlots_Gnuplot_Data( filename );
-	}
-	else if( isFlagSet(STRCT_GNUPLOT_SAVE) )
-	{
-	  /* cat a file extension if not already there */
-	  str = strstr( filename, ".gplot" );
-	  if( (str == NULL) || (str[6] != '\0') )
-		Strlcat( filename, ".gplot", s );
-	  Save_Struct_Gnuplot_Data( filename );
-	}
-
-	gtk_widget_destroy( file_selection );
-	if( (kill_window == nec2_edit_window) &&
-		(kill_window != NULL) )
-	  gtk_widget_destroy( nec2_edit_window );
-  } /* if( response_id == GTK_RESPONSE_OK ) */
+  Filechooser_Response(
+	  dialog, response_id, saveas_width, saveas_height );
 }
 
 
   gboolean
-on_freqplots_window_delete_event       (GtkWidget       *widget,
-										GdkEvent        *event,
-										gpointer         user_data)
+on_freqplots_window_delete_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   kill_window = freqplots_window;
   Delete_Event( _("Really close window?") );
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_freqplots_window_destroy            (GtkObject       *object,
-										gpointer         user_data)
+on_freqplots_window_destroy(
+	GObject       *object,
+	gpointer       user_data)
 {
   Plots_Window_Killed();
 }
 
 
   void
-on_freqplots_save_activate             (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_freqplots_save_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   char saveas[96];
   size_t s = sizeof( saveas );
@@ -746,56 +654,61 @@ on_freqplots_save_activate             (GtkMenuItem     *menuitem,
   if( (strlen(infile) == 0) || isFlagClear(PLOT_SELECT) )
 	return;
 
-  /* Make file name from input file name,
-   * to save frequency plots drawing */
-  snprintf( saveas, s, "%s-%s_%03d.%s", infile, "plots", ++cnt, "png" );
-  saveas_pixmap = freqplots_pixmap;
-  saveas_pixmap_width  = freqplots_pixmap_width;
-  saveas_pixmap_height = freqplots_pixmap_height;
+  saveas_drawingarea = freqplots_drawingarea;
+  saveas_width  = freqplots_width;
+  saveas_height = freqplots_height;
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( IMAGE_SAVE );
 
-  /* Open file selector to specify file  */
-  /* name for saving the structure image */
-  file_selection = create_fileselection();
-  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
-  gtk_widget_show( file_selection );
+  /* Make file name from input file name,
+   * to save frequency plots drawing */
+  snprintf( saveas, s, "%s-%s_%03d%s", infile, "plots", ++cnt, ".png" );
+
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.png", NULL, saveas, xnec2c_files );
 }
 
 
   void
-on_freqplots_save_as_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_freqplots_save_as_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  saveas_pixmap = freqplots_pixmap;
-  saveas_pixmap_width  = freqplots_pixmap_width;
-  saveas_pixmap_height = freqplots_pixmap_height;
+  saveas_drawingarea = freqplots_drawingarea;
+  saveas_width  = freqplots_width;
+  saveas_height = freqplots_height;
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( IMAGE_SAVE );
 
-  /* Open file selector to specify a file
-   * name for saving the freq plots image */
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE,
+	  "*.png", NULL, _("untitled.png"), xnec2c_files );
 }
 
 
-void
-on_freqplots_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
+  void
+on_freqplots_save_as_gnuplot_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Open file selector to specify a file
    * name for saving the rad pattern image */
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( PLOTS_GNUPLOT_SAVE );
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE,
+	  "*.gplot", NULL, _("untitled.gplot"), xnec2c_files );
 }
 
 
   void
-on_freqplots_gmax_togglebutton_toggled (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_freqplots_gmax_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not max gain plotting */
   Plot_Select( togglebutton, PLOT_GMAX );
@@ -803,17 +716,19 @@ on_freqplots_gmax_togglebutton_toggled (GtkToggleButton *togglebutton,
 
 
   void
-on_freqplots_gdir_togglebutton_toggled (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_freqplots_gdir_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not gain direction plotting */
   Plot_Select( togglebutton, PLOT_GAIN_DIR );
 }
 
 
-void
-on_freqplots_gviewer_togglebutton_toggled(GtkToggleButton *togglebutton,
-										  gpointer         user_data)
+  void
+on_freqplots_gviewer_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not "gain toward user" plotting */
   Plot_Select( togglebutton, PLOT_GVIEWER );
@@ -821,38 +736,47 @@ on_freqplots_gviewer_togglebutton_toggled(GtkToggleButton *togglebutton,
 
 
   void
-on_freqplots_vswr_togglebutton_toggled (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_freqplots_vswr_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not VSWR plotting */
   Plot_Select( togglebutton, PLOT_VSWR );
 }
 
 
-void
-on_freqplots_zo_spinbutton_value_changed( GtkSpinButton   *spinbutton,
-										  gpointer         user_data)
+  void
+on_freqplots_zo_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   /* Set the value of Z0 used for VSWR calculations */
   calc_data.zo = gtk_spin_button_get_value(spinbutton);
   if( isFlagSet(PLOT_ENABLED) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+    while( g_main_context_iteration(NULL, FALSE) );
+  }
+
   gtk_spin_button_update( spinbutton );
 }
 
 
-void
-on_freqplots_zrlzim_togglebutton_toggled( GtkToggleButton *togglebutton,
-										  gpointer         user_data)
+  void
+on_freqplots_zrlzim_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not Z-real/Z-imag plotting */
   Plot_Select( togglebutton, PLOT_ZREAL_ZIMAG );
 }
 
 
-void
-on_freqplots_zmgzph_togglebutton_toggled( GtkToggleButton *togglebutton,
-										  gpointer         user_data)
+  void
+on_freqplots_zmgzph_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   /* Enable or not Z-mag/Z-phase plotting */
   Plot_Select( togglebutton, PLOT_ZMAG_ZPHASE );
@@ -860,134 +784,137 @@ on_freqplots_zmgzph_togglebutton_toggled( GtkToggleButton *togglebutton,
 
 
   gboolean
-on_freqplots_drawingarea_expose_event  (GtkWidget       *widget,
-										GdkEventExpose  *event,
-										gpointer         user_data)
+on_freqplots_drawingarea_draw(
+	GtkWidget       *widget,
+	cairo_t         *cr,
+	gpointer         user_data)
 {
   /* No redraws if new input pending */
   if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
+	return( FALSE );
 
   /* Enable drawing of freq line */
-  Plot_Frequency_Data();
-  return TRUE;
+  Plot_Frequency_Data( cr );
+  return( TRUE );
 }
 
 
-gboolean
-on_freqplots_drawingarea_configure_event( GtkWidget       *widget,
-										  GdkEventConfigure *event,
-										  gpointer         user_data)
+  gboolean
+on_freqplots_drawingarea_configure_event(
+	GtkWidget       *widget,
+	GdkEventConfigure *event,
+	gpointer         user_data)
 {
-  /* Create or resize pixmap for frequency plots */
-  Create_Pixmap(
-	  &freqplots_pixmap,
-	  &freqplots_pixmap_width,
-	  &freqplots_pixmap_height,
-	  widget, event, NULL );
-  return TRUE;
+  freqplots_width  = event->width;
+  freqplots_height = event->height;
+  return( TRUE );
 }
 
 
-gboolean
-on_freqplots_drawingarea_button_press_event(GtkWidget       *widget,
-											GdkEventButton  *event,
-											gpointer         user_data)
+  gboolean
+on_freqplots_drawingarea_button_press_event(
+	GtkWidget       *widget,
+	GdkEventButton  *event,
+	gpointer         user_data)
 {
   /* No redraws if new input pending */
   if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
+	return( FALSE );
 
   Set_Frequency_On_Click( event );
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_rdpattern_window_destroy            (GtkObject       *object,
-										gpointer         user_data)
+on_rdpattern_window_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   Rdpattern_Window_Killed();
 }
 
 
   gboolean
-on_rdpattern_window_delete_event       (GtkWidget       *widget,
-										GdkEvent        *event,
-										gpointer         user_data)
+on_rdpattern_window_delete_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   kill_window = rdpattern_window;
   Delete_Event( _("Really close window?") );
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_rdpattern_save_activate             (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_save_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   char saveas[96];
   size_t s = sizeof( saveas );
   static int cgn = 0, ceh = 0;;
 
-  if( strlen(infile) == 0 )
-	return;
+  if( strlen(infile) == 0 ) return;
+
+  saveas_drawingarea = rdpattern_drawingarea;
+  saveas_width  = rdpattern_width;
+  saveas_height = rdpattern_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
 
   /* Make the rad pattern save
    * file name from input name */
   if( isFlagSet(DRAW_GAIN) )
-	snprintf( saveas, s, "%s-%s_%03d.%s", infile, "gain", ++cgn, "png" );
+	snprintf( saveas, s, "%s-%s_%03d%s", infile, "gain", ++cgn, ".png" );
   else if( isFlagSet(DRAW_EHFIELD) )
-	snprintf( saveas, s, "%s-%s_%03d.%s", infile, "fields", ++ceh, "png" );
+	snprintf( saveas, s, "%s-%s_%03d%s", infile, "fields", ++ceh, ".png" );
   else return;
 
-  saveas_pixmap = rdpattern_pixmap;
-  saveas_pixmap_width  = rdpattern_pixmap_width;
-  saveas_pixmap_height = rdpattern_pixmap_height;
-  ClearFlag( ALL_SAVE_FLAGS );
-  SetFlag( IMAGE_SAVE );
-
-  /* Open file selector to specify file  */
-  /* name for saving the pattern image */
-  file_selection = create_fileselection();
-  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
-  gtk_widget_show( file_selection );
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.png", NULL, saveas, xnec2c_files );
 }
 
 
   void
-on_rdpattern_save_as_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_save_as_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  saveas_pixmap = rdpattern_pixmap;
-  saveas_pixmap_width  = rdpattern_pixmap_width;
-  saveas_pixmap_height = rdpattern_pixmap_height;
+  saveas_drawingarea = rdpattern_drawingarea;
+  saveas_width  = rdpattern_width;
+  saveas_height = rdpattern_height;
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( IMAGE_SAVE );
 
-  /* Open file selector to specify a file
-   * name for saving the rad pattern image */
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.png", NULL, _("untitled.png"), xnec2c_files );
 }
 
 
-void
-on_rdpattern_save_as_gnuplot_activate   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
+  void
+on_rdpattern_save_as_gnuplot_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Open file selector to specify a file
    * name for saving the rad pattern image */
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( RDPAT_GNUPLOT_SAVE );
-  file_selection = create_fileselection();
-  gtk_widget_show( file_selection );
+
+  /* Open file chooser to save frequency plots */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.gplot", NULL, _("untitled.gplot"), xnec2c_files );
 }
 
 
-void
-on_rdpattern_linear_power_activate     (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+  void
+on_rdpattern_linear_power_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	Set_Gain_Style( GS_LINP );
@@ -995,8 +922,9 @@ on_rdpattern_linear_power_activate     (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_linear_voltage_activate   (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_linear_voltage_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	Set_Gain_Style( GS_LINV );
@@ -1004,8 +932,9 @@ on_rdpattern_linear_voltage_activate   (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_arrl_style_activate       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_arrl_style_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	Set_Gain_Style( GS_ARRL );
@@ -1013,8 +942,9 @@ on_rdpattern_arrl_style_activate       (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_logarithmic_activate      (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_logarithmic_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	Set_Gain_Style( GS_LOG );
@@ -1022,8 +952,9 @@ on_rdpattern_logarithmic_activate      (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_e_field_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_e_field_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( DRAW_EFIELD );
@@ -1031,13 +962,18 @@ on_rdpattern_e_field_activate          (GtkMenuItem     *menuitem,
 	ClearFlag( DRAW_EFIELD );
   Set_Window_Labels();
   if( isFlagSet(DRAW_EHFIELD) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+    while( g_main_context_iteration(NULL, FALSE) );
+  }
 }
 
 
   void
-on_rdpattern_h_field_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_h_field_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( DRAW_HFIELD );
@@ -1045,13 +981,18 @@ on_rdpattern_h_field_activate          (GtkMenuItem     *menuitem,
 	ClearFlag( DRAW_HFIELD );
   Set_Window_Labels();
   if( isFlagSet(DRAW_EHFIELD) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+    while( g_main_context_iteration(NULL, FALSE) );
+  }
 }
 
 
   void
-on_rdpattern_poynting_vector_activate  (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_poynting_vector_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( DRAW_POYNTING );
@@ -1059,25 +1000,34 @@ on_rdpattern_poynting_vector_activate  (GtkMenuItem     *menuitem,
 	ClearFlag( DRAW_POYNTING );
   Set_Window_Labels();
   if( isFlagSet(DRAW_EHFIELD) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+    while( g_main_context_iteration(NULL, FALSE) );
+  }
 }
 
 
   void
-on_rdpattern_overlay_structure_activate (GtkMenuItem     *menuitem,
+on_rdpattern_overlay_structure_activate(
+	GtkMenuItem     *menuitem,
 	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( OVERLAY_STRUCT );
   else
 	ClearFlag( OVERLAY_STRUCT );
-  Draw_Radiation( rdpattern_drawingarea );
+
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( rdpattern_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 }
 
 
   void
-on_rdpattern_x_axis_clicked            (GtkButton       *button,
-										gpointer         user_data)
+on_rdpattern_x_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 0.0, 0.0, rotate_rdpattern,
@@ -1089,8 +1039,9 @@ on_rdpattern_x_axis_clicked            (GtkButton       *button,
 
 
   void
-on_rdpattern_y_axis_clicked            (GtkButton       *button,
-										gpointer         user_data)
+on_rdpattern_y_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 90.0, 0.0, rotate_rdpattern,
@@ -1102,8 +1053,9 @@ on_rdpattern_y_axis_clicked            (GtkButton       *button,
 
 
   void
-on_rdpattern_z_axis_clicked            (GtkButton       *button,
-										gpointer         user_data)
+on_rdpattern_z_axis_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate projection paramenters */
   New_Viewer_Angle( 0.0, 90.0, rotate_rdpattern,
@@ -1114,10 +1066,10 @@ on_rdpattern_z_axis_clicked            (GtkButton       *button,
 }
 
 
-  void
-on_rdpattern_default_view_clicked
-  (GtkButton       *button,
-  gpointer         user_data)
+void
+  on_rdpattern_default_view_clicked
+(GtkButton       *button,
+ gpointer         user_data)
 {
   /* Projection at 45 deg rotation and inclination */
   New_Viewer_Angle( 45.0, 45.0, rotate_rdpattern,
@@ -1128,7 +1080,7 @@ on_rdpattern_default_view_clicked
 }
 
 
-void
+  void
 on_rdpattern_rotate_spinbutton_value_changed(
 	GtkSpinButton   *spinbutton,
 	gpointer         user_data)
@@ -1150,7 +1102,7 @@ on_rdpattern_rotate_spinbutton_value_changed(
 }
 
 
-void
+  void
 on_rdpattern_incline_spinbutton_value_changed(
 	GtkSpinButton   *spinbutton,
 	gpointer         user_data)
@@ -1173,8 +1125,9 @@ on_rdpattern_incline_spinbutton_value_changed(
 
 
   void
-on_rdpattern_gain_togglebutton_toggled (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_rdpattern_gain_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Rdpattern_Gain_Togglebutton_Toggled(
 	  gtk_toggle_button_get_active(togglebutton) );
@@ -1182,8 +1135,9 @@ on_rdpattern_gain_togglebutton_toggled (GtkToggleButton *togglebutton,
 
 
   void
-on_rdpattern_eh_togglebutton_toggled   (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+on_rdpattern_eh_togglebutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Rdpattern_EH_Togglebutton_Toggled(
 	  gtk_toggle_button_get_active(togglebutton) );
@@ -1191,35 +1145,20 @@ on_rdpattern_eh_togglebutton_toggled   (GtkToggleButton *togglebutton,
 
 
   gboolean
-on_rdpattern_colorcode_drawingarea_expose_event(GtkWidget       *widget,
-												GdkEventExpose  *event,
-												gpointer         user_data)
+on_rdpattern_colorcode_drawingarea_draw(
+	GtkWidget       *widget,
+	cairo_t         *cr,
+	gpointer         user_data)
 {
-  double red = 0.0, grn = 0.0, blu = 0.0;
-  int idx;
-
-  /* No redraws if new input pending */
-  if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
-
-  cairo_t *cr = gdk_cairo_create( widget-> window );
-
-  /* Draw color code bar in rad pattern window */
-  for( idx = 0; idx < 160; idx++ )
-  {
-	Value_to_Color( &red, &grn, &blu, (double) (8*idx), 1280.0 );
-	cairo_set_source_rgb( cr, red, grn, blu );
-	Cairo_Draw_Line( cr, idx, 0, idx, 28 );
-  }
-
-  cairo_destroy( cr );
-  return TRUE;
+  Draw_Colorcode( cr );
+  return( TRUE );
 }
 
 
-void
-on_rdpattern_freq_spinbutton_value_changed(	GtkSpinButton   *spinbutton,
-											gpointer         user_data)
+  void
+on_rdpattern_freq_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   static gdouble fmhz_save = 0.0;
 
@@ -1229,7 +1168,11 @@ on_rdpattern_freq_spinbutton_value_changed(	GtkSpinButton   *spinbutton,
 
   /* Frequency spinbutton value changed by frequency loop */
   if( isFlagSet(FREQ_LOOP_RUNNING) && isFlagSet(DRAW_ENABLED) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
   else
   {
 	/* Get freq from spin button, avoid double signal by GTK */
@@ -1239,9 +1182,9 @@ on_rdpattern_freq_spinbutton_value_changed(	GtkSpinButton   *spinbutton,
 
 	/* If new freq calculations are enabled
 	 * by checkbutton next to freq spinbutton */
-	if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
-			lookup_widget(rdpattern_window,
-			  "rdpattern_freq_checkbutton"))) &&
+	GtkWidget *toggle =
+	  Builder_Get_Object( rdpattern_window_builder, "rdpattern_freq_checkbutton" );
+	if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)) &&
 		(isFlagSet(DRAW_GAIN) || isFlagSet(DRAW_EHFIELD)) )
 	{
 	  /* Recalc currents in structure and rad pattern */
@@ -1253,13 +1196,15 @@ on_rdpattern_freq_spinbutton_value_changed(	GtkSpinButton   *spinbutton,
 	if( isFlagSet(COMMON_FREQUENCY) )
 	  gtk_spin_button_set_value( mainwin_frequency, fmhz );
   } /* else */
+
   gtk_spin_button_update( spinbutton );
 }
 
 
   void
-on_rdpattern_new_freq_clicked          (GtkButton       *button,
-										gpointer         user_data)
+on_rdpattern_new_freq_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Recalculate and draw rad pattern after user command */
   if( isFlagClear(FREQ_LOOP_RUNNING) )
@@ -1271,69 +1216,65 @@ on_rdpattern_new_freq_clicked          (GtkButton       *button,
 }
 
 
-gboolean
-on_rdpattern_drawingarea_configure_event( GtkWidget       *widget,
-										  GdkEventConfigure *event,
-										  gpointer         user_data)
-{
-  /* Create or resize rad pattern pixmap */
-  Create_Pixmap(
-	  &rdpattern_pixmap,
-	  &rdpattern_pixmap_width,
-	  &rdpattern_pixmap_height,
-	  widget, event,
+  gboolean
+on_rdpattern_drawingarea_configure_event(
+	GtkWidget       *widget,
+	GdkEventConfigure *event,
+	gpointer         user_data)
+{
+  rdpattern_width  = event->width;
+  rdpattern_height = event->height;
+  New_Projection_Parameters(
+	  rdpattern_width,
+	  rdpattern_height,
 	  &rdpattern_proj_params );
-  return TRUE;
+  return( TRUE );
 }
 
 
   gboolean
-on_rdpattern_drawingarea_expose_event  (GtkWidget       *widget,
-										GdkEventExpose  *event,
-										gpointer         user_data)
+on_rdpattern_drawingarea_draw(
+	GtkWidget       *widget,
+	cairo_t         *cr,
+	gpointer         user_data)
 {
   /* No redraws if new input pending */
   if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
+	return( FALSE );
 
-  Draw_Radiation( widget );
-  return TRUE;
+  Draw_Radiation( cr );
+  return( TRUE );
 }
 
 
-gboolean
-on_rdpattern_drawingarea_motion_notify_event( GtkWidget       *widget,
-											  GdkEventMotion  *event,
-											  gpointer         user_data)
+  gboolean
+on_rdpattern_drawingarea_motion_notify_event(
+	GtkWidget       *widget,
+	GdkEventMotion  *event,
+	gpointer         user_data)
 {
-  /* Use only 1 in MOTION_EVENTS_COUNT event */
   static int cnt = 0;
-  if( cnt++ < MOTION_EVENTS_COUNT )
-	return FALSE;
-  cnt = 0;
 
-  /* Block motion events */
-  g_signal_handler_block(
-	  (gpointer)rdpattern_drawingarea, rdpattern_motion_handler );
+  /* No redraws if new input pending or event blocked */
+  /* Use only 1 in MOTION_EVENTS_COUNT event */
+  if( (cnt++ < MOTION_EVENTS_COUNT) ||
+	  isFlagSet(INPUT_PENDING) ||
+	  isFlagSet(BLOCK_MOTION_EV) )
+	return( FALSE );
 
-  /* No redraws if new input pending */
-  if( isFlagSet(INPUT_PENDING) )
-	return FALSE;
+  cnt = 0;
 
   /* Handle motion events */
   Motion_Event( event, &rdpattern_proj_params );
 
-  /* Unblock motion events */
-  g_signal_handler_unblock(
-	  (gpointer)rdpattern_drawingarea, rdpattern_motion_handler );
-
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_quit_cancelbutton_clicked           (GtkButton       *button,
-										gpointer         user_data)
+on_quit_cancelbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gtk_widget_destroy( quit_dialog );
   ClearFlag( MAIN_QUIT );
@@ -1341,8 +1282,9 @@ on_quit_cancelbutton_clicked           (GtkButton       *button,
 
 
   void
-on_quit_okbutton_clicked               (GtkButton       *button,
-										gpointer         user_data)
+on_quit_okbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( isFlagSet(FREQ_LOOP_RUNNING) )
   {
@@ -1350,7 +1292,7 @@ on_quit_okbutton_clicked               (GtkButton       *button,
 	{
 	  Stop_Frequency_Loop();
 	  gtk_label_set_text( GTK_LABEL(
-			lookup_widget( quit_dialog, "quit_label")),
+			Builder_Get_Object(quit_dialog_builder, "quit_label")),
 		  _("Really quit Xnec2c?") );
 	  ClearFlag( MAIN_QUIT );
 	  return;
@@ -1370,111 +1312,123 @@ on_quit_okbutton_clicked               (GtkButton       *button,
 
 
   void
-main_view_menuitem_activate            (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+main_view_menuitem_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Sync common projection checkbuttons */
   if( isFlagSet(COMMON_PROJECTION) )
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(main_window,
-			"common_projection")), TRUE );
+		  Builder_Get_Object(main_window_builder, "main_common_projection")),
+		TRUE );
   else
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(main_window,
-			"common_projection")), FALSE );
+		  Builder_Get_Object(main_window_builder, "main_common_projection")),
+		FALSE );
 
   /* Sync common frequency checkbuttons */
   if( isFlagSet(COMMON_FREQUENCY) )
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(main_window,
-			"common_freq")), TRUE );
+		  Builder_Get_Object(main_window_builder, "main_common_frequency")),
+		TRUE );
   else
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(main_window,
-			"common_freq")), FALSE );
+		  Builder_Get_Object(main_window_builder, "main_common_frequency")),
+		FALSE );
 
 }
 
 
   void
-main_pol_menu_activate                 (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+main_pol_menu_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
+{
+  Set_Pol_Menuitem( MAIN_WINDOW );
+}
+
+
+  void
+freqplots_pol_menu_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  Set_Pol_Menuitem( menuitem );
+  Set_Pol_Menuitem( FREQPLOTS_WINDOW );
 }
 
 
   void
-freqplots_pol_menu_activate            (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+rdpattern_pol_menu_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
-  Set_Pol_Menuitem( menuitem );
+  Set_Pol_Menuitem( RDPATTERN_WINDOW );
 }
 
 
   void
-rdpattern_view_menuitem_activate       (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+rdpattern_view_menuitem_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Sync common projection checkbuttons */
   if( isFlagSet(COMMON_PROJECTION) )
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"common_projection")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_common_projection")),
+		TRUE );
   else
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"common_projection")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_common_projection")),
+		FALSE );
 
   /* Sync common frequency checkbuttons */
   if( isFlagSet(COMMON_FREQUENCY) )
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"common_freq")), TRUE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_common_frequency")),
+		TRUE );
   else
 	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
-		  lookup_widget(rdpattern_window,
-			"common_freq")), FALSE );
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_common_frequency")),
+		FALSE );
 }
 
 
   void
-rdpattern_pol_menu_activate            (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_filechooserdialog_destroy(
+	GObject       *object,
+	gpointer      user_data)
 {
-  Set_Pol_Menuitem( menuitem );
+  file_chooser = NULL;
 }
 
 
   void
-on_filechoser_cancel_clicked           (GtkButton       *button,
-										gpointer         user_data)
+on_filechooserdialog_cancel_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gtk_widget_destroy( file_chooser );
 }
 
 
   void
-on_fileselection_cancel_clicked        (GtkButton       *button,
-										gpointer         user_data)
-{
-  gtk_widget_destroy( file_selection );
-}
-
-
-void
-on_near_peak_value_activate            (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_near_peak_value_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
   {
 	ClearFlag( NEAREH_SNAPSHOT );
+
 	/* Redraw radiation pattern drawingarea */
 	if( isFlagSet(DRAW_EHFIELD) )
 	{
 	  near_field.valid = 0;
 	  Near_Field_Pattern();
-	  Draw_Radiation( rdpattern_drawingarea );
+
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
 	}
   }
   else SetFlag( NEAREH_SNAPSHOT );
@@ -1484,9 +1438,10 @@ on_near_peak_value_activate            (GtkMenuItem     *menuitem,
 }
 
 
-void
-on_near_snapshot_activate              (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+  void
+on_near_snapshot_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(
 		GTK_CHECK_MENU_ITEM(menuitem)) )
@@ -1497,7 +1452,10 @@ on_near_snapshot_activate              (GtkMenuItem     *menuitem,
 	{
 	  near_field.valid = 0;
 	  Near_Field_Pattern();
-	  Draw_Radiation( rdpattern_drawingarea );
+
+	  /* Wait for GTK to complete its tasks */
+	  while( g_main_context_iteration(NULL, FALSE) );
+	  gtk_widget_queue_draw( rdpattern_drawingarea );
 	}
   }
   else ClearFlag( NEAREH_SNAPSHOT );
@@ -1508,34 +1466,38 @@ on_near_snapshot_activate              (GtkMenuItem     *menuitem,
 
 
   void
-on_rdpattern_animate_activate          (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_rdpattern_animate_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( isFlagClear(DRAW_EHFIELD) )
 	return;
 
   if( animate_dialog == NULL )
-	animate_dialog = create_animate_dialog();
+  {
+	animate_dialog = create_animate_dialog( &animate_dialog_builder );
+  }
   gtk_widget_show( animate_dialog );
 }
 
 
   void
-on_animation_applybutton_clicked       (GtkButton       *button,
-										gpointer         user_data)
+on_animation_applybutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   GtkSpinButton *spinbutton;
   guint intval;
   gdouble freq, steps;
 
-  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
-		"animate_freq_spinbutton") );
+  spinbutton = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(animate_dialog_builder, "animate_freq_spinbutton") );
   freq = gtk_spin_button_get_value( spinbutton );
-  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
-		"animate_steps_spinbutton") );
+  spinbutton = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(animate_dialog_builder, "animate_steps_spinbutton") );
   steps = gtk_spin_button_get_value( spinbutton );
   intval = (guint)(1000.0 / steps / freq);
-  near_field.anim_step = (double)TWOPI / steps;
+  near_field.anim_step = (double)M_2PI / steps;
 
   SetFlag( NEAREH_ANIMATE );
   if( anim_tag > 0 )
@@ -1545,31 +1507,34 @@ on_animation_applybutton_clicked       (GtkButton       *button,
 
 
   void
-on_animation_cancelbutton_clicked      (GtkButton       *button,
-									  	gpointer         user_data)
+on_animation_cancelbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   ClearFlag( NEAREH_ANIMATE );
-  g_source_remove( anim_tag );
+  if( anim_tag )
+	g_source_remove( anim_tag );
   anim_tag = 0;
 }
 
 
   void
-on_animation_okbutton_clicked          (GtkButton       *button,
-										gpointer         user_data)
+on_animation_okbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   GtkSpinButton *spinbutton;
   guint intval;
   gdouble freq, steps;
 
-  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
-		"animate_freq_spinbutton") );
+  spinbutton = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(animate_dialog_builder, "animate_freq_spinbutton") );
   freq = gtk_spin_button_get_value( spinbutton );
-  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
-		"animate_steps_spinbutton") );
+  spinbutton = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(animate_dialog_builder, "animate_steps_spinbutton") );
   steps = gtk_spin_button_get_value( spinbutton );
   intval = (guint)(1000.0 / steps / freq);
-  near_field.anim_step = (double)TWOPI / steps;
+  near_field.anim_step = (double)M_2PI / steps;
 
   SetFlag( NEAREH_ANIMATE );
   if( anim_tag > 0 )
@@ -1581,33 +1546,41 @@ on_animation_okbutton_clicked          (GtkButton       *button,
 
 
   void
-on_animate_dialog_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+on_animate_dialog_destroy(
+	GObject       *object,
+	gpointer       user_data)
 {
+  g_object_unref( animate_dialog_builder );
+  animate_dialog_builder = NULL;
   animate_dialog = NULL;
 }
 
 
-void
-on_quit_dialog_destroy                 (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_quit_dialog_destroy(
+	GObject       *object,
+	gpointer       user_data)
 {
   quit_dialog = NULL;
+  g_object_unref( quit_dialog_builder );
+  quit_dialog_builder = NULL;
 }
 
 
-gboolean
-on_error_dialog_delete_event           (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data)
+  gboolean
+on_error_dialog_delete_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
-  return TRUE;
+  return( TRUE );
 }
 
 
   void
-on_nec2_edit_activate                  (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+on_nec2_edit_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   /* Abort if no open input file */
   if( input_fp == NULL )
@@ -1621,10 +1594,11 @@ on_nec2_edit_activate                  (GtkMenuItem     *menuitem,
 }
 
 
-gboolean
-on_nec2_editor_delete_event            (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data)
+  gboolean
+on_nec2_editor_delete_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   if( isFlagSet(NEC2_EDIT_SAVE) )
   {
@@ -1632,15 +1606,15 @@ on_nec2_editor_delete_event            (GtkWidget       *widget,
 	/* name for saving a new NEC2 input file */
 	if( strlen(infile) == 0 )
 	{
-	  file_selection = create_fileselection();
-	  gtk_file_selection_set_filename(
-		  GTK_FILE_SELECTION(file_selection), _("untitled") );
-	  gtk_widget_show( file_selection );
 	  ClearFlag( ALL_SAVE_FLAGS );
 	  ClearFlag( NEC2_EDIT_SAVE );
 	  SetFlag( NEC2_SAVE );
 	  kill_window = nec2_edit_window;
-	  return TRUE;
+
+	  /* Open file chooser to save NEC2 input file */
+	  file_chooser = Open_Filechooser(
+		  GTK_FILE_CHOOSER_ACTION_SAVE, "*.nec", xnec2c_files, _("untitled.nec"), NULL );
+	  return( TRUE );
 	}
 
 	Save_Nec2_Input_File( nec2_edit_window, infile );
@@ -1648,31 +1622,35 @@ on_nec2_editor_delete_event            (GtkWidget       *widget,
 
   kill_window = nec2_edit_window;
   Delete_Event( _("Really close NEC2 Editor?") );
-  return TRUE;
+  return( TRUE );
 }
 
 
-void
-on_nec2_editor_destroy                 (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_nec2_editor_destroy(
+	GObject       *object,
+	gpointer       user_data)
 {
-  cmnt_store = NULL,
-  geom_store = NULL,
+  cmnt_store = NULL;
+  geom_store = NULL;
   cmnd_store = NULL;
   nec2_edit_window = NULL;
   kill_window = NULL;
+  g_object_unref( nec2_editor_builder );
+  nec2_editor_builder = NULL;
 }
 
 
   void
-on_nec2_save_clicked(	GtkButton       *button,
-						gpointer         user_data)
+on_nec2_save_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gboolean new = FALSE;
 
   /* No save/open file while freq loop is running */
   if( !Nec2_Save_Warn(
-		_("NEC2 Editor's data may not be saved\n"\
+		_("NEC2 Editor's data may not be saved\n"
 		  "while the Frequency Loop is running")) )
 	return;
 
@@ -1680,12 +1658,12 @@ on_nec2_save_clicked(	GtkButton       *button,
   /* name for saving a new NEC2 input file */
   if( strlen(infile) == 0 )
   {
-	file_selection = create_fileselection();
-	gtk_file_selection_set_filename(
-		GTK_FILE_SELECTION(file_selection), _("untitled") );
-	gtk_widget_show( file_selection );
 	ClearFlag( ALL_SAVE_FLAGS );
 	SetFlag( NEC2_SAVE );
+
+	/* Open file chooser to save NEC2 input file */
+	file_chooser = Open_Filechooser(
+		GTK_FILE_CHOOSER_ACTION_SAVE, "*.nec", xnec2c_files, _("untitled.nec"), NULL );
 	return;
   }
 
@@ -1696,30 +1674,30 @@ on_nec2_save_clicked(	GtkButton       *button,
 }
 
 
-void
-on_nec2_save_as_clicked                (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nec2_save_as_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* No save/open file while freq loop is running */
   if( !Nec2_Save_Warn(
-		_("NEC2 Editor's data may not be saved\n"\
+		_("NEC2 Editor's data may not be saved\n"
 		  "while the Frequency Loop is running")) )
 	return;
 
-  /* Open file selector to specify file   */
-  /* name for saving the edited NEC2 file */
-  file_selection = create_fileselection();
-  gtk_file_selection_set_filename(
-	  GTK_FILE_SELECTION(file_selection), _("untitled") );
-  gtk_widget_show( file_selection );
   ClearFlag( ALL_SAVE_FLAGS );
   SetFlag( NEC2_SAVE );
+
+  /* Open file chooser to save NEC2 input file */
+  file_chooser = Open_Filechooser(
+	  GTK_FILE_CHOOSER_ACTION_SAVE, "*.nec", NULL, _("untitled.nec"), xnec2c_files );
 }
 
 
-void
-on_nec2_row_add_clicked                (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nec2_row_add_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   GtkTreeModel *model;
   GtkTreeSelection *selection;
@@ -1756,8 +1734,9 @@ on_nec2_row_add_clicked                (GtkButton       *button,
 
 
   void
-on_nec2_row_remv_clicked               (GtkButton       *button,
-										gpointer         user_data)
+on_nec2_row_remv_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   GtkTreeModel *model;
   GtkTreeIter   iter;
@@ -1775,8 +1754,9 @@ on_nec2_row_remv_clicked               (GtkButton       *button,
 
 
   void
-on_nec2_treeview_clear_clicked         (GtkButton       *button,
-										gpointer         user_data)
+on_nec2_treeview_clear_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( selected_treeview != NULL )
   {
@@ -1788,24 +1768,24 @@ on_nec2_treeview_clear_clicked         (GtkButton       *button,
 }
 
 
-gboolean
-  on_nec2_cmnt_treeview_button_press_event
-                                        (GtkWidget      *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data)
+  gboolean
+on_nec2_cmnt_treeview_button_press_event(
+	GtkWidget      *widget,
+	GdkEventButton  *event,
+	gpointer         user_data)
 {
   selected_treeview = GTK_TREE_VIEW(widget);
   if( event->button == 3 )
 	Open_Editor( selected_treeview );
-  return FALSE;
+  return( FALSE );
 }
 
 
-gboolean
-on_nec2_geom_treeview_button_press_event
-                                        (GtkWidget       *widget,
-										 GdkEventButton  *event,
-										 gpointer         user_data)
+  gboolean
+on_nec2_geom_treeview_button_press_event(
+	GtkWidget       *widget,
+	GdkEventButton  *event,
+	gpointer         user_data)
 {
   selected_treeview = GTK_TREE_VIEW(widget);
   if( event->button == 3 )
@@ -1814,15 +1794,15 @@ on_nec2_geom_treeview_button_press_event
 	Open_Editor( selected_treeview );
 	action = EDITOR_NEW;
   }
-  return FALSE;
+  return( FALSE );
 }
 
 
-gboolean
-on_nec2_cmnd_treeview_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-										gpointer         user_data)
+  gboolean
+on_nec2_cmnd_treeview_button_press_event(
+	GtkWidget       *widget,
+	GdkEventButton  *event,
+	gpointer         user_data)
 {
   selected_treeview = GTK_TREE_VIEW(widget);
   if( event->button == 3 )
@@ -1831,13 +1811,14 @@ on_nec2_cmnd_treeview_button_press_event
 	Open_Editor( selected_treeview );
 	action = EDITOR_NEW;
   }
-  return FALSE;
+  return( FALSE );
 }
 
 
   void
-on_nec2_revert_clicked                 (GtkButton       *button,
-                                        gpointer         user_data)
+on_nec2_revert_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   /* Open NEC2 input file */
   Open_File( &input_fp, infile, "r" );
@@ -1845,10 +1826,12 @@ on_nec2_revert_clicked                 (GtkButton       *button,
 }
 
 void on_error_stopbutton_clicked(
-	GtkButton *button, gpointer user_data) __attribute__ ((noreturn));
-void
-on_error_stopbutton_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+	GtkButton *button, gpointer user_data) __attribute__(
+	  (noreturn));
+  void
+on_error_stopbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   ClearFlag( ERROR_CONDX );
   gtk_widget_destroy( error_dialog );
@@ -1857,44 +1840,51 @@ on_error_stopbutton_clicked            (GtkButton       *button,
 }
 
 
-void
-on_error_okbutton_clicked              (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_error_okbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   ClearFlag( ERROR_CONDX );
   gtk_widget_destroy( error_dialog );
 }
 
 
-void
-on_error_quitbutton_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_error_quitbutton_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gtk_widget_destroy( error_dialog );
   gtk_widget_destroy( main_window );
 }
 
 
-void
-on_wire_editor_destroy               (GtkObject       *object,
-									  gpointer         user_data)
+  void
+on_wire_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   wire_editor = NULL;
+  g_object_unref( wire_editor_builder );
+  wire_editor_builder = NULL;
 }
 
 
-void
-on_wire_pcl_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_pcl_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( EDITOR_SEGPC );
 }
 
 
-void
-on_wire_data_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_data_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( EDITOR_DATA );
@@ -1902,101 +1892,111 @@ on_wire_data_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 
 
 void
-on_wire_tagnum_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_wire_tagnum_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( EDITOR_TAGNUM );
 }
 
 
-void
-on_wire_len_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_len_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( WIRE_EDITOR_WLEN );
 }
 
 
-void
-on_wire_taper_checkbutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_wire_taper_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Wire_Editor( WIRE_EDITOR_TAPR );
 }
 
 
-void
-on_wire_rlen_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_rlen_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( WIRE_EDITOR_RLEN );
 }
 
 
-void
-on_wire_rdia_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_rdia_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( WIRE_EDITOR_RDIA );
 }
 
 
-void
-on_wire_new_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_wire_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Wire_Editor( EDITOR_NEW );
 }
 
 
-void
-on_wire_res_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_wire_res_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Wire_Editor( EDITOR_LOAD );
 }
 
 
-void
-on_wire_cancel_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_wire_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Wire_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( wire_editor );
 }
 
 
-void
-on_wire_apply_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_wire_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Wire_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_wire_ok_button_clicked               (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_wire_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Wire_Editor( EDITOR_APPLY );
   gtk_widget_destroy( wire_editor );
 }
 
 
-void
-on_gw_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gw_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( wire_editor == NULL )
   {
-	wire_editor = create_wire_editor();
-	gtk_widget_hide( lookup_widget(wire_editor, "wire_taperframe") );
+	wire_editor = create_wire_editor( &wire_editor_builder );
+	gtk_widget_hide( Builder_Get_Object(wire_editor_builder, "wire_taperframe") );
 	gtk_widget_show( wire_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2007,13 +2007,14 @@ on_gw_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_ga_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ga_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( arc_editor == NULL )
   {
-	arc_editor = create_arc_editor();
+	arc_editor = create_arc_editor( &arc_editor_builder );
 	gtk_widget_show( arc_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2024,13 +2025,14 @@ on_ga_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gh_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gh_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( helix_editor == NULL )
   {
-	helix_editor = create_helix_editor();
+	helix_editor = create_helix_editor( &helix_editor_builder );
 	gtk_widget_show( helix_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2041,13 +2043,14 @@ on_gh_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_sp_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_sp_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( patch_editor == NULL )
   {
-	patch_editor = create_patch_editor();
+	patch_editor = create_patch_editor( &patch_editor_builder );
 	gtk_widget_show( patch_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2058,13 +2061,14 @@ on_sp_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gr_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gr_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( cylinder_editor == NULL )
   {
-	cylinder_editor = create_cylinder_editor();
+	cylinder_editor = create_cylinder_editor( &cylinder_editor_builder );
 	gtk_widget_show( cylinder_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2075,13 +2079,14 @@ on_gr_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gm_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gm_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( transform_editor == NULL )
   {
-	transform_editor = create_transform_editor();
+	transform_editor = create_transform_editor( &transform_editor_builder );
 	gtk_widget_show( transform_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2092,13 +2097,14 @@ on_gm_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gx_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gx_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( reflect_editor == NULL )
   {
-	reflect_editor = create_reflect_editor();
+	reflect_editor = create_reflect_editor( &reflect_editor_builder );
 	gtk_widget_show( reflect_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2109,13 +2115,14 @@ on_gx_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gs_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gs_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( scale_editor == NULL )
   {
-	scale_editor = create_scale_editor();
+	scale_editor = create_scale_editor( &scale_editor_builder );
 	gtk_widget_show( scale_editor );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2126,13 +2133,14 @@ on_gs_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_ex_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ex_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( excitation_command == NULL )
   {
-	excitation_command = create_excitation_command();
+	excitation_command = create_excitation_command( &excitation_editor_builder );
 	gtk_widget_show( excitation_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2143,13 +2151,14 @@ on_ex_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_fr_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_fr_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( frequency_command == NULL )
   {
-	frequency_command = create_frequency_command();
+	frequency_command = create_frequency_command( &frequency_editor_builder );
 	gtk_widget_show( frequency_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2160,13 +2169,14 @@ on_fr_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gn_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gn_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( ground_command == NULL )
   {
-	ground_command = create_ground_command();
+	ground_command = create_ground_command( &ground_editor_builder );
 	gtk_widget_show( ground_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2177,13 +2187,14 @@ on_gn_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_gd_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gd_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( ground2_command == NULL )
   {
-	ground2_command = create_ground2_command();
+	ground2_command = create_ground2_command( &ground2_editor_builder );
 	gtk_widget_show( ground2_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2194,13 +2205,14 @@ on_gd_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_rp_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_rp_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( radiation_command == NULL )
   {
-	radiation_command = create_radiation_command();
+	radiation_command = create_radiation_command( &radiation_editor_builder );
 	gtk_widget_show( radiation_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2211,13 +2223,14 @@ on_rp_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_ld_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ld_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( loading_command == NULL )
   {
-	loading_command = create_loading_command();
+	loading_command = create_loading_command( &loading_editor_builder );
 	gtk_widget_show( loading_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2228,13 +2241,14 @@ on_ld_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_nt_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nt_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( network_command == NULL )
   {
-	network_command = create_network_command();
+	network_command = create_network_command( &network_editor_builder );
 	gtk_widget_show( network_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2245,13 +2259,14 @@ on_nt_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_tl_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_tl_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( txline_command == NULL )
   {
-	txline_command = create_txline_command();
+	txline_command = create_txline_command( &txline_editor_builder );
 	gtk_widget_show( txline_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2262,13 +2277,14 @@ on_tl_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_ne_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ne_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( nearfield_command == NULL )
   {
-	nearfield_command = create_nearfield_command();
+	nearfield_command = create_nearfield_command( &nearfield_editor_builder );
 	gtk_widget_show( nearfield_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2279,13 +2295,14 @@ on_ne_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_ek_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ek_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( kernel_command == NULL )
   {
-	kernel_command = create_kernel_command();
+	kernel_command = create_kernel_command( &kernel_editor_builder );
 	gtk_widget_show( kernel_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2296,13 +2313,14 @@ on_ek_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_kh_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_kh_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( intrange_command == NULL )
   {
-	intrange_command = create_intrange_command();
+	intrange_command = create_intrange_command( &intrange_editor_builder );
 	gtk_widget_show( intrange_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2313,13 +2331,14 @@ on_kh_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_xq_clicked                          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_xq_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( execute_command == NULL )
   {
-	execute_command = create_execute_command();
+	execute_command = create_execute_command( &execute_editor_builder );
 	gtk_widget_show( execute_command );
 	ClearFlag( EDITOR_QUIT );
   }
@@ -2330,60 +2349,69 @@ on_xq_clicked                          (GtkButton       *button,
 }
 
 
-void
-on_patch_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_patch_data_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Patch_Editor( EDITOR_DATA );
 }
 
 
-void
-on_patch_new_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_patch_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Patch_Editor( EDITOR_NEW );
 }
 
 
-void
-on_patch_cancel_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_patch_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Patch_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( patch_editor );
 }
 
 
-void
-on_patch_apply_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_patch_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Patch_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_patch_ok_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_patch_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Patch_Editor( EDITOR_APPLY );
   gtk_widget_destroy( patch_editor );
 }
 
 
-void
-on_patch_editor_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_patch_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   patch_editor = NULL;
+  g_object_unref( patch_editor_builder );
+  patch_editor_builder = NULL;
 }
 
 
-void
-on_patch_arbitrary_radiobutton_toggled (GtkToggleButton *togglebutton,
-										gpointer         user_data)
+  void
+on_patch_arbitrary_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Patch_Editor( PATCH_EDITOR_ARBT );
@@ -2393,9 +2421,9 @@ on_patch_arbitrary_radiobutton_toggled (GtkToggleButton *togglebutton,
 
 
 void
-on_patch_rectangular_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  on_patch_rectangular_radiobutton_toggled
+(GtkToggleButton *togglebutton,
+ gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Patch_Editor( PATCH_EDITOR_RECT );
@@ -2403,9 +2431,9 @@ on_patch_rectangular_radiobutton_toggled
 
 
 void
-on_patch_triangular_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  on_patch_triangular_radiobutton_toggled
+(GtkToggleButton *togglebutton,
+ gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Patch_Editor( PATCH_EDITOR_TRIA );
@@ -2413,96 +2441,108 @@ on_patch_triangular_radiobutton_toggled
 
 
 void
-on_patch_quadrilateral_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  on_patch_quadrilateral_radiobutton_toggled
+(GtkToggleButton *togglebutton,
+ gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Patch_Editor( PATCH_EDITOR_QUAD );
 }
 
 
-void
-on_patch_surface_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_patch_surface_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Patch_Editor( PATCH_EDITOR_SURF );
 }
 
 
-void
-on_arc_data_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_arc_data_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Arc_Editor( EDITOR_DATA );
 }
 
 
-void
-on_arc_tagnum_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_arc_tagnum_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Arc_Editor( EDITOR_TAGNUM );
 }
 
 
-void
-on_arc_res_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_arc_res_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Arc_Editor( EDITOR_LOAD );
 }
 
 
-void
-on_arc_new_button_clicked               (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_arc_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Arc_Editor( EDITOR_NEW );
 }
 
 
-void
-on_arc_cancel_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_arc_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Arc_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( arc_editor );
 }
 
 
-void
-on_arc_apply_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_arc_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Arc_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_arc_ok_button_clicked                (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_arc_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Arc_Editor( EDITOR_APPLY );
   gtk_widget_destroy( arc_editor );
 }
 
 
-void
-on_arc_editor_destroy                  (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_arc_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   arc_editor = NULL;
+  g_object_unref( arc_editor_builder );
+  arc_editor_builder = NULL;
 }
 
 
-void
-on_arc_pcl_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_arc_pcl_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Arc_Editor( EDITOR_SEGPC );
@@ -2510,18 +2550,19 @@ on_arc_pcl_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
 
 
 void
-on_helix_tagnum_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_helix_tagnum_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Helix_Editor( EDITOR_TAGNUM );
 }
 
 
-void
-on_helix_pcl_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_helix_pcl_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Helix_Editor( EDITOR_SEGPC );
@@ -2529,18 +2570,19 @@ on_helix_pcl_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 
 
 void
-on_helix_nturns_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_helix_nturns_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
- gtk_spin_button_update( spinbutton );
- Helix_Editor( HELIX_EDITOR_NTURN );
+  gtk_spin_button_update( spinbutton );
+  Helix_Editor( HELIX_EDITOR_NTURN );
 }
 
 
-void
-on_helix_res_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_helix_res_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Helix_Editor( EDITOR_LOAD );
@@ -2548,7 +2590,8 @@ on_helix_res_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 
 
   void
-on_helix_lh_checkbutton_toggled        (GtkToggleButton *togglebutton,
+on_helix_lh_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
 	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
@@ -2558,78 +2601,89 @@ on_helix_lh_checkbutton_toggled        (GtkToggleButton *togglebutton,
 }
 
 
-void
-on_helix_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_helix_data_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Helix_Editor( EDITOR_DATA );
 }
 
 
-void
-on_helix_new_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_helix_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Helix_Editor( EDITOR_NEW );
 }
 
 
-void
-on_helix_cancel_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_helix_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Helix_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( helix_editor );
 }
 
 
-void
-on_helix_apply_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_helix_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Helix_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_helix_ok_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_helix_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Helix_Editor( EDITOR_APPLY );
   gtk_widget_destroy( helix_editor );
 }
 
 
-void
-on_helix_editor_destroy                (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_helix_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   helix_editor = NULL;
+  g_object_unref( helix_editor_builder );
+  helix_editor_builder = NULL;
 }
 
 
-void
-on_helix_linkall_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_helix_linkall_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Helix_Editor( HELIX_EDITOR_LINKALL );
 }
 
 
-void
-on_helix_linkzo_radiobutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_helix_linkzo_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Helix_Editor( HELIX_EDITOR_LINKZO );
 }
 
 
-void
-on_helix_linkzhl_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_helix_linkzhl_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   if( gtk_toggle_button_get_active(togglebutton) )
 	Helix_Editor( HELIX_EDITOR_LINKZHL );
@@ -2637,76 +2691,88 @@ on_helix_linkzhl_radiobutton_toggled   (GtkToggleButton *togglebutton,
 
 
 void
-on_reflect_taginc_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_reflect_taginc_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Reflect_Editor( EDITOR_DATA );
 }
 
 
-void
-on_reflect_checkbutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_reflect_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Reflect_Editor( REFLECT_EDITOR_TOGGLE );
 }
 
 
-void
-on_reflect_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_reflect_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Reflect_Editor( EDITOR_NEW );
 }
 
 
-void
-on_reflect_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_reflect_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Reflect_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( reflect_editor );
 }
 
 
-void
-on_reflect_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_reflect_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Reflect_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_reflect_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_reflect_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Reflect_Editor( EDITOR_APPLY );
   gtk_widget_destroy( reflect_editor );
 }
 
 
-void
-on_reflect_editor_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_reflect_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   reflect_editor = NULL;
+  g_object_unref( reflect_editor_builder );
+  reflect_editor_builder = NULL;
 }
 
 
-void
-on_scale_editor_destroy                (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_scale_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   scale_editor = NULL;
+  g_object_unref( scale_editor_builder );
+  scale_editor_builder = NULL;
 }
 
 
-void
-on_scale_spinbutton_value_changed      (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_scale_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Scale_Editor( EDITOR_DATA );
@@ -2714,34 +2780,38 @@ on_scale_spinbutton_value_changed      (GtkSpinButton   *spinbutton,
 
 
 
-void
-on_scale_new_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_scale_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Scale_Editor( EDITOR_NEW );
 }
 
 
-void
-on_scale_cancel_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_scale_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Scale_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( scale_editor );
 }
 
 
-void
-on_scale_apply_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_scale_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Scale_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_scale_ok_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_scale_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Scale_Editor( EDITOR_APPLY );
   gtk_widget_destroy( scale_editor );
@@ -2749,9 +2819,9 @@ on_scale_ok_button_clicked             (GtkButton       *button,
 
 
 void
-on_cylinder_taginc_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_cylinder_taginc_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Cylinder_Editor( EDITOR_DATA );
@@ -2759,590 +2829,679 @@ on_cylinder_taginc_spinbutton_value_changed
 
 
 void
-on_cylinder_total_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_cylinder_total_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Cylinder_Editor( EDITOR_DATA );
 }
 
 
-void
-on_cylinder_new_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_cylinder_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Cylinder_Editor( EDITOR_NEW );
 }
 
 
-void
-on_cylinder_cancel_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_cylinder_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Cylinder_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( cylinder_editor );
 }
 
 
-void
-on_cylinder_apply_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_cylinder_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Cylinder_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_cylinder_ok_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_cylinder_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Cylinder_Editor( EDITOR_APPLY );
   gtk_widget_destroy( cylinder_editor );
 }
 
 
-void
-on_cylinder_editor_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_cylinder_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   cylinder_editor = NULL;
+  g_object_unref( cylinder_editor_builder );
+  cylinder_editor_builder = NULL;
 }
 
 
-void
-on_transform_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_transform_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Transform_Editor( EDITOR_DATA );
 }
 
 
-void
-on_transform_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_transform_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Transform_Editor( EDITOR_NEW );
 }
 
 
-void
-on_transform_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_transform_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Transform_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( transform_editor );
 }
 
 
-void
-on_transform_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_transform_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Transform_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_transform_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_transform_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Transform_Editor( EDITOR_APPLY );
   gtk_widget_destroy( transform_editor );
 }
 
 
-void
-on_transform_editor_destroy            (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_transform_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   transform_editor = NULL;
+  g_object_unref( transform_editor_builder );
+  transform_editor_builder = NULL;
 }
 
 
 
-void
-on_gend_radiobutton_toggled            (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_gend_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Gend_Editor( EDITOR_RDBUTTON );
 }
 
 
-void
-on_gend_cancel_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gend_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Gend_Editor( EDITOR_CANCEL );
   gtk_widget_destroy( gend_editor );
 }
 
 
-void
-on_gend_apply_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gend_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Gend_Editor( EDITOR_APPLY );
 }
 
 
-void
-on_gend_ok_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_gend_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Gend_Editor( EDITOR_APPLY );
   gtk_widget_destroy( gend_editor );
 }
 
 
-void
-on_gend_editor_destroy                 (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_gend_editor_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   gend_editor = NULL;
+  g_object_unref( gend_editor_builder );
+  gend_editor_builder = NULL;
 }
 
 
-void
-on_kernel_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_kernel_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   kernel_command = NULL;
+  g_object_unref( kernel_editor_builder );
+  kernel_editor_builder = NULL;
 }
 
 
-void
-on_kernel_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_kernel_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Kernel_Command( COMMAND_CKBUTTON );
 }
 
 
-void
-on_kernel_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_kernel_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Kernel_Command( EDITOR_NEW );
 }
 
 
-void
-on_kernel_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_kernel_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Kernel_Command( EDITOR_CANCEL );
   gtk_widget_destroy( kernel_command );
 }
 
 
-void
-on_kernel_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_kernel_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Kernel_Command( EDITOR_APPLY );
 }
 
 
-void
-on_kernel_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_kernel_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Kernel_Command( EDITOR_APPLY );
   gtk_widget_destroy( kernel_command );
 }
 
 
-void
-on_execute_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_execute_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   execute_command = NULL;
+  g_object_unref( execute_editor_builder );
+  execute_editor_builder = NULL;
 }
 
 
-void
-on_execute_radiobutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_execute_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Execute_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_execute_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_execute_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Execute_Command( EDITOR_NEW );
 }
 
 
-void
-on_execute_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_execute_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Execute_Command( EDITOR_CANCEL );
   gtk_widget_destroy( execute_command );
 }
 
 
-void
-on_execute_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_execute_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Execute_Command( EDITOR_APPLY );
 }
 
 
-void
-on_execute_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_execute_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Execute_Command( EDITOR_APPLY );
   gtk_widget_destroy( execute_command );
 }
 
 
-void
-on_intrange_command_destroy               (GtkObject       *object,
-		                                  gpointer         user_data)
+  void
+on_intrange_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   intrange_command = NULL;
+  g_object_unref( intrange_editor_builder );
+  intrange_editor_builder = NULL;
 }
 
 
-void
-on_intrange_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_intrange_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Intrange_Command( EDITOR_DATA );
 }
 
 
-void
-on_intrange_new_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_intrange_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Intrange_Command( EDITOR_NEW );
 }
 
 
-void
-on_intrange_cancel_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_intrange_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Intrange_Command( EDITOR_CANCEL );
   gtk_widget_destroy( intrange_command );
 }
 
 
-void
-on_intrange_apply_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_intrange_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Intrange_Command( EDITOR_APPLY );
 }
 
 
-void
-on_intrange_ok_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_intrange_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Intrange_Command( EDITOR_APPLY );
   gtk_widget_destroy( intrange_command );
 }
 
 
-void
-on_ground_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_ground_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   ground_command = NULL;
+  g_object_unref( ground_editor_builder );
+  ground_editor_builder = NULL;
 }
 
 
-void
-on_ground_radiobutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_ground_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Ground_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_ground_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_ground_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Ground_Command( COMMAND_CKBUTTON );
 }
 
 
-void
-on_ground_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_ground_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Ground_Command( EDITOR_DATA );
 }
 
 
-void
-on_ground_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground_Command( EDITOR_NEW );
 }
 
 
-void
-on_ground_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground_Command( EDITOR_CANCEL );
   gtk_widget_destroy( ground_command );
 }
 
 
-void
-on_ground_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground_Command( EDITOR_APPLY );
 }
 
 
-void
-on_ground_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground_Command( EDITOR_APPLY );
   gtk_widget_destroy( ground_command );
 }
 
 
-void
-on_nearfield_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_nearfield_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   nearfield_command = NULL;
+  g_object_unref( nearfield_editor_builder );
+  nearfield_editor_builder = NULL;
 }
 
 
 
-void
-on_nearfield_nh_checkbutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_nearfield_nh_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Nearfield_Command( NEARFIELD_NH_CKBUTTON );
 }
 
 
-void
-on_nearfield_ne_checkbutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_nearfield_ne_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Nearfield_Command( NEARFIELD_NE_CKBUTTON );
 }
 
 
-void
-on_nearfield_radiobutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_nearfield_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Nearfield_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_nearfield_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_nearfield_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Nearfield_Command( EDITOR_DATA );
 }
 
 
-void
-on_nearfield_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nearfield_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Nearfield_Command( EDITOR_NEW );
 }
 
 
-void
-on_nearfield_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nearfield_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Nearfield_Command( EDITOR_CANCEL );
   gtk_widget_destroy( nearfield_command );
 }
 
 
-void
-on_nearfield_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nearfield_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Nearfield_Command( EDITOR_APPLY );
 }
 
 
-void
-on_nearfield_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_nearfield_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Nearfield_Command( EDITOR_APPLY );
   gtk_widget_destroy( nearfield_command );
 }
 
 
-void
-on_radiation_command_destroy           (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_radiation_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   radiation_command = NULL;
+  g_object_unref( radiation_editor_builder );
 }
 
 
-void
-on_radiation_radiobutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_radiation_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Radiation_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_radiation_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_radiation_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Radiation_Command( EDITOR_DATA );
 }
 
 
-void
-on_radiation_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_radiation_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Radiation_Command( EDITOR_NEW );
 }
 
 
-void
-on_radiation_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_radiation_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Radiation_Command( EDITOR_CANCEL );
   gtk_widget_destroy( radiation_command );
 }
 
 
-void
-on_radiation_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_radiation_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Radiation_Command( EDITOR_APPLY );
 }
 
 
-void
-on_radiation_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_radiation_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Radiation_Command( EDITOR_APPLY );
   gtk_widget_destroy( radiation_command );
 }
 
 
-void
-on_excitation_command_destroy          (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_excitation_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   excitation_command = NULL;
+  g_object_unref( excitation_editor_builder );
+  excitation_editor_builder = NULL;
 }
 
 
-void
-on_excitation_radiobutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_excitation_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Excitation_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_excitation_checkbutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_excitation_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Excitation_Command( COMMAND_CKBUTTON );
 }
 
 
-void
-on_excitation_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_excitation_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Excitation_Command( EDITOR_DATA );
 }
 
 
-void
-on_excitation_new_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_excitation_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Excitation_Command( EDITOR_NEW );
 }
 
 
-void
-on_excitation_cancel_button_clicked    (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_excitation_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Excitation_Command( EDITOR_CANCEL );
   gtk_widget_destroy( excitation_command );
 }
 
 
-void
-on_excitation_apply_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_excitation_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Excitation_Command( EDITOR_APPLY );
 }
 
 
-void
-on_excitation_ok_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_excitation_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Excitation_Command( EDITOR_APPLY );
   gtk_widget_destroy( excitation_command );
 }
 
 
-void
-on_frequency_command_destroy           (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_frequency_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   frequency_command = NULL;
+  g_object_unref( frequency_editor_builder );
 }
 
 
-void
-on_frequency_radiobutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_frequency_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Frequency_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_frequency_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_frequency_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Frequency_Command( EDITOR_DATA );
@@ -3350,263 +3509,301 @@ on_frequency_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
 
 
 void
-on_frequency_step_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  on_frequency_step_spinbutton_value_changed
+(GtkSpinButton   *spinbutton,
+ gpointer         user_data)
 {
- gtk_spin_button_update( spinbutton );
- Frequency_Command( FREQUENCY_EDITOR_FSTEP );
+  gtk_spin_button_update( spinbutton );
+  Frequency_Command( FREQUENCY_EDITOR_FSTEP );
 }
 
 
-void
-on_frequency_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_frequency_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Frequency_Command( EDITOR_NEW );
 }
 
 
-void
-on_frequency_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_frequency_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Frequency_Command( EDITOR_CANCEL );
   gtk_widget_destroy( frequency_command );
 }
 
 
-void
-on_frequency_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_frequency_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Frequency_Command( EDITOR_APPLY );
 }
 
 
-void
-on_frequency_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_frequency_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Frequency_Command( EDITOR_APPLY );
   gtk_widget_destroy( frequency_command );
 }
 
 
-void
-on_loading_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_loading_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   loading_command = NULL;
+  g_object_unref( loading_editor_builder );
+  loading_editor_builder = NULL;
 }
 
 
-void
-on_loading_radiobutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_loading_radiobutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Loading_Command( COMMAND_RDBUTTON );
 }
 
 
-void
-on_loading_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_loading_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Loading_Command( EDITOR_DATA );
 }
 
 
-void
-on_loading_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_loading_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Loading_Command( EDITOR_NEW );
 }
 
 
-void
-on_loading_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_loading_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Loading_Command( EDITOR_CANCEL );
   gtk_widget_destroy( loading_command );
 }
 
 
-void
-on_loading_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_loading_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Loading_Command( EDITOR_APPLY );
 }
 
 
-void
-on_loading_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_loading_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Loading_Command( EDITOR_APPLY );
   gtk_widget_destroy( loading_command );
 }
 
 
-void
-on_network_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_network_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   network_command = NULL;
+  g_object_unref( network_editor_builder );
+  network_editor_builder = NULL;
 }
 
 
-void
-on_network_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_network_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Network_Command( EDITOR_DATA );
 }
 
 
-void
-on_network_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_network_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Network_Command( EDITOR_NEW );
 }
 
 
-void
-on_network_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_network_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Network_Command( EDITOR_CANCEL );
   gtk_widget_destroy( network_command );
 }
 
 
-void
-on_network_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_network_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Network_Command( EDITOR_APPLY );
 }
 
 
-void
-on_network_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_network_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Network_Command( EDITOR_APPLY );
   gtk_widget_destroy( network_command );
 }
 
 
-void
-on_txline_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_txline_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   txline_command = NULL;
+  g_object_unref( txline_editor_builder );
+  txline_editor_builder = NULL;
 }
 
 
-void
-on_txline_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_txline_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Txline_Command( EDITOR_DATA );
 }
 
 
-void
-on_txline_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_txline_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Txline_Command( EDITOR_NEW );
 }
 
 
-void
-on_txline_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_txline_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Txline_Command( EDITOR_CANCEL );
   gtk_widget_destroy( txline_command );
 }
 
 
-void
-on_txline_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_txline_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Txline_Command( EDITOR_APPLY );
 }
 
 
-void
-on_txline_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_txline_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Txline_Command( EDITOR_APPLY );
   gtk_widget_destroy( txline_command );
 }
 
 
-void
-on_txline_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
+  void
+on_txline_checkbutton_toggled(
+	GtkToggleButton *togglebutton,
+	gpointer         user_data)
 {
   Txline_Command( COMMAND_CKBUTTON );
 }
 
 
-void
-on_ground2_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data)
+  void
+on_ground2_command_destroy(
+	GObject       *object,
+	gpointer         user_data)
 {
   ground2_command = NULL;
+  g_object_unref( ground2_editor_builder );
+  ground2_editor_builder = NULL;
 }
 
 
-void
-on_ground2_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_ground2_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   gtk_spin_button_update( spinbutton );
   Ground2_Command( EDITOR_DATA );
 }
 
 
-void
-on_ground2_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground2_new_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground2_Command( EDITOR_NEW );
 }
 
 
-void
-on_ground2_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground2_cancel_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground2_Command( EDITOR_CANCEL );
   gtk_widget_destroy( ground2_command );
 }
 
 
-void
-on_ground2_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground2_apply_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground2_Command( EDITOR_APPLY );
 }
 
 
-void
-on_ground2_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_ground2_ok_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Ground2_Command( EDITOR_APPLY );
   gtk_widget_destroy( ground2_command );
@@ -3614,16 +3811,18 @@ on_ground2_ok_button_clicked           (GtkButton       *button,
 
 
   void
-on_loop_start_clicked                  (GtkButton       *button,
-										gpointer         user_data)
+on_loop_start_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   Start_Frequency_Loop();
 }
 
 
   void
-on_loop_pause_clicked                  (GtkButton       *button,
-										gpointer         user_data)
+on_loop_pause_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( isFlagSet(FREQ_LOOP_RUNNING) )
 	SetFlag( FREQ_LOOP_STOP );
@@ -3631,8 +3830,9 @@ on_loop_pause_clicked                  (GtkButton       *button,
 
 
   void
-on_loop_reset_clicked                  (GtkButton       *button,
-										gpointer         user_data)
+on_loop_reset_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   if( isFlagClear(FREQ_LOOP_RUNNING) )
   {
@@ -3642,44 +3842,50 @@ on_loop_reset_clicked                  (GtkButton       *button,
 }
 
 static GtkWidget *aboutdialog = NULL;
-void
-on_about_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
+  void
+on_about_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( aboutdialog == NULL )
   {
-	aboutdialog = create_aboutdialog();
+	GtkBuilder *builder;
+	aboutdialog = create_aboutdialog( &builder );
 	gtk_widget_show( aboutdialog );
 	gtk_about_dialog_set_program_name(
 		GTK_ABOUT_DIALOG(aboutdialog), PACKAGE );
 	gtk_about_dialog_set_version(
 		GTK_ABOUT_DIALOG(aboutdialog), VERSION );
+	g_object_unref( builder );
   }
 }
 
 
-void
-on_aboutdialog_close                   (GtkDialog       *dialog,
-                                        gpointer         user_data)
+  void
+on_aboutdialog_close(
+	GtkDialog       *dialog,
+	gpointer         user_data)
 {
   gtk_widget_destroy( aboutdialog );
   aboutdialog = NULL;
 }
 
 
-void
-on_aboutdialog_response                (GtkDialog       *dialog,
-                                        gint             response_id,
-                                        gpointer         user_data)
+  void
+on_aboutdialog_response(
+	GtkDialog       *dialog,
+	gint             response_id,
+	gpointer         user_data)
 {
   gtk_widget_destroy( aboutdialog );
   aboutdialog = NULL;
 }
 
 
-void
-on_net_gain_activate                   (GtkMenuItem     *menuitem,
-										gpointer         user_data)
+  void
+on_net_gain_activate(
+	GtkMenuItem     *menuitem,
+	gpointer         user_data)
 {
   if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
 	SetFlag( PLOT_NETGAIN );
@@ -3688,25 +3894,29 @@ on_net_gain_activate                   (GtkMenuItem     *menuitem,
 
   /* Trigger a redraw of frequency plots drawingarea */
   if( isFlagSet(PLOT_ENABLED) && isFlagSet(FREQ_LOOP_DONE) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 }
 
 
-gboolean
-on_structure_drawingarea_button_press_event
-                                        (GtkWidget      *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data)
+  gboolean
+on_structure_drawingarea_button_press_event(
+	GtkWidget      *widget,
+	GdkEventButton  *event,
+	gpointer         user_data)
 {
   structure_proj_params.reset = TRUE;
-  return FALSE;
+  return( FALSE );
 }
 
 
-void
-on_structure_zoom_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_structure_zoom_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
   structure_proj_params.xy_zoom = gtk_spin_button_get_value( spinbutton );
   structure_proj_params.xy_zoom /= 100.0;
@@ -3714,13 +3924,16 @@ on_structure_zoom_spinbutton_value_changed
 	structure_proj_params.xy_scale1 * structure_proj_params.xy_zoom;
 
   /* Trigger a redraw of structure drawingarea */
-  Draw_Structure( structure_drawingarea );
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( structure_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 }
 
 
-void
-on_structure_plus_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_structure_plus_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   structure_proj_params.xy_zoom =
 	gtk_spin_button_get_value( structure_zoom );
@@ -3730,9 +3943,10 @@ on_structure_plus_button_clicked       (GtkButton       *button,
 }
 
 
-void
-on_structure_minus_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_structure_minus_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   structure_proj_params.xy_zoom =
 	gtk_spin_button_get_value( structure_zoom );
@@ -3742,49 +3956,56 @@ on_structure_minus_button_clicked      (GtkButton       *button,
 }
 
 
-void
-on_structure_one_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_structure_one_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gtk_spin_button_set_value( structure_zoom, 100.0 );
   structure_proj_params.reset = TRUE;
   New_Projection_Parameters(
-	  structure_pixmap_width,
-	  structure_pixmap_height,
+	  structure_width,
+	  structure_height,
 	  &structure_proj_params );
-  Draw_Structure( structure_drawingarea );
+
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( structure_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 }
 
 
 gboolean
-on_rdpattern_drawingarea_button_press_event
-                                        (GtkWidget      *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data)
+  on_rdpattern_drawingarea_button_press_event
+(GtkWidget      *widget,
+ GdkEventButton  *event,
+ gpointer         user_data)
 {
   rdpattern_proj_params.reset = TRUE;
-  return FALSE;
+  return( FALSE );
 }
 
 
-void
-on_rdpattern_zoom_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data)
+  void
+on_rdpattern_zoom_spinbutton_value_changed(
+	GtkSpinButton   *spinbutton,
+	gpointer         user_data)
 {
-  rdpattern_proj_params.xy_zoom = gtk_spin_button_get_value( spinbutton );
+  rdpattern_proj_params.xy_zoom  = gtk_spin_button_get_value( spinbutton );
   rdpattern_proj_params.xy_zoom /= 100.0;
   rdpattern_proj_params.xy_scale =
 	rdpattern_proj_params.xy_scale1 * rdpattern_proj_params.xy_zoom;
 
   /* Trigger a redraw of structure drawingarea */
-  Draw_Radiation( rdpattern_drawingarea );
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( rdpattern_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 }
 
 
-void
-on_rdpattern_plus_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_rdpattern_plus_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   rdpattern_proj_params.xy_zoom =
 	gtk_spin_button_get_value( rdpattern_zoom );
@@ -3794,9 +4015,10 @@ on_rdpattern_plus_button_clicked       (GtkButton       *button,
 }
 
 
-void
-on_rdpattern_minus_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_rdpattern_minus_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   rdpattern_proj_params.xy_zoom =
 	gtk_spin_button_get_value( rdpattern_zoom );
@@ -3806,24 +4028,29 @@ on_rdpattern_minus_button_clicked      (GtkButton       *button,
 }
 
 
-void
-on_rdpattern_one_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data)
+  void
+on_rdpattern_one_button_clicked(
+	GtkButton       *button,
+	gpointer         user_data)
 {
   gtk_spin_button_set_value( rdpattern_zoom, 100.0 );
   rdpattern_proj_params.reset = TRUE;
   New_Projection_Parameters(
-	  rdpattern_pixmap_width,
-	  rdpattern_pixmap_height,
+	  rdpattern_width,
+	  rdpattern_height,
 	  &rdpattern_proj_params );
-  Draw_Radiation( rdpattern_drawingarea );
+
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( rdpattern_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 }
 
 
-gboolean
-on_structure_drawingarea_scroll_event  (GtkWidget       *widget,
-                                        GdkEvent        *event,
-										gpointer         user_data)
+  gboolean
+on_structure_drawingarea_scroll_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   structure_proj_params.xy_zoom =
 	gtk_spin_button_get_value( structure_zoom );
@@ -3833,14 +4060,15 @@ on_structure_drawingarea_scroll_event  (GtkWidget       *widget,
 	structure_proj_params.xy_zoom /= 1.1;
   gtk_spin_button_set_value(
 	  structure_zoom, structure_proj_params.xy_zoom );
-  return FALSE;
+  return( FALSE );
 }
 
 
-gboolean
-on_rdpattern_drawingarea_scroll_event  (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data)
+  gboolean
+on_rdpattern_drawingarea_scroll_event(
+	GtkWidget       *widget,
+	GdkEvent        *event,
+	gpointer         user_data)
 {
   rdpattern_proj_params.xy_zoom =
 	gtk_spin_button_get_value( rdpattern_zoom );
@@ -3850,6 +4078,6 @@ on_rdpattern_drawingarea_scroll_event  (GtkWidget       *widget,
 	rdpattern_proj_params.xy_zoom /= 1.1;
   gtk_spin_button_set_value(
 	  rdpattern_zoom, rdpattern_proj_params.xy_zoom );
-  return FALSE;
+  return( FALSE );
 }
 
diff --git a/src/callbacks.h b/src/callbacks.h
index e10d979..f8a7233 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -1,1301 +1,30 @@
-#include <gtk/gtk.h>
+/*
+ *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	CALLBACKS_H
+#define	CALLBACKS_H		1
+
+#include "common.h"
+#include "interface.h"
+#include "fork.h"
+#include "xnec2c.h"
+#include "editors.h"
+#include "nec2_model.h"
+
+#include <gdk/gdkkeysyms.h>
+
+#endif
 
-
-void
-on_main_window_destroy                 (GtkObject       *object,
-                                        gpointer         user_data);
-
-gboolean
-on_main_window_delete_event            (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_new_activate                        (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_open_input_activate                 (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_nec2_edit_activate                  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_main_save_activate                  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_main_save_as_activate               (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_quit_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-main_view_menuitem_activate            (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_main_rdpattern_activate             (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_main_freqplots_activate             (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-main_pol_menu_activate                 (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_total_activate            (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_horizontal_activate       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_vertical_activate         (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_right_hand_activate       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_left_hand_activate        (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_common_projection_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_common_freq_activate                (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_about_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_main_currents_togglebutton_toggled  (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_main_charges_togglebutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_loop_start_clicked                  (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loop_pause_clicked                  (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loop_reset_clicked                  (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_main_colorcode_drawingarea_expose_event
-                                        (GtkWidget       *widget,
-                                        GdkEventExpose  *event,
-                                        gpointer         user_data);
-
-void
-on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_main_freq_checkbutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_main_new_freq_clicked               (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_structure_drawingarea_configure_event
-                                        (GtkWidget       *widget,
-                                        GdkEventConfigure *event,
-                                        gpointer         user_data);
-
-gboolean
-on_structure_drawingarea_expose_event  (GtkWidget       *widget,
-                                        GdkEventExpose  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_structure_drawingarea_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_structure_drawingarea_motion_notify_event( GtkWidget       *widget,
-                                              GdkEventMotion  *event,
-                                              gpointer         user_data);
-
-void
-on_main_x_axis_clicked                 (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_main_y_axis_clicked                 (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_main_z_axis_clicked                 (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_main_default_view_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_main_rotate_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_main_incline_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_structure_zoom_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_structure_plus_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_structure_minus_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_structure_one_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_filechooserdialog_response          (GtkDialog       *dialog,
-                                        gint             response_id,
-                                        gpointer         user_data);
-
-void
-on_filechoser_cancel_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_fileselection_response              (GtkDialog       *dialog,
-                                        gint             response_id,
-                                        gpointer         user_data);
-
-void
-on_fileselection_cancel_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_freqplots_window_delete_event       (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_freqplots_window_destroy            (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_freqplots_save_activate             (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_freqplots_save_as_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-freqplots_pol_menu_activate            (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_net_gain_activate                   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_freqplots_gmax_togglebutton_toggled (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_gdir_togglebutton_toggled (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_gviewer_togglebutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_vswr_togglebutton_toggled (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_zrlzim_togglebutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_zmgzph_togglebutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_freqplots_zo_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-gboolean
-on_freqplots_drawingarea_expose_event  (GtkWidget       *widget,
-                                        GdkEventExpose  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_freqplots_drawingarea_configure_event
-                                        (GtkWidget       *widget,
-                                        GdkEventConfigure *event,
-                                        gpointer         user_data);
-
-gboolean
-on_freqplots_drawingarea_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_window_delete_event       (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_window_destroy            (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_save_activate             (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_save_as_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-rdpattern_view_menuitem_activate       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-rdpattern_pol_menu_activate            (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_linear_power_activate     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_linear_voltage_activate   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_arrl_style_activate       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_logarithmic_activate      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_e_field_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_h_field_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_poynting_vector_activate  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_animate_activate          (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_near_peak_value_activate            (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_near_snapshot_activate              (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_gain_togglebutton_toggled (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_eh_togglebutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_colorcode_drawingarea_expose_event
-                                        (GtkWidget       *widget,
-                                        GdkEventExpose  *event,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_freq_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_new_freq_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_drawingarea_configure_event
-                                        (GtkWidget       *widget,
-                                        GdkEventConfigure *event,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_drawingarea_expose_event  (GtkWidget       *widget,
-                                        GdkEventExpose  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_drawingarea_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_drawingarea_motion_notify_event( GtkWidget       *widget,
-                                              GdkEventMotion  *event,
-                                              gpointer         user_data);
-
-void
-on_rdpattern_x_axis_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_y_axis_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_z_axis_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_default_view_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_rotate_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_incline_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_zoom_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_plus_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_minus_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_one_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_quit_dialog_destroy                 (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_quit_cancelbutton_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_quit_okbutton_clicked               (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_error_dialog_delete_event           (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_error_quitbutton_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_error_okbutton_clicked              (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_error_stopbutton_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_animate_dialog_destroy              (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_animation_applybutton_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_animation_cancelbutton_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_animation_okbutton_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_nec2_editor_delete_event            (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_nec2_editor_destroy                 (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_nec2_row_add_clicked                (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nec2_row_remv_clicked               (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nec2_treeview_clear_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nec2_save_as_clicked                (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nec2_save_clicked                   (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nec2_revert_clicked                 (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_nec2_cmnt_treeview_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-void
-on_gw_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ga_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gh_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_sp_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gr_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gm_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gx_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gs_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_nec2_geom_treeview_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-void
-on_ex_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_fr_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gn_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_rp_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ld_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nt_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_tl_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ne_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_xq_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_kh_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ek_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gd_clicked                          (GtkButton       *button,
-                                        gpointer         user_data);
-
-gboolean
-on_nec2_cmnd_treeview_button_press_event
-                                        (GtkWidget       *widget,
-                                        GdkEventButton  *event,
-                                        gpointer         user_data);
-
-void
-on_wire_editor_destroy                 (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_wire_tagnum_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_data_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_pcl_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_len_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_res_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_taper_checkbutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_wire_rdia_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_rlen_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_wire_new_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_wire_cancel_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_wire_apply_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_wire_ok_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_patch_editor_destroy                (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_patch_arbitrary_radiobutton_toggled  (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_patch_rectangular_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_patch_triangular_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_patch_quadrilateral_radiobutton_toggled
-                                        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_patch_surface_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_patch_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_patch_new_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_patch_cancel_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_patch_apply_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_patch_ok_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_arc_editor_destroy                  (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_arc_data_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_arc_tagnum_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_arc_pcl_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_arc_res_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_arc_new_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_arc_cancel_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_arc_apply_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_arc_ok_button_clicked               (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_transform_editor_destroy            (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_transform_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_transform_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_transform_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_transform_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_transform_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_helix_editor_destroy                (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_helix_tagnum_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_helix_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_helix_pcl_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_helix_nturns_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_helix_res_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_helix_linkzo_radiobutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_helix_linkzhl_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_helix_linkall_radiobutton_toggled   (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_helix_lh_checkbutton_toggled        (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_helix_new_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_helix_cancel_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_helix_apply_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_helix_ok_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_reflect_editor_destroy              (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_reflect_checkbutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_reflect_taginc_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_reflect_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_reflect_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_reflect_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_reflect_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_scale_editor_destroy                (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_scale_spinbutton_value_changed      (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_scale_new_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_scale_cancel_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_scale_apply_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_scale_ok_button_clicked             (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_cylinder_editor_destroy             (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_cylinder_taginc_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_cylinder_total_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_cylinder_new_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_cylinder_cancel_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_cylinder_apply_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_cylinder_ok_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_kernel_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_kernel_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_kernel_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_kernel_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_kernel_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_kernel_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_execute_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_execute_radiobutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_execute_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_execute_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_execute_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_execute_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_intrange_command_destroy            (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_intrange_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_intrange_new_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_intrange_cancel_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_intrange_apply_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_intrange_ok_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_ground_radiobutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_ground_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_ground_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_ground_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nearfield_command_destroy           (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_nearfield_nh_checkbutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_nearfield_ne_checkbutton_toggled    (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_nearfield_radiobutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_nearfield_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_nearfield_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nearfield_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nearfield_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_nearfield_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_radiation_command_destroy           (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_radiation_radiobutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_radiation_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_radiation_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_radiation_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_radiation_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_radiation_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_excitation_command_destroy          (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_excitation_radiobutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_excitation_checkbutton_toggled      (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_excitation_spinbutton_value_changed (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_excitation_new_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_excitation_cancel_button_clicked    (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_excitation_apply_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_excitation_ok_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_frequency_command_destroy           (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_frequency_radiobutton_toggled       (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_frequency_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_frequency_step_spinbutton_value_changed
-                                        (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_frequency_new_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_frequency_cancel_button_clicked     (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_frequency_apply_button_clicked      (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_frequency_ok_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loading_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_loading_radiobutton_toggled         (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_loading_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_loading_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loading_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loading_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_loading_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_network_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_network_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_network_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_network_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_network_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_network_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_txline_command_destroy              (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_txline_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_txline_checkbutton_toggled          (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_txline_new_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_txline_cancel_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_txline_apply_button_clicked         (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_txline_ok_button_clicked            (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground2_command_destroy             (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_ground2_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
-                                        gpointer         user_data);
-
-void
-on_ground2_new_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground2_cancel_button_clicked       (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground2_apply_button_clicked        (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_ground2_ok_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gend_editor_destroy                 (GtkObject       *object,
-                                        gpointer         user_data);
-
-void
-on_gend_radiobutton_toggled            (GtkToggleButton *togglebutton,
-                                        gpointer         user_data);
-
-void
-on_gend_cancel_button_clicked          (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gend_apply_button_clicked           (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_gend_ok_button_clicked              (GtkButton       *button,
-                                        gpointer         user_data);
-
-void
-on_aboutdialog_close                   (GtkDialog       *dialog,
-                                        gpointer         user_data);
-
-void
-on_aboutdialog_response                (GtkDialog       *dialog,
-                                        gint             response_id,
-                                        gpointer         user_data);
-
-gboolean
-on_structure_drawingarea_scroll_event  (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-gboolean
-on_rdpattern_drawingarea_scroll_event  (GtkWidget       *widget,
-                                        GdkEvent        *event,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_overlay_structure_activate
-                                        (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_rdpattern_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_freqplots_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_struct_save_as_gnuplot_activate     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
diff --git a/src/cmnd_edit.c b/src/cmnd_edit.c
index 5b48bbd..a19c1c8 100644
--- a/src/cmnd_edit.c
+++ b/src/cmnd_edit.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,13 +14,188 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* comnd_edit.c
+#include "cmnd_edit.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_EN_Card()
  *
- * NEC2 command editing functions for xnec2c
+ * Inserts a default EN card if missing
  */
 
-#include "cmnd_edit.h"
-#include "shared.h"
+  static void
+Insert_EN_Card( GtkListStore *store, GtkTreeIter *iter )
+{
+  gint idx, idc;
+
+  /* Insert default EN card if list is clear */
+  idx = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !idx )
+  {
+	gtk_list_store_append( store, iter );
+	gtk_list_store_set( store, iter, CMND_COL_NAME, "EN", -1 );
+	for( idc = CMND_COL_I1; idc < CMND_NUM_COLS; idc++ )
+	  gtk_list_store_set( store, iter, idc, "0", -1 );
+  }
+
+} /* Insert_EN_Card() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Command_Data()
+ *
+ * Gets command data from a treeview row
+ */
+
+  static void
+Get_Command_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gint idc;
+  gchar *sv;
+
+  /* Get data from tree view (I1-I4, F1-F6)*/
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
+	  iv[idc-CMND_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
+	  fv[idc-CMND_COL_F1] = Strtod( sv, NULL );
+	  g_free(sv);
+	}
+  }
+  else stop( _("Get_Command_Data(): Error reading\n"
+		"row data: Invalid list iterator"), ERR_OK );
+
+} /* Get_Command_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Command_Data()
+ *
+ * Sets data into a command row
+ */
+
+  static void
+Set_Command_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gchar str[13];
+  gint idc;
+
+  /* Format and set editor data to treeview (I1-I4 & F1-F6) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
+	{
+	  snprintf( str, 6, "%5d", iv[idc-CMND_COL_I1] );
+	  gtk_list_store_set( store, iter, idc, str, -1 );
+	}
+
+	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
+	{
+	  snprintf( str, 13, "%12.5E", fv[idc-CMND_COL_F1] );
+	  gtk_list_store_set( store, iter, idc, str, -1 );
+	}
+  }
+  else stop( _("Set_Command_Data(): Error writing row data\n"
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Command_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_Blank_Command_Row()
+ *
+ * Inserts a blank row in a tree view with only its name (GW ... )
+ */
+
+  static void
+Insert_Blank_Command_Row(
+	GtkTreeView *view, GtkListStore *store,
+	GtkTreeIter *iter, const gchar *name )
+{
+  GtkTreeSelection *selection;
+  gboolean retv;
+  gint n;
+  gchar *str;
+
+  if( nec2_edit_window == NULL )
+	return;
+
+  /* Get selected row, if any */
+  selection = gtk_tree_view_get_selection( view );
+  retv = gtk_tree_selection_get_selected( selection, NULL, iter );
+
+  /* If no selected row, insert new row into list
+   * store before last row, else after the selected row,
+   * but if this is a GE row, then insert before it */
+  if( !retv )
+  {
+	n = gtk_tree_model_iter_n_children(
+		GTK_TREE_MODEL(store), NULL );
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), iter, NULL, n-1 );
+	gtk_list_store_insert_before( store, iter, iter );
+  }
+  else
+  {
+	gtk_tree_model_get(
+		GTK_TREE_MODEL(store), iter, CMND_COL_NAME, &str, -1 );
+	if( strcmp(str, "EN") == 0 )
+	  gtk_list_store_insert_before( store, iter, iter );
+	else
+	  gtk_list_store_insert_after( store, iter, iter );
+	g_free(str);
+  }
+
+  gtk_list_store_set( store, iter, CMND_COL_NAME, name, -1 );
+  for( n = CMND_COL_I1; n < CMND_NUM_COLS; n++ )
+	gtk_list_store_set( store, iter, n, "--", -1 );
+  gtk_tree_selection_select_iter( selection, iter );
+
+} /* Insert_Blank_Command_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Labels()
+ *
+ * Sets labels in an editor window
+ */
+
+  static void
+Set_Labels(
+	GtkBuilder *builder,
+	gchar **labels,
+	gchar **text,
+	gint num )
+{
+  int idx;
+  GtkLabel *label;
+
+  for( idx = 0; idx < num; idx++ )
+  {
+	label = GTK_LABEL( Builder_Get_Object(builder, labels[idx]) );
+	gtk_label_set_text( label, text[idx] );
+  }
+
+} /* Set_Labels() */
 
 /*------------------------------------------------------------------------*/
 
@@ -39,7 +212,7 @@ Excitation_Command( int action )
   GtkToggleButton *toggle;
 
   /* Spinbutton labels */
-  #define EX_LABELS 8
+#define EX_LABELS 8
   static gchar *labels[EX_LABELS] =
   {
 	"excitation_i2_label",
@@ -64,7 +237,7 @@ Excitation_Command( int action )
   static gdouble fv[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
 
   /* Command radio buttons */
-  #define EX_TYPRDBTN 6
+#define EX_TYPRDBTN 6
 
   /* Excitation type */
   static gchar *typrdbtn[EX_TYPRDBTN] =
@@ -98,8 +271,8 @@ Excitation_Command( int action )
 
   static gboolean
 	label = TRUE,  /* Enable setting of spinbutton labels */
-	save  = FALSE, /* Enable saving of editor data */
-	busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+		  save  = FALSE, /* Enable saving of editor data */
+		  busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -134,8 +307,9 @@ Excitation_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_ex, "EX" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT: /* Edit a command row (EX card) */
@@ -149,37 +323,34 @@ Excitation_Command( int action )
 	  /* Write int data to the command editor */
 	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  excitation_command, ispin[idi - SPIN_COL_I2]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(excitation_editor_builder, ispin[idi - SPIN_COL_I2]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  excitation_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(excitation_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 
 	  /* Set radio buttons */
 	  toggle = GTK_TOGGLE_BUTTON(
-		  lookup_widget(excitation_command,
-			typrdbtn[iv[SPIN_COL_I1]]) );
+		  Builder_Get_Object(excitation_editor_builder, typrdbtn[iv[SPIN_COL_I1]]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Set check buttons */
 	  toggle = GTK_TOGGLE_BUTTON(
-		  lookup_widget(excitation_command,
-			"excitation_i419_checkbutton") );
+		  Builder_Get_Object(excitation_editor_builder, "excitation_i419_checkbutton") );
 	  if( iv[SPIN_COL_I4] & 0x0a )
 		gtk_toggle_button_set_active( toggle, TRUE );
 	  else
 		gtk_toggle_button_set_active( toggle, FALSE );
 
 	  toggle = GTK_TOGGLE_BUTTON(
-		  lookup_widget(excitation_command,
-			"excitation_i420_checkbutton") );
+		  Builder_Get_Object(excitation_editor_builder, "excitation_i420_checkbutton") );
 	  if( iv[SPIN_COL_I4] & 0x01 )
 		gtk_toggle_button_set_active( toggle, TRUE );
 	  else
@@ -199,7 +370,7 @@ Excitation_Command( int action )
 	  for( idx = 0; idx < EX_TYPRDBTN; idx++ )
 	  {
 		toggle = GTK_TOGGLE_BUTTON(
-			lookup_widget(excitation_command, typrdbtn[idx]) );
+			Builder_Get_Object(excitation_editor_builder, typrdbtn[idx]) );
 		if( gtk_toggle_button_get_active(toggle) )
 		  break;
 	  }
@@ -212,16 +383,14 @@ Excitation_Command( int action )
 	  /* Find active print control check button
 	   * (matrix asymmetry and segment impedance) */
 	  toggle = GTK_TOGGLE_BUTTON(
-		  lookup_widget(excitation_command,
-			"excitation_i419_checkbutton") );
+		  Builder_Get_Object(excitation_editor_builder, "excitation_i419_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 		iv[SPIN_COL_I4] = 10;
 	  else
 		iv[SPIN_COL_I4] = 0;
 
 	  toggle = GTK_TOGGLE_BUTTON(
-		  lookup_widget(excitation_command,
-			"excitation_i420_checkbutton") );
+		  Builder_Get_Object(excitation_editor_builder, "excitation_i420_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 		iv[SPIN_COL_I4] += 1;
 
@@ -236,16 +405,16 @@ Excitation_Command( int action )
   /* Read int data from the command editor */
   for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  excitation_command, ispin[idi - SPIN_COL_I2]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(excitation_editor_builder, ispin[idi - SPIN_COL_I2]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  excitation_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(excitation_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -272,10 +441,10 @@ Excitation_Command( int action )
 		  for( idf = SPIN_COL_F4; idf <= SPIN_COL_F6; idf++ )
 		  {
 			spin = GTK_SPIN_BUTTON(
-				lookup_widget(excitation_command, fspin[idf]) );
+				Builder_Get_Object(excitation_editor_builder, fspin[idf]) );
 			gtk_spin_button_set_value( spin, 0 );
 		  }
-		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		  Set_Labels( excitation_editor_builder, labels, text, EX_LABELS );
 		}
 		break;
 
@@ -293,7 +462,7 @@ Excitation_Command( int action )
 			_("Minor/Major Axis")
 		  };
 
-		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		  Set_Labels( excitation_editor_builder, labels, text, EX_LABELS );
 		}
 		break;
 
@@ -315,10 +484,10 @@ Excitation_Command( int action )
 		  for( idx = 0; idx < 2; idx++ )
 		  {
 			spin = GTK_SPIN_BUTTON(
-				lookup_widget(excitation_command, ispin[idx]) );
+				Builder_Get_Object(excitation_editor_builder, ispin[idx]) );
 			gtk_spin_button_set_value( spin, 0 );
 		  }
-		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		  Set_Labels( excitation_editor_builder, labels, text, EX_LABELS );
 		}
 
 		label = FALSE;
@@ -369,8 +538,8 @@ Frequency_Command( int action )
 
   static gboolean
 	save  = FALSE, /* Enable saving of editor data */
-    fstep = FALSE, /* Set frequency step to editor */
-    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+	fstep = FALSE, /* Set frequency step to editor */
+	busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -393,15 +562,15 @@ Frequency_Command( int action )
   } /* if( (action & EDITOR_SAVE) && save ) */
 
   /* Read int data from the command editor */
-  spin = GTK_SPIN_BUTTON( lookup_widget(
-		frequency_command, "frequency_num_spinbutton") );
+  spin = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(frequency_editor_builder, "frequency_num_spinbutton") );
   iv[SPIN_COL_I2] = gtk_spin_button_get_value_as_int( spin );
 
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  frequency_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(frequency_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -418,8 +587,9 @@ Frequency_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_fr, "FR" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT: /* Edit a command row (FR card) */
@@ -430,15 +600,15 @@ Frequency_Command( int action )
 	  Get_Command_Data( cmnd_store, &iter_fr, iv, fv );
 
 	  /* Write int data to the command editor */
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			frequency_command, "frequency_num_spinbutton") );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(frequency_editor_builder, "frequency_num_spinbutton") );
 	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(frequency_command, fspin[idf]) );
+			Builder_Get_Object(frequency_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 
@@ -453,21 +623,19 @@ Frequency_Command( int action )
 			  (gdouble)(iv[SPIN_COL_I2]-1) );
 
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(frequency_command, fspin[SPIN_COL_F3]) );
+			Builder_Get_Object(frequency_editor_builder, fspin[SPIN_COL_F3]) );
 		gtk_spin_button_set_value( spin, fv[SPIN_COL_F3] );
 	  } /* if( iv[SPIN_COL_I2] > 1 ) */
 
 	  /* Set stepping type radio button */
 	  if( iv[SPIN_COL_I1] == 0 )
-		gtk_toggle_button_set_active(
-			GTK_TOGGLE_BUTTON(lookup_widget(
-				frequency_command,
-				"frequency_add_radiobutton")), TRUE );
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(frequency_editor_builder,	"frequency_add_radiobutton")),
+			TRUE );
 	  else
-		gtk_toggle_button_set_active(
-			GTK_TOGGLE_BUTTON(lookup_widget(
-				frequency_command,
-				"frequency_mul_radiobutton")), TRUE );
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(frequency_editor_builder,	"frequency_mul_radiobutton")),
+			TRUE );
 	  break;
 
 	case EDITOR_CANCEL: /* Cancel frequency editor */
@@ -478,10 +646,8 @@ Frequency_Command( int action )
 
 	case COMMAND_RDBUTTON: /* Radio button toggled in editor window */
 	  /* Set frequency stepping type */
-	  if( gtk_toggle_button_get_active(
-			GTK_TOGGLE_BUTTON(lookup_widget(
-				frequency_command,
-				"frequency_add_radiobutton"))) )
+	  if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(frequency_editor_builder,	"frequency_add_radiobutton"))) )
 		iv[SPIN_COL_I1] = 0;
 	  else
 		iv[SPIN_COL_I1] = 1;
@@ -498,8 +664,8 @@ Frequency_Command( int action )
 		iv[SPIN_COL_I2] = (gint)(log(fv[SPIN_COL_F3] /
 			  fv[SPIN_COL_F1])/log(fv[SPIN_COL_F2])) + 1;
 
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			frequency_command, "frequency_num_spinbutton") );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(frequency_editor_builder,	"frequency_num_spinbutton") );
 	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
 	  save = TRUE;
 	  break;
@@ -520,7 +686,7 @@ Frequency_Command( int action )
 		  1.0/(gdouble)(iv[SPIN_COL_I2]-1));
 
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(frequency_command, fspin[SPIN_COL_F2]) );
+		Builder_Get_Object(frequency_editor_builder, fspin[SPIN_COL_F2]) );
 	gtk_spin_button_set_value( spin, fv[SPIN_COL_F2] );
   } /* if( fstep ) */
   else fstep = TRUE;
@@ -560,7 +726,7 @@ Ground_Command( int action )
   static gdouble fv[12];
 
   /* Command radio buttons */
-  #define GN_RDBTN 4
+#define GN_RDBTN 4
   static gchar *rdbutton[GN_RDBTN] =
   {
 	"ground_null_radiobutton",
@@ -587,11 +753,11 @@ Ground_Command( int action )
 
   static gboolean
 	radl = FALSE, /* Radial ground screen present  */
-	scmd = FALSE, /* Second medium present (cliff) */
-	both = FALSE, /* Both above selected */
-	save = FALSE, /* Enable saving of editor data  */
-	show = TRUE,  /* Show/hide frames according to ground type */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 scmd = FALSE, /* Second medium present (cliff) */
+		 both = FALSE, /* Both above selected */
+		 save = FALSE, /* Enable saving of editor data  */
+		 show = TRUE,  /* Show/hide frames according to ground type */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
   /* Block callbacks. (Should be a better way to do this) */
   if( Give_Up( &busy, ground_command) ) return;
@@ -623,8 +789,8 @@ Ground_Command( int action )
 	  show = TRUE;
 	  iv[SPIN_COL_I1] = 1;
 	  iv[SPIN_COL_I2] = 0;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_perf_radiobutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_perf_radiobutton") );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Insert a default EN card if list is empty */
@@ -636,8 +802,9 @@ Ground_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_gn, "GN" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  save = TRUE;
 	  break;
 
@@ -645,11 +812,11 @@ Ground_Command( int action )
 	  /* Reset flags and check buttons */
 	  radl = scmd = both = FALSE;
 	  show = TRUE;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_radl_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 	  gtk_toggle_button_set_active( toggle, FALSE );
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_secmd_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 	  gtk_toggle_button_set_active( toggle, FALSE );
 
 	  /* Get selected row */
@@ -659,8 +826,8 @@ Ground_Command( int action )
 	  Get_Command_Data( cmnd_store, &iter_gn, iv, fv );
 
 	  /* Set ground type radio buttons */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, rdbutton[iv[SPIN_COL_I1]+1]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, rdbutton[iv[SPIN_COL_I1]+1]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Write 1st ground data to the command editor */
@@ -668,7 +835,7 @@ Ground_Command( int action )
 		for( idf = SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
 		{
 		  spin = GTK_SPIN_BUTTON(
-			  lookup_widget(ground_command, fspin[idf]) );
+			  Builder_Get_Object(ground_editor_builder, fspin[idf]) );
 		  gtk_spin_button_set_value( spin, fv[idf] );
 		}
 
@@ -678,20 +845,20 @@ Ground_Command( int action )
 		radl = TRUE;
 
 		/* Radial ground screen check button */
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  ground_command, "ground_radl_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 
 		/* Write num of radials to the command editor */
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  ground_command, "ground_nrad_spinbutton") );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(ground_editor_builder, "ground_nrad_spinbutton") );
 		gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
 
 		/* Write radial data to the command editor */
 		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
 		{
-		  spin = GTK_SPIN_BUTTON( lookup_widget(
-				ground_command, fspin[idf+4]) );
+		  spin = GTK_SPIN_BUTTON(
+			  Builder_Get_Object(ground_editor_builder, fspin[idf+4]) );
 		  gtk_spin_button_set_value( spin, fv[idf] );
 		}
 
@@ -706,15 +873,15 @@ Ground_Command( int action )
 			  &iv[CMND_NUM_ICOLS], &fv[CMND_NUM_FCOLS] );
 		  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
 		  {
-			spin = GTK_SPIN_BUTTON( lookup_widget(
-				  ground_command, fspin[idf+2]) );
+			spin = GTK_SPIN_BUTTON(
+				Builder_Get_Object(ground_editor_builder, fspin[idf+2]) );
 			gtk_spin_button_set_value(
 				spin, fv[idf+CMND_NUM_FCOLS] );
 		  }
 
 		  /* Set 2nd medium check button */
-		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-				ground_command, "ground_secmd_checkbutton") );
+		  toggle = GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 		  gtk_toggle_button_set_active( toggle, TRUE );
 
 		} /* if( Check_Card_Name(cmnd_store, &iter_gd, NEXT, "GD") ) */
@@ -725,15 +892,15 @@ Ground_Command( int action )
 		scmd = TRUE;
 
 		/* Set 2nd medium check button */
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  ground_command, "ground_secmd_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 
 		/* Write 2nd medium data to command editor */
 		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
 		{
-		  spin = GTK_SPIN_BUTTON( lookup_widget(
-				ground_command, fspin[idf]) );
+		  spin = GTK_SPIN_BUTTON(
+			  Builder_Get_Object(ground_editor_builder, fspin[idf]) );
 		  gtk_spin_button_set_value( spin, fv[idf] );
 		}
 
@@ -752,8 +919,8 @@ Ground_Command( int action )
 	  /* Find active radio button */
 	  for( idx = 0; idx < GN_RDBTN; idx++ )
 	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  ground_command, rdbutton[idx]) );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(ground_editor_builder, rdbutton[idx]) );
 		if( gtk_toggle_button_get_active(toggle) )
 		  break;
 	  }
@@ -766,11 +933,11 @@ Ground_Command( int action )
 		  Remove_Row( cmnd_store, &iter_gd );
 
 		/* Set toggle buttons as needed */
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  ground_command, "ground_radl_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 		gtk_toggle_button_set_active( toggle, FALSE );
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  ground_command, "ground_secmd_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 		gtk_toggle_button_set_active( toggle, FALSE );
 
 		both = radl = scmd = FALSE;
@@ -782,16 +949,16 @@ Ground_Command( int action )
 
 	case COMMAND_CKBUTTON: /* Check button toggled */
 	  /* Get number of radial wires if enabled */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_radl_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 		radl = TRUE;
 	  else
 		radl = FALSE;
 
 	  /* Set 2nd medium flag if enabled */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_secmd_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 		scmd = TRUE;
 	  else
@@ -802,9 +969,11 @@ Ground_Command( int action )
 	  {
 		Insert_Blank_Command_Row(
 			cmnd_treeview, cmnd_store, &iter_gd, "GD" );
+
 		/* Scroll tree view to bottom */
-		gtk_adjustment_set_value(
-			cmnd_adjustment, cmnd_adjustment->upper );
+		gtk_adjustment_set_value( cmnd_adjustment,
+			gtk_adjustment_get_upper(cmnd_adjustment) -
+			gtk_adjustment_get_page_size(cmnd_adjustment) );
 		both = TRUE;
 	  }
 	  else
@@ -827,8 +996,8 @@ Ground_Command( int action )
   /* Read num of radials from the command editor */
   if( radl )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  ground_command, "ground_nrad_spinbutton") );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(ground_editor_builder, "ground_nrad_spinbutton") );
 	iv[SPIN_COL_I2] = gtk_spin_button_get_value_as_int( spin );
   }
   else iv[SPIN_COL_I2] = 0;
@@ -847,8 +1016,8 @@ Ground_Command( int action )
 	/* Read 1st medium rel dielec const & conductivity */
 	for( idf= SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
 	{
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			ground_command, fspin[idf]) );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, fspin[idf]) );
 	  fv[idf] = gtk_spin_button_get_value( spin );
 	}
 
@@ -858,8 +1027,8 @@ Ground_Command( int action )
 	  /* Read radial screen parameters */
 	  for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  ground_command, fspin[idf+4]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(ground_editor_builder, fspin[idf+4]) );
 		fv[idf] = gtk_spin_button_get_value( spin );
 	  }
 
@@ -870,8 +1039,8 @@ Ground_Command( int action )
 	  /* Set 2nd medium parameters to GD card */
 	  for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  ground_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(ground_editor_builder, fspin[idf]) );
 		fv[idf - SPIN_COL_F3+CMND_NUM_FCOLS] =
 		  gtk_spin_button_get_value( spin );
 	  }
@@ -883,8 +1052,8 @@ Ground_Command( int action )
 	  {
 		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
 		{
-		  spin = GTK_SPIN_BUTTON( lookup_widget(
-				ground_command, fspin[idf+4]) );
+		  spin = GTK_SPIN_BUTTON(
+			  Builder_Get_Object(ground_editor_builder, fspin[idf+4]) );
 		  fv[idf] = gtk_spin_button_get_value( spin );
 		}
 		for( idf = SPIN_COL_F5; idf <= SPIN_COL_F6; idf++ )
@@ -894,8 +1063,8 @@ Ground_Command( int action )
 	  {
 		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
 		{
-		  spin = GTK_SPIN_BUTTON( lookup_widget(
-				ground_command, fspin[idf]) );
+		  spin = GTK_SPIN_BUTTON(
+			  Builder_Get_Object(ground_editor_builder, fspin[idf]) );
 		  fv[idf] = gtk_spin_button_get_value( spin );
 		}
 	  }
@@ -913,20 +1082,20 @@ Ground_Command( int action )
 	if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) )
 	{
 	  /* Show only radio buttons */
-	  frame = GTK_FRAME( lookup_widget(
-			ground_command, "ground_med1_frame") );
+	  frame = GTK_FRAME(
+		  Builder_Get_Object(ground_editor_builder, "ground_med1_frame") );
 	  gtk_widget_hide( GTK_WIDGET(frame) );
-	  frame = GTK_FRAME( lookup_widget(
-			ground_command, "ground_med2_frame") );
+	  frame = GTK_FRAME(
+		  Builder_Get_Object(ground_editor_builder, "ground_med2_frame") );
 	  gtk_widget_hide( GTK_WIDGET(frame) );
-	  frame = GTK_FRAME( lookup_widget(
-			ground_command, "ground_radial_frame") );
+	  frame = GTK_FRAME(
+		  Builder_Get_Object(ground_editor_builder, "ground_radial_frame") );
 	  gtk_widget_hide( GTK_WIDGET(frame) );
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_radl_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 	  gtk_widget_hide( GTK_WIDGET(toggle) );
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_secmd_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 	  gtk_widget_hide( GTK_WIDGET(toggle) );
 
 	} /* if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) ) */
@@ -934,41 +1103,41 @@ Ground_Command( int action )
 	if( (iv[SPIN_COL_I1] == 0) || (iv[SPIN_COL_I1] == 2) ) /* Finite ground */
 	{
 	  /* Show check buttons */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_radl_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_radl_checkbutton") );
 	  gtk_widget_show( GTK_WIDGET(toggle) );
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			ground_command, "ground_secmd_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(ground_editor_builder, "ground_secmd_checkbutton") );
 	  gtk_widget_show( GTK_WIDGET(toggle) );
 
 	  /* Show 1st medium */
-	  frame = GTK_FRAME( lookup_widget(
-			ground_command, "ground_med1_frame") );
+	  frame = GTK_FRAME(
+		  Builder_Get_Object(ground_editor_builder, "ground_med1_frame") );
 	  gtk_widget_show( GTK_WIDGET(frame) );
 
 	  if( scmd ) /* Show 2nd medium */
 	  {
-		frame = GTK_FRAME( lookup_widget(
-			  ground_command, "ground_med2_frame") );
+		frame = GTK_FRAME(
+			Builder_Get_Object(ground_editor_builder, "ground_med2_frame") );
 		gtk_widget_show( GTK_WIDGET(frame) );
 	  }
 	  else
 	  {
-		frame = GTK_FRAME( lookup_widget(
-			  ground_command, "ground_med2_frame") );
+		frame = GTK_FRAME(
+			Builder_Get_Object(ground_editor_builder, "ground_med2_frame") );
 		gtk_widget_hide( GTK_WIDGET(frame) );
 	  }
 
 	  if( radl ) /* Show radial screen */
 	  {
-		frame = GTK_FRAME( lookup_widget(
-			  ground_command, "ground_radial_frame") );
+		frame = GTK_FRAME(
+			Builder_Get_Object(ground_editor_builder, "ground_radial_frame") );
 		gtk_widget_show( GTK_WIDGET(frame) );
 	  }
 	  else
 	  {
-		frame = GTK_FRAME( lookup_widget(
-			  ground_command, "ground_radial_frame") );
+		frame = GTK_FRAME(
+			Builder_Get_Object(ground_editor_builder, "ground_radial_frame") );
 		gtk_widget_hide( GTK_WIDGET(frame) );
 	  }
 	} /* if( (iv[SPIN_COL_I1] == 0) || (iv[SPIN_COL_I1] == 2) ) */
@@ -1020,7 +1189,7 @@ Ground2_Command( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data  */
-    busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1055,8 +1224,9 @@ Ground2_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_gd, "GD" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a command row (GD) */
@@ -1069,8 +1239,8 @@ Ground2_Command( int action )
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  ground2_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(ground2_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 	  break;
@@ -1085,8 +1255,8 @@ Ground2_Command( int action )
 	  /* Read float data from the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  ground2_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(ground2_editor_builder, fspin[idf]) );
 		fv[idf] = gtk_spin_button_get_value( spin );
 	  }
 	  save = TRUE;
@@ -1125,7 +1295,7 @@ Radiation_Command( int action )
   static gdouble fv[6];
 
   /* Wave/ground type radio buttons */
-  #define RP_WRDBTN 7
+#define RP_WRDBTN 7
   static gchar *wrdbtn[RP_WRDBTN] =
   {
 	"radiation_i10_radiobutton",
@@ -1138,14 +1308,14 @@ Radiation_Command( int action )
   };
 
   /* XNDA radio buttons */
-  #define RP_XRDBTN 2
+#define RP_XRDBTN 2
   static gchar *xrdbtn[RP_XRDBTN] =
   {
 	"radiation_x0_radiobutton",
 	"radiation_x1_radiobutton"
   };
 
-  #define RP_NRDBTN 6
+#define RP_NRDBTN 6
   static gchar *nrdbtn[RP_NRDBTN] =
   {
 	"radiation_n0_radiobutton",
@@ -1156,14 +1326,14 @@ Radiation_Command( int action )
 	"radiation_n5_radiobutton"
   };
 
-  #define RP_DRDBTN 2
+#define RP_DRDBTN 2
   static gchar *drdbtn[RP_DRDBTN] =
   {
 	"radiation_d0_radiobutton",
 	"radiation_d1_radiobutton"
   };
 
-  #define RP_ARDBTN 3
+#define RP_ARDBTN 3
   static gchar *ardbtn[RP_ARDBTN] =
   {
 	"radiation_a0_radiobutton",
@@ -1189,7 +1359,7 @@ Radiation_Command( int action )
   };
 
   /* Labels for I1, F1-F3 & F5 spinuttons */
-  #define RP_LABELS 4
+#define RP_LABELS 4
   static gchar *labels[RP_LABELS] =
   {
 	"radiation_i1_label",
@@ -1203,9 +1373,9 @@ Radiation_Command( int action )
 
   static gboolean
 	norm  = FALSE, /* Indicates normalization is specified */
-    label = TRUE,  /* Enable setting of labels */
-    save  = FALSE, /* Enable saving of editor data */
-    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+		  label = TRUE,  /* Enable setting of labels */
+		  save  = FALSE, /* Enable saving of editor data */
+		  busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1240,8 +1410,9 @@ Radiation_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_rp, "RP" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  label = TRUE;
 	  break;
 
@@ -1253,51 +1424,51 @@ Radiation_Command( int action )
 	  Get_Command_Data( cmnd_store, &iter_rp, iv, fv );
 
 	  /* Set wave type radio buttons */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			radiation_command, wrdbtn[iv[SPIN_COL_I1]]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(radiation_editor_builder, wrdbtn[iv[SPIN_COL_I1]]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Set X radio buttons */
 	  xnda = iv[SPIN_COL_I4];
 	  idx = xnda/1000;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			radiation_command, xrdbtn[idx]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(radiation_editor_builder, xrdbtn[idx]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Set N type radio buttons */
 	  xnda -= idx*1000;
 	  idx = xnda/100;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			radiation_command, nrdbtn[idx]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(radiation_editor_builder, nrdbtn[idx]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Set D type radio buttons */
 	  xnda -= idx*100;
 	  idx = xnda/10;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			radiation_command, drdbtn[idx]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(radiation_editor_builder, drdbtn[idx]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Set A type radio buttons */
 	  xnda -= idx*10;
 	  idx = xnda;
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			radiation_command, ardbtn[idx]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(radiation_editor_builder, ardbtn[idx]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  /* Write int data to the command editor (i2 & I3) */
 	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  radiation_command, ispin[idi-SPIN_COL_I2]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(radiation_editor_builder, ispin[idi-SPIN_COL_I2]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  radiation_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(radiation_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 	  label = TRUE;
@@ -1313,8 +1484,8 @@ Radiation_Command( int action )
 	  /* Test wave/ground type radio buttons */
 	  for( idx = 0; idx < RP_WRDBTN; idx++ )
 	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  radiation_command, wrdbtn[idx]) );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(radiation_editor_builder, wrdbtn[idx]) );
 		if( gtk_toggle_button_get_active(toggle) )
 		  break;
 	  }
@@ -1327,8 +1498,8 @@ Radiation_Command( int action )
 		/* X radio buttons */
 		for( idx = 0; idx < RP_XRDBTN; idx++ )
 		{
-		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-				radiation_command, xrdbtn[idx]) );
+		  toggle = GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(radiation_editor_builder, xrdbtn[idx]) );
 		  if( gtk_toggle_button_get_active(toggle) )
 			break;
 		}
@@ -1337,8 +1508,8 @@ Radiation_Command( int action )
 		/* N radio buttons */
 		for( idx = 0; idx < RP_NRDBTN; idx++ )
 		{
-		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-				radiation_command, nrdbtn[idx]) );
+		  toggle = GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(radiation_editor_builder, nrdbtn[idx]) );
 		  if( gtk_toggle_button_get_active(toggle) )
 			break;
 		}
@@ -1351,8 +1522,8 @@ Radiation_Command( int action )
 		/* D radio buttons */
 		for( idx = 0; idx < RP_DRDBTN; idx++ )
 		{
-		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-				radiation_command, drdbtn[idx]) );
+		  toggle = GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(radiation_editor_builder, drdbtn[idx]) );
 		  if( gtk_toggle_button_get_active(toggle) )
 			break;
 		}
@@ -1361,8 +1532,8 @@ Radiation_Command( int action )
 		/* A radio buttons */
 		for( idx = 0; idx < RP_ARDBTN; idx++ )
 		{
-		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-				radiation_command, ardbtn[idx]) );
+		  toggle = GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(radiation_editor_builder, ardbtn[idx]) );
 		  if( gtk_toggle_button_get_active(toggle) )
 			break;
 		}
@@ -1381,15 +1552,15 @@ Radiation_Command( int action )
   /* Read int data from the command editor */
   for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  radiation_command, ispin[idi-SPIN_COL_I2]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(radiation_editor_builder, ispin[idi-SPIN_COL_I2]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  radiation_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(radiation_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -1405,7 +1576,7 @@ Radiation_Command( int action )
 		_("Increment in Z"),
 		_("Field Point R (m)")
 	  };
-	  Set_Labels( radiation_command, labels, text, RP_LABELS );
+	  Set_Labels( radiation_editor_builder, labels, text, RP_LABELS );
 	}
 	else /* All other wave/ground cases */
 	{
@@ -1416,16 +1587,18 @@ Radiation_Command( int action )
 		_("Increment in Theta"),
 		_("R (m) (Optional)")
 	  };
-	  Set_Labels( radiation_command, labels, text, RP_LABELS );
+	  Set_Labels( radiation_editor_builder, labels, text, RP_LABELS );
 	}
 
 	/* Set normalization factor label */
 	if( norm )
-	  gtk_label_set_text( GTK_LABEL(lookup_widget(radiation_command,
-			  "radiation_f6_label")), _("Normalization Factor") );
+	  gtk_label_set_text( GTK_LABEL(
+			Builder_Get_Object(radiation_editor_builder, "radiation_f6_label")),
+		  _("Normalization Factor") );
 	else
-	  gtk_label_set_text( GTK_LABEL(lookup_widget(radiation_command,
-			  "radiation_f6_label")), _("** NOT USED **") );
+	  gtk_label_set_text( GTK_LABEL(
+			Builder_Get_Object(radiation_editor_builder, "radiation_f6_label")),
+		  _("** NOT USED **") );
 
 	label = FALSE;
   } /* if( label ) */
@@ -1503,8 +1676,8 @@ Loading_Command( int action )
 
   static gboolean
 	save  = FALSE, /* Enable saving of editor data */
-    label = TRUE,  /* Show/hide frames according to loading type */
-    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+		  label = TRUE,  /* Show/hide frames according to loading type */
+		  busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1539,8 +1712,9 @@ Loading_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_ld, "LD" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  label = TRUE;
 	  break;
 
@@ -1567,22 +1741,22 @@ Loading_Command( int action )
 	  /* Write int data to the command editor */
 	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  loading_command, ispin[idi-SPIN_COL_I2]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(loading_editor_builder, ispin[idi-SPIN_COL_I2]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  loading_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(loading_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 
 	  /* Set active radio button */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			loading_command, rdbutton[iv[SPIN_COL_I1]+1]) );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(loading_editor_builder, rdbutton[iv[SPIN_COL_I1]+1]) );
 	  gtk_toggle_button_set_active( toggle, TRUE );
 
 	  label = TRUE;
@@ -1598,8 +1772,8 @@ Loading_Command( int action )
 	  /* Find active radio button */
 	  for( idx = 0; idx < LD_RDBTN; idx++ )
 	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  loading_command, rdbutton[idx]) );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(loading_editor_builder, rdbutton[idx]) );
 		if( gtk_toggle_button_get_active(toggle) )
 		  break;
 	  }
@@ -1616,14 +1790,14 @@ Loading_Command( int action )
    * values according to loading type */
   if( label )
   {
-	gtk_widget_show( GTK_WIDGET(lookup_widget(
-			loading_command, "loading_frame")) );
+	gtk_widget_show( GTK_WIDGET(
+		  Builder_Get_Object(loading_editor_builder, "loading_frame")) );
 
 	switch( iv[SPIN_COL_I1] ) /* Loading type */
 	{
 	  case -1: /* Short all loads */
-		gtk_widget_hide( GTK_WIDGET(lookup_widget(
-				loading_command, "loading_frame")) );
+		gtk_widget_hide( GTK_WIDGET(
+			  Builder_Get_Object(loading_editor_builder, "loading_frame")) );
 		gtk_window_resize( GTK_WINDOW(loading_command), 10, 10 );
 		break;
 
@@ -1635,7 +1809,7 @@ Loading_Command( int action )
 			_("Inductance uH"),
 			_("Capacitance pF")
 		  };
-		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		  Set_Labels( loading_editor_builder, labels, text, LD_LABELS );
 		}
 		break;
 
@@ -1647,7 +1821,7 @@ Loading_Command( int action )
 			_("Inductance uH/m"),
 			_("Capacitance pF/m")
 		  };
-		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		  Set_Labels( loading_editor_builder, labels, text, LD_LABELS );
 		}
 		break;
 
@@ -1659,7 +1833,7 @@ Loading_Command( int action )
 			_("Reactance Ohm"),
 			_("  ** NOT USED **")
 		  };
-		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		  Set_Labels( loading_editor_builder, labels, text, LD_LABELS );
 		}
 		break;
 
@@ -1671,7 +1845,7 @@ Loading_Command( int action )
 			_("  ** NOT USED **"),
 			_("  ** NOT USED **")
 		  };
-		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		  Set_Labels( loading_editor_builder, labels, text, LD_LABELS );
 		}
 
 	} /* switch( iv[SPIN_COL_I1] ) */
@@ -1682,16 +1856,16 @@ Loading_Command( int action )
   /* Read int data from the command editor */
   for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  loading_command, ispin[idi-SPIN_COL_I2]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(loading_editor_builder, ispin[idi-SPIN_COL_I2]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  loading_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(loading_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -1774,7 +1948,7 @@ Network_Command( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1809,8 +1983,9 @@ Network_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_nt, "NT" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a command row (NT) selected in treeview */
@@ -1824,7 +1999,7 @@ Network_Command( int action )
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(network_command, ispin[idi]) );
+			Builder_Get_Object(network_editor_builder, ispin[idi]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
@@ -1832,7 +2007,7 @@ Network_Command( int action )
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(network_command, fspin[idf]) );
+			Builder_Get_Object(network_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 	  break;
@@ -1852,7 +2027,7 @@ Network_Command( int action )
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(network_command, ispin[idi]) );
+		Builder_Get_Object(network_editor_builder, ispin[idi]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
@@ -1860,7 +2035,7 @@ Network_Command( int action )
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(network_command, fspin[idf]) );
+		Builder_Get_Object(network_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -1918,8 +2093,8 @@ Txline_Command( int action )
 
   static gboolean
 	crossed = FALSE, /* Crossed transmission line */
-	save = FALSE,	 /* Enable saving of editor data */
-	busy = FALSE;	 /* Block callbacks. Must be a better way to do this? */
+			save = FALSE,	 /* Enable saving of editor data */
+			busy = FALSE;	 /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1954,8 +2129,9 @@ Txline_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_tl, "TL" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a command row (TL) selected in treeview */
@@ -1970,29 +2146,31 @@ Txline_Command( int action )
 	  {
 		fv[SPIN_COL_F1] = -fv[SPIN_COL_F1];
 		crossed = TRUE;
-		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(
-				txline_command, "txline_crossed_checkbutton")), TRUE);
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(txline_editor_builder, "txline_crossed_checkbutton")),
+			TRUE);
 	  }
 	  else
 	  {
 		crossed = FALSE;
-		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(
-				txline_command, "txline_crossed_checkbutton")), FALSE);
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(txline_editor_builder, "txline_crossed_checkbutton")),
+			FALSE);
 	  }
 
 	  /* Write int data to the command editor */
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  txline_command, ispin[idi]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(txline_editor_builder, ispin[idi]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  txline_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(txline_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 
@@ -2006,7 +2184,7 @@ Txline_Command( int action )
 
 	case COMMAND_CKBUTTON: /* Check button toggled */
 	  if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
-			  lookup_widget(txline_command,
+			  Builder_Get_Object(txline_editor_builder,
 				"txline_crossed_checkbutton"))) )
 		crossed = TRUE;
 	  else
@@ -2022,16 +2200,16 @@ Txline_Command( int action )
   /* Read int data from the command editor */
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  txline_command, ispin[idi]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(txline_editor_builder, ispin[idi]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  txline_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(txline_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
   if( crossed )
@@ -2108,10 +2286,10 @@ Nearfield_Command( int action )
 
   static gboolean
 	label = TRUE,  /* Change spin button labels */
-	nref  = TRUE,  /* Near E field enabled */
-	nrhf  = FALSE, /* Near H field enabled */
-	save  = FALSE, /* Enable saving of editor data */
-	busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+		  nref  = TRUE,  /* Near E field enabled */
+		  nrhf  = FALSE, /* Near H field enabled */
+		  save  = FALSE, /* Enable saving of editor data */
+		  busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -2149,8 +2327,9 @@ Nearfield_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_ne, "NE" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  label = TRUE;
 	  break;
 
@@ -2165,30 +2344,30 @@ Nearfield_Command( int action )
 	  /* Write int data to the command editor */
 	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  nearfield_command, ispin[idi-SPIN_COL_I2]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, ispin[idi-SPIN_COL_I2]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Write float data to the command editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
-		spin = GTK_SPIN_BUTTON( lookup_widget(
-			  nearfield_command, fspin[idf]) );
+		spin = GTK_SPIN_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, fspin[idf]) );
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 
 	  /* Set radio buttons */
 	  if( iv[SPIN_COL_I1] == 0 ) /* Rectangular coordinates */
 	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_rect_radiobutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_rect_radiobutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 	  }
 	  else
 	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_sph_radiobutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_sph_radiobutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 	  }
 
@@ -2196,24 +2375,24 @@ Nearfield_Command( int action )
 	  if( strcmp(name, "NE") == 0 )
 	  {
 		nref = TRUE; nrhf = FALSE;
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_ne_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_ne_checkbutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_nh_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_nh_checkbutton") );
 		gtk_toggle_button_set_active( toggle, FALSE );
 	  }
 
 	  if( strcmp(name, "NH") == 0 )
 	  {
 		nrhf = TRUE; nref = FALSE;
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_nh_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_nh_checkbutton") );
 		gtk_toggle_button_set_active( toggle, TRUE );
 
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  nearfield_command, "nearfield_ne_checkbutton") );
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(nearfield_editor_builder, "nearfield_ne_checkbutton") );
 		gtk_toggle_button_set_active( toggle, FALSE );
 	  }
 
@@ -2231,8 +2410,8 @@ Nearfield_Command( int action )
 
 	case NEARFIELD_NE_CKBUTTON: /* E-field check button toggled */
 	  /* Test E field check button */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			nearfield_command, "nearfield_ne_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(nearfield_editor_builder, "nearfield_ne_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 	  {
 		nref = TRUE;
@@ -2246,15 +2425,16 @@ Nearfield_Command( int action )
 	  }
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  save = TRUE;
 	  break;
 
 	case NEARFIELD_NH_CKBUTTON: /* H-field check button toggled */
 	  /* Test H field check button */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			nearfield_command, "nearfield_nh_checkbutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(nearfield_editor_builder, "nearfield_nh_checkbutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 	  {
 		nrhf = TRUE;
@@ -2268,15 +2448,16 @@ Nearfield_Command( int action )
 	  }
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  save = TRUE;
 	  break;
 
 	case COMMAND_RDBUTTON: /* Radio button toggled */
 	  /* Test rectangular coordinates radio button */
-	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			nearfield_command, "nearfield_rect_radiobutton") );
+	  toggle = GTK_TOGGLE_BUTTON(
+		  Builder_Get_Object(nearfield_editor_builder, "nearfield_rect_radiobutton") );
 	  if( gtk_toggle_button_get_active(toggle) )
 		iv[SPIN_COL_I1] = 0; /* Rectangular */
 	  else
@@ -2306,7 +2487,7 @@ Nearfield_Command( int action )
 		_("Increment in Y (m)"),
 		_("Increment in Z (m)")
 	  };
-	  Set_Labels( nearfield_command, labels, text, NF_LABELS );
+	  Set_Labels( nearfield_editor_builder, labels, text, NF_LABELS );
 	}
 	else /* Spherical coordinates */
 	{
@@ -2322,7 +2503,7 @@ Nearfield_Command( int action )
 		_("Increment in Phi"),
 		_("Increment in Theta")
 	  };
-	  Set_Labels( nearfield_command, labels, text, NF_LABELS );
+	  Set_Labels( nearfield_editor_builder, labels, text, NF_LABELS );
 	  label = FALSE;
 	}
 
@@ -2331,16 +2512,16 @@ Nearfield_Command( int action )
   /* Read int data from the command editor */
   for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  nearfield_command, ispin[idi-SPIN_COL_I2]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(nearfield_editor_builder, ispin[idi-SPIN_COL_I2]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the command editor */
   for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  nearfield_command, fspin[idf]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(nearfield_editor_builder, fspin[idf]) );
 	fv[idf] = gtk_spin_button_get_value( spin );
   }
 
@@ -2376,7 +2557,7 @@ Kernel_Command( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
   int idc;
 
@@ -2424,8 +2605,9 @@ Kernel_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_ek, "EK" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  save = TRUE;
 	  break;
 
@@ -2445,8 +2627,8 @@ Kernel_Command( int action )
 	  }
 
 	  /* Set the kernel check button */
-	  ckbutton = GTK_CHECK_BUTTON(lookup_widget(
-			kernel_command, "kernel_checkbutton") );
+	  ckbutton = GTK_CHECK_BUTTON(
+		  Builder_Get_Object(kernel_editor_builder, "kernel_checkbutton") );
 	  if( ek == 0 )
 		gtk_toggle_button_set_active(
 			GTK_TOGGLE_BUTTON(ckbutton), TRUE );
@@ -2464,8 +2646,8 @@ Kernel_Command( int action )
 
 	case COMMAND_CKBUTTON: /* Some check button changed in editor window */
 	  /* Set kernel status according to checkbutton */
-	  ckbutton = GTK_CHECK_BUTTON(lookup_widget(
-			kernel_command, "kernel_checkbutton") );
+	  ckbutton = GTK_CHECK_BUTTON(
+		  Builder_Get_Object(kernel_editor_builder, "kernel_checkbutton") );
 	  if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ckbutton)) )
 		ek = 0;
 	  else
@@ -2553,8 +2735,9 @@ Intrange_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_kh, "KH" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a command row (KH) */
@@ -2572,8 +2755,8 @@ Intrange_Command( int action )
 	  }
 
 	  /* Set range data to command editor */
-	  spin = GTK_SPIN_BUTTON(lookup_widget(
-			intrange_command, "intrange_wlen_spinbutton") );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(intrange_editor_builder, "intrange_wlen_spinbutton") );
 	  gtk_spin_button_set_value( spin, kh );
 
 	  break;
@@ -2590,8 +2773,8 @@ Intrange_Command( int action )
   } /* switch( action ) */
 
   /* Get range data from editor */
-  spin = GTK_SPIN_BUTTON(lookup_widget(
-		intrange_command, "intrange_wlen_spinbutton") );
+  spin = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(intrange_editor_builder, "intrange_wlen_spinbutton") );
   kh = gtk_spin_button_get_value( spin );
   snprintf( skh, sizeof(skh), "%12.5e", kh );
 
@@ -2611,7 +2794,6 @@ Intrange_Command( int action )
   void
 Execute_Command( int action )
 {
-
   /* For reading/writing to XQ row */
   static GtkTreeIter iter_xq;
   gchar *sv;
@@ -2637,7 +2819,7 @@ Execute_Command( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -2680,8 +2862,9 @@ Execute_Command( int action )
 		  cmnd_treeview, cmnd_store, &iter_xq, "XQ" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  cmnd_adjustment, cmnd_adjustment->upper );
+	  gtk_adjustment_set_value( cmnd_adjustment,
+		  gtk_adjustment_get_upper(cmnd_adjustment) -
+		  gtk_adjustment_get_page_size(cmnd_adjustment) );
 	  save = TRUE;
 	  break;
 
@@ -2705,7 +2888,7 @@ Execute_Command( int action )
 		if( xq == idx )
 		{
 		  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
-				lookup_widget(execute_command, rdbutton[idx])), TRUE );
+				Builder_Get_Object(execute_editor_builder, rdbutton[idx])), TRUE );
 		  break;
 		}
 	  break;
@@ -2720,7 +2903,7 @@ Execute_Command( int action )
 	  /* Get active radio button in command editor */
 	  for( idx = 0; idx < XQ_RDBTN; idx++ )
 		if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
-				lookup_widget(execute_command, rdbutton[idx]))) )
+				Builder_Get_Object(execute_editor_builder, rdbutton[idx]))) )
 		  break;
 	  xq = idx;
 	  save = TRUE;
@@ -2735,179 +2918,3 @@ Execute_Command( int action )
 
 /*------------------------------------------------------------------------*/
 
-/* Insert_EN_Card()
- *
- * Inserts a default EN card if missing
- */
-
-  void
-Insert_EN_Card( GtkListStore *store, GtkTreeIter *iter )
-{
-  gint idx, idc;
-
-  /* Insert default EN card if list is clear */
-  idx = gtk_tree_model_iter_n_children(
-	  GTK_TREE_MODEL(store), NULL );
-  if( !idx )
-  {
-	gtk_list_store_append( store, iter );
-	gtk_list_store_set( store, iter, CMND_COL_NAME, "EN", -1 );
-	for( idc = CMND_COL_I1; idc < CMND_NUM_COLS; idc++ )
-	  gtk_list_store_set( store, iter, idc, "0", -1 );
-  }
-
-} /* Insert_EN_Card() */
-
-/*------------------------------------------------------------------------*/
-
-/* Get_Command_Data()
- *
- * Gets command data from a treeview row
- */
-
-void
-Get_Command_Data(
-	GtkListStore *store,
-	GtkTreeIter *iter,
-	int *iv, double *fv )
-{
-  gint idc;
-  gchar *sv;
-
-  /* Get data from tree view (I1-I4, F1-F6)*/
-  if( gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
-	{
-	  gtk_tree_model_get(
-		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
-	  iv[idc-CMND_COL_I1] = atoi(sv);
-	  g_free(sv);
-	}
-	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
-	{
-	  gtk_tree_model_get(
-		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
-	  fv[idc-CMND_COL_F1] = Strtod( sv, NULL );
-	  g_free(sv);
-	}
-  }
-  else stop( _("Get_Command_Data(): Error reading\n"\
-		"row data: Invalid list iterator"), ERR_OK );
-
-} /* Get_Command_Data() */
-
-/*------------------------------------------------------------------------*/
-
-/* Set_Command_Data()
- *
- * Sets data into a command row
- */
-
-void
-Set_Command_Data(
-	GtkListStore *store,
-	GtkTreeIter *iter,
-	int *iv, double *fv )
-{
-  gchar str[13];
-  gint idc;
-
-  /* Format and set editor data to treeview (I1-I4 & F1-F6) */
-  if( gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
-	{
-	  snprintf( str, 6, "%5d", iv[idc-CMND_COL_I1] );
-	  gtk_list_store_set( store, iter, idc, str, -1 );
-	}
-
-	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
-	{
-	  snprintf( str, 13, "%12.5E", fv[idc-CMND_COL_F1] );
-	  gtk_list_store_set( store, iter, idc, str, -1 );
-	}
-  }
-  else stop( _("Set_Command_Data(): Error writing row data\n"\
-		"Please re-select row"), ERR_OK );
-
-  SetFlag( NEC2_EDIT_SAVE );
-
-} /* Set_Command_Data() */
-
-/*------------------------------------------------------------------------*/
-
-/* Insert_Blank_Command_Row()
- *
- * Inserts a blank row in a tree view with only its name (GW ... )
- */
-
-void
-Insert_Blank_Command_Row(
-	GtkTreeView *view, GtkListStore *store,
-	GtkTreeIter *iter, const gchar *name )
-{
-  GtkTreeSelection *selection;
-  gboolean retv;
-  gint n;
-  gchar *str;
-
-  if( nec2_edit_window == NULL )
-	return;
-
-  /* Get selected row, if any */
-  selection = gtk_tree_view_get_selection( view );
-  retv = gtk_tree_selection_get_selected( selection, NULL, iter );
-
-  /* If no selected row, insert new row into list
-   * store before last row, else after the selected row,
-   * but if this is a GE row, then insert before it */
-  if( !retv )
-  {
-	n = gtk_tree_model_iter_n_children(
-		GTK_TREE_MODEL(store), NULL );
-	gtk_tree_model_iter_nth_child(
-		GTK_TREE_MODEL(store), iter, NULL, n-1 );
-	gtk_list_store_insert_before( store, iter, iter );
-  }
-  else
-  {
-	gtk_tree_model_get(
-		GTK_TREE_MODEL(store), iter, CMND_COL_NAME, &str, -1 );
-	if( strcmp(str, "EN") == 0 )
-	  gtk_list_store_insert_before( store, iter, iter );
-	else
-	  gtk_list_store_insert_after( store, iter, iter );
-	g_free(str);
-  }
-
-  gtk_list_store_set( store, iter, CMND_COL_NAME, name, -1 );
-  for( n = CMND_COL_I1; n < CMND_NUM_COLS; n++ )
-	gtk_list_store_set( store, iter, n, "--", -1 );
-  gtk_tree_selection_select_iter( selection, iter );
-
-} /* Insert_Blank_Command_Row() */
-
-/*------------------------------------------------------------------------*/
-
-/* Set_Labels()
- *
- * Sets labels in an editor window
- */
-
-  void
-Set_Labels( GtkWidget *widget, gchar **labels, gchar **text, gint num )
-{
-  int idx;
-  GtkLabel *label;
-
-  for( idx = 0; idx < num; idx++ )
-  {
-	label = GTK_LABEL( lookup_widget(widget, labels[idx]) );
-	gtk_label_set_text( label, text[idx] );
-  }
-
-} /* Set_Labels() */
-
-/*------------------------------------------------------------------------*/
-
diff --git a/src/cmnd_edit.h b/src/cmnd_edit.h
index 1c202a9..98af2b5 100644
--- a/src/cmnd_edit.h
+++ b/src/cmnd_edit.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -21,7 +19,6 @@
 
 #include "common.h"
 #include "interface.h"
-#include "support.h"
 #include "editors.h"
 
 #endif
diff --git a/src/common.h b/src/common.h
index 53ce45a..666f91e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,11 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* xnec2c.h
- *
- * Common header file for xnec2c
- */
-
 #ifndef	COMMON_H
 #define	COMMON_H	1
 
@@ -38,16 +31,58 @@
 #include <sys/times.h>
 #include <gtk/gtk.h>
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#undef _Complex_I
+#define _Complex_I	(__extension__ 1.0i)
+#undef I
+#define I _Complex_I
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  define Q_(String) g_strip_context ((String), gettext (String))
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define Q_(String) g_strip_context ((String), (String))
+#  define N_(String) (String)
+#endif
+
+typedef struct Segment
+{
+  gint x1;
+  gint x2;
+  gint y1;
+  gint y2;
+} Segment_t;
+
 /* commonly used complex constants */
 #define	CPLX_00	(0.0+I*0.0)
 #define	CPLX_01	(0.0+I*1.0)
 #define	CPLX_10	(1.0+I*0.0)
 #define	CPLX_11	(1.0+I*1.0)
 
+#ifndef M_2PI
+  #define M_2PI		6.28318530717958647692
+#endif
+
 /* common constants */
-#define PI		3.141592654
-#define	PITWO	1.570796327
-#define	TWOPI	6.283185308
 #define	TORAD	1.745329252E-02
 #define	TODEG	57.29577951
 #define	ETA		376.73
@@ -141,31 +176,44 @@
 
 /* NEC2 editor flags */
 #define	NEC2_EDIT_SAVE		0x0000000800000000ll /* Save NEC2 editor data to a file */
+
+/*** filechooser flags ***/
+
+/* Save open/edited NEC2 file */
 #define	NEC2_SAVE			0x0000001000000000ll /* Saving to a NEC2 input file */
 
-/* Structure/rad pattern/freq. plots image save */
+/* Structure/rad pattern/frequency plots image save */
 #define	IMAGE_SAVE			0x0000002000000000ll
 
+/* Open a NEC2 input file flag */
+#define	OPEN_INPUT			0x0000004000000000ll
+
 /* Save gnuplot data */
-#define	RDPAT_GNUPLOT_SAVE	0x0000004000000000ll
-#define	PLOTS_GNUPLOT_SAVE	0x0000008000000000ll
-#define	STRCT_GNUPLOT_SAVE	0x0000010000000000ll
+#define	RDPAT_GNUPLOT_SAVE	0x0000008000000000ll
+#define	PLOTS_GNUPLOT_SAVE	0x0000010000000000ll
+#define	STRCT_GNUPLOT_SAVE	0x0000020000000000ll
 
-/* All filechooser save flags */
-#define	ALL_SAVE_FLAGS		0x000001F000000000ll
+/*** All filechooser flags above ***/
+#define	ALL_SAVE_FLAGS		0x000003F000000000ll
 
 /* Other flags */
-#define	ERROR_CONDX			0x0000020000000000ll
-#define	INPUT_PENDING		0x0000040000000000ll
-#define	ENABLE_EXCITN		0x0000080000000000ll
+#define	ERROR_CONDX			0x0000040000000000ll
+#define	INPUT_PENDING		0x0000080000000000ll
+#define	ENABLE_EXCITN		0x0000100000000000ll
 
 /* Allocation control flags */
-#define	ALLOC_NEAREH_BUFF	0x0000100000000000ll
-#define	ALLOC_RDPAT_BUFF	0x0000200000000000ll
-#define	ALLOC_PNTING_BUFF	0x0000400000000000ll
+#define	ALLOC_NEAREH_BUFF	0x0000200000000000ll
+#define	ALLOC_RDPAT_BUFF	0x0000400000000000ll
+#define	ALLOC_PNTING_BUFF	0x0000800000000000ll
 
 /* Force editors to quit */
-#define	EDITOR_QUIT			0x0000800000000000ll
+#define	EDITOR_QUIT			0x0001000000000000ll
+
+/* Frequency loop results ready */
+#define FREQLOOP_READY		0x0002000000000000ll
+
+/* Block motion events till ready */
+#define BLOCK_MOTION_EV		0x0004000000000000ll
 
 #define	ALL_FLAGS		    0xffffffffffffffffll
 
@@ -202,12 +250,12 @@ enum POL_TYPE
 typedef struct
 {
   double
-    *air,	/* Ai/lambda, real part */
-    *aii,	/* Ai/lambda, imaginary part */
-    *bir,	/* Bi/lambda, real part */
-    *bii,	/* Bi/lambda, imaginary part */
-    *cir,	/* Ci/lambda, real part */
-    *cii;	/* Ci/lambda, imaginary part */
+	*air,	/* Ai/lambda, real part */
+	*aii,	/* Ai/lambda, imaginary part */
+	*bir,	/* Bi/lambda, real part */
+	*bii,	/* Bi/lambda, imaginary part */
+	*cir,	/* Ci/lambda, real part */
+	*cii;	/* Ci/lambda, imaginary part */
 
   complex double *cur; /* Amplitude of basis function */
 
@@ -220,83 +268,83 @@ typedef struct
 typedef struct
 {
   int
-    n,		/* Number of wire segments */
-    np,		/* Number of wire segments in symmetry cell */
-    m,		/* Number of surface patches */
-    mp,		/* Number of surface patches in symmetry cell */
-    npm,	/* = n+m  */
-    np2m,	/* = n+2m */
-    np3m,	/* = n+3m */
-    ipsym,	/* Symmetry flag */
-    *icon1, /* Segments end 1 connection */
-    *icon2,	/* Segments end 2 connection */
-    *itag;	/* Segments tag number */
+	n,		/* Number of wire segments */
+	np,		/* Number of wire segments in symmetry cell */
+	m,		/* Number of surface patches */
+	mp,		/* Number of surface patches in symmetry cell */
+	npm,	/* = n+m  */
+	np2m,	/* = n+2m */
+	np3m,	/* = n+3m */
+	ipsym,	/* Symmetry flag */
+	*icon1, /* Segments end 1 connection */
+	*icon2,	/* Segments end 2 connection */
+	*itag;	/* Segments tag number */
 
   /* Wire segment data */
   double
-    *x1, *y1, *z1,	/* End 1 coordinates of wire segments */
-    *x2, *y2, *z2,	/* End 2 coordinates of wire segments */
-    *x, *y, *z,		/* Coordinates of segment centers */
-    *si, *bi,		/* Length and radius of segments  */
-    *cab,			/* cos(a)*cos(b) */
-    *sab, 	   		/* cos(a)*sin(b) */
-    *salp,	   		/* Z component - sin(a) */
-
-    /* Surface patch data */
-    *t1x, *t1y, *t1z,	/* Coordinates of t1 vector */
-    *t2x, *t2y, *t2z,	/* Coordinates of t2 vector */
-    *px, *py, *pz,		/* Coordinates of patch center */
-    *pbi,				/* Patch surface area */
-    *psalp,				/* Z component - sin(a) */
-
-    /* Wavelength in meters */
-    wlam;
+	*x1, *y1, *z1,	/* End 1 coordinates of wire segments */
+	*x2, *y2, *z2,	/* End 2 coordinates of wire segments */
+	*x, *y, *z,		/* Coordinates of segment centers */
+	*si, *bi,		/* Length and radius of segments  */
+	*cab,			/* cos(a)*cos(b) */
+	*sab, 	   		/* cos(a)*sin(b) */
+	*salp,	   		/* Z component - sin(a) */
+
+	/* Surface patch data */
+	*t1x, *t1y, *t1z,	/* Coordinates of t1 vector */
+	*t2x, *t2y, *t2z,	/* Coordinates of t2 vector */
+	*px, *py, *pz,		/* Coordinates of patch center */
+	*pbi,				/* Patch surface area */
+	*psalp,				/* Z component - sin(a) */
+
+	/* Wavelength in meters */
+	wlam;
 
   /* My addition, for plotting patches */
   double
-    *px1, *py1, *pz1,
-    *px2, *py2, *pz2;
+	*px1, *py1, *pz1,
+	*px2, *py2, *pz2;
 
 } data_t;
 
 /* common  /dataj/ */
 typedef struct
 {
-int
-  iexk,
-  ind1,
-  indd1,
-  ind2,
-  indd2,
-  ipgnd;
-
-double
-  s,
-  b,
-  xj,
-  yj,
-  zj,
-  cabj,
-  sabj,
-  salpj,
-  rkh,
-  t1xj,
-  t1yj,
-  t1zj,
-  t2xj,
-  t2yj,
-  t2zj;
-
-complex double
-  exk,
-  eyk,
-  ezk,
-  exs,
-  eys,
-  ezs,
-  exc,
-  eyc,
-  ezc;
+  int
+	iexk,
+	ind1,
+	indd1,
+	ind2,
+	indd2,
+	ipgnd;
+
+  double
+	s,
+	b,
+	xj,
+	yj,
+	zj,
+	cabj,
+	sabj,
+	salpj,
+	rkh,
+	t1xj,
+	t1yj,
+	t1zj,
+	t2xj,
+	t2yj,
+	t2zj;
+
+  complex double
+	exk,
+	eyk,
+	ezk,
+	exs,
+	eys,
+	ezs,
+	exc,
+	eyc,
+	ezc;
 
 } dataj_t;
 
@@ -304,40 +352,40 @@ complex double
 typedef struct
 {
   int
-    near,
-    nfeh,
-    nrx,
-    nry,
-    nrz,
-    nth,
-    nph,
-    ipd,
-    iavp,
-    inor,
-    iax,
-    ixtyp;
+	near,
+	nfeh,
+	nrx,
+	nry,
+	nrz,
+	nth,
+	nph,
+	ipd,
+	iavp,
+	inor,
+	iax,
+	ixtyp;
 
   /* xpr6 moved to exec_data_t */
   double
-    thets,
-    phis,
-    dth,
-    dph,
-    rfld,
-    gnor,
-    clt,
-    cht,
-    epsr2,
-    sig2,
-    pinr,
-    pnlr,
-    ploss,
-    xnr,
-    ynr,
-    znr,
-    dxnr,
-    dynr,
-    dznr;
+	thets,
+	phis,
+	dth,
+	dph,
+	rfld,
+	gnor,
+	clt,
+	cht,
+	epsr2,
+	sig2,
+	pinr,
+	pnlr,
+	ploss,
+	xnr,
+	ynr,
+	znr,
+	dxnr,
+	dynr,
+	dznr;
 
 } fpat_t;
 
@@ -345,20 +393,20 @@ typedef struct
 typedef struct
 {
   int
-    *nxa,
-    *nya;
+	*nxa,
+	*nya;
 
   double
-    *dxa,
-    *dya,
-    *xsa,
-    *ysa;
+	*dxa,
+	*dya,
+	*xsa,
+	*ysa;
 
   complex double
-    epscf,
-    *ar1,
-    *ar2,
-    *ar3;
+	epscf,
+	*ar1,
+	*ar2,
+	*ar3;
 
 } ggrid_t;
 
@@ -366,23 +414,23 @@ typedef struct
 typedef struct
 {
   int
-    ksymp,	/* Ground flag */
-    ifar,	/* Int flag in RP card, for far field calculations */
-    iperf,	/* Type of ground flag */
-    nradl;	/* Number of radials in ground screen */
+	ksymp,	/* Ground flag */
+	ifar,	/* Int flag in RP card, for far field calculations */
+	iperf,	/* Type of ground flag */
+	nradl;	/* Number of radials in ground screen */
 
   double
-    t2,		/* Const for radial wire ground impedance */
-    cl,		/* Distance in wavelengths of cliff edge from origin */
-    ch,		/* Cliff height in wavelengths */
-    scrwl,	/* Wire length in radial ground screen normalized to w/length */
-    scrwr;	/* Radius of wires in screen in wavelengths */
+	t2,		/* Const for radial wire ground impedance */
+	cl,		/* Distance in wavelengths of cliff edge from origin */
+	ch,		/* Cliff height in wavelengths */
+	scrwl,	/* Wire length in radial ground screen normalized to w/length */
+	scrwr;	/* Radius of wires in screen in wavelengths */
 
   complex double
-    zrati,	/* Ground medium [Er-js/wE0]^-1/2 */
-    zrati2,	/* As above for 2nd ground medium */
-    t1,		/* Const for radial wire ground impedance */
-    frati;	/* (k1^2-k2^2)/(k1^2+k2^2), k1=w(E0Mu0)^1/2, k1=k2/ZRATI */
+	zrati,	/* Ground medium [Er-js/wE0]^-1/2 */
+	zrati2,	/* As above for 2nd ground medium */
+	t1,		/* Const for radial wire ground impedance */
+	frati;	/* (k1^2-k2^2)/(k1^2+k2^2), k1=w(E0Mu0)^1/2, k1=k2/ZRATI */
 
 } gnd_t;
 
@@ -409,12 +457,12 @@ typedef struct
   int isnor;
 
   double
-    xo,
-    yo,
-    zo,
-    sn,
-    xsn,
-    ysn;
+	xo,
+	yo,
+	zo,
+	sn,
+	xsn,
+	ysn;
 
 } incom_t;
 
@@ -422,10 +470,10 @@ typedef struct
 typedef struct
 {
   int
-    icase,	/* Storage mode of primary matrix */
-    npblk,	/* Num of blocks in first (NBLOKS-1) blocks */
-    nlast,	/* Num of blocks in last block */
-    imat;	/* Storage reserved in CM for primary NGF matrix A */
+	icase,	/* Storage mode of primary matrix */
+	npblk,	/* Num of blocks in first (NBLOKS-1) blocks */
+	nlast,	/* Num of blocks in last block */
+	imat;	/* Storage reserved in CM for primary NGF matrix A */
 
 } matpar_t;
 
@@ -433,26 +481,26 @@ typedef struct
 typedef struct
 {
   int
-    masym,	/* Matrix symmetry flags */
-    neq,
-    npeq,
-    neq2,
-    nonet,	/* Number of two-port networks */
-    ntsol,	/* "Network equations are solved" flag */
-    nprint,	/* Print control flag */
-    *iseg1,	/* Num of seg to which port 1 of network is connected */
-    *iseg2,	/* Num of seg to which port 2 of network is connected */
-    *ntyp;	/* Type of networks */
+	masym,	/* Matrix symmetry flags */
+	neq,
+	npeq,
+	neq2,
+	nonet,	/* Number of two-port networks */
+	ntsol,	/* "Network equations are solved" flag */
+	nprint,	/* Print control flag */
+	*iseg1,	/* Num of seg to which port 1 of network is connected */
+	*iseg2,	/* Num of seg to which port 2 of network is connected */
+	*ntyp;	/* Type of networks */
 
   double
-    *x11r,	/* Real and imaginary parts of network impedances */
-    *x11i,
-    *x12r,
-    *x12i,
-    *x22r,
-    *x22i,
-    pin,	/* Total input power from sources */
-    pnls;	/* Power lost in networks */
+	*x11r,	/* Real and imaginary parts of network impedances */
+	*x11i,
+	*x12r,
+	*x12i,
+	*x22r,
+	*x22i,
+	pin,	/* Total input power from sources */
+	pnls;	/* Power lost in networks */
 
   complex double zped;
 
@@ -464,20 +512,20 @@ typedef struct
   int *ip;	/* Vector of indices of pivot elements used to factor matrix */
 
   double
-    epsr,		/* Relative dielectric constant of ground */
-    sig,		/* Conductivity of ground */
-    scrwlt,		/* Length of radials in ground screen approximation */
-    scrwrt,		/* Radius of wires in ground screen approximation */
-    fmhz,		/* Saved frequency of operation */
-    last_freq;	/* My addition, Last frequency used in calculations */
+	epsr,		/* Relative dielectric constant of ground */
+	sig,		/* Conductivity of ground */
+	scrwlt,		/* Length of radials in ground screen approximation */
+	scrwrt,		/* Radius of wires in ground screen approximation */
+	fmhz,		/* Saved frequency of operation */
+	last_freq;	/* My addition, Last frequency used in calculations */
 
   /* My addition, replace xtemp, ytemp etc in freq. loop */
   double
-    *xtemp,
-    *ytemp,
-    *ztemp,
-    *sitemp,
-    *bitemp;
+	*xtemp,
+	*ytemp,
+	*ztemp,
+	*sitemp,
+	*bitemp;
 
   double *freq;	/* My addition, frequencies used in freq loop */
   char *fstep;	/* My addition, freq loop steps that returned results */
@@ -488,12 +536,12 @@ typedef struct
 typedef struct
 {
   int
-    *jco,	/* Stores connection data */
-    jsno,	/* Total number of entries in ax, bx, cx */
-    maxcon; /* Max. no. connections */
+	*jco,	/* Stores connection data */
+	jsno,	/* Total number of entries in ax, bx, cx */
+	maxcon; /* Max. no. connections */
 
   double
-    *ax, *bx, *cx; /* Store constants A, B, C used in current expansion */
+	*ax, *bx, *cx; /* Store constants A, B, C used in current expansion */
 
 } segj_t;
 
@@ -510,17 +558,17 @@ typedef struct
 typedef struct
 {
   int
-    *isant,	/* Num of segs on which an aplied field source is located */
-    *ivqd,	/* Num of segs on which a current-slope discontinuity source is located */
-    *iqds,	/* Same as above (?) */
-    nsant,	/* Number of applied field voltage sources */
-    nvqd,	/* Number of applied current-slope discontinuity sources */
-    nqds;	/* Same as above (?) */
+	*isant,	/* Num of segs on which an aplied field source is located */
+	*ivqd,	/* Num of segs on which a current-slope discontinuity source is located */
+	*iqds,	/* Same as above (?) */
+	nsant,	/* Number of applied field voltage sources */
+	nvqd,	/* Number of applied current-slope discontinuity sources */
+	nqds;	/* Same as above (?) */
 
   complex double
-    *vqd,	/* Voltage of applied-current slope discontinuity sources */
-    *vqds,	/* Same as above (?) */
-    *vsant;	/* Voltages of applied field voltage sources */
+	*vqd,	/* Voltage of applied-current slope discontinuity sources */
+	*vqds,	/* Same as above (?) */
+	*vsant;	/* Voltages of applied field voltage sources */
 
 } vsorc_t;
 
@@ -531,10 +579,10 @@ typedef struct
 typedef struct
 {
   int
-    *ldsegn,	/* My addition, loaded segment numbers */
-    *ldtype,	/* My addition, loading type */
-    nldseg,		/* My addition, number of loaded segs  */
-    nload;		/* Number of loading networks */
+	*ldsegn,	/* My addition, loaded segment numbers */
+	*ldtype,	/* My addition, loading type */
+	nldseg,		/* My addition, number of loaded segs  */
+	nload;		/* Number of loading networks */
 
   complex double *zarray;	/* = Zi/(Di/lambda) */
 
@@ -544,22 +592,22 @@ typedef struct
 typedef struct
 {
   double
-    Wi,			/* Angle (inclination) of Z axis to Screen, +ve to viewer */
-    Wr,			/* Rotation of X-Y plane around Z axis, +ve clockwise */
-    sin_wi,		/* sin(Wi) */
-    cos_wi,		/* cos(Wi) */
-    sin_wr,		/* sin(Wr) */
-    cos_wr,		/* cos(Wr) */
-    r_max,		/* Max distance from xyz origin of a point in antenna */
-    xy_scale1,	/* Scale factor to fit structure into drawable window */
-    xy_scale,	/* Scale factor incorporating zoom factor */
+	Wi,			/* Angle (inclination) of Z axis to Screen, +ve to viewer */
+	Wr,			/* Rotation of X-Y plane around Z axis, +ve clockwise */
+	sin_wi,		/* sin(Wi) */
+	cos_wi,		/* cos(Wi) */
+	sin_wr,		/* sin(Wr) */
+	cos_wr,		/* cos(Wr) */
+	r_max,		/* Max distance from xyz origin of a point in antenna */
+	xy_scale1,	/* Scale factor to fit structure into drawable window */
+	xy_scale,	/* Scale factor incorporating zoom factor */
 	xy_zoom,	/* Structure Zoom factor */
-    x_center,	/* X co-ordinate of xyz axes origin in screen's drawable */
-    y_center;	/* Y co-ordinate of xyz axes origin in screen's drawable */
+	x_center,	/* X co-ordinate of xyz axes origin in screen's drawable */
+	y_center;	/* Y co-ordinate of xyz axes origin in screen's drawable */
 
   int
-    pixmap_width,  /*  Width of drawable's backing pixmap */
-    pixmap_height; /* Height of drawable's backing pixmap */
+	width,  /*  Width of drawable */
+	height; /* Height of drawable */
 
   char type; /* Type of projection parameters stuct */
 
@@ -574,40 +622,40 @@ typedef struct
 typedef struct
 {
   int
-    *ldtyp,
-    *ldtag,
-    *ldtagf,
-    *ldtagt,
-    nthi,
-    nphi,
-    iexk,
-    iped,
-    ifrq,		/* Frequency specification flag */
-    nfrq,		/* Number of frequency steps */
-    fstep,		/* Frequency step */
+	*ldtyp,
+	*ldtag,
+	*ldtagf,
+	*ldtagt,
+	nthi,
+	nphi,
+	iexk,
+	iped,
+	ifrq,		/* Frequency specification flag */
+	nfrq,		/* Number of frequency steps */
+	fstep,		/* Frequency step */
 	lastf,		/* Last frequency step */
-    ngraph,		/* Number of graphs to be plotted */
-    pol_type,	/* User-specified Polarization type for plots and patterns */
+	ngraph,		/* Number of graphs to be plotted */
+	pol_type,	/* User-specified Polarization type for plots and patterns */
 	num_jobs;	/* Number of child processes (jobs) to fork */
 
   double
-    *zlr,
-    *zli,
-    *zlc;
+	*zlr,
+	*zli,
+	*zlc;
 
   double
-    xpr1,
-    xpr2,
-    xpr3,
-    xpr4,
-    xpr5,
-    xpr6,
-    rkh,
-    zpnorm,
-    thetis,
-    phiss,
-    fmhz,		/* Frequency in MHz, moved from save_t */
-    delfrq;		/* Frequency step for freq loop */
+	xpr1,
+	xpr2,
+	xpr3,
+	xpr4,
+	xpr5,
+	xpr6,
+	rkh,
+	zpnorm,
+	thetis,
+	phiss,
+	fmhz,		/* Frequency in MHz, moved from save_t */
+	delfrq;		/* Frequency step for freq loop */
 
   double
 	mxfrq,	/* Max frequency in freq loop */
@@ -619,10 +667,10 @@ typedef struct
 typedef struct
 {
   double
-    *zreal,		/* Real part of input impedance */
-    *zimag,		/* Imag part of input impedance */
-    *zmagn,		/* Magnitude of input impedance */
-    *zphase;	/* Phase ang of input impedance */
+	*zreal,		/* Real part of input impedance */
+	*zimag,		/* Imag part of input impedance */
+	*zmagn,		/* Magnitude of input impedance */
+	*zphase;	/* Phase ang of input impedance */
 
 } impedance_data_t;
 
@@ -630,18 +678,18 @@ typedef struct
 typedef struct
 {
   double
-    *gtot,			/* Radiation pattern (total gain) buffer */
-    *max_gain,		/* Maximum gain for each polarization type */
-    *min_gain,		/* Minimum gain for each polarization type */
-    *max_gain_tht,	/* Theta angle where maximum gain occurs */
-    *max_gain_phi,	/*   Phi angle where minimum gain occurs */
-    *tilt,			/* Tilt angle of polarization ellipse  */
-    *axrt;			/* Elliptic axial ratio of pol ellipse */
+	*gtot,			/* Radiation pattern (total gain) buffer */
+	*max_gain,		/* Maximum gain for each polarization type */
+	*min_gain,		/* Minimum gain for each polarization type */
+	*max_gain_tht,	/* Theta angle where maximum gain occurs */
+	*max_gain_phi,	/*   Phi angle where minimum gain occurs */
+	*tilt,			/* Tilt angle of polarization ellipse  */
+	*axrt;			/* Elliptic axial ratio of pol ellipse */
 
   int
-    *max_gain_idx,	/* Where in rad_pattern.gtot the max value occurs */
-    *min_gain_idx,	/* Where in rad_pattern.gtot the min value occurs */
-    *sens;			/* Polarization sense (vertical, horizontal, elliptic etc) */
+	*max_gain_idx,	/* Where in rad_pattern.gtot the max value occurs */
+	*min_gain_idx,	/* Where in rad_pattern.gtot the min value occurs */
+	*sens;			/* Polarization sense (vertical, horizontal, elliptic etc) */
 
 } rad_pattern_t;
 
@@ -652,18 +700,18 @@ typedef struct
 	/* Magnitude and phase of E/H fields */
 	*ex, *ey, *ez, *hx, *hy, *hz,
 	*fex, *fey, *fez, *fhx, *fhy, *fhz,
-  /* Real part of E and H field values */
-    *erx, *ery, *erz, *er,
-    *hrx, *hry, *hrz, *hr;
+	/* Real part of E and H field values */
+	*erx, *ery, *erz, *er,
+	*hrx, *hry, *hrz, *hr;
 
   /* Max of E/H field values */
   double
-    max_er, max_hr;
+	max_er, max_hr;
 
   /* Co-ordinates of field points and
    * max distance from xyz origin */
   double
-    *px, *py, *pz, r_max;
+	*px, *py, *pz, r_max;
 
   /* Animation step in rads */
   double anim_step;
@@ -688,6 +736,13 @@ typedef struct
 
 } forked_proc_data_t;
 
+enum
+{
+  MAIN_WINDOW = 1,
+  FREQPLOTS_WINDOW,
+  RDPATTERN_WINDOW
+};
+
 /* Function prototypes produced by cproto */
 /* calculations.c */
 void qdsrc(int is, _Complex double v, _Complex double *e);
@@ -698,21 +753,16 @@ void intrp(double x, double y, _Complex double *f1, _Complex double *f2, _Comple
 void intx(double el1, double el2, double b, int ij, double *sgr, double *sgi);
 int min(int a, int b);
 void test(double f1r, double f2r, double *tr, double f1i, double f2i, double *ti, double dmin);
-void sbf(int i, int is, double *aa, double *bb, double *cc);
-void tbf(int i, int icap);
 void trio(int j);
 double cang(_Complex double z);
 void zint(double sigl, double rolam, _Complex double *zint);
 /* callback_func.c */
-void Save_Pixmap(GdkPixmap *pixmap, int pixmap_width, int pixmap_height, char *filename);
+gboolean Save_Pixbuf(gpointer data);
 void New_Viewer_Angle(double wr, double wi, GtkSpinButton *wr_spb, GtkSpinButton *wi_spb, projection_parameters_t *params);
-void Set_Spin_Button(GtkSpinButton *spin, gdouble value);
-void Create_Pixmap(GdkPixmap **pixmap, int *pixmap_width, int *pixmap_height, GtkWidget *widget, GdkEventConfigure *event, projection_parameters_t *params);
 void Motion_Event(GdkEventMotion *event, projection_parameters_t *params);
 void Plot_Select(GtkToggleButton *togglebutton, unsigned long long int flag);
-void Delete_Event(gchar *message);
-void Set_Pol_Menuitem(GtkMenuItem *menuitem);
-void Close_Windows(void);
+void Delete_Event(gchar *mesg);
+void Set_Pol_Menuitem(int window);
 gboolean Open_Editor(GtkTreeView *view);
 void Main_Rdpattern_Activate(gboolean from_menu);
 gboolean Main_Freqplots_Activate(void);
@@ -720,14 +770,15 @@ void Rdpattern_Gain_Togglebutton_Toggled(gboolean flag);
 void Rdpattern_EH_Togglebutton_Toggled(gboolean flag);
 void Main_Currents_Togglebutton_Toggled(gboolean flag);
 void Main_Charges_Togglebutton_Toggled(gboolean flag);
+GtkWidget *Open_Filechooser(GtkFileChooserAction action, char *pattern, char *prefix, char *filename, char *foldername);
+void Filechooser_Response( GtkDialog *dialog, gint response_id,	int saveas_width, int saveas_height );
 void Open_Nec2_Editor(int action);
 gboolean Nec2_Apply_Checkbutton(void);
 void Gtk_Quit(void);
 void Pass_EH_Flags(void);
-void Alloc_Crnt_Buffs(void);
-void Free_Crnt_Buffs(void);
+void Draw_Colorcode(cairo_t *cr);
 /* callbacks.c */
-void on_main_window_destroy(GtkObject *object, gpointer user_data);
+void on_main_window_destroy(GObject *object, gpointer user_data);
 gboolean on_main_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
 void on_new_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_open_input_activate(GtkMenuItem *menuitem, gpointer user_data);
@@ -752,17 +803,17 @@ void on_main_rotate_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer
 void on_main_incline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_main_currents_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_main_charges_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
-gboolean on_main_colorcode_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_main_colorcode_drawingarea_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data);
 void on_main_freq_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_main_freq_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_main_new_freq_clicked(GtkButton *button, gpointer user_data);
+void on_filechooserdialog_destroy(GObject *object, gpointer user_data);
 gboolean on_structure_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
 gboolean on_structure_drawingarea_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data);
-gboolean on_structure_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_structure_drawingarea_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data);
 void on_filechooserdialog_response(GtkDialog *dialog, gint response_id, gpointer user_data);
-void on_fileselection_response(GtkDialog *dialog, gint response_id, gpointer user_data);
 gboolean on_freqplots_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
-void on_freqplots_window_destroy(GtkObject *object, gpointer user_data);
+void on_freqplots_window_destroy(GObject *object, gpointer user_data);
 void on_freqplots_save_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_freqplots_save_as_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_freqplots_save_as_gnuplot_activate(GtkMenuItem *menuitem, gpointer user_data);
@@ -773,10 +824,10 @@ void on_freqplots_vswr_togglebutton_toggled(GtkToggleButton *togglebutton, gpoin
 void on_freqplots_zo_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_freqplots_zrlzim_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_freqplots_zmgzph_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
-gboolean on_freqplots_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_freqplots_drawingarea_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data);
 gboolean on_freqplots_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
 gboolean on_freqplots_drawingarea_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
-void on_rdpattern_window_destroy(GtkObject *object, gpointer user_data);
+void on_rdpattern_window_destroy(GObject *object, gpointer user_data);
 gboolean on_rdpattern_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
 void on_rdpattern_save_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_rdpattern_save_as_activate(GtkMenuItem *menuitem, gpointer user_data);
@@ -797,11 +848,11 @@ void on_rdpattern_rotate_spinbutton_value_changed(GtkSpinButton *spinbutton, gpo
 void on_rdpattern_incline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_rdpattern_gain_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_rdpattern_eh_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
-gboolean on_rdpattern_colorcode_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_rdpattern_colorcode_drawingarea_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data);
 void on_rdpattern_freq_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_rdpattern_new_freq_clicked(GtkButton *button, gpointer user_data);
 gboolean on_rdpattern_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
-gboolean on_rdpattern_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_rdpattern_drawingarea_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data);
 gboolean on_rdpattern_drawingarea_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data);
 void on_quit_cancelbutton_clicked(GtkButton *button, gpointer user_data);
 void on_quit_okbutton_clicked(GtkButton *button, gpointer user_data);
@@ -810,20 +861,19 @@ void main_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
 void freqplots_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
 void rdpattern_view_menuitem_activate(GtkMenuItem *menuitem, gpointer user_data);
 void rdpattern_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
-void on_filechoser_cancel_clicked(GtkButton *button, gpointer user_data);
-void on_fileselection_cancel_clicked(GtkButton *button, gpointer user_data);
+void on_filechooserdialog_cancel_clicked(GtkButton *button, gpointer user_data);
 void on_near_peak_value_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_near_snapshot_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_rdpattern_animate_activate(GtkMenuItem *menuitem, gpointer user_data);
 void on_animation_applybutton_clicked(GtkButton *button, gpointer user_data);
 void on_animation_cancelbutton_clicked(GtkButton *button, gpointer user_data);
 void on_animation_okbutton_clicked(GtkButton *button, gpointer user_data);
-void on_animate_dialog_destroy(GtkObject *object, gpointer user_data);
-void on_quit_dialog_destroy(GtkObject *object, gpointer user_data);
+void on_animate_dialog_destroy(GObject *object, gpointer user_data);
+void on_quit_dialog_destroy(GObject *object, gpointer user_data);
 gboolean on_error_dialog_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
 void on_nec2_edit_activate(GtkMenuItem *menuitem, gpointer user_data);
 gboolean on_nec2_editor_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
-void on_nec2_editor_destroy(GtkObject *object, gpointer user_data);
+void on_nec2_editor_destroy(GObject *object, gpointer user_data);
 void on_nec2_save_clicked(GtkButton *button, gpointer user_data);
 void on_nec2_save_as_clicked(GtkButton *button, gpointer user_data);
 void on_nec2_row_add_clicked(GtkButton *button, gpointer user_data);
@@ -836,7 +886,7 @@ void on_nec2_revert_clicked(GtkButton *button, gpointer user_data);
 void on_error_stopbutton_clicked(GtkButton *button, gpointer user_data);
 void on_error_okbutton_clicked(GtkButton *button, gpointer user_data);
 void on_error_quitbutton_clicked(GtkButton *button, gpointer user_data);
-void on_wire_editor_destroy(GtkObject *object, gpointer user_data);
+void on_wire_editor_destroy(GObject *object, gpointer user_data);
 void on_wire_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_wire_data_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_wire_tagnum_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
@@ -874,7 +924,7 @@ void on_patch_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_patch_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_patch_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_patch_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_patch_editor_destroy(GtkObject *object, gpointer user_data);
+void on_patch_editor_destroy(GObject *object, gpointer user_data);
 void on_patch_arbitrary_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_patch_rectangular_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_patch_triangular_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
@@ -887,7 +937,7 @@ void on_arc_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_arc_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_arc_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_arc_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_arc_editor_destroy(GtkObject *object, gpointer user_data);
+void on_arc_editor_destroy(GObject *object, gpointer user_data);
 void on_arc_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_helix_tagnum_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_helix_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
@@ -899,7 +949,7 @@ void on_helix_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_helix_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_helix_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_helix_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_helix_editor_destroy(GtkObject *object, gpointer user_data);
+void on_helix_editor_destroy(GObject *object, gpointer user_data);
 void on_helix_linkall_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_helix_linkzo_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_helix_linkzhl_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
@@ -909,8 +959,8 @@ void on_reflect_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_reflect_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_reflect_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_reflect_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_reflect_editor_destroy(GtkObject *object, gpointer user_data);
-void on_scale_editor_destroy(GtkObject *object, gpointer user_data);
+void on_reflect_editor_destroy(GObject *object, gpointer user_data);
+void on_scale_editor_destroy(GObject *object, gpointer user_data);
 void on_scale_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_scale_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_scale_cancel_button_clicked(GtkButton *button, gpointer user_data);
@@ -922,37 +972,37 @@ void on_cylinder_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_cylinder_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_cylinder_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_cylinder_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_cylinder_editor_destroy(GtkObject *object, gpointer user_data);
+void on_cylinder_editor_destroy(GObject *object, gpointer user_data);
 void on_transform_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_transform_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_transform_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_transform_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_transform_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_transform_editor_destroy(GtkObject *object, gpointer user_data);
+void on_transform_editor_destroy(GObject *object, gpointer user_data);
 void on_gend_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_gend_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_gend_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_gend_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_gend_editor_destroy(GtkObject *object, gpointer user_data);
-void on_kernel_command_destroy(GtkObject *object, gpointer user_data);
+void on_gend_editor_destroy(GObject *object, gpointer user_data);
+void on_kernel_command_destroy(GObject *object, gpointer user_data);
 void on_kernel_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_kernel_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_kernel_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_kernel_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_kernel_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_execute_command_destroy(GtkObject *object, gpointer user_data);
+void on_execute_command_destroy(GObject *object, gpointer user_data);
 void on_execute_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_execute_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_execute_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_execute_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_execute_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_intrange_command_destroy(GtkObject *object, gpointer user_data);
+void on_intrange_command_destroy(GObject *object, gpointer user_data);
 void on_intrange_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_intrange_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_intrange_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_intrange_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_intrange_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_ground_command_destroy(GtkObject *object, gpointer user_data);
+void on_ground_command_destroy(GObject *object, gpointer user_data);
 void on_ground_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_ground_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_ground_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
@@ -960,7 +1010,7 @@ void on_ground_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_ground_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_ground_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_ground_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_nearfield_command_destroy(GtkObject *object, gpointer user_data);
+void on_nearfield_command_destroy(GObject *object, gpointer user_data);
 void on_nearfield_nh_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_nearfield_ne_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_nearfield_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
@@ -969,14 +1019,14 @@ void on_nearfield_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_nearfield_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_nearfield_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_nearfield_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_radiation_command_destroy(GtkObject *object, gpointer user_data);
+void on_radiation_command_destroy(GObject *object, gpointer user_data);
 void on_radiation_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_radiation_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_radiation_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_radiation_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_radiation_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_radiation_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_excitation_command_destroy(GtkObject *object, gpointer user_data);
+void on_excitation_command_destroy(GObject *object, gpointer user_data);
 void on_excitation_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_excitation_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_excitation_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
@@ -984,7 +1034,7 @@ void on_excitation_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_excitation_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_excitation_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_excitation_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_frequency_command_destroy(GtkObject *object, gpointer user_data);
+void on_frequency_command_destroy(GObject *object, gpointer user_data);
 void on_frequency_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_frequency_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_frequency_step_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
@@ -992,27 +1042,27 @@ void on_frequency_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_frequency_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_frequency_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_frequency_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_loading_command_destroy(GtkObject *object, gpointer user_data);
+void on_loading_command_destroy(GObject *object, gpointer user_data);
 void on_loading_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
 void on_loading_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_loading_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_loading_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_loading_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_loading_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_network_command_destroy(GtkObject *object, gpointer user_data);
+void on_network_command_destroy(GObject *object, gpointer user_data);
 void on_network_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_network_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_network_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_network_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_network_ok_button_clicked(GtkButton *button, gpointer user_data);
-void on_txline_command_destroy(GtkObject *object, gpointer user_data);
+void on_txline_command_destroy(GObject *object, gpointer user_data);
 void on_txline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_txline_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_txline_cancel_button_clicked(GtkButton *button, gpointer user_data);
 void on_txline_apply_button_clicked(GtkButton *button, gpointer user_data);
 void on_txline_ok_button_clicked(GtkButton *button, gpointer user_data);
 void on_txline_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
-void on_ground2_command_destroy(GtkObject *object, gpointer user_data);
+void on_ground2_command_destroy(GObject *object, gpointer user_data);
 void on_ground2_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
 void on_ground2_new_button_clicked(GtkButton *button, gpointer user_data);
 void on_ground2_cancel_button_clicked(GtkButton *button, gpointer user_data);
@@ -1050,28 +1100,18 @@ void Nearfield_Command(int action);
 void Kernel_Command(int action);
 void Intrange_Command(int action);
 void Execute_Command(int action);
-void Insert_EN_Card(GtkListStore *store, GtkTreeIter *iter);
-void Get_Command_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
-void Set_Command_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
-void Insert_Blank_Command_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, const gchar *name);
-void Set_Labels(GtkWidget *widget, gchar **labels, gchar **text, gint num);
 /* draw.c */
-void Set_Gdk_Segment(GdkSegment *segm, projection_parameters_t *params, double x1, double y1, double z1, double x2, double y2, double z2);
-void Project_on_Screen(projection_parameters_t *params, double x, double y, double z, double *xs, double *ys);
-void Project_XYZ_Axes(GdkPixmap *pixmap, projection_parameters_t *params, GdkSegment *segment);
-void Draw_XYZ_Axes(GdkPixmap *pixmap, projection_parameters_t params);
+void Set_Gdk_Segment(Segment_t *segm, projection_parameters_t *params, double x1, double y1, double z1, double x2, double y2, double z2);
+void Draw_XYZ_Axes(cairo_t *cr, projection_parameters_t params);
 void New_Projection_Parameters(int width, int height, projection_parameters_t *params);
 void Value_to_Color(double *red, double *grn, double *blu, double val, double max);
 void Cairo_Draw_Polygon(cairo_t *cr, GdkPoint *points, int npoints);
-void Cairo_Draw_Segments(cairo_t *cr, GdkSegment *segm, int nseg);
+void Cairo_Draw_Segments(cairo_t *cr, Segment_t *segm, int nseg);
 void Cairo_Draw_Line(cairo_t *cr, int x1, int y1, int x2, int y2);
 void Cairo_Draw_Lines(cairo_t *cr, GdkPoint *points, int npoints);
 /* draw_radiation.c */
-void Draw_Radiation(GtkWidget *drawingarea);
-void Draw_Radiation_Pattern(void);
-void Draw_Near_Field(void);
+void Draw_Radiation(cairo_t *cr);
 gboolean Animate_Near_Field(gpointer udata);
-double Scale_Gain(double gain, int fstep, int idx);
 double Polarization_Factor(int pol_type, int fstep, int idx);
 void Set_Polarization(int pol);
 void Set_Gain_Style(int gs);
@@ -1084,46 +1124,31 @@ void Alloc_Rdpattern_Buffers(int nfrq, int nth, int nph);
 void Alloc_Nearfield_Buffers(int n1, int n2, int n3);
 void Free_Draw_Buffers(void);
 /* draw_structure.c */
-void Draw_Structure(GtkWidget *drawingarea);
-void New_Wire_Data(void);
+void Draw_Structure(cairo_t *cr);
 void New_Patch_Data(void);
 void Process_Wire_Segments(void);
 void Process_Surface_Patches(void);
-void Draw_Wire_Segments(GdkSegment *segm, gint nseg);
-void Draw_Surface_Patches(GdkSegment *segm, gint npatch);
+void Draw_Wire_Segments(cairo_t *cr, Segment_t *segm, gint nseg);
+void Draw_Surface_Patches(cairo_t *cr, Segment_t *segm, gint npatch);
 gboolean Redo_Currents(gpointer udata);
 void New_Structure_Projection_Angle(void);
 void Init_Struct_Drawing(void);
-void Show_Viewer_Gain(GtkWidget *window, const char *widget, projection_parameters_t proj_params);
+void Show_Viewer_Gain(GtkBuilder *builder, gchar *widget, projection_parameters_t proj_params);
 /* fields.c */
 void efld(double xi, double yi, double zi, double ai, int ij);
-void eksc(double s, double z, double rh, double xk, int ij, _Complex double *ezs, _Complex double *ers, _Complex double *ezc, _Complex double *erc, _Complex double *ezk, _Complex double *erk);
-void ekscx(double bx, double s, double z, double rhx, double xk, int ij, int inx1, int inx2, _Complex double *ezs, _Complex double *ers, _Complex double *ezc, _Complex double *erc, _Complex double *ezk, _Complex double *erk);
 void gf(double zk, double *co, double *si);
 void gh(double zk, double *hr, double *hi);
 void gwave(_Complex double *erv, _Complex double *ezv, _Complex double *erh, _Complex double *ezh, _Complex double *eph);
 void gx(double zz, double rh, double xk, _Complex double *gz, _Complex double *gzp);
-void gxx(double zz, double rh, double a, double a2, double xk, int ira, _Complex double *g1, _Complex double *g1p, _Complex double *g2, _Complex double *g2p, _Complex double *g3, _Complex double *gzp);
-void hfk(double el1, double el2, double rhk, double zpkx, double *sgr, double *sgi);
 void hintg(double xi, double yi, double zi);
 void hsfld(double xi, double yi, double zi, double ai);
-void hsflx(double s, double rh, double zpx, _Complex double *hpk, _Complex double *hps, _Complex double *hpc);
-void nefld(double xob, double yob, double zob, _Complex double *ex, _Complex double *ey, _Complex double *ez);
 void nfpat(int nfeh);
-void nhfld(double xob, double yob, double zob, _Complex double *hx, _Complex double *hy, _Complex double *hz);
 void pcint(double xi, double yi, double zi, double cabi, double sabi, double salpi, _Complex double *e);
 void unere(double xob, double yob, double zob);
-void Near_Field_Total(_Complex double ex, _Complex double ey, _Complex double ez, int nfeh, int idx);
 /* fork.c */
 void Child_Process(int num_child);
-void Child_Input_File(void);
-int Fork_Command(const char *cdstr);
-ssize_t Read_Pipe(int idx, char *str, ssize_t len, gboolean err);
 ssize_t Write_Pipe(int idx, char *str, ssize_t len, gboolean err);
-ssize_t PRead_Pipe(int idx, char *str, ssize_t len, gboolean err);
-void Pass_Freq_Data(void);
 void Get_Freq_Data(int idx, int fstep);
-void Mem_Copy(char *buff, char *var, size_t cnt, gboolean wrt);
 /* geom_edit.c */
 void Wire_Editor(int action);
 void Patch_Editor(int action);
@@ -1134,18 +1159,10 @@ void Scale_Editor(int action);
 void Cylinder_Editor(int action);
 void Transform_Editor(int action);
 void Gend_Editor(int action);
-void Insert_GE_Card(GtkListStore *store, GtkTreeIter *iter);
-void Get_Geometry_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
-void Get_Geometry_Int_Data(GtkListStore *store, GtkTreeIter *iter, int *iv);
-void Set_Geometry_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
-void Set_Geometry_Int_Data(GtkListStore *store, GtkTreeIter *iter, int *iv);
 gboolean Check_Card_Name(GtkListStore *store, GtkTreeIter *iter, gboolean next, const gchar *name);
 gboolean Give_Up(int *busy, GtkWidget *widget);
-void Insert_Blank_Geometry_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, const gchar *name);
 void Remove_Row(GtkListStore *store, GtkTreeIter *iter);
 gboolean Get_Selected_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, gchar *name);
-void Set_Wire_Conductivity(int tag, double s, GtkListStore *store);
-gboolean Get_Wire_Conductivity(int tag, double *s, GtkListStore *store);
 /* geometry.c */
 gboolean arc(int itg, int ns, double rada, double ang1, double ang2, double rad);
 gboolean conect(int ignd);
@@ -1153,7 +1170,6 @@ void helix(double s, double hl, double a1, double b1, double a2, double b2, doub
 int isegno(int itagi, int mx);
 gboolean move(double rox, double roy, double roz, double xs, double ys, double zs, int its, int nrpt, int itgi);
 gboolean patch(int nx, int ny, double ax1, double ay1, double az1, double ax2, double ay2, double az2, double ax3, double ay3, double az3, double ax4, double ay4, double az4);
-void subph(int nx, int ny);
 gboolean reflc(int ix, int iy, int iz, int iti, int nop);
 void wire(double xw1, double yw1, double zw1, double xw2, double yw2, double zw2, double rad, double rdel, double rrad, int ns, int itg);
 /* gnuplot.c */
@@ -1169,50 +1185,46 @@ gboolean Read_Geometry(void);
 gboolean Read_Commands(void);
 gboolean readmn(char *mn, int *i1, int *i2, int *i3, int *i4, double *f1, double *f2, double *f3, double *f4, double *f5, double *f6);
 gboolean readgm(char *gm, int *i1, int *i2, double *x1, double *y1, double *z1, double *x2, double *y2, double *z2, double *rad);
-gboolean datagn(void);
-gboolean Tag_Seg_Error(int tag, int segs);
 /* interface.c */
-GtkWidget *create_main_window(void);
-GtkWidget *create_filechooserdialog(void);
-GtkWidget *create_fileselection(void);
-GtkWidget *create_freqplots_window(void);
-GtkWidget *create_rdpattern_window(void);
-GtkWidget *create_quit_dialog(void);
-GtkWidget *create_error_dialog(void);
-GtkWidget *create_animate_dialog(void);
-GtkWidget *create_nec2_editor(void);
-GtkWidget *create_wire_editor(void);
-GtkWidget *create_patch_editor(void);
-GtkWidget *create_arc_editor(void);
-GtkWidget *create_transform_editor(void);
-GtkWidget *create_helix_editor(void);
-GtkWidget *create_reflect_editor(void);
-GtkWidget *create_scale_editor(void);
-GtkWidget *create_cylinder_editor(void);
-GtkWidget *create_kernel_command(void);
-GtkWidget *create_execute_command(void);
-GtkWidget *create_intrange_command(void);
-GtkWidget *create_ground_command(void);
-GtkWidget *create_nearfield_command(void);
-GtkWidget *create_radiation_command(void);
-GtkWidget *create_excitation_command(void);
-GtkWidget *create_frequency_command(void);
-GtkWidget *create_loading_command(void);
-GtkWidget *create_network_command(void);
-GtkWidget *create_txline_command(void);
-GtkWidget *create_ground2_command(void);
-GtkWidget *create_gend_editor(void);
-GtkWidget *create_aboutdialog(void);
+GtkWidget *Builder_Get_Object(GtkBuilder *builder, gchar *name);
+GtkWidget *create_main_window(GtkBuilder **builder);
+GtkWidget *create_filechooserdialog(GtkBuilder **builder);
+GtkWidget *create_fileselection(GtkBuilder **builder);
+GtkWidget *create_freqplots_window(GtkBuilder **builder);
+GtkWidget *create_rdpattern_window(GtkBuilder **builder);
+GtkWidget *create_quit_dialog(GtkBuilder **builder);
+GtkWidget *create_error_dialog(GtkBuilder **builder);
+GtkWidget *create_animate_dialog(GtkBuilder **builder);
+GtkWidget *create_nec2_editor(GtkBuilder **builder);
+GtkWidget *create_wire_editor(GtkBuilder **builder);
+GtkWidget *create_patch_editor(GtkBuilder **builder);
+GtkWidget *create_arc_editor(GtkBuilder **builder);
+GtkWidget *create_transform_editor(GtkBuilder **builder);
+GtkWidget *create_helix_editor(GtkBuilder **builder);
+GtkWidget *create_reflect_editor(GtkBuilder **builder);
+GtkWidget *create_scale_editor(GtkBuilder **builder);
+GtkWidget *create_cylinder_editor(GtkBuilder **builder);
+GtkWidget *create_kernel_command(GtkBuilder **builder);
+GtkWidget *create_execute_command(GtkBuilder **builder);
+GtkWidget *create_intrange_command(GtkBuilder **builder);
+GtkWidget *create_ground_command(GtkBuilder **builder);
+GtkWidget *create_nearfield_command(GtkBuilder **builder);
+GtkWidget *create_radiation_command(GtkBuilder **builder);
+GtkWidget *create_excitation_command(GtkBuilder **builder);
+GtkWidget *create_frequency_command(GtkBuilder **builder);
+GtkWidget *create_loading_command(GtkBuilder **builder);
+GtkWidget *create_network_command(GtkBuilder **builder);
+GtkWidget *create_txline_command(GtkBuilder **builder);
+GtkWidget *create_ground2_command(GtkBuilder **builder);
+GtkWidget *create_gend_editor(GtkBuilder **builder);
+GtkWidget *create_aboutdialog(GtkBuilder **builder);
 /* main.c */
 int main(int argc, char *argv[]);
 gboolean Open_Input_File(gpointer udata);
 gboolean isChild(void);
 /* matrix.c */
 void cmset(int nrow, _Complex double *cmx, double rkhx, int iexkx);
-void cmss(int j1, int j2, int im1, int im2, _Complex double *cmx, int nrow, int itrp);
 void cmsw(int j1, int j2, int i1, int i2, _Complex double *cmx, _Complex double *cw, int ncw, int nrow, int itrp);
-void cmws(int j, int i1, int i2, _Complex double *cmx, int nr, _Complex double *cw, int itrp);
-void cmww(int j, int i1, int i2, _Complex double *cmx, int nr, _Complex double *cw, int nw, int itrp);
 void etmns(double p1, double p2, double p3, double p4, double p5, double p6, int ipr, _Complex double *e);
 void factr(int n, _Complex double *a, int *ip, int ndim);
 void factrs(int np, int nrow, _Complex double *a, int *ip);
@@ -1221,56 +1233,21 @@ void solve(int n, _Complex double *a, int *ip, _Complex double *b, int ndim);
 void solves(_Complex double *a, int *ip, _Complex double *b, int neq, int nrh, int np, int n, int mp, int m);
 /* nec2_model.c */
 void Nec2_Input_File_Treeview(int action);
-void Create_List_Stores(void);
-void Create_Default_File(void);
-void List_Comments(void);
-void List_Geometry(void);
-void List_Commands(void);
-void Insert_Columns(GtkWidget *window, gchar *treeview, GtkListStore *store, int ncols, char *colname[]);
 void cell_edited_callback(GtkCellRendererText *cell, gchar *path, gchar *new_text, gpointer user_data);
 void Save_Nec2_Input_File(GtkWidget *treeview_window, char *nec2_file);
-void Save_Treeview_Data(GtkTreeView *tree_view, int ncols, FILE *nec2_fp);
-gboolean gtk_tree_model_iter_previous(GtkTreeModel *tree_model, GtkTreeIter *iter);
 /* network.c */
 void netwk(_Complex double *cmx, int *ip, _Complex double *einc);
 void load(int *ldtyp, int *ldtag, int *ldtagf, int *ldtagt, double *zlr, double *zli, double *zlc);
 /* plot_freqdata.c */
-void Plot_Frequency_Data(void);
-void Display_Frequency_Data(void);
-void Draw_Plotting_Frame(gchar **title, GdkRectangle *rect, int nhor, int nvert);
-void Plot_Vertical_Scale(double red, double grn, double blu, int x, int y, int height, double max, double min, int nval);
-void Plot_Horizontal_Scale(double red, double grn, double blu, int x, int y, int width, double max, double min, int nval);
-void Draw_Graph(double red, double grn, double blu, GdkRectangle *rect, double *a, double *b, double amax, double amin, double bmax, double bmin, int nval, int side);
-void Set_Rectangle(GdkRectangle *rect, int x, int y, int w, int h);
-void Fit_to_Scale(double *max, double *min, int *nval);
-void Fit_to_Scale2(double *max1, double *min1, double *max2, double *min2, int *nval);
-void New_Max_Min(double *max, double *min, double sval, int *nval);
-void Plot_Graph2(double *fa, double *fb, double *fc, int nc, char *titles[], int nplt, int posn);
-void Plot_Graph(double *fa, double *fb, int nb, char *titles[], int nplt, int posn);
+void Plot_Frequency_Data(cairo_t *cr);
 void Plots_Window_Killed(void);
 void Set_Frequency_On_Click(GdkEventButton *event);
 /* radiation.c */
-void ffld(double thet, double phi, _Complex double *eth, _Complex double *eph);
-void fflds(double rox, double roy, double roz, _Complex double *scur, _Complex double *ex, _Complex double *ey, _Complex double *ez);
-void gfld(double rho, double phi, double rz, _Complex double *eth, _Complex double *epi, _Complex double *erd, _Complex double ux, int ksymp);
 void rdpat(void);
 /* shared.c */
 /* somnec.c */
 void somnec(double epr, double sig, double fmhz);
-void bessel(_Complex double z, _Complex double *j0, _Complex double *j0p);
-void evlua(_Complex double *erv, _Complex double *ezv, _Complex double *erh, _Complex double *eph);
 void fbar(_Complex double p, _Complex double *fbar);
-void gshank(_Complex double start, _Complex double dela, _Complex double *sum, int nans, _Complex double *seed, int ibk, _Complex double bk, _Complex double delb);
-void hankel(_Complex double z, _Complex double *h0, _Complex double *h0p);
-void lambda(double t, _Complex double *xlam, _Complex double *dxlam);
-void rom1(int n, _Complex double *sum, int nx);
-void saoa(double t, _Complex double *ans);
-/* support.c */
-GtkWidget *lookup_widget(GtkWidget *widget, const gchar *widget_name);
-void add_pixmap_directory(const gchar *directory);
-GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename);
-GdkPixbuf *create_pixbuf(const gchar *filename);
-void glade_set_atk_action_description(AtkAction *action, const gchar *action_name, const gchar *description);
 /* utils.c */
 void usage(void);
 int stop(char *mesg, int err);
@@ -1292,19 +1269,10 @@ void Strlcpy(char *dest, const char *src, size_t n);
 void Strlcat(char *dest, const char *src, size_t n);
 double Strtod(char *nptr, char **endptr);
 /* xnec2c.c */
-void Frequency_Scale_Geometry(void);
-void Structure_Impedance_Loading(void);
-void Ground_Parameters(void);
-void Set_Interaction_Matrix(void);
-void Set_Excitation(void);
-void Set_Network_Data(void);
-void Power_Loss(void);
-void Radiation_Pattern(void);
 void Near_Field_Pattern(void);
 void New_Frequency(void);
-gboolean Frequency_Loop(gpointer udata);
 gboolean Start_Frequency_Loop(void);
 void Stop_Frequency_Loop(void);
 void Incident_Field_Loop(void);
-
 #endif
+
diff --git a/src/draw.c b/src/draw.c
index 62f4c58..7667fd7 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,25 +14,38 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- *  draw.c
+#include "draw.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/*  Project_on_Screen()
  *
- *  Drawing routines for xnec2c
+ *  Projects a point in the x,y,z co-ordinate
+ *  frame of NEC2 to the x,y frame of the Screen
  */
+  static void
+Project_on_Screen(
+	projection_parameters_t *params,
+	double x, double y, double z,
+	double *xs, double *ys )
+{
+  *xs = y*params->cos_wr - x*params->sin_wr;
+  *ys = z*params->cos_wi - params->sin_wi *
+	(x*params->cos_wr + y*params->sin_wr);
 
-#include "draw.h"
-#include "shared.h"
+} /* Project_on_Screen() */
 
 /*-----------------------------------------------------------------------*/
 
 /* Set_Gdk_Segment()
  *
- *  Calculates window x,y co-ordinates of a GdkSegment for
+ *  Calculates window x,y co-ordinates of a Segment_t for
  *  drawing on Screen. Input data is a line in the xyz frame
  */
-void
+  void
 Set_Gdk_Segment(
-	GdkSegment *segm,
+	Segment_t *segm,
 	projection_parameters_t *params,
 	double x1, double y1, double z1,
 	double x2, double y2, double z2 )
@@ -44,74 +55,54 @@ Set_Gdk_Segment(
   /* Project end 1 of seg in xyz frame to screen frame */
   Project_on_Screen( params, x1, y1, z1, &x, &y );
   segm->x1 = (gint)(params->x_center + x*params->xy_scale);
-  segm->y1 = params->pixmap_height -
+  segm->y1 = params->height -
 	(gint)(params->y_center + y*params->xy_scale);
 
   /* Project end 2 of seg in xyz frame to screen frame */
   Project_on_Screen( params, x2, y2, z2, &x, &y );
   segm->x2 = (gint)(params->x_center + x*params->xy_scale);
-  segm->y2 = params->pixmap_height -
+  segm->y2 = params->height -
 	(gint)(params->y_center + y*params->xy_scale);
 
 } /* Set_Gdk_Segment() */
 
 /*-----------------------------------------------------------------------*/
 
-/*  Project_on_Screen()
- *
- *  Projects a point in the x,y,z co-ordinate
- *  frame of NEC2 to the x,y frame of the Screen
- */
-void
-Project_on_Screen(
-	projection_parameters_t *params,
-	double x, double y, double z,
-	double *xs, double *ys )
-{
-  *xs = y*params->cos_wr - x*params->sin_wr;
-  *ys = z*params->cos_wi - params->sin_wi *
-	(x*params->cos_wr + y*params->sin_wr);
-
-} /* Project_on_Screen() */
-
-/*-----------------------------------------------------------------------*/
-
 /*  Project_XYZ_Axes()
  *
- *  Sets GdkSegment data to project xyz axes on Screen
+ *  Sets Segment_t data to project xyz axes on Screen
  */
-void
+  static void
 Project_XYZ_Axes(
-	GdkPixmap *pixmap,
+	cairo_t *cr,
 	projection_parameters_t *params,
-	GdkSegment *segment )
+	Segment_t *segment )
 {
   double x, y;
   PangoLayout *layout;
-  GdkSegment *segm = segment;
+  Segment_t *segm = segment;
 
   /* cairo context */
-  cairo_t *cr = gdk_cairo_create( pixmap );
   cairo_set_source_rgb( cr, WHITE );
 
   layout =
 	gtk_widget_create_pango_layout( structure_drawingarea, "x" );
 
   segm->x1 = (gint)params->x_center;
-  segm->y1 = params->pixmap_height - (gint)(params->y_center);
+  segm->y1 = params->height - (gint)(params->y_center);
   Project_on_Screen( params, params->r_max, 0.0, 0.0, &x, &y );
   segm->x2 = (gint)(params->x_center + x*params->xy_scale);
-  segm->y2 = params->pixmap_height -
+  segm->y2 = params->height -
 	(gint)(params->y_center + y*params->xy_scale);
   cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
   pango_cairo_show_layout( cr, layout );
 
   segm++;
   segm->x1 = (gint)params->x_center;
-  segm->y1 = params->pixmap_height - (gint)params->y_center;
+  segm->y1 = params->height - (gint)params->y_center;
   Project_on_Screen( params, 0.0, params->r_max, 0.0, &x, &y );
   segm->x2 = (gint)(params->x_center + x*params->xy_scale);
-  segm->y2 = params->pixmap_height -
+  segm->y2 = params->height -
 	(gint)(params->y_center + y*params->xy_scale);
   pango_layout_set_text( layout, "y", -1 );
   cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
@@ -119,17 +110,16 @@ Project_XYZ_Axes(
 
   segm++;
   segm->x1 = (gint)params->x_center;
-  segm->y1 = params->pixmap_height - (gint)params->y_center;
+  segm->y1 = params->height - (gint)params->y_center;
   Project_on_Screen( params, 0.0, 0.0, params->r_max, &x, &y );
   segm->x2 = (gint)(params->x_center + x*params->xy_scale);
-  segm->y2 = params->pixmap_height -
+  segm->y2 = params->height -
 	(gint)(params->y_center + y*params->xy_scale);
   pango_layout_set_text( layout, " z", -1 );
   cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
   pango_cairo_show_layout( cr, layout );
   g_object_unref( layout );
 
-  cairo_destroy( cr );
 } /* Project_XYZ_Axes() */
 
 /*-----------------------------------------------------------------------*/
@@ -139,19 +129,16 @@ Project_XYZ_Axes(
  *  Draws the xyz axes to Screen
  */
   void
-Draw_XYZ_Axes( GdkPixmap *pixmap, projection_parameters_t params )
+Draw_XYZ_Axes( cairo_t *cr, projection_parameters_t params )
 {
-  static GdkSegment seg[3];
-  cairo_t *cr = gdk_cairo_create( pixmap );
-  cairo_set_source_rgb( cr, WHITE );
+  static Segment_t seg[3];
 
   /* Calcualte Screen co-ordinates of xyz axes */
-  Project_XYZ_Axes( pixmap, &params, seg );
+  Project_XYZ_Axes( cr, &params, seg );
 
   /* Draw xyz axes */
   Cairo_Draw_Segments( cr, seg, 3 );
 
-  cairo_destroy( cr );
 } /* Draw_XYZ_Axes() */
 
 /*-----------------------------------------------------------------------*/
@@ -159,20 +146,19 @@ Draw_XYZ_Axes( GdkPixmap *pixmap, projection_parameters_t params )
 /*  New_Projection_Parameters()
  *
  *  Calculates values for some projection parameters when
- *  a new backing pixmap is created after window resize or
- *  new wire or patch data is entered.
+ *  after a window resize or new wire or patch data entered.
  */
-void
+  void
 New_Projection_Parameters(
 	int width, int height,
 	projection_parameters_t *params )
 {
+  /* Half the size of drawing area */
   double size2;
-
   if( width < height )
-	size2 = (double)width/2.0;
+	size2 = (double)width / 2.0;
   else
-	size2 = (double)height/2.0;
+	size2 = (double)height / 2.0;
 
   /* This defines the center of the drawing areas. For the x co-ordinate
    * half the size of the drawing area is right (for widths of odd number
@@ -180,8 +166,8 @@ New_Projection_Parameters(
    * side of center). But for the y co-ordinate we need to round up as
    * y is from the top down and the y co-ordinate of center is calculated
    * from height - y_center and this leads to a 1-pixel error */
-  params->x_center = size2;
-  params->y_center = size2 + 0.5;
+  params->x_center = (double)width / 2.0;
+  params->y_center = (double)height / 2.0 + 0.5;
 
   if( params->r_max == 0.0 )
 	params->xy_scale1 = 1.0;
@@ -189,8 +175,8 @@ New_Projection_Parameters(
 	params->xy_scale1 = size2 / params->r_max;
   params->xy_scale = params->xy_scale1 * params->xy_zoom;
 
-  params->pixmap_width  = width;
-  params->pixmap_height = height;
+  params->width  = width;
+  params->height = height;
 
 } /* New_Projection_Parameters() */
 
@@ -275,7 +261,7 @@ Cairo_Draw_Polygon( cairo_t* cr, GdkPoint *points, int npoints )
  * Draws a number of line segments
  */
   void
-Cairo_Draw_Segments( cairo_t *cr, GdkSegment *segm, int nseg )
+Cairo_Draw_Segments( cairo_t *cr, Segment_t *segm, int nseg )
 {
   int idx;
 
@@ -285,6 +271,7 @@ Cairo_Draw_Segments( cairo_t *cr, GdkSegment *segm, int nseg )
 	cairo_line_to( cr, (double)segm[idx].x2, (double)segm[idx].y2 );
   }
   cairo_stroke( cr );
+
 } /* Cairo_Draw_Segments() */
 
 /*-----------------------------------------------------------------------*/
@@ -299,6 +286,7 @@ Cairo_Draw_Line( cairo_t *cr, int x1, int y1, int x2, int y2 )
   cairo_move_to( cr, (double)x1, (double)y1 );
   cairo_line_to( cr, (double)x2, (double)y2 );
   cairo_stroke( cr );
+
 } /* Cairo_Draw_Line() */
 
 /*-----------------------------------------------------------------------*/
@@ -316,6 +304,7 @@ Cairo_Draw_Lines( cairo_t *cr, GdkPoint *points, int npoints )
   for( idx = 1; idx < npoints; idx++ )
 	cairo_line_to( cr, (double)points[idx].x, (double)points[idx].y );
   cairo_stroke( cr );
+
 } /* Cairo_Draw_Line() */
 
 /*-----------------------------------------------------------------------*/
diff --git a/src/draw.h b/src/draw.h
index a51ce86..c8dcc9b 100644
--- a/src/draw.h
+++ b/src/draw.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	DRAW_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/draw_radiation.c b/src/draw_radiation.c
index 9fac9f1..81c0084 100644
--- a/src/draw_radiation.c
+++ b/src/draw_radiation.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,11 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* draw_radiation.c
- *
- * Code for drawing radiation patterns
- */
-
 #include "draw_radiation.h"
 #include "shared.h"
 
@@ -33,47 +26,47 @@ static point_3d_t *point_3d = NULL;
 
 /*-----------------------------------------------------------------------*/
 
-/* Draw_Radiation()
+/* Scale_Gain()
  *
- * Draws the radiation pattern or near E/H fields
+ * Scales radiation pattern gain according to selected style
+ * ( ARRL style, logarithmic or linear voltage/power )
  */
-  void
-Draw_Radiation( GtkWidget *drawingarea )
+static int gain_style = GS_LINP;
+
+  static double
+Scale_Gain( double gain, int fstep, int idx )
 {
-  /* Abort if xnec2c may be quit by user */
-  if( isFlagSet(MAIN_QUIT) || isFlagClear(ENABLE_EXCITN) )
-	return;
+  /* Scaled rad pattern gain and pol factor */
+  double scaled_rad = 0.0;
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
+  gain += Polarization_Factor( calc_data.pol_type, fstep, idx );
 
-  /* Clear pixmap */
-  cairo_set_source_rgb( cr, BLACK );
-  cairo_rectangle(
-	  cr, 0.0, 0.0,
-	  (double)rdpattern_proj_params.pixmap_width,
-	  (double)rdpattern_proj_params.pixmap_height);
-  cairo_fill( cr );
+  switch( gain_style )
+  {
+	case GS_LINP:
+	  scaled_rad = pow(10.0, (gain/10.0));
+	  break;
 
-  /* Draw rad pattern or E/H fields */
-  if( isFlagSet(DRAW_GAIN) )
-	Draw_Radiation_Pattern();
-  else if( isFlagSet(DRAW_EHFIELD) )
-	  Draw_Near_Field();
+	case GS_LINV:
+	  scaled_rad = pow(10.0, (gain/20.0));
+	  break;
 
-  /* Render pixmap to screen */
-  gdk_window_set_back_pixmap( drawingarea->window,
-	  rdpattern_pixmap, FALSE );
-  gdk_window_clear( drawingarea->window );
+	case GS_ARRL:
+	  scaled_rad = exp( 0.058267 * gain );
+	  break;
 
-  /* Display frequency step */
-  Display_Fstep( rdpattern_fstep_entry, calc_data.fstep );
+	case GS_LOG:
+	  scaled_rad = gain;
+	  if( scaled_rad < -40 )
+		scaled_rad = 0.0;
+	  else
+		scaled_rad = scaled_rad /40.0 + 1.0;
 
-  /* Wait for GTK to complete its tasks */
-  while( g_main_context_iteration(NULL, FALSE) );
+  } /* switch( gain_style ) */
 
-  cairo_destroy( cr );
-} /* Draw_Radiation() */
+  return( scaled_rad );
+
+} /* Scale_Gain() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -83,15 +76,15 @@ Draw_Radiation( GtkWidget *drawingarea )
  * segmants joining the points defined by spherical
  * co-ordinates theta, phi and r = gain(theta, phi)
  */
-  void
-Draw_Radiation_Pattern( void )
+  static void
+Draw_Radiation_Pattern( cairo_t *cr )
 {
   /* Abort if rad pattern cannot be drawn */
   if( isFlagClear(ENABLE_RDPAT) || (calc_data.fstep < 0) )
 	return;
 
   /* Line segments to draw on Screen */
-  GdkSegment segm;
+  Segment_t segm;
 
   int
 	idx,
@@ -113,10 +106,7 @@ Draw_Radiation_Pattern( void )
   double dph = (double)fpat.dph * (double)TORAD;
 
   /* Used to set text in labels */
-  gchar txt[7];
-
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
+  gchar txt[8];
 
   fstep = calc_data.fstep;
   pol   = calc_data.pol_type;
@@ -149,8 +139,8 @@ Draw_Radiation_Pattern( void )
 
 	/* Set radiation pattern projection parametrs */
 	New_Projection_Parameters(
-		rdpattern_pixmap_width,
-		rdpattern_pixmap_height,
+		rdpattern_width,
+		rdpattern_height,
 		&rdpattern_proj_params );
 
 	/*** Convert radiation pattern values
@@ -167,8 +157,7 @@ Draw_Radiation_Pattern( void )
 	  for( nth = 0; nth < fpat.nth; nth++ )
 	  {
 		/* Distance of pattern point from the xyz origin */
-		r = Scale_Gain(
-			rad_pattern[fstep].gtot[pts_idx], fstep, pts_idx );
+		r = Scale_Gain( rad_pattern[fstep].gtot[pts_idx], fstep, pts_idx );
 
 		/* Distance of pattern point from xyz origin */
 		point_3d[pts_idx].r = r;
@@ -234,31 +223,29 @@ Draw_Radiation_Pattern( void )
 	} /* for( nph = 1; nph < fpat.nph; nph++ ) */
 
 	/* Show max gain on color code bar */
-	snprintf( txt, 7, "%6f", rad_pattern[fstep].max_gain[pol] );
-	gtk_label_set_text(
-		GTK_LABEL(lookup_widget(rdpattern_window,
-			"rdpattern_colorcode_maxlabel")), txt );
+	snprintf( txt, 8, "%6.1f", rad_pattern[fstep].max_gain[pol] );
+	gtk_label_set_text(	GTK_LABEL(
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_colorcode_maxlabel")),
+		txt );
 
 	/* Show min gain on color code bar */
-	snprintf( txt, 5, "%4f", rad_pattern[fstep].min_gain[pol] );
-	gtk_label_set_text(
-		GTK_LABEL(lookup_widget(rdpattern_window,
-			"rdpattern_colorcode_minlabel")), txt );
+	snprintf( txt, 6, "%4.1f", rad_pattern[fstep].min_gain[pol] );
+	gtk_label_set_text(GTK_LABEL(
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_colorcode_minlabel")),
+		txt );
 
   } /* if( isFlagSet(DRAW_NEWRDPAT) ) ) */
 
   /* Draw xyz axes to Screen */
-  Draw_XYZ_Axes( rdpattern_pixmap, rdpattern_proj_params );
+  Draw_XYZ_Axes( cr, rdpattern_proj_params );
 
   /* Overlay structure on Near Field pattern */
   if( isFlagSet(OVERLAY_STRUCT) )
   {
-	/* Save structure pixmap and params pointers */
-	GdkPixmap *pixmap = structure_pixmap;
+	/* Save structure projection params pointers */
 	projection_parameters_t params = structure_proj_params;
 
 	/* Divert structure drawing to rad pattern area */
-	structure_pixmap = rdpattern_pixmap;
 	structure_proj_params = rdpattern_proj_params;
 	structure_proj_params.r_max = params.r_max;
 	structure_proj_params.xy_scale =
@@ -267,12 +254,12 @@ Draw_Radiation_Pattern( void )
 	/* Process and draw geometry if enabled */
 	Process_Wire_Segments();
 	Process_Surface_Patches();
-	Draw_Surface_Patches( structure_segs+data.n, data.m );
-	Draw_Wire_Segments( structure_segs, data.n );
+	Draw_Surface_Patches( cr, structure_segs+data.n, data.m );
+	Draw_Wire_Segments( cr, structure_segs, data.n );
 
-	/* Restore structure pixmap and params */
-	structure_pixmap = pixmap;
+	/* Restore structure projection params */
 	structure_proj_params = params;
+
   } /* if( isFlagSet(OVERLAY_STRUCT) ) */
 
   /*** Draw rad pattern on screen ***/
@@ -335,11 +322,10 @@ Draw_Radiation_Pattern( void )
 
   /* Show gain in direction of viewer */
   Show_Viewer_Gain(
-	  rdpattern_window,
+	  rdpattern_window_builder,
 	  "rdpattern_viewer_gain",
 	  rdpattern_proj_params );
 
-  cairo_destroy( cr );
 } /* Draw_Radiation_Pattern() */
 
 /*-----------------------------------------------------------------------*/
@@ -348,8 +334,8 @@ Draw_Radiation_Pattern( void )
  *
  * Draws near E/H fields and Poynting vector
  */
-  void
-Draw_Near_Field( void )
+  static void
+Draw_Near_Field( cairo_t *cr )
 {
   int idx, npts; /* Number of points to plot */
   double
@@ -371,7 +357,7 @@ Draw_Near_Field( void )
   gchar txt[9];
 
   /* Line segments to draw on Screen */
-  GdkSegment segm;
+  Segment_t segm;
 
   /* For coloring field lines */
   double xred = 0.0, xgrn = 0.0, xblu = 0.0;
@@ -380,9 +366,6 @@ Draw_Near_Field( void )
   if( isFlagClear(ENABLE_NEAREH) || !near_field.valid )
 	return;
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
-
   /* Initialize projection parameters */
   if( isFlagSet(DRAW_NEW_EHFIELD) )
   {
@@ -400,8 +383,8 @@ Draw_Near_Field( void )
 	/* Distance of field point furthest from xyz origin */
 	rdpattern_proj_params.r_max = near_field.r_max + dr;
 	New_Projection_Parameters(
-		rdpattern_pixmap_width,
-		rdpattern_pixmap_height,
+		rdpattern_width,
+		rdpattern_height,
 		&rdpattern_proj_params );
 
 	ClearFlag( DRAW_NEW_EHFIELD );
@@ -409,27 +392,24 @@ Draw_Near_Field( void )
   } /* if( isFlagSet( DRAW_NEW_EHFIELD ) */
 
   /* Draw xyz axes to Screen */
-  Draw_XYZ_Axes( rdpattern_pixmap, rdpattern_proj_params );
+  Draw_XYZ_Axes( cr, rdpattern_proj_params );
 
   /* Overlay structure on Near Field pattern */
   if( isFlagSet(OVERLAY_STRUCT) )
   {
-	/* Save structure pixmap and params pointers */
-	GdkPixmap *pixmap = structure_pixmap;
+	/* Save projection params pointers */
 	projection_parameters_t params = structure_proj_params;
 
 	/* Divert structure drawing to rad pattern area */
-	structure_pixmap = rdpattern_pixmap;
 	structure_proj_params = rdpattern_proj_params;
 
 	/* Process and draw geometry if enabled */
 	Process_Wire_Segments();
 	Process_Surface_Patches();
-	Draw_Surface_Patches( structure_segs+data.n, data.m );
-	Draw_Wire_Segments( structure_segs, data.n );
+	Draw_Surface_Patches( cr, structure_segs+data.n, data.m );
+	Draw_Wire_Segments( cr, structure_segs, data.n );
 
-	/* Restore structure pixmap and params */
-	structure_pixmap = pixmap;
+	/* Restore structure params */
 	structure_proj_params = params;
   } /* if( isFlagSet(OVERLAY_STRUCT) ) */
 
@@ -505,11 +485,12 @@ Draw_Near_Field( void )
 		(fpat.nfeh & NEAR_HFIELD) )
 	{
 	  int ipv; /* Mem request and index */
+	  static size_t mreq = 0;
 
 	  /* Allocate on new near field matrix size */
-	  if( isFlagSet(ALLOC_PNTING_BUFF) )
+	  if( !mreq || isFlagSet(ALLOC_PNTING_BUFF) )
 	  {
-		size_t mreq = (size_t)npts * sizeof( double );
+		mreq = (size_t)npts * sizeof( double );
 		mem_realloc( (void **)&pov_x, mreq, "in draw_radiation.c" );
 		mem_realloc( (void **)&pov_y, mreq, "in draw_radiation.c" );
 		mem_realloc( (void **)&pov_z, mreq, "in draw_radiation.c" );
@@ -570,7 +551,6 @@ Draw_Near_Field( void )
 
   if( isFlagSet(NEAREH_ANIMATE) )
   {
-	cairo_destroy( cr );
 	return;
   }
 
@@ -583,20 +563,54 @@ Draw_Near_Field( void )
 	max = pov_max;
 
   snprintf( txt, sizeof(txt), "%8.2E", max );
-  gtk_label_set_text(
-	  GTK_LABEL(lookup_widget(rdpattern_window,
-		  "rdpattern_colorcode_maxlabel")), txt );
+  gtk_label_set_text( GTK_LABEL(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_colorcode_maxlabel")),
+	  txt );
 
   /* Show min field strength on color code bar */
-  gtk_label_set_text(
-	  GTK_LABEL(lookup_widget(rdpattern_window,
-		  "rdpattern_colorcode_minlabel")), "0" );
+  gtk_label_set_text( GTK_LABEL(
+		Builder_Get_Object(rdpattern_window_builder, "rdpattern_colorcode_minlabel")),
+	  "0" );
 
-  cairo_destroy( cr );
 } /* Draw_Near_Field() */
 
 /*-----------------------------------------------------------------------*/
 
+/* Draw_Radiation()
+ *
+ * Draws the radiation pattern or near E/H fields
+ */
+  void
+Draw_Radiation( cairo_t *cr )
+{
+  /* Abort if xnec2c may be quit by user */
+  if( isFlagSet(MAIN_QUIT) || isFlagClear(ENABLE_EXCITN) )
+	return;
+
+  /* Clear drawingarea */
+  cairo_set_source_rgb( cr, BLACK );
+  cairo_rectangle(
+	  cr, 0.0, 0.0,
+	  (double)rdpattern_proj_params.width,
+	  (double)rdpattern_proj_params.height);
+  cairo_fill( cr );
+
+  /* Draw rad pattern or E/H fields */
+  if( isFlagSet(DRAW_GAIN) )
+	Draw_Radiation_Pattern( cr );
+  else if( isFlagSet(DRAW_EHFIELD) )
+	  Draw_Near_Field( cr );
+
+  /* Display frequency step */
+  Display_Fstep( rdpattern_fstep_entry, calc_data.fstep );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+
+} /* Draw_Radiation() */
+
+/*-----------------------------------------------------------------------*/
+
   gboolean
 Animate_Near_Field( gpointer udata )
 {
@@ -620,6 +634,7 @@ Animate_Near_Field( gpointer udata )
 		cos( wt + near_field.fey[idx] );
 	  near_field.erz[idx] = near_field.ez[idx] *
 		cos( wt + near_field.fez[idx] );
+
 	  /* Near total electric field vector */
 	  near_field.er[idx]  = sqrt(
 		  near_field.erx[idx] * near_field.erx[idx] +
@@ -638,6 +653,7 @@ Animate_Near_Field( gpointer udata )
 		cos( wt + near_field.fhy[idx] );
 	  near_field.hrz[idx] = near_field.hz[idx] *
 		cos( wt + near_field.fhz[idx] );
+
 	  /* Near total magnetic field vector*/
 	  near_field.hr[idx]  = sqrt(
 		  near_field.hrx[idx] * near_field.hrx[idx] +
@@ -651,10 +667,12 @@ Animate_Near_Field( gpointer udata )
 
   /* Increment excitation phase, keep < 2pi */
   wt += near_field.anim_step;
-  if( wt >= (double)TWOPI )
+  if( wt >= (double)M_2PI )
 	wt = 0.0;
 
-  Draw_Radiation( rdpattern_drawingarea );
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( rdpattern_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
 
   return( TRUE );
 
@@ -662,50 +680,6 @@ Animate_Near_Field( gpointer udata )
 
 /*-----------------------------------------------------------------------*/
 
-/* Scale_Gain()
- *
- * Scales radiation pattern gain according to selected style
- * ( ARRL style, logarithmic or linear voltage/power )
- */
-static int gain_style = GS_LINP;
-
-  double
-Scale_Gain( double gain, int fstep, int idx )
-{
-  /* Scaled rad pattern gain and pol factor */
-  double scaled_rad = 0.0;
-
-  gain += Polarization_Factor( calc_data.pol_type, fstep, idx );
-
-  switch( gain_style )
-  {
-	case GS_LINP:
-	  scaled_rad = pow(10.0, (gain/10.0));
-	  break;
-
-	case GS_LINV:
-	  scaled_rad = pow(10.0, (gain/20.0));
-	  break;
-
-	case GS_ARRL:
-	  scaled_rad = exp( 0.058267 * gain );
-	  break;
-
-	case GS_LOG:
-	  scaled_rad = gain;
-	  if( scaled_rad < -40 )
-		scaled_rad = 0.0;
-	  else
-		scaled_rad = scaled_rad /40.0 + 1.0;
-
-  } /* switch( gain_style ) */
-
-  return( scaled_rad );
-
-} /* Scale_Gain() */
-
-/*-----------------------------------------------------------------------*/
-
 /* Polarization_Factor()
  *
  * Calculates polarization factor from axial
@@ -752,7 +726,7 @@ Polarization_Factor( int pol_type, int fstep, int idx )
 
   if( polf < 1.0E-200 ) polf = 1.0E-200;
   polf = 10.0 * log10( polf );
-  
+
   return( polf );
 } /* Polarization_Factor() */
 
@@ -770,20 +744,30 @@ Set_Polarization( int pol )
 
   Set_Window_Labels();
 
-  /* Trigger a redraw of drawingareas */
-  if( isFlagSet(DRAW_ENABLED) )
-	Draw_Radiation( rdpattern_drawingarea );
-
-  if( isFlagSet(PLOT_ENABLED) )
-	Plot_Frequency_Data();
-
   /* Show gain in direction of viewer */
-  Show_Viewer_Gain( main_window,
-	  "main_gain_entry", structure_proj_params );
+  Show_Viewer_Gain(
+	  main_window_builder,
+	  "main_gain_entry",
+	  structure_proj_params );
 
   /* Enable redraw of rad pattern */
   SetFlag( DRAW_NEW_RDPAT );
 
+  /* Trigger a redraw of drawingareas */
+  if( isFlagSet(DRAW_ENABLED) )
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
+
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
+
 } /* Set_Polarization() */
 
 /*-----------------------------------------------------------------------*/
@@ -804,7 +788,10 @@ Set_Gain_Style( int gs )
   {
 	/* Enable redraw of rad pattern */
 	SetFlag( DRAW_NEW_RDPAT );
-	Draw_Radiation( rdpattern_drawingarea );
+
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
   }
 
 } /* Set_Gain_Style() */
@@ -827,11 +814,19 @@ New_Radiation_Projection_Angle(void)
 
   /* Trigger a redraw of radiation drawingarea */
   if( isFlagSet(DRAW_ENABLED) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   /* Trigger a redraw of plots drawingarea if doing "viewer" gain */
   if( isFlagSet(PLOT_ENABLED) && isFlagSet(PLOT_GVIEWER) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
 } /* New_Radiation_Projection_Angle() */
 
@@ -851,7 +846,11 @@ Redo_Radiation_Pattern( gpointer udata )
 
   /* Redraw radiation pattern on screen */
   if( isFlagSet(DRAW_ENABLED) )
-	Draw_Radiation( rdpattern_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   return FALSE;
 
@@ -869,7 +868,7 @@ Viewer_Gain( projection_parameters_t proj_parameters, int fstep )
 {
   double phi, gain;
   int nth, nph, idx;
-  
+
   /* Calculate theta step from proj params */
   phi = proj_parameters.Wr;
   if( fpat.dth == 0.0 ) nth = 0;
@@ -926,7 +925,7 @@ Rdpattern_Window_Killed( void )
 	gtk_widget_destroy( animate_dialog );
 	animate_dialog = NULL;
 	ClearFlag( NEAREH_ANIMATE );
-	g_source_remove( anim_tag );
+	if( anim_tag ) g_source_remove( anim_tag );
 	anim_tag = 0;
   }
 
@@ -935,11 +934,13 @@ Rdpattern_Window_Killed( void )
 	ClearFlag( DRAW_FLAGS );
 	rdpattern_drawingarea = NULL;
 	rdpattern_window = NULL;
+	g_object_unref( rdpattern_window_builder );
+	rdpattern_window_builder = NULL;
 	Free_Draw_Buffers();
 
-	gtk_check_menu_item_set_active(
-		GTK_CHECK_MENU_ITEM(lookup_widget(
-			main_window, "main_rdpattern")), FALSE );
+	gtk_check_menu_item_set_active(	GTK_CHECK_MENU_ITEM(
+		  Builder_Get_Object( main_window_builder, "main_rdpattern")),
+		FALSE );
   }
 
 } /* Rdpattern_Window_Killed() */
@@ -996,8 +997,8 @@ Set_Window_Labels( void )
 		Strlcat( txt, _(" - Poynting Vector"), s );
 	}
 
-	gtk_label_set_text( GTK_LABEL(lookup_widget(
-			rdpattern_window, "rdpattern_label")), txt );
+	gtk_label_set_text( GTK_LABEL(
+		  Builder_Get_Object(rdpattern_window_builder, "rdpattern_label")), txt );
 
   } /* if( isFlagSet(DRAW_ENABLED) ) */
 
@@ -1005,8 +1006,8 @@ Set_Window_Labels( void )
   {
 	Strlcpy( txt, _("Frequency Data Plots - "), s );
 	Strlcat( txt, pol_type[calc_data.pol_type], s );
-	gtk_label_set_text( GTK_LABEL(lookup_widget(
-			freqplots_window, "freqplots_label")), txt );
+	gtk_label_set_text( GTK_LABEL(
+		  Builder_Get_Object(freqplots_window_builder, "freqplots_label")), txt );
   }
 
 } /* Set_Window_Labels() */
diff --git a/src/draw_radiation.h b/src/draw_radiation.h
index a7066a8..c1b3c0f 100644
--- a/src/draw_radiation.h
+++ b/src/draw_radiation.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define DRAW_RADIATION_H		1
 
 #include "common.h"
-#include "support.h"
 
 /* Point in 3d xyz axes */
 typedef struct
diff --git a/src/draw_structure.c b/src/draw_structure.c
index de84231..84188a9 100644
--- a/src/draw_structure.c
+++ b/src/draw_structure.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,12 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- *  draw_structure.c
- *
- *  Structure drawing routines for xnec2c
- */
-
 #include "draw_structure.h"
 #include "shared.h"
 
@@ -32,38 +24,31 @@
  *  Draws xyz axes, wire segments and patches
  */
   void
-Draw_Structure( GtkWidget *drawingarea )
+Draw_Structure( cairo_t *cr )
 {
   /* Abort if xnec2c may be quit by user */
-  if( isFlagSet(MAIN_QUIT) )
-	return;
+  if( isFlagSet(MAIN_QUIT) ) return;
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( structure_pixmap );
-
-  /* Clear pixmap */
+  /* Clear drawingarea */
   cairo_set_source_rgb( cr, BLACK );
   cairo_rectangle(
 	  cr, 0.0, 0.0,
-	  (double)structure_proj_params.pixmap_width,
-	  (double)structure_proj_params.pixmap_height);
+	  (double)structure_proj_params.width,
+	  (double)structure_proj_params.height);
   cairo_fill( cr );
 
   /* Process and draw geometry if available, else clear screen */
   Process_Wire_Segments();
   Process_Surface_Patches();
-  Draw_XYZ_Axes( structure_pixmap, structure_proj_params );
-  Draw_Surface_Patches( structure_segs+data.n, data.m );
-  Draw_Wire_Segments( structure_segs, data.n );
+  Draw_XYZ_Axes( cr, structure_proj_params );
+  Draw_Surface_Patches( cr, structure_segs+data.n, data.m );
+  Draw_Wire_Segments( cr, structure_segs, data.n );
 
   /* Show gain in direction of viewer */
-  Show_Viewer_Gain( main_window,
-	  "main_gain_entry", structure_proj_params );
-
-  /* Render pixmap to screen */
-  gdk_window_set_back_pixmap(
-	  drawingarea->window, structure_pixmap, FALSE );
-  gdk_window_clear( drawingarea->window );
+  Show_Viewer_Gain(
+	  main_window_builder,
+	  "main_gain_entry",
+	  structure_proj_params );
 
   /* Reset "new current data" flag */
   crnt.newer = 0;
@@ -74,8 +59,6 @@ Draw_Structure( GtkWidget *drawingarea )
   /* Wait for GTK to complete its tasks */
   while( g_main_context_iteration(NULL, FALSE) );
 
-  cairo_destroy( cr );
-
 } /* Draw_Structure() */
 
 /*-----------------------------------------------------------------------*/
@@ -85,7 +68,7 @@ Draw_Structure( GtkWidget *drawingarea )
  *  Calculates some projection parameters
  *  when new wire segment data is created
  */
-  void
+  static void
 New_Wire_Data( void )
 {
   /* Abort if no wire data */
@@ -123,8 +106,8 @@ New_Wire_Data( void )
 
   /* Redraw structure on screen */
   New_Projection_Parameters(
-	  structure_pixmap_width,
-	  structure_pixmap_height,
+	  structure_width,
+	  structure_height,
 	  &structure_proj_params );
 
 } /* New_Wire_Data() */
@@ -241,8 +224,8 @@ New_Patch_Data( void )
 
   /* Redraw structure on screen */
   New_Projection_Parameters(
-	  structure_pixmap_width,
-	  structure_pixmap_height,
+	  structure_width,
+	  structure_height,
 	  &structure_proj_params );
 
 } /* New_Patch_Data() */
@@ -307,8 +290,8 @@ Process_Surface_Patches( void )
  *  Draws all wire segments of the input structure
  */
 
-void
-Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
+  void
+Draw_Wire_Segments(	cairo_t *cr, Segment_t *segm, gint nseg )
 {
   /* Abort if no wire segs or new input pending */
   if( !nseg || isFlagSet(INPUT_PENDING) )
@@ -316,9 +299,6 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
 
   int idx, i;
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( structure_pixmap );
-
   /* Draw networks */
   for( idx = 0; idx < netcx.nonet; idx++ )
   {
@@ -347,7 +327,7 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
 		  Cairo_Draw_Polygon( cr, points, 4 );
 		  cairo_fill( cr );
 
-			/* Draw connecting lines */
+		  /* Draw connecting lines */
 		  Cairo_Draw_Line( cr,
 			  segm[i1].x1, segm[i1].y1,
 			  segm[i2].x1, segm[i2].y1 );
@@ -421,9 +401,9 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
 		snprintf( label, s, "%10.3E", cmax * (double)data.wlam );
 	  else
 		snprintf( label, s, "%10.3E", cmax * 1.0E-6/(double)calc_data.fmhz );
-	  gtk_label_set_text(
-		  GTK_LABEL(lookup_widget(structure_drawingarea,
-			  "main_colorcode_maxlabel")), label );
+	  gtk_label_set_text( GTK_LABEL(
+			Builder_Get_Object(main_window_builder, "main_colorcode_maxlabel")),
+		  label );
 
 	} /* if( crnt.newer ) */
 
@@ -442,7 +422,6 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
 		  segm[idx].x2, segm[idx].y2 );
 	} /* for( idx = 0; idx < nseg; idx++ ) */
 
-	cairo_destroy( cr );
 	return;
   } /* if( isFlagSet(DRAW_CURRENTS) || isFlagSet(DRAW_CHARGES) ) */
 
@@ -510,7 +489,6 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
 	}
   }
 
-  cairo_destroy( cr );
 } /* Draw_Wire_Segments() */
 
 /*-----------------------------------------------------------------------*/
@@ -519,15 +497,11 @@ Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
  *
  *  Draws the line segments that represent surface patches
  */
-void
-Draw_Surface_Patches( GdkSegment *segm, gint npatch )
+  void
+Draw_Surface_Patches( cairo_t *cr, Segment_t *segm, gint npatch )
 {
   /* Abort if no patches */
-  if( ! npatch )
-	return;
-
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( structure_pixmap );
+  if( ! npatch ) return;
 
   /* Draw currents if enabled, return */
   if( isFlagSet(DRAW_CURRENTS) && crnt.valid )
@@ -628,7 +602,6 @@ Draw_Surface_Patches( GdkSegment *segm, gint npatch )
 	}
   }
 
-  cairo_destroy( cr );
 } /* Draw_Surface_Patches() */
 
 /*-----------------------------------------------------------------------*/
@@ -652,12 +625,20 @@ Redo_Currents( gpointer udata )
 
   /* Display freq data in entry widgets */
   if( isFlagSet(PLOT_FREQ_LINE) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   /* Redraw structure on screen */
   if( (structure_drawingarea != NULL) &&
 	  (isFlagSet(DRAW_CURRENTS) || isFlagSet(DRAW_CHARGES)) )
-	Draw_Structure( structure_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( structure_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   return FALSE;
 } /* Redo_Currents() */
@@ -680,11 +661,19 @@ New_Structure_Projection_Angle(void)
 
   /* Trigger a redraw of structure drawingarea */
   if( isFlagClear(INPUT_PENDING) )
-	Draw_Structure( structure_drawingarea );
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( structure_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   /* Trigger a redraw of plots drawingarea */
   if( isFlagSet(PLOT_ENABLED) && isFlagSet(PLOT_GVIEWER) )
-	Plot_Frequency_Data();
+  {
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
 } /* New_Structure_Projection_Angle() */
 
@@ -698,7 +687,7 @@ New_Structure_Projection_Angle(void)
 Init_Struct_Drawing( void )
 {
   /* We need n segs for wires + 2m for patces */
-  size_t mreq = (size_t)(data.n + 2*data.m) * sizeof(GdkSegment);
+  size_t mreq = (size_t)(data.n + 2*data.m) * sizeof(Segment_t);
   mem_realloc( (void **)&structure_segs, mreq, "in draw_structure.c" );
   New_Wire_Data();
   New_Patch_Data();
@@ -712,8 +701,8 @@ Init_Struct_Drawing( void )
  */
   void
 Show_Viewer_Gain(
-	GtkWidget *window,
-	const char *widget,
+	GtkBuilder *builder,
+	gchar *widget,
 	projection_parameters_t proj_params )
 {
   if( isFlagSet(DRAW_CURRENTS)	||
@@ -727,8 +716,8 @@ Show_Viewer_Gain(
 	{
 	  snprintf( txt, sizeof(txt), "%7.2f",
 		  Viewer_Gain(proj_params, calc_data.fstep) );
-	  gtk_entry_set_text(
-		  GTK_ENTRY(lookup_widget(window, widget)), txt );
+	  gtk_entry_set_text(GTK_ENTRY(
+			Builder_Get_Object(builder, widget)), txt );
 	}
   }
 
diff --git a/src/draw_structure.h b/src/draw_structure.h
index 0fb275d..75ed542 100644
--- a/src/draw_structure.h
+++ b/src/draw_structure.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	DRAW_STRUCTURE_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/editors.h b/src/editors.h
index 6dfcc11..e5cd165 100644
--- a/src/editors.h
+++ b/src/editors.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
diff --git a/src/fields.c b/src/fields.c
index ea02772..bb633fa 100644
--- a/src/fields.c
+++ b/src/fields.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -52,27 +50,224 @@ static tmh_t tmh;
 
 /*-------------------------------------------------------------------*/
 
+/* compute e field of sine, cosine, and constant */
+/* current filaments by thin wire approximation. */
+  static void
+eksc( double s, double z, double rh,
+	double xk, int ij,	complex double *ezs,
+	complex double *ers, complex double *ezc,
+	complex double *erc, complex double *ezk,
+	complex double *erk )
+{
+  double rhk, sh, shk, ss, cs, z1a, z2a, cint, sint;
+  complex double gz1, gz2, gp1, gp2, gzp1, gzp2;
+
+  tmi.ij= ij;
+  tmi.zpk= xk* z;
+  rhk= xk* rh;
+  tmi.rkb2= rhk* rhk;
+  sh=.5* s;
+  shk= xk* sh;
+  ss= sin( shk);
+  cs= cos( shk);
+  z2a= sh- z;
+  z1a=-( sh+ z);
+  gx( z1a, rh, xk, &gz1, &gp1);
+  gx( z2a, rh, xk, &gz2, &gp2);
+  gzp1= gp1* z1a;
+  gzp2= gp2* z2a;
+  *ezs=  CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
+  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
+  *erk= CONST1*( gp2- gp1)* rh;
+  intx(- shk, shk, rhk, ij, &cint, &sint);
+  *ezk= -CONST1*( gzp2- gzp1+ xk* xk* cmplx( cint,- sint));
+  gzp1= gzp1* z1a;
+  gzp2= gzp2* z2a;
+
+  if( rh >= 1.0e-10)
+  {
+	*ers= -CONST1*(( gzp2+ gzp1+ gz2+ gz1)*
+		ss-( z2a* gz2- z1a* gz1)* cs*xk)/ rh;
+	*erc= -CONST1*(( gzp2- gzp1+ gz2- gz1)*
+		cs+( z2a* gz2+ z1a* gz1)* ss*xk)/ rh;
+	return;
+  }
+
+  *ers = CPLX_00;
+  *erc = CPLX_00;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* segment end contributions for ext. thin wire approx. */
+  static void
+gxx( double zz, double rh, double a,
+	double a2, double xk, int ira, complex double *g1,
+	complex double *g1p, complex double *g2,
+	complex double *g2p, complex double *g3,
+	complex double *gzp )
+{
+  double r, r2, r4, rk, rk2, rh2, t1, t2;
+  complex double  gz, c1, c2, c3;
+
+  r2= zz* zz+ rh* rh;
+  r= sqrt( r2);
+  r4= r2* r2;
+  rk= xk* r;
+  rk2= rk* rk;
+  rh2= rh* rh;
+  t1=.25* a2* rh2/ r4;
+  t2=.5* a2/ r2;
+  c1= cmplx(1.0, rk);
+  c2=3.0* c1- rk2;
+  c3= cmplx(6.0, rk)* rk2-15.0* c1;
+  gz= cmplx( cos( rk),- sin( rk))/ r;
+  *g2= gz*(1.0+ t1* c2);
+  *g1= *g2- t2* c1* gz;
+  gz= gz/ r2;
+  *g2p= gz*( t1* c3- c1);
+  *gzp= t2* c2* gz;
+  *g3= *g2p+ *gzp;
+  *g1p= *g3* zz;
+
+  if( ira != 1)
+  {
+	*g3=( *g3+ *gzp)* rh;
+	*gzp= -zz* c1* gz;
+
+	if( rh <= 1.0e-10)
+	{
+	  *g2=0.0;
+	  *g2p=0.0;
+	  return;
+	}
+
+	*g2= *g2/ rh;
+	*g2p= *g2p* zz/ rh;
+	return;
+
+  } /* if( ira != 1) */
+
+  t2=.5* a;
+  *g2= -t2* c1* gz;
+  *g2p= t2* gz* c2/ r2;
+  *g3= rh2* *g2p- a* gz* c1;
+  *g2p= *g2p* zz;
+  *gzp= -zz* c1* gz;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute e field of sine, cosine, and constant current */
+/* filaments by extended thin wire approximation. */
+  static void
+ekscx( double bx, double s, double z,
+	double rhx, double xk, int ij, int inx1,
+	int inx2, complex double *ezs, complex double *ers,
+	complex double *ezc, complex double *erc,
+	complex double *ezk, complex double *erk )
+{
+  int ira;
+  double b, rh, sh, rhk, shk, ss, cs, z1a;
+  double z2a, a2, bk, bk2, cint, sint;
+  complex double gz1, gz2, gzp1, gzp2, gr1, gr2;
+  complex double grp1, grp2, grk1, grk2, gzz1, gzz2;
+
+  if( rhx >= bx)
+  {
+	rh= rhx;
+	b= bx;
+	ira=0;
+  }
+  else
+  {
+	rh= bx;
+	b= rhx;
+	ira=1;
+  }
+
+  sh=.5* s;
+  tmi.ij= ij;
+  tmi.zpk= xk* z;
+  rhk= xk* rh;
+  tmi.rkb2= rhk* rhk;
+  shk= xk* sh;
+  ss= sin( shk);
+  cs= cos( shk);
+  z2a= sh- z;
+  z1a=-( sh+ z);
+  a2= b* b;
+
+  if( inx1 != 2)
+	gxx( z1a, rh, b, a2, xk, ira, &gz1,
+		&gzp1, &gr1, &grp1, &grk1, &gzz1);
+  else
+  {
+	gx( z1a, rhx, xk, &gz1, &grk1);
+	gzp1= grk1* z1a;
+	gr1= gz1/ rhx;
+	grp1= gzp1/ rhx;
+	grk1= grk1* rhx;
+	gzz1= CPLX_00;
+  }
+
+  if( inx2 != 2)
+	gxx( z2a, rh, b, a2, xk, ira, &gz2,
+		&gzp2, &gr2, &grp2, &grk2, &gzz2);
+  else
+  {
+	gx( z2a, rhx, xk, &gz2, &grk2);
+	gzp2= grk2* z2a;
+	gr2= gz2/ rhx;
+	grp2= gzp2/ rhx;
+	grk2= grk2* rhx;
+	gzz2= CPLX_00;
+  }
+
+  *ezs= CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
+  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
+  *ers= -CONST1*(( z2a* grp2+ z1a* grp1+ gr2+ gr1)*ss
+	  -( z2a* gr2- z1a* gr1)* cs* xk);
+  *erc= -CONST1*(( z2a* grp2- z1a* grp1+ gr2- gr1)*cs
+	  +( z2a* gr2+ z1a* gr1)* ss* xk);
+  *erk= CONST1*( grk2- grk1);
+  intx(- shk, shk, rhk, ij, &cint, &sint);
+  bk= b* xk;
+  bk2= bk* bk*.25;
+  *ezk= -CONST1*( gzp2- gzp1+ xk* xk*(1.0- bk2)*
+	  cmplx( cint,- sint)-bk2*( gzz2- gzz1));
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
 /* compute near e fields of a segment with sine, cosine, and */
 /* constant currents.  ground effect included. */
-void efld( double xi, double yi,
+  void
+efld( double xi, double yi,
 	double zi, double ai, int ij )
 {
-  #define	txk	egnd[0]
-  #define	tyk	egnd[1]
-  #define	tzk	egnd[2]
-  #define	txs	egnd[3]
-  #define	tys	egnd[4]
-  #define	tzs	egnd[5]
-  #define	txc	egnd[6]
-  #define	tyc	egnd[7]
-  #define	tzc	egnd[8]
+#define	txk	egnd[0]
+#define	tyk	egnd[1]
+#define	tzk	egnd[2]
+#define	txs	egnd[3]
+#define	tys	egnd[4]
+#define	tzs	egnd[5]
+#define	txc	egnd[6]
+#define	tyc	egnd[7]
+#define	tzc	egnd[8]
 
   int ip, ijx;
   double xij, yij, rfl, salpr, zij, zp, rhox;
   double rhoy, rhoz, rh, r, rmag, cth, px, py;
-  double xymag, xspec, yspec, rhospc, dmin;
-  complex double epx, epy, refs, refps, zrsin, zratx, zscrn;
-  complex double tezs, ters, tezc=0.0, terc=0.0, tezk=0.0, terk=0.0;
+  double xymag, xspec = 0.0, yspec = 0.0, rhospc = 0.0, dmin;
+  complex double epx, epy, refs, refps, zrsin, zratx = 0.0, zscrn = 0.0;
+  complex double tezs, ters, tezc = 0.0, terc = 0.0, tezk = 0.0, terk = 0.0;
   static complex double *egnd = NULL;
 
   size_t mreq = 9 * sizeof(complex double);
@@ -113,16 +308,16 @@ void efld( double xi, double yi,
 	r= sqrt( zp* zp+ rh* rh);
 	if( r >= dataj.rkh)
 	{
-	  rmag= TWOPI* r;
+	  rmag= M_2PI* r;
 	  cth= zp/ r;
 	  px= rh/ r;
 	  txk= cmplx( cos( rmag),- sin( rmag));
-	  py= TWOPI* r* r;
+	  py= M_2PI* r* r;
 	  tyk= ETA* cth* txk* cmplx(1.0,-1.0/ rmag)/ py;
 	  tzk= ETA* px* txk* cmplx(1.0, rmag-1.0/ rmag)/(2.0* py);
 	  tezk= tyk* cth- tzk* px;
 	  terk= tyk* px+ tzk* cth;
-	  rmag= sin( PI* dataj.s)/ PI;
+	  rmag= sin( M_PI* dataj.s)/ M_PI;
 	  tezc= tezk* rmag;
 	  terc= terk* rmag;
 	  tezk= tezk* dataj.s;
@@ -137,10 +332,10 @@ void efld( double xi, double yi,
 	{
 	  /* eksc for thin wire approx. or ekscx for extended t.w. approx. */
 	  if( dataj.iexk != 1)
-	   eksc( dataj.s, zp, rh, TWOPI, ijx, &tezs, &ters,
+		eksc( dataj.s, zp, rh, M_2PI, ijx, &tezs, &ters,
 			&tezc, &terc, &tezk, &terk );
 	  else
-		ekscx( dataj.b, dataj.s, zp, rh, TWOPI, ijx, dataj.ind1,
+		ekscx( dataj.b, dataj.s, zp, rh, M_2PI, ijx, dataj.ind1,
 			dataj.ind2,	&tezs, &ters, &tezc, &terc, &tezk, &terk);
 
 	  txs= tezs* dataj.cabj+ ters* rhox;
@@ -177,14 +372,6 @@ void efld( double xi, double yi,
 			zratx=( zscrn* gnd.zrati)/( ETA* gnd.zrati+ zscrn);
 		  }
 		} /* if( gnd.nradl > 0) */
-		else
-		{
-		  xspec= 0.0;
-		  yspec= 0.0;
-		  rhospc= 0.0;
-		  zscrn= 0.0;
-		  zratx= 0.0;
-		}
 
 		/* calculation of reflection coefficients
 		 * when ground is specified. */
@@ -362,170 +549,39 @@ void efld( double xi, double yi,
 
 /*-----------------------------------------------------------------------*/
 
-/* compute e field of sine, cosine, and constant */
-/* current filaments by thin wire approximation. */
-void eksc( double s, double z, double rh,
-	double xk, int ij,	complex double *ezs,
-	complex double *ers, complex double *ezc,
-	complex double *erc, complex double *ezk,
-	complex double *erk )
+/* gf computes the integrand exp(jkr)/(kr) for numerical integration. */
+  void
+gf( double zk, double *co, double *si )
 {
-  double rhk, sh, shk, ss, cs, z1a, z2a, cint, sint;
-  complex double gz1, gz2, gp1, gp2, gzp1, gzp2;
+  double zdk, rk, rks;
 
-  tmi.ij= ij;
-  tmi.zpk= xk* z;
-  rhk= xk* rh;
-  tmi.rkb2= rhk* rhk;
-  sh=.5* s;
-  shk= xk* sh;
-  ss= sin( shk);
-  cs= cos( shk);
-  z2a= sh- z;
-  z1a=-( sh+ z);
-  gx( z1a, rh, xk, &gz1, &gp1);
-  gx( z2a, rh, xk, &gz2, &gp2);
-  gzp1= gp1* z1a;
-  gzp2= gp2* z2a;
-  *ezs=  CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
-  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
-  *erk= CONST1*( gp2- gp1)* rh;
-  intx(- shk, shk, rhk, ij, &cint, &sint);
-  *ezk= -CONST1*( gzp2- gzp1+ xk* xk* cmplx( cint,- sint));
-  gzp1= gzp1* z1a;
-  gzp2= gzp2* z2a;
+  zdk= zk- tmi.zpk;
+  rk= sqrt( tmi.rkb2+ zdk* zdk);
+  *si= sin( rk)/ rk;
 
-  if( rh >= 1.0e-10)
+  if( tmi.ij != 0 )
   {
-	*ers= -CONST1*(( gzp2+ gzp1+ gz2+ gz1)*
-		ss-( z2a* gz2- z1a* gz1)* cs*xk)/ rh;
-	*erc= -CONST1*(( gzp2- gzp1+ gz2- gz1)*
-		cs+( z2a* gz2+ z1a* gz1)* ss*xk)/ rh;
+	*co= cos( rk)/ rk;
 	return;
   }
 
-  *ers = CPLX_00;
-  *erc = CPLX_00;
+  if( rk >= .2)
+  {
+	*co=( cos( rk)-1.0)/ rk;
+	return;
+  }
+
+  rks= rk* rk;
+  *co=((-1.38888889e-3* rks+4.16666667e-2)* rks-.5)* rk;
 
   return;
 }
 
 /*-----------------------------------------------------------------------*/
 
-/* compute e field of sine, cosine, and constant current */
-/* filaments by extended thin wire approximation. */
-void ekscx( double bx, double s, double z,
-	double rhx, double xk, int ij, int inx1,
-	int inx2, complex double *ezs, complex double *ers,
-	complex double *ezc, complex double *erc,
-	complex double *ezk, complex double *erk )
-{
-  int ira;
-  double b, rh, sh, rhk, shk, ss, cs, z1a;
-  double z2a, a2, bk, bk2, cint, sint;
-  complex double gz1, gz2, gzp1, gzp2, gr1, gr2;
-  complex double grp1, grp2, grk1, grk2, gzz1, gzz2;
-
-  if( rhx >= bx)
-  {
-	rh= rhx;
-	b= bx;
-	ira=0;
-  }
-  else
-  {
-	rh= bx;
-	b= rhx;
-	ira=1;
-  }
-
-  sh=.5* s;
-  tmi.ij= ij;
-  tmi.zpk= xk* z;
-  rhk= xk* rh;
-  tmi.rkb2= rhk* rhk;
-  shk= xk* sh;
-  ss= sin( shk);
-  cs= cos( shk);
-  z2a= sh- z;
-  z1a=-( sh+ z);
-  a2= b* b;
-
-  if( inx1 != 2)
-	gxx( z1a, rh, b, a2, xk, ira, &gz1,
-		&gzp1, &gr1, &grp1, &grk1, &gzz1);
-  else
-  {
-	gx( z1a, rhx, xk, &gz1, &grk1);
-	gzp1= grk1* z1a;
-	gr1= gz1/ rhx;
-	grp1= gzp1/ rhx;
-	grk1= grk1* rhx;
-	gzz1= CPLX_00;
-  }
-
-  if( inx2 != 2)
-	gxx( z2a, rh, b, a2, xk, ira, &gz2,
-		&gzp2, &gr2, &grp2, &grk2, &gzz2);
-  else
-  {
-	gx( z2a, rhx, xk, &gz2, &grk2);
-	gzp2= grk2* z2a;
-	gr2= gz2/ rhx;
-	grp2= gzp2/ rhx;
-	grk2= grk2* rhx;
-	gzz2= CPLX_00;
-  }
-
-  *ezs= CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
-  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
-  *ers= -CONST1*(( z2a* grp2+ z1a* grp1+ gr2+ gr1)*ss
-	  -( z2a* gr2- z1a* gr1)* cs* xk);
-  *erc= -CONST1*(( z2a* grp2- z1a* grp1+ gr2- gr1)*cs
-	  +( z2a* gr2+ z1a* gr1)* ss* xk);
-  *erk= CONST1*( grk2- grk1);
-  intx(- shk, shk, rhk, ij, &cint, &sint);
-  bk= b* xk;
-  bk2= bk* bk*.25;
-  *ezk= -CONST1*( gzp2- gzp1+ xk* xk*(1.0- bk2)*
-	  cmplx( cint,- sint)-bk2*( gzz2- gzz1));
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
-/* gf computes the integrand exp(jkr)/(kr) for numerical integration. */
-void gf( double zk, double *co, double *si )
-{
-  double zdk, rk, rks;
-
-  zdk= zk- tmi.zpk;
-  rk= sqrt( tmi.rkb2+ zdk* zdk);
-  *si= sin( rk)/ rk;
-
-  if( tmi.ij != 0 )
-  {
-	*co= cos( rk)/ rk;
-	return;
-  }
-
-  if( rk >= .2l)
-  {
-	*co=( cos( rk)-1.0)/ rk;
-	return;
-  }
-
-  rks= rk* rk;
-  *co=((-1.38888889e-3* rks+4.16666667e-2)* rks-.5)* rk;
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
-/* integrand for h field of a wire */
-void gh( double zk, double *hr, double *hi)
+/* integrand for h field of a wire */
+  void
+gh( double zk, double *hr, double *hi)
 {
   double rs, r, ckr, skr, rr2, rr3;
 
@@ -548,7 +604,8 @@ void gh( double zk, double *hr, double *hi)
 /* current element over a ground plane using formulas of k.a. norton */
 /* (proc. ire, sept., 1937, pp.1203,1236) */
 
-void gwave( complex double *erv, complex double *ezv,
+  void
+gwave( complex double *erv, complex double *ezv,
 	complex double *erh, complex double *ezh,
 	complex double *eph )
 {
@@ -632,7 +689,8 @@ void gwave( complex double *erv, complex double *ezv,
 /*-----------------------------------------------------------------------*/
 
 /* segment end contributions for thin wire approx. */
-void gx( double zz, double rh, double xk,
+  void
+gx( double zz, double rh, double xk,
 	complex double *gz, complex double *gzp)
 {
   double r, r2, rkz;
@@ -648,60 +706,106 @@ void gx( double zz, double rh, double xk,
 
 /*-----------------------------------------------------------------------*/
 
-/* segment end contributions for ext. thin wire approx. */
-void gxx( double zz, double rh, double a,
-	double a2, double xk, int ira, complex double *g1,
-	complex double *g1p, complex double *g2,
-	complex double *g2p, complex double *g3,
-	complex double *gzp )
+/* hintg computes the h field of a patch current */
+  void
+hintg( double xi, double yi, double zi )
 {
-  double r, r2, r4, rk, rk2, rh2, t1, t2;
-  complex double  gz, c1, c2, c3;
+  int ip;
+  double rx, ry, rfl, xymag, pxx, pyy, cth;
+  double rz, rsq, r, rk, cr, sr, t1zr, t2zr;
+  complex double  gam, f1x, f1y, f1z, f2x, f2y, f2z, rrv, rrh;
 
-  r2= zz* zz+ rh* rh;
-  r= sqrt( r2);
-  r4= r2* r2;
-  rk= xk* r;
-  rk2= rk* rk;
-  rh2= rh* rh;
-  t1=.25* a2* rh2/ r4;
-  t2=.5* a2/ r2;
-  c1= cmplx(1.0, rk);
-  c2=3.0* c1- rk2;
-  c3= cmplx(6.0, rk)* rk2-15.0* c1;
-  gz= cmplx( cos( rk),- sin( rk))/ r;
-  *g2= gz*(1.0+ t1* c2);
-  *g1= *g2- t2* c1* gz;
-  gz= gz/ r2;
-  *g2p= gz*( t1* c3- c1);
-  *gzp= t2* c2* gz;
-  *g3= *g2p+ *gzp;
-  *g1p= *g3* zz;
+  rx= xi- dataj.xj;
+  ry= yi- dataj.yj;
+  rfl=-1.0;
+  dataj.exk=CPLX_00;
+  dataj.eyk=CPLX_00;
+  dataj.ezk=CPLX_00;
+  dataj.exs=CPLX_00;
+  dataj.eys=CPLX_00;
+  dataj.ezs=CPLX_00;
 
-  if( ira != 1)
+  for( ip = 1; ip <= gnd.ksymp; ip++ )
   {
-	*g3=( *g3+ *gzp)* rh;
-	*gzp= -zz* c1* gz;
+	rfl= -rfl;
+	rz= zi- dataj.zj* rfl;
+	rsq= rx* rx+ ry* ry+ rz* rz;
 
-	if( rh <= 1.0e-10)
+	if( rsq < 1.0e-20)
+	  continue;
+
+	r = sqrt( rsq );
+	rk= M_2PI* r;
+	cr= cos( rk);
+	sr= sin( rk);
+	gam=-( cmplx(cr,-sr)+rk*cmplx(sr,cr) )/( FPI*rsq*r )* dataj.s;
+	dataj.exc= gam* rx;
+	dataj.eyc= gam* ry;
+	dataj.ezc= gam* rz;
+	t1zr= dataj.t1zj* rfl;
+	t2zr= dataj.t2zj* rfl;
+	f1x= dataj.eyc* t1zr- dataj.ezc* dataj.t1yj;
+	f1y= dataj.ezc* dataj.t1xj- dataj.exc* t1zr;
+	f1z= dataj.exc* dataj.t1yj- dataj.eyc* dataj.t1xj;
+	f2x= dataj.eyc* t2zr- dataj.ezc* dataj.t2yj;
+	f2y= dataj.ezc* dataj.t2xj- dataj.exc* t2zr;
+	f2z= dataj.exc* dataj.t2yj- dataj.eyc* dataj.t2xj;
+
+	if( ip != 1)
 	{
-	  *g2=0.0;
-	  *g2p=0.0;
-	  return;
-	}
+	  if( gnd.iperf == 1)
+	  {
+		f1x= -f1x;
+		f1y= -f1y;
+		f1z= -f1z;
+		f2x= -f2x;
+		f2y= -f2y;
+		f2z= -f2z;
+	  }
+	  else
+	  {
+		xymag= sqrt( rx* rx+ ry* ry);
+		if( xymag <= 1.0e-6)
+		{
+		  pxx=0.0;
+		  pyy=0.0;
+		  cth=1.0;
+		  rrv=CPLX_10;
+		}
+		else
+		{
+		  pxx= -ry/ xymag;
+		  pyy= rx/ xymag;
+		  cth= rz/ r;
+		  rrv= csqrt(1.0- gnd.zrati* gnd.zrati*(1.0- cth* cth));
 
-	*g2= *g2/ rh;
-	*g2p= *g2p* zz/ rh;
-	return;
+		} /* if( xymag <= 1.0e-6) */
 
-  } /* if( ira != 1) */
+		rrh= gnd.zrati* cth;
+		rrh=( rrh- rrv)/( rrh+ rrv);
+		rrv= gnd.zrati* rrv;
+		rrv=-( cth- rrv)/( cth+ rrv);
+		gam=( f1x* pxx+ f1y* pyy)*( rrv- rrh);
+		f1x= f1x* rrh+ gam* pxx;
+		f1y= f1y* rrh+ gam* pyy;
+		f1z= f1z* rrh;
+		gam=( f2x* pxx+ f2y* pyy)*( rrv- rrh);
+		f2x= f2x* rrh+ gam* pxx;
+		f2y= f2y* rrh+ gam* pyy;
+		f2z= f2z* rrh;
 
-  t2=.5* a;
-  *g2= -t2* c1* gz;
-  *g2p= t2* gz* c2/ r2;
-  *g3= rh2* *g2p- a* gz* c1;
-  *g2p= *g2p* zz;
-  *gzp= -zz* c1* gz;
+	  } /* if( gnd.iperf == 1) */
+
+	} /* if( ip != 1) */
+
+	dataj.exk += f1x;
+	dataj.eyk += f1y;
+	dataj.ezk += f1z;
+	dataj.exs += f2x;
+	dataj.eys += f2y;
+	dataj.ezs += f2z;
+
+  } /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
 
   return;
 }
@@ -710,7 +814,8 @@ void gxx( double zz, double rh, double a,
 
 /* hfk computes the h field of a uniform current */
 /* filament by numerical integration */
-void hfk( double el1, double el2, double rhk,
+  static void
+hfk( double el1, double el2, double rhk,
 	double zpkx, double *sgr, double *sgi )
 {
   int nx = 1, nma = 65536, nts = 4;
@@ -861,105 +966,78 @@ void hfk( double el1, double el2, double rhk,
 
 /*-----------------------------------------------------------------------*/
 
-/* hintg computes the h field of a patch current */
-void hintg( double xi, double yi, double zi )
+/* calculates h field of sine cosine, and constant current of segment */
+  static void
+hsflx( double s, double rh, double zpx,
+	complex double *hpk, complex double *hps,
+	complex double *hpc )
 {
-  int ip;
-  double rx, ry, rfl, xymag, pxx, pyy, cth;
-  double rz, rsq, r, rk, cr, sr, t1zr, t2zr;
-  complex double  gam, f1x, f1y, f1z, f2x, f2y, f2z, rrv, rrh;
-
-  rx= xi- dataj.xj;
-  ry= yi- dataj.yj;
-  rfl=-1.0;
-  dataj.exk=CPLX_00;
-  dataj.eyk=CPLX_00;
-  dataj.ezk=CPLX_00;
-  dataj.exs=CPLX_00;
-  dataj.eys=CPLX_00;
-  dataj.ezs=CPLX_00;
+  complex double fjk, ekr1, ekr2, t1, t2, cons;
 
-  for( ip = 1; ip <= gnd.ksymp; ip++ )
+  fjk = -TPJ;
+  if( rh >= 1.0e-10)
   {
-	rfl= -rfl;
-	rz= zi- dataj.zj* rfl;
-	rsq= rx* rx+ ry* ry+ rz* rz;
+	double zp, z2a, hss, dh, z1;
+	double rhz, dk, cdk, sdk, hkr, hki;
 
-	if( rsq < 1.0e-20)
-	  continue;
+	if( zpx >= 0.0)
+	{
+	  zp= zpx;
+	  hss=1.0;
+	}
+	else
+	{
+	  zp= -zpx;
+	  hss=-1.0;
+	}
 
-	r = sqrt( rsq );
-	rk= TWOPI* r;
-	cr= cos( rk);
-	sr= sin( rk);
-	gam=-( cmplx(cr,-sr)+rk*cmplx(sr,cr) )/( FPI*rsq*r )* dataj.s;
-	dataj.exc= gam* rx;
-	dataj.eyc= gam* ry;
-	dataj.ezc= gam* rz;
-	t1zr= dataj.t1zj* rfl;
-	t2zr= dataj.t2zj* rfl;
-	f1x= dataj.eyc* t1zr- dataj.ezc* dataj.t1yj;
-	f1y= dataj.ezc* dataj.t1xj- dataj.exc* t1zr;
-	f1z= dataj.exc* dataj.t1yj- dataj.eyc* dataj.t1xj;
-	f2x= dataj.eyc* t2zr- dataj.ezc* dataj.t2yj;
-	f2y= dataj.ezc* dataj.t2xj- dataj.exc* t2zr;
-	f2z= dataj.exc* dataj.t2yj- dataj.eyc* dataj.t2xj;
+	dh=.5* s;
+	z1= zp+ dh;
+	z2a= zp- dh;
+	if( z2a >= 1.0e-7)
+	  rhz= rh/ z2a;
+	else
+	  rhz=1.0;
 
-	if( ip != 1)
-	{
-	  if( gnd.iperf == 1)
-	  {
-		f1x= -f1x;
-		f1y= -f1y;
-		f1z= -f1z;
-		f2x= -f2x;
-		f2y= -f2y;
-		f2z= -f2z;
-	  }
-	  else
-	  {
-		xymag= sqrt( rx* rx+ ry* ry);
-		if( xymag <= 1.0e-6)
-		{
-		  pxx=0.0;
-		  pyy=0.0;
-		  cth=1.0;
-		  rrv=CPLX_10;
-		}
-		else
-		{
-		  pxx= -ry/ xymag;
-		  pyy= rx/ xymag;
-		  cth= rz/ r;
-		  rrv= csqrt(1.0- gnd.zrati* gnd.zrati*(1.0- cth* cth));
+	dk= M_2PI* dh;
+	cdk= cos( dk);
+	sdk= sin( dk);
+	hfk(- dk, dk, rh* M_2PI, zp* M_2PI, &hkr, &hki);
+	*hpk= cmplx( hkr, hki);
 
-		} /* if( xymag <= 1.0e-6) */
+	if( rhz >= 1.0e-3)
+	{
+	  double rh2, r1, r2;
 
-		rrh= gnd.zrati* cth;
-		rrh=( rrh- rrv)/( rrh+ rrv);
-		rrv= gnd.zrati* rrv;
-		rrv=-( cth- rrv)/( cth+ rrv);
-		gam=( f1x* pxx+ f1y* pyy)*( rrv- rrh);
-		f1x= f1x* rrh+ gam* pxx;
-		f1y= f1y* rrh+ gam* pyy;
-		f1z= f1z* rrh;
-		gam=( f2x* pxx+ f2y* pyy)*( rrv- rrh);
-		f2x= f2x* rrh+ gam* pxx;
-		f2y= f2y* rrh+ gam* pyy;
-		f2z= f2z* rrh;
+	  rh2= rh* rh;
+	  r1= sqrt( rh2+ z1* z1);
+	  r2= sqrt( rh2+ z2a* z2a);
+	  ekr1= cexp( fjk* r1);
+	  ekr2= cexp( fjk* r2);
+	  t1= z1* ekr1/ r1;
+	  t2= z2a* ekr2/ r2;
+	  *hps=( cdk*( ekr2- ekr1)- CPLX_01* sdk*( t2+ t1))* hss;
+	  *hpc= -sdk*( ekr2+ ekr1)- CPLX_01* cdk*( t2- t1);
+	  cons= -CPLX_01/(2.0* M_2PI* rh);
+	  *hps= cons* *hps;
+	  *hpc= cons* *hpc;
+	  return;
 
-	  } /* if( gnd.iperf == 1) */
+	} /* if( rhz >= 1.0e-3) */
 
-	} /* if( ip != 1) */
+	ekr1= cmplx( cdk, sdk)/( z2a* z2a);
+	ekr2= cmplx( cdk,- sdk)/( z1* z1);
+	t1= M_2PI*(1.0/ z1-1.0/ z2a);
+	t2= cexp( fjk* zp)* rh/PI8;
+	*hps= t2*( t1+( ekr1+ ekr2)* sdk)* hss;
+	*hpc= t2*(- CPLX_01* t1+( ekr1- ekr2)* cdk);
+	return;
 
-	dataj.exk += f1x;
-	dataj.eyk += f1y;
-	dataj.ezk += f1z;
-	dataj.exs += f2x;
-	dataj.eys += f2y;
-	dataj.ezs += f2z;
+  } /* if( rh >= 1.0e-10) */
 
-  } /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
+  *hps=CPLX_00;
+  *hpc=CPLX_00;
+  *hpk=CPLX_00;
 
   return;
 }
@@ -968,14 +1046,15 @@ void hintg( double xi, double yi, double zi )
 
 /* hsfld computes the h field for constant, sine, and */
 /* cosine current on a segment including ground effects. */
-void hsfld( double xi, double yi,
+  void
+hsfld( double xi, double yi,
 	double zi, double ai )
 {
   int ip;
   double xij, yij, rfl, salpr, zij, zp, rhox;
-  double rhoy, rhoz, rh, phx, phy, phz, rmag;
-  double xymag, xspec, yspec, rhospc, px, py, cth;
-  complex double hpk, hps, hpc, qx, qy, qz, rrv, rrh, zratx;
+  double xymag, rhoy, rhoz, rh, phx, phy, phz, rmag;
+  double xspec = 0.0, yspec = 0.0, rhospc = 0.0, px, py, cth;
+  complex double hpk, hps, hpc, qx, qy, qz, rrv = 0.0, rrh, zratx = 0.0;
 
   xij= xi- dataj.xj;
   yij= yi- dataj.yj;
@@ -1074,14 +1153,6 @@ void hsfld( double xi, double yi,
 		continue;
 
 	  } /* if( gnd.iperf != 1 ) */
-	  else
-	  {
-		xspec= 0.0;
-		yspec= 0.0;
-		rhospc= 0.0;
-		rrv= 0.0;
-		zratx= 0.0;
-	  }
 
 	  dataj.exk= dataj.exk- hpk* phx;
 	  dataj.eyk= dataj.eyk- hpk* phy;
@@ -1113,86 +1184,10 @@ void hsfld( double xi, double yi,
 
 /*-----------------------------------------------------------------------*/
 
-/* calculates h field of sine cosine, and constant current of segment */
-void hsflx( double s, double rh, double zpx,
-	complex double *hpk, complex double *hps,
-	complex double *hpc )
-{
-  complex double fjk, ekr1, ekr2, t1, t2, cons;
-
-  fjk = -TPJ;
-  if( rh >= 1.0e-10)
-  {
-	double zp, z2a, hss, dh, z1;
-	double rhz, dk, cdk, sdk, hkr, hki;
-
-	if( zpx >= 0.0)
-	{
-	  zp= zpx;
-	  hss=1.0;
-	}
-	else
-	{
-	  zp= -zpx;
-	  hss=-1.0;
-	}
-
-	dh=.5* s;
-	z1= zp+ dh;
-	z2a= zp- dh;
-	if( z2a >= 1.0e-7)
-	  rhz= rh/ z2a;
-	else
-	  rhz=1.0;
-
-	dk= TWOPI* dh;
-	cdk= cos( dk);
-	sdk= sin( dk);
-	hfk(- dk, dk, rh* TWOPI, zp* TWOPI, &hkr, &hki);
-	*hpk= cmplx( hkr, hki);
-
-	if( rhz >= 1.0e-3)
-	{
-	  double rh2, r1, r2;
-
-	  rh2= rh* rh;
-	  r1= sqrt( rh2+ z1* z1);
-	  r2= sqrt( rh2+ z2a* z2a);
-	  ekr1= cexp( fjk* r1);
-	  ekr2= cexp( fjk* r2);
-	  t1= z1* ekr1/ r1;
-	  t2= z2a* ekr2/ r2;
-	  *hps=( cdk*( ekr2- ekr1)- CPLX_01* sdk*( t2+ t1))* hss;
-	  *hpc= -sdk*( ekr2+ ekr1)- CPLX_01* cdk*( t2- t1);
-	  cons= -CPLX_01/(2.0* TWOPI* rh);
-	  *hps= cons* *hps;
-	  *hpc= cons* *hpc;
-	  return;
-
-	} /* if( rhz >= 1.0e-3) */
-
-	ekr1= cmplx( cdk, sdk)/( z2a* z2a);
-	ekr2= cmplx( cdk,- sdk)/( z1* z1);
-	t1= TWOPI*(1.0/ z1-1.0/ z2a);
-	t2= cexp( fjk* zp)* rh/PI8;
-	*hps= t2*( t1+( ekr1+ ekr2)* sdk)* hss;
-	*hpc= t2*(- CPLX_01* t1+( ekr1- ekr2)* cdk);
-	return;
-
-  } /* if( rh >= 1.0e-10) */
-
-  *hps=CPLX_00;
-  *hpc=CPLX_00;
-  *hpk=CPLX_00;
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* nefld computes the near field at specified points in space after */
 /* the structure currents have been computed. */
-void nefld( double xob, double yob,
+  static void
+nefld( double xob, double yob,
 	double zob, complex double *ex,
 	complex double *ey, complex double *ez )
 {
@@ -1364,45 +1359,247 @@ void nefld( double xob, double yob,
 	if( data.m == 0)
 	  return;
 
-  } /* if( n != 0) */
+  } /* if( n != 0) */
+
+  jc= data.n-1;
+  for( i = 0; i < data.m; i++ )
+  {
+	dataj.s= data.pbi[i];
+	dataj.xj= data.px[i];
+	dataj.yj= data.py[i];
+	dataj.zj= data.pz[i];
+	dataj.t1xj= data.t1x[i];
+	dataj.t1yj= data.t1y[i];
+	dataj.t1zj= data.t1z[i];
+	dataj.t2xj= data.t2x[i];
+	dataj.t2yj= data.t2y[i];
+	dataj.t2zj= data.t2z[i];
+	jc += 3;
+	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
+	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
+	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
+	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
+
+	for( ipa = 0; ipa < gnd.ksymp; ipa++ )
+	{
+	  dataj.ipgnd= ipa+1;
+	  unere( xob, yob, zob);
+	  *ex= *ex+ acx* dataj.exk+ bcx* dataj.exs;
+	  *ey= *ey+ acx* dataj.eyk+ bcx* dataj.eys;
+	  *ez= *ez+ acx* dataj.ezk+ bcx* dataj.ezs;
+	}
+
+  } /* for( i = 0; i < m; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* nhfld computes the near field at specified points in space after */
+/* the structure currents have been computed. */
+
+  static void
+nhfld( double xob, double yob,
+	double zob, complex double *hx,
+	complex double *hy, complex double *hz )
+{
+  int i, jc;
+  double ax, zp;
+  complex double acx, bcx, ccx;
+
+  *hx=CPLX_00;
+  *hy=CPLX_00;
+  *hz=CPLX_00;
+  ax=0.0;
+
+  if( data.n != 0)
+  {
+	for( i = 0; i < data.n; i++ )
+	{
+	  dataj.xj= xob- data.x[i];
+	  dataj.yj= yob- data.y[i];
+	  dataj.zj= zob- data.z[i];
+	  zp= data.cab[i]* dataj.xj+ data.sab[i] *
+		dataj.yj+ data.salp[i]* dataj.zj;
+
+	  if( fabs( zp) > 0.5001* data.si[i])
+		continue;
+
+	  zp= dataj.xj* dataj.xj+ dataj.yj* dataj.yj +
+		dataj.zj* dataj.zj- zp* zp;
+	  dataj.xj= data.bi[i];
+
+	  if( zp > 0.9* dataj.xj* dataj.xj)
+		continue;
+
+	  ax= dataj.xj;
+	  break;
+	}
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  dataj.s= data.si[i];
+	  dataj.b= data.bi[i];
+	  dataj.xj= data.x[i];
+	  dataj.yj= data.y[i];
+	  dataj.zj= data.z[i];
+	  dataj.cabj= data.cab[i];
+	  dataj.sabj= data.sab[i];
+	  dataj.salpj= data.salp[i];
+	  hsfld( xob, yob, zob, ax);
+	  acx= cmplx( crnt.air[i], crnt.aii[i]);
+	  bcx= cmplx( crnt.bir[i], crnt.bii[i]);
+	  ccx= cmplx( crnt.cir[i], crnt.cii[i]);
+	  *hx += dataj.exk* acx+ dataj.exs* bcx+ dataj.exc* ccx;
+	  *hy += dataj.eyk* acx+ dataj.eys* bcx+ dataj.eyc* ccx;
+	  *hz += dataj.ezk* acx+ dataj.ezs* bcx+ dataj.ezc* ccx;
+	}
+
+	if( data.m == 0)
+	  return;
+
+  } /* if( data.n != 0) */
+
+  jc= data.n-1;
+  for( i = 0; i < data.m; i++ )
+  {
+	dataj.s= data.pbi[i];
+	dataj.xj= data.px[i];
+	dataj.yj= data.py[i];
+	dataj.zj= data.pz[i];
+	dataj.t1xj= data.t1x[i];
+	dataj.t1yj= data.t1y[i];
+	dataj.t1zj= data.t1z[i];
+	dataj.t2xj= data.t2x[i];
+	dataj.t2yj= data.t2y[i];
+	dataj.t2zj= data.t2z[i];
+	hintg( xob, yob, zob);
+	jc += 3;
+	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
+	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
+	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
+	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
+	*hx= *hx+ acx* dataj.exk+ bcx* dataj.exs;
+	*hy= *hy+ acx* dataj.eyk+ bcx* dataj.eys;
+	*hz= *hz+ acx* dataj.ezk+ bcx* dataj.ezs;
+  }
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Near_Field_Total()
+ *
+ * Calculates the value of Total Near Field vector
+ */
+  static void
+Near_Field_Total(
+	complex double ex,
+	complex double ey,
+	complex double ez,
+	int nfeh, int idx )
+{
+  /* Display a time-frozen "snapshot" of near field */
+  if( isFlagSet(NEAREH_SNAPSHOT) )
+  {
+	if( nfeh == 1 ) /* Magnetic field */
+	{
+	  /* Near magnetic field components */
+	  near_field.hrx[idx] = (double)creal(ex);
+	  near_field.hry[idx] = (double)creal(ey);
+	  near_field.hrz[idx] = (double)creal(ez);
+
+	  /* Near total magnetic field vector*/
+	  near_field.hr[idx]  = sqrt(
+		  near_field.hrx[idx] * near_field.hrx[idx] +
+		  near_field.hry[idx] * near_field.hry[idx] +
+		  near_field.hrz[idx] * near_field.hrz[idx] );
+	  if( near_field.max_hr < near_field.hr[idx] )
+		near_field.max_hr = near_field.hr[idx];
+	}
+	else /* Electric field */
+	{
+	  /* Near electric field components */
+	  /* Near electric field components */
+	  near_field.erx[idx] = (double)creal(ex);
+	  near_field.ery[idx] = (double)creal(ey);
+	  near_field.erz[idx] = (double)creal(ez);
+
+	  /* Near total electric field vector */
+	  near_field.er[idx]  = sqrt(
+		  near_field.erx[idx] * near_field.erx[idx] +
+		  near_field.ery[idx] * near_field.ery[idx] +
+		  near_field.erz[idx] * near_field.erz[idx] );
+	  if( near_field.max_er < near_field.er[idx] )
+		near_field.max_er = near_field.er[idx];
+	} /* if( nfeh == 1 ) */
+
+  } /* if( isFlagSet(NEAREH_SNAPSHOT) ) */
+  else /* Display Total near field vector peak */
+  {
+	double
+	  exm, eym, ezm,	/* Near field magnitude in x, y, z    */
+	  exm2, eym2, ezm2,	/* Near field magnitude^2 in x, y, z  */
+	  fx, fy, fz,		/* Time phase of near field vectors   */
+	  fx2, fy2, fz2,	/* Time phase of near field vectors*2 */
+	  cp, sp, tp, wt;	/* Some values needed in calculations */
+
+	exm = (double)cabs(ex);
+	eym = (double)cabs(ey);
+	ezm = (double)cabs(ez);
+	/* Near total electric field vector */
+	fx  = (double)cang(ex)/(double)TODEG;
+	fy  = (double)cang(ey)/(double)TODEG;
+	fz  = (double)cang(ez)/(double)TODEG;
+
+	fx2 = fx * 2.0;
+	fy2 = fy * 2.0;
+	fz2 = fz * 2.0;
+
+	exm2 = exm*exm;
+	eym2 = eym*eym;
+	ezm2 = ezm*ezm;
 
-  jc= data.n-1;
-  for( i = 0; i < data.m; i++ )
-  {
-	dataj.s= data.pbi[i];
-	dataj.xj= data.px[i];
-	dataj.yj= data.py[i];
-	dataj.zj= data.pz[i];
-	dataj.t1xj= data.t1x[i];
-	dataj.t1yj= data.t1y[i];
-	dataj.t1zj= data.t1z[i];
-	dataj.t2xj= data.t2x[i];
-	dataj.t2yj= data.t2y[i];
-	dataj.t2zj= data.t2z[i];
-	jc += 3;
-	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
-	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
-	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
-	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
+	cp = exm2*cos(fx2) + eym2*cos(fy2) + ezm2*cos(fz2);
+	sp = exm2*sin(fx2) + eym2*sin(fy2) + ezm2*sin(fz2);
+	tp = sqrt(cp*cp + sp*sp);
+	wt = atan2(-sp, cp)/2.0;
 
-	for( ipa = 0; ipa < gnd.ksymp; ipa++ )
+	if( nfeh == 1 ) /* Magnetic field */
 	{
-	  dataj.ipgnd= ipa+1;
-	  unere( xob, yob, zob);
-	  *ex= *ex+ acx* dataj.exk+ bcx* dataj.exs;
-	  *ey= *ey+ acx* dataj.eyk+ bcx* dataj.eys;
-	  *ez= *ez+ acx* dataj.ezk+ bcx* dataj.ezs;
+	  /* Near magnetic field components */
+	  near_field.hrx[idx] = exm * cos(wt + fx);
+	  near_field.hry[idx] = eym * cos(wt + fy);
+	  near_field.hrz[idx] = ezm * cos(wt + fz);
+
+	  /* Near total magnetic field vector, peak value */
+	  near_field.hr[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
+	  if( near_field.max_hr < near_field.hr[idx] )
+		near_field.max_hr = near_field.hr[idx];
 	}
+	else /* Electric field */
+	{
+	  /* Near electric field components */
+	  near_field.erx[idx] = exm * cos(wt + fx);
+	  near_field.ery[idx] = eym * cos(wt + fy);
+	  near_field.erz[idx] = ezm * cos(wt + fz);
 
-  } /* for( i = 0; i < m; i++ ) */
+	  /* Near total electric field vector, peak value */
+	  near_field.er[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
+	  if( near_field.max_er < near_field.er[idx] )
+		near_field.max_er = near_field.er[idx];
+	}
+  }
 
-  return;
-}
+} /* Near_Field_Total() */
 
 /*-----------------------------------------------------------------------*/
 
 /* compute near e or h fields over a range of points */
-void nfpat( int nfeh )
+  void
+nfpat( int nfeh )
 {
   int i, j, kk, idx;
   double znrt, cth=0.0, sth=0.0, ynrt, cph=0.0, sph=0.0, yob;
@@ -1527,101 +1724,9 @@ void nfpat( int nfeh )
 
 /*-----------------------------------------------------------------------*/
 
-/* nhfld computes the near field at specified points in space after */
-/* the structure currents have been computed. */
-
-void nhfld( double xob, double yob,
-	double zob, complex double *hx,
-	complex double *hy, complex double *hz )
-{
-  int i, jc;
-  double ax, zp;
-  complex double acx, bcx, ccx;
-
-  *hx=CPLX_00;
-  *hy=CPLX_00;
-  *hz=CPLX_00;
-  ax=0.0;
-
-  if( data.n != 0)
-  {
-	for( i = 0; i < data.n; i++ )
-	{
-	  dataj.xj= xob- data.x[i];
-	  dataj.yj= yob- data.y[i];
-	  dataj.zj= zob- data.z[i];
-	  zp= data.cab[i]* dataj.xj+ data.sab[i] *
-		dataj.yj+ data.salp[i]* dataj.zj;
-
-	  if( fabs( zp) > 0.5001* data.si[i])
-		continue;
-
-	  zp= dataj.xj* dataj.xj+ dataj.yj* dataj.yj +
-		dataj.zj* dataj.zj- zp* zp;
-	  dataj.xj= data.bi[i];
-
-	  if( zp > 0.9* dataj.xj* dataj.xj)
-		continue;
-
-	  ax= dataj.xj;
-	  break;
-	}
-
-	for( i = 0; i < data.n; i++ )
-	{
-	  dataj.s= data.si[i];
-	  dataj.b= data.bi[i];
-	  dataj.xj= data.x[i];
-	  dataj.yj= data.y[i];
-	  dataj.zj= data.z[i];
-	  dataj.cabj= data.cab[i];
-	  dataj.sabj= data.sab[i];
-	  dataj.salpj= data.salp[i];
-	  hsfld( xob, yob, zob, ax);
-	  acx= cmplx( crnt.air[i], crnt.aii[i]);
-	  bcx= cmplx( crnt.bir[i], crnt.bii[i]);
-	  ccx= cmplx( crnt.cir[i], crnt.cii[i]);
-	  *hx += dataj.exk* acx+ dataj.exs* bcx+ dataj.exc* ccx;
-	  *hy += dataj.eyk* acx+ dataj.eys* bcx+ dataj.eyc* ccx;
-	  *hz += dataj.ezk* acx+ dataj.ezs* bcx+ dataj.ezc* ccx;
-	}
-
-	if( data.m == 0)
-	  return;
-
-  } /* if( data.n != 0) */
-
-  jc= data.n-1;
-  for( i = 0; i < data.m; i++ )
-  {
-	dataj.s= data.pbi[i];
-	dataj.xj= data.px[i];
-	dataj.yj= data.py[i];
-	dataj.zj= data.pz[i];
-	dataj.t1xj= data.t1x[i];
-	dataj.t1yj= data.t1y[i];
-	dataj.t1zj= data.t1z[i];
-	dataj.t2xj= data.t2x[i];
-	dataj.t2yj= data.t2y[i];
-	dataj.t2zj= data.t2z[i];
-	hintg( xob, yob, zob);
-	jc += 3;
-	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
-	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
-	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
-	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
-	*hx= *hx+ acx* dataj.exk+ bcx* dataj.exs;
-	*hy= *hy+ acx* dataj.eyk+ bcx* dataj.eys;
-	*hz= *hz+ acx* dataj.ezk+ bcx* dataj.ezs;
-  }
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* integrate over patches at wire connection point */
-void pcint( double xi, double yi, double zi,
+  void
+pcint( double xi, double yi, double zi,
 	double cabi, double sabi, double salpi,
 	complex double *e )
 {
@@ -1635,7 +1740,7 @@ void pcint( double xi, double yi, double zi,
   ds=4.0* d/ (double) nint;
   da= ds* ds;
   gcon=1.0/ dataj.s;
-  fcon=1.0/(2.0* TWOPI* d);
+  fcon=1.0/(2.0* M_2PI* d);
   xxj= dataj.xj;
   xyj= dataj.yj;
   xzj= dataj.zj;
@@ -1683,7 +1788,7 @@ void pcint( double xi, double yi, double zi,
 	  g2=( d- s1)*( d+ s2)* gcon;
 	  g3=( d- s1)*( d- s2)* gcon;
 	  g4=( d+ s1)*( d- s2)* gcon;
-	  f2=( s1* s1+ s2* s2)* TWOPI;
+	  f2=( s1* s1+ s2* s2)* M_2PI;
 	  f1= s1/ f2-( g1- g2- g3+ g4)* fcon;
 	  f2= s2/ f2-( g1+ g2- g3- g4)* fcon;
 	  e1= e1+ dataj.exk* g1;
@@ -1721,7 +1826,8 @@ void pcint( double xi, double yi, double zi,
 
 /* calculates the electric field due to unit current */
 /* in the t1 and t2 directions on a patch */
-void unere( double xob, double yob, double zob )
+  void
+unere( double xob, double yob, double zob )
 {
   double zr, t1zr, t2zr, rx, ry, rz, r, tt1;
   double tt2, rt, xymag, px, py, cth, r2;
@@ -1755,7 +1861,7 @@ void unere( double xob, double yob, double zob )
   }
 
   r= sqrt( r2);
-  tt1= -TWOPI* r;
+  tt1= -M_2PI* r;
   tt2= tt1* tt1;
   rt= r2* r;
   er= cmplx( sin( tt1),- cos( tt1))*( CONST2* dataj.s);
@@ -1818,110 +1924,3 @@ void unere( double xob, double yob, double zob )
 
 /*-----------------------------------------------------------------------*/
 
-/* Near_Field_Total()
- *
- * Calculates the value of Total Near Field vector
- */
-void
-Near_Field_Total(
-	complex double ex,
-	complex double ey,
-	complex double ez,
-	int nfeh, int idx )
-{
-  /* Display a time-frozen "snapshot" of near field */
-  if( isFlagSet(NEAREH_SNAPSHOT) )
-  {
-	if( nfeh == 1 ) /* Magnetic field */
-	{
-	  /* Near magnetic field components */
-	  near_field.hrx[idx] = (double)creal(ex);
-	  near_field.hry[idx] = (double)creal(ey);
-	  near_field.hrz[idx] = (double)creal(ez);
-
-	  /* Near total magnetic field vector*/
-	  near_field.hr[idx]  = sqrt(
-		  near_field.hrx[idx] * near_field.hrx[idx] +
-		  near_field.hry[idx] * near_field.hry[idx] +
-		  near_field.hrz[idx] * near_field.hrz[idx] );
-	  if( near_field.max_hr < near_field.hr[idx] )
-		near_field.max_hr = near_field.hr[idx];
-	}
-	else /* Electric field */
-	{
-	  /* Near electric field components */
-	  /* Near electric field components */
-	  near_field.erx[idx] = (double)creal(ex);
-	  near_field.ery[idx] = (double)creal(ey);
-	  near_field.erz[idx] = (double)creal(ez);
-
-	  /* Near total electric field vector */
-	  near_field.er[idx]  = sqrt(
-		  near_field.erx[idx] * near_field.erx[idx] +
-		  near_field.ery[idx] * near_field.ery[idx] +
-		  near_field.erz[idx] * near_field.erz[idx] );
-	  if( near_field.max_er < near_field.er[idx] )
-		near_field.max_er = near_field.er[idx];
-	} /* if( nfeh == 1 ) */
-
-  } /* if( isFlagSet(NEAREH_SNAPSHOT) ) */
-  else /* Display Total near field vector peak */
-  {
-	double
-	  exm, eym, ezm,	/* Near field magnitude in x, y, z    */
-	  exm2, eym2, ezm2,	/* Near field magnitude^2 in x, y, z  */
-	  fx, fy, fz,		/* Time phase of near field vectors   */
-	  fx2, fy2, fz2,	/* Time phase of near field vectors*2 */
-	  cp, sp, tp, wt;	/* Some values needed in calculations */
-
-	exm = (double)cabs(ex);
-	eym = (double)cabs(ey);
-	ezm = (double)cabs(ez);
-	/* Near total electric field vector */
-	fx  = (double)cang(ex)/(double)TODEG;
-	fy  = (double)cang(ey)/(double)TODEG;
-	fz  = (double)cang(ez)/(double)TODEG;
-
-	fx2 = fx * 2.0;
-	fy2 = fy * 2.0;
-	fz2 = fz * 2.0;
-
-	exm2 = exm*exm;
-	eym2 = eym*eym;
-	ezm2 = ezm*ezm;
-
-	cp = exm2*cos(fx2) + eym2*cos(fy2) + ezm2*cos(fz2);
-	sp = exm2*sin(fx2) + eym2*sin(fy2) + ezm2*sin(fz2);
-	tp = sqrt(cp*cp + sp*sp);
-	wt = atan2(-sp, cp)/2.0;
-
-	if( nfeh == 1 ) /* Magnetic field */
-	{
-	  /* Near magnetic field components */
-	  near_field.hrx[idx] = exm * cos(wt + fx);
-	  near_field.hry[idx] = eym * cos(wt + fy);
-	  near_field.hrz[idx] = ezm * cos(wt + fz);
-
-	  /* Near total magnetic field vector, peak value */
-	  near_field.hr[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
-	  if( near_field.max_hr < near_field.hr[idx] )
-		near_field.max_hr = near_field.hr[idx];
-	}
-	else /* Electric field */
-	{
-	  /* Near electric field components */
-	  near_field.erx[idx] = exm * cos(wt + fx);
-	  near_field.ery[idx] = eym * cos(wt + fy);
-	  near_field.erz[idx] = ezm * cos(wt + fz);
-
-	  /* Near total electric field vector, peak value */
-	  near_field.er[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
-	  if( near_field.max_er < near_field.er[idx] )
-		near_field.max_er = near_field.er[idx];
-	}
-  }
-
-} /* Near_Field_Total() */
-
-/*-----------------------------------------------------------------------*/
-
diff --git a/src/fields.h b/src/fields.h
index fa6bab3..ebb0c5f 100644
--- a/src/fields.h
+++ b/src/fields.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
diff --git a/src/fork.c b/src/fork.c
index 1399ef2..62b83d8 100644
--- a/src/fork.c
+++ b/src/fork.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,123 +14,16 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* fork.c
- *
- * Functions for forking xnec2c in multiprocessor systems
- */
-
 #include "fork.h"
 #include "shared.h"
 
 /*-----------------------------------------------------------------------*/
 
-/* Child_Process()
- *
- * Destination of child processes, handles data
- * transfers between parent and children via pipes
- */
-void Child_Process( int num_child ) __attribute__ ((noreturn));
-  void
-Child_Process( int num_child )
-{
-  ssize_t retval;	/* Return from select()/read() etc */
-  char cmnd[8];		/* Command string received from parent */
-  char *buff;		/* Passes address of variables to read()/write() */
-  size_t cnt;		/* Size of data buffers for read()/write() */
-
-  /* Close unwanted pipe ends */
-  close( forked_proc_data[num_child]->pnt2child_pipe[WRITE] );
-  close( forked_proc_data[num_child]->child2pnt_pipe[READ] );
-
-  /* Watch read/write pipe for i/o */
-  FD_ZERO( &forked_proc_data[num_child]->read_fds );
-
-  FD_SET( forked_proc_data[num_child]->pnt2child_pipe[READ],
-	  &forked_proc_data[num_child]->read_fds );
-
-  FD_ZERO( &forked_proc_data[num_child]->write_fds );
-
-  FD_SET( forked_proc_data[num_child]->child2pnt_pipe[WRITE],
-	  &forked_proc_data[num_child]->write_fds );
-
-  /* Loop around select() in Read_Pipe() waiting for commands/data */
-  while( TRUE )
-  {
-	retval = Read_Pipe( num_child, cmnd, 7, TRUE );
-	cmnd[retval]='\0';
-
-	switch( Fork_Command(cmnd) )
-	{
-	  case INFILE: /* Read input file */
-		retval = Read_Pipe( num_child, infile, 80, FALSE );
-		infile[retval] = '\0';
-		Child_Input_File();
-		break;
-
-	  case FRQDATA: /* Calculate currents and pass on */
-		/* Get new frequency */
-		buff = (char *)&calc_data.fmhz;
-		cnt = sizeof( double );
-		Read_Pipe( num_child, buff, (ssize_t)cnt, TRUE );
-
-		/* Frequency buffers in children
-		 * are for current frequency only */
-		calc_data.fstep = 0;
-
-		/* Clear "last-used-frequency" buffer */
-		save.last_freq = 0.0;
-
-		/* Set flags */
-		SetFlag( FREQ_LOOP_RUNNING );
-
-		/* Calculate freq data and pass to parent */
-		New_Frequency();
-		Pass_Freq_Data();
-		break;
-
-	  case EHFIELD: /* Calcualte near field E/H data */
-		{
-		  /* Get near field flags */
-		  char flag;
-
-		  /* Set near field flags */
-		  cnt = sizeof( flag );
-		  Read_Pipe( num_child, &flag, (ssize_t)cnt, TRUE );
-
-		  if( flag & E_HFIELD )
-			SetFlag( DRAW_EHFIELD );
-		  else
-			ClearFlag( DRAW_EHFIELD );
-
-		  if( flag & SNAPSHOT )
-			SetFlag( NEAREH_SNAPSHOT );
-		  else
-			ClearFlag( NEAREH_SNAPSHOT );
-
-		  if( flag & EFIELD )
-			SetFlag( DRAW_EFIELD );
-		  else
-			ClearFlag( DRAW_EFIELD );
-
-		  if( flag & HFIELD )
-			SetFlag( DRAW_HFIELD );
-		  else
-			ClearFlag( DRAW_HFIELD );
-		}
-
-	} /* switch( Command(cmnd) ) */
-
-  } /* while( TRUE ) */
-
-} /* Child_Process() */
-
-/*-----------------------------------------------------------------------*/
-
 /* Child_Input_File()
  *
  * Opens NEC2 input file for child processes
  */
-  void
+  static void
 Child_Input_File( void )
 {
   /* Close open files if any */
@@ -161,7 +52,7 @@ Child_Input_File( void )
  *
  * Identifies a command srting
  */
-  int
+  static int
 Fork_Command( const char *cdstr )
 {
   int idx;
@@ -180,7 +71,7 @@ Fork_Command( const char *cdstr )
  *
  * Reads data from a pipe (child and parent processes)
  */
-  ssize_t
+  static ssize_t
 Read_Pipe( int idx, char *str, ssize_t len, gboolean err )
 {
   ssize_t retval;
@@ -212,60 +103,30 @@ Read_Pipe( int idx, char *str, ssize_t len, gboolean err )
 
 /*------------------------------------------------------------------------*/
 
-/* Write_Pipe()
+/* Mem_Copy()
  *
- * Writes data to a pipe (child and parent processes)
+ * Copies between buffers using memcpy()
  */
-  ssize_t
-Write_Pipe( int idx, char *str, ssize_t len, gboolean err )
+  static void
+Mem_Copy( char *buff, char *var, size_t cnt, gboolean wrt )
 {
-  ssize_t retval;
-  int pipefd;
-
-  if( CHILD )
-	pipefd = forked_proc_data[idx]->child2pnt_pipe[WRITE];
-  else
-	pipefd = forked_proc_data[idx]->pnt2child_pipe[WRITE];
-
-  retval = select( 1024, NULL, &forked_proc_data[idx]->write_fds, NULL, NULL );
-  if( retval == -1 )
-  {
-	perror( "xnec2c: select()" );
-	_exit(0);
-  }
+  static int idx;
 
-  retval = write( pipefd, str, (size_t)len );
-  if( (retval == -1) || ((retval != len) && err) )
+  /* Clear idx to buffer */
+  if( !cnt )
   {
-	perror( "xnec2c: write()" );
-	_exit(0);
+	idx = 0;
+	return;
   }
 
-  usleep(2);
-  return( retval );
-
-} /* Write_Pipe() */
-
-/*------------------------------------------------------------------------*/
-
-/* PRead_Pipe()
- *
- * Reads data from a pipe (used by parent process)
- */
-  ssize_t
-PRead_Pipe( int idx, char *str, ssize_t len, gboolean err )
-{
-  ssize_t retval;
-
-  retval = read( forked_proc_data[idx]->child2pnt_pipe[READ], str, (size_t)len );
-  if( (retval == -1) || ((retval != len) && err ) )
-  {
-	perror( "xnec2c: PRead_Pipe(): read()" );
-	_exit(0);
-  }
-  return( retval );
+  /* If child process writing data */
+  if( wrt )
+	memcpy( &buff[idx], var, cnt );
+  else /* Parent reading data */
+	memcpy( var, &buff[idx], cnt );
+  idx += (int)cnt;
 
-} /* PRead_Pipe() */
+} /* Mem_Copy() */
 
 /*------------------------------------------------------------------------*/
 
@@ -274,7 +135,7 @@ PRead_Pipe( int idx, char *str, ssize_t len, gboolean err )
  * Passes frequency-dependent data (current, charge density,
  * input impedances etc) from child processes to parent.
  */
-  void
+  static void
 Pass_Freq_Data( void )
 {
   char *buff = NULL, flag;
@@ -456,6 +317,165 @@ Pass_Freq_Data( void )
 
 /*------------------------------------------------------------------------*/
 
+/* Child_Process()
+ *
+ * Destination of child processes, handles data
+ * transfers between parent and children via pipes
+ */
+void Child_Process( int num_child ) __attribute__ ((noreturn));
+  void
+Child_Process( int num_child )
+{
+  ssize_t retval;	/* Return from select()/read() etc */
+  char cmnd[8];		/* Command string received from parent */
+  char *buff;		/* Passes address of variables to read()/write() */
+  size_t cnt;		/* Size of data buffers for read()/write() */
+
+  /* Close unwanted pipe ends */
+  close( forked_proc_data[num_child]->pnt2child_pipe[WRITE] );
+  close( forked_proc_data[num_child]->child2pnt_pipe[READ] );
+
+  /* Watch read/write pipe for i/o */
+  FD_ZERO( &forked_proc_data[num_child]->read_fds );
+
+  FD_SET( forked_proc_data[num_child]->pnt2child_pipe[READ],
+	  &forked_proc_data[num_child]->read_fds );
+
+  FD_ZERO( &forked_proc_data[num_child]->write_fds );
+
+  FD_SET( forked_proc_data[num_child]->child2pnt_pipe[WRITE],
+	  &forked_proc_data[num_child]->write_fds );
+
+  /* Loop around select() in Read_Pipe() waiting for commands/data */
+  while( TRUE )
+  {
+	retval = Read_Pipe( num_child, cmnd, 7, TRUE );
+	cmnd[retval]='\0';
+
+	switch( Fork_Command(cmnd) )
+	{
+	  case INFILE: /* Read input file */
+		retval = Read_Pipe( num_child, infile, 80, FALSE );
+		infile[retval] = '\0';
+		Child_Input_File();
+		break;
+
+	  case FRQDATA: /* Calculate currents and pass on */
+		/* Get new frequency */
+		buff = (char *)&calc_data.fmhz;
+		cnt = sizeof( double );
+		Read_Pipe( num_child, buff, (ssize_t)cnt, TRUE );
+
+		/* Frequency buffers in children
+		 * are for current frequency only */
+		calc_data.fstep = 0;
+
+		/* Clear "last-used-frequency" buffer */
+		save.last_freq = 0.0;
+
+		/* Set flags */
+		SetFlag( FREQ_LOOP_RUNNING );
+
+		/* Calculate freq data and pass to parent */
+		New_Frequency();
+		Pass_Freq_Data();
+		break;
+
+	  case EHFIELD: /* Calcualte near field E/H data */
+		{
+		  /* Get near field flags */
+		  char flag;
+
+		  /* Set near field flags */
+		  cnt = sizeof( flag );
+		  Read_Pipe( num_child, &flag, (ssize_t)cnt, TRUE );
+
+		  if( flag & E_HFIELD )
+			SetFlag( DRAW_EHFIELD );
+		  else
+			ClearFlag( DRAW_EHFIELD );
+
+		  if( flag & SNAPSHOT )
+			SetFlag( NEAREH_SNAPSHOT );
+		  else
+			ClearFlag( NEAREH_SNAPSHOT );
+
+		  if( flag & EFIELD )
+			SetFlag( DRAW_EFIELD );
+		  else
+			ClearFlag( DRAW_EFIELD );
+
+		  if( flag & HFIELD )
+			SetFlag( DRAW_HFIELD );
+		  else
+			ClearFlag( DRAW_HFIELD );
+		}
+
+	} /* switch( Command(cmnd) ) */
+
+  } /* while( TRUE ) */
+
+} /* Child_Process() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Write_Pipe()
+ *
+ * Writes data to a pipe (child and parent processes)
+ */
+  ssize_t
+Write_Pipe( int idx, char *str, ssize_t len, gboolean err )
+{
+  ssize_t retval;
+  int pipefd;
+
+  if( CHILD )
+	pipefd = forked_proc_data[idx]->child2pnt_pipe[WRITE];
+  else
+	pipefd = forked_proc_data[idx]->pnt2child_pipe[WRITE];
+
+  retval = select( 1024, NULL, &forked_proc_data[idx]->write_fds, NULL, NULL );
+  if( retval == -1 )
+  {
+	perror( "xnec2c: select()" );
+	_exit(0);
+  }
+
+  retval = write( pipefd, str, (size_t)len );
+  if( (retval == -1) || ((retval != len) && err) )
+  {
+	perror( "xnec2c: write()" );
+	_exit(0);
+  }
+
+  usleep(2);
+  return( retval );
+
+} /* Write_Pipe() */
+
+/*------------------------------------------------------------------------*/
+
+/* PRead_Pipe()
+ *
+ * Reads data from a pipe (used by parent process)
+ */
+  static ssize_t
+PRead_Pipe( int idx, char *str, ssize_t len, gboolean err )
+{
+  ssize_t retval;
+
+  retval = read( forked_proc_data[idx]->child2pnt_pipe[READ], str, (size_t)len );
+  if( (retval == -1) || ((retval != len) && err ) )
+  {
+	perror( "xnec2c: PRead_Pipe(): read()" );
+	_exit(0);
+  }
+  return( retval );
+
+} /* PRead_Pipe() */
+
+/*------------------------------------------------------------------------*/
+
 /* Get_Freq_Data()
  *
  * Gets frequency-dependent data (current, charge density,
@@ -639,30 +659,3 @@ Get_Freq_Data( int idx, int fstep )
 
 /*------------------------------------------------------------------------*/
 
-/* Mem_Copy()
- *
- * Copies between buffers using memcpy()
- */
-  void
-Mem_Copy( char *buff, char *var, size_t cnt, gboolean wrt )
-{
-  static int idx;
-
-  /* Clear idx to buffer */
-  if( !cnt )
-  {
-	idx = 0;
-	return;
-  }
-
-  /* If child process writing data */
-  if( wrt )
-	memcpy( &buff[idx], var, cnt );
-  else /* Parent reading data */
-	memcpy( var, &buff[idx], cnt );
-  idx += (int)cnt;
-
-} /* Mem_Copy() */
-
-/*------------------------------------------------------------------------*/
-
diff --git a/src/fork.h b/src/fork.h
index 130702b..f165a64 100644
--- a/src/fork.h
+++ b/src/fork.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
diff --git a/src/geom_edit.c b/src/geom_edit.c
index 22a09f2..552f924 100644
--- a/src/geom_edit.c
+++ b/src/geom_edit.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,13 +14,350 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* geom_edit.c
- *
- * Structure/Geometry editor functions for xnec2c
- */
+#include "geom_edit.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_GE_Card()
+ *
+ * Inserts a default GE card if missing
+ */
+
+  static void
+Insert_GE_Card( GtkListStore *store, GtkTreeIter *iter )
+{
+  gint idx, idi;
+
+  /* Insert default GE card if list is clear */
+  idx = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !idx )
+  {
+	gtk_list_store_append( store, iter );
+	gtk_list_store_set( store, iter, GEOM_COL_NAME, "GE", -1 );
+	for( idi = GEOM_COL_I1; idi < GEOM_NUM_COLS; idi++ )
+	  gtk_list_store_set( store, iter, idi, "0", -1 );
+  }
+
+} /* Insert_GE_Card() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Geometry_Data()
+ *
+ * Gets geometry data from a treeview row
+ */
+
+  static void
+Get_Geometry_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gint idi, idf;
+  gchar *sv;
+
+  /* Get data from tree view (I1,I2, F1-F7)*/
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
+	  iv[idi-GEOM_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idf, &sv, -1);
+	  fv[idf-GEOM_COL_F1] = Strtod( sv, NULL );
+	  g_free(sv);
+	}
+  }
+  else stop( _("Error reading row data\n"
+		"Invalid list iterator"), ERR_OK );
+
+} /* Get_Geometry_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Geometry_Data()
+ *
+ * Sets data into a geometry row
+ */
+
+  static void
+Set_Geometry_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gchar str[13];
+  gint idi, idf;
+
+  /* Format and set editor data to treeview (I1, I2 & F1-F7) */
+  if( iter && gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  snprintf( str, 6, "%5d", iv[idi-GEOM_COL_I1] );
+	  gtk_list_store_set( store, iter, idi, str, -1 );
+	}
+
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	{
+	  snprintf( str, 13, "%12.5E", fv[idf-GEOM_COL_F1] );
+	  gtk_list_store_set( store, iter, idf, str, -1 );
+	}
+  }
+  else stop( _("Error writing row data\n"
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Geometry_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Geometry_Int_Data()
+ *
+ * Sets integer (I1, I2) data into a geometry row
+ */
+
+  static void
+Set_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
+{
+  gchar str[6];
+  gint idi, idf;
+
+  /* Format and set editor data to treeview (I1, I2) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  snprintf( str, sizeof(str), "%5d", iv[idi-GEOM_COL_I1] );
+	  gtk_list_store_set( store, iter, idi, str, -1 );
+	}
+
+	/* Clear unused float columns */
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	  gtk_list_store_set( store, iter, idf, "0.0", -1 );
+  }
+  else stop( _("Error writing row data\n"
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Geometry_Int_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_Blank_Geometry_Row()
+ *
+ * Inserts a blank row in a tree view with only its name (GW ... )
+ */
+
+  static void
+Insert_Blank_Geometry_Row(
+	GtkTreeView *view, GtkListStore *store,
+	GtkTreeIter *iter, const gchar *name )
+{
+  GtkTreeSelection *selection;
+  gboolean retv;
+  gint n;
+  gchar *str;
+
+  if( nec2_edit_window == NULL )
+	return;
+
+  /* Get selected row, if any */
+  selection = gtk_tree_view_get_selection( view );
+  retv = gtk_tree_selection_get_selected(
+	  selection, NULL, iter );
+
+  /* If no selected row, insert new row into list
+   * store before last row, else after the selected row,
+   * but if this is a GE row, then insert before it */
+  if( !retv )
+  {
+	n = gtk_tree_model_iter_n_children(
+		GTK_TREE_MODEL(store), NULL );
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), iter, NULL, n-1 );
+	gtk_list_store_insert_before( store, iter, iter );
+  }
+  else
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		iter, GEOM_COL_NAME, &str, -1 );
+	if( strcmp(str, "GE") == 0 )
+	  gtk_list_store_insert_before( store, iter, iter );
+	else
+	  gtk_list_store_insert_after( store, iter, iter );
+	g_free(str);
+  }
+
+  gtk_list_store_set( store, iter, GEOM_COL_NAME, name, -1 );
+  for( n = GEOM_COL_I1; n < GEOM_NUM_COLS; n++ )
+	gtk_list_store_set( store, iter, n, "--", -1 );
+  gtk_tree_selection_select_iter( selection, iter );
+
+} /* Insert_Blank_Geometry_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Wire_Conductivity()
+ *
+ * Sets the wire conductivity specified in a geometry editor
+ * (wire, arc, helix) to a loading card (LD row) in commands treview
+ */
+
+  static void
+Set_Wire_Conductivity( int tag, double s, GtkListStore *store )
+{
+  int idx, idi, nchld;
+  GtkTreeIter iter_ld;
+  gchar *str, sv[13];
+
+  /* Find num of rows and first iter, abort if tree empty */
+  nchld = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL);
+  if(!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld))
+	return;
+
+  /* Look for an LD card with tag number = tag */
+  for( idx = 0; idx < nchld; )
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		&iter_ld, GEOM_COL_NAME, &str, -1 );
+
+	if( strcmp(str, "LD") == 0 )
+	{
+	  g_free( str );
+	  gtk_tree_model_get( GTK_TREE_MODEL(store),
+		  &iter_ld, GEOM_COL_I2, &str, -1 );
+	  if( atoi( str ) == tag )
+	  {
+		g_free( str );
+		break;
+	  }
+	  else g_free( str );
+	}
+	else g_free( str );
+
+	idx++;
+	if( !gtk_tree_model_iter_next(
+		  GTK_TREE_MODEL(store), &iter_ld) )
+	  break;
+
+  } /* for( idx = 0; idx < nchld; idx++ ) */
+
+  /* If not found LD card with tagnum = tag, insert new */
+  if( idx >= nchld )
+  {
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), &iter_ld, NULL, nchld-1 );
+	gtk_list_store_insert_before( store, &iter_ld, &iter_ld );
+	gtk_list_store_set(
+		store, &iter_ld, CMND_COL_NAME, "LD", -1 );
+
+	/* Clear rest of LD row */
+	for( idi = CMND_COL_I1; idi <= CMND_COL_F6; idi++ )
+	  gtk_list_store_set( store, &iter_ld, idi, "0", -1 );
+  }
+
+  /* Set LD card parameters */
+  gtk_list_store_set( store, &iter_ld, CMND_COL_I1, "5", -1 );
+  snprintf( sv, 6, "%5d", tag );
+  gtk_list_store_set( store, &iter_ld, CMND_COL_I2, sv, -1 );
+  snprintf( sv, 13, "%12.5E", s );
+  gtk_list_store_set( store, &iter_ld, CMND_COL_F1, sv, -1 );
+
+  /* Scroll tree view to bottom */
+  gtk_adjustment_set_value( geom_adjustment,
+	  gtk_adjustment_get_upper(geom_adjustment) -
+	  gtk_adjustment_get_page_size(geom_adjustment) );
+
+} /* Set_Wire_Conductivity() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Wire_Conductivity()
+ *
+ * Gets the wire conductivity specified in a loading
+ * card (LD row) in commands treview for a given tag #
+ */
+
+  static gboolean
+Get_Wire_Conductivity( int tag, double *s, GtkListStore *store )
+{
+  int idx, type, nchld;
+  GtkTreeIter iter_ld;
+  gchar *str;
+  static int t = -1;
+
+  /* Find num of rows and first iter, abort if tree empty */
+  nchld = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld) )
+	return( FALSE );
+
+  /* Look for an LD card with tag number = tag */
+  for( idx = 0; idx < nchld; )
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		&iter_ld, GEOM_COL_NAME, &str, -1 );
+
+	if( strcmp(str, "LD") == 0 )
+	{
+	  g_free( str );
+	  gtk_tree_model_get( GTK_TREE_MODEL(store),
+		  &iter_ld, GEOM_COL_I2, &str, -1 );
+	  if( atoi(str) == tag )
+	  {
+		g_free( str );
+		break;
+	  }
+	  else g_free( str );
+	}
+	else g_free( str );
+
+	idx++;
+	if( !gtk_tree_model_iter_next(
+		  GTK_TREE_MODEL(store), &iter_ld) )
+	  break;
 
-#include "geom_edit.h"
-#include "shared.h"
+  } /* for( idx = 0; idx < nchld; idx++ ) */
+
+  /* If not found LD card with tagnum = tag, return s=0 */
+  if( idx >= nchld )
+  {
+	*s = 0.0;
+	t = tag;
+	return( FALSE );
+  }
+
+  /* If LD card for given tag is already read, abort */
+  if( t == tag ) return( FALSE );
+  else t = tag;
+
+  /* Get the loading type (we want LDTYP 5) */
+  gtk_tree_model_get( GTK_TREE_MODEL(store),
+	  &iter_ld, GEOM_COL_I1, &str, -1 );
+  type = atoi( str );
+  g_free( str );
+  if( type != 5 ) return( FALSE );
+
+  /* Get the wire conductivity S/m */
+  gtk_tree_model_get( GTK_TREE_MODEL(store),
+	  &iter_ld, CMND_COL_F1, &str, -1 );
+  *s = Strtod( str, NULL );
+  g_free( str );
+
+  return( TRUE );
+} /* Get_Wire_Conductivity() */
 
 /*------------------------------------------------------------------------*/
 
@@ -47,7 +382,7 @@ Wire_Editor( int action )
   int idx, idi;
 
   static gboolean
-		   load   = FALSE, /* Enable wire loading (conductivity specified) */
+	load   = FALSE, /* Enable wire loading (conductivity specified) */
 		   taper  = FALSE, /* Editing a tapered wire */
 		   save   = FALSE, /* Enable saving of editor data */
 		   busy   = FALSE, /* Block callbacks. Must be a better way to do this? */
@@ -131,14 +466,14 @@ Wire_Editor( int action )
   /* Read int data from the wire editor */
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(wire_editor, ispin[idi]) );
+	spin = GTK_SPIN_BUTTON( Builder_Get_Object(wire_editor_builder, ispin[idi]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the wire editor */
   for( idx = WIRE_X1; idx <= WIRE_RES; idx++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(wire_editor, fspin[idx]) );
+	spin = GTK_SPIN_BUTTON( Builder_Get_Object(wire_editor_builder, fspin[idx]) );
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
   fv[WIRE_DIA]  /= 2.0;
@@ -158,7 +493,7 @@ Wire_Editor( int action )
 		  geom_treeview, geom_store, &iter_gw, "GW" );
 
 	  /* Some default values */
-	  iv[SPIN_COL_I1] = ++gbl_tag_num;
+	  iv[SPIN_COL_I1] = ++tag_num;
 	  iv[SPIN_COL_I3] = iv[SPIN_COL_I4] = 0;
 
 	  if( taper )
@@ -170,8 +505,9 @@ Wire_Editor( int action )
 	  }
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper );
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a wire row (GW/GC) */
@@ -198,7 +534,7 @@ Wire_Editor( int action )
 
 		  /* Warn user if wire radius not 0 */
 		  if( fv[WIRE_DIA] != 0.0 )
-			stop( _("GC card preceded by GW card\n"\
+			stop( _("GC card preceded by GW card\n"
 				  "with non-zero wire radius"), ERR_OK );
 
 		} /* if( strcmp(name, "GC") == 0 ) */
@@ -228,13 +564,13 @@ Wire_Editor( int action )
 				&iv[SPIN_COL_I3], &fv[WIRE_RLEN] );
 			fv[WIRE_RDIA] = fv[WIRE_RLEN];
 		  }
-		  else stop( _("No GC card after a GW card\n"\
+		  else stop( _("No GC card after a GW card\n"
 				"with a zero wire radius"), ERR_OK );
 
 		} /* if( fv[WIRE_DIA] == 0.0 ) */
 		/* If radius != 0, next card should not be GC */
 		else if( Check_Card_Name(geom_store, &iter_gc, NEXT, "GC") )
-		  stop( _("GC card follows a GW card\n"\
+		  stop( _("GC card follows a GW card\n"
 				"with non-zero wire radius"), ERR_OK );
 
 	  } /* if( strcmp(name, "GC") == 0 ) */
@@ -247,7 +583,7 @@ Wire_Editor( int action )
 
 		/* Read tapered wire checkbutton */
 		taper = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(
-			  lookup_widget(wire_editor, "wire_taper_checkbutton")) );
+			  Builder_Get_Object(wire_editor_builder, "wire_taper_checkbutton")) );
 		if( taper )
 		{
 		  /* Set wire dia to 0 */
@@ -284,8 +620,8 @@ Wire_Editor( int action )
 	  break;
 
 	case EDITOR_LOAD: /* Wire conductivity specified */
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			wire_editor, fspin[WIRE_RES]) );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(wire_editor_builder, fspin[WIRE_RES]) );
 	  s = gtk_spin_button_get_value( spin );
 	  if( s > 0.0 )
 	  {
@@ -296,7 +632,7 @@ Wire_Editor( int action )
 	  break;
 
 	case EDITOR_TAGNUM: /* Tag number edited by user */
-	  gbl_tag_num = iv[SPIN_COL_I1];
+	  tag_num = iv[SPIN_COL_I1];
 	  save = TRUE;
 	  if( s > 0.0 ) load = TRUE;
 	  break;
@@ -365,22 +701,20 @@ Wire_Editor( int action )
   } /* switch( action ) */
 
   /* Frame of tapered wire data */
-  frame = lookup_widget(wire_editor, "wire_taperframe");
+  frame = Builder_Get_Object(wire_editor_builder, "wire_taperframe");
   /* Show taper data if appropriate */
   if( taper )
   {
 	gtk_widget_show( frame );
 	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
-		  lookup_widget(wire_editor,
-			"wire_taper_checkbutton")), TRUE );
+		  Builder_Get_Object(wire_editor_builder, "wire_taper_checkbutton")), TRUE );
   }
   else
   {
 	gtk_widget_hide( frame );
 	gtk_window_resize( GTK_WINDOW(wire_editor), 10, 10 );
 	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
-		  lookup_widget(wire_editor,
-			"wire_taper_checkbutton")), FALSE );
+		  Builder_Get_Object(wire_editor_builder, "wire_taper_checkbutton")), FALSE );
   }
 
   /*** Calculate wire length ***/
@@ -390,6 +724,7 @@ Wire_Editor( int action )
 	dx = fv[WIRE_X2]-fv[WIRE_X1];
 	dy = fv[WIRE_Y2]-fv[WIRE_Y1];
 	dz = fv[WIRE_Z2]-fv[WIRE_Z1];
+
 	/* Wire's length */
 	fv[WIRE_LEN] = (gdouble)sqrt( dx*dx + dy*dy + dz*dz );
   }
@@ -419,7 +754,7 @@ Wire_Editor( int action )
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(wire_editor, ispin[idi]) );
+		Builder_Get_Object(wire_editor_builder, ispin[idi]) );
 	gtk_spin_button_set_value( spin, iv[idi] );
   }
 
@@ -428,7 +763,7 @@ Wire_Editor( int action )
   for( idx = WIRE_X1; idx <= WIRE_RES; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(wire_editor, fspin[idx]) );
+		Builder_Get_Object(wire_editor_builder, fspin[idx]) );
 	gtk_spin_button_set_value( spin, fv[idx] );
   }
   fv[WIRE_DIA] /= 2.0; fv[WIRE_DIA1] /= 2.0; fv[WIRE_DIAN] /= 2.0;
@@ -505,8 +840,8 @@ Patch_Editor( int action )
 
   static gboolean
 	save  = FALSE,	/* Enable saving of editor data */
-	busy  = FALSE,	/* Block callbacks. Must be a better way to do this? */
-	ptset = FALSE;	/* Set patch type radio buttons */
+    busy  = FALSE,	/* Block callbacks. Must be a better way to do this? */
+    ptset = FALSE;	/* Set patch type radio buttons */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -531,7 +866,7 @@ Patch_Editor( int action )
 	for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
 	{
 	  spin = GTK_SPIN_BUTTON(
-		  lookup_widget(patch_editor, ispin[idi]) );
+		  Builder_Get_Object(patch_editor_builder, ispin[idi]) );
 	  double i = gtk_spin_button_get_value( spin );
 	  iv[idi] = (gint)i;
 	}
@@ -540,13 +875,13 @@ Patch_Editor( int action )
   for( idx = PATCH_X1; idx <= PATCH_Z2; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(patch_editor, fspin[idx]) );
+		Builder_Get_Object(patch_editor_builder, fspin[idx]) );
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
   for( idx = PATCH_X3; idx <= PATCH_Z4; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(patch_editor, fspin[idx-1]) );
+		Builder_Get_Object(patch_editor_builder, fspin[idx-1]) );
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
 
@@ -586,8 +921,9 @@ Patch_Editor( int action )
 			geom_treeview, geom_store, &iter_sc, "SC" );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper );
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  ptset = TRUE;
 	  break;
 
@@ -614,7 +950,7 @@ Patch_Editor( int action )
 		  /* Warn user if SP card with arbitrary
 		   * patch is followed by an SC card */
 		  if( ptype == PATCH_ARBT )
-			stop( _("SC card preceded by SP card\n"\
+			stop( _("SC card preceded by SP card\n"
 				  "with arbitrary patch type"), ERR_OK );
 
 		} /* if( Check_Card_Name(geom_store, &iter_sp, PREVIOUS, "SP") ) */
@@ -646,14 +982,14 @@ Patch_Editor( int action )
 			else
 			{
 			  ptype = PATCH_ARBT;
-			  stop( _("No SC card after an SP card\n"\
+			  stop( _("No SC card after an SP card\n"
 					"with non-arbitrary patch type"), ERR_OK );
 			}
 
 		  } /* if( ptype != PATCH_ARBT ) */
 		  /* If patch type arbitrary, no SC card should follow */
 		  else if( Check_Card_Name(geom_store, &iter_sc, NEXT, "SC") )
-			stop( _("SC card follows an SP card\n"\
+			stop( _("SC card follows an SP card\n"
 				  "with arbitrary patch type"), ERR_OK );
 		} /* if( strcmp(name, "SP") == 0 ) */
 		else /* SM card */
@@ -736,68 +1072,68 @@ Patch_Editor( int action )
   if( ptype == PATCH_ARBT )
   {
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_x1_label")), _("Center - X") );
+		  Builder_Get_Object(patch_editor_builder, "patch_x1_label")), _("Center - X") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_y1_label")), _("Center - Y") );
+		  Builder_Get_Object(patch_editor_builder, "patch_y1_label")), _("Center - Y") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_z1_label")), _("Center - Z") );
+		  Builder_Get_Object(patch_editor_builder, "patch_z1_label")), _("Center - Z") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_x2_label")), _("Normal - Elev.") );
+		  Builder_Get_Object(patch_editor_builder, "patch_x2_label")), _("Normal - Elev.") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_y2_label")), _("Normal - Azim.") );
+		  Builder_Get_Object(patch_editor_builder, "patch_y2_label")), _("Normal - Azim.") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_z2_label")), _("Patch Area") );
+		  Builder_Get_Object(patch_editor_builder, "patch_z2_label")), _("Patch Area") );
   }
   else
   {
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_x1_label")), _("Corner 1 - X") );
+		  Builder_Get_Object(patch_editor_builder, "patch_x1_label")), _("Corner 1 - X") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_y1_label")), _("Corner 1 - Y") );
+		  Builder_Get_Object(patch_editor_builder, "patch_y1_label")), _("Corner 1 - Y") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_z1_label")), _("Corner 1 - Z") );
+		  Builder_Get_Object(patch_editor_builder, "patch_z1_label")), _("Corner 1 - Z") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_x2_label")), _("Corner 2 - X") );
+		  Builder_Get_Object(patch_editor_builder, "patch_x2_label")), _("Corner 2 - X") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_y2_label")), _("Corner 2 - Y") );
+		  Builder_Get_Object(patch_editor_builder, "patch_y2_label")), _("Corner 2 - Y") );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(patch_editor, "patch_z2_label")), _("Corner 2 - Z") );
+		  Builder_Get_Object(patch_editor_builder, "patch_z2_label")), _("Corner 2 - Z") );
   }
 
   /* Hide/Show parts of window as needed */
   switch( ptype )
   {
 	case PATCH_ARBT: /* Arbitary shaped patch */
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_frame") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sc_frame") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sm_frame") );
 	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
 	  break;
 
 	case PATCH_RECT: /* Rectangular patch */
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sc_frame") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sc_grid") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sm_frame") );
 	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
 	  break;
 
 	case PATCH_TRIA: /* Triangular patch */
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sc_frame") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sc_grid") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sm_frame") );
 	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
 	  break;
 
 	case PATCH_QUAD: /* Quadrilateral patch */
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_table") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sc_frame") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sc_grid") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sm_frame") );
 	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
 	  break;
 
 	case PATCH_SURF: /* Multi-patch surface */
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sm_frame") );
-	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
-	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sm_frame") );
+	  gtk_widget_show( Builder_Get_Object(patch_editor_builder, "patch_sc_frame") );
+	  gtk_widget_hide( Builder_Get_Object(patch_editor_builder, "patch_sc_grid") );
 	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
 
   } /* switch( ptype ) */
@@ -807,7 +1143,7 @@ Patch_Editor( int action )
   {
 	ptset = FALSE;
 	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
-		  lookup_widget(patch_editor, rbutton[ptype])), TRUE );
+		  Builder_Get_Object(patch_editor_builder, rbutton[ptype])), TRUE );
   }
 
   /* Set card name */
@@ -819,19 +1155,22 @@ Patch_Editor( int action )
   if( ptype == PATCH_SURF )
 	for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
 	{
-	  spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, ispin[idi]) );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(patch_editor_builder, ispin[idi]) );
 	  gtk_spin_button_set_value( spin, iv[idi] );
 	}
 
   /* Write float data to the patch editor */
   for( idx = PATCH_X1; idx <= PATCH_Z2; idx++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, fspin[idx]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(patch_editor_builder, fspin[idx]) );
 	gtk_spin_button_set_value( spin, fv[idx] );
   }
   for( idx = PATCH_X3; idx <= PATCH_Z4; idx++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, fspin[idx-1]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(patch_editor_builder, fspin[idx-1]) );
 	gtk_spin_button_set_value( spin, fv[idx] );
   }
 
@@ -860,7 +1199,7 @@ Arc_Editor( int action )
   int idx, idi;
 
   static gboolean
-		   load   = FALSE, /* Enable wire loading (conductivity specified) */
+	load   = FALSE, /* Enable wire loading (conductivity specified) */
 		   newpcl = TRUE,  /* New percent-of-lambda value  */
 		   save   = FALSE, /* Enable saving of editor data */
 		   busy   = FALSE; /* Block callbacks. Must be a better way to do this? */
@@ -922,20 +1261,23 @@ Arc_Editor( int action )
   /* Read int data from the arc editor */
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, ispin[idi]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(arc_editor_builder, ispin[idi]) );
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
   /* Read float data from the arc editor */
   for( idx = ARC_RAD; idx <= ARC_PCL; idx++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, fspin[idx]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(arc_editor_builder, fspin[idx]) );
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
   fv[ARC_DIA] /= 2.0;
 
   /* Get wire conductivity */
-  spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, fspin[idx]) );
+  spin = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(arc_editor_builder, fspin[idx]) );
   s = gtk_spin_button_get_value( spin );
 
   /* Respond to user action */
@@ -951,14 +1293,15 @@ Arc_Editor( int action )
 		  geom_treeview, geom_store, &iter_ga, "GA");
 
 	  /* Some default values */
-	  iv[SPIN_COL_I1] = ++gbl_tag_num;
+	  iv[SPIN_COL_I1] = ++tag_num;
 	  spin = GTK_SPIN_BUTTON(
-		  lookup_widget(arc_editor, ispin[SPIN_COL_I1]));
+		  Builder_Get_Object(arc_editor_builder, ispin[SPIN_COL_I1]));
 	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit an arc row (GA) selected in treeview */
@@ -985,8 +1328,8 @@ Arc_Editor( int action )
 	  break;
 
 	case EDITOR_LOAD: /* Wire conductivity specified */
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			arc_editor, fspin[SPIN_COL_F6]) );
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(arc_editor_builder, fspin[SPIN_COL_F6]) );
 	  s = gtk_spin_button_get_value( spin );
 	  if( s > 0.0 )
 	  {
@@ -997,7 +1340,7 @@ Arc_Editor( int action )
 	  break;
 
 	case EDITOR_TAGNUM: /* Tag number edited by user */
-	  gbl_tag_num = iv[SPIN_COL_I1];
+	  tag_num = iv[SPIN_COL_I1];
 	  save = TRUE;
 	  if( s > 0.0 )	load = TRUE;
 	  break;
@@ -1031,7 +1374,7 @@ Arc_Editor( int action )
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(arc_editor, ispin[idi]) );
+		Builder_Get_Object(arc_editor_builder, ispin[idi]) );
 	gtk_spin_button_set_value( spin, iv[idi] );
   }
 
@@ -1040,13 +1383,13 @@ Arc_Editor( int action )
   for( idx = ARC_RAD; idx <= ARC_PCL; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(arc_editor, fspin[idx]) );
+		Builder_Get_Object(arc_editor_builder, fspin[idx]) );
 	gtk_spin_button_set_value( spin, fv[idx] );
   }
   fv[ARC_DIA] /= 2.0;
 
   spin = GTK_SPIN_BUTTON(
-	  lookup_widget(arc_editor, fspin[idx]) );
+	  Builder_Get_Object(arc_editor_builder, fspin[idx]) );
   gtk_spin_button_set_value( spin, s );
 
   /* Wait for GTK to complete its tasks */
@@ -1076,14 +1419,14 @@ Helix_Editor( int action )
 
   static gboolean
 	load    = FALSE, /* Enable wire loading (conductivity specified) */
-	linkall = TRUE,  /* Link all radius spinbuttons  */
-	linkzo  = FALSE, /* Link X, Y @ Z=0 spinbuttons  */
-	linkzhl = FALSE, /* Link X, Y @ Z=HL spinbuttons */
-	helixlh = FALSE, /* Specify a left hand helix */
-	newpcl  = TRUE,  /* New percent-of-lambda value  */
-	newspc  = TRUE,  /* New percent-of-lambda value  */
-	save    = FALSE, /* Enable saving of editor data */
-	busy    = FALSE; /* Block callbacks. Must be a better way to do this? */
+			linkall = TRUE,  /* Link all radius spinbuttons  */
+			linkzo  = FALSE, /* Link X, Y @ Z=0 spinbuttons  */
+			linkzhl = FALSE, /* Link X, Y @ Z=HL spinbuttons */
+			helixlh = FALSE, /* Specify a left hand helix */
+			newpcl  = TRUE,  /* New percent-of-lambda value  */
+			newspc  = TRUE,  /* New percent-of-lambda value  */
+			save    = FALSE, /* Enable saving of editor data */
+			busy    = FALSE; /* Block callbacks. Must be a better way to do this? */
 
   /* Float type data, wire conductivity */
   static gdouble fv[10], s = 0.0, helix_len = HELIX_LENGTH;
@@ -1149,18 +1492,18 @@ Helix_Editor( int action )
   } /* if( (action & EDITOR_SAVE) && save ) */
 
   /*** Read int data from the helix editor ***/
-  spin = GTK_SPIN_BUTTON( lookup_widget(
-		helix_editor, ispin[SPIN_COL_I1]) );
+  spin = GTK_SPIN_BUTTON( Builder_Get_Object(
+		helix_editor_builder, ispin[SPIN_COL_I1]) );
   iv[SPIN_COL_I1] = gtk_spin_button_get_value_as_int( spin );
-  spin = GTK_SPIN_BUTTON( lookup_widget(
-		helix_editor, ispin[SPIN_COL_I2]) );
+  spin = GTK_SPIN_BUTTON( Builder_Get_Object(
+		helix_editor_builder, ispin[SPIN_COL_I2]) );
   seg_turn = gtk_spin_button_get_value_as_int( spin );
 
   /*** Read float data from the helix editor ***/
   for( idx = HELIX_TSPACE; idx <= HELIX_RES; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(helix_editor, fspin[idx]) );
+		Builder_Get_Object(helix_editor_builder, fspin[idx]) );
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
   fv[HELIX_DIA] /= 2.0;
@@ -1191,14 +1534,15 @@ Helix_Editor( int action )
 		  geom_treeview, geom_store, &iter_gh, "GH");
 
 	  /* Some default values */
-	  iv[SPIN_COL_I1] = ++gbl_tag_num;
-	  spin = GTK_SPIN_BUTTON( lookup_widget(
-			helix_editor, ispin[SPIN_COL_I1]) );
+	  iv[SPIN_COL_I1] = ++tag_num;
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(helix_editor_builder, ispin[SPIN_COL_I1]) );
 	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a helix row (GH) */
@@ -1215,8 +1559,8 @@ Helix_Editor( int action )
 	  /* Set LH/RH helix check button  */
 	  {
 		GtkToggleButton *toggle =
-		  GTK_TOGGLE_BUTTON( lookup_widget(
-				helix_editor, "helix_lh_checkbutton") );
+		  GTK_TOGGLE_BUTTON(
+			  Builder_Get_Object(helix_editor_builder, "helix_lh_checkbutton") );
 		if( fv[HELIX_LEN] < 0.0 )
 		  gtk_toggle_button_set_active( toggle, TRUE );
 		else
@@ -1244,8 +1588,8 @@ Helix_Editor( int action )
 	  break;
 
 	case EDITOR_LOAD: /* Wire conductivity specified */
-	  spin = GTK_SPIN_BUTTON(lookup_widget(
-			helix_editor, fspin[HELIX_RES]));
+	  spin = GTK_SPIN_BUTTON(
+		  Builder_Get_Object(helix_editor_builder, fspin[HELIX_RES]));
 	  s = gtk_spin_button_get_value( spin );
 	  if( s > 0.0 )
 	  {
@@ -1256,7 +1600,7 @@ Helix_Editor( int action )
 	  break;
 
 	case EDITOR_TAGNUM: /* Tag number edited by user */
-	  gbl_tag_num = iv[SPIN_COL_I1];
+	  tag_num = iv[SPIN_COL_I1];
 	  save = TRUE;
 	  if( s > 0.0 )	load = TRUE;
 	  break;
@@ -1299,10 +1643,10 @@ Helix_Editor( int action )
 		gdouble len, f;
 
 		/* Pitch angle of helix, assumes untapered helix */
-		f = atan( fv[HELIX_TSPACE] / (gdouble)TWOPI / fv[HELIX_RXZO] );
+		f = atan( fv[HELIX_TSPACE] / (gdouble)M_2PI / fv[HELIX_RXZO] );
 
 		/* Helix turn length */
-		len = (gdouble)TWOPI * fv[HELIX_RXZO] / (gdouble)cos( f );
+		len = (gdouble)M_2PI * fv[HELIX_RXZO] / (gdouble)cos( f );
 
 		/* New number of segments */
 		double n = ceil(100.0 / fv[HELIX_PCL] * len /
@@ -1320,10 +1664,10 @@ Helix_Editor( int action )
 	gdouble len, f;
 
 	/* Pitch angle of helix, assumes untapered helix */
-	f = atan( fv[HELIX_TSPACE]/(gdouble)TWOPI/fv[HELIX_RXZO] );
+	f = atan( fv[HELIX_TSPACE]/(gdouble)M_2PI/fv[HELIX_RXZO] );
 
 	/* Helix turn length */
-	len = (gdouble)TWOPI * fv[HELIX_RXZO] / (gdouble)cos( f );
+	len = (gdouble)M_2PI * fv[HELIX_RXZO] / (gdouble)cos( f );
 
 	fv[HELIX_PCL] = 100.0 * (len / (gdouble)seg_turn) /
 	  ((gdouble)CVEL / (gdouble)calc_data.mxfrq);
@@ -1337,11 +1681,11 @@ Helix_Editor( int action )
 	newspc = TRUE;
 
   /* Write int data to the helix editor */
-  spin = GTK_SPIN_BUTTON( lookup_widget(
-		helix_editor, ispin[SPIN_COL_I1]) );
+  spin = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(helix_editor_builder, ispin[SPIN_COL_I1]) );
   gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
-  spin = GTK_SPIN_BUTTON( lookup_widget(
-		helix_editor, ispin[SPIN_COL_I2]) );
+  spin = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(helix_editor_builder, ispin[SPIN_COL_I2]) );
   gtk_spin_button_set_value( spin, seg_turn );
 
   /* Write float data to the helix editor */
@@ -1350,8 +1694,8 @@ Helix_Editor( int action )
   fv[HELIX_LEN] = helix_len;
   for( idx = HELIX_TSPACE; idx <= HELIX_RES; idx++ )
   {
-	spin = GTK_SPIN_BUTTON( lookup_widget(
-		  helix_editor, fspin[idx]) );
+	spin = GTK_SPIN_BUTTON(
+		Builder_Get_Object(helix_editor_builder, fspin[idx]) );
 	gtk_spin_button_set_value( spin, fv[idx] );
   }
   fv[HELIX_DIA] = ftmp;
@@ -1364,6 +1708,35 @@ Helix_Editor( int action )
 
 /*------------------------------------------------------------------------*/
 
+/* Get_Geometry_Int_Data()
+ *
+ * Gets integer (I1, I2) geometry data from a treeview row
+ */
+
+  static void
+Get_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
+{
+  gint idi;
+  gchar *sv;
+
+  /* Get data from tree view (I1, I2) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
+	  iv[idi-GEOM_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+  }
+  else stop( _("Error reading row data\n"
+		"Invalid list iterator"), ERR_OK );
+
+} /* Get_Geometry_Int_Data() */
+
+/*------------------------------------------------------------------------*/
+
 /* Reflect_Editor()
  *
  * Handles all actions of the reflect editor window
@@ -1431,8 +1804,9 @@ Reflect_Editor( int action )
 		  geom_treeview, geom_store, &iter_gx, "GX");
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit a reflect row (GX) selected in treeview */
@@ -1450,7 +1824,7 @@ Reflect_Editor( int action )
 		for( idx = 0; idx < 3; idx++ )
 		{
 		  toggle = GTK_TOGGLE_BUTTON(
-			  lookup_widget(reflect_editor, ckbutton[idx]) );
+			  Builder_Get_Object(reflect_editor_builder, ckbutton[idx]) );
 		  if( ck & 1 )
 			gtk_toggle_button_set_active( toggle, TRUE );
 		  else
@@ -1461,7 +1835,7 @@ Reflect_Editor( int action )
 
 	  /* Set tag num increment */
 	  spin = GTK_SPIN_BUTTON(
-		  lookup_widget(reflect_editor, "reflect_taginc_spinbutton") );
+		  Builder_Get_Object(reflect_editor_builder, "reflect_taginc_spinbutton") );
 	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
 	  break;
 
@@ -1485,7 +1859,7 @@ Reflect_Editor( int action )
   for( idx = 0; idx < 3; idx++ )
   {
 	toggle = GTK_TOGGLE_BUTTON(
-		lookup_widget(reflect_editor, ckbutton[idx]) );
+		Builder_Get_Object(reflect_editor_builder, ckbutton[idx]) );
 	if( gtk_toggle_button_get_active(toggle) )
 	  iv[SPIN_COL_I2] += ck;
 	ck *= 10;
@@ -1493,8 +1867,7 @@ Reflect_Editor( int action )
 
   /* Read tag inc from the reflect editor */
   spin = GTK_SPIN_BUTTON(
-	  lookup_widget(reflect_editor,
-		"reflect_taginc_spinbutton") );
+	  Builder_Get_Object(reflect_editor_builder, "reflect_taginc_spinbutton") );
   iv[SPIN_COL_I1] = gtk_spin_button_get_value_as_int( spin );
 
   /* Wait for GTK to complete its tasks */
@@ -1584,8 +1957,9 @@ Scale_Editor( int action )
 		  geom_treeview, geom_store, &iter_gs, "GS");
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  save = FALSE;
 	  break;
 
@@ -1606,20 +1980,20 @@ Scale_Editor( int action )
 		g_free( str );
 	  }
 	  else
-		stop( _("Error reading row data\n"\
-			    "Invalid list iterator"), ERR_OK );
+		stop( _("Error reading row data\n"
+			  "Invalid list iterator"), ERR_OK );
 
 	  /* Enter tag from-to data to scale editor */
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(scale_editor, ispin[idi]) );
+			Builder_Get_Object(scale_editor_builder, ispin[idi]) );
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 
 	  /* Set scale factor to scale editor */
 	  spin = GTK_SPIN_BUTTON(
-		  lookup_widget(scale_editor, "scale_factor_spinbutton") );
+		  Builder_Get_Object(scale_editor_builder, "scale_factor_spinbutton") );
 	  gtk_spin_button_set_value( spin, scale );
 	  break;
 
@@ -1634,13 +2008,13 @@ Scale_Editor( int action )
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(scale_editor, ispin[idi]) );
+			Builder_Get_Object(scale_editor_builder, ispin[idi]) );
 		iv[idi] = gtk_spin_button_get_value_as_int( spin );
 	  }
 
 	  /* Read scale from the scale editor */
 	  spin = GTK_SPIN_BUTTON(
-		  lookup_widget(scale_editor, "scale_factor_spinbutton") );
+		  Builder_Get_Object(scale_editor_builder, "scale_factor_spinbutton") );
 	  scale = gtk_spin_button_get_value( spin );
 	  save = TRUE;
 
@@ -1684,7 +2058,7 @@ Cylinder_Editor( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1719,8 +2093,9 @@ Cylinder_Editor( int action )
 		  geom_treeview, geom_store, &iter_gr, "GR");
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  save = TRUE;
 	  break;
 
@@ -1736,7 +2111,7 @@ Cylinder_Editor( int action )
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(cylinder_editor, ispin[idi]));
+			Builder_Get_Object(cylinder_editor_builder, ispin[idi]));
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 	  break;
@@ -1756,7 +2131,7 @@ Cylinder_Editor( int action )
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(cylinder_editor, ispin[idi]));
+		Builder_Get_Object(cylinder_editor_builder, ispin[idi]));
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
 
@@ -1813,7 +2188,7 @@ Transform_Editor( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1848,8 +2223,9 @@ Transform_Editor( int action )
 		  geom_treeview, geom_store, &iter_gm, "GM");
 
 	  /* Scroll tree view to bottom */
-	  gtk_adjustment_set_value(
-		  geom_adjustment, geom_adjustment->upper);
+	  gtk_adjustment_set_value( geom_adjustment,
+		  gtk_adjustment_get_upper(geom_adjustment) -
+		  gtk_adjustment_get_page_size(geom_adjustment) );
 	  break;
 
 	case EDITOR_EDIT:  /* Edit transform row (GM) selected in treeview */
@@ -1864,14 +2240,14 @@ Transform_Editor( int action )
 	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I3; idi++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(transform_editor, ispin[idi]));
+			Builder_Get_Object(transform_editor_builder, ispin[idi]));
 		gtk_spin_button_set_value( spin, iv[idi] );
 	  }
 	  /* Write float data to the transform editor */
 	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
 	  {
 		spin = GTK_SPIN_BUTTON(
-			lookup_widget(transform_editor, fspin[idf]));
+			Builder_Get_Object(transform_editor_builder, fspin[idf]));
 		gtk_spin_button_set_value( spin, fv[idf] );
 	  }
 	  break;
@@ -1891,14 +2267,14 @@ Transform_Editor( int action )
   for( idi = SPIN_COL_I1; idi <= SPIN_COL_I3; idi++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(transform_editor, ispin[idi]));
+		Builder_Get_Object(transform_editor_builder, ispin[idi]));
 	iv[idi] = gtk_spin_button_get_value_as_int( spin );
   }
   /* Read float data from the transform editor */
   for( idx = 0; idx < 6; idx++ )
   {
 	spin = GTK_SPIN_BUTTON(
-		lookup_widget(transform_editor, fspin[idx]));
+		Builder_Get_Object(transform_editor_builder, fspin[idx]));
 	fv[idx] = gtk_spin_button_get_value( spin );
   }
   fv[SPIN_COL_F7] = (gdouble)iv[SPIN_COL_I3];
@@ -1942,7 +2318,7 @@ Gend_Editor( int action )
 
   static gboolean
 	save = FALSE, /* Enable saving of editor data */
-	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
 
 
   /* Block callbacks. (Should be a better way to do this) */
@@ -1975,217 +2351,53 @@ Gend_Editor( int action )
 	  /* Open GE Editor */
 	  if( gend_editor == NULL )
 	  {
-		gend_editor = create_gend_editor();
+		gend_editor = create_gend_editor( &gend_editor_builder );
 		gtk_widget_show( gend_editor );
 	  }
 
 	  /* Get selected row */
-	  Get_Selected_Row( geom_treeview, geom_store, &iter_ge, name );
-
-	  /* Get integer data from transform editor */
-	  if( gtk_list_store_iter_is_valid(geom_store, &iter_ge) )
-	  {
-		gtk_tree_model_get( GTK_TREE_MODEL(geom_store),
-			&iter_ge, GEOM_COL_I1, &sv, -1 );
-		idx = atoi(sv) + 1;
-		g_free(sv);
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  gend_editor, rdbutton[idx]) );
-		gtk_toggle_button_set_active( toggle, TRUE );
-	  }
-	  else stop( _("Error reading row data\n"\
-			"Invalid list iterator"), ERR_OK );
-	  break;
-
-	case EDITOR_CANCEL: /* Cancel transform editor */
-	  /* Remove card */
-	  Remove_Row( geom_store, &iter_ge );
-	  save = busy = FALSE;
-	  return;
-
-	case EDITOR_RDBUTTON: /* Radio button toggled in editor window */
-	  /* Test radio buttons */
-	  for( idx = 0; idx < GE_RDBTN; idx++ )
-	  {
-		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
-			  gend_editor, rdbutton[idx]) );
-		if( gtk_toggle_button_get_active(toggle) )
-		  break;
-	  }
-	  snprintf( si, sizeof(si), "%5d", idx-1 );
-	  save = TRUE;
-
-  } /* switch( action ) */
-
-  /* Wait for GTK to complete its tasks */
-  while( g_main_context_iteration(NULL, FALSE) );
-  busy = FALSE;
-
-} /* Gend_Editor() */
-
-/*------------------------------------------------------------------------*/
-
-/* Insert_GE_Card()
- *
- * Inserts a default GE card if missing
- */
-
-  void
-Insert_GE_Card( GtkListStore *store, GtkTreeIter *iter )
-{
-  gint idx, idi;
-
-  /* Insert default GE card if list is clear */
-  idx = gtk_tree_model_iter_n_children(
-	  GTK_TREE_MODEL(store), NULL );
-  if( !idx )
-  {
-	gtk_list_store_append( store, iter );
-	gtk_list_store_set( store, iter, GEOM_COL_NAME, "GE", -1 );
-	for( idi = GEOM_COL_I1; idi < GEOM_NUM_COLS; idi++ )
-	  gtk_list_store_set( store, iter, idi, "0", -1 );
-  }
-
-} /* Insert_GE_Card() */
-
-/*------------------------------------------------------------------------*/
-
-/* Get_Geometry_Data()
- *
- * Gets geometry data from a treeview row
- */
-
-  void
-Get_Geometry_Data(
-	GtkListStore *store,
-	GtkTreeIter *iter,
-	int *iv, double *fv )
-{
-  gint idi, idf;
-  gchar *sv;
-
-  /* Get data from tree view (I1,I2, F1-F7)*/
-  if( gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
-	{
-	  gtk_tree_model_get(
-		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
-	  iv[idi-GEOM_COL_I1] = atoi(sv);
-	  g_free(sv);
-	}
-	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
-	{
-	  gtk_tree_model_get(
-		  GTK_TREE_MODEL(store), iter, idf, &sv, -1);
-	  fv[idf-GEOM_COL_F1] = Strtod( sv, NULL );
-	  g_free(sv);
-	}
-  }
-  else stop( _("Error reading row data\n"\
-		"Invalid list iterator"), ERR_OK );
-
-} /* Get_Geometry_Data() */
-
-/*------------------------------------------------------------------------*/
-
-/* Get_Geometry_Int_Data()
- *
- * Gets integer (I1, I2) geometry data from a treeview row
- */
-
-  void
-Get_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
-{
-  gint idi;
-  gchar *sv;
-
-  /* Get data from tree view (I1, I2) */
-  if( gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
-	{
-	  gtk_tree_model_get(
-		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
-	  iv[idi-GEOM_COL_I1] = atoi(sv);
-	  g_free(sv);
-	}
-  }
-  else stop( _("Error reading row data\n"\
-		"Invalid list iterator"), ERR_OK );
-
-} /* Get_Geometry_Int_Data() */
-
-/*------------------------------------------------------------------------*/
-
-/* Set_Geometry_Data()
- *
- * Sets data into a geometry row
- */
-
-  void
-Set_Geometry_Data(
-	GtkListStore *store,
-	GtkTreeIter *iter,
-	int *iv, double *fv )
-{
-  gchar str[13];
-  gint idi, idf;
-
-  /* Format and set editor data to treeview (I1, I2 & F1-F7) */
-  if( iter && gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
-	{
-	  snprintf( str, 6, "%5d", iv[idi-GEOM_COL_I1] );
-	  gtk_list_store_set( store, iter, idi, str, -1 );
-	}
-
-	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
-	{
-	  snprintf( str, 13, "%12.5E", fv[idf-GEOM_COL_F1] );
-	  gtk_list_store_set( store, iter, idf, str, -1 );
-	}
-  }
-  else stop( _("Error writing row data\n"\
-		"Please re-select row"), ERR_OK );
-
-  SetFlag( NEC2_EDIT_SAVE );
-
-} /* Set_Geometry_Data() */
-
-/*------------------------------------------------------------------------*/
-
-/* Set_Geometry_Int_Data()
- *
- * Sets integer (I1, I2) data into a geometry row
- */
+	  Get_Selected_Row( geom_treeview, geom_store, &iter_ge, name );
 
-  void
-Set_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
-{
-  gchar str[6];
-  gint idi, idf;
+	  /* Get integer data from transform editor */
+	  if( gtk_list_store_iter_is_valid(geom_store, &iter_ge) )
+	  {
+		gtk_tree_model_get( GTK_TREE_MODEL(geom_store),
+			&iter_ge, GEOM_COL_I1, &sv, -1 );
+		idx = atoi(sv) + 1;
+		g_free(sv);
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(gend_editor_builder, rdbutton[idx]) );
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  }
+	  else stop( _("Error reading row data\n"
+			"Invalid list iterator"), ERR_OK );
+	  break;
 
-  /* Format and set editor data to treeview (I1, I2) */
-  if( gtk_list_store_iter_is_valid(store, iter) )
-  {
-	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
-	{
-	  snprintf( str, sizeof(str), "%5d", iv[idi-GEOM_COL_I1] );
-	  gtk_list_store_set( store, iter, idi, str, -1 );
-	}
+	case EDITOR_CANCEL: /* Cancel transform editor */
+	  /* Remove card */
+	  Remove_Row( geom_store, &iter_ge );
+	  save = busy = FALSE;
+	  return;
 
-	/* Clear unused float columns */
-	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
-	  gtk_list_store_set( store, iter, idf, "0.0", -1 );
-  }
-  else stop( _("Error writing row data\n"\
-		"Please re-select row"), ERR_OK );
+	case EDITOR_RDBUTTON: /* Radio button toggled in editor window */
+	  /* Test radio buttons */
+	  for( idx = 0; idx < GE_RDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON(
+			Builder_Get_Object(gend_editor_builder, rdbutton[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  snprintf( si, sizeof(si), "%5d", idx-1 );
+	  save = TRUE;
 
-  SetFlag( NEC2_EDIT_SAVE );
+  } /* switch( action ) */
 
-} /* Set_Geometry_Int_Data() */
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Gend_Editor() */
 
 /*------------------------------------------------------------------------*/
 
@@ -2262,60 +2474,6 @@ Give_Up( int *busy, GtkWidget *widget )
 
 /*------------------------------------------------------------------------*/
 
-/* Insert_Blank_Geometry_Row()
- *
- * Inserts a blank row in a tree view with only its name (GW ... )
- */
-
-  void
-Insert_Blank_Geometry_Row(
-	GtkTreeView *view, GtkListStore *store,
-	GtkTreeIter *iter, const gchar *name )
-{
-  GtkTreeSelection *selection;
-  gboolean retv;
-  gint n;
-  gchar *str;
-
-  if( nec2_edit_window == NULL )
-	return;
-
-  /* Get selected row, if any */
-  selection = gtk_tree_view_get_selection( view );
-  retv = gtk_tree_selection_get_selected(
-	  selection, NULL, iter );
-
-  /* If no selected row, insert new row into list
-   * store before last row, else after the selected row,
-   * but if this is a GE row, then insert before it */
-  if( !retv )
-  {
-	n = gtk_tree_model_iter_n_children(
-		GTK_TREE_MODEL(store), NULL );
-	gtk_tree_model_iter_nth_child(
-		GTK_TREE_MODEL(store), iter, NULL, n-1 );
-	gtk_list_store_insert_before( store, iter, iter );
-  }
-  else
-  {
-	gtk_tree_model_get( GTK_TREE_MODEL(store),
-		iter, GEOM_COL_NAME, &str, -1 );
-	if( strcmp(str, "GE") == 0 )
-	  gtk_list_store_insert_before( store, iter, iter );
-	else
-	  gtk_list_store_insert_after( store, iter, iter );
-	g_free(str);
-  }
-
-  gtk_list_store_set( store, iter, GEOM_COL_NAME, name, -1 );
-  for( n = GEOM_COL_I1; n < GEOM_NUM_COLS; n++ )
-	gtk_list_store_set( store, iter, n, "--", -1 );
-  gtk_tree_selection_select_iter( selection, iter );
-
-} /* Insert_Blank_Geometry_Row() */
-
-/*------------------------------------------------------------------------*/
-
 /* Remove_Row()
  *
  * Removes a row and selects previous or next row
@@ -2363,155 +2521,3 @@ Get_Selected_Row(
 
 /*------------------------------------------------------------------------*/
 
-/* Set_Wire_Conductivity()
- *
- * Sets the wire conductivity specified in a geometry editor
- * (wire, arc, helix) to a loading card (LD row) in commands treview
- */
-
-  void
-Set_Wire_Conductivity( int tag, double s, GtkListStore *store )
-{
-  int idx, idi, nchld;
-  GtkTreeIter iter_ld;
-  gchar *str, sv[13];
-
-  /* Find num of rows and first iter, abort if tree empty */
-  nchld = gtk_tree_model_iter_n_children(
-	  GTK_TREE_MODEL(store), NULL);
-  if(!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld))
-	return;
-
-  /* Look for an LD card with tag number = tag */
-  for( idx = 0; idx < nchld; )
-  {
-	gtk_tree_model_get( GTK_TREE_MODEL(store),
-		&iter_ld, GEOM_COL_NAME, &str, -1 );
-
-	if( strcmp(str, "LD") == 0 )
-	{
-	  g_free( str );
-	  gtk_tree_model_get( GTK_TREE_MODEL(store),
-		  &iter_ld, GEOM_COL_I2, &str, -1 );
-	  if( atoi( str ) == tag )
-	  {
-		g_free( str );
-		break;
-	  }
-	  else g_free( str );
-	}
-	else g_free( str );
-
-	idx++;
-	if( !gtk_tree_model_iter_next(
-		  GTK_TREE_MODEL(store), &iter_ld) )
-	  break;
-
-  } /* for( idx = 0; idx < nchld; idx++ ) */
-
-  /* If not found LD card with tagnum = tag, insert new */
-  if( idx >= nchld )
-  {
-	gtk_tree_model_iter_nth_child(
-		GTK_TREE_MODEL(store), &iter_ld, NULL, nchld-1 );
-	gtk_list_store_insert_before( store, &iter_ld, &iter_ld );
-	gtk_list_store_set(
-		store, &iter_ld, CMND_COL_NAME, "LD", -1 );
-
-	/* Clear rest of LD row */
-	for( idi = CMND_COL_I1; idi <= CMND_COL_F6; idi++ )
-	  gtk_list_store_set( store, &iter_ld, idi, "0", -1 );
-  }
-
-  /* Set LD card parameters */
-  gtk_list_store_set( store, &iter_ld, CMND_COL_I1, "5", -1 );
-  snprintf( sv, 6, "%5d", tag );
-  gtk_list_store_set( store, &iter_ld, CMND_COL_I2, sv, -1 );
-  snprintf( sv, 13, "%12.5E", s );
-  gtk_list_store_set( store, &iter_ld, CMND_COL_F1, sv, -1 );
-
-  /* Scroll tree view to bottom */
-  gtk_adjustment_set_value(
-	  cmnd_adjustment, cmnd_adjustment->upper );
-
-} /* Set_Wire_Conductivity() */
-
-/*------------------------------------------------------------------------*/
-
-/* Get_Wire_Conductivity()
- *
- * Gets the wire conductivity specified in a loading
- * card (LD row) in commands treview for a given tag #
- */
-
-  gboolean
-Get_Wire_Conductivity( int tag, double *s, GtkListStore *store )
-{
-  int idx, type, nchld;
-  GtkTreeIter iter_ld;
-  gchar *str;
-  static int t = -1;
-
-  /* Find num of rows and first iter, abort if tree empty */
-  nchld = gtk_tree_model_iter_n_children(
-	  GTK_TREE_MODEL(store), NULL );
-  if( !gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld) )
-	return( FALSE );
-
-  /* Look for an LD card with tag number = tag */
-  for( idx = 0; idx < nchld; )
-  {
-	gtk_tree_model_get( GTK_TREE_MODEL(store),
-		&iter_ld, GEOM_COL_NAME, &str, -1 );
-
-	if( strcmp(str, "LD") == 0 )
-	{
-	  g_free( str );
-	  gtk_tree_model_get( GTK_TREE_MODEL(store),
-		  &iter_ld, GEOM_COL_I2, &str, -1 );
-	  if( atoi(str) == tag )
-	  {
-		g_free( str );
-		break;
-	  }
-	  else g_free( str );
-	}
-	else g_free( str );
-
-	idx++;
-	if( !gtk_tree_model_iter_next(
-		  GTK_TREE_MODEL(store), &iter_ld) )
-	  break;
-
-  } /* for( idx = 0; idx < nchld; idx++ ) */
-
-  /* If not found LD card with tagnum = tag, return s=0 */
-  if( idx >= nchld )
-  {
-	*s = 0.0;
-	t = tag;
-	return( FALSE );
-  }
-
-  /* If LD card for given tag is already read, abort */
-  if( t == tag ) return( FALSE );
-  else t = tag;
-
-  /* Get the loading type (we want LDTYP 5) */
-  gtk_tree_model_get( GTK_TREE_MODEL(store),
-	  &iter_ld, GEOM_COL_I1, &str, -1 );
-  type = atoi( str );
-  g_free( str );
-  if( type != 5 ) return( FALSE );
-
-  /* Get the wire conductivity S/m */
-  gtk_tree_model_get( GTK_TREE_MODEL(store),
-	  &iter_ld, CMND_COL_F1, &str, -1 );
-  *s = Strtod( str, NULL );
-  g_free( str );
-
-  return( TRUE );
-} /* Get_Wire_Conductivity() */
-
-/*------------------------------------------------------------------------*/
-
diff --git a/src/geom_edit.h b/src/geom_edit.h
index 7ddb395..901eb92 100644
--- a/src/geom_edit.h
+++ b/src/geom_edit.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -21,7 +19,6 @@
 
 #include "common.h"
 #include "interface.h"
-#include "support.h"
 #include "editors.h"
 
 /* Default values for helix editor */
diff --git a/src/geometry.c b/src/geometry.c
index 8fb8914..69b5a25 100644
--- a/src/geometry.c
+++ b/src/geometry.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -125,6 +123,121 @@ arc( int itg, int ns, double rada,
 
 /*-----------------------------------------------------------------------*/
 
+/*** this function was an 'entry point' (part of) 'patch()' ***/
+  static void
+subph( int nx, int ny )
+{
+  int mia, ix, iy, mi;
+  size_t mreq;
+  double xs, ys, zs, xa, xst, s1x, s1y;
+  double s1z, s2x, s2y, s2z, saln, xt, yt;
+
+  /* Reallocate patch buffers */
+  if( ny == 0 ) data.m += 3;
+  else data.m += 4;
+
+  mreq = (size_t)data.m * sizeof(double);
+  mem_realloc( (void **)&data.px,  mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.py,  mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.pz,  mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t1x, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t1y, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t1z, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t2x, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t2y, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.t2z, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.pbi, mreq, "in geometry.c" );
+  mem_realloc( (void **)&data.psalp, mreq, "in geometry.c" );
+  if( !CHILD )
+  {
+	mreq = (size_t)(data.n + 2 * data.m) * sizeof(Segment_t);
+	mem_realloc( (void **)&structure_segs, mreq, "in geometry.c" );
+  }
+
+  /* Shift patches to make room for new ones */
+  if( (ny == 0) && (nx != data.m) )
+  {
+	for( iy = data.m-1; iy > nx+2; iy-- )
+	{
+	  ix = iy-3;
+	  data.px[iy]= data.px[ix];
+	  data.py[iy]= data.py[ix];
+	  data.pz[iy]= data.pz[ix];
+	  data.pbi[iy]= data.pbi[ix];
+	  data.psalp[iy]= data.psalp[ix];
+	  data.t1x[iy]= data.t1x[ix];
+	  data.t1y[iy]= data.t1y[ix];
+	  data.t1z[iy]= data.t1z[ix];
+	  data.t2x[iy]= data.t2x[ix];
+	  data.t2y[iy]= data.t2y[ix];
+	  data.t2z[iy]= data.t2z[ix];
+	}
+
+  } /* if( (ny == 0) || (nx != m) ) */
+
+  /* divide patch for connection */
+  mi= nx-1;
+  xs= data.px[mi];
+  ys= data.py[mi];
+  zs= data.pz[mi];
+  xa= data.pbi[mi]/4.0;
+  xst= sqrt( xa)/2.0;
+  s1x= data.t1x[mi];
+  s1y= data.t1y[mi];
+  s1z= data.t1z[mi];
+  s2x= data.t2x[mi];
+  s2y= data.t2y[mi];
+  s2z= data.t2z[mi];
+  saln= data.psalp[mi];
+  xt= xst;
+  yt= xst;
+
+  if( ny == 0)
+	mia= mi;
+  else
+  {
+	data.mp++;
+	mia= data.m-1;
+  }
+
+  for( ix = 1; ix <= 4; ix++ )
+  {
+	data.px[mia]= xs+ xt* s1x+ yt* s2x;
+	data.py[mia]= ys+ xt* s1y+ yt* s2y;
+	data.pz[mia]= zs+ xt* s1z+ yt* s2z;
+	data.pbi[mia]= xa;
+	data.t1x[mia]= s1x;
+	data.t1y[mia]= s1y;
+	data.t1z[mia]= s1z;
+	data.t2x[mia]= s2x;
+	data.t2y[mia]= s2y;
+	data.t2z[mia]= s2z;
+	data.psalp[mia]= saln;
+
+	if( ix == 2)
+	  yt= -yt;
+
+	if( (ix == 1) || (ix == 3) )
+	  xt= -xt;
+
+	mia++;
+  }
+
+  if( nx <= data.mp)
+	data.mp += 3;
+
+  if( ny > 0 )
+	data.pz[mi]=10000.0;
+
+  /* Process new patches created */
+  if( ! CHILD )
+	New_Patch_Data();
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
 /* connect sets up segment connection data in arrays icon1 and */
 /* icon2 by searching for segment ends that are in contact. */
   gboolean
@@ -193,7 +306,7 @@ conect( int ignd )
 		  fprintf( stderr,
 			  "xnec2c: conect(): geometry data error\n"
 			  "Segment %d extends below ground\n", iz );
-		  stop( _("conect(): Geometry data error\n"\
+		  stop( _("conect(): Geometry data error\n"
 				"Segment extends below ground"), ERR_OK );
 		  return( FALSE );
 		}
@@ -245,7 +358,7 @@ conect( int ignd )
 		  fprintf( stderr,
 			  "xnec2c: conect(): geometry data error\n"
 			  "segment %d extends below ground\n", iz );
-		  stop( _("conect(): Geometry data error\n"\
+		  stop( _("conect(): Geometry data error\n"
 				"Segment extends below ground"), ERR_OK );
 		  return( FALSE );
 		}
@@ -257,7 +370,7 @@ conect( int ignd )
 			fprintf( stderr,
 				"xnec2c: conect(): geometry data error\n"
 				"segment %d lies in ground plane\n", iz );
-			stop( _("conect(): Geometry data error\n"\
+			stop( _("conect(): Geometry data error\n"
 				  "Segment lies in ground plane"), ERR_OK );
 			return( FALSE );
 		  }
@@ -556,10 +669,10 @@ helix(
 	  if( b1 == 0.0)
 		b1= a1;
 
-	  data.x1[i]= a1* cos(2.0* PI* data.z1[i]/ s);
-	  data.y1[i]= b1* sin(2.0* PI* data.z1[i]/ s);
-	  data.x2[i]= a1* cos(2.0* PI* data.z2[i]/ s);
-	  data.y2[i]= b1* sin(2.0* PI* data.z2[i]/ s);
+	  data.x1[i]= a1* cos(2.0* M_PI* data.z1[i]/ s);
+	  data.y1[i]= b1* sin(2.0* M_PI* data.z1[i]/ s);
+	  data.x2[i]= a1* cos(2.0* M_PI* data.z2[i]/ s);
+	  data.y2[i]= b1* sin(2.0* M_PI* data.z2[i]/ s);
 	}
 	else
 	{
@@ -567,13 +680,13 @@ helix(
 		b2= a2;
 
 	  data.x1[i]=( a1+( a2- a1)* data.z1[i] /
-		  fabs( hl))* cos(2.0* PI* data.z1[i]/ s);
+		  fabs( hl))* cos(2.0* M_PI* data.z1[i]/ s);
 	  data.y1[i]=( b1+( b2- b1)* data.z1[i] /
-		  fabs( hl))* sin(2.0* PI* data.z1[i]/ s);
+		  fabs( hl))* sin(2.0* M_PI* data.z1[i]/ s);
 	  data.x2[i]=( a1+( a2- a1)* data.z2[i] /
-		  fabs( hl))* cos(2.0* PI* data.z2[i]/ s);
+		  fabs( hl))* cos(2.0* M_PI* data.z2[i]/ s);
 	  data.y2[i]=( b1+( b2- b1)* data.z2[i] /
-		  fabs( hl))* sin(2.0* PI* data.z2[i]/ s);
+		  fabs( hl))* sin(2.0* M_PI* data.z2[i]/ s);
 
 	} /* if( a2 == a1) */
 
@@ -606,7 +719,7 @@ isegno( int itagi, int mx)
 	fprintf( stderr,
 		"xnec2c: isegno(): check data, parameter specifying segment\n"
 		"position in a group of equal tags must not be zero\n" );
-	stop( _("isegno(): Parameter specifying segment\n"\
+	stop( _("isegno(): Parameter specifying segment\n"
 		  "position in a group of equal tags is zero"), ERR_OK );
 	return( -1 );
   }
@@ -953,7 +1066,7 @@ patch(
 		  fprintf( stderr,
 			  "xnec2c: patch(): corners of quadrilateral\n"
 			  "patch do not lie in a plane\n" );
-		  stop( _("patch(): Corners of quadrilateral\n"\
+		  stop( _("patch(): Corners of quadrilateral\n"
 				"patch do not lie in a plane"), ERR_OK );
 		  return( FALSE );
 		}
@@ -1035,121 +1148,6 @@ patch(
 
 /*-----------------------------------------------------------------------*/
 
-/*** this function was an 'entry point' (part of) 'patch()' ***/
-  void
-subph( int nx, int ny )
-{
-  int mia, ix, iy, mi;
-  size_t mreq;
-  double xs, ys, zs, xa, xst, s1x, s1y;
-  double s1z, s2x, s2y, s2z, saln, xt, yt;
-
-  /* Reallocate patch buffers */
-  if( ny == 0 ) data.m += 3;
-  else data.m += 4;
-
-  mreq = (size_t)data.m * sizeof(double);
-  mem_realloc( (void **)&data.px,  mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.py,  mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.pz,  mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t1x, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t1y, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t1z, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t2x, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t2y, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.t2z, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.pbi, mreq, "in geometry.c" );
-  mem_realloc( (void **)&data.psalp, mreq, "in geometry.c" );
-  if( !CHILD )
-  {
-	mreq = (size_t)(data.n + 2 * data.m) * sizeof(GdkSegment);
-	mem_realloc( (void **)&structure_segs, mreq, "in geometry.c" );
-  }
-
-  /* Shift patches to make room for new ones */
-  if( (ny == 0) && (nx != data.m) )
-  {
-	for( iy = data.m-1; iy > nx+2; iy-- )
-	{
-	  ix = iy-3;
-	  data.px[iy]= data.px[ix];
-	  data.py[iy]= data.py[ix];
-	  data.pz[iy]= data.pz[ix];
-	  data.pbi[iy]= data.pbi[ix];
-	  data.psalp[iy]= data.psalp[ix];
-	  data.t1x[iy]= data.t1x[ix];
-	  data.t1y[iy]= data.t1y[ix];
-	  data.t1z[iy]= data.t1z[ix];
-	  data.t2x[iy]= data.t2x[ix];
-	  data.t2y[iy]= data.t2y[ix];
-	  data.t2z[iy]= data.t2z[ix];
-	}
-
-  } /* if( (ny == 0) || (nx != m) ) */
-
-  /* divide patch for connection */
-  mi= nx-1;
-  xs= data.px[mi];
-  ys= data.py[mi];
-  zs= data.pz[mi];
-  xa= data.pbi[mi]/4.0;
-  xst= sqrt( xa)/2.0;
-  s1x= data.t1x[mi];
-  s1y= data.t1y[mi];
-  s1z= data.t1z[mi];
-  s2x= data.t2x[mi];
-  s2y= data.t2y[mi];
-  s2z= data.t2z[mi];
-  saln= data.psalp[mi];
-  xt= xst;
-  yt= xst;
-
-  if( ny == 0)
-	mia= mi;
-  else
-  {
-	data.mp++;
-	mia= data.m-1;
-  }
-
-  for( ix = 1; ix <= 4; ix++ )
-  {
-	data.px[mia]= xs+ xt* s1x+ yt* s2x;
-	data.py[mia]= ys+ xt* s1y+ yt* s2y;
-	data.pz[mia]= zs+ xt* s1z+ yt* s2z;
-	data.pbi[mia]= xa;
-	data.t1x[mia]= s1x;
-	data.t1y[mia]= s1y;
-	data.t1z[mia]= s1z;
-	data.t2x[mia]= s2x;
-	data.t2y[mia]= s2y;
-	data.t2z[mia]= s2z;
-	data.psalp[mia]= saln;
-
-	if( ix == 2)
-	  yt= -yt;
-
-	if( (ix == 1) || (ix == 3) )
-	  xt= -xt;
-
-	mia++;
-  }
-
-  if( nx <= data.mp)
-	data.mp += 3;
-
-  if( ny > 0 )
-	data.pz[mi]=10000.0;
-
-  /* Process new patches created */
-  if( ! CHILD )
-	New_Patch_Data();
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* reflc reflects partial structure along x,y, or z axes */
 /* or rotates structure to complete a symmetric structure. */
   gboolean
@@ -1201,7 +1199,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 			fprintf( stderr,
 				"xnec2c: reflc(): geometry data error\n"
 				"segment %d lies in plane of symmetry\n", i+1 );
-			stop( _("reflc(): Geometry data error\n"\
+			stop( _("reflc(): Geometry data error\n"
 				  "Segment lies in plane of symmetry"), ERR_OK );
 			return( FALSE );
 		  }
@@ -1252,7 +1250,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 			fprintf( stderr,
 				"xnec2c: reflc(): geometry data error\n"
 				"patch %d lies in plane of symmetry\n", i+1 );
-			stop( _("reflc(): Geometry data error\n"\
+			stop( _("reflc(): Geometry data error\n"
 				  "Patch lies in plane of symmetry"), ERR_OK );
 			return( FALSE );
 		  }
@@ -1305,7 +1303,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 			fprintf( stderr,
 				"xnec2c: reflc(): geometry data error\n"
 				"segment %d lies in plane of symmetry\n", i+1 );
-			stop( _("reflc(): Geometry data error\n"\
+			stop( _("reflc(): Geometry data error\n"
 				  "Segment lies in plane of symmetry"), ERR_OK );
 			return( FALSE );
 		  }
@@ -1356,7 +1354,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 			fprintf( stderr,
 				"xnec2c: reflc(): geometry data error\n"
 				"patch %d lies in plane of symmetry\n", i+1 );
-			stop( _("reflc(): Geometry data error\n"\
+			stop( _("reflc(): Geometry data error\n"
 				  "Patch lies in plane of symmetry"), ERR_OK );
 			return( FALSE );
 		  }
@@ -1411,7 +1409,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 		  fprintf( stderr,
 			  "xnec2c: reflc(): geometry data error\n"
 			  "segment %d lies in plane of symmetry\n", i+1 );
-		  stop( _("reflc(): Geometry data error\n"\
+		  stop( _("reflc(): Geometry data error\n"
 				"Segment lies in plane of symmetry"), ERR_OK );
 		  return( FALSE );
 		}
@@ -1460,7 +1458,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
 		fprintf( stderr,
 			"xnec2c: reflc(): geometry data error\n"
 			"patch %d lies in plane of symmetry\n", i+1 );
-		stop( _("reflc(): Geometry data error\n"\
+		stop( _("reflc(): Geometry data error\n"
 			  "Patch lies in plane of symmetry"), ERR_OK );
 		return( FALSE );
 	  }
@@ -1486,7 +1484,7 @@ reflc( int ix, int iy, int iz, int iti, int nop )
   /* reproduce structure with rotation to form cylindrical structure */
   fnop= (double)nop;
   data.ipsym=-1;
-  sam=TWOPI/ fnop;
+  sam=M_2PI/ fnop;
   cs= cos( sam);
   ss= sin( sam);
 
diff --git a/src/geometry.h b/src/geometry.h
index afde3f6..4de514b 100644
--- a/src/geometry.h
+++ b/src/geometry.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	GEOMETRY_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/gnuplot.c b/src/gnuplot.c
index 35c3912..d481bb1 100644
--- a/src/gnuplot.c
+++ b/src/gnuplot.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,12 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- *  gnuplot.c
- *
- *  gnuplot routines for xnec2c
- */
-
 #include "gnuplot.h"
 #include "shared.h"
 
@@ -210,6 +202,50 @@ Save_FreqPlots_Gnuplot_Data( char *filename )
 
 /*-----------------------------------------------------------------------*/
 
+/* Scale_Gain()
+ *
+ * Scales radiation pattern gain according to selected style
+ * ( ARRL style, logarithmic or linear voltage/power )
+ */
+static int gain_style = GS_LINP;
+
+  static double
+Scale_Gain( double gain, int fstep, int idx )
+{
+  /* Scaled rad pattern gain and pol factor */
+  double scaled_rad = 0.0;
+
+  gain += Polarization_Factor( calc_data.pol_type, fstep, idx );
+
+  switch( gain_style )
+  {
+	case GS_LINP:
+	  scaled_rad = pow(10.0, (gain/10.0));
+	  break;
+
+	case GS_LINV:
+	  scaled_rad = pow(10.0, (gain/20.0));
+	  break;
+
+	case GS_ARRL:
+	  scaled_rad = exp( 0.058267 * gain );
+	  break;
+
+	case GS_LOG:
+	  scaled_rad = gain;
+	  if( scaled_rad < -40 )
+		scaled_rad = 0.0;
+	  else
+		scaled_rad = scaled_rad /40.0 + 1.0;
+
+  } /* switch( gain_style ) */
+
+  return( scaled_rad );
+
+} /* Scale_Gain() */
+
+/*-----------------------------------------------------------------------*/
+
 /* Save_RadPattern_Gnuplot_Data()
  *
  * Saves radiation pattern data to a file for gnuplot
@@ -310,7 +346,7 @@ Save_RadPattern_Gnuplot_Data( char *filename )
 	  static double pov_max = 0;
 
 	  /* Allocate on new near field matrix size */
-	  if( mreq != (size_t)npts * sizeof( double ) )
+	  if( !mreq || (mreq != (size_t)npts * sizeof(double)) )
 	  {
 		mreq = (size_t)npts * sizeof( double );
 		mem_realloc( (void **)&pov_x, mreq, "in draw_radiation.c" );
@@ -408,8 +444,7 @@ Save_RadPattern_Gnuplot_Data( char *filename )
 		double x, y, z;
 
 		/* Distance of pattern point from the xyz origin */
-		r = Scale_Gain(
-			rad_pattern[fstep].gtot[idx], fstep, idx );
+		r = Scale_Gain(	rad_pattern[fstep].gtot[idx], fstep, idx );
 
 		/* Distance of point's projection on xyz axis, from origin */
 		z = r * cos(theta);
diff --git a/src/gnuplot.h b/src/gnuplot.h
index 0339341..39e5c51 100644
--- a/src/gnuplot.h
+++ b/src/gnuplot.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	GNUPLOT_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/ground.c b/src/ground.c
index cf12713..1793ea9 100644
--- a/src/ground.c
+++ b/src/ground.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -286,7 +284,7 @@ sflds( double t, complex double *e )
   zphs= gwav.zph* gwav.zph;
   r2s= rhs+ zphs;
   gwav.r2= sqrt( r2s);
-  rk= gwav.r2* TWOPI;
+  rk= gwav.r2* M_2PI;
   gwav.xx2= cmplx( cos( rk),- sin( rk));
 
   /* use norton approximation for field due to ground.
@@ -322,7 +320,7 @@ sflds( double t, complex double *e )
 	e[3]=0.0;
 	e[4]=0.0;
 	e[5]=0.0;
-	sfac= PI* dataj.s;
+	sfac= M_PI* dataj.s;
 	sfac= sin( sfac)/ sfac;
 	e[6]= e[0]* sfac;
 	e[7]= e[1]* sfac;
@@ -335,7 +333,7 @@ sflds( double t, complex double *e )
   if( rho >= 1.0e-12)
 	thet= atan( gwav.zph/ rho);
   else
-	thet= PITWO;
+	thet= M_PI_2;
 
   /* combine vertical and horizontal components and convert */
   /* to x,y,z components. multiply by exp(-jkr)/r. */
@@ -350,7 +348,7 @@ sflds( double t, complex double *e )
   e[1]= erh* rhy+ eph* phy;
   e[2]= ezh;
   /* x,y,z fields for sine current */
-  rk= TWOPI* t;
+  rk= M_2PI* t;
   sfac= sin( rk);
   e[3]= e[0]* sfac;
   e[4]= e[1]* sfac;
diff --git a/src/ground.h b/src/ground.h
index 0449a69..0a3fa4f 100644
--- a/src/ground.h
+++ b/src/ground.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	GROUND_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/input.c b/src/input.c
index 0b26e54..fa35582 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -64,7 +62,7 @@ Read_Comments( void )
 	{
 	  fprintf( stderr, "xnec2c: Read_Comments():"
 		  "unexpected EOF (End of File)\n" );
-	  stop( _("Read_Comments(): Error reading Comments\n"\
+	  stop( _("Read_Comments(): Error reading Comments\n"
 			"Unexpected EOF (End of File)"), ERR_OK );
 	  return( FALSE );
 	}
@@ -75,7 +73,7 @@ Read_Comments( void )
 	  fprintf( stderr, "xnec2c: Read_Comments():"
 		  "error reading Comments: "
 		  "Comment mnemonic short or missing\n" );
-	  stop( _("Read_Comments(): Error reading Comments\n"\
+	  stop( _("Read_Comments(): Error reading Comments\n"
 			"Comment mnemonic short or missing"), ERR_OK );
 	  return( FALSE );
 	}
@@ -86,8 +84,8 @@ Read_Comments( void )
 	/* Check for incorrect mnemonic */
 	if( (strcmp(ain, "CM") != 0) && (strcmp(ain, "CE") != 0) )
 	{
-	  stop( _("Read_Comments():\n"\
-			" Error reading input file\n"\
+	  stop( _("Read_Comments():\n"
+			" Error reading input file\n"
 			"Comment mnemonic incorrect"), ERR_OK );
 	  return( FALSE );
 	}
@@ -99,1507 +97,1507 @@ Read_Comments( void )
 
 /*-----------------------------------------------------------------------*/
 
-/* Read_Geometry()
+/* Tag_Seg_Error()
  *
- * Reads geometry data from input file
+ * Checks tag and segments number are valid (>1)
  */
-  gboolean
-Read_Geometry( void )
+  static gboolean
+Tag_Seg_Error( int tag, int segs )
 {
-  int idx;
-  size_t mreq;
-
-  /* Moved here from Read_Commands() */
-  matpar.imat=0;
-  data.n = data.m = 0;
-  if( !datagn() ) return( FALSE );
+  gboolean retv = FALSE;
 
-  /* Memory allocation for temporary buffers */
-  mreq = (size_t)data.npm * sizeof(double);
-  mem_realloc( (void **)&save.xtemp,  mreq, "in input.c" );
-  mem_realloc( (void **)&save.ytemp,  mreq, "in input.c" );
-  mem_realloc( (void **)&save.ztemp,  mreq, "in input.c" );
-  mem_realloc( (void **)&save.bitemp, mreq, "in input.c" );
-  if( data.n > 0 )
+  if( tag <= 0 )
   {
-	mreq = (size_t)data.n * sizeof(double);
-	mem_realloc( (void **)&save.sitemp, mreq, "in input.c" );
+	fprintf( stderr,
+		"xnec2c: Tag_Seg_Error(): geometry data card error -"
+		"tag number is less than 1\n" );
+	stop( _("Tag_Seg_Error(): Geometry data error\n"
+		  "Tag number is less than 1"), ERR_OK );
+	retv = TRUE;
   }
 
-  /* Memory allocation for primary interacton matrix. */
-  mreq = (size_t)(data.np2m * (data.np + 2 * data.mp)) * sizeof(complex double);
-  mem_realloc( (void **)&cm, mreq, "in input.c" );
-
-  /* Memory allocation for current buffers */
-  mreq = (size_t)data.npm * sizeof( double);
-  mem_realloc( (void **)&crnt.air, mreq, "in input.c" );
-  mem_realloc( (void **)&crnt.aii, mreq, "in input.c" );
-  mem_realloc( (void **)&crnt.bir, mreq, "in input.c" );
-  mem_realloc( (void **)&crnt.bii, mreq, "in input.c" );
-  mem_realloc( (void **)&crnt.cir, mreq, "in input.c" );
-  mem_realloc( (void **)&crnt.cii, mreq, "in input.c" );
-  mreq = (size_t)data.np3m * sizeof( complex double);
-  mem_realloc( (void **)&crnt.cur, mreq, "in input.c" );
-
-  /* Memory allocation for loading buffers */
-  mreq = (size_t)data.npm * sizeof(complex double);
-  mem_realloc( (void **)&zload.zarray, mreq, "in input.c" );
-
-  /* Save segment and patch data for freq scaling */
-  if( data.n > 0 )
-	for( idx = 0; idx < data.n; idx++ )
-	{
-	  save.xtemp[idx]  = data.x[idx];
-	  save.ytemp[idx]  = data.y[idx];
-	  save.ztemp[idx]  = data.z[idx];
-	  save.sitemp[idx] = data.si[idx];
-	  save.bitemp[idx] = data.bi[idx];
-	}
-
-  if( data.m > 0 )
-	for( idx = 0; idx < data.m; idx++ )
-	{
-	  int j;
-
-	  j = idx + data.n;
-	  save.xtemp[j]  = data.px[idx];
-	  save.ytemp[j]  = data.py[idx];
-	  save.ztemp[j]  = data.pz[idx];
-	  save.bitemp[j] = data.pbi[idx];
-	}
+  if( segs <= 0 )
+  {
+	fprintf( stderr,
+		"xnec2c: Tag_Seg_Error(): geometry data card error - "
+		"number of segments is less than 1\n" );
+	stop( _("Tag_Seg_Error(): Geometry data error\n"
+		  "Number of segments is less than 1"), ERR_OK );
+	retv = TRUE;
+  }
 
-  return( TRUE );
-} /* Read_Geometry() */
+  return( retv );
+}
 
-/*------------------------------------------------------------------------*/
+/*-----------------------------------------------------------------------*/
 
-/* Read_Commands()
- *
- * Reads commands from input file and stores
- * them for later execution by user command
- */
-  gboolean
-Read_Commands( void )
+/* datagn is the main routine for input of geometry data. */
+  static gboolean
+datagn( void )
 {
+  char gm[3];
+
   /* input card mnemonic list */
-  char *atst[NUM_CMNDS] =
+  char *atst[] =
   {
-	"CM", "CP", "EK", "EN", "EX", \
-	"FR", "GD", "GN", "KH", "LD", \
-	"NE", "NH", "NT", "PQ", "PT", \
-	"RP", "SY", "TL", "XQ"
+	"GW", "GX", "GR", "GS", "GE","GM", "SP",\
+	"SM", "GA", "SC", "GH", "GF", "CT"
   };
 
-  char ain[3];
-  double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
-  int
-	mpcnt, itmp1, itmp2, itmp3, itmp4,
-	ain_num;   /* My addition, ain mnemonic as a number */
-  size_t mreq; /* My addition, size req. for malloc's   */
-
-  /* initializations etc from original fortran code */
-  mpcnt = 0;
-
-  /* Matrix parameters */
-  if( matpar.imat == 0)
-  {
-	netcx.neq  = data.n+2*data.m;
-	netcx.neq2 = 0;
-  }
-
-  /* default values for input parameters and flags */
-  calc_data.rkh = 1.0;
-  calc_data.iexk = 0;
-  calc_data.iped = 0;
-  calc_data.nfrq = 1;
-  calc_data.fmhz = CVEL;
-  save.fmhz = CVEL;
-  calc_data.mxfrq = 0.0;
-  fpat.dth   = 0.0;
-  fpat.thets = 0.0;
-  fpat.ixtyp = 0;
-  fpat.nfeh  = 0;
-  fpat.nrx   = 0;
-  fpat.nry   = 0;
-  fpat.nry   = 0;
-  fpat.nth   = 0;
-  fpat.nph   = 0;
-  fpat.near = -1;
-  gnd.ifar  = -1;
-  gnd.zrati = CPLX_10;
-  gnd.ksymp = 1;
-  gnd.nradl = 0;
-  gnd.iperf = 0;
-  netcx.nonet = 0;
-  netcx.ntsol = 0;
-  netcx.masym = 0;
-  netcx.npeq = data.np+2*data.mp;
-
-  /* My additions */
-  vsorc.nvqd   = 0;
-  vsorc.nsant  = 0;
-  zload.nldseg = 0;
-  zload.nload  = 0;
-
-  /* Allocate some buffers */
-  mreq = (size_t)data.np2m * sizeof(int);
-  mem_realloc( (void **)&save.ip, mreq, "in input.c" );
+  int nwire, isct, itg, iy=0, iz;
+  size_t mreq;
+  int ix, i, ns, gm_num; /* geometry card id as a number */
+  double rad, xs1, xs2, ys1, ys2, zs1, zs2;
+  double x3=0, y3=0, z3=0, x4=0, y4=0, z4=0;
+  double xw1, xw2, yw1, yw2, zw1, zw2;
+  double dummy;
 
-  /* Memory allocation for symmetry array */
-  smat.nop = netcx.neq/netcx.npeq;
-  mreq = (size_t)(smat.nop * smat.nop) * sizeof( complex double);
-  mem_realloc( (void **)&smat.ssx, mreq, "in input.c" );
+  data.ipsym=0;
+  nwire=0;
+  data.n=0;
+  data.np=0;
+  data.m=0;
+  data.mp=0;
+  isct=0;
+  structure_proj_params.r_max = 0.0;
 
-  /* main input section, exits at various points */
-  /* depending on error conditions or end of job */
-  while( TRUE )
+  /* read geometry data card and branch to */
+  /* section for operation requested */
+  do
   {
-	/* Main input section - standard read statement - jumps */
-	/* to appropriate section for specific parameter set up */
-	if( !readmn(
-		  ain, &itmp1, &itmp2, &itmp3, &itmp4,
-		  &tmp1, &tmp2, &tmp3, &tmp4, &tmp5, &tmp6) )
+	if( !readgm(gm, &itg, &ns, &xw1, &yw1, &zw1, &xw2, &yw2, &zw2, &rad) )
 	  return( FALSE );
 
-	mpcnt++;
-
-	/* identify command card id mnemonic */
-	for( ain_num = 0; ain_num < NUM_CMNDS; ain_num++ )
-	  if( strncmp( ain, atst[ain_num], 2) == 0 )
+	/* identify card id mnemonic */
+	for( gm_num = 0; gm_num < NUM_GEOMN; gm_num++ )
+	  if( strncmp( gm, atst[gm_num], 2) == 0 )
 		break;
 
-	/* take action according to card id mnemonic */
-	switch( ain_num )
-	{
-	  case CM: /* "cm" card ignored, comments in data cards as in NEC4 */
-		fprintf( stderr, "xnec2c: Read_Commands():"
-			" ignoring CM card in commands\n" );
-		stop( _("Read_Commands(): Ignoring CM card in commands"),
-			ERR_OK );
-		continue;
+	if( gm_num != 9 ) isct=0;
 
-	  case CP: /* "cp" card ignored, maximum coupling between antennas */
-		stop( _("Read_Commands(): CP card is ignored\n"\
-			  "Coupling calculation not implemented"), ERR_OK );
-		continue; /* continue card input loop */
+	switch( gm_num )
+	{
+	  case GW: /* "gw" card, generate segment data for straight wire. */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
 
-	  case EK: /* "ek" card,  extended thin wire kernel option */
-		if( itmp1 == -1)
-		  calc_data.iexk = 0;
+		if( rad != 0.0)
+		{
+		  xs1=1.0;
+		  ys1=1.0;
+		}
 		else
-		  calc_data.iexk = 1;
-		continue; /* continue card input loop */
+		{
+		  if( !readgm(gm, &ix, &iy, &xs1, &ys1, &zs1,
+			  &dummy, &dummy, &dummy, &dummy) )
+			  return( FALSE );
 
-	  case EN: /* "en" card, end data input, no action */
-		break;
+		  if( strcmp(gm, "GC" ) != 0 )
+		  {
+			fprintf( stderr,
+				"xnec2c: datagn(): geometry data card error "
+				"no GC card for tapered wire\n" );
+			stop( _("datagn(): Geometry data error\n"
+				  "No GC card for tapered wire"), ERR_OK );
+			return( FALSE );
+		  }
 
-	  case EX: /* "ex" card, excitation parameters */
-		netcx.masym = itmp4/10;
-		fpat.ixtyp  = itmp1;
+		  if( (ys1 == 0.0) || (zs1 == 0.0) )
+		  {
+			fprintf( stderr, "xnec2c: datagn(): geometry GC data card error\n" );
+			stop( _("datagn(): Geometry GC data card error"), ERR_OK );
+			return( FALSE );
+		  }
 
-		/* Applied E field or current discontinuity */
-		if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) )
-		{
-		  netcx.ntsol = 0;
+		  rad= ys1;
+		  ys1= pow( (zs1/ys1), (1.0/(ns-1.0)) );
+		}
 
-		  /* Current discontinuity E source */
-		  if( fpat.ixtyp == 5 )
-		  {
-			vsorc.nvqd++;
-			mreq = (size_t)vsorc.nvqd * sizeof(int);
-			mem_realloc( (void **)&vsorc.ivqd, mreq, "in input.c" );
-			mem_realloc( (void **)&vsorc.iqds, mreq, "in input.c" );
-			mreq = (size_t)vsorc.nvqd * sizeof(complex double);
-			mem_realloc( (void **)&vsorc.vqd, mreq, "in input.c" );
-			mem_realloc( (void **)&vsorc.vqds, mreq, "in input.c" );
-			{
-			  int indx = vsorc.nvqd-1;
+		wire( xw1, yw1, zw1, xw2, yw2, zw2, rad, xs1, ys1, ns, itg);
+		continue;
 
-			  if( (vsorc.ivqd[indx] = isegno(itmp2, itmp3)) < 0 )
-				return( FALSE ); /* my addition, error */
-			  vsorc.vqd[indx]= cmplx( tmp1, tmp2);
-			  if( cabs( vsorc.vqd[indx]) < 1.0e-20)
-				vsorc.vqd[indx] = CPLX_10;
+		/* reflect structure along x,y, or z */
+		/* axes or rotate to form cylinder.  */
+	  case GX: /* "gx" card */
+		if( (ns < 0) || (itg < 0) )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): geometry GX data card error\n" );
+		  stop( _("datagn(): Geometry GX data card error"), ERR_OK );
+		  return( FALSE );
+		}
 
-			  calc_data.iped   = itmp4- netcx.masym*10;
-			  calc_data.zpnorm = tmp3;
-			}
+		iy= ns/10;
+		iz= ns- iy*10;
+		ix= iy/10;
+		iy= iy- ix*10;
 
-		  } /* if( fpat.ixtyp == 5) */
-		  else
-		  {
-			/* Else, applied E field */
-			vsorc.nsant++;
-			mreq = (size_t)vsorc.nsant * sizeof(int);
-			mem_realloc( (void **)&vsorc.isant, mreq, "in input.c" );
-			mreq = (size_t)vsorc.nsant * sizeof(complex double);
-			mem_realloc( (void **)&vsorc.vsant, mreq, "in input.c" );
-			{
-			  int indx = vsorc.nsant-1;
+		if( ix != 0)
+		  ix=1;
+		if( iy != 0)
+		  iy=1;
+		if( iz != 0)
+		  iz=1;
 
-			  if( (vsorc.isant[indx] = isegno(itmp2, itmp3)) < 0 )
-				  return( FALSE ); /* my addition, error condition */
-			  vsorc.vsant[indx]= cmplx( tmp1, tmp2);
-			  if( cabs( vsorc.vsant[indx]) < 1.0e-20)
-				vsorc.vsant[indx] = CPLX_10;
+		if( !reflc(ix, iy, iz, itg, ns) )
+		  return( FALSE );
+		continue;
 
-			  calc_data.iped= itmp4- netcx.masym*10;
-			  calc_data.zpnorm= tmp3;
-			  if( (calc_data.iped == 1) && (calc_data.zpnorm > 0.0) )
-				calc_data.iped=2;
-			}
+	  case GR: /* "gr" card */
+		if( (ns < 0) || (itg < 0) )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): geometry GR data card error\n" );
+		  stop( _("datagn(): Geometry GR data card error"), ERR_OK );
+		  return( FALSE );
+		}
 
-		  } /* if( fpat.ixtyp == 5 ) */
+		ix=-1;
+		iz = 0;
+		if( !reflc(ix, iy, iz, itg, ns) )
+		  return( FALSE );
+		continue;
 
-		} /* if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) ) */
-		else
+	  case GS: /* "gs" card, scale structure dimensions by factor xw1 */
+		if( (itg > 0) && (ns > 0) && (ns >= itg) )
 		{
-		  /* For fpat.ixtyp = 2|3|4 = incident field or current source */
-		  calc_data.nthi= itmp2;
-		  calc_data.nphi= itmp3;
-		  calc_data.xpr1= tmp1;
-		  calc_data.xpr2= tmp2;
-		  calc_data.xpr3= tmp3;
-		  calc_data.xpr4= tmp4;
-		  calc_data.xpr5= tmp5;
-		  calc_data.xpr6= tmp6;
-		  vsorc.nsant=0;
-		  vsorc.nvqd=0;
-		  calc_data.thetis= tmp1;
-		  calc_data.phiss= tmp2;
+		  for( i = 0; i < data.n; i++ )
+		  {
+			if( (data.itag[i] >= itg) && (data.itag[i] <= ns) )
+			{
+			  data.x1[i]= data.x1[i]* xw1;
+			  data.y1[i]= data.y1[i]* xw1;
+			  data.z1[i]= data.z1[i]* xw1;
+			  data.x2[i]= data.x2[i]* xw1;
+			  data.y2[i]= data.y2[i]* xw1;
+			  data.z2[i]= data.z2[i]* xw1;
+			  data.bi[i]= data.bi[i]* xw1;
+			}
+		  }
+		  /* FIXME corrects errors when GS follows GX but this is just a work-around */
+		  data.np = data.n;
+		  data.ipsym = 0;
+		}
+		else for( i = 0; i < data.n; i++ )
+		{
+		  data.x1[i]= data.x1[i]* xw1;
+		  data.y1[i]= data.y1[i]* xw1;
+		  data.z1[i]= data.z1[i]* xw1;
+		  data.x2[i]= data.x2[i]* xw1;
+		  data.y2[i]= data.y2[i]* xw1;
+		  data.z2[i]= data.z2[i]* xw1;
+		  data.bi[i]= data.bi[i]* xw1;
 		}
 
-		SetFlag( ENABLE_EXCITN );
-		continue; /* continue card input loop */
-
-	  case FR: /* "fr" card, frequency parameters */
-		if( !CHILD )
+		yw1= xw1* xw1;
+		for( i = 0; i < data.m; i++ )
 		{
-		  calc_data.nfrq = itmp2;
-		  if( calc_data.nfrq <= 0)
-			calc_data.nfrq = 1;
+		  data.px[i] = data.px[i]* xw1;
+		  data.py[i] = data.py[i]* xw1;
+		  data.pz[i] = data.pz[i]* xw1;
+		  data.pbi[i]= data.pbi[i]* yw1;
 		}
-		else calc_data.nfrq = 1;
+		continue;
 
-		/* Allocate normalization buffer */
+	  case GE: /* "ge" card, terminate structure geometry input. */
+		/* My addition, for drawing */
+		if( ((data.n > 0) || (data.m > 0)) && !CHILD )
+		  Init_Struct_Drawing();
+		else if( (data.n == 0) && (data.m == 0) )
 		{
-		  mreq = (size_t)calc_data.nfrq * sizeof(double);
-		  mem_realloc( (void **)&impedance_data.zreal, mreq, "in input.c" );
-		  mem_realloc( (void **)&impedance_data.zimag, mreq, "in input.c" );
-		  mem_realloc( (void **)&impedance_data.zmagn, mreq, "in input.c" );
-		  mem_realloc( (void **)&impedance_data.zphase, mreq, "in input.c" );
-		  mem_realloc( (void **)&save.freq, mreq, "in input.c" );
-		  mreq = (size_t)calc_data.nfrq * sizeof(char);
-		  mem_realloc( (void **)&save.fstep, mreq, "in input.c" );
+		  stop( _("No geometry data cards"), ERR_OK );
+		  return( FALSE );
 		}
 
-		if( CHILD ) continue;
+		if( !conect(itg) ) return( FALSE );
 
-		calc_data.ifrq = itmp1;
-		calc_data.fmhz = save.fmhz = tmp1;
+		if( data.n != 0)
+		{
+		  /* Allocate wire buffers */
+		  mreq = (size_t)data.n * sizeof(double);
+		  mem_realloc( (void **)&data.si,   mreq, "in input.c" );
+		  mem_realloc( (void **)&data.sab,  mreq, "in input.c" );
+		  mem_realloc( (void **)&data.cab,  mreq, "in input.c" );
+		  mem_realloc( (void **)&data.salp, mreq, "in input.c" );
+		  mem_realloc( (void **)&data.x, mreq, "in input.c" );
+		  mem_realloc( (void **)&data.y, mreq, "in input.c" );
+		  mem_realloc( (void **)&data.z, mreq, "in input.c" );
 
-		/* My addition, max frequency */
-		if( itmp1 == 0 )
-		  calc_data.mxfrq =
-			(double)tmp1 + (double)tmp2 * (double)(itmp2-1);
-		else if( itmp1 == 1 )
-		  calc_data.mxfrq =
-			(double)tmp1 * pow( (double)tmp2, (double)(itmp2-1) );
+		  for( i = 0; i < data.n; i++ )
+		  {
+			xw1= data.x2[i]- data.x1[i];
+			yw1= data.y2[i]- data.y1[i];
+			zw1= data.z2[i]- data.z1[i];
+			data.x[i]=( data.x1[i]+ data.x2[i])/2.0;
+			data.y[i]=( data.y1[i]+ data.y2[i])/2.0;
+			data.z[i]=( data.z1[i]+ data.z2[i])/2.0;
+			xw2= xw1* xw1+ yw1* yw1+ zw1* zw1;
+			yw2= sqrt( xw2);
+			//yw2=( xw2/yw2 + yw2)/2.0;
+			data.si[i]= yw2;
+			data.cab[i]= xw1/ yw2;
+			data.sab[i]= yw1/ yw2;
 
-		/* My addition, extra features in "fr" card. */
-		/* Specifies lower and upper value of frequency range */
-		if( calc_data.ifrq == 2 )
-		{
-		  calc_data.nfrq++;
-		  /* Linear frequency stepping */
-		  if( calc_data.nfrq > 1 )
-			calc_data.delfrq =
-			  (tmp2 - tmp1)/(double)(calc_data.nfrq-1);
-		  calc_data.ifrq  = 0;
-		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
-		}
-		else if( calc_data.ifrq == 3 )
-		{
-		  calc_data.nfrq++;
-		  /* Multiplicative frequency stepping */
-		  if( calc_data.nfrq > 1 )
-			calc_data.delfrq =
-			  pow( (tmp2-tmp1), 1.0/(double)(calc_data.nfrq-1) );
-		  calc_data.ifrq  = 1;
-		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
-		}
-		else calc_data.delfrq = tmp2;
+			xw2= zw1/ yw2;
+			if( xw2 > 1.0)
+			  xw2=1.0;
+			if( xw2 < -1.0)
+			  xw2=-1.0;
+			data.salp[i]= xw2;
 
-		if( calc_data.iped == 1)
-		  calc_data.zpnorm = 0.0;
-		continue; /* continue card input loop */
+			//xw2= asin( xw2)* TD;
+			//yw2= atan2( yw1, xw1)* TD;
 
-	  case GD: /* "gd" card, ground representation */
-		fpat.epsr2 = tmp1;
-		fpat.sig2  = tmp2;
-		fpat.clt   = tmp3;
-		fpat.cht   = tmp4;
-		continue; /* continue card input loop */
+			if( (data.si[i] <= 1.0e-20) || (data.bi[i] <= 0.0) )
+			{
+			  fprintf( stderr, "xnec2c: datagn(): segment data error\n" );
+			  stop( _("datagn(): Segment data error"), ERR_OK );
+			  return( FALSE );
+			}
 
-	  case GN: /* "gn" card, ground parameters under the antenna */
-		gnd.iperf = itmp1;
-		gnd.nradl = itmp2;
-		gnd.ksymp = 2;
-		save.epsr = tmp1;
-		save.sig  = tmp2;
+		  } /* for( i = 0; i < data.n; i++ ) */
 
-		/* Theta must be less than 90 if ground present */
-		double test = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
-		if( (gnd.ifar != 1) && (test > 90.0) )
-		{
-		  fprintf( stderr,
-			  "xnec2c: Read_Commands(): theta > 90 deg. with ground specified\n" );
-		  stop( _("Read_Commands(): Theta > 90 deg with ground specified\n"\
-				"Please check RP card data and correct"), ERR_OK );
-		  return( FALSE );
-		}
+		} /* if( data.n != 0) */
 
-		if( gnd.nradl > 0)
+		if( data.m != 0)
 		{
-		  if( gnd.iperf == 2)
+		  for( i = 0; i < data.m; i++ )
 		  {
-			fprintf( stderr,
-				"xnec2c: Read_Commands(): radial wire g.s. approximation\n"
-				"may not be used with Sommerfeld ground option\n" );
-			stop( _("Read_Commands(): radial wire g.s. approximation\n"\
-				  "may not be used with Sommerfeld ground option"), ERR_OK );
-			return( FALSE );
-		  }
+			xw1=( data.t1y[i]* data.t2z[i] -
+				data.t1z[i]* data.t2y[i])* data.psalp[i];
+			yw1=( data.t1z[i]* data.t2x[i] -
+				data.t1x[i]* data.t2z[i])* data.psalp[i];
+			zw1=( data.t1x[i]* data.t2y[i] -
+				data.t1y[i]* data.t2x[i])* data.psalp[i];
+		  } /* for( i = 0; i < data.m; i++ ) */
 
-		  save.scrwlt = tmp3;
-		  save.scrwrt = tmp4;
-		  continue; /* continue card input loop */
-		} /* if( gnd.nradl > 0) */
-		else
-		{
-		  save.scrwlt = 0.0;
-		  save.scrwrt = 0.0;
-		}
+		} /* if( data.m != 0) */
 
-		fpat.epsr2 = tmp3;
-		fpat.sig2  = tmp4;
-		fpat.clt   = tmp5;
-		fpat.cht   = tmp6;
-		continue; /* continue card input loop */
+		data.npm  = data.n+data.m;
+		data.np2m = data.n+2*data.m;
+		data.np3m = data.n+3*data.m;
 
-	  case KH: /* "kh" card, matrix integration limit */
-		calc_data.rkh = tmp1;
-		continue; /* continue card input loop */
+		return( TRUE );
 
-	  case LD: /* "ld" card, loading parameters */
+		/* "gm" card, move structure or reproduce */
+		/* original structure in new positions.   */
+	  case GM:
 		{
-		  int idx, nseg;
+		  int tgf = (int)(rad + 0.5);
+		  if( (tgf < 0) || (ns < 0) || (rad < 0.0) )
+		  {
+			fprintf( stderr, "xnec2c: datagn(): move GM data card error\n" );
+			stop( _("datagn(): Move GM data card error"), ERR_OK );
+			return( FALSE );
+		  }
+		  xw1= xw1* TORAD;
+		  yw1= yw1* TORAD;
+		  zw1= zw1* TORAD;
+		  if( !move(xw1, yw1, zw1, xw2, yw2, zw2, (int)(rad+.5), ns, itg) )
+			return( FALSE );
+		}
+		continue;
 
-		  /* Reallocate loading buffers */
-		  zload.nload++;
-		  mreq = (size_t)zload.nload * sizeof(int);
-		  mem_realloc( (void **)&calc_data.ldtyp,  mreq, "in input.c" );
-		  mem_realloc( (void **)&calc_data.ldtag,  mreq, "in input.c" );
-		  mem_realloc( (void **)&calc_data.ldtagf, mreq, "in input.c" );
-		  mem_realloc( (void **)&calc_data.ldtagt, mreq, "in input.c" );
+	  case SP: /* "sp" card, generate single new patch */
+		ns++;
 
-		  mreq = (size_t)zload.nload * sizeof(double);
-		  mem_realloc( (void **)&calc_data.zlr, mreq, "in input.c" );
-		  mem_realloc( (void **)&calc_data.zli, mreq, "in input.c" );
-		  mem_realloc( (void **)&calc_data.zlc, mreq, "in input.c" );
+		if( itg != 0)
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
 
-		  idx = zload.nload-1;
-		  calc_data.ldtyp[idx]= itmp1;
-		  calc_data.ldtag[idx]= itmp2;
-		  if( itmp4 == 0) itmp4= itmp3;
-		  calc_data.ldtagf[idx]= itmp3;
-		  calc_data.ldtagt[idx]= itmp4;
+		if( (ns == 2) || (ns == 4) )
+		  isct=1;
 
-		  if( itmp4 < itmp3 )
-		  {
-			fprintf( stderr,
-				"xnec2c: Read_Commands(): data fault on loading card no %d\n"
-				"itag step1 %d is greater than itag step2 %d\n",
-				zload.nload, itmp3, itmp4 );
-			stop( _("Read_Commands(): Data fault on loading card\n"\
-				  "itag step1 is greater than itag step2"), ERR_OK );
+		if( ns > 1)
+		{
+		  if( !readgm(gm, &ix, &iy, &x3, &y3,
+				&z3, &x4, &y4, &z4, &dummy) )
 			return( FALSE );
-		  }
-
-		  calc_data.zlr[idx]= tmp1;
-		  calc_data.zli[idx]= tmp2;
-		  calc_data.zlc[idx]= tmp3;
 
-		  /*** My addition, for drawing structure ***/
-		  /* Work out absolute seg number of loaded segments (!) */
-		  if( itmp1 == -1 ) /* Null all loads */
-			zload.nldseg = 0;
-		  else if( itmp2 == 0 ) /* No tag num */
+		  if( (ns == 2) || (itg > 0) )
 		  {
-			if( itmp3 == 0 ) /* All segs loaded */
-			{
-			  nseg = data.n;
-			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
-			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
-			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
-			  for( idx = 0; idx < nseg; idx++ )
-			  {
-				zload.ldtype[zload.nldseg]   = itmp1;
-				zload.ldsegn[zload.nldseg++] = idx+1;
-			  }
-			}
-			else /* Absolute seg num specified */
-			{
-			  nseg = itmp4 - itmp3 + 1;
-			  if( nseg <= 0 ) nseg = 1;
-			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
-			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
-			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
-			  for( idx = 0; idx < nseg; idx++ )
-			  {
-				zload.ldtype[zload.nldseg]   = itmp1;
-				zload.ldsegn[zload.nldseg++] = itmp3+idx;
-			  }
-			}
+			x4= xw1+ x3- xw2;
+			y4= yw1+ y3- yw2;
+			z4= zw1+ z3- zw2;
+		  }
 
-		  } /* if( itmp2 == 0 ) */
-		  else /* Tag num specified */
+		  if( strcmp(gm, "SC") != 0 )
 		  {
-			if( (itmp3 == 0) && (itmp4 == 0) ) /* All segs of tag loaded */
-			{
-			  for( idx = 0; idx < data.n; idx++ )
-				if( data.itag[idx] == itmp2 )
-				{
-				  mreq = (size_t)(zload.nldseg + 1) * sizeof(int);
-				  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
-				  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
-				  zload.ldtype[zload.nldseg]   = itmp1;
-				  zload.ldsegn[zload.nldseg++] = idx+1;
-				}
-			}
-			else /* A range of segs of tag loaded */
-			{
-			  nseg = itmp4 - itmp3 + 1;
-			  if( nseg <= 0 ) nseg = 1; /* Just one seg of tag (=itmp3) */
-			  mreq = (size_t)(zload.nldseg + nseg) * sizeof(int);
-			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
-			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
-			  for( idx = 0; idx < nseg; idx++ )
-			  {
-				zload.ldtype[zload.nldseg] = itmp1;
-				if( (zload.ldsegn[zload.nldseg++] =
-					  isegno(itmp2, itmp3+idx)) < 0 )
-				  return( FALSE );
-			  }
-			}
+			fprintf( stderr, "xnec2c: datagn(): patch data error\n" );
+			stop( _("datagn(): Patch data error"), ERR_OK );
+			return( FALSE );
 		  }
-		} /* case 8: */
-		continue; /* continue card input loop */
 
-	  case NE: case NH:  /* "ne"/"nh" cards, near field calculation parameters */
-		if( ain_num == 11 )
-		  fpat.nfeh |= NEAR_HFIELD;
+		} /* if( ns > 1) */
 		else
-		  fpat.nfeh |= NEAR_EFIELD;
+		{
+		  xw2= xw2* TORAD;
+		  yw2= yw2* TORAD;
+		}
 
-		fpat.near = itmp1;
-		fpat.nrx  = itmp2;
-		fpat.nry  = itmp3;
-		fpat.nrz  = itmp4;
-		fpat.xnr  = tmp1;
-		fpat.ynr  = tmp2;
-		fpat.znr  = tmp3;
-		fpat.dxnr = tmp4;
-		fpat.dynr = tmp5;
-		fpat.dznr = tmp6;
+		if( !patch( itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+			return( FALSE );
+		continue;
 
-		if( (fpat.nrx > 0) &&
-			(fpat.nry > 0) &&
-			(fpat.nrz > 0) &&
-			(fpat.near != -1) )
+	  case SM: /* "sm" card, generate multiple-patch surface */
+		if( (itg < 1) || (ns < 1) )
 		{
-		  SetFlag( ENABLE_NEAREH );
-		  SetFlag( ALLOC_NEAREH_BUFF );
-		  SetFlag( ALLOC_PNTING_BUFF );
+		  fprintf( stderr, "datagn(): xnec2c: patch card data error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
 		}
 
-		/* Because of the interactive GUI, program
-		 * execution is not triggered by any card */
-		continue; /* continue card input loop */
+		if( !readgm(gm, &ix, &iy, &x3, &y3,
+			  &z3, &x4, &y4, &z4, &dummy) )
+		  return( FALSE );
 
-	  case NT: case TL: /* "nt" & "tl" cards, network parameters */
+		if( (ns == 2) || (itg > 0) )
 		{
-		  int idx;
-
-		  /* Re-allocate network buffers */
-		  netcx.nonet++;
-		  mreq = (size_t)netcx.nonet * sizeof(int);
-		  mem_realloc( (void **)&netcx.ntyp,  mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.iseg1, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.iseg2, mreq, "in input.c" );
+		  x4= xw1+ x3- xw2;
+		  y4= yw1+ y3- yw2;
+		  z4= zw1+ z3- zw2;
+		}
 
-		  mreq = (size_t)netcx.nonet * sizeof(double);
-		  mem_realloc( (void **)&netcx.x11r, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.x11i, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.x12r, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.x12i, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.x22r, mreq, "in input.c" );
-		  mem_realloc( (void **)&netcx.x22i, mreq, "in input.c" );
+		if( strcmp(gm, "SC" ) != 0 )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch card data error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
 
-		  idx = netcx.nonet-1;
-		  if( ain_num == 12 )
-			netcx.ntyp[idx] = 1;
-		  else
-		  {
-			netcx.ntyp[idx] = 2;
-			if( tmp1 == 0.0 )
-			{
-			  fprintf( stderr,
-				  "xnec2c: Read_Commands(): Transmission Line impedance = 0\n"
-				  "is not valid. Please correct NT or TL card\n" );
-			  stop( _("Read_Commands(): Transmission Line impedance = 0\n"\
-					"is not valid. Please correct NT or TL card"), ERR_OK );
-			  return( FALSE );
-			}
-		  }
+		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+		  return( FALSE );
+		continue;
 
-		  if( ((netcx.iseg1[idx] = isegno(itmp1, itmp2)) < 0) ||
-			  ((netcx.iseg2[idx] = isegno(itmp3, itmp4)) < 0) )
-		  {
-			fprintf( stderr,
-				"xnec2c: Read_Commands(): Segment number error in TL or NT card\n" );
-			stop( _("Read_Commands(): Segment number\n"\
-				"error in NT or TL card"), ERR_OK );
-			return( FALSE );
-		  }
-		  netcx.x11r[idx]  = tmp1;
-		  netcx.x11i[idx]  = tmp2;
-		  netcx.x12r[idx]  = tmp3;
-		  netcx.x12i[idx]  = tmp4;
-		  netcx.x22r[idx]  = tmp5;
-		  netcx.x22i[idx]  = tmp6;
-
-		  if( (netcx.ntyp[idx] == 1) || (tmp1 > 0.0) )
-			continue; /* continue card input loop */
-
-		  netcx.ntyp[idx] = 3;
-		  netcx.x11r[idx] = -tmp1;
-		  continue; /* continue card input loop */
-
-		} /* case 12: case 17: */
-
-	  case PQ: case PT: /* "pq" and "pt" cards ignored, no printing */
-		fprintf( stderr,
-			"xnec2c: Read_Commands(): PQ and PT cards are ignored\n"
-			"Printing to file not implemented\n" );
-		stop( _("Read_Commands(): PQ and PT cards are ignored\n"\
-			  "Printing to file not implemented"), ERR_OK );
-		continue; /* continue card input loop */
+	  case GA: /* "ga" card, generate segment data for wire arc */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
+		if( !arc(itg, ns, xw1, yw1, zw1, xw2) ) return( FALSE );
+		continue;
 
-	  case RP: /* "rp" card, standard observation angle parameters */
-		if( itmp1 == 1 )
+	  case SC: /* "sc" card */
+		if( isct == 0)
 		{
-		  fprintf( stderr,
-			  "xnec2c: Read_Commands(): Surface wave option (I1=1)\n"
-			  "of RP command not implemented\n" );
-		  stop( _("Read_Commands(): Surface wave option (I1=1)\n"\
-				"of RP command not implemented"), ERR_OK );
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
 		  return( FALSE );
 		}
 
-		gnd.ifar = itmp1;
-		fpat.nth = itmp2;
-		fpat.nph = itmp3;
-
-		if( fpat.nth <= 0)
-		  fpat.nth=1;
-		if( fpat.nph <= 0)
-		  fpat.nph=1;
-
-		fpat.ipd  = itmp4 / 10;
-		fpat.iavp = itmp4 - fpat.ipd*10;
-		fpat.inor = fpat.ipd / 10;
-		fpat.ipd  = fpat.ipd - fpat.inor*10;
-		fpat.iax  = fpat.inor / 10;
-		fpat.inor = fpat.inor - fpat.iax*10;
+		ns++;
 
-		if( fpat.iavp )
+		if( (itg != 0) || ((ns != 2) && (ns != 4)) )
 		{
-		  fprintf( stderr,
-			  "xnec2c: Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"
-			  "of RP command not implemented\n" );
-		  stop( _("Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"\
-				"of RP command not supported"), ERR_OK );
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
 		  return( FALSE );
 		}
-		if( fpat.iax != 0) fpat.iax = 1;
-		if( fpat.ipd != 0) fpat.ipd = 1;
-		fpat.thets = tmp1;
-		fpat.phis  = tmp2;
-		fpat.dth   = tmp3;
-		fpat.dph   = tmp4;
-		fpat.rfld  = tmp5;
-		fpat.gnor  = tmp6;
 
-		/* Theta must be less than 90 if ground present */
-		tmp1 = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
-		if( (gnd.ksymp == 2) && (gnd.ifar != 1) && (tmp1 > 90.0) )
+		xs1= x4;
+		ys1= y4;
+		zs1= z4;
+		xs2= x3;
+		ys2= y3;
+		zs2= z3;
+		x3= xw1;
+		y3= yw1;
+		z3= zw1;
+
+		if( ns == 4)
 		{
-		  fprintf( stderr,
-			  "xnec2c: Read_Commands(): Theta > 90 deg. with ground specified\n"
-			  "Please check RP card data and correct\n" );
-		  stop( _("Read_Commands(): Theta > 90 deg. with ground specified\n"\
-				"Please check RP card data and correct"), ERR_OK );
-		  return( FALSE );
+		  x4= xw2;
+		  y4= yw2;
+		  z4= zw2;
 		}
 
-		/* Because of the interactive GUI, program
-		 * execution is not triggered by any card */
-		continue; /* continue card input loop */
-
-	  case SY: /* "sy" TODO Compatibility with 4nec2.
-				  Too difficult, may never happen :-( */
-		continue;
-
-	  case XQ: /* "xq" execute card */
-		/* Because of the interactive GUI, program
-		 * execution is not triggered by any card.
-		 * XQ now is the same as EN because of above */
-		if( itmp1 == 0 )
-		  break; /* No rad pat, stop reading commands */
-
-		/* Read radiation pattern parameters */
-		gnd.ifar  = 0;
-		fpat.rfld = 0.0;
-		fpat.ipd  = 0;
-		fpat.iavp = 0;
-		fpat.inor = 0;
-		fpat.iax  = 0;
-		fpat.nth  = 91;
-		fpat.nph  = 1;
-		fpat.thets= 0.0;
-		fpat.phis = 0.0;
-		fpat.dth  = 1.0;
-		fpat.dph  = 0.0;
+		xw1= xs1;
+		yw1= ys1;
+		zw1= zs1;
+		xw2= xs2;
+		yw2= ys2;
+		zw2= zs2;
 
-		if( itmp1 == 2)
-		  fpat.phis = 90.0;
-		else if( itmp1 == 3)
+		if( ns != 4)
 		{
-		  fpat.nph = 2;
-		  fpat.dph = 90.0;
+		  x4= xw1+ x3- xw2;
+		  y4= yw1+ y3- yw2;
+		  z4= zw1+ z3- zw2;
 		}
 
-		SetFlag( ENABLE_RDPAT );
+		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+		  return( FALSE );
+		continue;
 
-		/* Because of the interactive GUI, program
-		 * execution is not triggered by any card.
-		 * XQ now is the same as EN because of above */
-		break;
+	  case GH: /* "gh" card, generate helix */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
+		helix( xw1, yw1, zw1, xw2, yw2, zw2, rad, ns, itg);
+		continue;
 
-	  default:
+	  case GF: /* "gf" card, not supported */
+		fprintf( stderr, "xnec2c: datagn(): \"GF\" card (NGF solution) "
+				"is not supported\n" );
+		stop( _("datagn(): \"GF\" card (NGF solution)\n"
+			  "is not supported"), ERR_OK );
+		return( FALSE );
+
+	  case CT: /* Ignore in-data comments (NEC4 compatibility) */
+		fprintf( stderr, "xnec2c: datagn(): ignoring CM card in geometry\n" );
+		stop( _("datagn(): Ignoring CM card in geometry"), ERR_OK );
+		continue;
+
+	  default: /* error message */
+		fprintf( stderr, "xnec2c: datagn(): geometry data card error\n" );
 		fprintf( stderr,
-			"xnec2c: Read_Commands(): faulty data "
-			"card label after geometry section\n" );
-		stop( _("Read_Commands(): Faulty data card\n"\
-			  "label after geometry section"), ERR_OK );
+			"%2s %3d %5d %10.5f %10.5f %10.5f"
+			" %10.5f %10.5f %10.5f %10.5f\n",
+			gm, itg, ns, xw1, yw1, zw1, xw2, yw2, zw2, rad );
+
+		stop( _("datagn(): Geometry data card error"), ERR_OK );
 		return( FALSE );
-	} /* switch( ain_num ) */
 
-	/* Disable radiation pattern plots */
-	if( (fpat.nth < 2) || (fpat.nph < 1) || (gnd.ifar == 1) )
-	  ClearFlag( ENABLE_RDPAT );
-	else
-	{
-	  /* Allocate radiation pattern buffers */
-	  Alloc_Rdpattern_Buffers( calc_data.nfrq+1, fpat.nth, fpat.nph );
-	  SetFlag( ENABLE_RDPAT );
-	}
+	} /* switch( gm_num ) */
 
-	return( TRUE );
-  } /* while( TRUE ) */
+  } /* do */
+  while( TRUE );
 
-} /* Read_Commands() */
+} /* datagn() */
 
 /*-----------------------------------------------------------------------*/
 
+/* Read_Geometry()
+ *
+ * Reads geometry data from input file
+ */
   gboolean
-readmn( char *mn, int *i1, int *i2, int *i3, int *i4,
-	double *f1, double *f2, double *f3,
-	double *f4, double *f5, double *f6 )
+Read_Geometry( void )
 {
-  char
-	*line_buf = NULL,
-	*startptr = NULL,
-	*endptr   = NULL;
-  int len, i, idx;
-  int nint = 4, nflt = 6;
-  int iarr[4] = { 0, 0, 0, 0 };
-  double rarr[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
-  int eof; /* EOF error flag */
-
+  int idx;
+  size_t mreq;
 
-  /* Clear return values */
-  *i1 = *i2 = *i3 = *i4 = 0;
-  *f1 = *f2 = *f3 = *f4 = *f5 = *f6 = 0.0;
+  /* Moved here from Read_Commands() */
+  matpar.imat=0;
+  data.n = data.m = 0;
+  if( !datagn() ) return( FALSE );
 
-  /* read a line from input file */
-  mem_alloc((void **)&line_buf, LINE_LEN, "in readmn()");
-  if( line_buf == NULL ) return( FALSE );
-  startptr = line_buf;
-  eof = Load_Line( line_buf, input_fp );
-  if( eof == EOF )
+  /* Memory allocation for temporary buffers */
+  mreq = (size_t)data.npm * sizeof(double);
+  mem_realloc( (void **)&save.xtemp,  mreq, "in input.c" );
+  mem_realloc( (void **)&save.ytemp,  mreq, "in input.c" );
+  mem_realloc( (void **)&save.ztemp,  mreq, "in input.c" );
+  mem_realloc( (void **)&save.bitemp, mreq, "in input.c" );
+  if( data.n > 0 )
   {
-	Strlcpy( mn, "EN", 3 );
-	fprintf( stderr,
-		"xnec2c: readmn(): command data card error\n"
-		"Unexpected EOF while reading input file - appending EN card\n" );
-	stop( _("readmn(): Command data card error\n"\
-		  "Unexpected EOF while reading input file\n"\
-			"Uppending a default EN card"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
+	mreq = (size_t)data.n * sizeof(double);
+	mem_realloc( (void **)&save.sitemp, mreq, "in input.c" );
   }
 
-  /* get line length */
-  len = (int)strlen( line_buf );
+  /* Memory allocation for primary interacton matrix. */
+  mreq = (size_t)(data.np2m * (data.np + 2 * data.mp)) * sizeof(complex double);
+  mem_realloc( (void **)&cm, mreq, "in input.c" );
 
-  /* abort if card's mnemonic too short or missing */
-  if( len < 2 )
-  {
-	Strlcpy( mn, "XX", 3 );
-	fprintf( stderr,
-		"xnec2c: readmn(): command data card error\n"
-		"card's mnemonic code too short or missing\n" );
-	stop( _("readmn(): Command data card error\n"\
-		  "Mnemonic code too short or missing"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
-  }
+  /* Memory allocation for current buffers */
+  mreq = (size_t)data.npm * sizeof( double);
+  mem_realloc( (void **)&crnt.air, mreq, "in input.c" );
+  mem_realloc( (void **)&crnt.aii, mreq, "in input.c" );
+  mem_realloc( (void **)&crnt.bir, mreq, "in input.c" );
+  mem_realloc( (void **)&crnt.bii, mreq, "in input.c" );
+  mem_realloc( (void **)&crnt.cir, mreq, "in input.c" );
+  mem_realloc( (void **)&crnt.cii, mreq, "in input.c" );
+  mreq = (size_t)data.np3m * sizeof( complex double);
+  mem_realloc( (void **)&crnt.cur, mreq, "in input.c" );
 
-  /* extract card's mnemonic code */
-  Strlcpy( mn, line_buf, 3 );
+  /* Memory allocation for loading buffers */
+  mreq = (size_t)data.npm * sizeof(complex double);
+  mem_realloc( (void **)&zload.zarray, mreq, "in input.c" );
 
-  /* Return if only mnemonic on card */
-  if( len == 2 )
-  {
-	free_ptr( (void **)&startptr );
-	return( TRUE );
-  }
+  /* Save segment and patch data for freq scaling */
+  if( data.n > 0 )
+	for( idx = 0; idx < data.n; idx++ )
+	{
+	  save.xtemp[idx]  = data.x[idx];
+	  save.ytemp[idx]  = data.y[idx];
+	  save.ztemp[idx]  = data.z[idx];
+	  save.sitemp[idx] = data.si[idx];
+	  save.bitemp[idx] = data.bi[idx];
+	}
 
-  /* Compatibility with NEC4, comments between data cards */
-  if( strncmp(mn, "CM", 2) == 0 )
-  {
-	free_ptr( (void **)&startptr );
-	return( TRUE );
-  }
+  if( data.m > 0 )
+	for( idx = 0; idx < data.m; idx++ )
+	{
+	  int j;
 
-  /* check line for spurious characters */
-  for( idx = 2; idx < len; idx++ )
-  {
-	if( ((line_buf[idx] >= '0') &&
-		 (line_buf[idx] <= '9')) ||
-		 (line_buf[idx] == ' ')  ||
-		 (line_buf[idx] == '.')  ||
-		 (line_buf[idx] == ',')  ||
-		 (line_buf[idx] == '+')  ||
-		 (line_buf[idx] == '-')  ||
-		 (line_buf[idx] == 'E')  ||
-		 (line_buf[idx] == 'e')  ||
-		 (line_buf[idx] == '\t') ||
-		 (line_buf[idx] == '\0') )
-	  continue;
-	else
-	  break;
-  }
-  if( idx < len )
-  {
-	fprintf( stderr,
-		"xnec2c: readmn(): command data card \"%s\" error\n"
-		"Spurious character '%c' at column %d\n",
-		mn, line_buf[idx], idx+1 );
-	stop( _("readmn(): Command data card error\n"\
-		  "Spurious character in command card"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
-  }
+	  j = idx + data.n;
+	  save.xtemp[j]  = data.px[idx];
+	  save.ytemp[j]  = data.py[idx];
+	  save.ztemp[j]  = data.pz[idx];
+	  save.bitemp[j] = data.pbi[idx];
+	}
 
-  /* read integers from line */
-  line_buf += 2;
-  for( i = 0; i < nint; i++ )
+  return( TRUE );
+} /* Read_Geometry() */
+
+/*------------------------------------------------------------------------*/
+
+/* Read_Commands()
+ *
+ * Reads commands from input file and stores
+ * them for later execution by user command
+ */
+  gboolean
+Read_Commands( void )
+{
+  /* input card mnemonic list */
+  char *atst[NUM_CMNDS] =
   {
-	/* read an integer from line */
-	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
-	if( *endptr == '\0' ) break;
-	line_buf = endptr + 1;
-  } /* for( i = 0; i < nint; i++ ) */
+	"CM", "CP", "EK", "EN", "EX", \
+	"FR", "GD", "GN", "KH", "LD", \
+	"NE", "NH", "NT", "PQ", "PT", \
+	"RP", "SY", "TL", "XQ"
+  };
 
-  /* Return if no floats are specified in the card */
-  if( *endptr == '\0' )
+  char ain[3];
+  double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+  int
+	mpcnt, itmp1, itmp2, itmp3, itmp4,
+	ain_num;   /* My addition, ain mnemonic as a number */
+  size_t mreq; /* My addition, size req. for malloc's   */
+
+  /* initializations etc from original fortran code */
+  mpcnt = 0;
+
+  /* Matrix parameters */
+  if( matpar.imat == 0)
   {
-	*i1= iarr[0];
-	*i2= iarr[1];
-	*i3= iarr[2];
-	*i4= iarr[3];
-	*f1= rarr[0];
-	*f2= rarr[1];
-	*f3= rarr[2];
-	*f4= rarr[3];
-	*f5= rarr[4];
-	*f6= rarr[5];
-	free_ptr( (void **)&startptr );
-	return( TRUE );
+	netcx.neq  = data.n+2*data.m;
+	netcx.neq2 = 0;
   }
 
-  /* read doubles from line */
-  for( i = 0; i < nflt; i++ )
-  {
-	/* read a double from line */
-	rarr[i] = Strtod( line_buf, &endptr );
-	if( *endptr == '\0' ) break;
-	line_buf = endptr + 1;
-  } /* for( i = 0; i < nflt; i++ ) */
+  /* default values for input parameters and flags */
+  calc_data.rkh = 1.0;
+  calc_data.iexk = 0;
+  calc_data.iped = 0;
+  calc_data.nfrq = 1;
+  calc_data.fmhz = CVEL;
+  save.fmhz = CVEL;
+  calc_data.mxfrq = 0.0;
+  fpat.dth   = 0.0;
+  fpat.thets = 0.0;
+  fpat.ixtyp = 0;
+  fpat.nfeh  = 0;
+  fpat.nrx   = 0;
+  fpat.nry   = 0;
+  fpat.nry   = 0;
+  fpat.nth   = 0;
+  fpat.nph   = 0;
+  fpat.near = -1;
+  gnd.ifar  = -1;
+  gnd.zrati = CPLX_10;
+  gnd.ksymp = 1;
+  gnd.nradl = 0;
+  gnd.iperf = 0;
+  netcx.nonet = 0;
+  netcx.ntsol = 0;
+  netcx.masym = 0;
+  netcx.npeq = data.np+2*data.mp;
 
-  /* Return values on normal exit */
-  *i1= iarr[0];
-  *i2= iarr[1];
-  *i3= iarr[2];
-  *i4= iarr[3];
-  *f1= rarr[0];
-  *f2= rarr[1];
-  *f3= rarr[2];
-  *f4= rarr[3];
-  *f5= rarr[4];
-  *f6= rarr[5];
+  /* My additions */
+  vsorc.nvqd   = 0;
+  vsorc.nsant  = 0;
+  zload.nldseg = 0;
+  zload.nload  = 0;
 
-  free_ptr( (void **)&startptr );
-  return( TRUE );
-} /* readmn() */
+  /* Allocate some buffers */
+  mreq = (size_t)data.np2m * sizeof(int);
+  mem_realloc( (void **)&save.ip, mreq, "in input.c" );
 
-/*-----------------------------------------------------------------------*/
+  /* Memory allocation for symmetry array */
+  smat.nop = netcx.neq/netcx.npeq;
+  mreq = (size_t)(smat.nop * smat.nop) * sizeof( complex double);
+  mem_realloc( (void **)&smat.ssx, mreq, "in input.c" );
 
-  gboolean
-readgm( char *gm, int *i1, int *i2, double *x1,
-	double *y1, double *z1, double *x2,
-	double *y2, double *z2, double *rad )
-{
-  char
-	*line_buf = NULL,
-	*startptr = NULL,
-	*endptr   = NULL;
-  int len, i, idx;
-  int nint = 2, nflt = 7;
-  int iarr[2] = { 0, 0 };
-  double rarr[7] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
-  int eof; /* EOF error flag */
+  /* main input section, exits at various points */
+  /* depending on error conditions or end of job */
+  while( TRUE )
+  {
+	/* Main input section - standard read statement - jumps */
+	/* to appropriate section for specific parameter set up */
+	if( !readmn(
+		  ain, &itmp1, &itmp2, &itmp3, &itmp4,
+		  &tmp1, &tmp2, &tmp3, &tmp4, &tmp5, &tmp6) )
+	  return( FALSE );
 
+	mpcnt++;
 
-  /* Clear return values */
-  *i1 = *i2 = 0;
-  *x1 = *y1 = *z1 = *x2 = *y2 = *z2 = *rad = 0.0;
+	/* identify command card id mnemonic */
+	for( ain_num = 0; ain_num < NUM_CMNDS; ain_num++ )
+	  if( strncmp( ain, atst[ain_num], 2) == 0 )
+		break;
 
-  /* read a line from input file */
-  mem_alloc((void **)&line_buf, LINE_LEN, "in readgm()");
-  if( line_buf == NULL ) return( FALSE );
-  startptr = line_buf;
-  eof = Load_Line( line_buf, input_fp );
-  if( eof == EOF )
-  {
-	Strlcpy( gm, "GE", 3 );
-	fprintf( stderr,
-		"xnec2c: readgm(): geometry data card error\n"
-		"Unexpected EOF while reading input file - appending GE card\n" );
-	stop( _("readgm(): Geometry data card error\n"\
-		  "Unexpected EOF while reading input file\n"\
-		  "Uppending a default GE card"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
-  }
+	/* take action according to card id mnemonic */
+	switch( ain_num )
+	{
+	  case CM: /* "cm" card ignored, comments in data cards as in NEC4 */
+		fprintf( stderr, "xnec2c: Read_Commands():"
+			" ignoring CM card in commands\n" );
+		stop( _("Read_Commands(): Ignoring CM card in commands"),
+			ERR_OK );
+		continue;
 
-  /* get line length */
-  len = (int)strlen( line_buf );
+	  case CP: /* "cp" card ignored, maximum coupling between antennas */
+		stop( _("Read_Commands(): CP card is ignored\n"
+			  "Coupling calculation not implemented"), ERR_OK );
+		continue; /* continue card input loop */
 
-  /* abort if card's mnemonic too short or missing */
-  if( len < 2 )
-  {
-	Strlcpy( gm, "XX", 3 );
-	fprintf( stderr,
-		"xnec2c: readgm(): geometry data card error\n"
-		"card's mnemonic code too short or missing\n" );
-	stop( _("readgm(): Geometry data card error\n"\
-		  "Card's mnemonic code too short or missing"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
-  }
+	  case EK: /* "ek" card,  extended thin wire kernel option */
+		if( itmp1 == -1)
+		  calc_data.iexk = 0;
+		else
+		  calc_data.iexk = 1;
+		continue; /* continue card input loop */
 
-  /* extract card's mnemonic code */
-  Strlcpy( gm, line_buf, 3 );
+	  case EN: /* "en" card, end data input, no action */
+		break;
 
-  /* Return if only mnemonic on card */
-  if( len == 2 )
-  {
-	free_ptr( (void **)&startptr );
-	return( TRUE );
-  }
+	  case EX: /* "ex" card, excitation parameters */
+		netcx.masym = itmp4/10;
+		fpat.ixtyp  = itmp1;
 
-  /* Compatibility with NEC4,
-   * comments between data cards */
-  if( strcmp(gm, "CM") == 0 )
-  {
-	free_ptr( (void **)&startptr );
-	return( TRUE );
-  }
+		/* Applied E field or current discontinuity */
+		if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) )
+		{
+		  netcx.ntsol = 0;
 
-  /* check line for spurious characters */
-  for( idx = 2; idx < len; idx++ )
-  {
-	if( ((line_buf[idx] >= '0') &&
-		 (line_buf[idx] <= '9')) ||
-		 (line_buf[idx] == ' ')  ||
-		 (line_buf[idx] == '.')  ||
-		 (line_buf[idx] == ',')  ||
-		 (line_buf[idx] == '+')  ||
-		 (line_buf[idx] == '-')  ||
-		 (line_buf[idx] == 'E')  ||
-		 (line_buf[idx] == 'e')  ||
-		 (line_buf[idx] == '\t') ||
-		 (line_buf[idx] == '\0') )
-	  continue;
-	else
-	  break;
-  }
-  if( idx < len )
-  {
-	fprintf( stderr,
-		"xnec2c: readgm(): geometry data card \"%s\" error\n"
-		"Spurious character '%c' at column %d\n",
-		gm, line_buf[idx], idx+1 );
-	stop( _("readmn(): Geometry data card error\n"\
-		  "Spurious character in command card"), ERR_OK );
-	free_ptr( (void **)&startptr );
-	return( FALSE );
-  }
+		  /* Current discontinuity E source */
+		  if( fpat.ixtyp == 5 )
+		  {
+			vsorc.nvqd++;
+			mreq = (size_t)vsorc.nvqd * sizeof(int);
+			mem_realloc( (void **)&vsorc.ivqd, mreq, "in input.c" );
+			mem_realloc( (void **)&vsorc.iqds, mreq, "in input.c" );
+			mreq = (size_t)vsorc.nvqd * sizeof(complex double);
+			mem_realloc( (void **)&vsorc.vqd, mreq, "in input.c" );
+			mem_realloc( (void **)&vsorc.vqds, mreq, "in input.c" );
+			{
+			  int indx = vsorc.nvqd-1;
 
-  /* read integers from line */
-  line_buf += 2;
-  for( i = 0; i < nint; i++ )
-  {
-	/* read an integer from line, reject spurious chars */
-	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
-	if( *endptr == '\0' ) break;
-	line_buf = endptr + 1;
-  } /* for( i = 0; i < nint; i++ ) */
+			  if( (vsorc.ivqd[indx] = isegno(itmp2, itmp3)) < 0 )
+				return( FALSE ); /* my addition, error */
+			  vsorc.vqd[indx]= cmplx( tmp1, tmp2);
+			  if( cabs( vsorc.vqd[indx]) < 1.0e-20)
+				vsorc.vqd[indx] = CPLX_10;
 
-  /* Return if no floats are specified in the card */
-  if( *endptr == '\0' )
-  {
-	*i1 = iarr[0];
-	*i2 = iarr[1];
-	*x1 = rarr[0];
-	*y1 = rarr[1];
-	*z1 = rarr[2];
-	*x2 = rarr[3];
-	*y2 = rarr[4];
-	*z2 = rarr[5];
-	*rad= rarr[6];
-	free_ptr( (void **)&startptr );
-	return( TRUE );
-  }
+			  calc_data.iped   = itmp4- netcx.masym*10;
+			  calc_data.zpnorm = tmp3;
+			}
 
-  /* read doubles from line */
-  for( i = 0; i < nflt; i++ )
-  {
-	/* read a double from line */
-	rarr[i] = Strtod( line_buf, &endptr );
-	if( *endptr == '\0' ) break;
-	line_buf = endptr + 1;
-  } /* for( i = 0; i < nflt; i++ ) */
+		  } /* if( fpat.ixtyp == 5) */
+		  else
+		  {
+			/* Else, applied E field */
+			vsorc.nsant++;
+			mreq = (size_t)vsorc.nsant * sizeof(int);
+			mem_realloc( (void **)&vsorc.isant, mreq, "in input.c" );
+			mreq = (size_t)vsorc.nsant * sizeof(complex double);
+			mem_realloc( (void **)&vsorc.vsant, mreq, "in input.c" );
+			{
+			  int indx = vsorc.nsant-1;
 
-  /* Return values on normal exit */
-  *i1  = iarr[0];
-  *i2  = iarr[1];
-  *x1  = rarr[0];
-  *y1  = rarr[1];
-  *z1  = rarr[2];
-  *x2  = rarr[3];
-  *y2  = rarr[4];
-  *z2  = rarr[5];
-  *rad = rarr[6];
+			  if( (vsorc.isant[indx] = isegno(itmp2, itmp3)) < 0 )
+				  return( FALSE ); /* my addition, error condition */
+			  vsorc.vsant[indx]= cmplx( tmp1, tmp2);
+			  if( cabs( vsorc.vsant[indx]) < 1.0e-20)
+				vsorc.vsant[indx] = CPLX_10;
+
+			  calc_data.iped= itmp4- netcx.masym*10;
+			  calc_data.zpnorm= tmp3;
+			  if( (calc_data.iped == 1) && (calc_data.zpnorm > 0.0) )
+				calc_data.iped=2;
+			}
+
+		  } /* if( fpat.ixtyp == 5 ) */
+
+		} /* if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) ) */
+		else
+		{
+		  /* For fpat.ixtyp = 2|3|4 = incident field or current source */
+		  calc_data.nthi= itmp2;
+		  calc_data.nphi= itmp3;
+		  calc_data.xpr1= tmp1;
+		  calc_data.xpr2= tmp2;
+		  calc_data.xpr3= tmp3;
+		  calc_data.xpr4= tmp4;
+		  calc_data.xpr5= tmp5;
+		  calc_data.xpr6= tmp6;
+		  vsorc.nsant=0;
+		  vsorc.nvqd=0;
+		  calc_data.thetis= tmp1;
+		  calc_data.phiss= tmp2;
+		}
 
-  free_ptr( (void **)&startptr );
-  return( TRUE );
-} /* readgm() */
+		SetFlag( ENABLE_EXCITN );
+		continue; /* continue card input loop */
 
-/*-----------------------------------------------------------------------*/
+	  case FR: /* "fr" card, frequency parameters */
+		if( !CHILD )
+		{
+		  calc_data.nfrq = itmp2;
+		  if( calc_data.nfrq <= 0)
+			calc_data.nfrq = 1;
+		}
+		else calc_data.nfrq = 1;
 
-/* datagn is the main routine for input of geometry data. */
-  gboolean
-datagn( void )
-{
-  char gm[3];
+		/* Allocate normalization buffer */
+		{
+		  mreq = (size_t)calc_data.nfrq * sizeof(double);
+		  mem_realloc( (void **)&impedance_data.zreal, mreq, "in input.c" );
+		  mem_realloc( (void **)&impedance_data.zimag, mreq, "in input.c" );
+		  mem_realloc( (void **)&impedance_data.zmagn, mreq, "in input.c" );
+		  mem_realloc( (void **)&impedance_data.zphase, mreq, "in input.c" );
+		  mem_realloc( (void **)&save.freq, mreq, "in input.c" );
+		  mreq = (size_t)calc_data.nfrq * sizeof(char);
+		  mem_realloc( (void **)&save.fstep, mreq, "in input.c" );
+		}
 
-  /* input card mnemonic list */
-  char *atst[] =
-  {
-	"GW", "GX", "GR", "GS", "GE","GM", "SP",\
-	"SM", "GA", "SC", "GH", "GF", "CT"
-  };
+		if( CHILD ) continue;
 
-  int nwire, isct, itg, iy=0, iz;
-  size_t mreq;
-  int ix, i, ns, gm_num; /* geometry card id as a number */
-  double rad, xs1, xs2, ys1, ys2, zs1, zs2;
-  double x3=0, y3=0, z3=0, x4=0, y4=0, z4=0;
-  double xw1, xw2, yw1, yw2, zw1, zw2;
-  double dummy;
+		calc_data.ifrq = itmp1;
+		calc_data.fmhz = save.fmhz = tmp1;
 
-  data.ipsym=0;
-  nwire=0;
-  data.n=0;
-  data.np=0;
-  data.m=0;
-  data.mp=0;
-  isct=0;
-  structure_proj_params.r_max = 0.0;
+		/* My addition, max frequency */
+		if( itmp1 == 0 )
+		  calc_data.mxfrq =
+			(double)tmp1 + (double)tmp2 * (double)(itmp2-1);
+		else if( itmp1 == 1 )
+		  calc_data.mxfrq =
+			(double)tmp1 * pow( (double)tmp2, (double)(itmp2-1) );
 
-  /* read geometry data card and branch to */
-  /* section for operation requested */
-  do
-  {
-	if( !readgm(gm, &itg, &ns, &xw1, &yw1, &zw1, &xw2, &yw2, &zw2, &rad) )
-	  return( FALSE );
+		/* My addition, extra features in "fr" card. */
+		/* Specifies lower and upper value of frequency range */
+		if( calc_data.ifrq == 2 )
+		{
+		  calc_data.nfrq++;
+		  /* Linear frequency stepping */
+		  if( calc_data.nfrq > 1 )
+			calc_data.delfrq =
+			  (tmp2 - tmp1)/(double)(calc_data.nfrq-1);
+		  calc_data.ifrq  = 0;
+		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
+		}
+		else if( calc_data.ifrq == 3 )
+		{
+		  calc_data.nfrq++;
+		  /* Multiplicative frequency stepping */
+		  if( calc_data.nfrq > 1 )
+			calc_data.delfrq =
+			  pow( (tmp2-tmp1), 1.0/(double)(calc_data.nfrq-1) );
+		  calc_data.ifrq  = 1;
+		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
+		}
+		else calc_data.delfrq = tmp2;
 
-	/* identify card id mnemonic */
-	for( gm_num = 0; gm_num < NUM_GEOMN; gm_num++ )
-	  if( strncmp( gm, atst[gm_num], 2) == 0 )
-		break;
+		if( calc_data.iped == 1)
+		  calc_data.zpnorm = 0.0;
+		continue; /* continue card input loop */
 
-	if( gm_num != 9 ) isct=0;
+	  case GD: /* "gd" card, ground representation */
+		fpat.epsr2 = tmp1;
+		fpat.sig2  = tmp2;
+		fpat.clt   = tmp3;
+		fpat.cht   = tmp4;
+		continue; /* continue card input loop */
 
-	switch( gm_num )
-	{
-	  case GW: /* "gw" card, generate segment data for straight wire. */
-		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
-		nwire++;
+	  case GN: /* "gn" card, ground parameters under the antenna */
+		gnd.iperf = itmp1;
+		gnd.nradl = itmp2;
+		gnd.ksymp = 2;
+		save.epsr = tmp1;
+		save.sig  = tmp2;
 
-		if( rad != 0.0)
+		/* Theta must be less than 90 if ground present */
+		double test = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
+		if( (gnd.ifar != 1) && (test > 90.0) )
 		{
-		  xs1=1.0;
-		  ys1=1.0;
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): theta > 90 deg. with ground specified\n" );
+		  stop( _("Read_Commands(): Theta > 90 deg with ground specified\n"
+				"Please check RP card data and correct"), ERR_OK );
+		  return( FALSE );
 		}
+
+		if( gnd.nradl > 0)
+		{
+		  if( gnd.iperf == 2)
+		  {
+			fprintf( stderr,
+				"xnec2c: Read_Commands(): radial wire g.s. approximation\n"
+				"may not be used with Sommerfeld ground option\n" );
+			stop( _("Read_Commands(): radial wire g.s. approximation\n"
+				  "may not be used with Sommerfeld ground option"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  save.scrwlt = tmp3;
+		  save.scrwrt = tmp4;
+		  continue; /* continue card input loop */
+		} /* if( gnd.nradl > 0) */
 		else
 		{
-		  if( !readgm(gm, &ix, &iy, &xs1, &ys1, &zs1,
-			  &dummy, &dummy, &dummy, &dummy) )
-			  return( FALSE );
+		  save.scrwlt = 0.0;
+		  save.scrwrt = 0.0;
+		}
 
-		  if( strcmp(gm, "GC" ) != 0 )
+		fpat.epsr2 = tmp3;
+		fpat.sig2  = tmp4;
+		fpat.clt   = tmp5;
+		fpat.cht   = tmp6;
+		continue; /* continue card input loop */
+
+	  case KH: /* "kh" card, matrix integration limit */
+		calc_data.rkh = tmp1;
+		continue; /* continue card input loop */
+
+	  case LD: /* "ld" card, loading parameters */
+		{
+		  int idx, nseg;
+
+		  /* Reallocate loading buffers */
+		  zload.nload++;
+		  mreq = (size_t)zload.nload * sizeof(int);
+		  mem_realloc( (void **)&calc_data.ldtyp,  mreq, "in input.c" );
+		  mem_realloc( (void **)&calc_data.ldtag,  mreq, "in input.c" );
+		  mem_realloc( (void **)&calc_data.ldtagf, mreq, "in input.c" );
+		  mem_realloc( (void **)&calc_data.ldtagt, mreq, "in input.c" );
+
+		  mreq = (size_t)zload.nload * sizeof(double);
+		  mem_realloc( (void **)&calc_data.zlr, mreq, "in input.c" );
+		  mem_realloc( (void **)&calc_data.zli, mreq, "in input.c" );
+		  mem_realloc( (void **)&calc_data.zlc, mreq, "in input.c" );
+
+		  idx = zload.nload-1;
+		  calc_data.ldtyp[idx]= itmp1;
+		  calc_data.ldtag[idx]= itmp2;
+		  if( itmp4 == 0) itmp4= itmp3;
+		  calc_data.ldtagf[idx]= itmp3;
+		  calc_data.ldtagt[idx]= itmp4;
+
+		  if( itmp4 < itmp3 )
 		  {
 			fprintf( stderr,
-				"xnec2c: datagn(): geometry data card error "
-				"no GC card for tapered wire\n" );
-			stop( _("datagn(): Geometry data error\n"\
-				  "No GC card for tapered wire"), ERR_OK );
+				"xnec2c: Read_Commands(): data fault on loading card no %d\n"
+				"itag step1 %d is greater than itag step2 %d\n",
+				zload.nload, itmp3, itmp4 );
+			stop( _("Read_Commands(): Data fault on loading card\n"
+				  "itag step1 is greater than itag step2"), ERR_OK );
 			return( FALSE );
 		  }
 
-		  if( (ys1 == 0.0) || (zs1 == 0.0) )
+		  calc_data.zlr[idx]= tmp1;
+		  calc_data.zli[idx]= tmp2;
+		  calc_data.zlc[idx]= tmp3;
+
+		  /*** My addition, for drawing structure ***/
+		  /* Work out absolute seg number of loaded segments (!) */
+		  if( itmp1 == -1 ) /* Null all loads */
+			zload.nldseg = 0;
+		  else if( itmp2 == 0 ) /* No tag num */
 		  {
-			fprintf( stderr, "xnec2c: datagn(): geometry GC data card error\n" );
-			stop( _("datagn(): Geometry GC data card error"), ERR_OK );
-			return( FALSE );
+			if( itmp3 == 0 ) /* All segs loaded */
+			{
+			  nseg = data.n;
+			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
+			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg]   = itmp1;
+				zload.ldsegn[zload.nldseg++] = idx+1;
+			  }
+			}
+			else /* Absolute seg num specified */
+			{
+			  nseg = itmp4 - itmp3 + 1;
+			  if( nseg <= 0 ) nseg = 1;
+			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
+			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg]   = itmp1;
+				zload.ldsegn[zload.nldseg++] = itmp3+idx;
+			  }
+			}
+
+		  } /* if( itmp2 == 0 ) */
+		  else /* Tag num specified */
+		  {
+			if( (itmp3 == 0) && (itmp4 == 0) ) /* All segs of tag loaded */
+			{
+			  for( idx = 0; idx < data.n; idx++ )
+				if( data.itag[idx] == itmp2 )
+				{
+				  mreq = (size_t)(zload.nldseg + 1) * sizeof(int);
+				  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
+				  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
+				  zload.ldtype[zload.nldseg]   = itmp1;
+				  zload.ldsegn[zload.nldseg++] = idx+1;
+				}
+			}
+			else /* A range of segs of tag loaded */
+			{
+			  nseg = itmp4 - itmp3 + 1;
+			  if( nseg <= 0 ) nseg = 1; /* Just one seg of tag (=itmp3) */
+			  mreq = (size_t)(zload.nldseg + nseg) * sizeof(int);
+			  mem_realloc( (void **)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void **)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg] = itmp1;
+				if( (zload.ldsegn[zload.nldseg++] =
+					  isegno(itmp2, itmp3+idx)) < 0 )
+				  return( FALSE );
+			  }
+			}
 		  }
+		} /* case 8: */
+		continue; /* continue card input loop */
 
-		  rad= ys1;
-		  ys1= pow( (zs1/ys1), (1.0/(ns-1.0)) );
-		}
+	  case NE: case NH:  /* "negcnh" cards, near field calculation parameters */
+		if( ain_num == 11 )
+		  fpat.nfeh |= NEAR_HFIELD;
+		else
+		  fpat.nfeh |= NEAR_EFIELD;
 
-		wire( xw1, yw1, zw1, xw2, yw2, zw2, rad, xs1, ys1, ns, itg);
-		continue;
+		fpat.near = itmp1;
+		fpat.nrx  = itmp2;
+		fpat.nry  = itmp3;
+		fpat.nrz  = itmp4;
+		fpat.xnr  = tmp1;
+		fpat.ynr  = tmp2;
+		fpat.znr  = tmp3;
+		fpat.dxnr = tmp4;
+		fpat.dynr = tmp5;
+		fpat.dznr = tmp6;
 
-		/* reflect structure along x,y, or z */
-		/* axes or rotate to form cylinder.  */
-	  case GX: /* "gx" card */
-		if( (ns < 0) || (itg < 0) )
+		if( (fpat.nrx > 0) &&
+			(fpat.nry > 0) &&
+			(fpat.nrz > 0) &&
+			(fpat.near != -1) )
 		{
-		  fprintf( stderr, "xnec2c: datagn(): geometry GX data card error\n" );
-		  stop( _("datagn(): Geometry GX data card error"), ERR_OK );
-		  return( FALSE );
+		  SetFlag( ENABLE_NEAREH );
+		  SetFlag( ALLOC_NEAREH_BUFF );
+		  SetFlag( ALLOC_PNTING_BUFF );
 		}
 
-		iy= ns/10;
-		iz= ns- iy*10;
-		ix= iy/10;
-		iy= iy- ix*10;
-
-		if( ix != 0)
-		  ix=1;
-		if( iy != 0)
-		  iy=1;
-		if( iz != 0)
-		  iz=1;
-
-		if( !reflc(ix, iy, iz, itg, ns) )
-		  return( FALSE );
-		continue;
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card */
+		continue; /* continue card input loop */
 
-	  case GR: /* "gr" card */
-		if( (ns < 0) || (itg < 0) )
+	  case NT: case TL: /* "nt" & "tl" cards, network parameters */
 		{
-		  fprintf( stderr, "xnec2c: datagn(): geometry GR data card error\n" );
-		  stop( _("datagn(): Geometry GR data card error"), ERR_OK );
-		  return( FALSE );
-		}
+		  int idx;
 
-		ix=-1;
-		iz = 0;
-		if( !reflc(ix, iy, iz, itg, ns) )
-		  return( FALSE );
-		continue;
+		  /* Re-allocate network buffers */
+		  netcx.nonet++;
+		  mreq = (size_t)netcx.nonet * sizeof(int);
+		  mem_realloc( (void **)&netcx.ntyp,  mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.iseg1, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.iseg2, mreq, "in input.c" );
 
-	  case GS: /* "gs" card, scale structure dimensions by factor xw1 */
-		if( (itg > 0) && (ns > 0) && (ns >= itg) )
-		{
-		  for( i = 0; i < data.n; i++ )
+		  mreq = (size_t)netcx.nonet * sizeof(double);
+		  mem_realloc( (void **)&netcx.x11r, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.x11i, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.x12r, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.x12i, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.x22r, mreq, "in input.c" );
+		  mem_realloc( (void **)&netcx.x22i, mreq, "in input.c" );
+
+		  idx = netcx.nonet-1;
+		  if( ain_num == 12 )
+			netcx.ntyp[idx] = 1;
+		  else
 		  {
-			if( (data.itag[i] >= itg) && (data.itag[i] <= ns) )
+			netcx.ntyp[idx] = 2;
+			if( tmp1 == 0.0 )
 			{
-			  data.x1[i]= data.x1[i]* xw1;
-			  data.y1[i]= data.y1[i]* xw1;
-			  data.z1[i]= data.z1[i]* xw1;
-			  data.x2[i]= data.x2[i]* xw1;
-			  data.y2[i]= data.y2[i]* xw1;
-			  data.z2[i]= data.z2[i]* xw1;
-			  data.bi[i]= data.bi[i]* xw1;
+			  fprintf( stderr,
+				  "xnec2c: Read_Commands(): Transmission Line impedance = 0\n"
+				  "is not valid. Please correct NT or TL card\n" );
+			  stop( _("Read_Commands(): Transmission Line impedance = 0\n"
+					"is not valid. Please correct NT or TL card"), ERR_OK );
+			  return( FALSE );
 			}
 		  }
-		  /* FIXME corrects errors when GS follows GX but this is just a work-around */
-		  data.np = data.n;
-		  data.ipsym = 0;
-		}
-		else for( i = 0; i < data.n; i++ )
-		{
-		  data.x1[i]= data.x1[i]* xw1;
-		  data.y1[i]= data.y1[i]* xw1;
-		  data.z1[i]= data.z1[i]* xw1;
-		  data.x2[i]= data.x2[i]* xw1;
-		  data.y2[i]= data.y2[i]* xw1;
-		  data.z2[i]= data.z2[i]* xw1;
-		  data.bi[i]= data.bi[i]* xw1;
-		}
-
-		yw1= xw1* xw1;
-		for( i = 0; i < data.m; i++ )
-		{
-		  data.px[i] = data.px[i]* xw1;
-		  data.py[i] = data.py[i]* xw1;
-		  data.pz[i] = data.pz[i]* xw1;
-		  data.pbi[i]= data.pbi[i]* yw1;
-		}
-		continue;
-
-	  case GE: /* "ge" card, terminate structure geometry input. */
-		/* My addition, for drawing */
-		if( ((data.n > 0) || (data.m > 0)) && !CHILD )
-		  Init_Struct_Drawing();
-		else if( (data.n == 0) && (data.m == 0) )
-		{
-		  stop( _("No geometry data cards"), ERR_OK );
-		  return( FALSE );
-		}
-
-		if( !conect(itg) ) return( FALSE );
-
-		if( data.n != 0)
-		{
-		  /* Allocate wire buffers */
-		  mreq = (size_t)data.n * sizeof(double);
-		  mem_realloc( (void **)&data.si,   mreq, "in input.c" );
-		  mem_realloc( (void **)&data.sab,  mreq, "in input.c" );
-		  mem_realloc( (void **)&data.cab,  mreq, "in input.c" );
-		  mem_realloc( (void **)&data.salp, mreq, "in input.c" );
-		  mem_realloc( (void **)&data.x, mreq, "in input.c" );
-		  mem_realloc( (void **)&data.y, mreq, "in input.c" );
-		  mem_realloc( (void **)&data.z, mreq, "in input.c" );
 
-		  for( i = 0; i < data.n; i++ )
+		  if( ((netcx.iseg1[idx] = isegno(itmp1, itmp2)) < 0) ||
+			  ((netcx.iseg2[idx] = isegno(itmp3, itmp4)) < 0) )
 		  {
-			xw1= data.x2[i]- data.x1[i];
-			yw1= data.y2[i]- data.y1[i];
-			zw1= data.z2[i]- data.z1[i];
-			data.x[i]=( data.x1[i]+ data.x2[i])/2.0;
-			data.y[i]=( data.y1[i]+ data.y2[i])/2.0;
-			data.z[i]=( data.z1[i]+ data.z2[i])/2.0;
-			xw2= xw1* xw1+ yw1* yw1+ zw1* zw1;
-			yw2= sqrt( xw2);
-			//yw2=( xw2/yw2 + yw2)/2.0;
-			data.si[i]= yw2;
-			data.cab[i]= xw1/ yw2;
-			data.sab[i]= yw1/ yw2;
-	
-			xw2= zw1/ yw2;
-			if( xw2 > 1.0)
-			  xw2=1.0;
-			if( xw2 < -1.0)
-			  xw2=-1.0;
-			data.salp[i]= xw2;
+			fprintf( stderr,
+				"xnec2c: Read_Commands(): Segment number error in TL or NT card\n" );
+			stop( _("Read_Commands(): Segment number\n"
+				"error in NT or TL card"), ERR_OK );
+			return( FALSE );
+		  }
+		  netcx.x11r[idx]  = tmp1;
+		  netcx.x11i[idx]  = tmp2;
+		  netcx.x12r[idx]  = tmp3;
+		  netcx.x12i[idx]  = tmp4;
+		  netcx.x22r[idx]  = tmp5;
+		  netcx.x22i[idx]  = tmp6;
 
-			//xw2= asin( xw2)* TD;
-			//yw2= atan2( yw1, xw1)* TD;
+		  if( (netcx.ntyp[idx] == 1) || (tmp1 > 0.0) )
+			continue; /* continue card input loop */
 
-			if( (data.si[i] <= 1.0e-20) || (data.bi[i] <= 0.0) )
-			{
-			  fprintf( stderr, "xnec2c: datagn(): segment data error\n" );
-			  stop( _("datagn(): Segment data error"), ERR_OK );
-			  return( FALSE );
-			}
+		  netcx.ntyp[idx] = 3;
+		  netcx.x11r[idx] = -tmp1;
+		  continue; /* continue card input loop */
 
-		  } /* for( i = 0; i < data.n; i++ ) */
+		} /* case 12: case 17: */
 
-		} /* if( data.n != 0) */
+	  case PQ: case PT: /* "pq" and "pt" cards ignored, no printing */
+		fprintf( stderr,
+			"xnec2c: Read_Commands(): PQ and PT cards are ignored\n"
+			"Printing to file not implemented\n" );
+		stop( _("Read_Commands(): PQ and PT cards are ignored\n"
+			  "Printing to file not implemented"), ERR_OK );
+		continue; /* continue card input loop */
 
-		if( data.m != 0)
+	  case RP: /* "rp" card, standard observation angle parameters */
+		if( itmp1 == 1 )
 		{
-		  for( i = 0; i < data.m; i++ )
-		  {
-			xw1=( data.t1y[i]* data.t2z[i] -
-				data.t1z[i]* data.t2y[i])* data.psalp[i];
-			yw1=( data.t1z[i]* data.t2x[i] -
-				data.t1x[i]* data.t2z[i])* data.psalp[i];
-			zw1=( data.t1x[i]* data.t2y[i] -
-				data.t1y[i]* data.t2x[i])* data.psalp[i];
-		  } /* for( i = 0; i < data.m; i++ ) */
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Surface wave option (I1=1)\n"
+			  "of RP command not implemented\n" );
+		  stop( _("Read_Commands(): Surface wave option (I1=1)\n"
+				"of RP command not implemented"), ERR_OK );
+		  return( FALSE );
+		}
 
-		} /* if( data.m != 0) */
+		gnd.ifar = itmp1;
+		fpat.nth = itmp2;
+		fpat.nph = itmp3;
 
-		data.npm  = data.n+data.m;
-		data.np2m = data.n+2*data.m;
-		data.np3m = data.n+3*data.m;
+		if( fpat.nth <= 0)
+		  fpat.nth=1;
+		if( fpat.nph <= 0)
+		  fpat.nph=1;
 
-		return( TRUE );
+		fpat.ipd  = itmp4 / 10;
+		fpat.iavp = itmp4 - fpat.ipd*10;
+		fpat.inor = fpat.ipd / 10;
+		fpat.ipd  = fpat.ipd - fpat.inor*10;
+		fpat.iax  = fpat.inor / 10;
+		fpat.inor = fpat.inor - fpat.iax*10;
+
+		if( fpat.iavp )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"
+			  "of RP command not implemented\n" );
+		  stop( _("Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"
+				"of RP command not supported"), ERR_OK );
+		  return( FALSE );
+		}
+		if( fpat.iax != 0) fpat.iax = 1;
+		if( fpat.ipd != 0) fpat.ipd = 1;
+		fpat.thets = tmp1;
+		fpat.phis  = tmp2;
+		fpat.dth   = tmp3;
+		fpat.dph   = tmp4;
+		fpat.rfld  = tmp5;
+		fpat.gnor  = tmp6;
 
-		/* "gm" card, move structure or reproduce */
-		/* original structure in new positions.   */
-	  case GM:
+		/* Theta must be less than 90 if ground present */
+		tmp1 = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
+		if( (gnd.ksymp == 2) && (gnd.ifar != 1) && (tmp1 > 90.0) )
 		{
-		  int tgf = (int)(rad + 0.5);
-		  if( (tgf < 0) || (ns < 0) || (rad < 0.0) )
-		  {
-			fprintf( stderr, "xnec2c: datagn(): move GM data card error\n" );
-			stop( _("datagn(): Move GM data card error"), ERR_OK );
-			return( FALSE );
-		  }
-		  xw1= xw1* TORAD;
-		  yw1= yw1* TORAD;
-		  zw1= zw1* TORAD;
-		  if( !move(xw1, yw1, zw1, xw2, yw2, zw2, (int)(rad+.5), ns, itg) )
-			return( FALSE );
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Theta > 90 deg. with ground specified\n"
+			  "Please check RP card data and correct\n" );
+		  stop( _("Read_Commands(): Theta > 90 deg. with ground specified\n"
+				"Please check RP card data and correct"), ERR_OK );
+		  return( FALSE );
 		}
+
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card */
+		continue; /* continue card input loop */
+
+	  case SY: /* "sy" TODO Compatibility with 4nec2.
+				  Too difficult, may never happen :-( */
 		continue;
 
-	  case SP: /* "sp" card, generate single new patch */
-		ns++;
+	  case XQ: /* "xq" execute card */
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card.
+		 * XQ now is the same as EN because of above */
+		if( itmp1 == 0 )
+		  break; /* No rad pat, stop reading commands */
 
-		if( itg != 0)
+		/* Read radiation pattern parameters */
+		gnd.ifar  = 0;
+		fpat.rfld = 0.0;
+		fpat.ipd  = 0;
+		fpat.iavp = 0;
+		fpat.inor = 0;
+		fpat.iax  = 0;
+		fpat.nth  = 91;
+		fpat.nph  = 1;
+		fpat.thets= 0.0;
+		fpat.phis = 0.0;
+		fpat.dth  = 1.0;
+		fpat.dph  = 0.0;
+
+		if( itmp1 == 2)
+		  fpat.phis = 90.0;
+		else if( itmp1 == 3)
 		{
-		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
-		  stop( _("datagn(): Patch data card error"), ERR_OK );
-		  return( FALSE );
+		  fpat.nph = 2;
+		  fpat.dph = 90.0;
 		}
 
-		if( (ns == 2) || (ns == 4) )
-		  isct=1;
+		SetFlag( ENABLE_RDPAT );
 
-		if( ns > 1)
-		{
-		  if( !readgm(gm, &ix, &iy, &x3, &y3,
-				&z3, &x4, &y4, &z4, &dummy) )
-			return( FALSE );
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card.
+		 * XQ now is the same as EN because of above */
+		break;
 
-		  if( (ns == 2) || (itg > 0) )
-		  {
-			x4= xw1+ x3- xw2;
-			y4= yw1+ y3- yw2;
-			z4= zw1+ z3- zw2;
-		  }
+	  default:
+		fprintf( stderr,
+			"xnec2c: Read_Commands(): faulty data "
+			"card label after geometry section\n" );
+		stop( _("Read_Commands(): Faulty data card\n"
+			  "label after geometry section"), ERR_OK );
+		return( FALSE );
+	} /* switch( ain_num ) */
 
-		  if( strcmp(gm, "SC") != 0 )
-		  {
-			fprintf( stderr, "xnec2c: datagn(): patch data error\n" );
-			stop( _("datagn(): Patch data error"), ERR_OK );
-			return( FALSE );
-		  }
+	/* Disable radiation pattern plots */
+	if( (fpat.nth < 2) || (fpat.nph < 1) || (gnd.ifar == 1) )
+	  ClearFlag( ENABLE_RDPAT );
+	else
+	{
+	  /* Allocate radiation pattern buffers */
+	  Alloc_Rdpattern_Buffers( calc_data.nfrq+1, fpat.nth, fpat.nph );
+	  SetFlag( ENABLE_RDPAT );
+	}
 
-		} /* if( ns > 1) */
-		else
-		{
-		  xw2= xw2* TORAD;
-		  yw2= yw2* TORAD;
-		}
+	return( TRUE );
+  } /* while( TRUE ) */
 
-		if( !patch( itg, ns, xw1, yw1, zw1, xw2,
-			yw2, zw2, x3, y3, z3, x4, y4, z4) )
-			return( FALSE );
-		continue;
+} /* Read_Commands() */
 
-	  case SM: /* "sm" card, generate multiple-patch surface */
-		if( (itg < 1) || (ns < 1) )
-		{
-		  fprintf( stderr, "datagn(): xnec2c: patch card data error\n" );
-		  stop( _("datagn(): Patch data card error"), ERR_OK );
-		  return( FALSE );
-		}
+/*-----------------------------------------------------------------------*/
 
-		if( !readgm(gm, &ix, &iy, &x3, &y3,
-			  &z3, &x4, &y4, &z4, &dummy) )
-		  return( FALSE );
+  gboolean
+readmn( char *mn, int *i1, int *i2, int *i3, int *i4,
+	double *f1, double *f2, double *f3,
+	double *f4, double *f5, double *f6 )
+{
+  char
+	*line_buf = NULL,
+	*startptr = NULL,
+	*endptr   = NULL;
+  int len, i, idx;
+  int nint = 4, nflt = 6;
+  int iarr[4] = { 0, 0, 0, 0 };
+  double rarr[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+  int eof; /* EOF error flag */
 
-		if( (ns == 2) || (itg > 0) )
-		{
-		  x4= xw1+ x3- xw2;
-		  y4= yw1+ y3- yw2;
-		  z4= zw1+ z3- zw2;
-		}
 
-		if( strcmp(gm, "SC" ) != 0 )
-		{
-		  fprintf( stderr, "xnec2c: datagn(): patch card data error\n" );
-		  stop( _("datagn(): Patch data card error"), ERR_OK );
-		  return( FALSE );
-		}
+  /* Clear return values */
+  *i1 = *i2 = *i3 = *i4 = 0;
+  *f1 = *f2 = *f3 = *f4 = *f5 = *f6 = 0.0;
 
-		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
-			yw2, zw2, x3, y3, z3, x4, y4, z4) )
-		  return( FALSE );
-		continue;
+  /* read a line from input file */
+  mem_alloc((void **)&line_buf, LINE_LEN, "in readmn()");
+  if( line_buf == NULL ) return( FALSE );
+  startptr = line_buf;
+  eof = Load_Line( line_buf, input_fp );
+  if( eof == EOF )
+  {
+	Strlcpy( mn, "EN", 3 );
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card error\n"
+		"Unexpected EOF while reading input file - appending EN card\n" );
+	stop( _("readmn(): Command data card error\n"
+		  "Unexpected EOF while reading input file\n"
+			"Uppending a default EN card"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
+  }
 
-	  case GA: /* "ga" card, generate segment data for wire arc */
-		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
-		nwire++;
-		if( !arc(itg, ns, xw1, yw1, zw1, xw2) ) return( FALSE );
-		continue;
+  /* get line length */
+  len = (int)strlen( line_buf );
 
-	  case SC: /* "sc" card */
-		if( isct == 0)
-		{
-		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
-		  stop( _("datagn(): Patch data card error"), ERR_OK );
-		  return( FALSE );
-		}
+  /* abort if card's mnemonic too short or missing */
+  if( len < 2 )
+  {
+	Strlcpy( mn, "XX", 3 );
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card error\n"
+		"card's mnemonic code too short or missing\n" );
+	stop( _("readmn(): Command data card error\n"
+		  "Mnemonic code too short or missing"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
+  }
 
-		ns++;
+  /* extract card's mnemonic code */
+  Strlcpy( mn, line_buf, 3 );
 
-		if( (itg != 0) || ((ns != 2) && (ns != 4)) )
-		{
-		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
-		  stop( _("datagn(): Patch data card error"), ERR_OK );
-		  return( FALSE );
-		}
+  /* Return if only mnemonic on card */
+  if( len == 2 )
+  {
+	free_ptr( (void **)&startptr );
+	return( TRUE );
+  }
 
-		xs1= x4;
-		ys1= y4;
-		zs1= z4;
-		xs2= x3;
-		ys2= y3;
-		zs2= z3;
-		x3= xw1;
-		y3= yw1;
-		z3= zw1;
+  /* Compatibility with NEC4, comments between data cards */
+  if( strncmp(mn, "CM", 2) == 0 )
+  {
+	free_ptr( (void **)&startptr );
+	return( TRUE );
+  }
+
+  /* check line for spurious characters */
+  for( idx = 2; idx < len; idx++ )
+  {
+	if( ((line_buf[idx] >= '0') &&
+		 (line_buf[idx] <= '9')) ||
+		 (line_buf[idx] == ' ')  ||
+		 (line_buf[idx] == '.')  ||
+		 (line_buf[idx] == ',')  ||
+		 (line_buf[idx] == '+')  ||
+		 (line_buf[idx] == '-')  ||
+		 (line_buf[idx] == 'E')  ||
+		 (line_buf[idx] == 'e')  ||
+		 (line_buf[idx] == '\t') ||
+		 (line_buf[idx] == '\0') )
+	  continue;
+	else
+	  break;
+  }
+  if( idx < len )
+  {
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card \"%s\" error\n"
+		"Spurious character '%c' at column %d\n",
+		mn, line_buf[idx], idx+1 );
+	stop( _("readmn(): Command data card error\n"
+		  "Spurious character in command card"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
+  }
 
-		if( ns == 4)
-		{
-		  x4= xw2;
-		  y4= yw2;
-		  z4= zw2;
-		}
+  /* read integers from line */
+  line_buf += 2;
+  for( i = 0; i < nint; i++ )
+  {
+	/* read an integer from line */
+	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nint; i++ ) */
 
-		xw1= xs1;
-		yw1= ys1;
-		zw1= zs1;
-		xw2= xs2;
-		yw2= ys2;
-		zw2= zs2;
+  /* Return if no floats are specified in the card */
+  if( *endptr == '\0' )
+  {
+	*i1= iarr[0];
+	*i2= iarr[1];
+	*i3= iarr[2];
+	*i4= iarr[3];
+	*f1= rarr[0];
+	*f2= rarr[1];
+	*f3= rarr[2];
+	*f4= rarr[3];
+	*f5= rarr[4];
+	*f6= rarr[5];
+	free_ptr( (void **)&startptr );
+	return( TRUE );
+  }
 
-		if( ns != 4)
-		{
-		  x4= xw1+ x3- xw2;
-		  y4= yw1+ y3- yw2;
-		  z4= zw1+ z3- zw2;
-		}
+  /* read doubles from line */
+  for( i = 0; i < nflt; i++ )
+  {
+	/* read a double from line */
+	rarr[i] = Strtod( line_buf, &endptr );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nflt; i++ ) */
 
-		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
-			yw2, zw2, x3, y3, z3, x4, y4, z4) )
-		  return( FALSE );
-		continue;
+  /* Return values on normal exit */
+  *i1= iarr[0];
+  *i2= iarr[1];
+  *i3= iarr[2];
+  *i4= iarr[3];
+  *f1= rarr[0];
+  *f2= rarr[1];
+  *f3= rarr[2];
+  *f4= rarr[3];
+  *f5= rarr[4];
+  *f6= rarr[5];
 
-	  case GH: /* "gh" card, generate helix */
-		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
-		nwire++;
-		helix( xw1, yw1, zw1, xw2, yw2, zw2, rad, ns, itg);
-		continue;
+  free_ptr( (void **)&startptr );
+  return( TRUE );
+} /* readmn() */
 
-	  case GF: /* "gf" card, not supported */
-		fprintf( stderr, "xnec2c: datagn(): \"GF\" card (NGF solution) "
-				"is not supported\n" );
-		stop( _("datagn(): \"GF\" card (NGF solution)\n"\
-			  "is not supported"), ERR_OK );
-		return( FALSE );
+/*-----------------------------------------------------------------------*/
 
-	  case CT: /* Ignore in-data comments (NEC4 compatibility) */
-		fprintf( stderr, "xnec2c: datagn(): ignoring CM card in geometry\n" );
-		stop( _("datagn(): Ignoring CM card in geometry"), ERR_OK );
-		continue;
+  gboolean
+readgm( char *gm, int *i1, int *i2, double *x1,
+	double *y1, double *z1, double *x2,
+	double *y2, double *z2, double *rad )
+{
+  char
+	*line_buf = NULL,
+	*startptr = NULL,
+	*endptr   = NULL;
+  int len, i, idx;
+  int nint = 2, nflt = 7;
+  int iarr[2] = { 0, 0 };
+  double rarr[7] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+  int eof; /* EOF error flag */
 
-	  default: /* error message */
-		fprintf( stderr, "xnec2c: datagn(): geometry data card error\n" );
-		fprintf( stderr,
-			"%2s %3d %5d %10.5f %10.5f %10.5f"
-			" %10.5f %10.5f %10.5f %10.5f\n",
-			gm, itg, ns, xw1, yw1, zw1, xw2, yw2, zw2, rad );
 
-		stop( _("datagn(): Geometry data card error"), ERR_OK );
-		return( FALSE );
+  /* Clear return values */
+  *i1 = *i2 = 0;
+  *x1 = *y1 = *z1 = *x2 = *y2 = *z2 = *rad = 0.0;
 
-	} /* switch( gm_num ) */
+  /* read a line from input file */
+  mem_alloc((void **)&line_buf, LINE_LEN, "in readgm()");
+  if( line_buf == NULL ) return( FALSE );
+  startptr = line_buf;
+  eof = Load_Line( line_buf, input_fp );
+  if( eof == EOF )
+  {
+	Strlcpy( gm, "GE", 3 );
+	fprintf( stderr,
+		"xnec2c: readgm(): geometry data card error\n"
+		"Unexpected EOF while reading input file - appending GE card\n" );
+	stop( _("readgm(): Geometry data card error\n"
+		  "Unexpected EOF while reading input file\n"
+		  "Uppending a default GE card"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
+  }
 
-  } /* do */
-  while( TRUE );
+  /* get line length */
+  len = (int)strlen( line_buf );
 
-} /* datagn() */
+  /* abort if card's mnemonic too short or missing */
+  if( len < 2 )
+  {
+	Strlcpy( gm, "XX", 3 );
+	fprintf( stderr,
+		"xnec2c: readgm(): geometry data card error\n"
+		"card's mnemonic code too short or missing\n" );
+	stop( _("readgm(): Geometry data card error\n"
+		  "Card's mnemonic code too short or missing"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
+  }
 
-/*-----------------------------------------------------------------------*/
+  /* extract card's mnemonic code */
+  Strlcpy( gm, line_buf, 3 );
 
-/* Tag_Seg_Error()
- *
- * Checks tag and segments number are valid (>1)
- */
-  gboolean
-Tag_Seg_Error( int tag, int segs )
-{
-  gboolean retv = FALSE;
+  /* Return if only mnemonic on card */
+  if( len == 2 )
+  {
+	free_ptr( (void **)&startptr );
+	return( TRUE );
+  }
 
-  if( tag <= 0 )
+  /* Compatibility with NEC4,
+   * comments between data cards */
+  if( strcmp(gm, "CM") == 0 )
   {
-	fprintf( stderr,
-		"xnec2c: Tag_Seg_Error(): geometry data card error -"
-		"tag number is less than 1\n" );
-	stop( _("Tag_Seg_Error(): Geometry data error\n"\
-		  "Tag number is less than 1"), ERR_OK );
-	retv = TRUE;
+	free_ptr( (void **)&startptr );
+	return( TRUE );
   }
 
-  if( segs <= 0 )
+  /* check line for spurious characters */
+  for( idx = 2; idx < len; idx++ )
+  {
+	if( ((line_buf[idx] >= '0') &&
+		 (line_buf[idx] <= '9')) ||
+		 (line_buf[idx] == ' ')  ||
+		 (line_buf[idx] == '.')  ||
+		 (line_buf[idx] == ',')  ||
+		 (line_buf[idx] == '+')  ||
+		 (line_buf[idx] == '-')  ||
+		 (line_buf[idx] == 'E')  ||
+		 (line_buf[idx] == 'e')  ||
+		 (line_buf[idx] == '\t') ||
+		 (line_buf[idx] == '\0') )
+	  continue;
+	else
+	  break;
+  }
+  if( idx < len )
   {
 	fprintf( stderr,
-		"xnec2c: Tag_Seg_Error(): geometry data card error - "
-		"number of segments is less than 1\n" );
-	stop( _("Tag_Seg_Error(): Geometry data error\n"\
-		  "Number of segments is less than 1"), ERR_OK );
-	retv = TRUE;
+		"xnec2c: readgm(): geometry data card \"%s\" error\n"
+		"Spurious character '%c' at column %d\n",
+		gm, line_buf[idx], idx+1 );
+	stop( _("readmn(): Geometry data card error\n"
+		  "Spurious character in command card"), ERR_OK );
+	free_ptr( (void **)&startptr );
+	return( FALSE );
   }
 
-  return( retv );
-}
+  /* read integers from line */
+  line_buf += 2;
+  for( i = 0; i < nint; i++ )
+  {
+	/* read an integer from line, reject spurious chars */
+	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nint; i++ ) */
+
+  /* Return if no floats are specified in the card */
+  if( *endptr == '\0' )
+  {
+	*i1 = iarr[0];
+	*i2 = iarr[1];
+	*x1 = rarr[0];
+	*y1 = rarr[1];
+	*z1 = rarr[2];
+	*x2 = rarr[3];
+	*y2 = rarr[4];
+	*z2 = rarr[5];
+	*rad= rarr[6];
+	free_ptr( (void **)&startptr );
+	return( TRUE );
+  }
+
+  /* read doubles from line */
+  for( i = 0; i < nflt; i++ )
+  {
+	/* read a double from line */
+	rarr[i] = Strtod( line_buf, &endptr );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nflt; i++ ) */
+
+  /* Return values on normal exit */
+  *i1  = iarr[0];
+  *i2  = iarr[1];
+  *x1  = rarr[0];
+  *y1  = rarr[1];
+  *z1  = rarr[2];
+  *x2  = rarr[3];
+  *y2  = rarr[4];
+  *z2  = rarr[5];
+  *rad = rarr[6];
+
+  free_ptr( (void **)&startptr );
+  return( TRUE );
+} /* readgm() */
 
 /*-----------------------------------------------------------------------*/
 
diff --git a/src/input.h b/src/input.h
index 0c9d250..461246e 100644
--- a/src/input.h
+++ b/src/input.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	INPUT_H		1
 
 #include "common.h"
-#include "support.h"
 
 /* Command Mnemonics */
 enum CMDN_MNM
diff --git a/src/interface.c b/src/interface.c
index c4faf49..e061d17 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -1,10163 +1,351 @@
 /*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
+ *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
-
-#include "callbacks.h"
-#include "interface.h"
-#include "support.h"
-
-#define GLADE_HOOKUP_OBJECT(component,widget,name) \
-  g_object_set_data_full (G_OBJECT (component), name, \
-    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
-
-#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
-  g_object_set_data (G_OBJECT (component), name, widget)
-
-GtkWidget*
-create_main_window (void)
-{
-  GtkWidget *main_window;
-  GtkWidget *vbox1;
-  GtkWidget *hbox8;
-  GtkWidget *menubar1;
-  GtkWidget *menuitem1;
-  GtkWidget *menuitem1_menu;
-  GtkWidget *main_new;
-  GtkWidget *main_open_input;
-  GtkWidget *nec2_edit;
-  GtkWidget *main_save;
-  GtkWidget *main_save_as;
-  GtkWidget *struct_save_as_gnuplot;
-  GtkWidget *image102;
-  GtkWidget *separator1;
-  GtkWidget *main_quit;
-  GtkWidget *main_view_menuitem;
-  GtkWidget *main_view_menuitem_menu;
-  GtkWidget *main_rdpattern;
-  GtkWidget *main_freqplots;
-  GtkWidget *main_pol_menu;
-  GtkWidget *main_pol_menu_menu;
-  GSList *rdpattern_total_group = NULL;
-  GtkWidget *rdpattern_total;
-  GtkWidget *rdpattern_horizontal;
-  GtkWidget *rdpattern_vertical;
-  GtkWidget *rdpattern_right_hand;
-  GtkWidget *rdpattern_left_hand;
-  GtkWidget *common_projection;
-  GtkWidget *common_freq;
-  GtkWidget *menuitem4;
-  GtkWidget *menuitem4_menu;
-  GtkWidget *about;
-  GtkWidget *image103;
-  GtkWidget *main_hbox1;
-  GtkWidget *vseparator2;
-  GtkWidget *main_currents_togglebutton;
-  GtkWidget *main_charges_togglebutton;
-  GtkWidget *vseparator7;
-  GtkWidget *label214;
-  GtkWidget *main_loop_start;
-  GtkWidget *alignment49;
-  GtkWidget *hbox47;
-  GtkWidget *image52;
-  GtkWidget *label213;
-  GtkWidget *main_loop_pause;
-  GtkWidget *image54;
-  GtkWidget *main_loop_reset;
-  GtkWidget *image53;
-  GtkWidget *label244;
-  GtkWidget *structure_fstep_entry;
-  GtkWidget *hseparator1;
-  GtkWidget *main_hbox2;
-  GtkWidget *main_colorcode_zerolabel;
-  GtkWidget *main_colorcode_drawingarea;
-  GtkWidget *main_colorcode_maxlabel;
-  GtkWidget *main_gain_entry;
-  GtkWidget *label10;
-  GtkObject *main_freq_spinbutton_adj;
-  GtkWidget *main_freq_spinbutton;
-  GtkWidget *main_freq_label;
-  GtkWidget *main_freq_checkbutton;
-  GtkWidget *main_new_freq_button;
-  GtkWidget *image46;
-  GtkWidget *hseparator11;
-  GtkWidget *frame1;
-  GtkWidget *alignment1;
-  GtkWidget *structure_drawingarea;
-  GtkWidget *main_hbox3;
-  GtkWidget *struct_label;
-  GtkWidget *main_x_axis;
-  GtkWidget *main_y_axis;
-  GtkWidget *main_z_axis;
-  GtkWidget *main_default_view;
-  GtkWidget *image32;
-  GtkWidget *vseparator1;
-  GtkWidget *image50;
-  GtkObject *main_rotate_spinbutton_adj;
-  GtkWidget *main_rotate_spinbutton;
-  GtkWidget *image51;
-  GtkObject *main_incline_spinbutton_adj;
-  GtkWidget *main_incline_spinbutton;
-  GtkWidget *label245;
-  GtkObject *structure_zoom_spinbutton_adj;
-  GtkWidget *structure_zoom_spinbutton;
-  GtkWidget *structure_plus_button;
-  GtkWidget *image94;
-  GtkWidget *structure_minus_button;
-  GtkWidget *image95;
-  GtkWidget *structure_one_button;
-  GtkWidget *image96;
-  GtkAccelGroup *accel_group;
-  GtkTooltips *tooltips;
-
-  tooltips = gtk_tooltips_new ();
-
-  accel_group = gtk_accel_group_new ();
-
-  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (main_window), 4);
-  gtk_window_set_title (GTK_WINDOW (main_window), _("Xnec2c: Structure Display"));
-  gtk_window_set_gravity (GTK_WINDOW (main_window), GDK_GRAVITY_EAST);
-
-  vbox1 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox1);
-  gtk_container_add (GTK_CONTAINER (main_window), vbox1);
-
-  hbox8 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox8);
-  gtk_box_pack_start (GTK_BOX (vbox1), hbox8, FALSE, FALSE, 0);
-
-  menubar1 = gtk_menu_bar_new ();
-  gtk_widget_show (menubar1);
-  gtk_box_pack_start (GTK_BOX (hbox8), menubar1, FALSE, FALSE, 0);
-
-  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
-  gtk_widget_show (menuitem1);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);
-
-  menuitem1_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
-
-  main_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
-  gtk_widget_show (main_new);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_new);
-
-  main_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
-  gtk_widget_show (main_open_input);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_open_input);
-
-  nec2_edit = gtk_image_menu_item_new_from_stock ("gtk-edit", accel_group);
-  gtk_widget_show (nec2_edit);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), nec2_edit);
-  gtk_tooltips_set_tip (tooltips, nec2_edit, _("Edit NEC2 Input File"), NULL);
-
-  main_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
-  gtk_widget_show (main_save);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save);
-
-  main_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
-  gtk_widget_show (main_save_as);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save_as);
-
-  struct_save_as_gnuplot = gtk_image_menu_item_new_with_mnemonic (_("Save As gnuplot"));
-  gtk_widget_show (struct_save_as_gnuplot);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), struct_save_as_gnuplot);
-
-  image102 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image102);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (struct_save_as_gnuplot), image102);
-
-  separator1 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separator1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separator1);
-  gtk_widget_set_sensitive (separator1, FALSE);
-
-  main_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
-  gtk_widget_show (main_quit);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_quit);
-
-  main_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
-  gtk_widget_show (main_view_menuitem);
-  gtk_container_add (GTK_CONTAINER (menubar1), main_view_menuitem);
-
-  main_view_menuitem_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_view_menuitem), main_view_menuitem_menu);
-
-  main_rdpattern = gtk_check_menu_item_new_with_mnemonic (_("Radiation Pattern"));
-  gtk_widget_show (main_rdpattern);
-  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_rdpattern);
-  gtk_tooltips_set_tip (tooltips, main_rdpattern, _("Open radiation pattern window"), NULL);
-
-  main_freqplots = gtk_check_menu_item_new_with_mnemonic (_("Frequency Plots"));
-  gtk_widget_show (main_freqplots);
-  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_freqplots);
-  gtk_tooltips_set_tip (tooltips, main_freqplots, _("Open frequency data plots window"), NULL);
-
-  main_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
-  gtk_widget_show (main_pol_menu);
-  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_pol_menu);
-  gtk_tooltips_set_tip (tooltips, main_pol_menu, _("Display gain data relevant to polarization"), NULL);
-
-  main_pol_menu_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_pol_menu), main_pol_menu_menu);
-
-  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
-  gtk_widget_show (rdpattern_total);
-  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_total);
-  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
-
-  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
-  gtk_widget_show (rdpattern_horizontal);
-  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_horizontal);
-  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
-
-  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
-  gtk_widget_show (rdpattern_vertical);
-  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_vertical);
-  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);
-
-  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
-  gtk_widget_show (rdpattern_right_hand);
-  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_right_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);
-
-  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
-  gtk_widget_show (rdpattern_left_hand);
-  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_left_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);
-
-  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
-  gtk_widget_show (common_projection);
-  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_projection);
-  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parameters in different windows"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);
-
-  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
-  gtk_widget_show (common_freq);
-  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_freq);
-  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);
-
-  menuitem4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
-  gtk_widget_show (menuitem4);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);
-
-  menuitem4_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
-
-  about = gtk_image_menu_item_new_with_mnemonic (_("About"));
-  gtk_widget_show (about);
-  gtk_container_add (GTK_CONTAINER (menuitem4_menu), about);
-
-  image103 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image103);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about), image103);
-
-  main_hbox1 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (main_hbox1);
-  gtk_box_pack_start (GTK_BOX (hbox8), main_hbox1, FALSE, FALSE, 0);
-
-  vseparator2 = gtk_vseparator_new ();
-  gtk_widget_show (vseparator2);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator2, FALSE, FALSE, 4);
-
-  main_currents_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Currents"));
-  gtk_widget_show (main_currents_togglebutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), main_currents_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_currents_togglebutton, _("Calculate and Display\nStructure Currents"), NULL);
-
-  main_charges_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Charges"));
-  gtk_widget_show (main_charges_togglebutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), main_charges_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_charges_togglebutton, _("Calculate and Display\nCharge Densities"), NULL);
-
-  vseparator7 = gtk_vseparator_new ();
-  gtk_widget_show (vseparator7);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator7, TRUE, TRUE, 4);
-
-  label214 = gtk_label_new (_("Frequency Loop "));
-  gtk_widget_show (label214);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), label214, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label214), TRUE);
-
-  main_loop_start = gtk_button_new ();
-  gtk_widget_show (main_loop_start);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_start, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_loop_start, _("Start Frequency Loop"), NULL);
-
-  alignment49 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment49);
-  gtk_container_add (GTK_CONTAINER (main_loop_start), alignment49);
-
-  hbox47 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox47);
-  gtk_container_add (GTK_CONTAINER (alignment49), hbox47);
-
-  image52 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image52);
-  gtk_box_pack_start (GTK_BOX (hbox47), image52, FALSE, FALSE, 0);
-
-  label213 = gtk_label_new_with_mnemonic ("");
-  gtk_widget_show (label213);
-  gtk_box_pack_start (GTK_BOX (hbox47), label213, FALSE, FALSE, 0);
-
-  main_loop_pause = gtk_button_new ();
-  gtk_widget_show (main_loop_pause);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_pause, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_loop_pause, _("Pause Frequency Loop"), NULL);
-  gtk_widget_add_accelerator (main_loop_pause, "clicked", accel_group,
-                              GDK_h, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  image54 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image54);
-  gtk_container_add (GTK_CONTAINER (main_loop_pause), image54);
-
-  main_loop_reset = gtk_button_new ();
-  gtk_widget_show (main_loop_reset);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_reset, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_loop_reset, _("Reset Frequency Loop"), NULL);
-  gtk_widget_add_accelerator (main_loop_reset, "clicked", accel_group,
-                              GDK_r, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  image53 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image53);
-  gtk_container_add (GTK_CONTAINER (main_loop_reset), image53);
-
-  label244 = gtk_label_new (_(" Step "));
-  gtk_widget_show (label244);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), label244, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label244), TRUE);
-
-  structure_fstep_entry = gtk_entry_new ();
-  gtk_widget_show (structure_fstep_entry);
-  gtk_box_pack_start (GTK_BOX (main_hbox1), structure_fstep_entry, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, structure_fstep_entry, _("Current Frequency Step"), NULL);
-  gtk_entry_set_max_length (GTK_ENTRY (structure_fstep_entry), 3);
-  gtk_editable_set_editable (GTK_EDITABLE (structure_fstep_entry), FALSE);
-  gtk_entry_set_text (GTK_ENTRY (structure_fstep_entry), _("1"));
-  gtk_entry_set_invisible_char (GTK_ENTRY (structure_fstep_entry), 9679);
-  gtk_entry_set_width_chars (GTK_ENTRY (structure_fstep_entry), 3);
-
-  hseparator1 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator1);
-  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 4);
-
-  main_hbox2 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (main_hbox2);
-  gtk_box_pack_start (GTK_BOX (vbox1), main_hbox2, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (main_hbox2, -1, 30);
-
-  main_colorcode_zerolabel = gtk_label_new (_("0"));
-  gtk_widget_show (main_colorcode_zerolabel);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_zerolabel, FALSE, FALSE, 2);
-  gtk_label_set_width_chars (GTK_LABEL (main_colorcode_zerolabel), 1);
-
-  main_colorcode_drawingarea = gtk_drawing_area_new ();
-  gtk_widget_show (main_colorcode_drawingarea);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_drawingarea, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (main_colorcode_drawingarea, 160, -1);
-  gtk_tooltips_set_tip (tooltips, main_colorcode_drawingarea, _("Color Code for Structure's\nCurrent or Charge Values"), NULL);
-
-  main_colorcode_maxlabel = gtk_label_new (_("0.00"));
-  gtk_widget_show (main_colorcode_maxlabel);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_maxlabel, FALSE, FALSE, 0);
-  gtk_misc_set_alignment (GTK_MISC (main_colorcode_maxlabel), 0, 0.5);
-  gtk_label_set_width_chars (GTK_LABEL (main_colorcode_maxlabel), 11);
-
-  main_gain_entry = gtk_entry_new ();
-  gtk_widget_show (main_gain_entry);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_gain_entry, FALSE, FALSE, 2);
-  gtk_tooltips_set_tip (tooltips, main_gain_entry, _("Gain in Direction of Viewer\n(Perpenticular to Screen)"), NULL);
-  gtk_entry_set_text (GTK_ENTRY (main_gain_entry), _(" - - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (main_gain_entry), 6);
-
-  label10 = gtk_label_new (_("dB "));
-  gtk_widget_show (label10);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), label10, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label10), TRUE);
-
-  main_freq_spinbutton_adj = gtk_adjustment_new (0.00999999977648, 0.00999999977648, 9999, 0.00999999977648, 10, 0);
-  main_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_freq_spinbutton_adj), 0.0010000000475, 3);
-  gtk_widget_show (main_freq_spinbutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_spinbutton, FALSE, FALSE, 2);
-  gtk_tooltips_set_tip (tooltips, main_freq_spinbutton, _("Enter Frequency in MHz"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_freq_spinbutton), TRUE);
-
-  main_freq_label = gtk_label_new (_("MHz "));
-  gtk_widget_show (main_freq_label);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_label, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (main_freq_label), TRUE);
-
-  main_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
-  gtk_widget_show (main_freq_checkbutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_checkbutton, FALSE, FALSE, 2);
-  gtk_tooltips_set_tip (tooltips, main_freq_checkbutton, _("Enable Data Calculation\non Frequency Change"), NULL);
-  gtk_button_set_focus_on_click (GTK_BUTTON (main_freq_checkbutton), FALSE);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_freq_checkbutton), TRUE);
-
-  main_new_freq_button = gtk_button_new ();
-  gtk_widget_show (main_new_freq_button);
-  gtk_box_pack_start (GTK_BOX (main_hbox2), main_new_freq_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_new_freq_button, _("Calculate Data\nfor New Frequency"), NULL);
-  gtk_widget_add_accelerator (main_new_freq_button, "clicked", accel_group,
-                              GDK_a, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  image46 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image46);
-  gtk_container_add (GTK_CONTAINER (main_new_freq_button), image46);
-
-  hseparator11 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator11);
-  gtk_box_pack_start (GTK_BOX (vbox1), hseparator11, FALSE, FALSE, 4);
-
-  frame1 = gtk_frame_new (NULL);
-  gtk_widget_show (frame1);
-  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
-
-  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment1);
-  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
-  gtk_container_set_border_width (GTK_CONTAINER (alignment1), 2);
-
-  structure_drawingarea = gtk_drawing_area_new ();
-  gtk_widget_show (structure_drawingarea);
-  gtk_container_add (GTK_CONTAINER (alignment1), structure_drawingarea);
-  gtk_widget_set_size_request (structure_drawingarea, 681, 769);
-  GTK_WIDGET_SET_FLAGS (structure_drawingarea, GTK_CAN_FOCUS);
-
-  main_hbox3 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (main_hbox3);
-  gtk_frame_set_label_widget (GTK_FRAME (frame1), main_hbox3);
-
-  struct_label = gtk_label_new (_("View Geometry"));
-  gtk_widget_show (struct_label);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), struct_label, FALSE, FALSE, 0);
-  gtk_label_set_width_chars (GTK_LABEL (struct_label), 14);
-  gtk_label_set_single_line_mode (GTK_LABEL (struct_label), TRUE);
-
-  main_x_axis = gtk_button_new_with_mnemonic (_("X"));
-  gtk_widget_show (main_x_axis);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_x_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_x_axis, _("View Structure along X-axis"), NULL);
-  gtk_widget_add_accelerator (main_x_axis, "clicked", accel_group,
-                              GDK_x, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  main_y_axis = gtk_button_new_with_mnemonic (_("Y"));
-  gtk_widget_show (main_y_axis);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_y_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_y_axis, _("View Structure along Y-axis"), NULL);
-  gtk_widget_add_accelerator (main_y_axis, "clicked", accel_group,
-                              GDK_y, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  main_z_axis = gtk_button_new_with_mnemonic (_("Z"));
-  gtk_widget_show (main_z_axis);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_z_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_z_axis, _("View Strucure along Z-axis"), NULL);
-  gtk_widget_add_accelerator (main_z_axis, "clicked", accel_group,
-                              GDK_z, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  main_default_view = gtk_button_new ();
-  gtk_widget_show (main_default_view);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_default_view, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_default_view, _("View Strucure\nin Default Projection"), NULL);
-  gtk_widget_add_accelerator (main_default_view, "clicked", accel_group,
-                              GDK_r, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  image32 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image32);
-  gtk_container_add (GTK_CONTAINER (main_default_view), image32);
-
-  vseparator1 = gtk_vseparator_new ();
-  gtk_widget_show (vseparator1);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), vseparator1, TRUE, TRUE, 0);
-
-  image50 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image50);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), image50, TRUE, TRUE, 0);
-
-  main_rotate_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 1, 10, 0);
-  main_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_rotate_spinbutton_adj), 1, 0);
-  gtk_widget_show (main_rotate_spinbutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_rotate_spinbutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_rotate_spinbutton, _("Rotate Structure\n around Z-axis"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_rotate_spinbutton), TRUE);
-  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (main_rotate_spinbutton), TRUE);
-
-  image51 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image51);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), image51, TRUE, TRUE, 0);
-
-  main_incline_spinbutton_adj = gtk_adjustment_new (45, -180, 180, 1, 10, 0);
-  main_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_incline_spinbutton_adj), 1, 0);
-  gtk_widget_show (main_incline_spinbutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), main_incline_spinbutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, main_incline_spinbutton, _("Incline Structure\nto Plane of Screen"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_incline_spinbutton), TRUE);
-  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (main_incline_spinbutton), TRUE);
-
-  label245 = gtk_label_new (_(" Zoom % "));
-  gtk_widget_show (label245);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), label245, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label245), TRUE);
-
-  structure_zoom_spinbutton_adj = gtk_adjustment_new (100, 10, 999, 1, 10, 0);
-  structure_zoom_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (structure_zoom_spinbutton_adj), 1, 0);
-  gtk_widget_show (structure_zoom_spinbutton);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_zoom_spinbutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, structure_zoom_spinbutton, _("Zoom Structure Display"), NULL);
-
-  structure_plus_button = gtk_button_new ();
-  gtk_widget_show (structure_plus_button);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_plus_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, structure_plus_button, _("Zoom In"), NULL);
-
-  image94 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image94);
-  gtk_container_add (GTK_CONTAINER (structure_plus_button), image94);
-
-  structure_minus_button = gtk_button_new ();
-  gtk_widget_show (structure_minus_button);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_minus_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, structure_minus_button, _("Zoom Out"), NULL);
-
-  image95 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image95);
-  gtk_container_add (GTK_CONTAINER (structure_minus_button), image95);
-
-  structure_one_button = gtk_button_new ();
-  gtk_widget_show (structure_one_button);
-  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_one_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, structure_one_button, _("Zoom to Default 1:1"), NULL);
-
-  image96 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image96);
-  gtk_container_add (GTK_CONTAINER (structure_one_button), image96);
-
-  g_signal_connect ((gpointer) main_window, "destroy",
-                    G_CALLBACK (on_main_window_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) main_window, "delete_event",
-                    G_CALLBACK (on_main_window_delete_event),
-                    NULL);
-  g_signal_connect ((gpointer) main_new, "activate",
-                    G_CALLBACK (on_new_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_open_input, "activate",
-                    G_CALLBACK (on_open_input_activate),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_edit, "activate",
-                    G_CALLBACK (on_nec2_edit_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_save, "activate",
-                    G_CALLBACK (on_main_save_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_save_as, "activate",
-                    G_CALLBACK (on_main_save_as_activate),
-                    NULL);
-  g_signal_connect ((gpointer) struct_save_as_gnuplot, "activate",
-                    G_CALLBACK (on_struct_save_as_gnuplot_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_quit, "activate",
-                    G_CALLBACK (on_quit_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_view_menuitem, "activate",
-                    G_CALLBACK (main_view_menuitem_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_rdpattern, "activate",
-                    G_CALLBACK (on_main_rdpattern_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_freqplots, "activate",
-                    G_CALLBACK (on_main_freqplots_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_pol_menu, "activate",
-                    G_CALLBACK (main_pol_menu_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_total, "activate",
-                    G_CALLBACK (on_rdpattern_total_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
-                    G_CALLBACK (on_rdpattern_horizontal_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
-                    G_CALLBACK (on_rdpattern_vertical_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
-                    G_CALLBACK (on_rdpattern_right_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
-                    G_CALLBACK (on_rdpattern_left_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) common_projection, "activate",
-                    G_CALLBACK (on_common_projection_activate),
-                    NULL);
-  g_signal_connect ((gpointer) common_freq, "activate",
-                    G_CALLBACK (on_common_freq_activate),
-                    NULL);
-  g_signal_connect ((gpointer) about, "activate",
-                    G_CALLBACK (on_about_activate),
-                    NULL);
-  g_signal_connect ((gpointer) main_currents_togglebutton, "toggled",
-                    G_CALLBACK (on_main_currents_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) main_charges_togglebutton, "toggled",
-                    G_CALLBACK (on_main_charges_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) main_loop_start, "clicked",
-                    G_CALLBACK (on_loop_start_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_loop_pause, "clicked",
-                    G_CALLBACK (on_loop_pause_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_loop_reset, "clicked",
-                    G_CALLBACK (on_loop_reset_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_colorcode_drawingarea, "expose_event",
-                    G_CALLBACK (on_main_colorcode_drawingarea_expose_event),
-                    NULL);
-  g_signal_connect ((gpointer) main_freq_spinbutton, "value_changed",
-                    G_CALLBACK (on_main_freq_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) main_freq_checkbutton, "toggled",
-                    G_CALLBACK (on_main_freq_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) main_new_freq_button, "clicked",
-                    G_CALLBACK (on_main_new_freq_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) structure_drawingarea, "configure_event",
-                    G_CALLBACK (on_structure_drawingarea_configure_event),
-                    NULL);
-  g_signal_connect ((gpointer) structure_drawingarea, "expose_event",
-                    G_CALLBACK (on_structure_drawingarea_expose_event),
-                    NULL);
-  g_signal_connect ((gpointer) structure_drawingarea, "button_press_event",
-                    G_CALLBACK (on_structure_drawingarea_button_press_event),
-                    NULL);
-  g_signal_connect ((gpointer) structure_drawingarea, "scroll_event",
-                    G_CALLBACK (on_structure_drawingarea_scroll_event),
-                    NULL);
-  g_signal_connect ((gpointer) main_x_axis, "clicked",
-                    G_CALLBACK (on_main_x_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_y_axis, "clicked",
-                    G_CALLBACK (on_main_y_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_z_axis, "clicked",
-                    G_CALLBACK (on_main_z_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_default_view, "clicked",
-                    G_CALLBACK (on_main_default_view_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) main_rotate_spinbutton, "value_changed",
-                    G_CALLBACK (on_main_rotate_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) main_incline_spinbutton, "value_changed",
-                    G_CALLBACK (on_main_incline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) structure_zoom_spinbutton, "value_changed",
-                    G_CALLBACK (on_structure_zoom_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) structure_plus_button, "clicked",
-                    G_CALLBACK (on_structure_plus_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) structure_minus_button, "clicked",
-                    G_CALLBACK (on_structure_minus_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) structure_one_button, "clicked",
-                    G_CALLBACK (on_structure_one_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window");
-  GLADE_HOOKUP_OBJECT (main_window, vbox1, "vbox1");
-  GLADE_HOOKUP_OBJECT (main_window, hbox8, "hbox8");
-  GLADE_HOOKUP_OBJECT (main_window, menubar1, "menubar1");
-  GLADE_HOOKUP_OBJECT (main_window, menuitem1, "menuitem1");
-  GLADE_HOOKUP_OBJECT (main_window, menuitem1_menu, "menuitem1_menu");
-  GLADE_HOOKUP_OBJECT (main_window, main_new, "main_new");
-  GLADE_HOOKUP_OBJECT (main_window, main_open_input, "main_open_input");
-  GLADE_HOOKUP_OBJECT (main_window, nec2_edit, "nec2_edit");
-  GLADE_HOOKUP_OBJECT (main_window, main_save, "main_save");
-  GLADE_HOOKUP_OBJECT (main_window, main_save_as, "main_save_as");
-  GLADE_HOOKUP_OBJECT (main_window, struct_save_as_gnuplot, "struct_save_as_gnuplot");
-  GLADE_HOOKUP_OBJECT (main_window, image102, "image102");
-  GLADE_HOOKUP_OBJECT (main_window, separator1, "separator1");
-  GLADE_HOOKUP_OBJECT (main_window, main_quit, "main_quit");
-  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem, "main_view_menuitem");
-  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem_menu, "main_view_menuitem_menu");
-  GLADE_HOOKUP_OBJECT (main_window, main_rdpattern, "main_rdpattern");
-  GLADE_HOOKUP_OBJECT (main_window, main_freqplots, "main_freqplots");
-  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu, "main_pol_menu");
-  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu_menu, "main_pol_menu_menu");
-  GLADE_HOOKUP_OBJECT (main_window, rdpattern_total, "rdpattern_total");
-  GLADE_HOOKUP_OBJECT (main_window, rdpattern_horizontal, "rdpattern_horizontal");
-  GLADE_HOOKUP_OBJECT (main_window, rdpattern_vertical, "rdpattern_vertical");
-  GLADE_HOOKUP_OBJECT (main_window, rdpattern_right_hand, "rdpattern_right_hand");
-  GLADE_HOOKUP_OBJECT (main_window, rdpattern_left_hand, "rdpattern_left_hand");
-  GLADE_HOOKUP_OBJECT (main_window, common_projection, "common_projection");
-  GLADE_HOOKUP_OBJECT (main_window, common_freq, "common_freq");
-  GLADE_HOOKUP_OBJECT (main_window, menuitem4, "menuitem4");
-  GLADE_HOOKUP_OBJECT (main_window, menuitem4_menu, "menuitem4_menu");
-  GLADE_HOOKUP_OBJECT (main_window, about, "about");
-  GLADE_HOOKUP_OBJECT (main_window, image103, "image103");
-  GLADE_HOOKUP_OBJECT (main_window, main_hbox1, "main_hbox1");
-  GLADE_HOOKUP_OBJECT (main_window, vseparator2, "vseparator2");
-  GLADE_HOOKUP_OBJECT (main_window, main_currents_togglebutton, "main_currents_togglebutton");
-  GLADE_HOOKUP_OBJECT (main_window, main_charges_togglebutton, "main_charges_togglebutton");
-  GLADE_HOOKUP_OBJECT (main_window, vseparator7, "vseparator7");
-  GLADE_HOOKUP_OBJECT (main_window, label214, "label214");
-  GLADE_HOOKUP_OBJECT (main_window, main_loop_start, "main_loop_start");
-  GLADE_HOOKUP_OBJECT (main_window, alignment49, "alignment49");
-  GLADE_HOOKUP_OBJECT (main_window, hbox47, "hbox47");
-  GLADE_HOOKUP_OBJECT (main_window, image52, "image52");
-  GLADE_HOOKUP_OBJECT (main_window, label213, "label213");
-  GLADE_HOOKUP_OBJECT (main_window, main_loop_pause, "main_loop_pause");
-  GLADE_HOOKUP_OBJECT (main_window, image54, "image54");
-  GLADE_HOOKUP_OBJECT (main_window, main_loop_reset, "main_loop_reset");
-  GLADE_HOOKUP_OBJECT (main_window, image53, "image53");
-  GLADE_HOOKUP_OBJECT (main_window, label244, "label244");
-  GLADE_HOOKUP_OBJECT (main_window, structure_fstep_entry, "structure_fstep_entry");
-  GLADE_HOOKUP_OBJECT (main_window, hseparator1, "hseparator1");
-  GLADE_HOOKUP_OBJECT (main_window, main_hbox2, "main_hbox2");
-  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_zerolabel, "main_colorcode_zerolabel");
-  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_drawingarea, "main_colorcode_drawingarea");
-  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_maxlabel, "main_colorcode_maxlabel");
-  GLADE_HOOKUP_OBJECT (main_window, main_gain_entry, "main_gain_entry");
-  GLADE_HOOKUP_OBJECT (main_window, label10, "label10");
-  GLADE_HOOKUP_OBJECT (main_window, main_freq_spinbutton, "main_freq_spinbutton");
-  GLADE_HOOKUP_OBJECT (main_window, main_freq_label, "main_freq_label");
-  GLADE_HOOKUP_OBJECT (main_window, main_freq_checkbutton, "main_freq_checkbutton");
-  GLADE_HOOKUP_OBJECT (main_window, main_new_freq_button, "main_new_freq_button");
-  GLADE_HOOKUP_OBJECT (main_window, image46, "image46");
-  GLADE_HOOKUP_OBJECT (main_window, hseparator11, "hseparator11");
-  GLADE_HOOKUP_OBJECT (main_window, frame1, "frame1");
-  GLADE_HOOKUP_OBJECT (main_window, alignment1, "alignment1");
-  GLADE_HOOKUP_OBJECT (main_window, structure_drawingarea, "structure_drawingarea");
-  GLADE_HOOKUP_OBJECT (main_window, main_hbox3, "main_hbox3");
-  GLADE_HOOKUP_OBJECT (main_window, struct_label, "struct_label");
-  GLADE_HOOKUP_OBJECT (main_window, main_x_axis, "main_x_axis");
-  GLADE_HOOKUP_OBJECT (main_window, main_y_axis, "main_y_axis");
-  GLADE_HOOKUP_OBJECT (main_window, main_z_axis, "main_z_axis");
-  GLADE_HOOKUP_OBJECT (main_window, main_default_view, "main_default_view");
-  GLADE_HOOKUP_OBJECT (main_window, image32, "image32");
-  GLADE_HOOKUP_OBJECT (main_window, vseparator1, "vseparator1");
-  GLADE_HOOKUP_OBJECT (main_window, image50, "image50");
-  GLADE_HOOKUP_OBJECT (main_window, main_rotate_spinbutton, "main_rotate_spinbutton");
-  GLADE_HOOKUP_OBJECT (main_window, image51, "image51");
-  GLADE_HOOKUP_OBJECT (main_window, main_incline_spinbutton, "main_incline_spinbutton");
-  GLADE_HOOKUP_OBJECT (main_window, label245, "label245");
-  GLADE_HOOKUP_OBJECT (main_window, structure_zoom_spinbutton, "structure_zoom_spinbutton");
-  GLADE_HOOKUP_OBJECT (main_window, structure_plus_button, "structure_plus_button");
-  GLADE_HOOKUP_OBJECT (main_window, image94, "image94");
-  GLADE_HOOKUP_OBJECT (main_window, structure_minus_button, "structure_minus_button");
-  GLADE_HOOKUP_OBJECT (main_window, image95, "image95");
-  GLADE_HOOKUP_OBJECT (main_window, structure_one_button, "structure_one_button");
-  GLADE_HOOKUP_OBJECT (main_window, image96, "image96");
-  GLADE_HOOKUP_OBJECT_NO_REF (main_window, tooltips, "tooltips");
-
-  gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group);
-
-  return main_window;
-}
-
-GtkWidget*
-create_filechooserdialog (void)
-{
-  GtkWidget *filechooserdialog;
-  GtkWidget *dialog_vbox1;
-  GtkWidget *dialog_action_area1;
-  GtkWidget *filechoser_cancel;
-  GtkWidget *filechooser_open;
-
-  filechooserdialog = gtk_file_chooser_dialog_new (_("xnec2c"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
-  gtk_container_set_border_width (GTK_CONTAINER (filechooserdialog), 5);
-  g_object_set (filechooserdialog,
-                "show-hidden", TRUE,
-                NULL);
-  gtk_window_set_position (GTK_WINDOW (filechooserdialog), GTK_WIN_POS_MOUSE);
-  gtk_window_set_role (GTK_WINDOW (filechooserdialog), "GtkFileChooserDialog");
-  gtk_window_set_type_hint (GTK_WINDOW (filechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG);
-
-  dialog_vbox1 = GTK_DIALOG (filechooserdialog)->vbox;
-  gtk_widget_show (dialog_vbox1);
-
-  dialog_action_area1 = GTK_DIALOG (filechooserdialog)->action_area;
-  gtk_widget_show (dialog_action_area1);
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
-
-  filechoser_cancel = gtk_button_new_from_stock ("gtk-cancel");
-  gtk_widget_show (filechoser_cancel);
-  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechoser_cancel, GTK_RESPONSE_CANCEL);
-  gtk_container_set_border_width (GTK_CONTAINER (filechoser_cancel), 2);
-  GTK_WIDGET_SET_FLAGS (filechoser_cancel, GTK_CAN_DEFAULT);
-
-  filechooser_open = gtk_button_new_from_stock ("gtk-open");
-  gtk_widget_show (filechooser_open);
-  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechooser_open, GTK_RESPONSE_OK);
-  gtk_container_set_border_width (GTK_CONTAINER (filechooser_open), 2);
-  GTK_WIDGET_SET_FLAGS (filechooser_open, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) filechooserdialog, "response",
-                    G_CALLBACK (on_filechooserdialog_response),
-                    NULL);
-  g_signal_connect ((gpointer) filechoser_cancel, "clicked",
-                    G_CALLBACK (on_filechoser_cancel_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, filechooserdialog, "filechooserdialog");
-  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_vbox1, "dialog_vbox1");
-  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_action_area1, "dialog_action_area1");
-  GLADE_HOOKUP_OBJECT (filechooserdialog, filechoser_cancel, "filechoser_cancel");
-  GLADE_HOOKUP_OBJECT (filechooserdialog, filechooser_open, "filechooser_open");
-
-  gtk_widget_grab_default (filechooser_open);
-  return filechooserdialog;
-}
-
-GtkWidget*
-create_fileselection (void)
-{
-  GtkWidget *fileselection;
-  GtkWidget *ok_button1;
-  GtkWidget *fileselection_cancel;
-
-  fileselection = gtk_file_selection_new (_("Select File"));
-  gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
-  gtk_window_set_position (GTK_WINDOW (fileselection), GTK_WIN_POS_MOUSE);
-  gtk_window_set_type_hint (GTK_WINDOW (fileselection), GDK_WINDOW_TYPE_HINT_DIALOG);
-
-  ok_button1 = GTK_FILE_SELECTION (fileselection)->ok_button;
-  gtk_widget_show (ok_button1);
-  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);
-
-  fileselection_cancel = GTK_FILE_SELECTION (fileselection)->cancel_button;
-  gtk_widget_show (fileselection_cancel);
-  GTK_WIDGET_SET_FLAGS (fileselection_cancel, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) fileselection, "response",
-                    G_CALLBACK (on_fileselection_response),
-                    NULL);
-  g_signal_connect ((gpointer) fileselection_cancel, "clicked",
-                    G_CALLBACK (on_fileselection_cancel_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection, "fileselection");
-  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, ok_button1, "ok_button1");
-  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection_cancel, "fileselection_cancel");
-
-  return fileselection;
-}
-
-GtkWidget*
-create_freqplots_window (void)
-{
-  GtkWidget *freqplots_window;
-  GtkWidget *vbox2;
-  GtkWidget *freqplots_hbox1;
-  GtkWidget *menubar2;
-  GtkWidget *menuitem5;
-  GtkWidget *menuitem5_menu;
-  GtkWidget *freqplots_new;
-  GtkWidget *freqplots_open_input;
-  GtkWidget *freqplots_save;
-  GtkWidget *freqplots_save_as;
-  GtkWidget *freqplots_save_as_gnuplot;
-  GtkWidget *separatormenuitem2;
-  GtkWidget *freqplots_quit;
-  GtkWidget *view_menuitem;
-  GtkWidget *view_menuitem_menu;
-  GtkWidget *freqplots_pol_menu;
-  GtkWidget *freqplots_pol_menu_menu;
-  GSList *rdpattern_total_group = NULL;
-  GtkWidget *rdpattern_total;
-  GtkWidget *rdpattern_horizontal;
-  GtkWidget *rdpattern_vertical;
-  GtkWidget *rdpattern_right_hand;
-  GtkWidget *rdpattern_left_hand;
-  GtkWidget *net_gain;
-  GtkWidget *hbox10;
-  GtkWidget *freqplots_gmax_togglebutton;
-  GtkWidget *freqplots_gdir_togglebutton;
-  GtkWidget *freqplots_gviewer_togglebutton;
-  GtkWidget *freqplots_vswr_togglebutton;
-  GtkWidget *freqplots_zrlzim_togglebutton;
-  GtkWidget *freqplots_zmgzph_togglebutton;
-  GtkWidget *label215;
-  GtkWidget *plot_loop_start;
-  GtkWidget *image61;
-  GtkWidget *plot_loop_pause;
-  GtkWidget *image64;
-  GtkWidget *plot_loop_reset;
-  GtkWidget *image63;
-  GtkWidget *hseparator4;
-  GtkWidget *hbox15;
-  GtkWidget *label16;
-  GtkWidget *freqplots_fmhz_entry;
-  GtkWidget *label12;
-  GtkWidget *freqplots_maxgain_entry;
-  GtkWidget *label13;
-  GtkWidget *freqplots_vswr_entry;
-  GtkWidget *label14;
-  GtkWidget *freqplots_zreal_entry;
-  GtkWidget *label15;
-  GtkWidget *freqplots_zimag_entry;
-  GtkWidget *label212;
-  GtkObject *freqplots_zo_spinbutton_adj;
-  GtkWidget *freqplots_zo_spinbutton;
-  GtkWidget *frame2;
-  GtkWidget *alignment2;
-  GtkWidget *freqplots_drawingarea;
-  GtkWidget *freqplots_label;
-  GtkAccelGroup *accel_group;
-  GtkTooltips *tooltips;
-
-  tooltips = gtk_tooltips_new ();
-
-  accel_group = gtk_accel_group_new ();
-
-  freqplots_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (freqplots_window), 4);
-  gtk_window_set_title (GTK_WINDOW (freqplots_window), _("Xnec2c: Frequency Data Plots"));
-  gtk_window_set_gravity (GTK_WINDOW (freqplots_window), GDK_GRAVITY_EAST);
-
-  vbox2 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox2);
-  gtk_container_add (GTK_CONTAINER (freqplots_window), vbox2);
-
-  freqplots_hbox1 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (freqplots_hbox1);
-  gtk_box_pack_start (GTK_BOX (vbox2), freqplots_hbox1, FALSE, FALSE, 0);
-
-  menubar2 = gtk_menu_bar_new ();
-  gtk_widget_show (menubar2);
-  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), menubar2, FALSE, FALSE, 0);
-
-  menuitem5 = gtk_menu_item_new_with_mnemonic (_("_File"));
-  gtk_widget_show (menuitem5);
-  gtk_container_add (GTK_CONTAINER (menubar2), menuitem5);
-
-  menuitem5_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem5), menuitem5_menu);
-
-  freqplots_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
-  gtk_widget_show (freqplots_new);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_new);
-
-  freqplots_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
-  gtk_widget_show (freqplots_open_input);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_open_input);
-
-  freqplots_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
-  gtk_widget_show (freqplots_save);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save);
-
-  freqplots_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
-  gtk_widget_show (freqplots_save_as);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save_as);
-
-  freqplots_save_as_gnuplot = gtk_menu_item_new_with_mnemonic (_("Save As gnuplot"));
-  gtk_widget_show (freqplots_save_as_gnuplot);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save_as_gnuplot);
-
-  separatormenuitem2 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separatormenuitem2);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), separatormenuitem2);
-  gtk_widget_set_sensitive (separatormenuitem2, FALSE);
-
-  freqplots_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
-  gtk_widget_show (freqplots_quit);
-  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_quit);
-
-  view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
-  gtk_widget_show (view_menuitem);
-  gtk_container_add (GTK_CONTAINER (menubar2), view_menuitem);
-
-  view_menuitem_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (view_menuitem), view_menuitem_menu);
-
-  freqplots_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
-  gtk_widget_show (freqplots_pol_menu);
-  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), freqplots_pol_menu);
-  gtk_tooltips_set_tip (tooltips, freqplots_pol_menu, _("Disply gain data relevant to polarization"), NULL);
-
-  freqplots_pol_menu_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (freqplots_pol_menu), freqplots_pol_menu_menu);
-
-  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
-  gtk_widget_show (rdpattern_total);
-  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_total);
-  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
-
-  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
-  gtk_widget_show (rdpattern_horizontal);
-  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_horizontal);
-  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
-
-  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
-  gtk_widget_show (rdpattern_vertical);
-  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_vertical);
-  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Plot gain in vertical polarization"), NULL);
-
-  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
-  gtk_widget_show (rdpattern_right_hand);
-  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_right_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Plot gain in rhcp"), NULL);
-
-  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
-  gtk_widget_show (rdpattern_left_hand);
-  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_left_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Plot gain in lhcp"), NULL);
-
-  net_gain = gtk_check_menu_item_new_with_mnemonic (_("Net Gain"));
-  gtk_widget_show (net_gain);
-  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), net_gain);
-  gtk_tooltips_set_tip (tooltips, net_gain, _("Display Net Gain towards Viewer"), NULL);
-
-  hbox10 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox10);
-  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), hbox10, FALSE, FALSE, 0);
-
-  freqplots_gmax_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Max Gain"));
-  gtk_widget_show (freqplots_gmax_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gmax_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_gmax_togglebutton, _("Plot maximum gain over frequency range"), NULL);
-
-  freqplots_gdir_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Direct."));
-  gtk_widget_show (freqplots_gdir_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gdir_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_gdir_togglebutton, _("Plot direction of maximum gain"), NULL);
-
-  freqplots_gviewer_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Viewer"));
-  gtk_widget_show (freqplots_gviewer_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gviewer_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_gviewer_togglebutton, _("Plot gain in direction of viewer\n(perpenticular to screen)"), NULL);
-
-  freqplots_vswr_togglebutton = gtk_toggle_button_new_with_mnemonic (_("VSWR"));
-  gtk_widget_show (freqplots_vswr_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_vswr_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_vswr_togglebutton, _("Plot VSWR over frequency"), NULL);
-
-  freqplots_zrlzim_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zr/Zi"));
-  gtk_widget_show (freqplots_zrlzim_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zrlzim_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_zrlzim_togglebutton, _("Plot real and imaginary input impedances"), NULL);
-
-  freqplots_zmgzph_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zm/Zph"));
-  gtk_widget_show (freqplots_zmgzph_togglebutton);
-  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zmgzph_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, freqplots_zmgzph_togglebutton, _("Plot magnitude and phase of input impedance"), NULL);
-
-  label215 = gtk_label_new (_("  Freq Loop "));
-  gtk_widget_show (label215);
-  gtk_box_pack_start (GTK_BOX (hbox10), label215, FALSE, FALSE, 0);
-
-  plot_loop_start = gtk_button_new ();
-  gtk_widget_show (plot_loop_start);
-  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_start, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, plot_loop_start, _("Start Frequency Loop"), NULL);
-
-  image61 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image61);
-  gtk_container_add (GTK_CONTAINER (plot_loop_start), image61);
-
-  plot_loop_pause = gtk_button_new ();
-  gtk_widget_show (plot_loop_pause);
-  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_pause, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, plot_loop_pause, _("Pause Frequency Loop"), NULL);
-
-  image64 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image64);
-  gtk_container_add (GTK_CONTAINER (plot_loop_pause), image64);
-
-  plot_loop_reset = gtk_button_new ();
-  gtk_widget_show (plot_loop_reset);
-  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_reset, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, plot_loop_reset, _("Reset Frequency Loop"), NULL);
-
-  image63 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image63);
-  gtk_container_add (GTK_CONTAINER (plot_loop_reset), image63);
-
-  hseparator4 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator4);
-  gtk_box_pack_start (GTK_BOX (vbox2), hseparator4, FALSE, FALSE, 4);
-
-  hbox15 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox15);
-  gtk_box_pack_start (GTK_BOX (vbox2), hbox15, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (hbox15, -1, 30);
-
-  label16 = gtk_label_new (_("F MHz"));
-  gtk_widget_show (label16);
-  gtk_box_pack_start (GTK_BOX (hbox15), label16, FALSE, FALSE, 0);
-
-  freqplots_fmhz_entry = gtk_entry_new ();
-  gtk_widget_show (freqplots_fmhz_entry);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_fmhz_entry, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (freqplots_fmhz_entry), _(" - - - - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_fmhz_entry), 8);
-
-  label12 = gtk_label_new (_(" Max Gain"));
-  gtk_widget_show (label12);
-  gtk_box_pack_start (GTK_BOX (hbox15), label12, FALSE, FALSE, 0);
-
-  freqplots_maxgain_entry = gtk_entry_new ();
-  gtk_widget_show (freqplots_maxgain_entry);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_maxgain_entry, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (freqplots_maxgain_entry), _(" - - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_maxgain_entry), 6);
-
-  label13 = gtk_label_new (_(" VSWR"));
-  gtk_widget_show (label13);
-  gtk_box_pack_start (GTK_BOX (hbox15), label13, FALSE, FALSE, 1);
-
-  freqplots_vswr_entry = gtk_entry_new ();
-  gtk_widget_show (freqplots_vswr_entry);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_vswr_entry, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (freqplots_vswr_entry), _(" - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_vswr_entry), 5);
-
-  label14 = gtk_label_new (_(" Zreal"));
-  gtk_widget_show (label14);
-  gtk_box_pack_start (GTK_BOX (hbox15), label14, FALSE, FALSE, 1);
-
-  freqplots_zreal_entry = gtk_entry_new ();
-  gtk_widget_show (freqplots_zreal_entry);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zreal_entry, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (freqplots_zreal_entry), _(" - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zreal_entry), 5);
-
-  label15 = gtk_label_new (_(" Zim"));
-  gtk_widget_show (label15);
-  gtk_box_pack_start (GTK_BOX (hbox15), label15, FALSE, FALSE, 1);
-
-  freqplots_zimag_entry = gtk_entry_new ();
-  gtk_widget_show (freqplots_zimag_entry);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zimag_entry, FALSE, FALSE, 0);
-  gtk_entry_set_text (GTK_ENTRY (freqplots_zimag_entry), _(" - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zimag_entry), 5);
-
-  label212 = gtk_label_new (_(" Zo"));
-  gtk_widget_show (label212);
-  gtk_box_pack_start (GTK_BOX (hbox15), label212, FALSE, FALSE, 0);
-
-  freqplots_zo_spinbutton_adj = gtk_adjustment_new (50, 1, 999, 0.10000000149, 10, 0);
-  freqplots_zo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (freqplots_zo_spinbutton_adj), 0.20000000298, 1);
-  gtk_widget_show (freqplots_zo_spinbutton);
-  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zo_spinbutton, FALSE, FALSE, 4);
-  gtk_tooltips_set_tip (tooltips, freqplots_zo_spinbutton, _("Specify Zo of transmission line"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (freqplots_zo_spinbutton), TRUE);
-
-  frame2 = gtk_frame_new (NULL);
-  gtk_widget_show (frame2);
-  gtk_box_pack_start (GTK_BOX (vbox2), frame2, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
-
-  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment2);
-  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
-  gtk_container_set_border_width (GTK_CONTAINER (alignment2), 2);
-
-  freqplots_drawingarea = gtk_drawing_area_new ();
-  gtk_widget_show (freqplots_drawingarea);
-  gtk_container_add (GTK_CONTAINER (alignment2), freqplots_drawingarea);
-  gtk_widget_set_size_request (freqplots_drawingarea, 1025, 769);
-  GTK_WIDGET_SET_FLAGS (freqplots_drawingarea, GTK_CAN_FOCUS);
-  gtk_widget_set_events (freqplots_drawingarea, GDK_BUTTON_PRESS_MASK);
-
-  freqplots_label = gtk_label_new (_("Structure Data Plots"));
-  gtk_widget_show (freqplots_label);
-  gtk_frame_set_label_widget (GTK_FRAME (frame2), freqplots_label);
-  gtk_misc_set_padding (GTK_MISC (freqplots_label), 4, 0);
-
-  g_signal_connect ((gpointer) freqplots_window, "delete_event",
-                    G_CALLBACK (on_freqplots_window_delete_event),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_window, "destroy",
-                    G_CALLBACK (on_freqplots_window_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_new, "activate",
-                    G_CALLBACK (on_new_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_open_input, "activate",
-                    G_CALLBACK (on_open_input_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_save, "activate",
-                    G_CALLBACK (on_freqplots_save_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_save_as, "activate",
-                    G_CALLBACK (on_freqplots_save_as_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_save_as_gnuplot, "activate",
-                    G_CALLBACK (on_freqplots_save_as_gnuplot_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_quit, "activate",
-                    G_CALLBACK (on_quit_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_pol_menu, "activate",
-                    G_CALLBACK (freqplots_pol_menu_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_total, "activate",
-                    G_CALLBACK (on_rdpattern_total_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
-                    G_CALLBACK (on_rdpattern_horizontal_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
-                    G_CALLBACK (on_rdpattern_vertical_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
-                    G_CALLBACK (on_rdpattern_right_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
-                    G_CALLBACK (on_rdpattern_left_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) net_gain, "activate",
-                    G_CALLBACK (on_net_gain_activate),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_gmax_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_gmax_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_gdir_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_gdir_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_gviewer_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_gviewer_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_vswr_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_vswr_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_zrlzim_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_zrlzim_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_zmgzph_togglebutton, "toggled",
-                    G_CALLBACK (on_freqplots_zmgzph_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) plot_loop_start, "clicked",
-                    G_CALLBACK (on_loop_start_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) plot_loop_pause, "clicked",
-                    G_CALLBACK (on_loop_pause_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) plot_loop_reset, "clicked",
-                    G_CALLBACK (on_loop_reset_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_zo_spinbutton, "value_changed",
-                    G_CALLBACK (on_freqplots_zo_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_drawingarea, "expose_event",
-                    G_CALLBACK (on_freqplots_drawingarea_expose_event),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_drawingarea, "configure_event",
-                    G_CALLBACK (on_freqplots_drawingarea_configure_event),
-                    NULL);
-  g_signal_connect ((gpointer) freqplots_drawingarea, "button_press_event",
-                    G_CALLBACK (on_freqplots_drawingarea_button_press_event),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, freqplots_window, "freqplots_window");
-  GLADE_HOOKUP_OBJECT (freqplots_window, vbox2, "vbox2");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_hbox1, "freqplots_hbox1");
-  GLADE_HOOKUP_OBJECT (freqplots_window, menubar2, "menubar2");
-  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5, "menuitem5");
-  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5_menu, "menuitem5_menu");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_new, "freqplots_new");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_open_input, "freqplots_open_input");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save, "freqplots_save");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save_as, "freqplots_save_as");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save_as_gnuplot, "freqplots_save_as_gnuplot");
-  GLADE_HOOKUP_OBJECT (freqplots_window, separatormenuitem2, "separatormenuitem2");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_quit, "freqplots_quit");
-  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem, "view_menuitem");
-  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem_menu, "view_menuitem_menu");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu, "freqplots_pol_menu");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu_menu, "freqplots_pol_menu_menu");
-  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_total, "rdpattern_total");
-  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_horizontal, "rdpattern_horizontal");
-  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_vertical, "rdpattern_vertical");
-  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_right_hand, "rdpattern_right_hand");
-  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_left_hand, "rdpattern_left_hand");
-  GLADE_HOOKUP_OBJECT (freqplots_window, net_gain, "net_gain");
-  GLADE_HOOKUP_OBJECT (freqplots_window, hbox10, "hbox10");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gmax_togglebutton, "freqplots_gmax_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gdir_togglebutton, "freqplots_gdir_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gviewer_togglebutton, "freqplots_gviewer_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_togglebutton, "freqplots_vswr_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zrlzim_togglebutton, "freqplots_zrlzim_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zmgzph_togglebutton, "freqplots_zmgzph_togglebutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label215, "label215");
-  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_start, "plot_loop_start");
-  GLADE_HOOKUP_OBJECT (freqplots_window, image61, "image61");
-  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_pause, "plot_loop_pause");
-  GLADE_HOOKUP_OBJECT (freqplots_window, image64, "image64");
-  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_reset, "plot_loop_reset");
-  GLADE_HOOKUP_OBJECT (freqplots_window, image63, "image63");
-  GLADE_HOOKUP_OBJECT (freqplots_window, hseparator4, "hseparator4");
-  GLADE_HOOKUP_OBJECT (freqplots_window, hbox15, "hbox15");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label16, "label16");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_fmhz_entry, "freqplots_fmhz_entry");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label12, "label12");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_maxgain_entry, "freqplots_maxgain_entry");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label13, "label13");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_entry, "freqplots_vswr_entry");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label14, "label14");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zreal_entry, "freqplots_zreal_entry");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label15, "label15");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zimag_entry, "freqplots_zimag_entry");
-  GLADE_HOOKUP_OBJECT (freqplots_window, label212, "label212");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zo_spinbutton, "freqplots_zo_spinbutton");
-  GLADE_HOOKUP_OBJECT (freqplots_window, frame2, "frame2");
-  GLADE_HOOKUP_OBJECT (freqplots_window, alignment2, "alignment2");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_drawingarea, "freqplots_drawingarea");
-  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_label, "freqplots_label");
-  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, tooltips, "tooltips");
-
-  gtk_window_add_accel_group (GTK_WINDOW (freqplots_window), accel_group);
-
-  return freqplots_window;
-}
-
-GtkWidget*
-create_rdpattern_window (void)
-{
-  GtkWidget *rdpattern_window;
-  GtkWidget *vbox3;
-  GtkWidget *hbox11;
-  GtkWidget *menubar3;
-  GtkWidget *menuitem9;
-  GtkWidget *menuitem9_menu;
-  GtkWidget *rdpattern_new;
-  GtkWidget *rdpattern_open;
-  GtkWidget *rdpattern_save;
-  GtkWidget *rdpattern_save_as;
-  GtkWidget *rdpattern_save_as_gnuplot;
-  GtkWidget *image101;
-  GtkWidget *separatormenuitem3;
-  GtkWidget *rdpattern_quit;
-  GtkWidget *rdpattern_view_menuitem;
-  GtkWidget *rdpattern_view_menuitem_menu;
-  GtkWidget *rdpattern_pol_menu;
-  GtkWidget *rdpattern_pol_menu_menu;
-  GSList *rdpattern_total_group = NULL;
-  GtkWidget *rdpattern_total;
-  GtkWidget *rdpattern_horizontal;
-  GtkWidget *rdpattern_vertical;
-  GtkWidget *rdpattern_right_hand;
-  GtkWidget *rdpattern_left_hand;
-  GtkWidget *rdpattern_gain_scaling;
-  GtkWidget *rdpattern_gain_scaling_menu;
-  GSList *rdpattern_linear_power_group = NULL;
-  GtkWidget *rdpattern_linear_power;
-  GtkWidget *rdpattern_linear_voltage;
-  GtkWidget *rdpattern_arrl_style;
-  GtkWidget *rdpattern_logarithmic;
-  GtkWidget *near_field;
-  GtkWidget *near_field_menu;
-  GtkWidget *rdpattern_e_field;
-  GtkWidget *rdpattern_h_field;
-  GtkWidget *rdpattern_poynting_vector;
-  GtkWidget *rdpattern_animate;
-  GtkWidget *total_field;
-  GtkWidget *total_field_menu;
-  GSList *near_peak_value_group = NULL;
-  GtkWidget *near_peak_value;
-  GtkWidget *near_snapshot;
-  GtkWidget *common_projection;
-  GtkWidget *common_freq;
-  GtkWidget *rdpattern_overlay_structure;
-  GtkWidget *vseparator8;
-  GtkWidget *rdpattern_hbox1;
-  GtkWidget *rdpattern_gain_togglebutton;
-  GtkWidget *rdpattern_eh_togglebutton;
-  GtkWidget *vseparator9;
-  GtkWidget *label216;
-  GtkWidget *rdpatttern_loop_start;
-  GtkWidget *image59;
-  GtkWidget *rdpattern_loop_pause;
-  GtkWidget *image60;
-  GtkWidget *rdpattern_loop_reset;
-  GtkWidget *image58;
-  GtkWidget *label246;
-  GtkWidget *rdpattern_fstep_entry;
-  GtkWidget *hseparator3;
-  GtkWidget *rdpattern_hbox2;
-  GtkWidget *rdpattern_colorcode_minlabel;
-  GtkWidget *rdpattern_colorcode_drawingarea;
-  GtkWidget *rdpattern_colorcode_maxlabel;
-  GtkWidget *rdpattern_viewer_gain;
-  GtkWidget *label11;
-  GtkObject *rdpattern_freq_spinbutton_adj;
-  GtkWidget *rdpattern_freq_spinbutton;
-  GtkWidget *rdpattern_freq_label;
-  GtkWidget *rdpattern_freq_checkbutton;
-  GtkWidget *rdpattern_new_freq_button;
-  GtkWidget *image49;
-  GtkWidget *hseparator12;
-  GtkWidget *rdpattern_label;
-  GtkWidget *frame3;
-  GtkWidget *alignment3;
-  GtkWidget *rdpattern_drawingarea;
-  GtkWidget *rdpattern_hbox3;
-  GtkWidget *label248;
-  GtkWidget *rdpattern_x_axis;
-  GtkWidget *rdpattern_y_axis;
-  GtkWidget *rdpattern_z_axis;
-  GtkWidget *rdpattern_default_view;
-  GtkWidget *image34;
-  GtkWidget *image55;
-  GtkObject *rdpattern_rotate_spinbutton_adj;
-  GtkWidget *rdpattern_rotate_spinbutton;
-  GtkWidget *image56;
-  GtkObject *rdpattern_incline_spinbutton_adj;
-  GtkWidget *rdpattern_incline_spinbutton;
-  GtkWidget *label247;
-  GtkObject *rdpattern_zoom_spinbutton_adj;
-  GtkWidget *rdpattern_zoom_spinbutton;
-  GtkWidget *rdpattern_plus_button;
-  GtkWidget *image98;
-  GtkWidget *rdpattern_minus_button;
-  GtkWidget *image99;
-  GtkWidget *rdpattern_one_button;
-  GtkWidget *image100;
-  GtkAccelGroup *accel_group;
-  GtkTooltips *tooltips;
-
-  tooltips = gtk_tooltips_new ();
-
-  accel_group = gtk_accel_group_new ();
-
-  rdpattern_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (rdpattern_window), 4);
-  gtk_window_set_title (GTK_WINDOW (rdpattern_window), _("Xnec2c: Radiation Patterns"));
-  gtk_window_set_gravity (GTK_WINDOW (rdpattern_window), GDK_GRAVITY_WEST);
-
-  vbox3 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox3);
-  gtk_container_add (GTK_CONTAINER (rdpattern_window), vbox3);
-
-  hbox11 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox11);
-  gtk_box_pack_start (GTK_BOX (vbox3), hbox11, FALSE, FALSE, 0);
-
-  menubar3 = gtk_menu_bar_new ();
-  gtk_widget_show (menubar3);
-  gtk_box_pack_start (GTK_BOX (hbox11), menubar3, FALSE, FALSE, 0);
-
-  menuitem9 = gtk_menu_item_new_with_mnemonic (_("_File"));
-  gtk_widget_show (menuitem9);
-  gtk_container_add (GTK_CONTAINER (menubar3), menuitem9);
-
-  menuitem9_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem9), menuitem9_menu);
-
-  rdpattern_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
-  gtk_widget_show (rdpattern_new);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_new);
-
-  rdpattern_open = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
-  gtk_widget_show (rdpattern_open);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_open);
-
-  rdpattern_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
-  gtk_widget_show (rdpattern_save);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save);
-
-  rdpattern_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
-  gtk_widget_show (rdpattern_save_as);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save_as);
-
-  rdpattern_save_as_gnuplot = gtk_image_menu_item_new_with_mnemonic (_("Save As gnuplot"));
-  gtk_widget_show (rdpattern_save_as_gnuplot);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save_as_gnuplot);
-
-  image101 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image101);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (rdpattern_save_as_gnuplot), image101);
-
-  separatormenuitem3 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separatormenuitem3);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), separatormenuitem3);
-  gtk_widget_set_sensitive (separatormenuitem3, FALSE);
-
-  rdpattern_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
-  gtk_widget_show (rdpattern_quit);
-  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_quit);
-
-  rdpattern_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
-  gtk_widget_show (rdpattern_view_menuitem);
-  gtk_container_add (GTK_CONTAINER (menubar3), rdpattern_view_menuitem);
-
-  rdpattern_view_menuitem_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_view_menuitem), rdpattern_view_menuitem_menu);
-
-  rdpattern_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
-  gtk_widget_show (rdpattern_pol_menu);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_pol_menu);
-  gtk_tooltips_set_tip (tooltips, rdpattern_pol_menu, _("Display gain data relevant to polarization"), NULL);
-
-  rdpattern_pol_menu_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_pol_menu), rdpattern_pol_menu_menu);
-
-  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
-  gtk_widget_show (rdpattern_total);
-  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_total);
-  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
-
-  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
-  gtk_widget_show (rdpattern_horizontal);
-  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_horizontal);
-  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
-
-  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
-  gtk_widget_show (rdpattern_vertical);
-  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_vertical);
-  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);
-
-  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
-  gtk_widget_show (rdpattern_right_hand);
-  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_right_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);
-
-  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
-  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
-  gtk_widget_show (rdpattern_left_hand);
-  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_left_hand);
-  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);
-
-  rdpattern_gain_scaling = gtk_menu_item_new_with_mnemonic (_("Gain Scaling"));
-  gtk_widget_show (rdpattern_gain_scaling);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_gain_scaling);
-  gtk_tooltips_set_tip (tooltips, rdpattern_gain_scaling, _("Select a style of gain scaling"), NULL);
-
-  rdpattern_gain_scaling_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_gain_scaling), rdpattern_gain_scaling_menu);
-
-  rdpattern_linear_power = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Power"));
-  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_power));
-  gtk_widget_show (rdpattern_linear_power);
-  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_power);
-  gtk_tooltips_set_tip (tooltips, rdpattern_linear_power, _("Linear power scaling"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_linear_power), TRUE);
-
-  rdpattern_linear_voltage = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Voltage"));
-  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_voltage));
-  gtk_widget_show (rdpattern_linear_voltage);
-  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_voltage);
-  gtk_tooltips_set_tip (tooltips, rdpattern_linear_voltage, _("Linear field voltage scaling"), NULL);
-
-  rdpattern_arrl_style = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("ARRL Style"));
-  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_arrl_style));
-  gtk_widget_show (rdpattern_arrl_style);
-  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_arrl_style);
-  gtk_tooltips_set_tip (tooltips, rdpattern_arrl_style, _("Scale gain in ARRL style"), NULL);
-
-  rdpattern_logarithmic = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Logarithmic"));
-  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_logarithmic));
-  gtk_widget_show (rdpattern_logarithmic);
-  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_logarithmic);
-  gtk_tooltips_set_tip (tooltips, rdpattern_logarithmic, _("Logarithmic gain scaling"), NULL);
-
-  near_field = gtk_menu_item_new_with_mnemonic (_("Near Field"));
-  gtk_widget_show (near_field);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), near_field);
-
-  near_field_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (near_field), near_field_menu);
-
-  rdpattern_e_field = gtk_check_menu_item_new_with_mnemonic (_("Near E Field"));
-  gtk_widget_show (rdpattern_e_field);
-  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_e_field);
-  gtk_tooltips_set_tip (tooltips, rdpattern_e_field, _("Display near E field"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_e_field), TRUE);
-
-  rdpattern_h_field = gtk_check_menu_item_new_with_mnemonic (_("Near H Field"));
-  gtk_widget_show (rdpattern_h_field);
-  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_h_field);
-  gtk_tooltips_set_tip (tooltips, rdpattern_h_field, _("Display near H field"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_h_field), TRUE);
-
-  rdpattern_poynting_vector = gtk_check_menu_item_new_with_mnemonic (_("Poynting Vector"));
-  gtk_widget_show (rdpattern_poynting_vector);
-  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_poynting_vector);
-  gtk_tooltips_set_tip (tooltips, rdpattern_poynting_vector, _("Display Poynting vector"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_poynting_vector), TRUE);
-
-  rdpattern_animate = gtk_menu_item_new_with_mnemonic (_("Animate Dialog"));
-  gtk_widget_show (rdpattern_animate);
-  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_animate);
-
-  total_field = gtk_menu_item_new_with_mnemonic (_("Total Field"));
-  gtk_widget_show (total_field);
-  gtk_container_add (GTK_CONTAINER (near_field_menu), total_field);
-
-  total_field_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (total_field), total_field_menu);
-
-  near_peak_value = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Peak Value"));
-  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_peak_value));
-  gtk_widget_show (near_peak_value);
-  gtk_container_add (GTK_CONTAINER (total_field_menu), near_peak_value);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (near_peak_value), TRUE);
-
-  near_snapshot = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Snapshot"));
-  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_snapshot));
-  gtk_widget_show (near_snapshot);
-  gtk_container_add (GTK_CONTAINER (total_field_menu), near_snapshot);
-
-  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
-  gtk_widget_show (common_projection);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_projection);
-  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parametrs in different windows"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);
-
-  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
-  gtk_widget_show (common_freq);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_freq);
-  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);
-
-  rdpattern_overlay_structure = gtk_check_menu_item_new_with_mnemonic (_("Overlay Structure"));
-  gtk_widget_show (rdpattern_overlay_structure);
-  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_overlay_structure);
-
-  vseparator8 = gtk_vseparator_new ();
-  gtk_widget_show (vseparator8);
-  gtk_box_pack_start (GTK_BOX (hbox11), vseparator8, FALSE, FALSE, 4);
-
-  rdpattern_hbox1 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (rdpattern_hbox1);
-  gtk_box_pack_start (GTK_BOX (hbox11), rdpattern_hbox1, FALSE, FALSE, 0);
-
-  rdpattern_gain_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Gain Pattern"));
-  gtk_widget_show (rdpattern_gain_togglebutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_gain_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_gain_togglebutton, _("Calculate and display radiation pattern"), NULL);
-
-  rdpattern_eh_togglebutton = gtk_toggle_button_new_with_mnemonic (_("E/H Fields"));
-  gtk_widget_show (rdpattern_eh_togglebutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_eh_togglebutton, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_eh_togglebutton, _("Calculate and display the near E/H fields"), NULL);
-
-  vseparator9 = gtk_vseparator_new ();
-  gtk_widget_show (vseparator9);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), vseparator9, FALSE, FALSE, 4);
-
-  label216 = gtk_label_new (_("Frequency Loop "));
-  gtk_widget_show (label216);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), label216, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label216), TRUE);
-
-  rdpatttern_loop_start = gtk_button_new ();
-  gtk_widget_show (rdpatttern_loop_start);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpatttern_loop_start, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpatttern_loop_start, _("Start Frequency Loop"), NULL);
-
-  image59 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image59);
-  gtk_container_add (GTK_CONTAINER (rdpatttern_loop_start), image59);
-
-  rdpattern_loop_pause = gtk_button_new ();
-  gtk_widget_show (rdpattern_loop_pause);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_loop_pause, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_loop_pause, _("Pause Frequency Loop"), NULL);
-
-  image60 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image60);
-  gtk_container_add (GTK_CONTAINER (rdpattern_loop_pause), image60);
-
-  rdpattern_loop_reset = gtk_button_new ();
-  gtk_widget_show (rdpattern_loop_reset);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_loop_reset, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_loop_reset, _("Reset Frequency Loop"), NULL);
-
-  image58 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image58);
-  gtk_container_add (GTK_CONTAINER (rdpattern_loop_reset), image58);
-
-  label246 = gtk_label_new (_(" Step "));
-  gtk_widget_show (label246);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), label246, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label246), TRUE);
-
-  rdpattern_fstep_entry = gtk_entry_new ();
-  gtk_widget_show (rdpattern_fstep_entry);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_fstep_entry, TRUE, TRUE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_fstep_entry, _("Current Frequency Step"), NULL);
-  gtk_entry_set_max_length (GTK_ENTRY (rdpattern_fstep_entry), 3);
-  gtk_editable_set_editable (GTK_EDITABLE (rdpattern_fstep_entry), FALSE);
-  gtk_entry_set_text (GTK_ENTRY (rdpattern_fstep_entry), _("1"));
-  gtk_entry_set_invisible_char (GTK_ENTRY (rdpattern_fstep_entry), 9679);
-  gtk_entry_set_width_chars (GTK_ENTRY (rdpattern_fstep_entry), 3);
-
-  hseparator3 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator3);
-  gtk_box_pack_start (GTK_BOX (vbox3), hseparator3, FALSE, FALSE, 4);
-
-  rdpattern_hbox2 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (rdpattern_hbox2);
-  gtk_box_pack_start (GTK_BOX (vbox3), rdpattern_hbox2, FALSE, FALSE, 0);
-  gtk_widget_set_size_request (rdpattern_hbox2, -1, 30);
-
-  rdpattern_colorcode_minlabel = gtk_label_new (_("0.0"));
-  gtk_widget_show (rdpattern_colorcode_minlabel);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_minlabel, FALSE, FALSE, 1);
-  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_minlabel), 5);
-
-  rdpattern_colorcode_drawingarea = gtk_drawing_area_new ();
-  gtk_widget_show (rdpattern_colorcode_drawingarea);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_drawingarea, FALSE, FALSE, 1);
-  gtk_widget_set_size_request (rdpattern_colorcode_drawingarea, 160, -1);
-  gtk_tooltips_set_tip (tooltips, rdpattern_colorcode_drawingarea, _("Color code for Gain or E/H field values"), NULL);
-
-  rdpattern_colorcode_maxlabel = gtk_label_new (_("0.00"));
-  gtk_widget_show (rdpattern_colorcode_maxlabel);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_maxlabel, FALSE, FALSE, 1);
-  gtk_misc_set_alignment (GTK_MISC (rdpattern_colorcode_maxlabel), 0, 0.5);
-  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_maxlabel), 9);
-
-  rdpattern_viewer_gain = gtk_entry_new ();
-  gtk_widget_show (rdpattern_viewer_gain);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_viewer_gain, FALSE, FALSE, 1);
-  gtk_tooltips_set_tip (tooltips, rdpattern_viewer_gain, _("Gain in direction of viewer\n(perpenticular to screen)"), NULL);
-  gtk_entry_set_text (GTK_ENTRY (rdpattern_viewer_gain), _(" - - - - -"));
-  gtk_entry_set_width_chars (GTK_ENTRY (rdpattern_viewer_gain), 6);
-
-  label11 = gtk_label_new (_("dB"));
-  gtk_widget_show (label11);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), label11, FALSE, FALSE, 1);
-  gtk_label_set_single_line_mode (GTK_LABEL (label11), TRUE);
-
-  rdpattern_freq_spinbutton_adj = gtk_adjustment_new (0.00999999977648, 0.00999999977648, 9999, 0.00999999977648, 10, 0);
-  rdpattern_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_freq_spinbutton_adj), 0.0010000000475, 3);
-  gtk_widget_show (rdpattern_freq_spinbutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_spinbutton, FALSE, FALSE, 1);
-  gtk_tooltips_set_tip (tooltips, rdpattern_freq_spinbutton, _("Enter frequency in MHz"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_freq_spinbutton), TRUE);
-
-  rdpattern_freq_label = gtk_label_new (_("MHz"));
-  gtk_widget_show (rdpattern_freq_label);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_label, FALSE, FALSE, 1);
-  gtk_misc_set_padding (GTK_MISC (rdpattern_freq_label), 4, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (rdpattern_freq_label), TRUE);
-
-  rdpattern_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
-  gtk_widget_show (rdpattern_freq_checkbutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_checkbutton, FALSE, FALSE, 2);
-  gtk_tooltips_set_tip (tooltips, rdpattern_freq_checkbutton, _("Enable data calculation on frequency change"), NULL);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rdpattern_freq_checkbutton), TRUE);
-
-  rdpattern_new_freq_button = gtk_button_new ();
-  gtk_widget_show (rdpattern_new_freq_button);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_new_freq_button, FALSE, FALSE, 2);
-  gtk_tooltips_set_tip (tooltips, rdpattern_new_freq_button, _("Calculate data for new frequency"), NULL);
-
-  image49 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image49);
-  gtk_container_add (GTK_CONTAINER (rdpattern_new_freq_button), image49);
-
-  hseparator12 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator12);
-  gtk_box_pack_start (GTK_BOX (vbox3), hseparator12, FALSE, FALSE, 4);
-
-  rdpattern_label = gtk_label_new (_("Radiation Patterns"));
-  gtk_widget_show (rdpattern_label);
-  gtk_box_pack_start (GTK_BOX (vbox3), rdpattern_label, FALSE, FALSE, 0);
-  gtk_label_set_width_chars (GTK_LABEL (rdpattern_label), 14);
-  gtk_label_set_single_line_mode (GTK_LABEL (rdpattern_label), TRUE);
-
-  frame3 = gtk_frame_new (NULL);
-  gtk_widget_show (frame3);
-  gtk_box_pack_start (GTK_BOX (vbox3), frame3, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame3), 4);
-
-  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment3);
-  gtk_container_add (GTK_CONTAINER (frame3), alignment3);
-  gtk_container_set_border_width (GTK_CONTAINER (alignment3), 2);
-
-  rdpattern_drawingarea = gtk_drawing_area_new ();
-  gtk_widget_show (rdpattern_drawingarea);
-  gtk_container_add (GTK_CONTAINER (alignment3), rdpattern_drawingarea);
-  gtk_widget_set_size_request (rdpattern_drawingarea, 681, 769);
-  GTK_WIDGET_SET_FLAGS (rdpattern_drawingarea, GTK_CAN_FOCUS);
-
-  rdpattern_hbox3 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (rdpattern_hbox3);
-  gtk_frame_set_label_widget (GTK_FRAME (frame3), rdpattern_hbox3);
-
-  label248 = gtk_label_new (_("View Radiation"));
-  gtk_widget_show (label248);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), label248, FALSE, FALSE, 0);
-  gtk_label_set_width_chars (GTK_LABEL (label248), 14);
-
-  rdpattern_x_axis = gtk_button_new_with_mnemonic (_("X"));
-  gtk_widget_show (rdpattern_x_axis);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_x_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_x_axis, _("View radiation pattern along X-axis"), NULL);
-  gtk_widget_add_accelerator (rdpattern_x_axis, "clicked", accel_group,
-                              GDK_X, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  rdpattern_y_axis = gtk_button_new_with_mnemonic (_("Y"));
-  gtk_widget_show (rdpattern_y_axis);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_y_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_y_axis, _("View radiation pattern along Y-axis"), NULL);
-  gtk_widget_add_accelerator (rdpattern_y_axis, "clicked", accel_group,
-                              GDK_Y, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  rdpattern_z_axis = gtk_button_new_with_mnemonic (_("Z"));
-  gtk_widget_show (rdpattern_z_axis);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_z_axis, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_z_axis, _("View radiation pattern along Z-axis"), NULL);
-  gtk_widget_add_accelerator (rdpattern_z_axis, "clicked", accel_group,
-                              GDK_Z, (GdkModifierType) 0,
-                              GTK_ACCEL_VISIBLE);
-
-  rdpattern_default_view = gtk_button_new ();
-  gtk_widget_show (rdpattern_default_view);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_default_view, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_default_view, _("View radiation pattern in default projection"), NULL);
-
-  image34 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image34);
-  gtk_container_add (GTK_CONTAINER (rdpattern_default_view), image34);
-
-  image55 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image55);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), image55, TRUE, TRUE, 0);
-
-  rdpattern_rotate_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 1, 10, 0);
-  rdpattern_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_rotate_spinbutton_adj), 1, 0);
-  gtk_widget_show (rdpattern_rotate_spinbutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_rotate_spinbutton, TRUE, TRUE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_rotate_spinbutton, _("Rotate radiation pattern around Z-axis"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_rotate_spinbutton), TRUE);
-  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (rdpattern_rotate_spinbutton), TRUE);
-
-  image56 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image56);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), image56, TRUE, TRUE, 0);
-
-  rdpattern_incline_spinbutton_adj = gtk_adjustment_new (45, -180, 180, 1, 10, 0);
-  rdpattern_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_incline_spinbutton_adj), 1, 0);
-  gtk_widget_show (rdpattern_incline_spinbutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_incline_spinbutton, TRUE, TRUE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_incline_spinbutton, _("Incline radiation pattern to plane of screen"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_incline_spinbutton), TRUE);
-  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (rdpattern_incline_spinbutton), TRUE);
-
-  label247 = gtk_label_new (_(" Zoom % "));
-  gtk_widget_show (label247);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), label247, FALSE, FALSE, 0);
-  gtk_label_set_single_line_mode (GTK_LABEL (label247), TRUE);
-
-  rdpattern_zoom_spinbutton_adj = gtk_adjustment_new (100, 10, 999, 1, 10, 0);
-  rdpattern_zoom_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_zoom_spinbutton_adj), 1, 0);
-  gtk_widget_show (rdpattern_zoom_spinbutton);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_zoom_spinbutton, TRUE, TRUE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_zoom_spinbutton, _("Zoom Structure Display"), NULL);
-
-  rdpattern_plus_button = gtk_button_new ();
-  gtk_widget_show (rdpattern_plus_button);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_plus_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_plus_button, _("Zoom In"), NULL);
-
-  image98 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image98);
-  gtk_container_add (GTK_CONTAINER (rdpattern_plus_button), image98);
-
-  rdpattern_minus_button = gtk_button_new ();
-  gtk_widget_show (rdpattern_minus_button);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_minus_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_minus_button, _("Zoom Out"), NULL);
-
-  image99 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image99);
-  gtk_container_add (GTK_CONTAINER (rdpattern_minus_button), image99);
-
-  rdpattern_one_button = gtk_button_new ();
-  gtk_widget_show (rdpattern_one_button);
-  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_one_button, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, rdpattern_one_button, _("Zoom to Default 1:1"), NULL);
-
-  image100 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image100);
-  gtk_container_add (GTK_CONTAINER (rdpattern_one_button), image100);
-
-  g_signal_connect ((gpointer) rdpattern_window, "delete_event",
-                    G_CALLBACK (on_rdpattern_window_delete_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_window, "destroy",
-                    G_CALLBACK (on_rdpattern_window_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_new, "activate",
-                    G_CALLBACK (on_new_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_open, "activate",
-                    G_CALLBACK (on_open_input_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_save, "activate",
-                    G_CALLBACK (on_rdpattern_save_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_save_as, "activate",
-                    G_CALLBACK (on_rdpattern_save_as_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_save_as_gnuplot, "activate",
-                    G_CALLBACK (on_rdpattern_save_as_gnuplot_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_quit, "activate",
-                    G_CALLBACK (on_quit_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_view_menuitem, "activate",
-                    G_CALLBACK (rdpattern_view_menuitem_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_pol_menu, "activate",
-                    G_CALLBACK (rdpattern_pol_menu_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_total, "activate",
-                    G_CALLBACK (on_rdpattern_total_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
-                    G_CALLBACK (on_rdpattern_horizontal_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
-                    G_CALLBACK (on_rdpattern_vertical_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
-                    G_CALLBACK (on_rdpattern_right_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
-                    G_CALLBACK (on_rdpattern_left_hand_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_linear_power, "activate",
-                    G_CALLBACK (on_rdpattern_linear_power_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_linear_voltage, "activate",
-                    G_CALLBACK (on_rdpattern_linear_voltage_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_arrl_style, "activate",
-                    G_CALLBACK (on_rdpattern_arrl_style_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_logarithmic, "activate",
-                    G_CALLBACK (on_rdpattern_logarithmic_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_e_field, "activate",
-                    G_CALLBACK (on_rdpattern_e_field_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_h_field, "activate",
-                    G_CALLBACK (on_rdpattern_h_field_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_poynting_vector, "activate",
-                    G_CALLBACK (on_rdpattern_poynting_vector_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_animate, "activate",
-                    G_CALLBACK (on_rdpattern_animate_activate),
-                    NULL);
-  g_signal_connect ((gpointer) near_peak_value, "activate",
-                    G_CALLBACK (on_near_peak_value_activate),
-                    NULL);
-  g_signal_connect ((gpointer) near_snapshot, "activate",
-                    G_CALLBACK (on_near_snapshot_activate),
-                    NULL);
-  g_signal_connect ((gpointer) common_projection, "activate",
-                    G_CALLBACK (on_common_projection_activate),
-                    NULL);
-  g_signal_connect ((gpointer) common_freq, "activate",
-                    G_CALLBACK (on_common_freq_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_overlay_structure, "activate",
-                    G_CALLBACK (on_rdpattern_overlay_structure_activate),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_gain_togglebutton, "toggled",
-                    G_CALLBACK (on_rdpattern_gain_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_eh_togglebutton, "toggled",
-                    G_CALLBACK (on_rdpattern_eh_togglebutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) rdpatttern_loop_start, "clicked",
-                    G_CALLBACK (on_loop_start_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_loop_pause, "clicked",
-                    G_CALLBACK (on_loop_pause_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_loop_reset, "clicked",
-                    G_CALLBACK (on_loop_reset_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_colorcode_drawingarea, "expose_event",
-                    G_CALLBACK (on_rdpattern_colorcode_drawingarea_expose_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_freq_spinbutton, "value_changed",
-                    G_CALLBACK (on_rdpattern_freq_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_new_freq_button, "clicked",
-                    G_CALLBACK (on_rdpattern_new_freq_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_drawingarea, "configure_event",
-                    G_CALLBACK (on_rdpattern_drawingarea_configure_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_drawingarea, "expose_event",
-                    G_CALLBACK (on_rdpattern_drawingarea_expose_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_drawingarea, "button_press_event",
-                    G_CALLBACK (on_rdpattern_drawingarea_button_press_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_drawingarea, "scroll_event",
-                    G_CALLBACK (on_rdpattern_drawingarea_scroll_event),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_x_axis, "clicked",
-                    G_CALLBACK (on_rdpattern_x_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_y_axis, "clicked",
-                    G_CALLBACK (on_rdpattern_y_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_z_axis, "clicked",
-                    G_CALLBACK (on_rdpattern_z_axis_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_default_view, "clicked",
-                    G_CALLBACK (on_rdpattern_default_view_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_rotate_spinbutton, "value_changed",
-                    G_CALLBACK (on_rdpattern_rotate_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_incline_spinbutton, "value_changed",
-                    G_CALLBACK (on_rdpattern_incline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_zoom_spinbutton, "value_changed",
-                    G_CALLBACK (on_rdpattern_zoom_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_plus_button, "clicked",
-                    G_CALLBACK (on_rdpattern_plus_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_minus_button, "clicked",
-                    G_CALLBACK (on_rdpattern_minus_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rdpattern_one_button, "clicked",
-                    G_CALLBACK (on_rdpattern_one_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, rdpattern_window, "rdpattern_window");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, vbox3, "vbox3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, hbox11, "hbox11");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, menubar3, "menubar3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9, "menuitem9");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9_menu, "menuitem9_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new, "rdpattern_new");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_open, "rdpattern_open");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save, "rdpattern_save");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save_as, "rdpattern_save_as");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save_as_gnuplot, "rdpattern_save_as_gnuplot");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image101, "image101");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, separatormenuitem3, "separatormenuitem3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_quit, "rdpattern_quit");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem, "rdpattern_view_menuitem");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem_menu, "rdpattern_view_menuitem_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu, "rdpattern_pol_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu_menu, "rdpattern_pol_menu_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_total, "rdpattern_total");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_horizontal, "rdpattern_horizontal");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_vertical, "rdpattern_vertical");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_right_hand, "rdpattern_right_hand");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_left_hand, "rdpattern_left_hand");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling, "rdpattern_gain_scaling");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling_menu, "rdpattern_gain_scaling_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_power, "rdpattern_linear_power");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_voltage, "rdpattern_linear_voltage");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_arrl_style, "rdpattern_arrl_style");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_logarithmic, "rdpattern_logarithmic");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field, "near_field");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field_menu, "near_field_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_e_field, "rdpattern_e_field");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_h_field, "rdpattern_h_field");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_poynting_vector, "rdpattern_poynting_vector");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_animate, "rdpattern_animate");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field, "total_field");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field_menu, "total_field_menu");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, near_peak_value, "near_peak_value");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, near_snapshot, "near_snapshot");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, common_projection, "common_projection");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, common_freq, "common_freq");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_overlay_structure, "rdpattern_overlay_structure");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator8, "vseparator8");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox1, "rdpattern_hbox1");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_togglebutton, "rdpattern_gain_togglebutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_eh_togglebutton, "rdpattern_eh_togglebutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator9, "vseparator9");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, label216, "label216");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpatttern_loop_start, "rdpatttern_loop_start");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image59, "image59");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_pause, "rdpattern_loop_pause");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image60, "image60");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_reset, "rdpattern_loop_reset");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image58, "image58");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, label246, "label246");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_fstep_entry, "rdpattern_fstep_entry");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, hseparator3, "hseparator3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox2, "rdpattern_hbox2");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_minlabel, "rdpattern_colorcode_minlabel");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_drawingarea, "rdpattern_colorcode_drawingarea");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_maxlabel, "rdpattern_colorcode_maxlabel");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_viewer_gain, "rdpattern_viewer_gain");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, label11, "label11");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_spinbutton, "rdpattern_freq_spinbutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_label, "rdpattern_freq_label");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_checkbutton, "rdpattern_freq_checkbutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new_freq_button, "rdpattern_new_freq_button");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image49, "image49");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, hseparator12, "hseparator12");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_label, "rdpattern_label");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, frame3, "frame3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, alignment3, "alignment3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_drawingarea, "rdpattern_drawingarea");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox3, "rdpattern_hbox3");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, label248, "label248");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_x_axis, "rdpattern_x_axis");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_y_axis, "rdpattern_y_axis");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_z_axis, "rdpattern_z_axis");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_default_view, "rdpattern_default_view");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image34, "image34");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image55, "image55");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_rotate_spinbutton, "rdpattern_rotate_spinbutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image56, "image56");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_incline_spinbutton, "rdpattern_incline_spinbutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, label247, "label247");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_zoom_spinbutton, "rdpattern_zoom_spinbutton");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_plus_button, "rdpattern_plus_button");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image98, "image98");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_minus_button, "rdpattern_minus_button");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image99, "image99");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_one_button, "rdpattern_one_button");
-  GLADE_HOOKUP_OBJECT (rdpattern_window, image100, "image100");
-  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, tooltips, "tooltips");
-
-  gtk_window_add_accel_group (GTK_WINDOW (rdpattern_window), accel_group);
-
-  return rdpattern_window;
-}
-
-GtkWidget*
-create_quit_dialog (void)
-{
-  GtkWidget *quit_dialog;
-  GtkWidget *dialog_vbox2;
-  GtkWidget *hbox12;
-  GtkWidget *image36;
-  GtkWidget *quit_label;
-  GtkWidget *dialog_action_area2;
-  GtkWidget *quit_cancelbutton;
-  GtkWidget *quit_okbutton;
-
-  quit_dialog = gtk_dialog_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (quit_dialog), 2);
-  gtk_window_set_title (GTK_WINDOW (quit_dialog), _("Confirmation"));
-  gtk_window_set_position (GTK_WINDOW (quit_dialog), GTK_WIN_POS_MOUSE);
-  gtk_window_set_modal (GTK_WINDOW (quit_dialog), TRUE);
-  gtk_window_set_type_hint (GTK_WINDOW (quit_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
-
-  dialog_vbox2 = GTK_DIALOG (quit_dialog)->vbox;
-  gtk_widget_show (dialog_vbox2);
-
-  hbox12 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox12);
-  gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox12, TRUE, TRUE, 0);
-
-  image36 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_DIALOG);
-  gtk_widget_show (image36);
-  gtk_box_pack_start (GTK_BOX (hbox12), image36, TRUE, TRUE, 0);
-  gtk_misc_set_padding (GTK_MISC (image36), 4, 4);
-
-  quit_label = gtk_label_new (_("Quit xnec2c?"));
-  gtk_widget_show (quit_label);
-  gtk_box_pack_start (GTK_BOX (hbox12), quit_label, FALSE, FALSE, 0);
-  gtk_misc_set_padding (GTK_MISC (quit_label), 4, 0);
-
-  dialog_action_area2 = GTK_DIALOG (quit_dialog)->action_area;
-  gtk_widget_show (dialog_action_area2);
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);
-
-  quit_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
-  gtk_widget_show (quit_cancelbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_cancelbutton, GTK_RESPONSE_CANCEL);
-  gtk_container_set_border_width (GTK_CONTAINER (quit_cancelbutton), 2);
-  GTK_WIDGET_SET_FLAGS (quit_cancelbutton, GTK_CAN_DEFAULT);
-
-  quit_okbutton = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (quit_okbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_okbutton, GTK_RESPONSE_OK);
-  gtk_container_set_border_width (GTK_CONTAINER (quit_okbutton), 2);
-  GTK_WIDGET_SET_FLAGS (quit_okbutton, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) quit_dialog, "destroy",
-                    G_CALLBACK (on_quit_dialog_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) quit_cancelbutton, "clicked",
-                    G_CALLBACK (on_quit_cancelbutton_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) quit_okbutton, "clicked",
-                    G_CALLBACK (on_quit_okbutton_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, quit_dialog, "quit_dialog");
-  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_vbox2, "dialog_vbox2");
-  GLADE_HOOKUP_OBJECT (quit_dialog, hbox12, "hbox12");
-  GLADE_HOOKUP_OBJECT (quit_dialog, image36, "image36");
-  GLADE_HOOKUP_OBJECT (quit_dialog, quit_label, "quit_label");
-  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_action_area2, "dialog_action_area2");
-  GLADE_HOOKUP_OBJECT (quit_dialog, quit_cancelbutton, "quit_cancelbutton");
-  GLADE_HOOKUP_OBJECT (quit_dialog, quit_okbutton, "quit_okbutton");
-
-  return quit_dialog;
-}
-
-GtkWidget*
-create_error_dialog (void)
-{
-  GtkWidget *error_dialog;
-  GtkWidget *dialog_vbox4;
-  GtkWidget *hbox14;
-  GtkWidget *image38;
-  GtkWidget *error_label;
-  GtkWidget *dialog_action_area4;
-  GtkWidget *error_quitbutton;
-  GtkWidget *error_okbutton;
-  GtkWidget *error_stopbutton;
-
-  error_dialog = gtk_dialog_new ();
-  gtk_window_set_title (GTK_WINDOW (error_dialog), _("Error"));
-  gtk_window_set_position (GTK_WINDOW (error_dialog), GTK_WIN_POS_CENTER);
-  gtk_window_set_modal (GTK_WINDOW (error_dialog), TRUE);
-  gtk_window_set_type_hint (GTK_WINDOW (error_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
-
-  dialog_vbox4 = GTK_DIALOG (error_dialog)->vbox;
-  gtk_widget_show (dialog_vbox4);
-
-  hbox14 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox14);
-  gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox14, TRUE, TRUE, 0);
-
-  image38 = gtk_image_new_from_stock ("gtk-dialog-error", GTK_ICON_SIZE_DIALOG);
-  gtk_widget_show (image38);
-  gtk_box_pack_start (GTK_BOX (hbox14), image38, TRUE, TRUE, 0);
-  gtk_misc_set_padding (GTK_MISC (image38), 4, 4);
-
-  error_label = gtk_label_new (_("Error"));
-  gtk_widget_show (error_label);
-  gtk_box_pack_start (GTK_BOX (hbox14), error_label, FALSE, FALSE, 0);
-  gtk_misc_set_padding (GTK_MISC (error_label), 4, 0);
-
-  dialog_action_area4 = GTK_DIALOG (error_dialog)->action_area;
-  gtk_widget_show (dialog_action_area4);
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END);
-
-  error_quitbutton = gtk_button_new_from_stock ("gtk-quit");
-  gtk_widget_show (error_quitbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_quitbutton, GTK_RESPONSE_OK);
-  gtk_container_set_border_width (GTK_CONTAINER (error_quitbutton), 2);
-  GTK_WIDGET_SET_FLAGS (error_quitbutton, GTK_CAN_DEFAULT);
-
-  error_okbutton = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (error_okbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_okbutton, GTK_RESPONSE_OK);
-  gtk_container_set_border_width (GTK_CONTAINER (error_okbutton), 2);
-  GTK_WIDGET_SET_FLAGS (error_okbutton, GTK_CAN_DEFAULT);
-
-  error_stopbutton = gtk_button_new_from_stock ("gtk-stop");
-  gtk_widget_show (error_stopbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_stopbutton, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (error_stopbutton), 2);
-  GTK_WIDGET_SET_FLAGS (error_stopbutton, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) error_dialog, "delete_event",
-                    G_CALLBACK (on_error_dialog_delete_event),
-                    NULL);
-  g_signal_connect ((gpointer) error_quitbutton, "clicked",
-                    G_CALLBACK (on_error_quitbutton_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) error_okbutton, "clicked",
-                    G_CALLBACK (on_error_okbutton_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) error_stopbutton, "clicked",
-                    G_CALLBACK (on_error_stopbutton_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, error_dialog, "error_dialog");
-  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_vbox4, "dialog_vbox4");
-  GLADE_HOOKUP_OBJECT (error_dialog, hbox14, "hbox14");
-  GLADE_HOOKUP_OBJECT (error_dialog, image38, "image38");
-  GLADE_HOOKUP_OBJECT (error_dialog, error_label, "error_label");
-  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_action_area4, "dialog_action_area4");
-  GLADE_HOOKUP_OBJECT (error_dialog, error_quitbutton, "error_quitbutton");
-  GLADE_HOOKUP_OBJECT (error_dialog, error_okbutton, "error_okbutton");
-  GLADE_HOOKUP_OBJECT (error_dialog, error_stopbutton, "error_stopbutton");
-
-  return error_dialog;
-}
-
-GtkWidget*
-create_animate_dialog (void)
-{
-  GtkWidget *animate_dialog;
-  GtkWidget *dialog_vbox5;
-  GtkWidget *table1;
-  GtkWidget *label17;
-  GtkWidget *label18;
-  GtkObject *animate_steps_spinbutton_adj;
-  GtkWidget *animate_steps_spinbutton;
-  GtkObject *animate_freq_spinbutton_adj;
-  GtkWidget *animate_freq_spinbutton;
-  GtkWidget *dialog_action_area5;
-  GtkWidget *animation_applybutton;
-  GtkWidget *animation_cancelbutton;
-  GtkWidget *animation_okbutton;
-  GtkTooltips *tooltips;
-
-  tooltips = gtk_tooltips_new ();
-
-  animate_dialog = gtk_dialog_new ();
-  gtk_window_set_title (GTK_WINDOW (animate_dialog), _("Near Field Animation"));
-  gtk_window_set_position (GTK_WINDOW (animate_dialog), GTK_WIN_POS_MOUSE);
-  gtk_window_set_type_hint (GTK_WINDOW (animate_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
-
-  dialog_vbox5 = GTK_DIALOG (animate_dialog)->vbox;
-  gtk_widget_show (dialog_vbox5);
-
-  table1 = gtk_table_new (2, 2, FALSE);
-  gtk_widget_show (table1);
-  gtk_box_pack_start (GTK_BOX (dialog_vbox5), table1, TRUE, TRUE, 0);
-
-  label17 = gtk_label_new (_("Steps/Cycle"));
-  gtk_widget_show (label17);
-  gtk_table_attach (GTK_TABLE (table1), label17, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 0);
-  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label17), 2, 2);
-
-  label18 = gtk_label_new (_("Animate Frequency (Hz)"));
-  gtk_widget_show (label18);
-  gtk_table_attach (GTK_TABLE (table1), label18, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 0);
-  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label18), 2, 2);
-
-  animate_steps_spinbutton_adj = gtk_adjustment_new (36, 12, 360, 1, 10, 0);
-  animate_steps_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_steps_spinbutton_adj), 1, 0);
-  gtk_widget_show (animate_steps_spinbutton);
-  gtk_table_attach (GTK_TABLE (table1), animate_steps_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 4);
-  gtk_tooltips_set_tip (tooltips, animate_steps_spinbutton, _("Steps per Cycle of Excitation"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_steps_spinbutton), TRUE);
-
-  animate_freq_spinbutton_adj = gtk_adjustment_new (1, 0.10000000149, 10, 0.10000000149, 10, 0);
-  animate_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_freq_spinbutton_adj), 1, 1);
-  gtk_widget_show (animate_freq_spinbutton);
-  gtk_table_attach (GTK_TABLE (table1), animate_freq_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 4);
-  gtk_tooltips_set_tip (tooltips, animate_freq_spinbutton, _("Frequency of Excitaion Animation"), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_freq_spinbutton), TRUE);
-
-  dialog_action_area5 = GTK_DIALOG (animate_dialog)->action_area;
-  gtk_widget_show (dialog_action_area5);
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END);
-
-  animation_applybutton = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (animation_applybutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_applybutton, GTK_RESPONSE_APPLY);
-  gtk_container_set_border_width (GTK_CONTAINER (animation_applybutton), 2);
-  GTK_WIDGET_SET_FLAGS (animation_applybutton, GTK_CAN_DEFAULT);
-
-  animation_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
-  gtk_widget_show (animation_cancelbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_cancelbutton, GTK_RESPONSE_CANCEL);
-  gtk_container_set_border_width (GTK_CONTAINER (animation_cancelbutton), 2);
-  GTK_WIDGET_SET_FLAGS (animation_cancelbutton, GTK_CAN_DEFAULT);
-
-  animation_okbutton = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (animation_okbutton);
-  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_okbutton, GTK_RESPONSE_OK);
-  gtk_container_set_border_width (GTK_CONTAINER (animation_okbutton), 2);
-  GTK_WIDGET_SET_FLAGS (animation_okbutton, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) animate_dialog, "destroy",
-                    G_CALLBACK (on_animate_dialog_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) animation_applybutton, "clicked",
-                    G_CALLBACK (on_animation_applybutton_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) animation_cancelbutton, "clicked",
-                    G_CALLBACK (on_animation_cancelbutton_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) animation_okbutton, "clicked",
-                    G_CALLBACK (on_animation_okbutton_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, animate_dialog, "animate_dialog");
-  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_vbox5, "dialog_vbox5");
-  GLADE_HOOKUP_OBJECT (animate_dialog, table1, "table1");
-  GLADE_HOOKUP_OBJECT (animate_dialog, label17, "label17");
-  GLADE_HOOKUP_OBJECT (animate_dialog, label18, "label18");
-  GLADE_HOOKUP_OBJECT (animate_dialog, animate_steps_spinbutton, "animate_steps_spinbutton");
-  GLADE_HOOKUP_OBJECT (animate_dialog, animate_freq_spinbutton, "animate_freq_spinbutton");
-  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_action_area5, "dialog_action_area5");
-  GLADE_HOOKUP_OBJECT (animate_dialog, animation_applybutton, "animation_applybutton");
-  GLADE_HOOKUP_OBJECT (animate_dialog, animation_cancelbutton, "animation_cancelbutton");
-  GLADE_HOOKUP_OBJECT (animate_dialog, animation_okbutton, "animation_okbutton");
-  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, tooltips, "tooltips");
-
-  gtk_widget_grab_focus (animation_okbutton);
-  return animate_dialog;
-}
-
-GtkWidget*
-create_nec2_editor (void)
-{
-  GtkWidget *nec2_editor;
-  GtkWidget *vbox4;
-  GtkWidget *hbox16;
-  GtkWidget *frame8;
-  GtkWidget *alignment8;
-  GtkWidget *hbox17;
-  GtkWidget *nec2_row_add;
-  GtkWidget *nec2_row_remv;
-  GtkWidget *nec2_treeview_clear;
-  GtkWidget *label23;
-  GtkWidget *frame7;
-  GtkWidget *alignment7;
-  GtkWidget *hbox18;
-  GtkWidget *nec2_save_as;
-  GtkWidget *nec2_save;
-  GtkWidget *nec2_apply_checkbutton;
-  GtkWidget *nec2_revert;
-  GtkWidget *label22;
-  GtkWidget *frame6;
-  GtkWidget *alignment6;
-  GtkWidget *scrolledwindow5;
-  GtkWidget *nec2_cmnt_treeview;
-  GtkWidget *label21;
-  GtkWidget *frame9;
-  GtkWidget *alignment9;
-  GtkWidget *table34;
-  GtkWidget *gw;
-  GtkWidget *ga;
-  GtkWidget *gh;
-  GtkWidget *sp;
-  GtkWidget *gr;
-  GtkWidget *gm;
-  GtkWidget *gx;
-  GtkWidget *gs;
-  GtkWidget *label24;
-  GtkWidget *frame5;
-  GtkWidget *alignment5;
-  GtkWidget *scrolledwindow4;
-  GtkWidget *nec2_geom_treeview;
-  GtkWidget *label20;
-  GtkWidget *frame10;
-  GtkWidget *alignment10;
-  GtkWidget *table4;
-  GtkWidget *ex;
-  GtkWidget *fr;
-  GtkWidget *gn;
-  GtkWidget *rp;
-  GtkWidget *ld;
-  GtkWidget *nt;
-  GtkWidget *tl;
-  GtkWidget *ne;
-  GtkWidget *xq;
-  GtkWidget *kh;
-  GtkWidget *ek;
-  GtkWidget *gd;
-  GtkWidget *label25;
-  GtkWidget *frame4;
-  GtkWidget *alignment4;
-  GtkWidget *scrolledwindow3;
-  GtkWidget *nec2_cmnd_treeview;
-  GtkWidget *label19;
-
-  nec2_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (nec2_editor), _("Xnec2c: NEC2 Input File Editor"));
-  gtk_window_set_gravity (GTK_WINDOW (nec2_editor), GDK_GRAVITY_WEST);
-
-  vbox4 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox4);
-  gtk_container_add (GTK_CONTAINER (nec2_editor), vbox4);
-
-  hbox16 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox16);
-  gtk_box_pack_start (GTK_BOX (vbox4), hbox16, FALSE, TRUE, 0);
-
-  frame8 = gtk_frame_new (NULL);
-  gtk_widget_show (frame8);
-  gtk_box_pack_start (GTK_BOX (hbox16), frame8, FALSE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame8), 2);
-
-  alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment8);
-  gtk_container_add (GTK_CONTAINER (frame8), alignment8);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0);
-
-  hbox17 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox17);
-  gtk_container_add (GTK_CONTAINER (alignment8), hbox17);
-
-  nec2_row_add = gtk_button_new_from_stock ("gtk-add");
-  gtk_widget_show (nec2_row_add);
-  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_add, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_add), 2);
-
-  nec2_row_remv = gtk_button_new_from_stock ("gtk-remove");
-  gtk_widget_show (nec2_row_remv);
-  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_remv, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_remv), 2);
-
-  nec2_treeview_clear = gtk_button_new_from_stock ("gtk-clear");
-  gtk_widget_show (nec2_treeview_clear);
-  gtk_box_pack_start (GTK_BOX (hbox17), nec2_treeview_clear, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_treeview_clear), 2);
-
-  label23 = gtk_label_new (_("Edit Tree View Rows"));
-  gtk_widget_show (label23);
-  gtk_frame_set_label_widget (GTK_FRAME (frame8), label23);
-  gtk_misc_set_padding (GTK_MISC (label23), 2, 0);
-
-  frame7 = gtk_frame_new (NULL);
-  gtk_widget_show (frame7);
-  gtk_box_pack_start (GTK_BOX (hbox16), frame7, FALSE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame7), 2);
-
-  alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment7);
-  gtk_container_add (GTK_CONTAINER (frame7), alignment7);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0);
-
-  hbox18 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox18);
-  gtk_container_add (GTK_CONTAINER (alignment7), hbox18);
-
-  nec2_save_as = gtk_button_new_from_stock ("gtk-save-as");
-  gtk_widget_show (nec2_save_as);
-  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save_as, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_save_as), 2);
-
-  nec2_save = gtk_button_new_from_stock ("gtk-save");
-  gtk_widget_show (nec2_save);
-  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_save), 2);
-
-  nec2_apply_checkbutton = gtk_check_button_new_with_mnemonic ("gtk-apply");
-  gtk_button_set_use_stock (GTK_BUTTON (nec2_apply_checkbutton), TRUE);
-  gtk_widget_show (nec2_apply_checkbutton);
-  gtk_box_pack_start (GTK_BOX (hbox18), nec2_apply_checkbutton, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_apply_checkbutton), 2);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nec2_apply_checkbutton), TRUE);
-
-  nec2_revert = gtk_button_new_from_stock ("gtk-revert-to-saved");
-  gtk_widget_show (nec2_revert);
-  gtk_box_pack_start (GTK_BOX (hbox18), nec2_revert, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nec2_revert), 2);
-  gtk_button_set_focus_on_click (GTK_BUTTON (nec2_revert), FALSE);
-
-  label22 = gtk_label_new (_("NEC2 Input File"));
-  gtk_widget_show (label22);
-  gtk_frame_set_label_widget (GTK_FRAME (frame7), label22);
-  gtk_misc_set_padding (GTK_MISC (label22), 2, 0);
-
-  frame6 = gtk_frame_new (NULL);
-  gtk_widget_show (frame6);
-  gtk_box_pack_start (GTK_BOX (vbox4), frame6, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame6), 2);
-
-  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment6);
-  gtk_container_add (GTK_CONTAINER (frame6), alignment6);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0);
-
-  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_show (scrolledwindow5);
-  gtk_container_add (GTK_CONTAINER (alignment6), scrolledwindow5);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
-
-  nec2_cmnt_treeview = gtk_tree_view_new ();
-  gtk_widget_show (nec2_cmnt_treeview);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow5), nec2_cmnt_treeview);
-  gtk_widget_set_size_request (nec2_cmnt_treeview, -1, 138);
-  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);
-  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);
-
-  label21 = gtk_label_new (_("Comments"));
-  gtk_widget_show (label21);
-  gtk_frame_set_label_widget (GTK_FRAME (frame6), label21);
-  gtk_misc_set_padding (GTK_MISC (label21), 2, 0);
-
-  frame9 = gtk_frame_new (NULL);
-  gtk_widget_show (frame9);
-  gtk_box_pack_start (GTK_BOX (vbox4), frame9, FALSE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame9), 2);
-
-  alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment9);
-  gtk_container_add (GTK_CONTAINER (frame9), alignment9);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0);
-
-  table34 = gtk_table_new (2, 8, FALSE);
-  gtk_widget_show (table34);
-  gtk_container_add (GTK_CONTAINER (alignment9), table34);
-
-  gw = gtk_button_new_with_mnemonic (_("Wire"));
-  gtk_widget_show (gw);
-  gtk_table_attach (GTK_TABLE (table34), gw, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gw), 2);
-
-  ga = gtk_button_new_with_mnemonic (_("Arc"));
-  gtk_widget_show (ga);
-  gtk_table_attach (GTK_TABLE (table34), ga, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ga), 2);
-
-  gh = gtk_button_new_with_mnemonic (_("Helix"));
-  gtk_widget_show (gh);
-  gtk_table_attach (GTK_TABLE (table34), gh, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gh), 2);
-
-  sp = gtk_button_new_with_mnemonic (_("Patch"));
-  gtk_widget_show (sp);
-  gtk_table_attach (GTK_TABLE (table34), sp, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (sp), 2);
-
-  gr = gtk_button_new_with_mnemonic (_("Cylinder"));
-  gtk_widget_show (gr);
-  gtk_table_attach (GTK_TABLE (table34), gr, 4, 5, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gr), 2);
-
-  gm = gtk_button_new_with_mnemonic (_("Move"));
-  gtk_widget_show (gm);
-  gtk_table_attach (GTK_TABLE (table34), gm, 5, 6, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gm), 2);
-
-  gx = gtk_button_new_with_mnemonic (_("Reflect"));
-  gtk_widget_show (gx);
-  gtk_table_attach (GTK_TABLE (table34), gx, 6, 7, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gx), 2);
-
-  gs = gtk_button_new_with_mnemonic (_("Scale"));
-  gtk_widget_show (gs);
-  gtk_table_attach (GTK_TABLE (table34), gs, 7, 8, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gs), 2);
-
-  label24 = gtk_label_new (_("Edit Geometry Data"));
-  gtk_widget_show (label24);
-  gtk_frame_set_label_widget (GTK_FRAME (frame9), label24);
-  gtk_misc_set_padding (GTK_MISC (label24), 2, 0);
-
-  frame5 = gtk_frame_new (NULL);
-  gtk_widget_show (frame5);
-  gtk_box_pack_start (GTK_BOX (vbox4), frame5, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame5), 2);
-
-  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment5);
-  gtk_container_add (GTK_CONTAINER (frame5), alignment5);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0);
-
-  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_show (scrolledwindow4);
-  gtk_container_add (GTK_CONTAINER (alignment5), scrolledwindow4);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
-
-  nec2_geom_treeview = gtk_tree_view_new ();
-  gtk_widget_show (nec2_geom_treeview);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow4), nec2_geom_treeview);
-  gtk_widget_set_size_request (nec2_geom_treeview, -1, 204);
-  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);
-  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);
-
-  label20 = gtk_label_new (_("Geometry"));
-  gtk_widget_show (label20);
-  gtk_frame_set_label_widget (GTK_FRAME (frame5), label20);
-  gtk_misc_set_padding (GTK_MISC (label20), 2, 0);
-
-  frame10 = gtk_frame_new (NULL);
-  gtk_widget_show (frame10);
-  gtk_box_pack_start (GTK_BOX (vbox4), frame10, FALSE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame10), 2);
-
-  alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment10);
-  gtk_container_add (GTK_CONTAINER (frame10), alignment10);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 12, 0);
-
-  table4 = gtk_table_new (2, 6, FALSE);
-  gtk_widget_show (table4);
-  gtk_container_add (GTK_CONTAINER (alignment10), table4);
-
-  ex = gtk_button_new_with_mnemonic (_("Excitation"));
-  gtk_widget_show (ex);
-  gtk_table_attach (GTK_TABLE (table4), ex, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ex), 2);
-
-  fr = gtk_button_new_with_mnemonic (_("Frequency"));
-  gtk_widget_show (fr);
-  gtk_table_attach (GTK_TABLE (table4), fr, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (fr), 2);
-
-  gn = gtk_button_new_with_mnemonic (_("Ground (GN)"));
-  gtk_widget_show (gn);
-  gtk_table_attach (GTK_TABLE (table4), gn, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gn), 2);
-
-  rp = gtk_button_new_with_mnemonic (_("Radiation"));
-  gtk_widget_show (rp);
-  gtk_table_attach (GTK_TABLE (table4), rp, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (rp), 2);
-
-  ld = gtk_button_new_with_mnemonic (_("Loading"));
-  gtk_widget_show (ld);
-  gtk_table_attach (GTK_TABLE (table4), ld, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ld), 2);
-
-  nt = gtk_button_new_with_mnemonic (_("Network"));
-  gtk_widget_show (nt);
-  gtk_table_attach (GTK_TABLE (table4), nt, 4, 5, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nt), 2);
-
-  tl = gtk_button_new_with_mnemonic (_("Trans. Line"));
-  gtk_widget_show (tl);
-  gtk_table_attach (GTK_TABLE (table4), tl, 5, 6, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (tl), 2);
-
-  ne = gtk_button_new_with_mnemonic (_("Near Fields"));
-  gtk_widget_show (ne);
-  gtk_table_attach (GTK_TABLE (table4), ne, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ne), 2);
-
-  xq = gtk_button_new_with_mnemonic (_("Execute"));
-  gtk_widget_show (xq);
-  gtk_table_attach (GTK_TABLE (table4), xq, 5, 6, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (xq), 2);
-
-  kh = gtk_button_new_with_mnemonic (_("Interaction"));
-  gtk_widget_show (kh);
-  gtk_table_attach (GTK_TABLE (table4), kh, 4, 5, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (kh), 2);
-
-  ek = gtk_button_new_with_mnemonic (_("Kernel"));
-  gtk_widget_show (ek);
-  gtk_table_attach (GTK_TABLE (table4), ek, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ek), 2);
-
-  gd = gtk_button_new_with_mnemonic (_("Ground (GD)"));
-  gtk_widget_show (gd);
-  gtk_table_attach (GTK_TABLE (table4), gd, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gd), 2);
-
-  label25 = gtk_label_new (_("Edit Control Commands"));
-  gtk_widget_show (label25);
-  gtk_frame_set_label_widget (GTK_FRAME (frame10), label25);
-  gtk_misc_set_padding (GTK_MISC (label25), 2, 0);
-
-  frame4 = gtk_frame_new (NULL);
-  gtk_widget_show (frame4);
-  gtk_box_pack_start (GTK_BOX (vbox4), frame4, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame4), 2);
-
-  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment4);
-  gtk_container_add (GTK_CONTAINER (frame4), alignment4);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);
-
-  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_show (scrolledwindow3);
-  gtk_container_add (GTK_CONTAINER (alignment4), scrolledwindow3);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);
-
-  nec2_cmnd_treeview = gtk_tree_view_new ();
-  gtk_widget_show (nec2_cmnd_treeview);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow3), nec2_cmnd_treeview);
-  gtk_widget_set_size_request (nec2_cmnd_treeview, -1, 204);
-  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);
-  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);
-
-  label19 = gtk_label_new (_("Commands"));
-  gtk_widget_show (label19);
-  gtk_frame_set_label_widget (GTK_FRAME (frame4), label19);
-  gtk_misc_set_padding (GTK_MISC (label19), 2, 0);
-
-  g_signal_connect ((gpointer) nec2_editor, "delete_event",
-                    G_CALLBACK (on_nec2_editor_delete_event),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_editor, "destroy",
-                    G_CALLBACK (on_nec2_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_row_add, "clicked",
-                    G_CALLBACK (on_nec2_row_add_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_row_remv, "clicked",
-                    G_CALLBACK (on_nec2_row_remv_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_treeview_clear, "clicked",
-                    G_CALLBACK (on_nec2_treeview_clear_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_save_as, "clicked",
-                    G_CALLBACK (on_nec2_save_as_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_save, "clicked",
-                    G_CALLBACK (on_nec2_save_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_revert, "clicked",
-                    G_CALLBACK (on_nec2_revert_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_cmnt_treeview, "button_press_event",
-                    G_CALLBACK (on_nec2_cmnt_treeview_button_press_event),
-                    NULL);
-  g_signal_connect ((gpointer) gw, "clicked",
-                    G_CALLBACK (on_gw_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ga, "clicked",
-                    G_CALLBACK (on_ga_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gh, "clicked",
-                    G_CALLBACK (on_gh_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) sp, "clicked",
-                    G_CALLBACK (on_sp_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gr, "clicked",
-                    G_CALLBACK (on_gr_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gm, "clicked",
-                    G_CALLBACK (on_gm_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gx, "clicked",
-                    G_CALLBACK (on_gx_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gs, "clicked",
-                    G_CALLBACK (on_gs_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_geom_treeview, "button_press_event",
-                    G_CALLBACK (on_nec2_geom_treeview_button_press_event),
-                    NULL);
-  g_signal_connect ((gpointer) ex, "clicked",
-                    G_CALLBACK (on_ex_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) fr, "clicked",
-                    G_CALLBACK (on_fr_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gn, "clicked",
-                    G_CALLBACK (on_gn_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) rp, "clicked",
-                    G_CALLBACK (on_rp_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ld, "clicked",
-                    G_CALLBACK (on_ld_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nt, "clicked",
-                    G_CALLBACK (on_nt_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) tl, "clicked",
-                    G_CALLBACK (on_tl_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ne, "clicked",
-                    G_CALLBACK (on_ne_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) xq, "clicked",
-                    G_CALLBACK (on_xq_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) kh, "clicked",
-                    G_CALLBACK (on_kh_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ek, "clicked",
-                    G_CALLBACK (on_ek_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gd, "clicked",
-                    G_CALLBACK (on_gd_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nec2_cmnd_treeview, "button_press_event",
-                    G_CALLBACK (on_nec2_cmnd_treeview_button_press_event),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (nec2_editor, nec2_editor, "nec2_editor");
-  GLADE_HOOKUP_OBJECT (nec2_editor, vbox4, "vbox4");
-  GLADE_HOOKUP_OBJECT (nec2_editor, hbox16, "hbox16");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame8, "frame8");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment8, "alignment8");
-  GLADE_HOOKUP_OBJECT (nec2_editor, hbox17, "hbox17");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_add, "nec2_row_add");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_remv, "nec2_row_remv");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_treeview_clear, "nec2_treeview_clear");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label23, "label23");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame7, "frame7");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment7, "alignment7");
-  GLADE_HOOKUP_OBJECT (nec2_editor, hbox18, "hbox18");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save_as, "nec2_save_as");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save, "nec2_save");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_apply_checkbutton, "nec2_apply_checkbutton");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_revert, "nec2_revert");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label22, "label22");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame6, "frame6");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment6, "alignment6");
-  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow5, "scrolledwindow5");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnt_treeview, "nec2_cmnt_treeview");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label21, "label21");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame9, "frame9");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment9, "alignment9");
-  GLADE_HOOKUP_OBJECT (nec2_editor, table34, "table34");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gw, "gw");
-  GLADE_HOOKUP_OBJECT (nec2_editor, ga, "ga");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gh, "gh");
-  GLADE_HOOKUP_OBJECT (nec2_editor, sp, "sp");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gr, "gr");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gm, "gm");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gx, "gx");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gs, "gs");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label24, "label24");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame5, "frame5");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment5, "alignment5");
-  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow4, "scrolledwindow4");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_geom_treeview, "nec2_geom_treeview");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label20, "label20");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame10, "frame10");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment10, "alignment10");
-  GLADE_HOOKUP_OBJECT (nec2_editor, table4, "table4");
-  GLADE_HOOKUP_OBJECT (nec2_editor, ex, "ex");
-  GLADE_HOOKUP_OBJECT (nec2_editor, fr, "fr");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gn, "gn");
-  GLADE_HOOKUP_OBJECT (nec2_editor, rp, "rp");
-  GLADE_HOOKUP_OBJECT (nec2_editor, ld, "ld");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nt, "nt");
-  GLADE_HOOKUP_OBJECT (nec2_editor, tl, "tl");
-  GLADE_HOOKUP_OBJECT (nec2_editor, ne, "ne");
-  GLADE_HOOKUP_OBJECT (nec2_editor, xq, "xq");
-  GLADE_HOOKUP_OBJECT (nec2_editor, kh, "kh");
-  GLADE_HOOKUP_OBJECT (nec2_editor, ek, "ek");
-  GLADE_HOOKUP_OBJECT (nec2_editor, gd, "gd");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label25, "label25");
-  GLADE_HOOKUP_OBJECT (nec2_editor, frame4, "frame4");
-  GLADE_HOOKUP_OBJECT (nec2_editor, alignment4, "alignment4");
-  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow3, "scrolledwindow3");
-  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnd_treeview, "nec2_cmnd_treeview");
-  GLADE_HOOKUP_OBJECT (nec2_editor, label19, "label19");
-
-  return nec2_editor;
-}
-
-GtkWidget*
-create_wire_editor (void)
-{
-  GtkWidget *wire_editor;
-  GtkWidget *vbox5;
-  GtkWidget *frame11;
-  GtkWidget *table2;
-  GtkWidget *label29;
-  GtkWidget *label30;
-  GtkWidget *label31;
-  GtkWidget *label32;
-  GtkWidget *label33;
-  GtkWidget *label34;
-  GtkWidget *label36;
-  GtkWidget *label37;
-  GtkWidget *label38;
-  GtkObject *wire_tagnum_spinbutton_adj;
-  GtkWidget *wire_tagnum_spinbutton;
-  GtkObject *wire_numseg_spinbutton_adj;
-  GtkWidget *wire_numseg_spinbutton;
-  GtkObject *wire_pcl_spinbutton_adj;
-  GtkWidget *wire_pcl_spinbutton;
-  GtkObject *wire_x1_spinbutton_adj;
-  GtkWidget *wire_x1_spinbutton;
-  GtkObject *wire_y1_spinbutton_adj;
-  GtkWidget *wire_y1_spinbutton;
-  GtkObject *wire_z1_spinbutton_adj;
-  GtkWidget *wire_z1_spinbutton;
-  GtkObject *wire_z2_spinbutton_adj;
-  GtkWidget *wire_z2_spinbutton;
-  GtkObject *wire_y2_spinbutton_adj;
-  GtkWidget *wire_y2_spinbutton;
-  GtkObject *wire_x2_spinbutton_adj;
-  GtkWidget *wire_x2_spinbutton;
-  GtkWidget *label28;
-  GtkObject *wire_dia_spinbutton_adj;
-  GtkWidget *wire_dia_spinbutton;
-  GtkWidget *label35;
-  GtkWidget *label39;
-  GtkObject *wire_len_spinbutton_adj;
-  GtkWidget *wire_len_spinbutton;
-  GtkWidget *label44;
-  GtkObject *wire_res_spinbutton_adj;
-  GtkWidget *wire_res_spinbutton;
-  GtkWidget *wire_taper_checkbutton;
-  GtkWidget *wire_taperframe;
-  GtkWidget *alignment12;
-  GtkWidget *table3;
-  GtkWidget *label40;
-  GtkWidget *label41;
-  GtkWidget *label42;
-  GtkWidget *label43;
-  GtkObject *wire_rdia_spinbutton_adj;
-  GtkWidget *wire_rdia_spinbutton;
-  GtkObject *wire_dian_spinbutton_adj;
-  GtkWidget *wire_dian_spinbutton;
-  GtkObject *wire_dia1_spinbutton_adj;
-  GtkWidget *wire_dia1_spinbutton;
-  GtkObject *wire_rlen_spinbutton_adj;
-  GtkWidget *wire_rlen_spinbutton;
-  GtkWidget *label27;
-  GtkWidget *hbox21;
-  GtkWidget *wire_new_button;
-  GtkWidget *wire_cancel_button;
-  GtkWidget *alignment50;
-  GtkWidget *hbox48;
-  GtkWidget *image70;
-  GtkWidget *label222;
-  GtkWidget *wire_apply_button;
-  GtkWidget *wire_ok_button;
-
-  wire_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (wire_editor), _("Wire Element (GW & GC cards)"));
-
-  vbox5 = gtk_vbox_new (FALSE, 2);
-  gtk_widget_show (vbox5);
-  gtk_container_add (GTK_CONTAINER (wire_editor), vbox5);
-
-  frame11 = gtk_frame_new (NULL);
-  gtk_widget_show (frame11);
-  gtk_box_pack_start (GTK_BOX (vbox5), frame11, TRUE, TRUE, 2);
-  gtk_container_set_border_width (GTK_CONTAINER (frame11), 4);
-
-  table2 = gtk_table_new (6, 4, FALSE);
-  gtk_widget_show (table2);
-  gtk_container_add (GTK_CONTAINER (frame11), table2);
-  gtk_table_set_row_spacings (GTK_TABLE (table2), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table2), 2);
-
-  label29 = gtk_label_new (_("No. Segments"));
-  gtk_widget_show (label29);
-  gtk_table_attach (GTK_TABLE (table2), label29, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label29), 0.1, 0.5);
-
-  label30 = gtk_label_new (_("Segs % lambda"));
-  gtk_widget_show (label30);
-  gtk_table_attach (GTK_TABLE (table2), label30, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label30), 0.1, 0.5);
-
-  label31 = gtk_label_new ("");
-  gtk_widget_show (label31);
-  gtk_table_attach (GTK_TABLE (table2), label31, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label31), 0.1, 0.5);
-
-  label32 = gtk_label_new (_("Wire X1"));
-  gtk_widget_show (label32);
-  gtk_table_attach (GTK_TABLE (table2), label32, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label32), 0.1, 0.5);
-
-  label33 = gtk_label_new (_("Wire Y1"));
-  gtk_widget_show (label33);
-  gtk_table_attach (GTK_TABLE (table2), label33, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  GTK_WIDGET_SET_FLAGS (label33, GTK_CAN_FOCUS);
-  gtk_label_set_selectable (GTK_LABEL (label33), TRUE);
-  gtk_misc_set_alignment (GTK_MISC (label33), 0.1, 0.5);
-
-  label34 = gtk_label_new (_("Wire Z1"));
-  gtk_widget_show (label34);
-  gtk_table_attach (GTK_TABLE (table2), label34, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label34), 0.1, 0.5);
-
-  label36 = gtk_label_new (_("Wire X2"));
-  gtk_widget_show (label36);
-  gtk_table_attach (GTK_TABLE (table2), label36, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label36), 0.1, 0.5);
-
-  label37 = gtk_label_new (_("Wire Y2"));
-  gtk_widget_show (label37);
-  gtk_table_attach (GTK_TABLE (table2), label37, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label37), 0.1, 0.5);
-
-  label38 = gtk_label_new (_("Wire Z2"));
-  gtk_widget_show (label38);
-  gtk_table_attach (GTK_TABLE (table2), label38, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label38), 0.1, 0.5);
-
-  wire_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
-  wire_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_tagnum_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (wire_tagnum_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_tagnum_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_tagnum_spinbutton), TRUE);
-
-  wire_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
-  wire_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_numseg_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (wire_numseg_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_numseg_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_numseg_spinbutton), TRUE);
-
-  wire_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
-  wire_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_pcl_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_pcl_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_pcl_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_pcl_spinbutton), TRUE);
-
-  wire_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_x1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_x1_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x1_spinbutton), TRUE);
-
-  wire_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_y1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_y1_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y1_spinbutton), TRUE);
-
-  wire_z1_spinbutton_adj = gtk_adjustment_new (-1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_z1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_z1_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z1_spinbutton), TRUE);
-
-  wire_z2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_z2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_z2_spinbutton, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z2_spinbutton), TRUE);
-
-  wire_y2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_y2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_y2_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y2_spinbutton), TRUE);
-
-  wire_x2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  wire_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_x2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_x2_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x2_spinbutton), TRUE);
-
-  label28 = gtk_label_new (_("Tag Number"));
-  gtk_widget_show (label28);
-  gtk_table_attach (GTK_TABLE (table2), label28, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label28), 0.1, 0.5);
-
-  wire_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 0, 100, 9.99999974738e-06, 10, 0);
-  wire_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_dia_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_dia_spinbutton, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia_spinbutton), TRUE);
-
-  label35 = gtk_label_new (_("Wire Diameter"));
-  gtk_widget_show (label35);
-  gtk_table_attach (GTK_TABLE (table2), label35, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label35), 0.1, 0.5);
-
-  label39 = gtk_label_new (_("Wire Length"));
-  gtk_widget_show (label39);
-  gtk_table_attach (GTK_TABLE (table2), label39, 3, 4, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label39), 0.1, 0.5);
-
-  wire_len_spinbutton_adj = gtk_adjustment_new (2, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  wire_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_len_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_len_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_len_spinbutton, 3, 4, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_len_spinbutton), TRUE);
-
-  label44 = gtk_label_new (_("Conductivity S/m"));
-  gtk_widget_show (label44);
-  gtk_table_attach (GTK_TABLE (table2), label44, 3, 4, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label44), 0.1, 0.5);
-
-  wire_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
-  wire_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_res_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_res_spinbutton);
-  gtk_table_attach (GTK_TABLE (table2), wire_res_spinbutton, 3, 4, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_res_spinbutton), TRUE);
-
-  wire_taper_checkbutton = gtk_check_button_new_with_mnemonic (_("Tapered Wire"));
-  gtk_widget_show (wire_taper_checkbutton);
-  gtk_frame_set_label_widget (GTK_FRAME (frame11), wire_taper_checkbutton);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_taper_checkbutton), 2);
-
-  wire_taperframe = gtk_frame_new (NULL);
-  gtk_widget_show (wire_taperframe);
-  gtk_box_pack_start (GTK_BOX (vbox5), wire_taperframe, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_taperframe), 4);
-
-  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment12);
-  gtk_container_add (GTK_CONTAINER (wire_taperframe), alignment12);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0);
-
-  table3 = gtk_table_new (2, 4, FALSE);
-  gtk_widget_show (table3);
-  gtk_container_add (GTK_CONTAINER (alignment12), table3);
-  gtk_table_set_row_spacings (GTK_TABLE (table3), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table3), 2);
-
-  label40 = gtk_label_new (_("Length Taper"));
-  gtk_widget_show (label40);
-  gtk_table_attach (GTK_TABLE (table3), label40, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label40), 0.1, 0.5);
-
-  label41 = gtk_label_new (_("Diameter Seg 1"));
-  gtk_widget_show (label41);
-  gtk_table_attach (GTK_TABLE (table3), label41, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label41), 0.1, 0.5);
-
-  label42 = gtk_label_new (_("Diameter Seg N"));
-  gtk_widget_show (label42);
-  gtk_table_attach (GTK_TABLE (table3), label42, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label42), 0.1, 0.5);
-
-  label43 = gtk_label_new (_("Diam. Taper"));
-  gtk_widget_show (label43);
-  gtk_table_attach (GTK_TABLE (table3), label43, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label43), 0.1, 0.5);
-
-  wire_rdia_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
-  wire_rdia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rdia_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_rdia_spinbutton);
-  gtk_table_attach (GTK_TABLE (table3), wire_rdia_spinbutton, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rdia_spinbutton), TRUE);
-
-  wire_dian_spinbutton_adj = gtk_adjustment_new (0.0179999992251, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
-  wire_dian_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dian_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_dian_spinbutton);
-  gtk_table_attach (GTK_TABLE (table3), wire_dian_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dian_spinbutton), TRUE);
-
-  wire_dia1_spinbutton_adj = gtk_adjustment_new (0.0309999994934, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
-  wire_dia1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_dia1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table3), wire_dia1_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia1_spinbutton), TRUE);
-
-  wire_rlen_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
-  wire_rlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rlen_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (wire_rlen_spinbutton);
-  gtk_table_attach (GTK_TABLE (table3), wire_rlen_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rlen_spinbutton), TRUE);
-
-  label27 = gtk_label_new (_("Wire Taper Data"));
-  gtk_widget_show (label27);
-  gtk_frame_set_label_widget (GTK_FRAME (wire_taperframe), label27);
-  gtk_misc_set_padding (GTK_MISC (label27), 4, 4);
-
-  hbox21 = gtk_hbox_new (TRUE, 2);
-  gtk_widget_show (hbox21);
-  gtk_box_pack_start (GTK_BOX (vbox5), hbox21, TRUE, TRUE, 0);
-
-  wire_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (wire_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox21), wire_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_new_button), 2);
-  GTK_WIDGET_SET_FLAGS (wire_new_button, GTK_CAN_DEFAULT);
-
-  wire_cancel_button = gtk_button_new ();
-  gtk_widget_show (wire_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox21), wire_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_cancel_button), 2);
-  GTK_WIDGET_SET_FLAGS (wire_cancel_button, GTK_CAN_DEFAULT);
-
-  alignment50 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment50);
-  gtk_container_add (GTK_CONTAINER (wire_cancel_button), alignment50);
-
-  hbox48 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox48);
-  gtk_container_add (GTK_CONTAINER (alignment50), hbox48);
-
-  image70 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image70);
-  gtk_box_pack_start (GTK_BOX (hbox48), image70, FALSE, FALSE, 0);
-
-  label222 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label222);
-  gtk_box_pack_start (GTK_BOX (hbox48), label222, FALSE, FALSE, 0);
-
-  wire_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (wire_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox21), wire_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_apply_button), 2);
-  GTK_WIDGET_SET_FLAGS (wire_apply_button, GTK_CAN_DEFAULT);
-
-  wire_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (wire_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox21), wire_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (wire_ok_button), 2);
-  GTK_WIDGET_SET_FLAGS (wire_ok_button, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) wire_editor, "destroy",
-                    G_CALLBACK (on_wire_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) wire_tagnum_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_tagnum_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_numseg_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_pcl_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_pcl_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_x1_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_y1_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_z1_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_z2_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_y2_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_x2_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_dia_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_len_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_len_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_res_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_res_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_taper_checkbutton, "toggled",
-                    G_CALLBACK (on_wire_taper_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) wire_rdia_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_dian_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_dia1_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_rlen_spinbutton, "value_changed",
-                    G_CALLBACK (on_wire_rlen_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) wire_new_button, "clicked",
-                    G_CALLBACK (on_wire_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) wire_cancel_button, "clicked",
-                    G_CALLBACK (on_wire_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) wire_apply_button, "clicked",
-                    G_CALLBACK (on_wire_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) wire_ok_button, "clicked",
-                    G_CALLBACK (on_wire_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (wire_editor, wire_editor, "wire_editor");
-  GLADE_HOOKUP_OBJECT (wire_editor, vbox5, "vbox5");
-  GLADE_HOOKUP_OBJECT (wire_editor, frame11, "frame11");
-  GLADE_HOOKUP_OBJECT (wire_editor, table2, "table2");
-  GLADE_HOOKUP_OBJECT (wire_editor, label29, "label29");
-  GLADE_HOOKUP_OBJECT (wire_editor, label30, "label30");
-  GLADE_HOOKUP_OBJECT (wire_editor, label31, "label31");
-  GLADE_HOOKUP_OBJECT (wire_editor, label32, "label32");
-  GLADE_HOOKUP_OBJECT (wire_editor, label33, "label33");
-  GLADE_HOOKUP_OBJECT (wire_editor, label34, "label34");
-  GLADE_HOOKUP_OBJECT (wire_editor, label36, "label36");
-  GLADE_HOOKUP_OBJECT (wire_editor, label37, "label37");
-  GLADE_HOOKUP_OBJECT (wire_editor, label38, "label38");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_tagnum_spinbutton, "wire_tagnum_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_numseg_spinbutton, "wire_numseg_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_pcl_spinbutton, "wire_pcl_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_x1_spinbutton, "wire_x1_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_y1_spinbutton, "wire_y1_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_z1_spinbutton, "wire_z1_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_z2_spinbutton, "wire_z2_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_y2_spinbutton, "wire_y2_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_x2_spinbutton, "wire_x2_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, label28, "label28");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia_spinbutton, "wire_dia_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, label35, "label35");
-  GLADE_HOOKUP_OBJECT (wire_editor, label39, "label39");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_len_spinbutton, "wire_len_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, label44, "label44");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_res_spinbutton, "wire_res_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_taper_checkbutton, "wire_taper_checkbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_taperframe, "wire_taperframe");
-  GLADE_HOOKUP_OBJECT (wire_editor, alignment12, "alignment12");
-  GLADE_HOOKUP_OBJECT (wire_editor, table3, "table3");
-  GLADE_HOOKUP_OBJECT (wire_editor, label40, "label40");
-  GLADE_HOOKUP_OBJECT (wire_editor, label41, "label41");
-  GLADE_HOOKUP_OBJECT (wire_editor, label42, "label42");
-  GLADE_HOOKUP_OBJECT (wire_editor, label43, "label43");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_rdia_spinbutton, "wire_rdia_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_dian_spinbutton, "wire_dian_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia1_spinbutton, "wire_dia1_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_rlen_spinbutton, "wire_rlen_spinbutton");
-  GLADE_HOOKUP_OBJECT (wire_editor, label27, "label27");
-  GLADE_HOOKUP_OBJECT (wire_editor, hbox21, "hbox21");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_new_button, "wire_new_button");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_cancel_button, "wire_cancel_button");
-  GLADE_HOOKUP_OBJECT (wire_editor, alignment50, "alignment50");
-  GLADE_HOOKUP_OBJECT (wire_editor, hbox48, "hbox48");
-  GLADE_HOOKUP_OBJECT (wire_editor, image70, "image70");
-  GLADE_HOOKUP_OBJECT (wire_editor, label222, "label222");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_apply_button, "wire_apply_button");
-  GLADE_HOOKUP_OBJECT (wire_editor, wire_ok_button, "wire_ok_button");
-
-  return wire_editor;
-}
-
-GtkWidget*
-create_patch_editor (void)
-{
-  GtkWidget *patch_editor;
-  GtkWidget *vbox6;
-  GtkWidget *patch_type_frame;
-  GtkWidget *alignment13;
-  GtkWidget *hbox22;
-  GtkWidget *patch_arbitrary_radiobutton;
-  GSList *patch_arbitrary_radiobutton_group = NULL;
-  GtkWidget *patch_rectangular_radiobutton;
-  GtkWidget *patch_triangular_radiobutton;
-  GtkWidget *patch_quadrilateral_radiobutton;
-  GtkWidget *patch_surface_radiobutton;
-  GtkWidget *label45;
-  GtkWidget *patch_sm_frame;
-  GtkWidget *alignment18;
-  GtkWidget *table10;
-  GtkWidget *label87;
-  GtkWidget *label88;
-  GtkObject *patch_nx_spinbutton_adj;
-  GtkWidget *patch_nx_spinbutton;
-  GtkObject *patch_ny_spinbutton_adj;
-  GtkWidget *patch_ny_spinbutton;
-  GtkWidget *label86;
-  GtkWidget *frame13;
-  GtkWidget *alignment14;
-  GtkWidget *table5;
-  GtkWidget *patch_x1_label;
-  GtkWidget *patch_y1_label;
-  GtkWidget *patch_z1_label;
-  GtkObject *patch_x1_spinbutton_adj;
-  GtkWidget *patch_x1_spinbutton;
-  GtkObject *patch_y1_spinbutton_adj;
-  GtkWidget *patch_y1_spinbutton;
-  GtkObject *patch_z1_spinbutton_adj;
-  GtkWidget *patch_z1_spinbutton;
-  GtkObject *patch_x2_spinbutton_adj;
-  GtkWidget *patch_x2_spinbutton;
-  GtkObject *patch_y2_spinbutton_adj;
-  GtkWidget *patch_y2_spinbutton;
-  GtkObject *patch_z2_spinbutton_adj;
-  GtkWidget *patch_z2_spinbutton;
-  GtkWidget *patch_x2_label;
-  GtkWidget *patch_y2_label;
-  GtkWidget *patch_z2_label;
-  GtkWidget *label46;
-  GtkWidget *patch_sc_frame;
-  GtkWidget *alignment15;
-  GtkWidget *vbox7;
-  GtkWidget *table6;
-  GtkObject *patch_x3_spinbutton_adj;
-  GtkWidget *patch_x3_spinbutton;
-  GtkObject *patch_y3_spinbutton_adj;
-  GtkWidget *patch_y3_spinbutton;
-  GtkObject *patch_z3_spinbutton_adj;
-  GtkWidget *patch_z3_spinbutton;
-  GtkWidget *label54;
-  GtkWidget *label57;
-  GtkWidget *label58;
-  GtkWidget *patch_sc_table;
-  GtkObject *patch_x4_spinbutton_adj;
-  GtkWidget *patch_x4_spinbutton;
-  GtkObject *patch_y4_spinbutton_adj;
-  GtkWidget *patch_y4_spinbutton;
-  GtkObject *patch_z4_spinbutton_adj;
-  GtkWidget *patch_z4_spinbutton;
-  GtkWidget *label55;
-  GtkWidget *label56;
-  GtkWidget *label59;
-  GtkWidget *label47;
-  GtkWidget *hbox23;
-  GtkWidget *patch_new_button;
-  GtkWidget *patch_cancel_button;
-  GtkWidget *alignment51;
-  GtkWidget *hbox49;
-  GtkWidget *image71;
-  GtkWidget *label223;
-  GtkWidget *patch_apply_button;
-  GtkWidget *patch_ok_button;
-
-  patch_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (patch_editor), _("Patch Element (SP & SC Cards)"));
-
-  vbox6 = gtk_vbox_new (FALSE, 2);
-  gtk_widget_show (vbox6);
-  gtk_container_add (GTK_CONTAINER (patch_editor), vbox6);
-
-  patch_type_frame = gtk_frame_new (NULL);
-  gtk_widget_show (patch_type_frame);
-  gtk_box_pack_start (GTK_BOX (vbox6), patch_type_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_type_frame), 4);
-
-  alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment13);
-  gtk_container_add (GTK_CONTAINER (patch_type_frame), alignment13);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0);
-
-  hbox22 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox22);
-  gtk_container_add (GTK_CONTAINER (alignment13), hbox22);
-
-  patch_arbitrary_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Arbitary"));
-  gtk_widget_show (patch_arbitrary_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox22), patch_arbitrary_radiobutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_arbitrary_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_arbitrary_radiobutton), patch_arbitrary_radiobutton_group);
-  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_arbitrary_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (patch_arbitrary_radiobutton), TRUE);
-
-  patch_rectangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangle"));
-  gtk_widget_show (patch_rectangular_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox22), patch_rectangular_radiobutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_rectangular_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton), patch_arbitrary_radiobutton_group);
-  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton));
-
-  patch_triangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Triangle"));
-  gtk_widget_show (patch_triangular_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox22), patch_triangular_radiobutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_triangular_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton), patch_arbitrary_radiobutton_group);
-  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton));
-
-  patch_quadrilateral_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Quadrilateral"));
-  gtk_widget_show (patch_quadrilateral_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox22), patch_quadrilateral_radiobutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_quadrilateral_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton), patch_arbitrary_radiobutton_group);
-  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton));
-
-  patch_surface_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Surface"));
-  gtk_widget_show (patch_surface_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox22), patch_surface_radiobutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_surface_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_surface_radiobutton), patch_arbitrary_radiobutton_group);
-  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_surface_radiobutton));
-
-  label45 = gtk_label_new (_("Patch Type"));
-  gtk_widget_show (label45);
-  gtk_frame_set_label_widget (GTK_FRAME (patch_type_frame), label45);
-  gtk_misc_set_padding (GTK_MISC (label45), 4, 4);
-
-  patch_sm_frame = gtk_frame_new (NULL);
-  gtk_widget_show (patch_sm_frame);
-  gtk_box_pack_start (GTK_BOX (vbox6), patch_sm_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_sm_frame), 4);
-
-  alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment18);
-  gtk_container_add (GTK_CONTAINER (patch_sm_frame), alignment18);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 12, 0);
-
-  table10 = gtk_table_new (2, 2, FALSE);
-  gtk_widget_show (table10);
-  gtk_container_add (GTK_CONTAINER (alignment18), table10);
-
-  label87 = gtk_label_new (_("Corners 1-2 sub-division (NX)"));
-  gtk_widget_show (label87);
-  gtk_table_attach (GTK_TABLE (table10), label87, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label87), 0.1, 0.5);
-
-  label88 = gtk_label_new (_("Corners 2-3 sub-division (NY)"));
-  gtk_widget_show (label88);
-  gtk_table_attach (GTK_TABLE (table10), label88, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label88), 0.1, 0.5);
-
-  patch_nx_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
-  patch_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_nx_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (patch_nx_spinbutton);
-  gtk_table_attach (GTK_TABLE (table10), patch_nx_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_nx_spinbutton), TRUE);
-
-  patch_ny_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
-  patch_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_ny_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (patch_ny_spinbutton);
-  gtk_table_attach (GTK_TABLE (table10), patch_ny_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_ny_spinbutton), TRUE);
-
-  label86 = gtk_label_new (_("Surface Sub-division"));
-  gtk_widget_show (label86);
-  gtk_frame_set_label_widget (GTK_FRAME (patch_sm_frame), label86);
-  gtk_misc_set_padding (GTK_MISC (label86), 4, 4);
-
-  frame13 = gtk_frame_new (NULL);
-  gtk_widget_show (frame13);
-  gtk_box_pack_start (GTK_BOX (vbox6), frame13, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame13), 4);
-
-  alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment14);
-  gtk_container_add (GTK_CONTAINER (frame13), alignment14);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 0, 12, 0);
-
-  table5 = gtk_table_new (4, 3, FALSE);
-  gtk_widget_show (table5);
-  gtk_container_add (GTK_CONTAINER (alignment14), table5);
-  gtk_table_set_row_spacings (GTK_TABLE (table5), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table5), 2);
-
-  patch_x1_label = gtk_label_new (_("Center - X"));
-  gtk_widget_show (patch_x1_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_x1_label, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_x1_label), 0.1, 0.5);
-
-  patch_y1_label = gtk_label_new (_("Center - Y"));
-  gtk_widget_show (patch_y1_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_y1_label, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_y1_label), 0.1, 0.5);
-
-  patch_z1_label = gtk_label_new (_("Center - Z"));
-  gtk_widget_show (patch_z1_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_z1_label, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_z1_label), 0.1, 0.5);
-
-  patch_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_x1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_x1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x1_spinbutton), TRUE);
-
-  patch_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_y1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_y1_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y1_spinbutton), TRUE);
-
-  patch_z1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_z1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_z1_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z1_spinbutton), TRUE);
-
-  patch_x2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_x2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_x2_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x2_spinbutton), TRUE);
-
-  patch_y2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_y2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_y2_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y2_spinbutton), TRUE);
-
-  patch_z2_spinbutton_adj = gtk_adjustment_new (0.10000000149, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_z2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table5), patch_z2_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z2_spinbutton), TRUE);
-
-  patch_x2_label = gtk_label_new (_("Normal - Elev."));
-  gtk_widget_show (patch_x2_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_x2_label, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_x2_label), 0.1, 0.5);
-
-  patch_y2_label = gtk_label_new (_("Normal - Azim."));
-  gtk_widget_show (patch_y2_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_y2_label, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_y2_label), 0.1, 0.5);
-
-  patch_z2_label = gtk_label_new (_("Patch Area"));
-  gtk_widget_show (patch_z2_label);
-  gtk_table_attach (GTK_TABLE (table5), patch_z2_label, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (patch_z2_label), 0.1, 0.5);
-
-  label46 = gtk_label_new (_("SP/SM Cards"));
-  gtk_widget_show (label46);
-  gtk_frame_set_label_widget (GTK_FRAME (frame13), label46);
-  gtk_misc_set_padding (GTK_MISC (label46), 4, 4);
-
-  patch_sc_frame = gtk_frame_new (NULL);
-  gtk_widget_show (patch_sc_frame);
-  gtk_box_pack_start (GTK_BOX (vbox6), patch_sc_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_sc_frame), 4);
-
-  alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment15);
-  gtk_container_add (GTK_CONTAINER (patch_sc_frame), alignment15);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 12, 0);
-
-  vbox7 = gtk_vbox_new (FALSE, 2);
-  gtk_widget_show (vbox7);
-  gtk_container_add (GTK_CONTAINER (alignment15), vbox7);
-
-  table6 = gtk_table_new (2, 3, FALSE);
-  gtk_widget_show (table6);
-  gtk_box_pack_start (GTK_BOX (vbox7), table6, TRUE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table6), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table6), 2);
-
-  patch_x3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_x3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_x3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table6), patch_x3_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x3_spinbutton), TRUE);
-
-  patch_y3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_y3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_y3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table6), patch_y3_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y3_spinbutton), TRUE);
-
-  patch_z3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_z3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_z3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table6), patch_z3_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z3_spinbutton), TRUE);
-
-  label54 = gtk_label_new (_("Corner 3 - X"));
-  gtk_widget_show (label54);
-  gtk_table_attach (GTK_TABLE (table6), label54, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label54), 0.1, 0.5);
-
-  label57 = gtk_label_new (_("Corner 3 - Y"));
-  gtk_widget_show (label57);
-  gtk_table_attach (GTK_TABLE (table6), label57, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label57), 0.1, 0.5);
-
-  label58 = gtk_label_new (_("Corner 3 - Z"));
-  gtk_widget_show (label58);
-  gtk_table_attach (GTK_TABLE (table6), label58, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label58), 0.1, 0.5);
-
-  patch_sc_table = gtk_table_new (2, 3, FALSE);
-  gtk_widget_show (patch_sc_table);
-  gtk_box_pack_start (GTK_BOX (vbox7), patch_sc_table, TRUE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (patch_sc_table), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (patch_sc_table), 2);
-
-  patch_x4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_x4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_x4_spinbutton);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_x4_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x4_spinbutton), TRUE);
-
-  patch_y4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_y4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_y4_spinbutton);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_y4_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y4_spinbutton), TRUE);
-
-  patch_z4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  patch_z4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (patch_z4_spinbutton);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_z4_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z4_spinbutton), TRUE);
-
-  label55 = gtk_label_new (_("Corner 4 - X"));
-  gtk_widget_show (label55);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), label55, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label55), 0.1, 0.5);
-
-  label56 = gtk_label_new (_("Corner 4 - Y"));
-  gtk_widget_show (label56);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), label56, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label56), 0.1, 0.5);
-
-  label59 = gtk_label_new (_("Corner 4 - Z"));
-  gtk_widget_show (label59);
-  gtk_table_attach (GTK_TABLE (patch_sc_table), label59, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label59), 0.1, 0.5);
-
-  label47 = gtk_label_new (_("SC Card"));
-  gtk_widget_show (label47);
-  gtk_frame_set_label_widget (GTK_FRAME (patch_sc_frame), label47);
-  gtk_misc_set_padding (GTK_MISC (label47), 4, 4);
-
-  hbox23 = gtk_hbox_new (TRUE, 2);
-  gtk_widget_show (hbox23);
-  gtk_box_pack_start (GTK_BOX (vbox6), hbox23, TRUE, TRUE, 0);
-
-  patch_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (patch_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox23), patch_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_new_button), 2);
-
-  patch_cancel_button = gtk_button_new ();
-  gtk_widget_show (patch_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox23), patch_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_cancel_button), 2);
-
-  alignment51 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment51);
-  gtk_container_add (GTK_CONTAINER (patch_cancel_button), alignment51);
-
-  hbox49 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox49);
-  gtk_container_add (GTK_CONTAINER (alignment51), hbox49);
-
-  image71 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image71);
-  gtk_box_pack_start (GTK_BOX (hbox49), image71, FALSE, FALSE, 0);
-
-  label223 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label223);
-  gtk_box_pack_start (GTK_BOX (hbox49), label223, FALSE, FALSE, 0);
-
-  patch_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (patch_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox23), patch_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_apply_button), 2);
-
-  patch_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (patch_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox23), patch_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (patch_ok_button), 2);
-
-  g_signal_connect ((gpointer) patch_editor, "destroy",
-                    G_CALLBACK (on_patch_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) patch_arbitrary_radiobutton, "toggled",
-                    G_CALLBACK (on_patch_arbitrary_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) patch_rectangular_radiobutton, "toggled",
-                    G_CALLBACK (on_patch_rectangular_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) patch_triangular_radiobutton, "toggled",
-                    G_CALLBACK (on_patch_triangular_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) patch_quadrilateral_radiobutton, "toggled",
-                    G_CALLBACK (on_patch_quadrilateral_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) patch_surface_radiobutton, "toggled",
-                    G_CALLBACK (on_patch_surface_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) patch_nx_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_ny_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_x1_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_y1_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_z1_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_x2_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_y2_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_z2_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_x3_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_y3_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_z3_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_x4_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_y4_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_z4_spinbutton, "value_changed",
-                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) patch_new_button, "clicked",
-                    G_CALLBACK (on_patch_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) patch_cancel_button, "clicked",
-                    G_CALLBACK (on_patch_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) patch_apply_button, "clicked",
-                    G_CALLBACK (on_patch_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) patch_ok_button, "clicked",
-                    G_CALLBACK (on_patch_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (patch_editor, patch_editor, "patch_editor");
-  GLADE_HOOKUP_OBJECT (patch_editor, vbox6, "vbox6");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_type_frame, "patch_type_frame");
-  GLADE_HOOKUP_OBJECT (patch_editor, alignment13, "alignment13");
-  GLADE_HOOKUP_OBJECT (patch_editor, hbox22, "hbox22");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_arbitrary_radiobutton, "patch_arbitrary_radiobutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_rectangular_radiobutton, "patch_rectangular_radiobutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_triangular_radiobutton, "patch_triangular_radiobutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_quadrilateral_radiobutton, "patch_quadrilateral_radiobutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_surface_radiobutton, "patch_surface_radiobutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, label45, "label45");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_sm_frame, "patch_sm_frame");
-  GLADE_HOOKUP_OBJECT (patch_editor, alignment18, "alignment18");
-  GLADE_HOOKUP_OBJECT (patch_editor, table10, "table10");
-  GLADE_HOOKUP_OBJECT (patch_editor, label87, "label87");
-  GLADE_HOOKUP_OBJECT (patch_editor, label88, "label88");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_nx_spinbutton, "patch_nx_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_ny_spinbutton, "patch_ny_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, label86, "label86");
-  GLADE_HOOKUP_OBJECT (patch_editor, frame13, "frame13");
-  GLADE_HOOKUP_OBJECT (patch_editor, alignment14, "alignment14");
-  GLADE_HOOKUP_OBJECT (patch_editor, table5, "table5");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_label, "patch_x1_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_label, "patch_y1_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_label, "patch_z1_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_spinbutton, "patch_x1_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_spinbutton, "patch_y1_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_spinbutton, "patch_z1_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_spinbutton, "patch_x2_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_spinbutton, "patch_y2_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_spinbutton, "patch_z2_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_label, "patch_x2_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_label, "patch_y2_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_label, "patch_z2_label");
-  GLADE_HOOKUP_OBJECT (patch_editor, label46, "label46");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_frame, "patch_sc_frame");
-  GLADE_HOOKUP_OBJECT (patch_editor, alignment15, "alignment15");
-  GLADE_HOOKUP_OBJECT (patch_editor, vbox7, "vbox7");
-  GLADE_HOOKUP_OBJECT (patch_editor, table6, "table6");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x3_spinbutton, "patch_x3_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y3_spinbutton, "patch_y3_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z3_spinbutton, "patch_z3_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, label54, "label54");
-  GLADE_HOOKUP_OBJECT (patch_editor, label57, "label57");
-  GLADE_HOOKUP_OBJECT (patch_editor, label58, "label58");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_table, "patch_sc_table");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_x4_spinbutton, "patch_x4_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_y4_spinbutton, "patch_y4_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_z4_spinbutton, "patch_z4_spinbutton");
-  GLADE_HOOKUP_OBJECT (patch_editor, label55, "label55");
-  GLADE_HOOKUP_OBJECT (patch_editor, label56, "label56");
-  GLADE_HOOKUP_OBJECT (patch_editor, label59, "label59");
-  GLADE_HOOKUP_OBJECT (patch_editor, label47, "label47");
-  GLADE_HOOKUP_OBJECT (patch_editor, hbox23, "hbox23");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_new_button, "patch_new_button");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_cancel_button, "patch_cancel_button");
-  GLADE_HOOKUP_OBJECT (patch_editor, alignment51, "alignment51");
-  GLADE_HOOKUP_OBJECT (patch_editor, hbox49, "hbox49");
-  GLADE_HOOKUP_OBJECT (patch_editor, image71, "image71");
-  GLADE_HOOKUP_OBJECT (patch_editor, label223, "label223");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_apply_button, "patch_apply_button");
-  GLADE_HOOKUP_OBJECT (patch_editor, patch_ok_button, "patch_ok_button");
-
-  return patch_editor;
-}
-
-GtkWidget*
-create_arc_editor (void)
-{
-  GtkWidget *arc_editor;
-  GtkWidget *vbox8;
-  GtkWidget *frame14;
-  GtkWidget *alignment16;
-  GtkWidget *table7;
-  GtkWidget *label66;
-  GtkWidget *label67;
-  GtkObject *arc_end1_spinbutton_adj;
-  GtkWidget *arc_end1_spinbutton;
-  GtkObject *arc_end2_spinbutton_adj;
-  GtkWidget *arc_end2_spinbutton;
-  GtkObject *arc_tagnum_spinbutton_adj;
-  GtkWidget *arc_tagnum_spinbutton;
-  GtkObject *arc_numseg_spinbutton_adj;
-  GtkWidget *arc_numseg_spinbutton;
-  GtkWidget *label63;
-  GtkWidget *label64;
-  GtkWidget *label65;
-  GtkObject *arc_rad_spinbutton_adj;
-  GtkWidget *arc_rad_spinbutton;
-  GtkWidget *label69;
-  GtkObject *arc_pcl_spinbutton_adj;
-  GtkWidget *arc_pcl_spinbutton;
-  GtkObject *arc_res_spinbutton_adj;
-  GtkWidget *arc_res_spinbutton;
-  GtkWidget *label70;
-  GtkWidget *label68;
-  GtkObject *arc_dia_spinbutton_adj;
-  GtkWidget *arc_dia_spinbutton;
-  GtkWidget *label60;
-  GtkWidget *hbox24;
-  GtkWidget *arc_new_button;
-  GtkWidget *arc_cancel_button;
-  GtkWidget *alignment52;
-  GtkWidget *hbox50;
-  GtkWidget *image72;
-  GtkWidget *label224;
-  GtkWidget *arc_apply_button;
-  GtkWidget *arc_ok_buttonbutton;
-
-  arc_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (arc_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (arc_editor), _("Arc Element (GA card)"));
-  gtk_window_set_destroy_with_parent (GTK_WINDOW (arc_editor), TRUE);
-
-  vbox8 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox8);
-  gtk_container_add (GTK_CONTAINER (arc_editor), vbox8);
-
-  frame14 = gtk_frame_new (NULL);
-  gtk_widget_show (frame14);
-  gtk_box_pack_start (GTK_BOX (vbox8), frame14, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame14), 4);
-
-  alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment16);
-  gtk_container_add (GTK_CONTAINER (frame14), alignment16);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0);
-
-  table7 = gtk_table_new (4, 4, FALSE);
-  gtk_widget_show (table7);
-  gtk_container_add (GTK_CONTAINER (alignment16), table7);
-  gtk_table_set_row_spacings (GTK_TABLE (table7), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table7), 2);
-
-  label66 = gtk_label_new (_("End 1 Angle"));
-  gtk_widget_show (label66);
-  gtk_table_attach (GTK_TABLE (table7), label66, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label66), 0.1, 0.5);
-
-  label67 = gtk_label_new (_("End 2 Angle"));
-  gtk_widget_show (label67);
-  gtk_table_attach (GTK_TABLE (table7), label67, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label67), 0.1, 0.5);
-
-  arc_end1_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 9.99999974738e-06, 10, 0);
-  arc_end1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_end1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_end1_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end1_spinbutton), TRUE);
-
-  arc_end2_spinbutton_adj = gtk_adjustment_new (135, -360, 360, 9.99999974738e-06, 10, 0);
-  arc_end2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_end2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_end2_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end2_spinbutton), TRUE);
-
-  arc_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
-  arc_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_tagnum_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (arc_tagnum_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_tagnum_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_tagnum_spinbutton), TRUE);
-
-  arc_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
-  arc_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_numseg_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (arc_numseg_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_numseg_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_numseg_spinbutton), TRUE);
-
-  label63 = gtk_label_new (_("Tag Number"));
-  gtk_widget_show (label63);
-  gtk_table_attach (GTK_TABLE (table7), label63, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label63), 0.1, 0.5);
-
-  label64 = gtk_label_new (_("No. Segments"));
-  gtk_widget_show (label64);
-  gtk_table_attach (GTK_TABLE (table7), label64, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label64), 0.1, 0.5);
-
-  label65 = gtk_label_new (_("Radius from Y"));
-  gtk_widget_show (label65);
-  gtk_table_attach (GTK_TABLE (table7), label65, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label65), 0.1, 0.5);
-
-  arc_rad_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  arc_rad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_rad_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_rad_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_rad_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_rad_spinbutton), TRUE);
-
-  label69 = gtk_label_new (_("Segs % lambda"));
-  gtk_widget_show (label69);
-  gtk_table_attach (GTK_TABLE (table7), label69, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label69), 0.1, 0.5);
-
-  arc_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
-  arc_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_pcl_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_pcl_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_pcl_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_pcl_spinbutton), TRUE);
-
-  arc_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
-  arc_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_res_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_res_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_res_spinbutton, 3, 4, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_res_spinbutton), TRUE);
-
-  label70 = gtk_label_new (_("Conductivity S/m"));
-  gtk_widget_show (label70);
-  gtk_table_attach (GTK_TABLE (table7), label70, 3, 4, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label70), 0.1, 0.5);
-
-  label68 = gtk_label_new (_("Wire Diameter"));
-  gtk_widget_show (label68);
-  gtk_table_attach (GTK_TABLE (table7), label68, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label68), 0.1, 0.5);
-
-  arc_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
-  arc_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_dia_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (arc_dia_spinbutton);
-  gtk_table_attach (GTK_TABLE (table7), arc_dia_spinbutton, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_dia_spinbutton), TRUE);
-
-  label60 = gtk_label_new (_("Wire Arc Data"));
-  gtk_widget_show (label60);
-  gtk_frame_set_label_widget (GTK_FRAME (frame14), label60);
-  gtk_misc_set_padding (GTK_MISC (label60), 4, 4);
-
-  hbox24 = gtk_hbox_new (TRUE, 2);
-  gtk_widget_show (hbox24);
-  gtk_box_pack_start (GTK_BOX (vbox8), hbox24, TRUE, TRUE, 0);
-
-  arc_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (arc_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox24), arc_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (arc_new_button), 2);
-
-  arc_cancel_button = gtk_button_new ();
-  gtk_widget_show (arc_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox24), arc_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (arc_cancel_button), 2);
-
-  alignment52 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment52);
-  gtk_container_add (GTK_CONTAINER (arc_cancel_button), alignment52);
-
-  hbox50 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox50);
-  gtk_container_add (GTK_CONTAINER (alignment52), hbox50);
-
-  image72 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image72);
-  gtk_box_pack_start (GTK_BOX (hbox50), image72, FALSE, FALSE, 0);
-
-  label224 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label224);
-  gtk_box_pack_start (GTK_BOX (hbox50), label224, FALSE, FALSE, 0);
-
-  arc_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (arc_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox24), arc_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (arc_apply_button), 2);
-
-  arc_ok_buttonbutton = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (arc_ok_buttonbutton);
-  gtk_box_pack_start (GTK_BOX (hbox24), arc_ok_buttonbutton, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (arc_ok_buttonbutton), 2);
-
-  g_signal_connect ((gpointer) arc_editor, "destroy",
-                    G_CALLBACK (on_arc_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) arc_end1_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_end2_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_tagnum_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_tagnum_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_numseg_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_rad_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_pcl_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_pcl_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_res_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_res_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_dia_spinbutton, "value_changed",
-                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) arc_new_button, "clicked",
-                    G_CALLBACK (on_arc_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) arc_cancel_button, "clicked",
-                    G_CALLBACK (on_arc_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) arc_apply_button, "clicked",
-                    G_CALLBACK (on_arc_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) arc_ok_buttonbutton, "clicked",
-                    G_CALLBACK (on_arc_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (arc_editor, arc_editor, "arc_editor");
-  GLADE_HOOKUP_OBJECT (arc_editor, vbox8, "vbox8");
-  GLADE_HOOKUP_OBJECT (arc_editor, frame14, "frame14");
-  GLADE_HOOKUP_OBJECT (arc_editor, alignment16, "alignment16");
-  GLADE_HOOKUP_OBJECT (arc_editor, table7, "table7");
-  GLADE_HOOKUP_OBJECT (arc_editor, label66, "label66");
-  GLADE_HOOKUP_OBJECT (arc_editor, label67, "label67");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_end1_spinbutton, "arc_end1_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_end2_spinbutton, "arc_end2_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_tagnum_spinbutton, "arc_tagnum_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_numseg_spinbutton, "arc_numseg_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, label63, "label63");
-  GLADE_HOOKUP_OBJECT (arc_editor, label64, "label64");
-  GLADE_HOOKUP_OBJECT (arc_editor, label65, "label65");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_rad_spinbutton, "arc_rad_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, label69, "label69");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_pcl_spinbutton, "arc_pcl_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_res_spinbutton, "arc_res_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, label70, "label70");
-  GLADE_HOOKUP_OBJECT (arc_editor, label68, "label68");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_dia_spinbutton, "arc_dia_spinbutton");
-  GLADE_HOOKUP_OBJECT (arc_editor, label60, "label60");
-  GLADE_HOOKUP_OBJECT (arc_editor, hbox24, "hbox24");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_new_button, "arc_new_button");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_cancel_button, "arc_cancel_button");
-  GLADE_HOOKUP_OBJECT (arc_editor, alignment52, "alignment52");
-  GLADE_HOOKUP_OBJECT (arc_editor, hbox50, "hbox50");
-  GLADE_HOOKUP_OBJECT (arc_editor, image72, "image72");
-  GLADE_HOOKUP_OBJECT (arc_editor, label224, "label224");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_apply_button, "arc_apply_button");
-  GLADE_HOOKUP_OBJECT (arc_editor, arc_ok_buttonbutton, "arc_ok_buttonbutton");
-
-  return arc_editor;
-}
-
-GtkWidget*
-create_transform_editor (void)
-{
-  GtkWidget *transform_editor;
-  GtkWidget *vbox9;
-  GtkWidget *frame15;
-  GtkWidget *alignment17;
-  GtkWidget *table8;
-  GtkWidget *label62;
-  GtkWidget *label98;
-  GtkWidget *label99;
-  GtkWidget *label100;
-  GtkWidget *label101;
-  GtkWidget *label102;
-  GtkWidget *label103;
-  GtkWidget *label104;
-  GtkWidget *label105;
-  GtkObject *transform_my_spinbutton_adj;
-  GtkWidget *transform_my_spinbutton;
-  GtkObject *transform_mx_spinbutton_adj;
-  GtkWidget *transform_mx_spinbutton;
-  GtkObject *transform_mz_spinbutton_adj;
-  GtkWidget *transform_mz_spinbutton;
-  GtkObject *transform_rx_spinbutton_adj;
-  GtkWidget *transform_rx_spinbutton;
-  GtkObject *transform_taginc_spinbutton_adj;
-  GtkWidget *transform_taginc_spinbutton;
-  GtkObject *transform_new_spinbutton_adj;
-  GtkWidget *transform_new_spinbutton;
-  GtkObject *transform_start_spinbutton_adj;
-  GtkWidget *transform_start_spinbutton;
-  GtkObject *transform_ry_spinbutton_adj;
-  GtkWidget *transform_ry_spinbutton;
-  GtkObject *transform_rz_spinbutton_adj;
-  GtkWidget *transform_rz_spinbutton;
-  GtkWidget *label61;
-  GtkWidget *hbox25;
-  GtkWidget *transform_new_button;
-  GtkWidget *transform_cancel_button;
-  GtkWidget *alignment53;
-  GtkWidget *hbox51;
-  GtkWidget *image73;
-  GtkWidget *label225;
-  GtkWidget *transform_apply_button;
-  GtkWidget *transform_ok_button;
-
-  transform_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (transform_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (transform_editor), _("Co-ordinate Transformation (GM card)"));
-
-  vbox9 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox9);
-  gtk_container_add (GTK_CONTAINER (transform_editor), vbox9);
-
-  frame15 = gtk_frame_new (NULL);
-  gtk_widget_show (frame15);
-  gtk_box_pack_start (GTK_BOX (vbox9), frame15, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame15), 4);
-
-  alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment17);
-  gtk_container_add (GTK_CONTAINER (frame15), alignment17);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment17), 0, 0, 12, 0);
-
-  table8 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_show (table8);
-  gtk_container_add (GTK_CONTAINER (alignment17), table8);
-  gtk_table_set_row_spacings (GTK_TABLE (table8), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table8), 2);
-
-  label62 = gtk_label_new (_("Tag Increment"));
-  gtk_widget_show (label62);
-  gtk_table_attach (GTK_TABLE (table8), label62, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label62), 0.1, 0.5);
-
-  label98 = gtk_label_new (_("New Structures"));
-  gtk_widget_show (label98);
-  gtk_table_attach (GTK_TABLE (table8), label98, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label98), 0.1, 0.5);
-
-  label99 = gtk_label_new (_("Start From Tag"));
-  gtk_widget_show (label99);
-  gtk_table_attach (GTK_TABLE (table8), label99, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label99), 0.1, 0.5);
-
-  label100 = gtk_label_new (_("Rotate about X"));
-  gtk_widget_show (label100);
-  gtk_table_attach (GTK_TABLE (table8), label100, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label100), 0.1, 0.5);
-
-  label101 = gtk_label_new (_("Rotate about Y"));
-  gtk_widget_show (label101);
-  gtk_table_attach (GTK_TABLE (table8), label101, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label101), 0.1, 0.5);
-
-  label102 = gtk_label_new (_("Rotate about Z"));
-  gtk_widget_show (label102);
-  gtk_table_attach (GTK_TABLE (table8), label102, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label102), 0.1, 0.5);
-
-  label103 = gtk_label_new (_("Move along X"));
-  gtk_widget_show (label103);
-  gtk_table_attach (GTK_TABLE (table8), label103, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label103), 0.1, 0.5);
-
-  label104 = gtk_label_new (_("Move along Y"));
-  gtk_widget_show (label104);
-  gtk_table_attach (GTK_TABLE (table8), label104, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label104), 0.1, 0.5);
-
-  label105 = gtk_label_new (_("Move along Z"));
-  gtk_widget_show (label105);
-  gtk_table_attach (GTK_TABLE (table8), label105, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label105), 0.1, 0.5);
-
-  transform_my_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  transform_my_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_my_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_my_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_my_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_my_spinbutton), TRUE);
-
-  transform_mx_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  transform_mx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mx_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_mx_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_mx_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mx_spinbutton), TRUE);
-
-  transform_mz_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  transform_mz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mz_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_mz_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_mz_spinbutton, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mz_spinbutton), TRUE);
-
-  transform_rx_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
-  transform_rx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rx_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_rx_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_rx_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rx_spinbutton), TRUE);
-
-  transform_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  transform_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_taginc_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (transform_taginc_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_taginc_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_taginc_spinbutton), TRUE);
-
-  transform_new_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  transform_new_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_new_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (transform_new_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_new_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_new_spinbutton), TRUE);
-
-  transform_start_spinbutton_adj = gtk_adjustment_new (0, 0, 10000, 1, 10, 0);
-  transform_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_start_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (transform_start_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_start_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_start_spinbutton), TRUE);
-
-  transform_ry_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
-  transform_ry_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_ry_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_ry_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_ry_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_ry_spinbutton), TRUE);
-
-  transform_rz_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
-  transform_rz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rz_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (transform_rz_spinbutton);
-  gtk_table_attach (GTK_TABLE (table8), transform_rz_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rz_spinbutton), TRUE);
-
-  label61 = gtk_label_new (_("Co-ordinate Transformation Data"));
-  gtk_widget_show (label61);
-  gtk_frame_set_label_widget (GTK_FRAME (frame15), label61);
-  gtk_misc_set_padding (GTK_MISC (label61), 4, 4);
-
-  hbox25 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox25);
-  gtk_box_pack_start (GTK_BOX (vbox9), hbox25, TRUE, TRUE, 0);
-
-  transform_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (transform_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox25), transform_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (transform_new_button), 2);
-
-  transform_cancel_button = gtk_button_new ();
-  gtk_widget_show (transform_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox25), transform_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (transform_cancel_button), 2);
-
-  alignment53 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment53);
-  gtk_container_add (GTK_CONTAINER (transform_cancel_button), alignment53);
-
-  hbox51 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox51);
-  gtk_container_add (GTK_CONTAINER (alignment53), hbox51);
-
-  image73 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image73);
-  gtk_box_pack_start (GTK_BOX (hbox51), image73, FALSE, FALSE, 0);
-
-  label225 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label225);
-  gtk_box_pack_start (GTK_BOX (hbox51), label225, FALSE, FALSE, 0);
-
-  transform_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (transform_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox25), transform_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (transform_apply_button), 2);
-
-  transform_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (transform_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox25), transform_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (transform_ok_button), 2);
-
-  g_signal_connect ((gpointer) transform_editor, "destroy",
-                    G_CALLBACK (on_transform_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) transform_my_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_mx_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_mz_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_rx_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_taginc_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_new_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_start_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_ry_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_rz_spinbutton, "value_changed",
-                    G_CALLBACK (on_transform_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) transform_new_button, "clicked",
-                    G_CALLBACK (on_transform_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) transform_cancel_button, "clicked",
-                    G_CALLBACK (on_transform_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) transform_apply_button, "clicked",
-                    G_CALLBACK (on_transform_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) transform_ok_button, "clicked",
-                    G_CALLBACK (on_transform_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (transform_editor, transform_editor, "transform_editor");
-  GLADE_HOOKUP_OBJECT (transform_editor, vbox9, "vbox9");
-  GLADE_HOOKUP_OBJECT (transform_editor, frame15, "frame15");
-  GLADE_HOOKUP_OBJECT (transform_editor, alignment17, "alignment17");
-  GLADE_HOOKUP_OBJECT (transform_editor, table8, "table8");
-  GLADE_HOOKUP_OBJECT (transform_editor, label62, "label62");
-  GLADE_HOOKUP_OBJECT (transform_editor, label98, "label98");
-  GLADE_HOOKUP_OBJECT (transform_editor, label99, "label99");
-  GLADE_HOOKUP_OBJECT (transform_editor, label100, "label100");
-  GLADE_HOOKUP_OBJECT (transform_editor, label101, "label101");
-  GLADE_HOOKUP_OBJECT (transform_editor, label102, "label102");
-  GLADE_HOOKUP_OBJECT (transform_editor, label103, "label103");
-  GLADE_HOOKUP_OBJECT (transform_editor, label104, "label104");
-  GLADE_HOOKUP_OBJECT (transform_editor, label105, "label105");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_my_spinbutton, "transform_my_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_mx_spinbutton, "transform_mx_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_mz_spinbutton, "transform_mz_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_rx_spinbutton, "transform_rx_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_taginc_spinbutton, "transform_taginc_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_spinbutton, "transform_new_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_start_spinbutton, "transform_start_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_ry_spinbutton, "transform_ry_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_rz_spinbutton, "transform_rz_spinbutton");
-  GLADE_HOOKUP_OBJECT (transform_editor, label61, "label61");
-  GLADE_HOOKUP_OBJECT (transform_editor, hbox25, "hbox25");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_button, "transform_new_button");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_cancel_button, "transform_cancel_button");
-  GLADE_HOOKUP_OBJECT (transform_editor, alignment53, "alignment53");
-  GLADE_HOOKUP_OBJECT (transform_editor, hbox51, "hbox51");
-  GLADE_HOOKUP_OBJECT (transform_editor, image73, "image73");
-  GLADE_HOOKUP_OBJECT (transform_editor, label225, "label225");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_apply_button, "transform_apply_button");
-  GLADE_HOOKUP_OBJECT (transform_editor, transform_ok_button, "transform_ok_button");
-
-  return transform_editor;
-}
-
-GtkWidget*
-create_helix_editor (void)
-{
-  GtkWidget *helix_editor;
-  GtkWidget *vbox10;
-  GtkWidget *frame16;
-  GtkWidget *table9;
-  GtkWidget *label72;
-  GtkWidget *label73;
-  GtkWidget *label75;
-  GtkWidget *label76;
-  GtkObject *helix_tagnum_spinbutton_adj;
-  GtkWidget *helix_tagnum_spinbutton;
-  GtkObject *helix_numseg_spinbutton_adj;
-  GtkWidget *helix_numseg_spinbutton;
-  GtkObject *helix_pcl_spinbutton_adj;
-  GtkWidget *helix_pcl_spinbutton;
-  GtkObject *helix_tspace_spinbutton_adj;
-  GtkWidget *helix_tspace_spinbutton;
-  GtkObject *helix_len_spinbutton_adj;
-  GtkWidget *helix_len_spinbutton;
-  GtkWidget *label81;
-  GtkObject *helix_nturns_spinbutton_adj;
-  GtkWidget *helix_nturns_spinbutton;
-  GtkWidget *label82;
-  GtkWidget *helix_linkzo_radiobutton;
-  GSList *helix_linkzo_radiobutton_group = NULL;
-  GtkWidget *helix_linkzhl_radiobutton;
-  GtkWidget *helix_linkall_radiobutton;
-  GtkWidget *helix_lh_checkbutton;
-  GtkObject *helix_dia_spinbutton_adj;
-  GtkWidget *helix_dia_spinbutton;
-  GtkObject *helix_res_spinbutton_adj;
-  GtkWidget *helix_res_spinbutton;
-  GtkWidget *label80;
-  GtkWidget *label84;
-  GtkObject *helix_radyzhl_spinbutton_adj;
-  GtkWidget *helix_radyzhl_spinbutton;
-  GtkWidget *label79;
-  GtkWidget *label83;
-  GtkObject *helix_radyzo_spinbutton_adj;
-  GtkWidget *helix_radyzo_spinbutton;
-  GtkWidget *label78;
-  GtkObject *helix_radxzhl_spinbutton_adj;
-  GtkWidget *helix_radxzhl_spinbutton;
-  GtkWidget *label77;
-  GtkObject *helix_radxzo_spinbutton_adj;
-  GtkWidget *helix_radxzo_spinbutton;
-  GtkWidget *label85;
-  GtkWidget *hbox26;
-  GtkWidget *helix_new_button;
-  GtkWidget *helix_cancel_button;
-  GtkWidget *alignment54;
-  GtkWidget *hbox52;
-  GtkWidget *image74;
-  GtkWidget *label226;
-  GtkWidget *helix_apply_button;
-  GtkWidget *helix_ok_button;
-
-  helix_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (helix_editor), _("Helical Element (GA card)"));
-
-  vbox10 = gtk_vbox_new (FALSE, 2);
-  gtk_widget_show (vbox10);
-  gtk_container_add (GTK_CONTAINER (helix_editor), vbox10);
-
-  frame16 = gtk_frame_new (NULL);
-  gtk_widget_show (frame16);
-  gtk_box_pack_start (GTK_BOX (vbox10), frame16, TRUE, TRUE, 2);
-  gtk_container_set_border_width (GTK_CONTAINER (frame16), 4);
-
-  table9 = gtk_table_new (7, 4, FALSE);
-  gtk_widget_show (table9);
-  gtk_container_add (GTK_CONTAINER (frame16), table9);
-  gtk_table_set_row_spacings (GTK_TABLE (table9), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table9), 2);
-
-  label72 = gtk_label_new (_("Segments/Turn"));
-  gtk_widget_show (label72);
-  gtk_table_attach (GTK_TABLE (table9), label72, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label72), 0.1, 0.5);
-
-  label73 = gtk_label_new (_("Segs % lambda"));
-  gtk_widget_show (label73);
-  gtk_table_attach (GTK_TABLE (table9), label73, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label73), 0.1, 0.5);
-
-  label75 = gtk_label_new (_("Turns Spacing"));
-  gtk_widget_show (label75);
-  gtk_table_attach (GTK_TABLE (table9), label75, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label75), 0.1, 0.5);
-
-  label76 = gtk_label_new (_("Helix Length"));
-  gtk_widget_show (label76);
-  gtk_table_attach (GTK_TABLE (table9), label76, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  GTK_WIDGET_SET_FLAGS (label76, GTK_CAN_FOCUS);
-  gtk_label_set_selectable (GTK_LABEL (label76), TRUE);
-  gtk_misc_set_alignment (GTK_MISC (label76), 0.1, 0.5);
-
-  helix_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
-  helix_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tagnum_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (helix_tagnum_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_tagnum_spinbutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tagnum_spinbutton), TRUE);
-
-  helix_numseg_spinbutton_adj = gtk_adjustment_new (8, 1, 100000, 1, 10, 0);
-  helix_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_numseg_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (helix_numseg_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_numseg_spinbutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_numseg_spinbutton), TRUE);
-
-  helix_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
-  helix_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_pcl_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_pcl_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_pcl_spinbutton, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_pcl_spinbutton), TRUE);
-
-  helix_tspace_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 9.99999974738e-06, 10, 0);
-  helix_tspace_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tspace_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_tspace_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_tspace_spinbutton, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tspace_spinbutton), TRUE);
-
-  helix_len_spinbutton_adj = gtk_adjustment_new (5, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  helix_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_len_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_len_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_len_spinbutton, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_len_spinbutton), TRUE);
-
-  label81 = gtk_label_new (_("Tag Number"));
-  gtk_widget_show (label81);
-  gtk_table_attach (GTK_TABLE (table9), label81, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label81), 0.1, 0.5);
-
-  helix_nturns_spinbutton_adj = gtk_adjustment_new (8, 0.10000000149, 10000, 9.99999974738e-06, 10, 0);
-  helix_nturns_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_nturns_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_nturns_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_nturns_spinbutton, 3, 4, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_nturns_spinbutton), TRUE);
-
-  label82 = gtk_label_new (_("Num. of Turns"));
-  gtk_widget_show (label82);
-  gtk_table_attach (GTK_TABLE (table9), label82, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label82), 0.1, 0.5);
-
-  helix_linkzo_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=0"));
-  gtk_widget_show (helix_linkzo_radiobutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_linkzo_radiobutton, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzo_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton), helix_linkzo_radiobutton_group);
-  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton));
-
-  helix_linkzhl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=HL"));
-  gtk_widget_show (helix_linkzhl_radiobutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_linkzhl_radiobutton, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzhl_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton), helix_linkzo_radiobutton_group);
-  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton));
-
-  helix_linkall_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link all Radii"));
-  gtk_widget_show (helix_linkall_radiobutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_linkall_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_linkall_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton), helix_linkzo_radiobutton_group);
-  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (helix_linkall_radiobutton), TRUE);
-
-  helix_lh_checkbutton = gtk_check_button_new_with_mnemonic (_("Left Hand"));
-  gtk_widget_show (helix_lh_checkbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_lh_checkbutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_lh_checkbutton), 2);
-
-  helix_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
-  helix_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_dia_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_dia_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_dia_spinbutton, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_dia_spinbutton), TRUE);
-
-  helix_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
-  helix_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_res_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_res_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_res_spinbutton, 3, 4, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_res_spinbutton), TRUE);
-
-  label80 = gtk_label_new (_("Wire Diameter"));
-  gtk_widget_show (label80);
-  gtk_table_attach (GTK_TABLE (table9), label80, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label80), 0.1, 0.5);
-
-  label84 = gtk_label_new (_("Conductivity S/m"));
-  gtk_widget_show (label84);
-  gtk_table_attach (GTK_TABLE (table9), label84, 3, 4, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label84), 0.1, 0.5);
-
-  helix_radyzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  helix_radyzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzhl_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_radyzhl_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_radyzhl_spinbutton, 3, 4, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzhl_spinbutton), TRUE);
-
-  label79 = gtk_label_new (_("Rad. @ Y,Z=HL"));
-  gtk_widget_show (label79);
-  gtk_table_attach (GTK_TABLE (table9), label79, 3, 4, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label79), 0.1, 0.5);
-
-  label83 = gtk_label_new (_("Radius @ Y,Z=0"));
-  gtk_widget_show (label83);
-  gtk_table_attach (GTK_TABLE (table9), label83, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label83), 0.1, 0.5);
-
-  helix_radyzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  helix_radyzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzo_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_radyzo_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_radyzo_spinbutton, 1, 2, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzo_spinbutton), TRUE);
-
-  label78 = gtk_label_new (_("Rad. @ X,Z=HL"));
-  gtk_widget_show (label78);
-  gtk_table_attach (GTK_TABLE (table9), label78, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label78), 0.1, 0.5);
-
-  helix_radxzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  helix_radxzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzhl_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_radxzhl_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_radxzhl_spinbutton, 2, 3, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzhl_spinbutton), TRUE);
-
-  label77 = gtk_label_new (_("Radius @ X,Z=0"));
-  gtk_widget_show (label77);
-  gtk_table_attach (GTK_TABLE (table9), label77, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label77), 0.1, 0.5);
-
-  helix_radxzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  helix_radxzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzo_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (helix_radxzo_spinbutton);
-  gtk_table_attach (GTK_TABLE (table9), helix_radxzo_spinbutton, 0, 1, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzo_spinbutton), TRUE);
-
-  label85 = gtk_label_new (_("GH Card"));
-  gtk_widget_show (label85);
-  gtk_frame_set_label_widget (GTK_FRAME (frame16), label85);
-  gtk_misc_set_padding (GTK_MISC (label85), 4, 4);
-
-  hbox26 = gtk_hbox_new (TRUE, 2);
-  gtk_widget_show (hbox26);
-  gtk_box_pack_start (GTK_BOX (vbox10), hbox26, TRUE, TRUE, 0);
-
-  helix_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (helix_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox26), helix_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_new_button), 2);
-  GTK_WIDGET_SET_FLAGS (helix_new_button, GTK_CAN_DEFAULT);
-
-  helix_cancel_button = gtk_button_new ();
-  gtk_widget_show (helix_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox26), helix_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_cancel_button), 2);
-  GTK_WIDGET_SET_FLAGS (helix_cancel_button, GTK_CAN_DEFAULT);
-
-  alignment54 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment54);
-  gtk_container_add (GTK_CONTAINER (helix_cancel_button), alignment54);
-
-  hbox52 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox52);
-  gtk_container_add (GTK_CONTAINER (alignment54), hbox52);
-
-  image74 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image74);
-  gtk_box_pack_start (GTK_BOX (hbox52), image74, FALSE, FALSE, 0);
-
-  label226 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label226);
-  gtk_box_pack_start (GTK_BOX (hbox52), label226, FALSE, FALSE, 0);
-
-  helix_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (helix_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox26), helix_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_apply_button), 2);
-  GTK_WIDGET_SET_FLAGS (helix_apply_button, GTK_CAN_DEFAULT);
-
-  helix_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (helix_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox26), helix_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (helix_ok_button), 2);
-  GTK_WIDGET_SET_FLAGS (helix_ok_button, GTK_CAN_DEFAULT);
-
-  g_signal_connect ((gpointer) helix_editor, "destroy",
-                    G_CALLBACK (on_helix_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) helix_tagnum_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_tagnum_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_numseg_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_pcl_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_pcl_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_tspace_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_len_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_nturns_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_nturns_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_linkzo_radiobutton, "toggled",
-                    G_CALLBACK (on_helix_linkzo_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) helix_linkzhl_radiobutton, "toggled",
-                    G_CALLBACK (on_helix_linkzhl_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) helix_linkall_radiobutton, "toggled",
-                    G_CALLBACK (on_helix_linkall_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) helix_lh_checkbutton, "toggled",
-                    G_CALLBACK (on_helix_lh_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) helix_dia_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_res_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_res_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_radyzhl_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_radyzo_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_radxzhl_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_radxzo_spinbutton, "value_changed",
-                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) helix_new_button, "clicked",
-                    G_CALLBACK (on_helix_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) helix_cancel_button, "clicked",
-                    G_CALLBACK (on_helix_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) helix_apply_button, "clicked",
-                    G_CALLBACK (on_helix_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) helix_ok_button, "clicked",
-                    G_CALLBACK (on_helix_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (helix_editor, helix_editor, "helix_editor");
-  GLADE_HOOKUP_OBJECT (helix_editor, vbox10, "vbox10");
-  GLADE_HOOKUP_OBJECT (helix_editor, frame16, "frame16");
-  GLADE_HOOKUP_OBJECT (helix_editor, table9, "table9");
-  GLADE_HOOKUP_OBJECT (helix_editor, label72, "label72");
-  GLADE_HOOKUP_OBJECT (helix_editor, label73, "label73");
-  GLADE_HOOKUP_OBJECT (helix_editor, label75, "label75");
-  GLADE_HOOKUP_OBJECT (helix_editor, label76, "label76");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_tagnum_spinbutton, "helix_tagnum_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_numseg_spinbutton, "helix_numseg_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_pcl_spinbutton, "helix_pcl_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_tspace_spinbutton, "helix_tspace_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_len_spinbutton, "helix_len_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label81, "label81");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_nturns_spinbutton, "helix_nturns_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label82, "label82");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzo_radiobutton, "helix_linkzo_radiobutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzhl_radiobutton, "helix_linkzhl_radiobutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkall_radiobutton, "helix_linkall_radiobutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_lh_checkbutton, "helix_lh_checkbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_dia_spinbutton, "helix_dia_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_res_spinbutton, "helix_res_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label80, "label80");
-  GLADE_HOOKUP_OBJECT (helix_editor, label84, "label84");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzhl_spinbutton, "helix_radyzhl_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label79, "label79");
-  GLADE_HOOKUP_OBJECT (helix_editor, label83, "label83");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzo_spinbutton, "helix_radyzo_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label78, "label78");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzhl_spinbutton, "helix_radxzhl_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label77, "label77");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzo_spinbutton, "helix_radxzo_spinbutton");
-  GLADE_HOOKUP_OBJECT (helix_editor, label85, "label85");
-  GLADE_HOOKUP_OBJECT (helix_editor, hbox26, "hbox26");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_new_button, "helix_new_button");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_cancel_button, "helix_cancel_button");
-  GLADE_HOOKUP_OBJECT (helix_editor, alignment54, "alignment54");
-  GLADE_HOOKUP_OBJECT (helix_editor, hbox52, "hbox52");
-  GLADE_HOOKUP_OBJECT (helix_editor, image74, "image74");
-  GLADE_HOOKUP_OBJECT (helix_editor, label226, "label226");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_apply_button, "helix_apply_button");
-  GLADE_HOOKUP_OBJECT (helix_editor, helix_ok_button, "helix_ok_button");
-
-  return helix_editor;
-}
-
-GtkWidget*
-create_reflect_editor (void)
-{
-  GtkWidget *reflect_editor;
-  GtkWidget *vbox11;
-  GtkWidget *frame17;
-  GtkWidget *alignment19;
-  GtkWidget *table11;
-  GtkWidget *reflect_y_checkbutton;
-  GtkObject *reflect_taginc_spinbutton_adj;
-  GtkWidget *reflect_taginc_spinbutton;
-  GtkWidget *reflect_z_checkbutton;
-  GtkWidget *reflect_x_checkbutton;
-  GtkWidget *label91;
-  GtkWidget *label90;
-  GtkWidget *hbox27;
-  GtkWidget *reflect_new_button;
-  GtkWidget *reflect_cancel_button;
-  GtkWidget *alignment55;
-  GtkWidget *hbox53;
-  GtkWidget *image75;
-  GtkWidget *label227;
-  GtkWidget *reflect_apply_button;
-  GtkWidget *reflect_ok_button;
-
-  reflect_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (reflect_editor), _("Reflect Structure (GX card)"));
-
-  vbox11 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox11);
-  gtk_container_add (GTK_CONTAINER (reflect_editor), vbox11);
-
-  frame17 = gtk_frame_new (NULL);
-  gtk_widget_show (frame17);
-  gtk_box_pack_start (GTK_BOX (vbox11), frame17, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame17), 4);
-
-  alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment19);
-  gtk_container_add (GTK_CONTAINER (frame17), alignment19);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 0, 0, 12, 0);
-
-  table11 = gtk_table_new (3, 2, FALSE);
-  gtk_widget_show (table11);
-  gtk_container_add (GTK_CONTAINER (alignment19), table11);
-  gtk_table_set_row_spacings (GTK_TABLE (table11), 8);
-  gtk_table_set_col_spacings (GTK_TABLE (table11), 8);
-
-  reflect_y_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XZ plane"));
-  gtk_widget_show (reflect_y_checkbutton);
-  gtk_table_attach (GTK_TABLE (table11), reflect_y_checkbutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_y_checkbutton), 2);
-
-  reflect_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  reflect_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (reflect_taginc_spinbutton_adj), 1, 0);
-  gtk_widget_show (reflect_taginc_spinbutton);
-  gtk_table_attach (GTK_TABLE (table11), reflect_taginc_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (reflect_taginc_spinbutton), TRUE);
-
-  reflect_z_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XY plane"));
-  gtk_widget_show (reflect_z_checkbutton);
-  gtk_table_attach (GTK_TABLE (table11), reflect_z_checkbutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_z_checkbutton), 2);
-
-  reflect_x_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in YZ plane"));
-  gtk_widget_show (reflect_x_checkbutton);
-  gtk_table_attach (GTK_TABLE (table11), reflect_x_checkbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_x_checkbutton), 2);
-
-  label91 = gtk_label_new (_("Tag Number Increment"));
-  gtk_widget_show (label91);
-  gtk_table_attach (GTK_TABLE (table11), label91, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5);
-
-  label90 = gtk_label_new (_("Reflect Options"));
-  gtk_widget_show (label90);
-  gtk_frame_set_label_widget (GTK_FRAME (frame17), label90);
-  gtk_misc_set_padding (GTK_MISC (label90), 4, 4);
-
-  hbox27 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox27);
-  gtk_box_pack_start (GTK_BOX (vbox11), hbox27, TRUE, TRUE, 0);
-
-  reflect_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (reflect_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox27), reflect_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_new_button), 2);
-
-  reflect_cancel_button = gtk_button_new ();
-  gtk_widget_show (reflect_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox27), reflect_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_cancel_button), 2);
-
-  alignment55 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment55);
-  gtk_container_add (GTK_CONTAINER (reflect_cancel_button), alignment55);
-
-  hbox53 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox53);
-  gtk_container_add (GTK_CONTAINER (alignment55), hbox53);
-
-  image75 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image75);
-  gtk_box_pack_start (GTK_BOX (hbox53), image75, FALSE, FALSE, 0);
-
-  label227 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label227);
-  gtk_box_pack_start (GTK_BOX (hbox53), label227, FALSE, FALSE, 0);
-
-  reflect_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (reflect_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox27), reflect_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_apply_button), 2);
-
-  reflect_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (reflect_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox27), reflect_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (reflect_ok_button), 2);
-
-  g_signal_connect ((gpointer) reflect_editor, "destroy",
-                    G_CALLBACK (on_reflect_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_y_checkbutton, "toggled",
-                    G_CALLBACK (on_reflect_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_taginc_spinbutton, "value_changed",
-                    G_CALLBACK (on_reflect_taginc_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_z_checkbutton, "toggled",
-                    G_CALLBACK (on_reflect_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_x_checkbutton, "toggled",
-                    G_CALLBACK (on_reflect_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_new_button, "clicked",
-                    G_CALLBACK (on_reflect_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_cancel_button, "clicked",
-                    G_CALLBACK (on_reflect_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_apply_button, "clicked",
-                    G_CALLBACK (on_reflect_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) reflect_ok_button, "clicked",
-                    G_CALLBACK (on_reflect_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (reflect_editor, reflect_editor, "reflect_editor");
-  GLADE_HOOKUP_OBJECT (reflect_editor, vbox11, "vbox11");
-  GLADE_HOOKUP_OBJECT (reflect_editor, frame17, "frame17");
-  GLADE_HOOKUP_OBJECT (reflect_editor, alignment19, "alignment19");
-  GLADE_HOOKUP_OBJECT (reflect_editor, table11, "table11");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_y_checkbutton, "reflect_y_checkbutton");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_taginc_spinbutton, "reflect_taginc_spinbutton");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_z_checkbutton, "reflect_z_checkbutton");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_x_checkbutton, "reflect_x_checkbutton");
-  GLADE_HOOKUP_OBJECT (reflect_editor, label91, "label91");
-  GLADE_HOOKUP_OBJECT (reflect_editor, label90, "label90");
-  GLADE_HOOKUP_OBJECT (reflect_editor, hbox27, "hbox27");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_new_button, "reflect_new_button");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_cancel_button, "reflect_cancel_button");
-  GLADE_HOOKUP_OBJECT (reflect_editor, alignment55, "alignment55");
-  GLADE_HOOKUP_OBJECT (reflect_editor, hbox53, "hbox53");
-  GLADE_HOOKUP_OBJECT (reflect_editor, image75, "image75");
-  GLADE_HOOKUP_OBJECT (reflect_editor, label227, "label227");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_apply_button, "reflect_apply_button");
-  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_ok_button, "reflect_ok_button");
-
-  return reflect_editor;
-}
-
-GtkWidget*
-create_scale_editor (void)
-{
-  GtkWidget *scale_editor;
-  GtkWidget *vbox12;
-  GtkWidget *frame18;
-  GtkWidget *alignment20;
-  GtkWidget *table35;
-  GtkWidget *label217;
-  GtkWidget *label220;
-  GtkWidget *label221;
-  GtkObject *scale_from_spinbutton_adj;
-  GtkWidget *scale_from_spinbutton;
-  GtkObject *scale_to_spinbutton_adj;
-  GtkWidget *scale_to_spinbutton;
-  GtkObject *scale_factor_spinbutton_adj;
-  GtkWidget *scale_factor_spinbutton;
-  GtkWidget *label93;
-  GtkWidget *hbox28;
-  GtkWidget *scale_new_button;
-  GtkWidget *scale_cancel_button;
-  GtkWidget *alignment56;
-  GtkWidget *hbox54;
-  GtkWidget *image76;
-  GtkWidget *label228;
-  GtkWidget *scale_apply_button;
-  GtkWidget *scale_ok_button;
-
-  scale_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (scale_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (scale_editor), _("Scale Structure (GS card)"));
-
-  vbox12 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox12);
-  gtk_container_add (GTK_CONTAINER (scale_editor), vbox12);
-
-  frame18 = gtk_frame_new (NULL);
-  gtk_widget_show (frame18);
-  gtk_box_pack_start (GTK_BOX (vbox12), frame18, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame18), 4);
-
-  alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment20);
-  gtk_container_add (GTK_CONTAINER (frame18), alignment20);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0);
-
-  table35 = gtk_table_new (3, 2, TRUE);
-  gtk_widget_show (table35);
-  gtk_container_add (GTK_CONTAINER (alignment20), table35);
-
-  label217 = gtk_label_new (_("Structure Scale Factor"));
-  gtk_widget_show (label217);
-  gtk_table_attach (GTK_TABLE (table35), label217, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  label220 = gtk_label_new (_("From Tag No."));
-  gtk_widget_show (label220);
-  gtk_table_attach (GTK_TABLE (table35), label220, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label220), 0.1, 0.5);
-
-  label221 = gtk_label_new (_("To Tag No."));
-  gtk_widget_show (label221);
-  gtk_table_attach (GTK_TABLE (table35), label221, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label221), 0.1, 0.5);
-
-  scale_from_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  scale_from_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_from_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (scale_from_spinbutton);
-  gtk_table_attach (GTK_TABLE (table35), scale_from_spinbutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_from_spinbutton), TRUE);
-
-  scale_to_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  scale_to_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_to_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (scale_to_spinbutton);
-  gtk_table_attach (GTK_TABLE (table35), scale_to_spinbutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_to_spinbutton), TRUE);
-
-  scale_factor_spinbutton_adj = gtk_adjustment_new (1, 0, 100000, 9.99999974738e-06, 10, 0);
-  scale_factor_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_factor_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (scale_factor_spinbutton);
-  gtk_table_attach (GTK_TABLE (table35), scale_factor_spinbutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_factor_spinbutton), TRUE);
-
-  label93 = gtk_label_new (_("Scale Strucure"));
-  gtk_widget_show (label93);
-  gtk_frame_set_label_widget (GTK_FRAME (frame18), label93);
-  gtk_misc_set_padding (GTK_MISC (label93), 4, 4);
-
-  hbox28 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox28);
-  gtk_box_pack_start (GTK_BOX (vbox12), hbox28, TRUE, TRUE, 0);
-
-  scale_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (scale_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox28), scale_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (scale_new_button), 2);
-
-  scale_cancel_button = gtk_button_new ();
-  gtk_widget_show (scale_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox28), scale_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (scale_cancel_button), 2);
-
-  alignment56 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment56);
-  gtk_container_add (GTK_CONTAINER (scale_cancel_button), alignment56);
-
-  hbox54 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox54);
-  gtk_container_add (GTK_CONTAINER (alignment56), hbox54);
-
-  image76 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image76);
-  gtk_box_pack_start (GTK_BOX (hbox54), image76, FALSE, FALSE, 0);
-
-  label228 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label228);
-  gtk_box_pack_start (GTK_BOX (hbox54), label228, FALSE, FALSE, 0);
-
-  scale_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (scale_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox28), scale_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (scale_apply_button), 2);
-
-  scale_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (scale_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox28), scale_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (scale_ok_button), 2);
-
-  g_signal_connect ((gpointer) scale_editor, "destroy",
-                    G_CALLBACK (on_scale_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) scale_from_spinbutton, "value_changed",
-                    G_CALLBACK (on_scale_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) scale_to_spinbutton, "value_changed",
-                    G_CALLBACK (on_scale_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) scale_factor_spinbutton, "value_changed",
-                    G_CALLBACK (on_scale_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) scale_new_button, "clicked",
-                    G_CALLBACK (on_scale_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) scale_cancel_button, "clicked",
-                    G_CALLBACK (on_scale_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) scale_apply_button, "clicked",
-                    G_CALLBACK (on_scale_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) scale_ok_button, "clicked",
-                    G_CALLBACK (on_scale_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (scale_editor, scale_editor, "scale_editor");
-  GLADE_HOOKUP_OBJECT (scale_editor, vbox12, "vbox12");
-  GLADE_HOOKUP_OBJECT (scale_editor, frame18, "frame18");
-  GLADE_HOOKUP_OBJECT (scale_editor, alignment20, "alignment20");
-  GLADE_HOOKUP_OBJECT (scale_editor, table35, "table35");
-  GLADE_HOOKUP_OBJECT (scale_editor, label217, "label217");
-  GLADE_HOOKUP_OBJECT (scale_editor, label220, "label220");
-  GLADE_HOOKUP_OBJECT (scale_editor, label221, "label221");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_from_spinbutton, "scale_from_spinbutton");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_to_spinbutton, "scale_to_spinbutton");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_factor_spinbutton, "scale_factor_spinbutton");
-  GLADE_HOOKUP_OBJECT (scale_editor, label93, "label93");
-  GLADE_HOOKUP_OBJECT (scale_editor, hbox28, "hbox28");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_new_button, "scale_new_button");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_cancel_button, "scale_cancel_button");
-  GLADE_HOOKUP_OBJECT (scale_editor, alignment56, "alignment56");
-  GLADE_HOOKUP_OBJECT (scale_editor, hbox54, "hbox54");
-  GLADE_HOOKUP_OBJECT (scale_editor, image76, "image76");
-  GLADE_HOOKUP_OBJECT (scale_editor, label228, "label228");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_apply_button, "scale_apply_button");
-  GLADE_HOOKUP_OBJECT (scale_editor, scale_ok_button, "scale_ok_button");
-
-  return scale_editor;
-}
-
-GtkWidget*
-create_cylinder_editor (void)
-{
-  GtkWidget *cylinder_editor;
-  GtkWidget *vbox13;
-  GtkWidget *frame19;
-  GtkWidget *alignment21;
-  GtkWidget *table12;
-  GtkWidget *label95;
-  GtkWidget *label97;
-  GtkObject *cylinder_taginc_spinbutton_adj;
-  GtkWidget *cylinder_taginc_spinbutton;
-  GtkObject *cylinder_total_spinbutton_adj;
-  GtkWidget *cylinder_total_spinbutton;
-  GtkWidget *label96;
-  GtkWidget *hbox30;
-  GtkWidget *cylinder_new_button;
-  GtkWidget *cylinder_cancel_button;
-  GtkWidget *alignment57;
-  GtkWidget *hbox55;
-  GtkWidget *image77;
-  GtkWidget *label229;
-  GtkWidget *cylinder_apply_button;
-  GtkWidget *cylinder_ok_button;
-
-  cylinder_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (cylinder_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (cylinder_editor), _("Cylindrical Structure (GR card)"));
-
-  vbox13 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox13);
-  gtk_container_add (GTK_CONTAINER (cylinder_editor), vbox13);
-
-  frame19 = gtk_frame_new (NULL);
-  gtk_widget_show (frame19);
-  gtk_box_pack_start (GTK_BOX (vbox13), frame19, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame19), 4);
-
-  alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment21);
-  gtk_container_add (GTK_CONTAINER (frame19), alignment21);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 0, 0, 12, 0);
-
-  table12 = gtk_table_new (2, 2, FALSE);
-  gtk_widget_show (table12);
-  gtk_container_add (GTK_CONTAINER (alignment21), table12);
-  gtk_table_set_row_spacings (GTK_TABLE (table12), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table12), 8);
-
-  label95 = gtk_label_new (_("Tag Number Increment"));
-  gtk_widget_show (label95);
-  gtk_table_attach (GTK_TABLE (table12), label95, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label95), 0.1, 0.5);
-
-  label97 = gtk_label_new (_("Number of Structures"));
-  gtk_widget_show (label97);
-  gtk_table_attach (GTK_TABLE (table12), label97, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label97), 0.1, 0.5);
-
-  cylinder_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
-  cylinder_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_taginc_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (cylinder_taginc_spinbutton);
-  gtk_table_attach (GTK_TABLE (table12), cylinder_taginc_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_taginc_spinbutton), TRUE);
-
-  cylinder_total_spinbutton_adj = gtk_adjustment_new (4, 1, 100000, 1, 10, 0);
-  cylinder_total_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_total_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (cylinder_total_spinbutton);
-  gtk_table_attach (GTK_TABLE (table12), cylinder_total_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_total_spinbutton), TRUE);
-
-  label96 = gtk_label_new (_("Cylindrical Structure"));
-  gtk_widget_show (label96);
-  gtk_frame_set_label_widget (GTK_FRAME (frame19), label96);
-  gtk_misc_set_padding (GTK_MISC (label96), 4, 4);
-
-  hbox30 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox30);
-  gtk_box_pack_start (GTK_BOX (vbox13), hbox30, TRUE, TRUE, 0);
-
-  cylinder_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (cylinder_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (cylinder_new_button), 2);
-
-  cylinder_cancel_button = gtk_button_new ();
-  gtk_widget_show (cylinder_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (cylinder_cancel_button), 2);
-
-  alignment57 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment57);
-  gtk_container_add (GTK_CONTAINER (cylinder_cancel_button), alignment57);
-
-  hbox55 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox55);
-  gtk_container_add (GTK_CONTAINER (alignment57), hbox55);
-
-  image77 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image77);
-  gtk_box_pack_start (GTK_BOX (hbox55), image77, FALSE, FALSE, 0);
-
-  label229 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label229);
-  gtk_box_pack_start (GTK_BOX (hbox55), label229, FALSE, FALSE, 0);
-
-  cylinder_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (cylinder_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (cylinder_apply_button), 2);
-
-  cylinder_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (cylinder_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (cylinder_ok_button), 2);
-
-  g_signal_connect ((gpointer) cylinder_editor, "destroy",
-                    G_CALLBACK (on_cylinder_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_taginc_spinbutton, "value_changed",
-                    G_CALLBACK (on_cylinder_taginc_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_total_spinbutton, "value_changed",
-                    G_CALLBACK (on_cylinder_total_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_new_button, "clicked",
-                    G_CALLBACK (on_cylinder_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_cancel_button, "clicked",
-                    G_CALLBACK (on_cylinder_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_apply_button, "clicked",
-                    G_CALLBACK (on_cylinder_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) cylinder_ok_button, "clicked",
-                    G_CALLBACK (on_cylinder_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (cylinder_editor, cylinder_editor, "cylinder_editor");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, vbox13, "vbox13");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, frame19, "frame19");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment21, "alignment21");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, table12, "table12");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, label95, "label95");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, label97, "label97");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_taginc_spinbutton, "cylinder_taginc_spinbutton");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_total_spinbutton, "cylinder_total_spinbutton");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, label96, "label96");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox30, "hbox30");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_new_button, "cylinder_new_button");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_cancel_button, "cylinder_cancel_button");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment57, "alignment57");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox55, "hbox55");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, image77, "image77");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, label229, "label229");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_apply_button, "cylinder_apply_button");
-  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_ok_button, "cylinder_ok_button");
-
-  return cylinder_editor;
-}
-
-GtkWidget*
-create_kernel_command (void)
-{
-  GtkWidget *kernel_command;
-  GtkWidget *vbox14;
-  GtkWidget *frame21;
-  GtkWidget *alignment23;
-  GtkWidget *kernel_checkbutton;
-  GtkWidget *label107;
-  GtkWidget *hbox31;
-  GtkWidget *kernel_new_button;
-  GtkWidget *kernel_cancel_button;
-  GtkWidget *alignment58;
-  GtkWidget *hbox56;
-  GtkWidget *image78;
-  GtkWidget *label230;
-  GtkWidget *kernel_apply_button;
-  GtkWidget *kernel_ok_button;
-
-  kernel_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_command), 4);
-  gtk_window_set_title (GTK_WINDOW (kernel_command), _("Thin Wire Kernel (EK Card)"));
-
-  vbox14 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox14);
-  gtk_container_add (GTK_CONTAINER (kernel_command), vbox14);
-
-  frame21 = gtk_frame_new (NULL);
-  gtk_widget_show (frame21);
-  gtk_box_pack_start (GTK_BOX (vbox14), frame21, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame21), 4);
-
-  alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment23);
-  gtk_container_add (GTK_CONTAINER (frame21), alignment23);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment23), 0, 0, 12, 0);
-
-  kernel_checkbutton = gtk_check_button_new_with_mnemonic (_("Extended Thin Wire Kernel"));
-  gtk_widget_show (kernel_checkbutton);
-  gtk_container_add (GTK_CONTAINER (alignment23), kernel_checkbutton);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_checkbutton), 8);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (kernel_checkbutton), TRUE);
-
-  label107 = gtk_label_new (_("Thin Wire Kernel"));
-  gtk_widget_show (label107);
-  gtk_frame_set_label_widget (GTK_FRAME (frame21), label107);
-  gtk_misc_set_padding (GTK_MISC (label107), 4, 4);
-
-  hbox31 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox31);
-  gtk_box_pack_start (GTK_BOX (vbox14), hbox31, TRUE, TRUE, 0);
-
-  kernel_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (kernel_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox31), kernel_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_new_button), 2);
-
-  kernel_cancel_button = gtk_button_new ();
-  gtk_widget_show (kernel_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox31), kernel_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_cancel_button), 2);
-
-  alignment58 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment58);
-  gtk_container_add (GTK_CONTAINER (kernel_cancel_button), alignment58);
-
-  hbox56 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox56);
-  gtk_container_add (GTK_CONTAINER (alignment58), hbox56);
-
-  image78 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image78);
-  gtk_box_pack_start (GTK_BOX (hbox56), image78, FALSE, FALSE, 0);
-
-  label230 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label230);
-  gtk_box_pack_start (GTK_BOX (hbox56), label230, FALSE, FALSE, 0);
-
-  kernel_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (kernel_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox31), kernel_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_apply_button), 2);
-
-  kernel_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (kernel_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox31), kernel_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (kernel_ok_button), 2);
-
-  g_signal_connect ((gpointer) kernel_command, "destroy",
-                    G_CALLBACK (on_kernel_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) kernel_checkbutton, "toggled",
-                    G_CALLBACK (on_kernel_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) kernel_new_button, "clicked",
-                    G_CALLBACK (on_kernel_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) kernel_cancel_button, "clicked",
-                    G_CALLBACK (on_kernel_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) kernel_apply_button, "clicked",
-                    G_CALLBACK (on_kernel_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) kernel_ok_button, "clicked",
-                    G_CALLBACK (on_kernel_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (kernel_command, kernel_command, "kernel_command");
-  GLADE_HOOKUP_OBJECT (kernel_command, vbox14, "vbox14");
-  GLADE_HOOKUP_OBJECT (kernel_command, frame21, "frame21");
-  GLADE_HOOKUP_OBJECT (kernel_command, alignment23, "alignment23");
-  GLADE_HOOKUP_OBJECT (kernel_command, kernel_checkbutton, "kernel_checkbutton");
-  GLADE_HOOKUP_OBJECT (kernel_command, label107, "label107");
-  GLADE_HOOKUP_OBJECT (kernel_command, hbox31, "hbox31");
-  GLADE_HOOKUP_OBJECT (kernel_command, kernel_new_button, "kernel_new_button");
-  GLADE_HOOKUP_OBJECT (kernel_command, kernel_cancel_button, "kernel_cancel_button");
-  GLADE_HOOKUP_OBJECT (kernel_command, alignment58, "alignment58");
-  GLADE_HOOKUP_OBJECT (kernel_command, hbox56, "hbox56");
-  GLADE_HOOKUP_OBJECT (kernel_command, image78, "image78");
-  GLADE_HOOKUP_OBJECT (kernel_command, label230, "label230");
-  GLADE_HOOKUP_OBJECT (kernel_command, kernel_apply_button, "kernel_apply_button");
-  GLADE_HOOKUP_OBJECT (kernel_command, kernel_ok_button, "kernel_ok_button");
-
-  return kernel_command;
-}
-
-GtkWidget*
-create_execute_command (void)
-{
-  GtkWidget *execute_command;
-  GtkWidget *vbox15;
-  GtkWidget *frame20;
-  GtkWidget *alignment22;
-  GtkWidget *table14;
-  GtkWidget *execute_none_radiobutton;
-  GSList *execute_none_radiobutton_group = NULL;
-  GtkWidget *execute_xz_radiobutton;
-  GtkWidget *execute_yz_radiobutton;
-  GtkWidget *execute_both_radiobutton;
-  GtkWidget *label106;
-  GtkWidget *hbox32;
-  GtkWidget *execute_new_button;
-  GtkWidget *execute_cancel_button;
-  GtkWidget *alignment59;
-  GtkWidget *hbox57;
-  GtkWidget *image79;
-  GtkWidget *label231;
-  GtkWidget *execute_apply_button;
-  GtkWidget *execute_ok_button;
-
-  execute_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_command), 4);
-  gtk_window_set_title (GTK_WINDOW (execute_command), _("Execute Command (XQ Card)"));
-
-  vbox15 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox15);
-  gtk_container_add (GTK_CONTAINER (execute_command), vbox15);
-
-  frame20 = gtk_frame_new (NULL);
-  gtk_widget_show (frame20);
-  gtk_box_pack_start (GTK_BOX (vbox15), frame20, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame20), 4);
-
-  alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment22);
-  gtk_container_add (GTK_CONTAINER (frame20), alignment22);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 12, 0);
-
-  table14 = gtk_table_new (2, 2, FALSE);
-  gtk_widget_show (table14);
-  gtk_container_add (GTK_CONTAINER (alignment22), table14);
-  gtk_table_set_row_spacings (GTK_TABLE (table14), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table14), 2);
-
-  execute_none_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Pattern Cuts"));
-  gtk_widget_show (execute_none_radiobutton);
-  gtk_table_attach (GTK_TABLE (table14), execute_none_radiobutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_none_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_none_radiobutton), execute_none_radiobutton_group);
-  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_none_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (execute_none_radiobutton), TRUE);
-
-  execute_xz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in XZ Plane"));
-  gtk_widget_show (execute_xz_radiobutton);
-  gtk_table_attach (GTK_TABLE (table14), execute_xz_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_xz_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_xz_radiobutton), execute_none_radiobutton_group);
-  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_xz_radiobutton));
-
-  execute_yz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in YZ Plane"));
-  gtk_widget_show (execute_yz_radiobutton);
-  gtk_table_attach (GTK_TABLE (table14), execute_yz_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_yz_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_yz_radiobutton), execute_none_radiobutton_group);
-  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_yz_radiobutton));
-
-  execute_both_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Both XZ/YZ Patterns"));
-  gtk_widget_show (execute_both_radiobutton);
-  gtk_table_attach (GTK_TABLE (table14), execute_both_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_both_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_both_radiobutton), execute_none_radiobutton_group);
-  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_both_radiobutton));
-
-  label106 = gtk_label_new (_("Execute Command"));
-  gtk_widget_show (label106);
-  gtk_frame_set_label_widget (GTK_FRAME (frame20), label106);
-  gtk_misc_set_padding (GTK_MISC (label106), 4, 4);
-
-  hbox32 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox32);
-  gtk_box_pack_start (GTK_BOX (vbox15), hbox32, FALSE, FALSE, 0);
-
-  execute_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (execute_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox32), execute_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_new_button), 2);
-
-  execute_cancel_button = gtk_button_new ();
-  gtk_widget_show (execute_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox32), execute_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_cancel_button), 2);
-
-  alignment59 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment59);
-  gtk_container_add (GTK_CONTAINER (execute_cancel_button), alignment59);
-
-  hbox57 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox57);
-  gtk_container_add (GTK_CONTAINER (alignment59), hbox57);
-
-  image79 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image79);
-  gtk_box_pack_start (GTK_BOX (hbox57), image79, FALSE, FALSE, 0);
-
-  label231 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label231);
-  gtk_box_pack_start (GTK_BOX (hbox57), label231, FALSE, FALSE, 0);
-
-  execute_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (execute_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox32), execute_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_apply_button), 2);
-
-  execute_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (execute_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox32), execute_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (execute_ok_button), 2);
-
-  g_signal_connect ((gpointer) execute_command, "destroy",
-                    G_CALLBACK (on_execute_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) execute_none_radiobutton, "toggled",
-                    G_CALLBACK (on_execute_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) execute_xz_radiobutton, "toggled",
-                    G_CALLBACK (on_execute_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) execute_yz_radiobutton, "toggled",
-                    G_CALLBACK (on_execute_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) execute_both_radiobutton, "toggled",
-                    G_CALLBACK (on_execute_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) execute_new_button, "clicked",
-                    G_CALLBACK (on_execute_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) execute_cancel_button, "clicked",
-                    G_CALLBACK (on_execute_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) execute_apply_button, "clicked",
-                    G_CALLBACK (on_execute_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) execute_ok_button, "clicked",
-                    G_CALLBACK (on_execute_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (execute_command, execute_command, "execute_command");
-  GLADE_HOOKUP_OBJECT (execute_command, vbox15, "vbox15");
-  GLADE_HOOKUP_OBJECT (execute_command, frame20, "frame20");
-  GLADE_HOOKUP_OBJECT (execute_command, alignment22, "alignment22");
-  GLADE_HOOKUP_OBJECT (execute_command, table14, "table14");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_none_radiobutton, "execute_none_radiobutton");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_xz_radiobutton, "execute_xz_radiobutton");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_yz_radiobutton, "execute_yz_radiobutton");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_both_radiobutton, "execute_both_radiobutton");
-  GLADE_HOOKUP_OBJECT (execute_command, label106, "label106");
-  GLADE_HOOKUP_OBJECT (execute_command, hbox32, "hbox32");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_new_button, "execute_new_button");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_cancel_button, "execute_cancel_button");
-  GLADE_HOOKUP_OBJECT (execute_command, alignment59, "alignment59");
-  GLADE_HOOKUP_OBJECT (execute_command, hbox57, "hbox57");
-  GLADE_HOOKUP_OBJECT (execute_command, image79, "image79");
-  GLADE_HOOKUP_OBJECT (execute_command, label231, "label231");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_apply_button, "execute_apply_button");
-  GLADE_HOOKUP_OBJECT (execute_command, execute_ok_button, "execute_ok_button");
-
-  return execute_command;
-}
-
-GtkWidget*
-create_intrange_command (void)
-{
-  GtkWidget *intrange_command;
-  GtkWidget *vbox16;
-  GtkWidget *frame22;
-  GtkWidget *alignment24;
-  GtkWidget *hbox34;
-  GtkWidget *label109;
-  GtkObject *intrange_wlen_spinbutton_adj;
-  GtkWidget *intrange_wlen_spinbutton;
-  GtkWidget *label108;
-  GtkWidget *hbox33;
-  GtkWidget *intrange_new_button;
-  GtkWidget *intrange_cancel_button;
-  GtkWidget *alignment60;
-  GtkWidget *hbox58;
-  GtkWidget *image80;
-  GtkWidget *label232;
-  GtkWidget *intrange_apply_button;
-  GtkWidget *intrange_ok_button;
-
-  intrange_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_title (GTK_WINDOW (intrange_command), _("Interaction Approx Range (KH Card)"));
-
-  vbox16 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox16);
-  gtk_container_add (GTK_CONTAINER (intrange_command), vbox16);
-
-  frame22 = gtk_frame_new (NULL);
-  gtk_widget_show (frame22);
-  gtk_box_pack_start (GTK_BOX (vbox16), frame22, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame22), 4);
-
-  alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment24);
-  gtk_container_add (GTK_CONTAINER (frame22), alignment24);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment24), 0, 0, 12, 0);
-
-  hbox34 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox34);
-  gtk_container_add (GTK_CONTAINER (alignment24), hbox34);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox34), 8);
-
-  label109 = gtk_label_new (_("Approximation Range (W/lengths)"));
-  gtk_widget_show (label109);
-  gtk_box_pack_start (GTK_BOX (hbox34), label109, FALSE, FALSE, 0);
-
-  intrange_wlen_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  intrange_wlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (intrange_wlen_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (intrange_wlen_spinbutton);
-  gtk_box_pack_start (GTK_BOX (hbox34), intrange_wlen_spinbutton, TRUE, TRUE, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (intrange_wlen_spinbutton), TRUE);
-
-  label108 = gtk_label_new (_("Interaction Approximation Range"));
-  gtk_widget_show (label108);
-  gtk_frame_set_label_widget (GTK_FRAME (frame22), label108);
-  gtk_misc_set_padding (GTK_MISC (label108), 4, 4);
-
-  hbox33 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox33);
-  gtk_box_pack_start (GTK_BOX (vbox16), hbox33, TRUE, TRUE, 0);
-
-  intrange_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (intrange_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox33), intrange_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (intrange_new_button), 2);
-
-  intrange_cancel_button = gtk_button_new ();
-  gtk_widget_show (intrange_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox33), intrange_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (intrange_cancel_button), 2);
-
-  alignment60 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment60);
-  gtk_container_add (GTK_CONTAINER (intrange_cancel_button), alignment60);
-
-  hbox58 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox58);
-  gtk_container_add (GTK_CONTAINER (alignment60), hbox58);
-
-  image80 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image80);
-  gtk_box_pack_start (GTK_BOX (hbox58), image80, FALSE, FALSE, 0);
-
-  label232 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label232);
-  gtk_box_pack_start (GTK_BOX (hbox58), label232, FALSE, FALSE, 0);
-
-  intrange_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (intrange_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox33), intrange_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (intrange_apply_button), 2);
-
-  intrange_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (intrange_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox33), intrange_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (intrange_ok_button), 2);
-
-  g_signal_connect ((gpointer) intrange_command, "destroy",
-                    G_CALLBACK (on_intrange_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) intrange_wlen_spinbutton, "value_changed",
-                    G_CALLBACK (on_intrange_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) intrange_new_button, "clicked",
-                    G_CALLBACK (on_intrange_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) intrange_cancel_button, "clicked",
-                    G_CALLBACK (on_intrange_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) intrange_apply_button, "clicked",
-                    G_CALLBACK (on_intrange_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) intrange_ok_button, "clicked",
-                    G_CALLBACK (on_intrange_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (intrange_command, intrange_command, "intrange_command");
-  GLADE_HOOKUP_OBJECT (intrange_command, vbox16, "vbox16");
-  GLADE_HOOKUP_OBJECT (intrange_command, frame22, "frame22");
-  GLADE_HOOKUP_OBJECT (intrange_command, alignment24, "alignment24");
-  GLADE_HOOKUP_OBJECT (intrange_command, hbox34, "hbox34");
-  GLADE_HOOKUP_OBJECT (intrange_command, label109, "label109");
-  GLADE_HOOKUP_OBJECT (intrange_command, intrange_wlen_spinbutton, "intrange_wlen_spinbutton");
-  GLADE_HOOKUP_OBJECT (intrange_command, label108, "label108");
-  GLADE_HOOKUP_OBJECT (intrange_command, hbox33, "hbox33");
-  GLADE_HOOKUP_OBJECT (intrange_command, intrange_new_button, "intrange_new_button");
-  GLADE_HOOKUP_OBJECT (intrange_command, intrange_cancel_button, "intrange_cancel_button");
-  GLADE_HOOKUP_OBJECT (intrange_command, alignment60, "alignment60");
-  GLADE_HOOKUP_OBJECT (intrange_command, hbox58, "hbox58");
-  GLADE_HOOKUP_OBJECT (intrange_command, image80, "image80");
-  GLADE_HOOKUP_OBJECT (intrange_command, label232, "label232");
-  GLADE_HOOKUP_OBJECT (intrange_command, intrange_apply_button, "intrange_apply_button");
-  GLADE_HOOKUP_OBJECT (intrange_command, intrange_ok_button, "intrange_ok_button");
-
-  return intrange_command;
-}
-
-GtkWidget*
-create_ground_command (void)
-{
-  GtkWidget *ground_command;
-  GtkWidget *vbox17;
-  GtkWidget *frame23;
-  GtkWidget *alignment25;
-  GtkWidget *table15;
-  GtkWidget *ground_perf_radiobutton;
-  GSList *ground_perf_radiobutton_group = NULL;
-  GtkWidget *ground_refl_radiobutton;
-  GtkWidget *ground_smfld_radiobutton;
-  GtkWidget *ground_null_radiobutton;
-  GtkWidget *ground_radl_checkbutton;
-  GtkWidget *ground_secmd_checkbutton;
-  GtkWidget *label110;
-  GtkWidget *ground_med1_frame;
-  GtkWidget *alignment26;
-  GtkWidget *table16;
-  GtkObject *ground_diel1_spinbutton_adj;
-  GtkWidget *ground_diel1_spinbutton;
-  GtkObject *ground_res1_spinbutton_adj;
-  GtkWidget *ground_res1_spinbutton;
-  GtkWidget *label116;
-  GtkWidget *label117;
-  GtkWidget *label111;
-  GtkWidget *ground_med2_frame;
-  GtkWidget *alignment27;
-  GtkWidget *table18;
-  GtkWidget *label118;
-  GtkWidget *label123;
-  GtkWidget *label124;
-  GtkWidget *label125;
-  GtkObject *ground_diel2_spinbutton_adj;
-  GtkWidget *ground_diel2_spinbutton;
-  GtkObject *ground_res2_spinbutton_adj;
-  GtkWidget *ground_res2_spinbutton;
-  GtkObject *ground_below_spinbutton_adj;
-  GtkWidget *ground_below_spinbutton;
-  GtkObject *ground_dist2_spinbutton_adj;
-  GtkWidget *ground_dist2_spinbutton;
-  GtkWidget *label114;
-  GtkWidget *ground_radial_frame;
-  GtkWidget *alignment28;
-  GtkWidget *table17;
-  GtkWidget *label126;
-  GtkWidget *label127;
-  GtkWidget *label128;
-  GtkObject *ground_nrad_spinbutton_adj;
-  GtkWidget *ground_nrad_spinbutton;
-  GtkObject *ground_diam_spinbutton_adj;
-  GtkWidget *ground_diam_spinbutton;
-  GtkObject *ground_scrnrd_spinbutton_adj;
-  GtkWidget *ground_scrnrd_spinbutton;
-  GtkWidget *label115;
-  GtkWidget *hbox35;
-  GtkWidget *ground_new_button;
-  GtkWidget *ground_cancel_button;
-  GtkWidget *alignment61;
-  GtkWidget *hbox59;
-  GtkWidget *image81;
-  GtkWidget *label233;
-  GtkWidget *ground_apply_button;
-  GtkWidget *ground_ok_button;
-
-  ground_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_command), 4);
-  gtk_window_set_title (GTK_WINDOW (ground_command), _("Ground Parameters (GN & GD Cards)"));
-
-  vbox17 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox17);
-  gtk_container_add (GTK_CONTAINER (ground_command), vbox17);
-
-  frame23 = gtk_frame_new (NULL);
-  gtk_widget_show (frame23);
-  gtk_box_pack_start (GTK_BOX (vbox17), frame23, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame23), 4);
-
-  alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment25);
-  gtk_container_add (GTK_CONTAINER (frame23), alignment25);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment25), 0, 0, 12, 0);
-
-  table15 = gtk_table_new (3, 2, FALSE);
-  gtk_widget_show (table15);
-  gtk_container_add (GTK_CONTAINER (alignment25), table15);
-  gtk_table_set_row_spacings (GTK_TABLE (table15), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table15), 2);
-
-  ground_perf_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Perfect Ground"));
-  gtk_widget_show (ground_perf_radiobutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_perf_radiobutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_perf_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_perf_radiobutton), ground_perf_radiobutton_group);
-  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_perf_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ground_perf_radiobutton), TRUE);
-
-  ground_refl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Reflection Coeff. Approx"));
-  gtk_widget_show (ground_refl_radiobutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_refl_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_refl_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_refl_radiobutton), ground_perf_radiobutton_group);
-  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_refl_radiobutton));
-
-  ground_smfld_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Sommerfeld/Norton"));
-  gtk_widget_show (ground_smfld_radiobutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_smfld_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_smfld_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton), ground_perf_radiobutton_group);
-  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton));
-
-  ground_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Nullify Previous Params"));
-  gtk_widget_show (ground_null_radiobutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_null_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_null_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_null_radiobutton), ground_perf_radiobutton_group);
-  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_null_radiobutton));
-
-  ground_radl_checkbutton = gtk_check_button_new_with_mnemonic (_("Radial Ground Screen"));
-  gtk_widget_show (ground_radl_checkbutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_radl_checkbutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_radl_checkbutton), 2);
-
-  ground_secmd_checkbutton = gtk_check_button_new_with_mnemonic (_("Second Medium (Cliff)"));
-  gtk_widget_show (ground_secmd_checkbutton);
-  gtk_table_attach (GTK_TABLE (table15), ground_secmd_checkbutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_secmd_checkbutton), 2);
-
-  label110 = gtk_label_new (_("Ground Type"));
-  gtk_widget_show (label110);
-  gtk_frame_set_label_widget (GTK_FRAME (frame23), label110);
-  gtk_misc_set_padding (GTK_MISC (label110), 4, 4);
-
-  ground_med1_frame = gtk_frame_new (NULL);
-  gtk_box_pack_start (GTK_BOX (vbox17), ground_med1_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_med1_frame), 4);
-
-  alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment26);
-  gtk_container_add (GTK_CONTAINER (ground_med1_frame), alignment26);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment26), 0, 0, 12, 0);
-
-  table16 = gtk_table_new (2, 2, FALSE);
-  gtk_widget_show (table16);
-  gtk_container_add (GTK_CONTAINER (alignment26), table16);
-  gtk_table_set_row_spacings (GTK_TABLE (table16), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table16), 2);
-
-  ground_diel1_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground_diel1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_diel1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table16), ground_diel1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel1_spinbutton), TRUE);
-
-  ground_res1_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground_res1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_res1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table16), ground_res1_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res1_spinbutton), TRUE);
-
-  label116 = gtk_label_new (_("Relative Dielectric Const."));
-  gtk_widget_show (label116);
-  gtk_table_attach (GTK_TABLE (table16), label116, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label116), 0, 0.5);
-
-  label117 = gtk_label_new (_("Ground Conductivity S/m"));
-  gtk_widget_show (label117);
-  gtk_table_attach (GTK_TABLE (table16), label117, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label117), 0, 0.5);
-
-  label111 = gtk_label_new (_("1st Medium Parameters"));
-  gtk_widget_show (label111);
-  gtk_frame_set_label_widget (GTK_FRAME (ground_med1_frame), label111);
-  gtk_misc_set_padding (GTK_MISC (label111), 4, 4);
-
-  ground_med2_frame = gtk_frame_new (NULL);
-  gtk_box_pack_start (GTK_BOX (vbox17), ground_med2_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_med2_frame), 4);
-
-  alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment27);
-  gtk_container_add (GTK_CONTAINER (ground_med2_frame), alignment27);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 0, 0, 12, 0);
-
-  table18 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table18);
-  gtk_container_add (GTK_CONTAINER (alignment27), table18);
-  gtk_table_set_row_spacings (GTK_TABLE (table18), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table18), 2);
-
-  label118 = gtk_label_new (_("Relative Dielectric Const."));
-  gtk_widget_show (label118);
-  gtk_table_attach (GTK_TABLE (table18), label118, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label118), 0, 0.5);
-
-  label123 = gtk_label_new (_("Ground Conductivity S/m"));
-  gtk_widget_show (label123);
-  gtk_table_attach (GTK_TABLE (table18), label123, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label123), 0, 0.5);
-
-  label124 = gtk_label_new (_("Distance to 2nd Medium"));
-  gtk_widget_show (label124);
-  gtk_table_attach (GTK_TABLE (table18), label124, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label124), 0, 0.5);
-
-  label125 = gtk_label_new (_("Dist. below 1st Medium"));
-  gtk_widget_show (label125);
-  gtk_table_attach (GTK_TABLE (table18), label125, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label125), 0, 0.5);
-
-  ground_diel2_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground_diel2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_diel2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table18), ground_diel2_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel2_spinbutton), TRUE);
-
-  ground_res2_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground_res2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_res2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table18), ground_res2_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res2_spinbutton), TRUE);
-
-  ground_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  ground_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_below_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_below_spinbutton);
-  gtk_table_attach (GTK_TABLE (table18), ground_below_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_below_spinbutton), TRUE);
-
-  ground_dist2_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  ground_dist2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_dist2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_dist2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table18), ground_dist2_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_dist2_spinbutton), TRUE);
-
-  label114 = gtk_label_new (_("2nd Medium Parameters"));
-  gtk_widget_show (label114);
-  gtk_frame_set_label_widget (GTK_FRAME (ground_med2_frame), label114);
-  gtk_misc_set_padding (GTK_MISC (label114), 4, 4);
-
-  ground_radial_frame = gtk_frame_new (NULL);
-  gtk_box_pack_start (GTK_BOX (vbox17), ground_radial_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_radial_frame), 4);
-
-  alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment28);
-  gtk_container_add (GTK_CONTAINER (ground_radial_frame), alignment28);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 0, 12, 0);
-
-  table17 = gtk_table_new (3, 2, FALSE);
-  gtk_widget_show (table17);
-  gtk_container_add (GTK_CONTAINER (alignment28), table17);
-  gtk_table_set_row_spacings (GTK_TABLE (table17), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table17), 2);
-
-  label126 = gtk_label_new (_("Number of Radials"));
-  gtk_widget_show (label126);
-  gtk_table_attach (GTK_TABLE (table17), label126, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label126), 0.9, 0.5);
-
-  label127 = gtk_label_new (_("Radial Screen Radius"));
-  gtk_widget_show (label127);
-  gtk_table_attach (GTK_TABLE (table17), label127, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label127), 0, 0.5);
-
-  label128 = gtk_label_new (_("Radial Wire Diameter"));
-  gtk_widget_show (label128);
-  gtk_table_attach (GTK_TABLE (table17), label128, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label128), 0, 0.5);
-
-  ground_nrad_spinbutton_adj = gtk_adjustment_new (4, 1, 1000, 1, 10, 0);
-  ground_nrad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_nrad_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (ground_nrad_spinbutton);
-  gtk_table_attach (GTK_TABLE (table17), ground_nrad_spinbutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_nrad_spinbutton), TRUE);
-
-  ground_diam_spinbutton_adj = gtk_adjustment_new (0.00499999988824, 9.99999974738e-06, 10, 9.99999974738e-06, 10, 0);
-  ground_diam_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diam_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_diam_spinbutton);
-  gtk_table_attach (GTK_TABLE (table17), ground_diam_spinbutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diam_spinbutton), TRUE);
-
-  ground_scrnrd_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  ground_scrnrd_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_scrnrd_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground_scrnrd_spinbutton);
-  gtk_table_attach (GTK_TABLE (table17), ground_scrnrd_spinbutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_scrnrd_spinbutton), TRUE);
-
-  label115 = gtk_label_new (_("Radial Screen Parameters"));
-  gtk_widget_show (label115);
-  gtk_frame_set_label_widget (GTK_FRAME (ground_radial_frame), label115);
-  gtk_misc_set_padding (GTK_MISC (label115), 4, 4);
-
-  hbox35 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox35);
-  gtk_box_pack_start (GTK_BOX (vbox17), hbox35, TRUE, TRUE, 0);
-
-  ground_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (ground_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox35), ground_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_new_button), 2);
-
-  ground_cancel_button = gtk_button_new ();
-  gtk_widget_show (ground_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox35), ground_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_cancel_button), 2);
-
-  alignment61 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment61);
-  gtk_container_add (GTK_CONTAINER (ground_cancel_button), alignment61);
-
-  hbox59 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox59);
-  gtk_container_add (GTK_CONTAINER (alignment61), hbox59);
-
-  image81 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image81);
-  gtk_box_pack_start (GTK_BOX (hbox59), image81, FALSE, FALSE, 0);
-
-  label233 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label233);
-  gtk_box_pack_start (GTK_BOX (hbox59), label233, FALSE, FALSE, 0);
-
-  ground_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (ground_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox35), ground_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_apply_button), 2);
-
-  ground_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (ground_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox35), ground_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground_ok_button), 2);
-
-  g_signal_connect ((gpointer) ground_command, "destroy",
-                    G_CALLBACK (on_ground_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) ground_perf_radiobutton, "toggled",
-                    G_CALLBACK (on_ground_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_refl_radiobutton, "toggled",
-                    G_CALLBACK (on_ground_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_smfld_radiobutton, "toggled",
-                    G_CALLBACK (on_ground_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_null_radiobutton, "toggled",
-                    G_CALLBACK (on_ground_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_radl_checkbutton, "toggled",
-                    G_CALLBACK (on_ground_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_secmd_checkbutton, "toggled",
-                    G_CALLBACK (on_ground_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) ground_diel1_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_res1_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_diel2_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_res2_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_below_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_dist2_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_nrad_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_diam_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_scrnrd_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground_new_button, "clicked",
-                    G_CALLBACK (on_ground_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground_cancel_button, "clicked",
-                    G_CALLBACK (on_ground_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground_apply_button, "clicked",
-                    G_CALLBACK (on_ground_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground_ok_button, "clicked",
-                    G_CALLBACK (on_ground_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (ground_command, ground_command, "ground_command");
-  GLADE_HOOKUP_OBJECT (ground_command, vbox17, "vbox17");
-  GLADE_HOOKUP_OBJECT (ground_command, frame23, "frame23");
-  GLADE_HOOKUP_OBJECT (ground_command, alignment25, "alignment25");
-  GLADE_HOOKUP_OBJECT (ground_command, table15, "table15");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_perf_radiobutton, "ground_perf_radiobutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_refl_radiobutton, "ground_refl_radiobutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_smfld_radiobutton, "ground_smfld_radiobutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_null_radiobutton, "ground_null_radiobutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_radl_checkbutton, "ground_radl_checkbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_secmd_checkbutton, "ground_secmd_checkbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, label110, "label110");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_med1_frame, "ground_med1_frame");
-  GLADE_HOOKUP_OBJECT (ground_command, alignment26, "alignment26");
-  GLADE_HOOKUP_OBJECT (ground_command, table16, "table16");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_diel1_spinbutton, "ground_diel1_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_res1_spinbutton, "ground_res1_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, label116, "label116");
-  GLADE_HOOKUP_OBJECT (ground_command, label117, "label117");
-  GLADE_HOOKUP_OBJECT (ground_command, label111, "label111");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_med2_frame, "ground_med2_frame");
-  GLADE_HOOKUP_OBJECT (ground_command, alignment27, "alignment27");
-  GLADE_HOOKUP_OBJECT (ground_command, table18, "table18");
-  GLADE_HOOKUP_OBJECT (ground_command, label118, "label118");
-  GLADE_HOOKUP_OBJECT (ground_command, label123, "label123");
-  GLADE_HOOKUP_OBJECT (ground_command, label124, "label124");
-  GLADE_HOOKUP_OBJECT (ground_command, label125, "label125");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_diel2_spinbutton, "ground_diel2_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_res2_spinbutton, "ground_res2_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_below_spinbutton, "ground_below_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_dist2_spinbutton, "ground_dist2_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, label114, "label114");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_radial_frame, "ground_radial_frame");
-  GLADE_HOOKUP_OBJECT (ground_command, alignment28, "alignment28");
-  GLADE_HOOKUP_OBJECT (ground_command, table17, "table17");
-  GLADE_HOOKUP_OBJECT (ground_command, label126, "label126");
-  GLADE_HOOKUP_OBJECT (ground_command, label127, "label127");
-  GLADE_HOOKUP_OBJECT (ground_command, label128, "label128");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_nrad_spinbutton, "ground_nrad_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_diam_spinbutton, "ground_diam_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_scrnrd_spinbutton, "ground_scrnrd_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground_command, label115, "label115");
-  GLADE_HOOKUP_OBJECT (ground_command, hbox35, "hbox35");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_new_button, "ground_new_button");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_cancel_button, "ground_cancel_button");
-  GLADE_HOOKUP_OBJECT (ground_command, alignment61, "alignment61");
-  GLADE_HOOKUP_OBJECT (ground_command, hbox59, "hbox59");
-  GLADE_HOOKUP_OBJECT (ground_command, image81, "image81");
-  GLADE_HOOKUP_OBJECT (ground_command, label233, "label233");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_apply_button, "ground_apply_button");
-  GLADE_HOOKUP_OBJECT (ground_command, ground_ok_button, "ground_ok_button");
-
-  return ground_command;
-}
-
-GtkWidget*
-create_nearfield_command (void)
-{
-  GtkWidget *nearfield_command;
-  GtkWidget *vbox18;
-  GtkWidget *frame27;
-  GtkWidget *alignment29;
-  GtkWidget *table20;
-  GtkWidget *nearfield_nh_checkbutton;
-  GtkWidget *nearfield_ne_checkbutton;
-  GtkWidget *nearfield_rect_radiobutton;
-  GSList *nearfield_rect_radiobutton_group = NULL;
-  GtkWidget *nearfield_sph_radiobutton;
-  GtkWidget *label129;
-  GtkWidget *frame28;
-  GtkWidget *alignment30;
-  GtkWidget *table19;
-  GtkWidget *nearfield_i1_label;
-  GtkWidget *nearfield_i2_label;
-  GtkWidget *nearfield_i3_label;
-  GtkWidget *nearfield_f1_label;
-  GtkWidget *nearfield_f2_label;
-  GtkWidget *nearfield_f3_label;
-  GtkWidget *nearfield_f4_label;
-  GtkWidget *nearfield_f5_label;
-  GtkWidget *nearfield_f6_label;
-  GtkObject *nearfield_nx_spinbutton_adj;
-  GtkWidget *nearfield_nx_spinbutton;
-  GtkObject *nearfield_ny_spinbutton_adj;
-  GtkWidget *nearfield_ny_spinbutton;
-  GtkObject *nearfield_nz_spinbutton_adj;
-  GtkWidget *nearfield_nz_spinbutton;
-  GtkObject *nearfield_f1_spinbutton_adj;
-  GtkWidget *nearfield_f1_spinbutton;
-  GtkObject *nearfield_f2_spinbutton_adj;
-  GtkWidget *nearfield_f2_spinbutton;
-  GtkObject *nearfield_f3_spinbutton_adj;
-  GtkWidget *nearfield_f3_spinbutton;
-  GtkObject *nearfield_f4_spinbutton_adj;
-  GtkWidget *nearfield_f4_spinbutton;
-  GtkObject *nearfield_f5_spinbutton_adj;
-  GtkWidget *nearfield_f5_spinbutton;
-  GtkObject *nearfield_f6_spinbutton_adj;
-  GtkWidget *nearfield_f6_spinbutton;
-  GtkWidget *label130;
-  GtkWidget *hbox36;
-  GtkWidget *nearfield_new_button;
-  GtkWidget *nearfield_cancel_button;
-  GtkWidget *alignment62;
-  GtkWidget *hbox60;
-  GtkWidget *image82;
-  GtkWidget *label234;
-  GtkWidget *nearfield_apply_button;
-  GtkWidget *nearfield_ok_button;
-
-  nearfield_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_command), 4);
-  gtk_window_set_title (GTK_WINDOW (nearfield_command), _("Near Fields Command (NE/NH Cards)"));
-
-  vbox18 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox18);
-  gtk_container_add (GTK_CONTAINER (nearfield_command), vbox18);
-
-  frame27 = gtk_frame_new (NULL);
-  gtk_widget_show (frame27);
-  gtk_box_pack_start (GTK_BOX (vbox18), frame27, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame27), 4);
-
-  alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment29);
-  gtk_container_add (GTK_CONTAINER (frame27), alignment29);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 0, 0, 12, 0);
-
-  table20 = gtk_table_new (2, 2, TRUE);
-  gtk_widget_show (table20);
-  gtk_container_add (GTK_CONTAINER (alignment29), table20);
-
-  nearfield_nh_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Magnetic Field"));
-  gtk_widget_show (nearfield_nh_checkbutton);
-  gtk_table_attach (GTK_TABLE (table20), nearfield_nh_checkbutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_nh_checkbutton), 2);
-
-  nearfield_ne_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Electric Field"));
-  gtk_widget_show (nearfield_ne_checkbutton);
-  gtk_table_attach (GTK_TABLE (table20), nearfield_ne_checkbutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ne_checkbutton), 2);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_ne_checkbutton), TRUE);
-
-  nearfield_rect_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangular Co-ordinates"));
-  gtk_widget_show (nearfield_rect_radiobutton);
-  gtk_table_attach (GTK_TABLE (table20), nearfield_rect_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_rect_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton), nearfield_rect_radiobutton_group);
-  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_rect_radiobutton), TRUE);
-
-  nearfield_sph_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Spherical Co-ordinates"));
-  gtk_widget_show (nearfield_sph_radiobutton);
-  gtk_table_attach (GTK_TABLE (table20), nearfield_sph_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_sph_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton), nearfield_rect_radiobutton_group);
-  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton));
-
-  label129 = gtk_label_new (_("Field Type & Co-ordinates"));
-  gtk_widget_show (label129);
-  gtk_frame_set_label_widget (GTK_FRAME (frame27), label129);
-  gtk_misc_set_padding (GTK_MISC (label129), 4, 4);
-
-  frame28 = gtk_frame_new (NULL);
-  gtk_widget_show (frame28);
-  gtk_box_pack_start (GTK_BOX (vbox18), frame28, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame28), 4);
-
-  alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment30);
-  gtk_container_add (GTK_CONTAINER (frame28), alignment30);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment30), 0, 0, 12, 0);
-
-  table19 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_show (table19);
-  gtk_container_add (GTK_CONTAINER (alignment30), table19);
-
-  nearfield_i1_label = gtk_label_new (_("NX"));
-  gtk_widget_show (nearfield_i1_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_i1_label, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_i1_label), 0.1, 0.5);
-
-  nearfield_i2_label = gtk_label_new (_("NY"));
-  gtk_widget_show (nearfield_i2_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_i2_label, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_i2_label), 0.1, 0.5);
-
-  nearfield_i3_label = gtk_label_new (_("NZ"));
-  gtk_widget_show (nearfield_i3_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_i3_label, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_i3_label), 0.1, 0.5);
-
-  nearfield_f1_label = gtk_label_new (_("X"));
-  gtk_widget_show (nearfield_f1_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_label, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f1_label), 0.1, 0.5);
-
-  nearfield_f2_label = gtk_label_new (_("Y"));
-  gtk_widget_show (nearfield_f2_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_label, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f2_label), 0.1, 0.5);
-
-  nearfield_f3_label = gtk_label_new (_("Z"));
-  gtk_widget_show (nearfield_f3_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_label, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f3_label), 0.1, 0.5);
-
-  nearfield_f4_label = gtk_label_new (_("DX"));
-  gtk_widget_show (nearfield_f4_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_label, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f4_label), 0.1, 0.5);
-
-  nearfield_f5_label = gtk_label_new (_("DY"));
-  gtk_widget_show (nearfield_f5_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_label, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f5_label), 0.1, 0.5);
-
-  nearfield_f6_label = gtk_label_new (_("DZ"));
-  gtk_widget_show (nearfield_f6_label);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_label, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (nearfield_f6_label), 0.1, 0.5);
-
-  nearfield_nx_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
-  nearfield_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nx_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (nearfield_nx_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_nx_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nx_spinbutton), TRUE);
-
-  nearfield_ny_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
-  nearfield_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_ny_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (nearfield_ny_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_ny_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_ny_spinbutton), TRUE);
-
-  nearfield_nz_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
-  nearfield_nz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nz_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (nearfield_nz_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_nz_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nz_spinbutton), TRUE);
-
-  nearfield_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  nearfield_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f1_spinbutton), TRUE);
-
-  nearfield_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  nearfield_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f2_spinbutton), TRUE);
-
-  nearfield_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  nearfield_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f3_spinbutton), TRUE);
-
-  nearfield_f4_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
-  nearfield_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f4_spinbutton), TRUE);
-
-  nearfield_f5_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
-  nearfield_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f5_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f5_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f5_spinbutton), TRUE);
-
-  nearfield_f6_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
-  nearfield_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f6_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (nearfield_f6_spinbutton);
-  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_spinbutton, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f6_spinbutton), TRUE);
-
-  label130 = gtk_label_new (_("Field Pattern Parameters"));
-  gtk_widget_show (label130);
-  gtk_frame_set_label_widget (GTK_FRAME (frame28), label130);
-  gtk_misc_set_padding (GTK_MISC (label130), 4, 4);
-
-  hbox36 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox36);
-  gtk_box_pack_start (GTK_BOX (vbox18), hbox36, TRUE, TRUE, 0);
-
-  nearfield_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (nearfield_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_new_button), 2);
-
-  nearfield_cancel_button = gtk_button_new ();
-  gtk_widget_show (nearfield_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_cancel_button), 2);
-
-  alignment62 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment62);
-  gtk_container_add (GTK_CONTAINER (nearfield_cancel_button), alignment62);
-
-  hbox60 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox60);
-  gtk_container_add (GTK_CONTAINER (alignment62), hbox60);
-
-  image82 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image82);
-  gtk_box_pack_start (GTK_BOX (hbox60), image82, FALSE, FALSE, 0);
-
-  label234 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label234);
-  gtk_box_pack_start (GTK_BOX (hbox60), label234, FALSE, FALSE, 0);
-
-  nearfield_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (nearfield_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_apply_button), 2);
-
-  nearfield_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (nearfield_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ok_button), 2);
-
-  g_signal_connect ((gpointer) nearfield_command, "destroy",
-                    G_CALLBACK (on_nearfield_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_nh_checkbutton, "toggled",
-                    G_CALLBACK (on_nearfield_nh_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_ne_checkbutton, "toggled",
-                    G_CALLBACK (on_nearfield_ne_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_rect_radiobutton, "toggled",
-                    G_CALLBACK (on_nearfield_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_sph_radiobutton, "toggled",
-                    G_CALLBACK (on_nearfield_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_nx_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_ny_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_nz_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f4_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f5_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_f6_spinbutton, "value_changed",
-                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_new_button, "clicked",
-                    G_CALLBACK (on_nearfield_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_cancel_button, "clicked",
-                    G_CALLBACK (on_nearfield_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_apply_button, "clicked",
-                    G_CALLBACK (on_nearfield_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) nearfield_ok_button, "clicked",
-                    G_CALLBACK (on_nearfield_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (nearfield_command, nearfield_command, "nearfield_command");
-  GLADE_HOOKUP_OBJECT (nearfield_command, vbox18, "vbox18");
-  GLADE_HOOKUP_OBJECT (nearfield_command, frame27, "frame27");
-  GLADE_HOOKUP_OBJECT (nearfield_command, alignment29, "alignment29");
-  GLADE_HOOKUP_OBJECT (nearfield_command, table20, "table20");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nh_checkbutton, "nearfield_nh_checkbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ne_checkbutton, "nearfield_ne_checkbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_rect_radiobutton, "nearfield_rect_radiobutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_sph_radiobutton, "nearfield_sph_radiobutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, label129, "label129");
-  GLADE_HOOKUP_OBJECT (nearfield_command, frame28, "frame28");
-  GLADE_HOOKUP_OBJECT (nearfield_command, alignment30, "alignment30");
-  GLADE_HOOKUP_OBJECT (nearfield_command, table19, "table19");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i1_label, "nearfield_i1_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i2_label, "nearfield_i2_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i3_label, "nearfield_i3_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_label, "nearfield_f1_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_label, "nearfield_f2_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_label, "nearfield_f3_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_label, "nearfield_f4_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_label, "nearfield_f5_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_label, "nearfield_f6_label");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nx_spinbutton, "nearfield_nx_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ny_spinbutton, "nearfield_ny_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nz_spinbutton, "nearfield_nz_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_spinbutton, "nearfield_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_spinbutton, "nearfield_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_spinbutton, "nearfield_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_spinbutton, "nearfield_f4_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_spinbutton, "nearfield_f5_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_spinbutton, "nearfield_f6_spinbutton");
-  GLADE_HOOKUP_OBJECT (nearfield_command, label130, "label130");
-  GLADE_HOOKUP_OBJECT (nearfield_command, hbox36, "hbox36");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_new_button, "nearfield_new_button");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_cancel_button, "nearfield_cancel_button");
-  GLADE_HOOKUP_OBJECT (nearfield_command, alignment62, "alignment62");
-  GLADE_HOOKUP_OBJECT (nearfield_command, hbox60, "hbox60");
-  GLADE_HOOKUP_OBJECT (nearfield_command, image82, "image82");
-  GLADE_HOOKUP_OBJECT (nearfield_command, label234, "label234");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_apply_button, "nearfield_apply_button");
-  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ok_button, "nearfield_ok_button");
-
-  return nearfield_command;
-}
-
-GtkWidget*
-create_radiation_command (void)
-{
-  GtkWidget *radiation_command;
-  GtkWidget *vbox19;
-  GtkWidget *frame29;
-  GtkWidget *alignment31;
-  GtkWidget *table21;
-  GtkWidget *radiation_i10_radiobutton;
-  GSList *radiation_i10_radiobutton_group = NULL;
-  GtkWidget *radiation_i16_radiobutton;
-  GtkWidget *radiation_i14_radiobutton;
-  GtkWidget *radiation_i12_radiobutton;
-  GtkWidget *radiation_i11_radiobutton;
-  GtkWidget *radiation_i13_radiobutton;
-  GtkWidget *radiation_i15_radiobutton;
-  GtkWidget *label145;
-  GtkWidget *label140;
-  GtkWidget *frame33;
-  GtkWidget *alignment35;
-  GtkWidget *table22;
-  GtkWidget *radiation_x0_radiobutton;
-  GSList *radiation_x0_radiobutton_group = NULL;
-  GtkWidget *radiation_x1_radiobutton;
-  GtkWidget *radiation_n0_radiobutton;
-  GSList *radiation_n0_radiobutton_group = NULL;
-  GtkWidget *radiation_n2_radiobutton;
-  GtkWidget *radiation_n4_radiobutton;
-  GtkWidget *radiation_d0_radiobutton;
-  GSList *radiation_d0_radiobutton_group = NULL;
-  GtkWidget *radiation_a0_radiobutton;
-  GSList *radiation_a0_radiobutton_group = NULL;
-  GtkWidget *radiation_a2_radiobutton;
-  GtkWidget *radiation_a1_radiobutton;
-  GtkWidget *radiation_d1_radiobutton;
-  GtkWidget *radiation_n5_radiobutton;
-  GtkWidget *radiation_n3_radiobutton;
-  GtkWidget *radiation_n1_radiobutton;
-  GtkWidget *label146;
-  GtkWidget *hseparator5;
-  GtkWidget *hseparator6;
-  GtkWidget *hseparator7;
-  GtkWidget *hseparator8;
-  GtkWidget *hseparator9;
-  GtkWidget *hseparator10;
-  GtkWidget *label144;
-  GtkWidget *frame31;
-  GtkWidget *alignment33;
-  GtkWidget *table23;
-  GtkWidget *radiation_f6_label;
-  GtkObject *radiation_f1_spinbutton_adj;
-  GtkWidget *radiation_f1_spinbutton;
-  GtkObject *radiation_f2_spinbutton_adj;
-  GtkWidget *radiation_f2_spinbutton;
-  GtkObject *radiation_f6_spinbutton_adj;
-  GtkWidget *radiation_f6_spinbutton;
-  GtkWidget *radiation_f1_label;
-  GtkWidget *label148;
-  GtkObject *radiation_i3_spinbutton_adj;
-  GtkWidget *radiation_i3_spinbutton;
-  GtkObject *radiation_i2_spinbutton_adj;
-  GtkWidget *radiation_i2_spinbutton;
-  GtkWidget *radiation_i1_label;
-  GtkWidget *label210;
-  GtkWidget *radiation_f3_label;
-  GtkObject *radiation_f3_spinbutton_adj;
-  GtkWidget *radiation_f3_spinbutton;
-  GtkWidget *radiation_f5_label;
-  GtkObject *radiation_f5_spinbutton_adj;
-  GtkWidget *radiation_f5_spinbutton;
-  GtkWidget *label150;
-  GtkObject *radiation_f4_spinbutton_adj;
-  GtkWidget *radiation_f4_spinbutton;
-  GtkWidget *label142;
-  GtkWidget *hbox37;
-  GtkWidget *radiation_new_button;
-  GtkWidget *radiation_cancel_button;
-  GtkWidget *alignment63;
-  GtkWidget *hbox61;
-  GtkWidget *image83;
-  GtkWidget *label235;
-  GtkWidget *radiation_apply_button;
-  GtkWidget *radiation_ok_button;
-
-  radiation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_command), 4);
-  gtk_window_set_title (GTK_WINDOW (radiation_command), _("Radiation Pattern (RP Card)"));
-  gtk_window_set_icon_name (GTK_WINDOW (radiation_command), "gtk-dialog-info");
-
-  vbox19 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox19);
-  gtk_container_add (GTK_CONTAINER (radiation_command), vbox19);
-
-  frame29 = gtk_frame_new (NULL);
-  gtk_widget_show (frame29);
-  gtk_box_pack_start (GTK_BOX (vbox19), frame29, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame29), 4);
-
-  alignment31 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment31);
-  gtk_container_add (GTK_CONTAINER (frame29), alignment31);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment31), 0, 0, 12, 0);
-
-  table21 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table21);
-  gtk_container_add (GTK_CONTAINER (alignment31), table21);
-
-  radiation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Normal (Space) Wave"));
-  gtk_widget_show (radiation_i10_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i10_radiobutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i10_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_i10_radiobutton), TRUE);
-
-  radiation_i16_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff + Radials"));
-  gtk_widget_show (radiation_i16_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i16_radiobutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i16_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton));
-
-  radiation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Radial wire screen"));
-  gtk_widget_show (radiation_i14_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i14_radiobutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i14_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton));
-
-  radiation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff"));
-  gtk_widget_show (radiation_i12_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i12_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton));
-
-  radiation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Space + Ground Wave"));
-  gtk_widget_show (radiation_i11_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i11_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i11_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton));
-
-  radiation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff"));
-  gtk_widget_show (radiation_i13_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i13_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i13_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton));
-
-  radiation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff + Radials"));
-  gtk_widget_show (radiation_i15_radiobutton);
-  gtk_table_attach (GTK_TABLE (table21), radiation_i15_radiobutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_i15_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton), radiation_i10_radiobutton_group);
-  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton));
-
-  label145 = gtk_label_new (_("<b>See GN/GD Card Documentation</b>"));
-  gtk_widget_show (label145);
-  gtk_table_attach (GTK_TABLE (table21), label145, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_label_set_use_markup (GTK_LABEL (label145), TRUE);
-  gtk_misc_set_alignment (GTK_MISC (label145), 0, 0.5);
-
-  label140 = gtk_label_new (_("Wave Type and Ground (I1)"));
-  gtk_widget_show (label140);
-  gtk_frame_set_label_widget (GTK_FRAME (frame29), label140);
-  gtk_misc_set_padding (GTK_MISC (label140), 4, 4);
-
-  frame33 = gtk_frame_new (NULL);
-  gtk_widget_show (frame33);
-  gtk_box_pack_start (GTK_BOX (vbox19), frame33, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame33), 4);
-
-  alignment35 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment35);
-  gtk_container_add (GTK_CONTAINER (frame33), alignment35);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment35), 0, 0, 12, 0);
-
-  table22 = gtk_table_new (10, 2, FALSE);
-  gtk_widget_show (table22);
-  gtk_container_add (GTK_CONTAINER (alignment35), table22);
-
-  radiation_x0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major & Minor Axis & Total Gain"));
-  gtk_widget_show (radiation_x0_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_x0_radiobutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_x0_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton), radiation_x0_radiobutton_group);
-  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton));
-
-  radiation_x1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical, Horizontal & Total Gain"));
-  gtk_widget_show (radiation_x1_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_x1_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_x1_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton), radiation_x0_radiobutton_group);
-  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_x1_radiobutton), TRUE);
-
-  radiation_n0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Normalized Gain"));
-  gtk_widget_show (radiation_n0_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n0_radiobutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n0_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_n0_radiobutton), TRUE);
-
-  radiation_n2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Minor Axis Gain Normalized"));
-  gtk_widget_show (radiation_n2_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n2_radiobutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n2_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton));
-
-  radiation_n4_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Horizontal Axis Gain Normalized"));
-  gtk_widget_show (radiation_n4_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n4_radiobutton, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n4_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton));
-
-  radiation_d0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Power Gain"));
-  gtk_widget_show (radiation_d0_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_d0_radiobutton, 0, 1, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_d0_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton), radiation_d0_radiobutton_group);
-  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_d0_radiobutton), TRUE);
-
-  radiation_a0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Gain Averaging"));
-  gtk_widget_show (radiation_a0_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_a0_radiobutton, 0, 1, 8, 9,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_a0_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton), radiation_a0_radiobutton_group);
-  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton));
-
-  radiation_a2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Points in Average Not Printed"));
-  gtk_widget_show (radiation_a2_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_a2_radiobutton, 0, 1, 9, 10,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_a2_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton), radiation_a0_radiobutton_group);
-  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton));
-
-  radiation_a1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Average Gain Computed"));
-  gtk_widget_show (radiation_a1_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_a1_radiobutton, 1, 2, 8, 9,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_a1_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton), radiation_a0_radiobutton_group);
-  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton));
-
-  radiation_d1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Directive Gain"));
-  gtk_widget_show (radiation_d1_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_d1_radiobutton, 1, 2, 6, 7,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_d1_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton), radiation_d0_radiobutton_group);
-  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton));
-
-  radiation_n5_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Total Gain Normalized"));
-  gtk_widget_show (radiation_n5_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n5_radiobutton, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n5_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton));
-
-  radiation_n3_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical Axis Gain Normalized"));
-  gtk_widget_show (radiation_n3_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n3_radiobutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n3_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton));
-
-  radiation_n1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major Axis Gain Normalized"));
-  gtk_widget_show (radiation_n1_radiobutton);
-  gtk_table_attach (GTK_TABLE (table22), radiation_n1_radiobutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_n1_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton), radiation_n0_radiobutton_group);
-  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton));
-
-  label146 = gtk_label_new (_("<b>See RP Card Documentation</b>"));
-  gtk_widget_show (label146);
-  gtk_table_attach (GTK_TABLE (table22), label146, 1, 2, 9, 10,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_label_set_use_markup (GTK_LABEL (label146), TRUE);
-  gtk_misc_set_alignment (GTK_MISC (label146), 0, 0.5);
-
-  hseparator5 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator5);
-  gtk_table_attach (GTK_TABLE (table22), hseparator5, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  hseparator6 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator6);
-  gtk_table_attach (GTK_TABLE (table22), hseparator6, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  hseparator7 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator7);
-  gtk_table_attach (GTK_TABLE (table22), hseparator7, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  hseparator8 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator8);
-  gtk_table_attach (GTK_TABLE (table22), hseparator8, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  hseparator9 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator9);
-  gtk_table_attach (GTK_TABLE (table22), hseparator9, 0, 1, 7, 8,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  hseparator10 = gtk_hseparator_new ();
-  gtk_widget_show (hseparator10);
-  gtk_table_attach (GTK_TABLE (table22), hseparator10, 1, 2, 7, 8,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  label144 = gtk_label_new (_("Data Output Control (XNDA)"));
-  gtk_widget_show (label144);
-  gtk_frame_set_label_widget (GTK_FRAME (frame33), label144);
-  gtk_misc_set_padding (GTK_MISC (label144), 4, 4);
-
-  frame31 = gtk_frame_new (NULL);
-  gtk_widget_show (frame31);
-  gtk_box_pack_start (GTK_BOX (vbox19), frame31, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame31), 5);
-
-  alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment33);
-  gtk_container_add (GTK_CONTAINER (frame31), alignment33);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment33), 0, 0, 12, 0);
-
-  table23 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_show (table23);
-  gtk_container_add (GTK_CONTAINER (alignment33), table23);
-
-  radiation_f6_label = gtk_label_new (_("Gain Normalization"));
-  gtk_widget_show (radiation_f6_label);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f6_label, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (radiation_f6_label), 0.1, 0.5);
-
-  radiation_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  radiation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f1_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f1_spinbutton), TRUE);
-
-  radiation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  radiation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f2_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f2_spinbutton), TRUE);
-
-  radiation_f6_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
-  radiation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f6_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f6_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f6_spinbutton, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f6_spinbutton), TRUE);
-
-  radiation_f1_label = gtk_label_new (_("Initial Theta (deg)"));
-  gtk_widget_show (radiation_f1_label);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f1_label, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (radiation_f1_label), 0.1, 0.5);
-
-  label148 = gtk_label_new (_("Initial Phi (deg)"));
-  gtk_widget_show (label148);
-  gtk_table_attach (GTK_TABLE (table23), label148, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label148), 0.1, 0.5);
-
-  radiation_i3_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
-  radiation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i3_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (radiation_i3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_i3_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i3_spinbutton), TRUE);
-
-  radiation_i2_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
-  radiation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i2_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (radiation_i2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_i2_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i2_spinbutton), TRUE);
-
-  radiation_i1_label = gtk_label_new (_("Points in Phi"));
-  gtk_widget_show (radiation_i1_label);
-  gtk_table_attach (GTK_TABLE (table23), radiation_i1_label, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (radiation_i1_label), 0.1, 0.5);
-
-  label210 = gtk_label_new (_("Points in Theta"));
-  gtk_widget_show (label210);
-  gtk_table_attach (GTK_TABLE (table23), label210, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label210), 0.1, 0.5);
-
-  radiation_f3_label = gtk_label_new (_("Increment in Theta"));
-  gtk_widget_show (radiation_f3_label);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f3_label, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (radiation_f3_label), 0.1, 0.5);
-
-  radiation_f3_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
-  radiation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f3_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f3_spinbutton), TRUE);
-
-  radiation_f5_label = gtk_label_new (_("Field Point Distance"));
-  gtk_widget_show (radiation_f5_label);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f5_label, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (radiation_f5_label), 0.1, 0.5);
-
-  radiation_f5_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
-  radiation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f5_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f5_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f5_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f5_spinbutton), TRUE);
-
-  label150 = gtk_label_new (_("Increment in Phi"));
-  gtk_widget_show (label150);
-  gtk_table_attach (GTK_TABLE (table23), label150, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label150), 0.1, 0.5);
-
-  radiation_f4_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
-  radiation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (radiation_f4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table23), radiation_f4_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f4_spinbutton), TRUE);
-
-  label142 = gtk_label_new (_("Radiation Pattern Parameters"));
-  gtk_widget_show (label142);
-  gtk_frame_set_label_widget (GTK_FRAME (frame31), label142);
-  gtk_misc_set_padding (GTK_MISC (label142), 4, 4);
-
-  hbox37 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox37);
-  gtk_box_pack_start (GTK_BOX (vbox19), hbox37, TRUE, TRUE, 0);
-
-  radiation_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (radiation_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox37), radiation_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_new_button), 2);
-
-  radiation_cancel_button = gtk_button_new ();
-  gtk_widget_show (radiation_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox37), radiation_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_cancel_button), 2);
-
-  alignment63 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment63);
-  gtk_container_add (GTK_CONTAINER (radiation_cancel_button), alignment63);
-
-  hbox61 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox61);
-  gtk_container_add (GTK_CONTAINER (alignment63), hbox61);
-
-  image83 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image83);
-  gtk_box_pack_start (GTK_BOX (hbox61), image83, FALSE, FALSE, 0);
-
-  label235 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label235);
-  gtk_box_pack_start (GTK_BOX (hbox61), label235, FALSE, FALSE, 0);
-
-  radiation_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (radiation_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox37), radiation_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_apply_button), 2);
-
-  radiation_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (radiation_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox37), radiation_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (radiation_ok_button), 2);
-
-  g_signal_connect ((gpointer) radiation_command, "destroy",
-                    G_CALLBACK (on_radiation_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i10_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i16_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i14_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i12_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i11_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i13_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i15_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_x0_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_x1_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n0_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n2_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n4_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_d0_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_a0_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_a2_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_a1_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_d1_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n5_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n3_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_n1_radiobutton, "toggled",
-                    G_CALLBACK (on_radiation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f6_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i3_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_i2_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f5_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_f4_spinbutton, "value_changed",
-                    G_CALLBACK (on_radiation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_new_button, "clicked",
-                    G_CALLBACK (on_radiation_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_cancel_button, "clicked",
-                    G_CALLBACK (on_radiation_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_apply_button, "clicked",
-                    G_CALLBACK (on_radiation_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) radiation_ok_button, "clicked",
-                    G_CALLBACK (on_radiation_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (radiation_command, radiation_command, "radiation_command");
-  GLADE_HOOKUP_OBJECT (radiation_command, vbox19, "vbox19");
-  GLADE_HOOKUP_OBJECT (radiation_command, frame29, "frame29");
-  GLADE_HOOKUP_OBJECT (radiation_command, alignment31, "alignment31");
-  GLADE_HOOKUP_OBJECT (radiation_command, table21, "table21");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i10_radiobutton, "radiation_i10_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i16_radiobutton, "radiation_i16_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i14_radiobutton, "radiation_i14_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i12_radiobutton, "radiation_i12_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i11_radiobutton, "radiation_i11_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i13_radiobutton, "radiation_i13_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i15_radiobutton, "radiation_i15_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, label145, "label145");
-  GLADE_HOOKUP_OBJECT (radiation_command, label140, "label140");
-  GLADE_HOOKUP_OBJECT (radiation_command, frame33, "frame33");
-  GLADE_HOOKUP_OBJECT (radiation_command, alignment35, "alignment35");
-  GLADE_HOOKUP_OBJECT (radiation_command, table22, "table22");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x0_radiobutton, "radiation_x0_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x1_radiobutton, "radiation_x1_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n0_radiobutton, "radiation_n0_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n2_radiobutton, "radiation_n2_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n4_radiobutton, "radiation_n4_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d0_radiobutton, "radiation_d0_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a0_radiobutton, "radiation_a0_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a2_radiobutton, "radiation_a2_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a1_radiobutton, "radiation_a1_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d1_radiobutton, "radiation_d1_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n5_radiobutton, "radiation_n5_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n3_radiobutton, "radiation_n3_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n1_radiobutton, "radiation_n1_radiobutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, label146, "label146");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator5, "hseparator5");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator6, "hseparator6");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator7, "hseparator7");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator8, "hseparator8");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator9, "hseparator9");
-  GLADE_HOOKUP_OBJECT (radiation_command, hseparator10, "hseparator10");
-  GLADE_HOOKUP_OBJECT (radiation_command, label144, "label144");
-  GLADE_HOOKUP_OBJECT (radiation_command, frame31, "frame31");
-  GLADE_HOOKUP_OBJECT (radiation_command, alignment33, "alignment33");
-  GLADE_HOOKUP_OBJECT (radiation_command, table23, "table23");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_label, "radiation_f6_label");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_spinbutton, "radiation_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f2_spinbutton, "radiation_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_spinbutton, "radiation_f6_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_label, "radiation_f1_label");
-  GLADE_HOOKUP_OBJECT (radiation_command, label148, "label148");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i3_spinbutton, "radiation_i3_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i2_spinbutton, "radiation_i2_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i1_label, "radiation_i1_label");
-  GLADE_HOOKUP_OBJECT (radiation_command, label210, "label210");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_label, "radiation_f3_label");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_spinbutton, "radiation_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_label, "radiation_f5_label");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_spinbutton, "radiation_f5_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, label150, "label150");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f4_spinbutton, "radiation_f4_spinbutton");
-  GLADE_HOOKUP_OBJECT (radiation_command, label142, "label142");
-  GLADE_HOOKUP_OBJECT (radiation_command, hbox37, "hbox37");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_new_button, "radiation_new_button");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_cancel_button, "radiation_cancel_button");
-  GLADE_HOOKUP_OBJECT (radiation_command, alignment63, "alignment63");
-  GLADE_HOOKUP_OBJECT (radiation_command, hbox61, "hbox61");
-  GLADE_HOOKUP_OBJECT (radiation_command, image83, "image83");
-  GLADE_HOOKUP_OBJECT (radiation_command, label235, "label235");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_apply_button, "radiation_apply_button");
-  GLADE_HOOKUP_OBJECT (radiation_command, radiation_ok_button, "radiation_ok_button");
-
-  return radiation_command;
-}
-
-GtkWidget*
-create_excitation_command (void)
-{
-  GtkWidget *excitation_command;
-  GtkWidget *vbox20;
-  GtkWidget *frame34;
-  GtkWidget *alignment36;
-  GtkWidget *table24;
-  GtkWidget *excitation_i10_radiobutton;
-  GSList *excitation_i10_radiobutton_group = NULL;
-  GtkWidget *excitation_i11_radiobutton;
-  GtkWidget *excitation_i12_radiobutton;
-  GtkWidget *excitation_i13_radiobutton;
-  GtkWidget *excitation_i15_radiobutton;
-  GtkWidget *excitation_i14_radiobutton;
-  GtkWidget *label153;
-  GtkWidget *frame35;
-  GtkWidget *alignment37;
-  GtkWidget *hbox39;
-  GtkWidget *excitation_i419_checkbutton;
-  GtkWidget *excitation_i420_checkbutton;
-  GtkWidget *label154;
-  GtkWidget *frame36;
-  GtkWidget *alignment38;
-  GtkWidget *table25;
-  GtkWidget *excitation_i2_label;
-  GtkWidget *excitation_i3_label;
-  GtkWidget *excitation_f1_label;
-  GtkWidget *excitation_f2_label;
-  GtkWidget *excitation_f3_label;
-  GtkWidget *excitation_f4_label;
-  GtkWidget *excitation_f5_label;
-  GtkWidget *excitation_f6_label;
-  GtkObject *excitation_i2_spinbutton_adj;
-  GtkWidget *excitation_i2_spinbutton;
-  GtkObject *excitation_i3_spinbutton_adj;
-  GtkWidget *excitation_i3_spinbutton;
-  GtkObject *excitation_f2_spinbutton_adj;
-  GtkWidget *excitation_f2_spinbutton;
-  GtkObject *excitation_f3_spinbutton_adj;
-  GtkWidget *excitation_f3_spinbutton;
-  GtkObject *excitation_f4_spinbutton_adj;
-  GtkWidget *excitation_f4_spinbutton;
-  GtkObject *excitation_f5_spinbutton_adj;
-  GtkWidget *excitation_f5_spinbutton;
-  GtkObject *excitation_f6_spinbutton_adj;
-  GtkWidget *excitation_f6_spinbutton;
-  GtkObject *excitation_f1_spinbutton_adj;
-  GtkWidget *excitation_f1_spinbutton;
-  GtkWidget *label155;
-  GtkWidget *hbox38;
-  GtkWidget *excitation_new_button;
-  GtkWidget *excitation_cancel_button;
-  GtkWidget *alignment64;
-  GtkWidget *hbox62;
-  GtkWidget *image84;
-  GtkWidget *label236;
-  GtkWidget *excitation_apply_button;
-  GtkWidget *excitation_ok_button;
-
-  excitation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_command), 4);
-  gtk_window_set_title (GTK_WINDOW (excitation_command), _("Excitation Command (EX Card)"));
-
-  vbox20 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox20);
-  gtk_container_add (GTK_CONTAINER (excitation_command), vbox20);
-
-  frame34 = gtk_frame_new (NULL);
-  gtk_widget_show (frame34);
-  gtk_box_pack_start (GTK_BOX (vbox20), frame34, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame34), 4);
-
-  alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment36);
-  gtk_container_add (GTK_CONTAINER (frame34), alignment36);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment36), 0, 0, 12, 0);
-
-  table24 = gtk_table_new (2, 3, FALSE);
-  gtk_widget_show (table24);
-  gtk_container_add (GTK_CONTAINER (alignment36), table24);
-
-  excitation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Voltage Source"));
-  gtk_widget_show (excitation_i10_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i10_radiobutton, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i10_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (excitation_i10_radiobutton), TRUE);
-
-  excitation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident Linear Wave "));
-  gtk_widget_show (excitation_i11_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i11_radiobutton, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i11_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton));
-
-  excitation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident RH Wave"));
-  gtk_widget_show (excitation_i12_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i12_radiobutton, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i12_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton));
-
-  excitation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident LH Wave"));
-  gtk_widget_show (excitation_i13_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i13_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i13_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton));
-
-  excitation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Slope Discontinuity"));
-  gtk_widget_show (excitation_i15_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i15_radiobutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i15_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton));
-
-  excitation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Source"));
-  gtk_widget_show (excitation_i14_radiobutton);
-  gtk_table_attach (GTK_TABLE (table24), excitation_i14_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i14_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton), excitation_i10_radiobutton_group);
-  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton));
-
-  label153 = gtk_label_new (_("Excitation Type"));
-  gtk_widget_show (label153);
-  gtk_frame_set_label_widget (GTK_FRAME (frame34), label153);
-  gtk_misc_set_padding (GTK_MISC (label153), 4, 4);
-
-  frame35 = gtk_frame_new (NULL);
-  gtk_widget_show (frame35);
-  gtk_box_pack_start (GTK_BOX (vbox20), frame35, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame35), 4);
-
-  alignment37 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment37);
-  gtk_container_add (GTK_CONTAINER (frame35), alignment37);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment37), 0, 0, 12, 0);
-
-  hbox39 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox39);
-  gtk_container_add (GTK_CONTAINER (alignment37), hbox39);
-
-  excitation_i419_checkbutton = gtk_check_button_new_with_mnemonic (_("Maximum Admittance Matrix Asymmetry"));
-  gtk_widget_show (excitation_i419_checkbutton);
-  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i419_checkbutton, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i419_checkbutton), 2);
-
-  excitation_i420_checkbutton = gtk_check_button_new_with_mnemonic (_("Impedance of Source Segment"));
-  gtk_widget_show (excitation_i420_checkbutton);
-  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i420_checkbutton, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_i420_checkbutton), 2);
-
-  label154 = gtk_label_new (_("Print Control"));
-  gtk_widget_show (label154);
-  gtk_frame_set_label_widget (GTK_FRAME (frame35), label154);
-  gtk_misc_set_padding (GTK_MISC (label154), 4, 4);
-
-  frame36 = gtk_frame_new (NULL);
-  gtk_widget_show (frame36);
-  gtk_box_pack_start (GTK_BOX (vbox20), frame36, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame36), 4);
-
-  alignment38 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment38);
-  gtk_container_add (GTK_CONTAINER (frame36), alignment38);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment38), 0, 0, 12, 0);
-
-  table25 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_show (table25);
-  gtk_container_add (GTK_CONTAINER (alignment38), table25);
-
-  excitation_i2_label = gtk_label_new (_("Tag Number"));
-  gtk_widget_show (excitation_i2_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_i2_label, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_i2_label), 0.1, 0.5);
-
-  excitation_i3_label = gtk_label_new (_("Segment Number"));
-  gtk_widget_show (excitation_i3_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_i3_label, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_i3_label), 0.1, 0.5);
-
-  excitation_f1_label = gtk_label_new (_("Voltage - Real Part"));
-  gtk_widget_show (excitation_f1_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f1_label, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f1_label), 0.1, 0.5);
-
-  excitation_f2_label = gtk_label_new (_("Voltage - Imaginary Part"));
-  gtk_widget_show (excitation_f2_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f2_label, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f2_label), 0.1, 0.5);
-
-  excitation_f3_label = gtk_label_new (_("Eta"));
-  gtk_widget_show (excitation_f3_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f3_label, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f3_label), 0.1, 0.5);
-
-  excitation_f4_label = gtk_label_new (_("Theta"));
-  gtk_widget_show (excitation_f4_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f4_label, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f4_label), 0.1, 0.5);
-
-  excitation_f5_label = gtk_label_new (_("Phi"));
-  gtk_widget_show (excitation_f5_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f5_label, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f5_label), 0.1, 0.5);
-
-  excitation_f6_label = gtk_label_new (_("Ratio"));
-  gtk_widget_show (excitation_f6_label);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f6_label, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (excitation_f6_label), 0.1, 0.5);
-
-  excitation_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  excitation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i2_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (excitation_i2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_i2_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i2_spinbutton), TRUE);
-
-  excitation_i3_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  excitation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i3_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (excitation_i3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_i3_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i3_spinbutton), TRUE);
-
-  excitation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f2_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f2_spinbutton), TRUE);
-
-  excitation_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f3_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f3_spinbutton), TRUE);
-
-  excitation_f4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f4_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f4_spinbutton), TRUE);
-
-  excitation_f5_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f5_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f5_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f5_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f5_spinbutton), TRUE);
-
-  excitation_f6_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f6_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f6_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f6_spinbutton, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f6_spinbutton), TRUE);
-
-  excitation_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  excitation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (excitation_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table25), excitation_f1_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f1_spinbutton), TRUE);
-
-  label155 = gtk_label_new (_("Excitation Parameters"));
-  gtk_widget_show (label155);
-  gtk_frame_set_label_widget (GTK_FRAME (frame36), label155);
-  gtk_misc_set_padding (GTK_MISC (label155), 4, 4);
-
-  hbox38 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox38);
-  gtk_box_pack_start (GTK_BOX (vbox20), hbox38, TRUE, TRUE, 0);
-
-  excitation_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (excitation_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox38), excitation_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_new_button), 2);
-
-  excitation_cancel_button = gtk_button_new ();
-  gtk_widget_show (excitation_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox38), excitation_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_cancel_button), 2);
-
-  alignment64 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment64);
-  gtk_container_add (GTK_CONTAINER (excitation_cancel_button), alignment64);
-
-  hbox62 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox62);
-  gtk_container_add (GTK_CONTAINER (alignment64), hbox62);
-
-  image84 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image84);
-  gtk_box_pack_start (GTK_BOX (hbox62), image84, FALSE, FALSE, 0);
-
-  label236 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label236);
-  gtk_box_pack_start (GTK_BOX (hbox62), label236, FALSE, FALSE, 0);
-
-  excitation_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (excitation_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox38), excitation_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_apply_button), 2);
-
-  excitation_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (excitation_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox38), excitation_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (excitation_ok_button), 2);
-
-  g_signal_connect ((gpointer) excitation_command, "destroy",
-                    G_CALLBACK (on_excitation_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i10_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i11_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i12_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i13_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i15_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i14_radiobutton, "toggled",
-                    G_CALLBACK (on_excitation_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i419_checkbutton, "toggled",
-                    G_CALLBACK (on_excitation_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i420_checkbutton, "toggled",
-                    G_CALLBACK (on_excitation_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i2_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_i3_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f4_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f5_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f6_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_excitation_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_new_button, "clicked",
-                    G_CALLBACK (on_excitation_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_cancel_button, "clicked",
-                    G_CALLBACK (on_excitation_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_apply_button, "clicked",
-                    G_CALLBACK (on_excitation_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) excitation_ok_button, "clicked",
-                    G_CALLBACK (on_excitation_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (excitation_command, excitation_command, "excitation_command");
-  GLADE_HOOKUP_OBJECT (excitation_command, vbox20, "vbox20");
-  GLADE_HOOKUP_OBJECT (excitation_command, frame34, "frame34");
-  GLADE_HOOKUP_OBJECT (excitation_command, alignment36, "alignment36");
-  GLADE_HOOKUP_OBJECT (excitation_command, table24, "table24");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i10_radiobutton, "excitation_i10_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i11_radiobutton, "excitation_i11_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i12_radiobutton, "excitation_i12_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i13_radiobutton, "excitation_i13_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i15_radiobutton, "excitation_i15_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i14_radiobutton, "excitation_i14_radiobutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, label153, "label153");
-  GLADE_HOOKUP_OBJECT (excitation_command, frame35, "frame35");
-  GLADE_HOOKUP_OBJECT (excitation_command, alignment37, "alignment37");
-  GLADE_HOOKUP_OBJECT (excitation_command, hbox39, "hbox39");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i419_checkbutton, "excitation_i419_checkbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i420_checkbutton, "excitation_i420_checkbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, label154, "label154");
-  GLADE_HOOKUP_OBJECT (excitation_command, frame36, "frame36");
-  GLADE_HOOKUP_OBJECT (excitation_command, alignment38, "alignment38");
-  GLADE_HOOKUP_OBJECT (excitation_command, table25, "table25");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_label, "excitation_i2_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_label, "excitation_i3_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_label, "excitation_f1_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_label, "excitation_f2_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_label, "excitation_f3_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_label, "excitation_f4_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_label, "excitation_f5_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_label, "excitation_f6_label");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_spinbutton, "excitation_i2_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_spinbutton, "excitation_i3_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_spinbutton, "excitation_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_spinbutton, "excitation_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_spinbutton, "excitation_f4_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_spinbutton, "excitation_f5_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_spinbutton, "excitation_f6_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_spinbutton, "excitation_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (excitation_command, label155, "label155");
-  GLADE_HOOKUP_OBJECT (excitation_command, hbox38, "hbox38");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_new_button, "excitation_new_button");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_cancel_button, "excitation_cancel_button");
-  GLADE_HOOKUP_OBJECT (excitation_command, alignment64, "alignment64");
-  GLADE_HOOKUP_OBJECT (excitation_command, hbox62, "hbox62");
-  GLADE_HOOKUP_OBJECT (excitation_command, image84, "image84");
-  GLADE_HOOKUP_OBJECT (excitation_command, label236, "label236");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_apply_button, "excitation_apply_button");
-  GLADE_HOOKUP_OBJECT (excitation_command, excitation_ok_button, "excitation_ok_button");
-
-  return excitation_command;
-}
+#include "interface.h"
+#include "shared.h"
 
-GtkWidget*
-create_frequency_command (void)
+/* Gtk_Builder()
+ *
+ * Returns a GtkBuilder with required objects from file
+ */
+  static void
+Gtk_Builder( GtkBuilder **builder, gchar **object_ids )
 {
-  GtkWidget *frequency_command;
-  GtkWidget *vbox21;
-  GtkWidget *frame37;
-  GtkWidget *alignment39;
-  GtkWidget *hbox41;
-  GtkWidget *frequency_add_radiobutton;
-  GSList *frequency_add_radiobutton_group = NULL;
-  GtkWidget *frequency_mul_radiobutton;
-  GtkWidget *label165;
-  GtkWidget *frame38;
-  GtkWidget *alignment40;
-  GtkWidget *table26;
-  GtkWidget *label167;
-  GtkWidget *label168;
-  GtkObject *frequency_num_spinbutton_adj;
-  GtkWidget *frequency_num_spinbutton;
-  GtkObject *frequency_step_spinbutton_adj;
-  GtkWidget *frequency_step_spinbutton;
-  GtkWidget *label170;
-  GtkWidget *label171;
-  GtkObject *frequency_start_spinbutton_adj;
-  GtkWidget *frequency_start_spinbutton;
-  GtkObject *frequency_end_spinbutton_adj;
-  GtkWidget *frequency_end_spinbutton;
-  GtkWidget *label166;
-  GtkWidget *hbox40;
-  GtkWidget *frequency_new_button;
-  GtkWidget *frequency_cancel_button;
-  GtkWidget *alignment65;
-  GtkWidget *hbox63;
-  GtkWidget *image85;
-  GtkWidget *label237;
-  GtkWidget *frequency_apply_button;
-  GtkWidget *frequency_ok_button;
-
-  frequency_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_command), 4);
-  gtk_window_set_title (GTK_WINDOW (frequency_command), _("Frequecy Command (FR Card)"));
-
-  vbox21 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox21);
-  gtk_container_add (GTK_CONTAINER (frequency_command), vbox21);
-
-  frame37 = gtk_frame_new (NULL);
-  gtk_widget_show (frame37);
-  gtk_box_pack_start (GTK_BOX (vbox21), frame37, TRUE, TRUE, 0);
-
-  alignment39 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment39);
-  gtk_container_add (GTK_CONTAINER (frame37), alignment39);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment39), 0, 0, 12, 0);
-
-  hbox41 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_show (hbox41);
-  gtk_container_add (GTK_CONTAINER (alignment39), hbox41);
-
-  frequency_add_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Additive Stepping"));
-  gtk_widget_show (frequency_add_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox41), frequency_add_radiobutton, TRUE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_add_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_add_radiobutton), frequency_add_radiobutton_group);
-  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_add_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (frequency_add_radiobutton), TRUE);
+  GError *gerror = NULL;
+  int ret = 0;
+
+  /* Create a builder from object ids */
+  *builder = gtk_builder_new();
+  ret = (int)gtk_builder_add_objects_from_file(
+	  *builder, xnec2c_glade, object_ids, &gerror );
+  if( !ret )
+  {
+	fprintf( stderr, "Xnec2c: failed to add objects to builder:\n%s\n",
+		gerror->message );
+
+	fprintf( stderr, "Xnec2c: Listing Object Ids:\n" );
+	int idx = 0;
+	while( object_ids[idx] != NULL )
+	{
+	  fprintf( stderr, "%s\n", object_ids[idx] );
+	  idx++;
+	}
+
+	exit( -1 );
+  }
+
+  /* Connect signals if gmodule is supported */
+  if( !g_module_supported() )
+  {
+	fprintf( stderr, "Xnec2c: lib gmodule not supported\n" );
+	exit( -1 );
+  }
+  gtk_builder_connect_signals( *builder, NULL );
+
+} /* Gtk_Builder() */
+
+/*------------------------------------------------------------------*/
+
+/* Builder_Get_Object()
+ *
+ * Gets a named object from the GtkBuilder builder object
+ */
+  GtkWidget *
+Builder_Get_Object( GtkBuilder *builder, gchar *name )
+{
+  GObject *object = gtk_builder_get_object( builder, name );
+  if( object == NULL )
+  {
+	fprintf( stderr,
+		"!! Xnec2c: builder failed to get named object: %s\n", name );
+	exit( -1 );
+  }
 
-  frequency_mul_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Multiplicative Stepping"));
-  gtk_widget_show (frequency_mul_radiobutton);
-  gtk_box_pack_start (GTK_BOX (hbox41), frequency_mul_radiobutton, TRUE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_mul_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton), frequency_add_radiobutton_group);
-  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton));
+  return( GTK_WIDGET(object) );
+} /* Builder_Get_Object() */
 
-  label165 = gtk_label_new (_("Frequency Stepping"));
-  gtk_widget_show (label165);
-  gtk_frame_set_label_widget (GTK_FRAME (frame37), label165);
-  gtk_misc_set_padding (GTK_MISC (label165), 4, 4);
+/*------------------------------------------------------------------*/
 
-  frame38 = gtk_frame_new (NULL);
-  gtk_widget_show (frame38);
-  gtk_box_pack_start (GTK_BOX (vbox21), frame38, TRUE, TRUE, 0);
+  GtkWidget *
+create_main_window( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { MAIN_WINDOW_IDS };
+  Gtk_Builder( builder, object_ids );
+  main_window = Builder_Get_Object( *builder, "main_window" );
+  return main_window;
+}
 
-  alignment40 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment40);
-  gtk_container_add (GTK_CONTAINER (frame38), alignment40);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment40), 0, 0, 12, 0);
+  GtkWidget *
+create_filechooserdialog( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { FILECHOOSER_DIALOG_IDS };
+  Gtk_Builder( builder, object_ids );
+  GtkWidget *filechooserdialog = Builder_Get_Object( *builder, "filechooserdialog" );
+  return filechooserdialog;
+}
 
-  table26 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table26);
-  gtk_container_add (GTK_CONTAINER (alignment40), table26);
+  GtkWidget *
+create_freqplots_window( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { FREQPLOTS_WINDOW_IDS };
+  Gtk_Builder( builder, object_ids );
+  freqplots_window = Builder_Get_Object( *builder, "freqplots_window" );
+  return freqplots_window;
+}
 
-  label167 = gtk_label_new (_("No. Frequency Points"));
-  gtk_widget_show (label167);
-  gtk_table_attach (GTK_TABLE (table26), label167, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label167), 0.1, 0.5);
+  GtkWidget *
+create_rdpattern_window( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { RDPATTERN_WINDOW_IDS };
+  Gtk_Builder( builder, object_ids );
+  rdpattern_window = Builder_Get_Object( *builder, "rdpattern_window" );
+  return rdpattern_window;
+}
 
-  label168 = gtk_label_new (_("Frequency Step (MHz)"));
-  gtk_widget_show (label168);
-  gtk_table_attach (GTK_TABLE (table26), label168, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label168), 0.1, 0.5);
+  GtkWidget *
+create_quit_dialog( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { QUIT_DIALOG_IDS };
+  Gtk_Builder( builder, object_ids );
+  quit_dialog = Builder_Get_Object( *builder, "quit_dialog" );
+  return quit_dialog;
+}
 
-  frequency_num_spinbutton_adj = gtk_adjustment_new (11, 1, 10000, 1, 10, 0);
-  frequency_num_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_num_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (frequency_num_spinbutton);
-  gtk_table_attach (GTK_TABLE (table26), frequency_num_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_num_spinbutton), TRUE);
+  GtkWidget *
+create_error_dialog( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { ERROR_DIALOG_IDS };
+  Gtk_Builder( builder, object_ids );
+  error_dialog = Builder_Get_Object( *builder, "error_dialog" );
+  return error_dialog;
+}
 
-  frequency_step_spinbutton_adj = gtk_adjustment_new (0.10000000149, -1000, 1000, 9.99999974738e-06, 10, 0);
-  frequency_step_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_step_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (frequency_step_spinbutton);
-  gtk_table_attach (GTK_TABLE (table26), frequency_step_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_step_spinbutton), TRUE);
+  GtkWidget *
+create_animate_dialog( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { ANIMATE_DIALOG_IDS };
+  Gtk_Builder( builder, object_ids );
+  animate_dialog = Builder_Get_Object( *builder, "animate_dialog" );
+  return animate_dialog;
+}
 
-  label170 = gtk_label_new (_("Start Frequency (MHz)"));
-  gtk_widget_show (label170);
-  gtk_table_attach (GTK_TABLE (table26), label170, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label170), 0.1, 0.5);
+  GtkWidget *
+create_nec2_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { NEC2_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  GtkWidget *nec2_editor = Builder_Get_Object( *builder, "nec2_editor" );
+  return nec2_editor;
+}
 
-  label171 = gtk_label_new (_("End Frequency (MHz)"));
-  gtk_widget_show (label171);
-  gtk_table_attach (GTK_TABLE (table26), label171, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label171), 0.1, 0.5);
+  GtkWidget *
+create_wire_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { WIRE_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  wire_editor = Builder_Get_Object( *builder, "wire_editor" );
+  return wire_editor;
+}
 
-  frequency_start_spinbutton_adj = gtk_adjustment_new (50, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  frequency_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_start_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (frequency_start_spinbutton);
-  gtk_table_attach (GTK_TABLE (table26), frequency_start_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_start_spinbutton), TRUE);
+  GtkWidget *
+create_patch_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { PATCH_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  patch_editor = Builder_Get_Object( *builder, "patch_editor" );
+  return patch_editor;
+}
 
-  frequency_end_spinbutton_adj = gtk_adjustment_new (100, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  frequency_end_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_end_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (frequency_end_spinbutton);
-  gtk_table_attach (GTK_TABLE (table26), frequency_end_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_end_spinbutton), TRUE);
+  GtkWidget *
+create_arc_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { ARC_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  arc_editor = Builder_Get_Object( *builder, "arc_editor" );
+  return arc_editor;
+}
 
-  label166 = gtk_label_new (_("Frequency Stepping Parameters"));
-  gtk_widget_show (label166);
-  gtk_frame_set_label_widget (GTK_FRAME (frame38), label166);
-  gtk_misc_set_padding (GTK_MISC (label166), 4, 4);
+  GtkWidget *
+create_transform_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { TRANSFORM_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  transform_editor = Builder_Get_Object( *builder, "transform_editor" );
+  return transform_editor;
+}
 
-  hbox40 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox40);
-  gtk_box_pack_start (GTK_BOX (vbox21), hbox40, FALSE, FALSE, 0);
+  GtkWidget *
+create_helix_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { HELIX_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  helix_editor = Builder_Get_Object( *builder, "helix_editor" );
+  return helix_editor;
+}
 
-  frequency_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (frequency_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox40), frequency_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_new_button), 2);
+  GtkWidget *
+create_reflect_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { REFLECT_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  reflect_editor = Builder_Get_Object( *builder, "reflect_editor" );
+  return reflect_editor;
+}
 
-  frequency_cancel_button = gtk_button_new ();
-  gtk_widget_show (frequency_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox40), frequency_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_cancel_button), 2);
+  GtkWidget *
+create_scale_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { SCALE_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  scale_editor = Builder_Get_Object( *builder, "scale_editor" );
+  return scale_editor;
+}
 
-  alignment65 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment65);
-  gtk_container_add (GTK_CONTAINER (frequency_cancel_button), alignment65);
+  GtkWidget *
+create_cylinder_editor( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { CYLINDER_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  cylinder_editor = Builder_Get_Object( *builder, "cylinder_editor" );
+  return cylinder_editor;
+}
 
-  hbox63 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox63);
-  gtk_container_add (GTK_CONTAINER (alignment65), hbox63);
+  GtkWidget *
+create_kernel_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { KERNEL_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  kernel_command = Builder_Get_Object( *builder, "kernel_command" );
+  return kernel_command;
+}
 
-  image85 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image85);
-  gtk_box_pack_start (GTK_BOX (hbox63), image85, FALSE, FALSE, 0);
+  GtkWidget *
+create_execute_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { EXECUTE_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  execute_command = Builder_Get_Object( *builder, "execute_command" );
+  return execute_command;
+}
 
-  label237 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label237);
-  gtk_box_pack_start (GTK_BOX (hbox63), label237, FALSE, FALSE, 0);
+  GtkWidget *
+create_intrange_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { INTRANGE_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  intrange_command = Builder_Get_Object( *builder, "intrange_command" );
+  return intrange_command;
+}
 
-  frequency_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (frequency_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox40), frequency_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_apply_button), 2);
+  GtkWidget *
+create_ground_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { GROUND_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  ground_command = Builder_Get_Object( *builder, "ground_command" );
+  return ground_command;
+}
 
-  frequency_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (frequency_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox40), frequency_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frequency_ok_button), 2);
+  GtkWidget *
+create_nearfield_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { NEARFIELD_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  nearfield_command = Builder_Get_Object( *builder, "nearfield_command" );
+  return nearfield_command;
+}
 
-  g_signal_connect ((gpointer) frequency_command, "destroy",
-                    G_CALLBACK (on_frequency_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_add_radiobutton, "toggled",
-                    G_CALLBACK (on_frequency_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_mul_radiobutton, "toggled",
-                    G_CALLBACK (on_frequency_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_num_spinbutton, "value_changed",
-                    G_CALLBACK (on_frequency_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_step_spinbutton, "value_changed",
-                    G_CALLBACK (on_frequency_step_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_start_spinbutton, "value_changed",
-                    G_CALLBACK (on_frequency_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_end_spinbutton, "value_changed",
-                    G_CALLBACK (on_frequency_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_new_button, "clicked",
-                    G_CALLBACK (on_frequency_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_cancel_button, "clicked",
-                    G_CALLBACK (on_frequency_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_apply_button, "clicked",
-                    G_CALLBACK (on_frequency_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) frequency_ok_button, "clicked",
-                    G_CALLBACK (on_frequency_ok_button_clicked),
-                    NULL);
+  GtkWidget *
+create_radiation_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { RADIATION_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  radiation_command = Builder_Get_Object( *builder, "radiation_command" );
+  return radiation_command;
+}
 
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (frequency_command, frequency_command, "frequency_command");
-  GLADE_HOOKUP_OBJECT (frequency_command, vbox21, "vbox21");
-  GLADE_HOOKUP_OBJECT (frequency_command, frame37, "frame37");
-  GLADE_HOOKUP_OBJECT (frequency_command, alignment39, "alignment39");
-  GLADE_HOOKUP_OBJECT (frequency_command, hbox41, "hbox41");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_add_radiobutton, "frequency_add_radiobutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_mul_radiobutton, "frequency_mul_radiobutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, label165, "label165");
-  GLADE_HOOKUP_OBJECT (frequency_command, frame38, "frame38");
-  GLADE_HOOKUP_OBJECT (frequency_command, alignment40, "alignment40");
-  GLADE_HOOKUP_OBJECT (frequency_command, table26, "table26");
-  GLADE_HOOKUP_OBJECT (frequency_command, label167, "label167");
-  GLADE_HOOKUP_OBJECT (frequency_command, label168, "label168");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_num_spinbutton, "frequency_num_spinbutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_step_spinbutton, "frequency_step_spinbutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, label170, "label170");
-  GLADE_HOOKUP_OBJECT (frequency_command, label171, "label171");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_start_spinbutton, "frequency_start_spinbutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_end_spinbutton, "frequency_end_spinbutton");
-  GLADE_HOOKUP_OBJECT (frequency_command, label166, "label166");
-  GLADE_HOOKUP_OBJECT (frequency_command, hbox40, "hbox40");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_new_button, "frequency_new_button");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_cancel_button, "frequency_cancel_button");
-  GLADE_HOOKUP_OBJECT (frequency_command, alignment65, "alignment65");
-  GLADE_HOOKUP_OBJECT (frequency_command, hbox63, "hbox63");
-  GLADE_HOOKUP_OBJECT (frequency_command, image85, "image85");
-  GLADE_HOOKUP_OBJECT (frequency_command, label237, "label237");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_apply_button, "frequency_apply_button");
-  GLADE_HOOKUP_OBJECT (frequency_command, frequency_ok_button, "frequency_ok_button");
+  GtkWidget *
+create_excitation_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { EXCITATION_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  excitation_command = Builder_Get_Object( *builder, "excitation_command" );
+  return excitation_command;
+}
 
+  GtkWidget *
+create_frequency_command( GtkBuilder **builder )
+{
+  gchar *object_ids[] = { FREQUENCY_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  frequency_command = Builder_Get_Object( *builder, "frequency_command" );
   return frequency_command;
 }
 
-GtkWidget*
-create_loading_command (void)
+  GtkWidget *
+create_loading_command( GtkBuilder **builder )
 {
-  GtkWidget *loading_command;
-  GtkWidget *vbox22;
-  GtkWidget *frame39;
-  GtkWidget *alignment41;
-  GtkWidget *table27;
-  GtkWidget *loading_slrlc_radiobutton;
-  GSList *loading_slrlc_radiobutton_group = NULL;
-  GtkWidget *loading_pdrlc_radiobutton;
-  GtkWidget *loading_rr_radiobutton;
-  GtkWidget *loading_plrlc_radiobutton;
-  GtkWidget *loading_sdrlc_radiobutton;
-  GtkWidget *loading_wcon_radiobutton;
-  GtkWidget *loading_null_radiobutton;
-  GtkWidget *label172;
-  GtkWidget *loading_frame;
-  GtkWidget *alignment42;
-  GtkWidget *table28;
-  GtkWidget *loading_i2_label;
-  GtkWidget *loading_i3_label;
-  GtkWidget *loading_i4_label;
-  GtkWidget *loading_f1_label;
-  GtkWidget *loading_f2_label;
-  GtkWidget *loading_f3_label;
-  GtkObject *loading_f1_spinbutton_adj;
-  GtkWidget *loading_f1_spinbutton;
-  GtkObject *loading_i2_spinbutton_adj;
-  GtkWidget *loading_i2_spinbutton;
-  GtkObject *loading_i3_spinbutton_adj;
-  GtkWidget *loading_i3_spinbutton;
-  GtkObject *loading_i4_spinbutton_adj;
-  GtkWidget *loading_i4_spinbutton;
-  GtkObject *loading_f2_spinbutton_adj;
-  GtkWidget *loading_f2_spinbutton;
-  GtkObject *loading_f3_spinbutton_adj;
-  GtkWidget *loading_f3_spinbutton;
-  GtkWidget *label173;
-  GtkWidget *hbox42;
-  GtkWidget *loading_new_button;
-  GtkWidget *loading_cancel_button;
-  GtkWidget *alignment66;
-  GtkWidget *hbox64;
-  GtkWidget *image86;
-  GtkWidget *label238;
-  GtkWidget *loading_apply_button;
-  GtkWidget *loading_ok_button;
-
-  loading_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_command), 4);
-  gtk_window_set_title (GTK_WINDOW (loading_command), _("Loading Command (LD Card)"));
-
-  vbox22 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox22);
-  gtk_container_add (GTK_CONTAINER (loading_command), vbox22);
-
-  frame39 = gtk_frame_new (NULL);
-  gtk_widget_show (frame39);
-  gtk_box_pack_start (GTK_BOX (vbox22), frame39, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame39), 4);
-
-  alignment41 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment41);
-  gtk_container_add (GTK_CONTAINER (frame39), alignment41);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment41), 0, 0, 12, 0);
-
-  table27 = gtk_table_new (3, 3, FALSE);
-  gtk_widget_show (table27);
-  gtk_container_add (GTK_CONTAINER (alignment41), table27);
-
-  loading_slrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Lumped"));
-  gtk_widget_show (loading_slrlc_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_slrlc_radiobutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_slrlc_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (loading_slrlc_radiobutton), TRUE);
-
-  loading_pdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Distributed"));
-  gtk_widget_show (loading_pdrlc_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_pdrlc_radiobutton, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_pdrlc_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton));
-
-  loading_rr_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Resistance & Reactance"));
-  gtk_widget_show (loading_rr_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_rr_radiobutton, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_rr_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_rr_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_rr_radiobutton));
-
-  loading_plrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Lumped"));
-  gtk_widget_show (loading_plrlc_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_plrlc_radiobutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_plrlc_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton));
-
-  loading_sdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Distributed"));
-  gtk_widget_show (loading_sdrlc_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_sdrlc_radiobutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_sdrlc_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton));
-
-  loading_wcon_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Wire Conductivity"));
-  gtk_widget_show (loading_wcon_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_wcon_radiobutton, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_wcon_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton));
-
-  loading_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Short all Loads (Nulls previous Loading Cards)"));
-  gtk_widget_show (loading_null_radiobutton);
-  gtk_table_attach (GTK_TABLE (table27), loading_null_radiobutton, 0, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_null_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_null_radiobutton), loading_slrlc_radiobutton_group);
-  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_null_radiobutton));
-
-  label172 = gtk_label_new (_("Loading Type"));
-  gtk_widget_show (label172);
-  gtk_frame_set_label_widget (GTK_FRAME (frame39), label172);
-  gtk_misc_set_padding (GTK_MISC (label172), 4, 4);
-
-  loading_frame = gtk_frame_new (NULL);
-  gtk_widget_show (loading_frame);
-  gtk_box_pack_start (GTK_BOX (vbox22), loading_frame, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_frame), 4);
-
-  alignment42 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment42);
-  gtk_container_add (GTK_CONTAINER (loading_frame), alignment42);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment42), 0, 0, 12, 0);
-
-  table28 = gtk_table_new (4, 3, FALSE);
-  gtk_widget_show (table28);
-  gtk_container_add (GTK_CONTAINER (alignment42), table28);
-
-  loading_i2_label = gtk_label_new (_("Load Tag Number"));
-  gtk_widget_show (loading_i2_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_i2_label, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_i2_label), 0.1, 0.5);
-
-  loading_i3_label = gtk_label_new (_("From Segment #"));
-  gtk_widget_show (loading_i3_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_i3_label, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_i3_label), 0.1, 0.5);
-
-  loading_i4_label = gtk_label_new (_("To Segment #"));
-  gtk_widget_show (loading_i4_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_i4_label, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_i4_label), 0.1, 0.5);
-
-  loading_f1_label = gtk_label_new (_("Resistance"));
-  gtk_widget_show (loading_f1_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_f1_label, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_f1_label), 0.1, 0.5);
-
-  loading_f2_label = gtk_label_new (_("Inductance"));
-  gtk_widget_show (loading_f2_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_f2_label, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_f2_label), 0.1, 0.5);
-
-  loading_f3_label = gtk_label_new (_("Capacitance"));
-  gtk_widget_show (loading_f3_label);
-  gtk_table_attach (GTK_TABLE (table28), loading_f3_label, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (loading_f3_label), 0.1, 0.5);
-
-  loading_f1_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
-  loading_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (loading_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_f1_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f1_spinbutton), TRUE);
-
-  loading_i2_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 1, 10, 0);
-  loading_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i2_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (loading_i2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_i2_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i2_spinbutton), TRUE);
-
-  loading_i3_spinbutton_adj = gtk_adjustment_new (2, 0, 10000, 1, 10, 0);
-  loading_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i3_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (loading_i3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_i3_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i3_spinbutton), TRUE);
-
-  loading_i4_spinbutton_adj = gtk_adjustment_new (3, 0, 10000, 1, 10, 0);
-  loading_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i4_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (loading_i4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_i4_spinbutton, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i4_spinbutton), TRUE);
-
-  loading_f2_spinbutton_adj = gtk_adjustment_new (1, -1000000, 1000000, 9.99999974738e-06, 10, 0);
-  loading_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (loading_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_f2_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f2_spinbutton), TRUE);
-
-  loading_f3_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
-  loading_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (loading_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table28), loading_f3_spinbutton, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f3_spinbutton), TRUE);
-
-  label173 = gtk_label_new (_("Loading Parameters"));
-  gtk_widget_show (label173);
-  gtk_frame_set_label_widget (GTK_FRAME (loading_frame), label173);
-  gtk_misc_set_padding (GTK_MISC (label173), 4, 4);
-
-  hbox42 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox42);
-  gtk_box_pack_start (GTK_BOX (vbox22), hbox42, TRUE, TRUE, 0);
-
-  loading_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (loading_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox42), loading_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_new_button), 2);
-
-  loading_cancel_button = gtk_button_new ();
-  gtk_widget_show (loading_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox42), loading_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_cancel_button), 2);
-
-  alignment66 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment66);
-  gtk_container_add (GTK_CONTAINER (loading_cancel_button), alignment66);
-
-  hbox64 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox64);
-  gtk_container_add (GTK_CONTAINER (alignment66), hbox64);
-
-  image86 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image86);
-  gtk_box_pack_start (GTK_BOX (hbox64), image86, FALSE, FALSE, 0);
-
-  label238 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label238);
-  gtk_box_pack_start (GTK_BOX (hbox64), label238, FALSE, FALSE, 0);
-
-  loading_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (loading_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox42), loading_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_apply_button), 2);
-
-  loading_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (loading_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox42), loading_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (loading_ok_button), 2);
-
-  g_signal_connect ((gpointer) loading_command, "destroy",
-                    G_CALLBACK (on_loading_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) loading_slrlc_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_pdrlc_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_rr_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_plrlc_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_sdrlc_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_wcon_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_null_radiobutton, "toggled",
-                    G_CALLBACK (on_loading_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) loading_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_i2_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_i3_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_i4_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_loading_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) loading_new_button, "clicked",
-                    G_CALLBACK (on_loading_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) loading_cancel_button, "clicked",
-                    G_CALLBACK (on_loading_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) loading_apply_button, "clicked",
-                    G_CALLBACK (on_loading_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) loading_ok_button, "clicked",
-                    G_CALLBACK (on_loading_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (loading_command, loading_command, "loading_command");
-  GLADE_HOOKUP_OBJECT (loading_command, vbox22, "vbox22");
-  GLADE_HOOKUP_OBJECT (loading_command, frame39, "frame39");
-  GLADE_HOOKUP_OBJECT (loading_command, alignment41, "alignment41");
-  GLADE_HOOKUP_OBJECT (loading_command, table27, "table27");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_slrlc_radiobutton, "loading_slrlc_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_pdrlc_radiobutton, "loading_pdrlc_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_rr_radiobutton, "loading_rr_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_plrlc_radiobutton, "loading_plrlc_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_sdrlc_radiobutton, "loading_sdrlc_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_wcon_radiobutton, "loading_wcon_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_null_radiobutton, "loading_null_radiobutton");
-  GLADE_HOOKUP_OBJECT (loading_command, label172, "label172");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_frame, "loading_frame");
-  GLADE_HOOKUP_OBJECT (loading_command, alignment42, "alignment42");
-  GLADE_HOOKUP_OBJECT (loading_command, table28, "table28");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_label, "loading_i2_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_label, "loading_i3_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_label, "loading_i4_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_label, "loading_f1_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_label, "loading_f2_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_label, "loading_f3_label");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_spinbutton, "loading_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_spinbutton, "loading_i2_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_spinbutton, "loading_i3_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_spinbutton, "loading_i4_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_spinbutton, "loading_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_spinbutton, "loading_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (loading_command, label173, "label173");
-  GLADE_HOOKUP_OBJECT (loading_command, hbox42, "hbox42");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_new_button, "loading_new_button");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_cancel_button, "loading_cancel_button");
-  GLADE_HOOKUP_OBJECT (loading_command, alignment66, "alignment66");
-  GLADE_HOOKUP_OBJECT (loading_command, hbox64, "hbox64");
-  GLADE_HOOKUP_OBJECT (loading_command, image86, "image86");
-  GLADE_HOOKUP_OBJECT (loading_command, label238, "label238");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_apply_button, "loading_apply_button");
-  GLADE_HOOKUP_OBJECT (loading_command, loading_ok_button, "loading_ok_button");
-
+  gchar *object_ids[] = { LOADING_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  loading_command = Builder_Get_Object( *builder, "loading_command" );
   return loading_command;
 }
 
-GtkWidget*
-create_network_command (void)
+  GtkWidget *
+create_network_command( GtkBuilder **builder )
 {
-  GtkWidget *network_command;
-  GtkWidget *vbox23;
-  GtkWidget *frame41;
-  GtkWidget *alignment43;
-  GtkWidget *table29;
-  GtkWidget *label184;
-  GtkObject *network_i4_spinbutton_adj;
-  GtkWidget *network_i4_spinbutton;
-  GtkObject *network_i1_spinbutton_adj;
-  GtkWidget *network_i1_spinbutton;
-  GtkObject *network_i2_spinbutton_adj;
-  GtkWidget *network_i2_spinbutton;
-  GtkWidget *label183;
-  GtkWidget *label182;
-  GtkWidget *label185;
-  GtkObject *network_i3_spinbutton_adj;
-  GtkWidget *network_i3_spinbutton;
-  GtkWidget *label180;
-  GtkWidget *frame42;
-  GtkWidget *alignment44;
-  GtkWidget *table30;
-  GtkWidget *label186;
-  GtkWidget *label187;
-  GtkWidget *label189;
-  GtkWidget *label190;
-  GtkObject *network_f3_spinbutton_adj;
-  GtkWidget *network_f3_spinbutton;
-  GtkObject *network_f4_spinbutton_adj;
-  GtkWidget *network_f4_spinbutton;
-  GtkWidget *label191;
-  GtkWidget *label192;
-  GtkObject *network_f1_spinbutton_adj;
-  GtkWidget *network_f1_spinbutton;
-  GtkObject *network_f2_spinbutton_adj;
-  GtkWidget *network_f2_spinbutton;
-  GtkObject *network_f6_spinbutton_adj;
-  GtkWidget *network_f6_spinbutton;
-  GtkObject *network_f5_spinbutton_adj;
-  GtkWidget *network_f5_spinbutton;
-  GtkWidget *label181;
-  GtkWidget *hbox43;
-  GtkWidget *network_new_button;
-  GtkWidget *network_cancel_button;
-  GtkWidget *alignment67;
-  GtkWidget *hbox65;
-  GtkWidget *image87;
-  GtkWidget *label239;
-  GtkWidget *network_apply_button;
-  GtkWidget *network_ok_button;
-
-  network_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (network_command), 4);
-  gtk_window_set_title (GTK_WINDOW (network_command), _("Network Command (NT Card)"));
-
-  vbox23 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox23);
-  gtk_container_add (GTK_CONTAINER (network_command), vbox23);
-
-  frame41 = gtk_frame_new (NULL);
-  gtk_widget_show (frame41);
-  gtk_box_pack_start (GTK_BOX (vbox23), frame41, TRUE, TRUE, 0);
-
-  alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment43);
-  gtk_container_add (GTK_CONTAINER (frame41), alignment43);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 0, 12, 0);
-
-  table29 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table29);
-  gtk_container_add (GTK_CONTAINER (alignment43), table29);
-
-  label184 = gtk_label_new (_("Tag Number, Port 2  "));
-  gtk_widget_show (label184);
-  gtk_table_attach (GTK_TABLE (table29), label184, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label184), 0.1, 0.5);
-
-  network_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  network_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i4_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (network_i4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table29), network_i4_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i4_spinbutton), TRUE);
-
-  network_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  network_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i1_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (network_i1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table29), network_i1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i1_spinbutton), TRUE);
-
-  network_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  network_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i2_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (network_i2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table29), network_i2_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i2_spinbutton), TRUE);
-
-  label183 = gtk_label_new (_("Segment Num, Port 1"));
-  gtk_widget_show (label183);
-  gtk_table_attach (GTK_TABLE (table29), label183, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label183), 0.1, 0.5);
-
-  label182 = gtk_label_new (_("Tag Number, Port 1  "));
-  gtk_widget_show (label182);
-  gtk_table_attach (GTK_TABLE (table29), label182, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label182), 0.1, 0.5);
-
-  label185 = gtk_label_new (_("Segment Num, Port 2"));
-  gtk_widget_show (label185);
-  gtk_table_attach (GTK_TABLE (table29), label185, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label185), 0.1, 0.5);
-
-  network_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
-  network_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i3_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (network_i3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table29), network_i3_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i3_spinbutton), TRUE);
-
-  label180 = gtk_label_new (_("Segment Identity"));
-  gtk_widget_show (label180);
-  gtk_frame_set_label_widget (GTK_FRAME (frame41), label180);
-  gtk_misc_set_padding (GTK_MISC (label180), 4, 4);
-
-  frame42 = gtk_frame_new (NULL);
-  gtk_widget_show (frame42);
-  gtk_box_pack_start (GTK_BOX (vbox23), frame42, TRUE, TRUE, 0);
-
-  alignment44 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment44);
-  gtk_container_add (GTK_CONTAINER (frame42), alignment44);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment44), 0, 0, 12, 0);
-
-  table30 = gtk_table_new (6, 2, FALSE);
-  gtk_widget_show (table30);
-  gtk_container_add (GTK_CONTAINER (alignment44), table30);
-
-  label186 = gtk_label_new (_("Element 1,1 Real Part"));
-  gtk_widget_show (label186);
-  gtk_table_attach (GTK_TABLE (table30), label186, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label186), 0.1, 0.5);
-
-  label187 = gtk_label_new (_("Element 1,1 Imag Part"));
-  gtk_widget_show (label187);
-  gtk_table_attach (GTK_TABLE (table30), label187, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label187), 0.1, 0.5);
-
-  label189 = gtk_label_new (_("Element 1,2 Real Part"));
-  gtk_widget_show (label189);
-  gtk_table_attach (GTK_TABLE (table30), label189, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label189), 0.1, 0.5);
-
-  label190 = gtk_label_new (_("Element 1,2 Imag Part"));
-  gtk_widget_show (label190);
-  gtk_table_attach (GTK_TABLE (table30), label190, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label190), 0.1, 0.5);
-
-  network_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f3_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f3_spinbutton), TRUE);
-
-  network_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f4_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f4_spinbutton), TRUE);
-
-  label191 = gtk_label_new (_("Element 2,2 Real Part"));
-  gtk_widget_show (label191);
-  gtk_table_attach (GTK_TABLE (table30), label191, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label191), 0.1, 0.5);
-
-  label192 = gtk_label_new (_("Element 2,2 Imag Part"));
-  gtk_widget_show (label192);
-  gtk_table_attach (GTK_TABLE (table30), label192, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label192), 0.1, 0.5);
-
-  network_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f1_spinbutton), TRUE);
-
-  network_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f2_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f2_spinbutton), TRUE);
-
-  network_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f6_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f6_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f6_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f6_spinbutton), TRUE);
-
-  network_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  network_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f5_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (network_f5_spinbutton);
-  gtk_table_attach (GTK_TABLE (table30), network_f5_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f5_spinbutton), TRUE);
-
-  label181 = gtk_label_new (_("Admittance Matrix Elements"));
-  gtk_widget_show (label181);
-  gtk_frame_set_label_widget (GTK_FRAME (frame42), label181);
-  gtk_misc_set_padding (GTK_MISC (label181), 4, 4);
-
-  hbox43 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox43);
-  gtk_box_pack_start (GTK_BOX (vbox23), hbox43, TRUE, TRUE, 0);
-
-  network_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (network_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox43), network_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (network_new_button), 2);
-
-  network_cancel_button = gtk_button_new ();
-  gtk_widget_show (network_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox43), network_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (network_cancel_button), 2);
-
-  alignment67 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment67);
-  gtk_container_add (GTK_CONTAINER (network_cancel_button), alignment67);
-
-  hbox65 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox65);
-  gtk_container_add (GTK_CONTAINER (alignment67), hbox65);
-
-  image87 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image87);
-  gtk_box_pack_start (GTK_BOX (hbox65), image87, FALSE, FALSE, 0);
-
-  label239 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label239);
-  gtk_box_pack_start (GTK_BOX (hbox65), label239, FALSE, FALSE, 0);
-
-  network_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (network_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox43), network_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (network_apply_button), 2);
-
-  network_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (network_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox43), network_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (network_ok_button), 2);
-
-  g_signal_connect ((gpointer) network_command, "destroy",
-                    G_CALLBACK (on_network_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) network_i4_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_i1_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_i2_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_i3_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f4_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f6_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_f5_spinbutton, "value_changed",
-                    G_CALLBACK (on_network_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) network_new_button, "clicked",
-                    G_CALLBACK (on_network_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) network_cancel_button, "clicked",
-                    G_CALLBACK (on_network_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) network_apply_button, "clicked",
-                    G_CALLBACK (on_network_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) network_ok_button, "clicked",
-                    G_CALLBACK (on_network_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (network_command, network_command, "network_command");
-  GLADE_HOOKUP_OBJECT (network_command, vbox23, "vbox23");
-  GLADE_HOOKUP_OBJECT (network_command, frame41, "frame41");
-  GLADE_HOOKUP_OBJECT (network_command, alignment43, "alignment43");
-  GLADE_HOOKUP_OBJECT (network_command, table29, "table29");
-  GLADE_HOOKUP_OBJECT (network_command, label184, "label184");
-  GLADE_HOOKUP_OBJECT (network_command, network_i4_spinbutton, "network_i4_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_i1_spinbutton, "network_i1_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_i2_spinbutton, "network_i2_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, label183, "label183");
-  GLADE_HOOKUP_OBJECT (network_command, label182, "label182");
-  GLADE_HOOKUP_OBJECT (network_command, label185, "label185");
-  GLADE_HOOKUP_OBJECT (network_command, network_i3_spinbutton, "network_i3_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, label180, "label180");
-  GLADE_HOOKUP_OBJECT (network_command, frame42, "frame42");
-  GLADE_HOOKUP_OBJECT (network_command, alignment44, "alignment44");
-  GLADE_HOOKUP_OBJECT (network_command, table30, "table30");
-  GLADE_HOOKUP_OBJECT (network_command, label186, "label186");
-  GLADE_HOOKUP_OBJECT (network_command, label187, "label187");
-  GLADE_HOOKUP_OBJECT (network_command, label189, "label189");
-  GLADE_HOOKUP_OBJECT (network_command, label190, "label190");
-  GLADE_HOOKUP_OBJECT (network_command, network_f3_spinbutton, "network_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_f4_spinbutton, "network_f4_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, label191, "label191");
-  GLADE_HOOKUP_OBJECT (network_command, label192, "label192");
-  GLADE_HOOKUP_OBJECT (network_command, network_f1_spinbutton, "network_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_f2_spinbutton, "network_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_f6_spinbutton, "network_f6_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, network_f5_spinbutton, "network_f5_spinbutton");
-  GLADE_HOOKUP_OBJECT (network_command, label181, "label181");
-  GLADE_HOOKUP_OBJECT (network_command, hbox43, "hbox43");
-  GLADE_HOOKUP_OBJECT (network_command, network_new_button, "network_new_button");
-  GLADE_HOOKUP_OBJECT (network_command, network_cancel_button, "network_cancel_button");
-  GLADE_HOOKUP_OBJECT (network_command, alignment67, "alignment67");
-  GLADE_HOOKUP_OBJECT (network_command, hbox65, "hbox65");
-  GLADE_HOOKUP_OBJECT (network_command, image87, "image87");
-  GLADE_HOOKUP_OBJECT (network_command, label239, "label239");
-  GLADE_HOOKUP_OBJECT (network_command, network_apply_button, "network_apply_button");
-  GLADE_HOOKUP_OBJECT (network_command, network_ok_button, "network_ok_button");
-
+  gchar *object_ids[] = { NETWORK_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  network_command = Builder_Get_Object( *builder, "network_command" );
   return network_command;
 }
 
-GtkWidget*
-create_txline_command (void)
+  GtkWidget *
+create_txline_command( GtkBuilder **builder )
 {
-  GtkWidget *txline_command;
-  GtkWidget *vbox24;
-  GtkWidget *frame43;
-  GtkWidget *alignment45;
-  GtkWidget *table31;
-  GtkObject *txline_i4_spinbutton_adj;
-  GtkWidget *txline_i4_spinbutton;
-  GtkObject *txline_i1_spinbutton_adj;
-  GtkWidget *txline_i1_spinbutton;
-  GtkObject *txline_i2_spinbutton_adj;
-  GtkWidget *txline_i2_spinbutton;
-  GtkWidget *label194;
-  GtkWidget *label195;
-  GtkWidget *label196;
-  GtkObject *txline_i3_spinbutton_adj;
-  GtkWidget *txline_i3_spinbutton;
-  GtkWidget *label193;
-  GtkWidget *label197;
-  GtkWidget *frame44;
-  GtkWidget *alignment46;
-  GtkWidget *table32;
-  GtkWidget *label198;
-  GtkWidget *label199;
-  GtkWidget *label200;
-  GtkWidget *label201;
-  GtkObject *txline_f3_spinbutton_adj;
-  GtkWidget *txline_f3_spinbutton;
-  GtkObject *txline_f4_spinbutton_adj;
-  GtkWidget *txline_f4_spinbutton;
-  GtkWidget *label202;
-  GtkWidget *label203;
-  GtkObject *txline_f1_spinbutton_adj;
-  GtkWidget *txline_f1_spinbutton;
-  GtkObject *txline_f2_spinbutton_adj;
-  GtkWidget *txline_f2_spinbutton;
-  GtkObject *txline_f6_spinbutton_adj;
-  GtkWidget *txline_f6_spinbutton;
-  GtkObject *txline_f5_spinbutton_adj;
-  GtkWidget *txline_f5_spinbutton;
-  GtkWidget *txline_crossed_checkbutton;
-  GtkWidget *hbox44;
-  GtkWidget *txline_new_button;
-  GtkWidget *txline_cancel_button;
-  GtkWidget *alignment68;
-  GtkWidget *hbox66;
-  GtkWidget *image88;
-  GtkWidget *label240;
-  GtkWidget *txline_apply_button;
-  GtkWidget *txline_ok_button;
-
-  txline_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_command), 4);
-  gtk_window_set_title (GTK_WINDOW (txline_command), _("Trans. Line Command (TL Card)"));
-
-  vbox24 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox24);
-  gtk_container_add (GTK_CONTAINER (txline_command), vbox24);
-
-  frame43 = gtk_frame_new (NULL);
-  gtk_widget_show (frame43);
-  gtk_box_pack_start (GTK_BOX (vbox24), frame43, TRUE, TRUE, 0);
-
-  alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment45);
-  gtk_container_add (GTK_CONTAINER (frame43), alignment45);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 0, 12, 0);
-
-  table31 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table31);
-  gtk_container_add (GTK_CONTAINER (alignment45), table31);
-
-  txline_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  txline_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i4_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (txline_i4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table31), txline_i4_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i4_spinbutton), TRUE);
-
-  txline_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  txline_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i1_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (txline_i1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table31), txline_i1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i1_spinbutton), TRUE);
-
-  txline_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
-  txline_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i2_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (txline_i2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table31), txline_i2_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i2_spinbutton), TRUE);
-
-  label194 = gtk_label_new (_("Segment Num, End 1"));
-  gtk_widget_show (label194);
-  gtk_table_attach (GTK_TABLE (table31), label194, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label194), 0.1, 0.5);
-
-  label195 = gtk_label_new (_("Tag Number, End 1  "));
-  gtk_widget_show (label195);
-  gtk_table_attach (GTK_TABLE (table31), label195, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label195), 0.1, 0.5);
-
-  label196 = gtk_label_new (_("Segment Num, End 2"));
-  gtk_widget_show (label196);
-  gtk_table_attach (GTK_TABLE (table31), label196, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label196), 0.1, 0.5);
-
-  txline_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
-  txline_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i3_spinbutton_adj), 0.00999999977648, 0);
-  gtk_widget_show (txline_i3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table31), txline_i3_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i3_spinbutton), TRUE);
-
-  label193 = gtk_label_new (_("Tag Number, End 2  "));
-  gtk_widget_show (label193);
-  gtk_table_attach (GTK_TABLE (table31), label193, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label193), 0.1, 0.5);
-
-  label197 = gtk_label_new (_("Segment Identity"));
-  gtk_widget_show (label197);
-  gtk_frame_set_label_widget (GTK_FRAME (frame43), label197);
-  gtk_misc_set_padding (GTK_MISC (label197), 4, 4);
-
-  frame44 = gtk_frame_new (NULL);
-  gtk_widget_show (frame44);
-  gtk_box_pack_start (GTK_BOX (vbox24), frame44, TRUE, TRUE, 0);
-
-  alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment46);
-  gtk_container_add (GTK_CONTAINER (frame44), alignment46);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 0, 12, 0);
-
-  table32 = gtk_table_new (6, 2, FALSE);
-  gtk_widget_show (table32);
-  gtk_container_add (GTK_CONTAINER (alignment46), table32);
-
-  label198 = gtk_label_new (_("Characteristic Impedance"));
-  gtk_widget_show (label198);
-  gtk_table_attach (GTK_TABLE (table32), label198, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label198), 0.1, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label198), 4, 0);
-
-  label199 = gtk_label_new (_("Length of Tx Line (m)"));
-  gtk_widget_show (label199);
-  gtk_table_attach (GTK_TABLE (table32), label199, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label199), 0.1, 0.5);
-  gtk_misc_set_padding (GTK_MISC (label199), 4, 0);
-
-  label200 = gtk_label_new (_("End 1 Y Real Part (S)"));
-  gtk_widget_show (label200);
-  gtk_table_attach (GTK_TABLE (table32), label200, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label200), 0.1, 0.5);
-
-  label201 = gtk_label_new (_("End 1 Y Imag Part (S)"));
-  gtk_widget_show (label201);
-  gtk_table_attach (GTK_TABLE (table32), label201, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label201), 0.1, 0.5);
-
-  txline_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f3_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f3_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f3_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f3_spinbutton), TRUE);
-
-  txline_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f4_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f4_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f4_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f4_spinbutton), TRUE);
-
-  label202 = gtk_label_new (_("End 2 Y Real Part (S)"));
-  gtk_widget_show (label202);
-  gtk_table_attach (GTK_TABLE (table32), label202, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label202), 0.1, 0.5);
-
-  label203 = gtk_label_new (_("End 2 Y Imag Part (S)"));
-  gtk_widget_show (label203);
-  gtk_table_attach (GTK_TABLE (table32), label203, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label203), 0.1, 0.5);
-
-  txline_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f1_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f1_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f1_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f1_spinbutton), TRUE);
-
-  txline_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f2_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f2_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f2_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f2_spinbutton), TRUE);
-
-  txline_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f6_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f6_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f6_spinbutton, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f6_spinbutton), TRUE);
-
-  txline_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
-  txline_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f5_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (txline_f5_spinbutton);
-  gtk_table_attach (GTK_TABLE (table32), txline_f5_spinbutton, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f5_spinbutton), TRUE);
-
-  txline_crossed_checkbutton = gtk_check_button_new_with_mnemonic (_("Crossed Transmission Line"));
-  gtk_widget_show (txline_crossed_checkbutton);
-  gtk_frame_set_label_widget (GTK_FRAME (frame44), txline_crossed_checkbutton);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_crossed_checkbutton), 4);
-
-  hbox44 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox44);
-  gtk_box_pack_start (GTK_BOX (vbox24), hbox44, TRUE, TRUE, 0);
-
-  txline_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (txline_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox44), txline_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_new_button), 2);
-
-  txline_cancel_button = gtk_button_new ();
-  gtk_widget_show (txline_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox44), txline_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_cancel_button), 2);
-
-  alignment68 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment68);
-  gtk_container_add (GTK_CONTAINER (txline_cancel_button), alignment68);
-
-  hbox66 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox66);
-  gtk_container_add (GTK_CONTAINER (alignment68), hbox66);
-
-  image88 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image88);
-  gtk_box_pack_start (GTK_BOX (hbox66), image88, FALSE, FALSE, 0);
-
-  label240 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label240);
-  gtk_box_pack_start (GTK_BOX (hbox66), label240, FALSE, FALSE, 0);
-
-  txline_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (txline_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox44), txline_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_apply_button), 2);
-
-  txline_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (txline_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox44), txline_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (txline_ok_button), 2);
-
-  g_signal_connect ((gpointer) txline_command, "destroy",
-                    G_CALLBACK (on_txline_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) txline_i4_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_i1_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_i2_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_i3_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f3_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f4_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f1_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f2_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f6_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_f5_spinbutton, "value_changed",
-                    G_CALLBACK (on_txline_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) txline_crossed_checkbutton, "toggled",
-                    G_CALLBACK (on_txline_checkbutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) txline_new_button, "clicked",
-                    G_CALLBACK (on_txline_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) txline_cancel_button, "clicked",
-                    G_CALLBACK (on_txline_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) txline_apply_button, "clicked",
-                    G_CALLBACK (on_txline_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) txline_ok_button, "clicked",
-                    G_CALLBACK (on_txline_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (txline_command, txline_command, "txline_command");
-  GLADE_HOOKUP_OBJECT (txline_command, vbox24, "vbox24");
-  GLADE_HOOKUP_OBJECT (txline_command, frame43, "frame43");
-  GLADE_HOOKUP_OBJECT (txline_command, alignment45, "alignment45");
-  GLADE_HOOKUP_OBJECT (txline_command, table31, "table31");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_i4_spinbutton, "txline_i4_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_i1_spinbutton, "txline_i1_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_i2_spinbutton, "txline_i2_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, label194, "label194");
-  GLADE_HOOKUP_OBJECT (txline_command, label195, "label195");
-  GLADE_HOOKUP_OBJECT (txline_command, label196, "label196");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_i3_spinbutton, "txline_i3_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, label193, "label193");
-  GLADE_HOOKUP_OBJECT (txline_command, label197, "label197");
-  GLADE_HOOKUP_OBJECT (txline_command, frame44, "frame44");
-  GLADE_HOOKUP_OBJECT (txline_command, alignment46, "alignment46");
-  GLADE_HOOKUP_OBJECT (txline_command, table32, "table32");
-  GLADE_HOOKUP_OBJECT (txline_command, label198, "label198");
-  GLADE_HOOKUP_OBJECT (txline_command, label199, "label199");
-  GLADE_HOOKUP_OBJECT (txline_command, label200, "label200");
-  GLADE_HOOKUP_OBJECT (txline_command, label201, "label201");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f3_spinbutton, "txline_f3_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f4_spinbutton, "txline_f4_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, label202, "label202");
-  GLADE_HOOKUP_OBJECT (txline_command, label203, "label203");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f1_spinbutton, "txline_f1_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f2_spinbutton, "txline_f2_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f6_spinbutton, "txline_f6_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_f5_spinbutton, "txline_f5_spinbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_crossed_checkbutton, "txline_crossed_checkbutton");
-  GLADE_HOOKUP_OBJECT (txline_command, hbox44, "hbox44");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_new_button, "txline_new_button");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_cancel_button, "txline_cancel_button");
-  GLADE_HOOKUP_OBJECT (txline_command, alignment68, "alignment68");
-  GLADE_HOOKUP_OBJECT (txline_command, hbox66, "hbox66");
-  GLADE_HOOKUP_OBJECT (txline_command, image88, "image88");
-  GLADE_HOOKUP_OBJECT (txline_command, label240, "label240");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_apply_button, "txline_apply_button");
-  GLADE_HOOKUP_OBJECT (txline_command, txline_ok_button, "txline_ok_button");
-
+  gchar *object_ids[] = { TXLINE_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  txline_command = Builder_Get_Object( *builder, "txline_command" );
   return txline_command;
 }
 
-GtkWidget*
-create_ground2_command (void)
+  GtkWidget *
+create_ground2_command( GtkBuilder **builder )
 {
-  GtkWidget *ground2_command;
-  GtkWidget *vbox25;
-  GtkWidget *frame45;
-  GtkWidget *alignment47;
-  GtkWidget *table33;
-  GtkWidget *label204;
-  GtkWidget *label205;
-  GtkWidget *label206;
-  GtkWidget *label207;
-  GtkObject *ground2_diel_spinbutton_adj;
-  GtkWidget *ground2_diel_spinbutton;
-  GtkObject *ground2_res_spinbutton_adj;
-  GtkWidget *ground2_res_spinbutton;
-  GtkObject *ground2_below_spinbutton_adj;
-  GtkWidget *ground2_below_spinbutton;
-  GtkObject *ground2_dist_spinbutton_adj;
-  GtkWidget *ground2_dist_spinbutton;
-  GtkWidget *label208;
-  GtkWidget *hbox45;
-  GtkWidget *ground2_new_button;
-  GtkWidget *ground2_cancel_button;
-  GtkWidget *alignment69;
-  GtkWidget *hbox67;
-  GtkWidget *image89;
-  GtkWidget *label241;
-  GtkWidget *ground2_apply_button;
-  GtkWidget *ground2_ok_button;
-
-  ground2_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (ground2_command), 4);
-  gtk_window_set_title (GTK_WINDOW (ground2_command), _("Ground Parameters (GD Card)"));
-
-  vbox25 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox25);
-  gtk_container_add (GTK_CONTAINER (ground2_command), vbox25);
-
-  frame45 = gtk_frame_new (NULL);
-  gtk_widget_show (frame45);
-  gtk_box_pack_start (GTK_BOX (vbox25), frame45, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame45), 4);
-
-  alignment47 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment47);
-  gtk_container_add (GTK_CONTAINER (frame45), alignment47);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment47), 0, 0, 12, 0);
-
-  table33 = gtk_table_new (4, 2, FALSE);
-  gtk_widget_show (table33);
-  gtk_container_add (GTK_CONTAINER (alignment47), table33);
-  gtk_table_set_row_spacings (GTK_TABLE (table33), 2);
-  gtk_table_set_col_spacings (GTK_TABLE (table33), 2);
-
-  label204 = gtk_label_new (_("Relative Dielectric Const."));
-  gtk_widget_show (label204);
-  gtk_table_attach (GTK_TABLE (table33), label204, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label204), 0, 0.5);
-
-  label205 = gtk_label_new (_("Ground Conductivity S/m"));
-  gtk_widget_show (label205);
-  gtk_table_attach (GTK_TABLE (table33), label205, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label205), 0, 0.5);
-
-  label206 = gtk_label_new (_("Distance to 2nd Medium"));
-  gtk_widget_show (label206);
-  gtk_table_attach (GTK_TABLE (table33), label206, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label206), 0, 0.5);
-
-  label207 = gtk_label_new (_("Dist. below 1st Medium"));
-  gtk_widget_show (label207);
-  gtk_table_attach (GTK_TABLE (table33), label207, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label207), 0, 0.5);
-
-  ground2_diel_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground2_diel_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_diel_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground2_diel_spinbutton);
-  gtk_table_attach (GTK_TABLE (table33), ground2_diel_spinbutton, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_diel_spinbutton), TRUE);
-
-  ground2_res_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
-  ground2_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_res_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground2_res_spinbutton);
-  gtk_table_attach (GTK_TABLE (table33), ground2_res_spinbutton, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_res_spinbutton), TRUE);
-
-  ground2_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  ground2_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_below_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground2_below_spinbutton);
-  gtk_table_attach (GTK_TABLE (table33), ground2_below_spinbutton, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_below_spinbutton), TRUE);
-
-  ground2_dist_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
-  ground2_dist_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_dist_spinbutton_adj), 0.00999999977648, 5);
-  gtk_widget_show (ground2_dist_spinbutton);
-  gtk_table_attach (GTK_TABLE (table33), ground2_dist_spinbutton, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 2, 4);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_dist_spinbutton), TRUE);
-
-  label208 = gtk_label_new (_("2nd Medium Parameters"));
-  gtk_widget_show (label208);
-  gtk_frame_set_label_widget (GTK_FRAME (frame45), label208);
-  gtk_misc_set_padding (GTK_MISC (label208), 4, 4);
-
-  hbox45 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox45);
-  gtk_box_pack_start (GTK_BOX (vbox25), hbox45, TRUE, TRUE, 0);
-
-  ground2_new_button = gtk_button_new_from_stock ("gtk-new");
-  gtk_widget_show (ground2_new_button);
-  gtk_box_pack_start (GTK_BOX (hbox45), ground2_new_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground2_new_button), 2);
-
-  ground2_cancel_button = gtk_button_new ();
-  gtk_widget_show (ground2_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox45), ground2_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground2_cancel_button), 2);
-
-  alignment69 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment69);
-  gtk_container_add (GTK_CONTAINER (ground2_cancel_button), alignment69);
-
-  hbox67 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox67);
-  gtk_container_add (GTK_CONTAINER (alignment69), hbox67);
-
-  image89 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image89);
-  gtk_box_pack_start (GTK_BOX (hbox67), image89, FALSE, FALSE, 0);
-
-  label241 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label241);
-  gtk_box_pack_start (GTK_BOX (hbox67), label241, FALSE, FALSE, 0);
-
-  ground2_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (ground2_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox45), ground2_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground2_apply_button), 2);
-
-  ground2_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (ground2_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox45), ground2_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (ground2_ok_button), 2);
-
-  g_signal_connect ((gpointer) ground2_command, "destroy",
-                    G_CALLBACK (on_ground2_command_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_diel_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground2_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_res_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground2_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_below_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground2_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_dist_spinbutton, "value_changed",
-                    G_CALLBACK (on_ground2_spinbutton_value_changed),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_new_button, "clicked",
-                    G_CALLBACK (on_ground2_new_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_cancel_button, "clicked",
-                    G_CALLBACK (on_ground2_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_apply_button, "clicked",
-                    G_CALLBACK (on_ground2_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) ground2_ok_button, "clicked",
-                    G_CALLBACK (on_ground2_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (ground2_command, ground2_command, "ground2_command");
-  GLADE_HOOKUP_OBJECT (ground2_command, vbox25, "vbox25");
-  GLADE_HOOKUP_OBJECT (ground2_command, frame45, "frame45");
-  GLADE_HOOKUP_OBJECT (ground2_command, alignment47, "alignment47");
-  GLADE_HOOKUP_OBJECT (ground2_command, table33, "table33");
-  GLADE_HOOKUP_OBJECT (ground2_command, label204, "label204");
-  GLADE_HOOKUP_OBJECT (ground2_command, label205, "label205");
-  GLADE_HOOKUP_OBJECT (ground2_command, label206, "label206");
-  GLADE_HOOKUP_OBJECT (ground2_command, label207, "label207");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_diel_spinbutton, "ground2_diel_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_res_spinbutton, "ground2_res_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_below_spinbutton, "ground2_below_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_dist_spinbutton, "ground2_dist_spinbutton");
-  GLADE_HOOKUP_OBJECT (ground2_command, label208, "label208");
-  GLADE_HOOKUP_OBJECT (ground2_command, hbox45, "hbox45");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_new_button, "ground2_new_button");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_cancel_button, "ground2_cancel_button");
-  GLADE_HOOKUP_OBJECT (ground2_command, alignment69, "alignment69");
-  GLADE_HOOKUP_OBJECT (ground2_command, hbox67, "hbox67");
-  GLADE_HOOKUP_OBJECT (ground2_command, image89, "image89");
-  GLADE_HOOKUP_OBJECT (ground2_command, label241, "label241");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_apply_button, "ground2_apply_button");
-  GLADE_HOOKUP_OBJECT (ground2_command, ground2_ok_button, "ground2_ok_button");
-
+  gchar *object_ids[] = { GROUND2_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  ground2_command = Builder_Get_Object( *builder, "ground2_command" );
   return ground2_command;
 }
 
-GtkWidget*
-create_gend_editor (void)
+  GtkWidget *
+create_gend_editor( GtkBuilder **builder )
 {
-  GtkWidget *gend_editor;
-  GtkWidget *vbox26;
-  GtkWidget *frame46;
-  GtkWidget *alignment48;
-  GtkWidget *vbox27;
-  GtkWidget *gend_nognd_radiobutton;
-  GSList *gend_nognd_radiobutton_group = NULL;
-  GtkWidget *gend_img_radiobutton;
-  GtkWidget *gend_noimg_radiobutton;
-  GtkWidget *label211;
-  GtkWidget *hbox46;
-  GtkWidget *gend_cancel_button;
-  GtkWidget *alignment70;
-  GtkWidget *hbox68;
-  GtkWidget *image90;
-  GtkWidget *label242;
-  GtkWidget *gend_apply_button;
-  GtkWidget *gend_ok_button;
-
-  gend_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_editor), 4);
-  gtk_window_set_title (GTK_WINDOW (gend_editor), _("Geometry End (GE Card)"));
-
-  vbox26 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox26);
-  gtk_container_add (GTK_CONTAINER (gend_editor), vbox26);
-
-  frame46 = gtk_frame_new (NULL);
-  gtk_widget_show (frame46);
-  gtk_box_pack_start (GTK_BOX (vbox26), frame46, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame46), 4);
-
-  alignment48 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_show (alignment48);
-  gtk_container_add (GTK_CONTAINER (frame46), alignment48);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment48), 0, 0, 12, 0);
-
-  vbox27 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_show (vbox27);
-  gtk_container_add (GTK_CONTAINER (alignment48), vbox27);
-
-  gend_nognd_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Ground, Free Space condition"));
-  gtk_widget_show (gend_nognd_radiobutton);
-  gtk_box_pack_start (GTK_BOX (vbox27), gend_nognd_radiobutton, TRUE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_nognd_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton), gend_nognd_radiobutton_group);
-  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gend_nognd_radiobutton), TRUE);
-
-  gend_img_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, Strucure reflection"));
-  gtk_widget_show (gend_img_radiobutton);
-  gtk_box_pack_start (GTK_BOX (vbox27), gend_img_radiobutton, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_img_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_img_radiobutton), gend_nognd_radiobutton_group);
-  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_img_radiobutton));
-
-  gend_noimg_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, no Structure reflection"));
-  gtk_widget_show (gend_noimg_radiobutton);
-  gtk_box_pack_start (GTK_BOX (vbox27), gend_noimg_radiobutton, FALSE, FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_noimg_radiobutton), 2);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton), gend_nognd_radiobutton_group);
-  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton));
-
-  label211 = gtk_label_new (_("Ground Plane type"));
-  gtk_widget_show (label211);
-  gtk_frame_set_label_widget (GTK_FRAME (frame46), label211);
-  gtk_misc_set_padding (GTK_MISC (label211), 4, 4);
-
-  hbox46 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_show (hbox46);
-  gtk_box_pack_start (GTK_BOX (vbox26), hbox46, FALSE, FALSE, 0);
-
-  gend_cancel_button = gtk_button_new ();
-  gtk_widget_show (gend_cancel_button);
-  gtk_box_pack_start (GTK_BOX (hbox46), gend_cancel_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_cancel_button), 2);
-
-  alignment70 = gtk_alignment_new (0.5, 0.5, 0, 0);
-  gtk_widget_show (alignment70);
-  gtk_container_add (GTK_CONTAINER (gend_cancel_button), alignment70);
-
-  hbox68 = gtk_hbox_new (FALSE, 2);
-  gtk_widget_show (hbox68);
-  gtk_container_add (GTK_CONTAINER (alignment70), hbox68);
-
-  image90 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
-  gtk_widget_show (image90);
-  gtk_box_pack_start (GTK_BOX (hbox68), image90, FALSE, FALSE, 0);
-
-  label242 = gtk_label_new_with_mnemonic ("Delete Card");
-  gtk_widget_show (label242);
-  gtk_box_pack_start (GTK_BOX (hbox68), label242, FALSE, FALSE, 0);
-
-  gend_apply_button = gtk_button_new_from_stock ("gtk-apply");
-  gtk_widget_show (gend_apply_button);
-  gtk_box_pack_start (GTK_BOX (hbox46), gend_apply_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_apply_button), 2);
-
-  gend_ok_button = gtk_button_new_from_stock ("gtk-ok");
-  gtk_widget_show (gend_ok_button);
-  gtk_box_pack_start (GTK_BOX (hbox46), gend_ok_button, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (gend_ok_button), 2);
-
-  g_signal_connect ((gpointer) gend_editor, "destroy",
-                    G_CALLBACK (on_gend_editor_destroy),
-                    NULL);
-  g_signal_connect ((gpointer) gend_nognd_radiobutton, "toggled",
-                    G_CALLBACK (on_gend_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) gend_img_radiobutton, "toggled",
-                    G_CALLBACK (on_gend_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) gend_noimg_radiobutton, "toggled",
-                    G_CALLBACK (on_gend_radiobutton_toggled),
-                    NULL);
-  g_signal_connect ((gpointer) gend_cancel_button, "clicked",
-                    G_CALLBACK (on_gend_cancel_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gend_apply_button, "clicked",
-                    G_CALLBACK (on_gend_apply_button_clicked),
-                    NULL);
-  g_signal_connect ((gpointer) gend_ok_button, "clicked",
-                    G_CALLBACK (on_gend_ok_button_clicked),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (gend_editor, gend_editor, "gend_editor");
-  GLADE_HOOKUP_OBJECT (gend_editor, vbox26, "vbox26");
-  GLADE_HOOKUP_OBJECT (gend_editor, frame46, "frame46");
-  GLADE_HOOKUP_OBJECT (gend_editor, alignment48, "alignment48");
-  GLADE_HOOKUP_OBJECT (gend_editor, vbox27, "vbox27");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_nognd_radiobutton, "gend_nognd_radiobutton");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_img_radiobutton, "gend_img_radiobutton");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_noimg_radiobutton, "gend_noimg_radiobutton");
-  GLADE_HOOKUP_OBJECT (gend_editor, label211, "label211");
-  GLADE_HOOKUP_OBJECT (gend_editor, hbox46, "hbox46");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_cancel_button, "gend_cancel_button");
-  GLADE_HOOKUP_OBJECT (gend_editor, alignment70, "alignment70");
-  GLADE_HOOKUP_OBJECT (gend_editor, hbox68, "hbox68");
-  GLADE_HOOKUP_OBJECT (gend_editor, image90, "image90");
-  GLADE_HOOKUP_OBJECT (gend_editor, label242, "label242");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_apply_button, "gend_apply_button");
-  GLADE_HOOKUP_OBJECT (gend_editor, gend_ok_button, "gend_ok_button");
-
+  gchar *object_ids[] = { GEND_EDITOR_IDS };
+  Gtk_Builder( builder, object_ids );
+  gend_editor = Builder_Get_Object( *builder, "gend_editor" );
   return gend_editor;
 }
 
-GtkWidget*
-create_aboutdialog (void)
+  GtkWidget *
+create_aboutdialog( GtkBuilder **builder )
 {
-  GtkWidget *aboutdialog;
-  const gchar *authors[] = {
-    "Neoklis Kyriazis",
-    "Ham Radio Call: 5B4AZ",
-    "http://www.qsl.net/5b4az",
-    NULL
-  };
-  const gchar *documenters[] = {
-    "Neoklis Kyriazis",
-    NULL
-  };
-  /* TRANSLATORS: Replace this string with your names, one name per line. */
-  gchar *translators = _("translator-credits");
-
-  aboutdialog = gtk_about_dialog_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (aboutdialog), 5);
-  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog), VERSION);
-  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog), _("Xnec2c"));
-  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog), _("(C) 2007-2010 Neoklis Kyriazis"));
-  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog), _("xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.\n\nxnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.\n\nxnec2c has a b [...]
-  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog), _("GPL v2 or higher"));
-  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (aboutdialog), "http://www.qsl.net/5b4az");
-  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog), authors);
-  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (aboutdialog), documenters);
-  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog), translators);
-
-  g_signal_connect ((gpointer) aboutdialog, "close",
-                    G_CALLBACK (on_aboutdialog_close),
-                    NULL);
-  g_signal_connect ((gpointer) aboutdialog, "response",
-                    G_CALLBACK (on_aboutdialog_response),
-                    NULL);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog, aboutdialog, "aboutdialog");
-
+  gchar *object_ids[] = { ABOUT_DIALOG_IDS };
+  Gtk_Builder( builder, object_ids );
+  GtkWidget *aboutdialog = Builder_Get_Object( *builder, "aboutdialog" );
   return aboutdialog;
 }
 
diff --git a/src/interface.h b/src/interface.h
index 5af60f9..67247e5 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -1,35 +1,763 @@
 /*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
+ *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-GtkWidget* create_main_window (void);
-GtkWidget* create_filechooserdialog (void);
-GtkWidget* create_fileselection (void);
-GtkWidget* create_freqplots_window (void);
-GtkWidget* create_rdpattern_window (void);
-GtkWidget* create_quit_dialog (void);
-GtkWidget* create_error_dialog (void);
-GtkWidget* create_animate_dialog (void);
-GtkWidget* create_nec2_editor (void);
-GtkWidget* create_wire_editor (void);
-GtkWidget* create_patch_editor (void);
-GtkWidget* create_arc_editor (void);
-GtkWidget* create_transform_editor (void);
-GtkWidget* create_helix_editor (void);
-GtkWidget* create_reflect_editor (void);
-GtkWidget* create_scale_editor (void);
-GtkWidget* create_cylinder_editor (void);
-GtkWidget* create_kernel_command (void);
-GtkWidget* create_execute_command (void);
-GtkWidget* create_intrange_command (void);
-GtkWidget* create_ground_command (void);
-GtkWidget* create_nearfield_command (void);
-GtkWidget* create_radiation_command (void);
-GtkWidget* create_excitation_command (void);
-GtkWidget* create_frequency_command (void);
-GtkWidget* create_loading_command (void);
-GtkWidget* create_network_command (void);
-GtkWidget* create_txline_command (void);
-GtkWidget* create_ground2_command (void);
-GtkWidget* create_gend_editor (void);
-GtkWidget* create_aboutdialog (void);
+#ifndef INTERFACE_H
+#define INTERFACE_H		1
+
+#include "common.h"
+
+#define ABOUT_DIALOG_IDS \
+"aboutdialog", \
+NULL
+
+#define ANIMATE_DIALOG_IDS \
+"animate_freq_adjustment", \
+"animate_steps_adjustment", \
+"animate_dialog", \
+"animate_steps_spinbutton", \
+"animate_freq_spinbutton", \
+NULL
+
+#define ARC_EDITOR_IDS \
+"arc_dia_adjustment", \
+"arc_end1_adjustment", \
+"arc_end2_adjustment", \
+"arc_numseg_adjustment", \
+"arc_pcl_adjustment", \
+"arc_rad_adjustment", \
+"arc_res_adjustment", \
+"arc_tagnum_adjustment", \
+"arc_editor", \
+"arc_tagnum_spinbutton", \
+"arc_numseg_spinbutton", \
+"arc_pcl_spinbutton", \
+"arc_dia_spinbutton", \
+"arc_rad_spinbutton", \
+"arc_end1_spinbutton", \
+"arc_end2_spinbutton", \
+"arc_res_spinbutton", \
+NULL
+
+#define CYLINDER_EDITOR_IDS \
+"cylinder_taginc_adjustment", \
+"cylinder_total_adjustment", \
+"cylinder_editor", \
+"cylinder_total_spinbutton", \
+"cylinder_taginc_spinbutton", \
+NULL
+
+#define ERROR_DIALOG_IDS \
+"error_dialog", \
+"error_label", \
+NULL
+
+#define EXCITATION_EDITOR_IDS \
+"excitation_f1_adjustment", \
+"excitation_f2_adjustment", \
+"excitation_f3_adjustment", \
+"excitation_f4_adjustment", \
+"excitation_f5_adjustment", \
+"excitation_f6_adjustment", \
+"excitation_i2_adjustment", \
+"excitation_i3_adjustment", \
+"excitation_command", \
+"excitation_i10_radiobutton", \
+"excitation_i13_radiobutton", \
+"excitation_i11_radiobutton", \
+"excitation_i14_radiobutton", \
+"excitation_i12_radiobutton", \
+"excitation_i15_radiobutton", \
+"excitation_i419_checkbutton", \
+"excitation_i420_checkbutton", \
+"excitation_i2_label", \
+"excitation_i3_label", \
+"excitation_i2_spinbutton", \
+"excitation_i3_spinbutton", \
+"excitation_f1_label", \
+"excitation_f2_label", \
+"excitation_f3_label", \
+"excitation_f1_spinbutton", \
+"excitation_f2_spinbutton", \
+"excitation_f3_spinbutton", \
+"excitation_f4_label", \
+"excitation_f5_label", \
+"excitation_f6_label", \
+"excitation_f6_spinbutton", \
+"excitation_f5_spinbutton", \
+"excitation_f4_spinbutton", \
+NULL
+
+#define EXECUTE_EDITOR_IDS \
+"execute_command", \
+"execute_none_radiobutton", \
+"execute_xz_radiobutton", \
+"execute_yz_radiobutton", \
+"execute_both_radiobutton", \
+NULL
+
+#define FILECHOOSER_DIALOG_IDS \
+"filechooserdialog", \
+NULL
+
+#define FREQPLOTS_WINDOW_IDS \
+"freqplots_zo_adjustment", \
+"freqplots_window", \
+"saveas_gnuplot", \
+"freqplots_fmhz_entry", \
+"freqplots_maxgain_entry", \
+"freqplots_vswr_entry", \
+"freqplots_zreal_entry", \
+"freqplots_zimag_entry", \
+"freqplots_zo_spinbutton", \
+"freqplots_drawingarea", \
+"freqplots_label", \
+NULL
+
+#define FREQUENCY_EDITOR_IDS \
+"frequency_end_adjustment", \
+"frequency_num_adjustment", \
+"frequency_start_adjustment", \
+"frequency_step_adjustment", \
+"frequency_command", \
+"frequency_add_radiobutton", \
+"frequency_mul_radiobutton", \
+"frequency_num_spinbutton", \
+"frequency_start_spinbutton", \
+"frequency_step_spinbutton", \
+"frequency_end_spinbutton", \
+"frequency_new_button", \
+"frequency_cancel_button", \
+"frequency_apply_button", \
+"frequency_ok_button", \
+NULL
+
+#define GEND_EDITOR_IDS \
+"gend_editor", \
+"gend_nognd_radiobutton", \
+"gend_img_radiobutton", \
+"gend_noimg_radiobutton", \
+"gend_cancel_button", \
+"gend_apply_button", \
+"gend_ok_button", \
+NULL
+
+#define GROUND2_EDITOR_IDS \
+"ground2_below_adjustment", \
+"ground2_diel_adjustment", \
+"ground2_dist_adjustment", \
+"ground2_res_adjustment", \
+"ground2_command", \
+"ground2_diel_spinbutton", \
+"ground2_dist_spinbutton", \
+"ground2_res_spinbutton", \
+"ground2_below_spinbutton", \
+"ground2_new_button", \
+"ground2_cancel_button", \
+"ground2_apply_button", \
+"ground2_ok_button", \
+NULL
+
+#define GROUND_EDITOR_IDS \
+"ground_below_adjustment", \
+"ground_diam_adjustment", \
+"ground_diel1_adjustment", \
+"ground_diel2_adjustment", \
+"ground_dist2_adjustment", \
+"ground_nrad_adjustment", \
+"ground_res1_adjustment", \
+"ground_res2_adjustment", \
+"ground_scrnrd_adjustment", \
+"ground_command", \
+"ground_perf_radiobutton", \
+"ground_smfld_radiobutton", \
+"ground_radl_checkbutton", \
+"ground_refl_radiobutton", \
+"ground_null_radiobutton", \
+"ground_secmd_checkbutton", \
+"ground_med1_frame", \
+"ground_diel1_spinbutton", \
+"ground_res1_spinbutton", \
+"ground_med2_frame", \
+"ground_diel2_spinbutton", \
+"ground_dist2_spinbutton", \
+"ground_res2_spinbutton", \
+"ground_below_spinbutton", \
+"ground_radial_frame", \
+"ground_scrnrd_spinbutton", \
+"ground_nrad_spinbutton", \
+"ground_diam_spinbutton", \
+"ground_new_button", \
+"ground_cancel_button", \
+"ground_apply_button", \
+"ground_ok_button", \
+NULL
+
+#define HELIX_EDITOR_IDS \
+"helix_dia_adjustment", \
+"helix_len_adjustment", \
+"helix_nturns_adjustment", \
+"helix_numseg_adjustment", \
+"helix_pcl_adjustment", \
+"helix_radxzhl_adjustment", \
+"helix_radxzo_adjustment", \
+"helix_radyzhl_adjustment", \
+"helix_radyzo_adjustment", \
+"helix_res_adjustment", \
+"helix_tagnum_adjustment", \
+"helix_tspace_adjustment", \
+"helix_editor", \
+"helix_lh_checkbutton", \
+"helix_linkall_radiobutton", \
+"helix_linkzo_radiobutton", \
+"helix_linkzhl_radiobutton", \
+"helix_tagnum_spinbutton", \
+"helix_tspace_spinbutton", \
+"helix_radxzo_spinbutton", \
+"helix_numseg_spinbutton", \
+"helix_len_spinbutton", \
+"helix_radyzo_spinbutton", \
+"helix_pcl_spinbutton", \
+"helix_dia_spinbutton", \
+"helix_radxzhl_spinbutton", \
+"helix_nturns_spinbutton", \
+"helix_res_spinbutton", \
+"helix_radyzhl_spinbutton", \
+"helix_new_button", \
+"helix_cancel_button", \
+"helix_apply_button", \
+"helix_ok_button", \
+NULL
+
+#define INTRANGE_EDITOR_IDS \
+"intrange_wlen_adjustment", \
+"intrange_command", \
+"intrange_wlen_spinbutton", \
+"intrange_new_button", \
+"intrange_cancel_button", \
+"intrange_apply_button", \
+"intrange_ok_button", \
+NULL
+
+#define KERNEL_EDITOR_IDS \
+"kernel_command", \
+"kernel_checkbutton", \
+"kernel_new_button", \
+"kernel_cancel_button", \
+"kernel_apply_button", \
+"kernel_ok_button", \
+NULL
+
+#define LOADING_EDITOR_IDS \
+"loading_f1_adjustment", \
+"loading_f2_adjustment", \
+"loading_f3_adjustment", \
+"loading_i2_adjustment", \
+"loading_i3_adjustment", \
+"loading_i4_adjustment", \
+"loading_command", \
+"loading_null_radiobutton", \
+"loading_slrlc_radiobutton", \
+"loading_pdrlc_radiobutton", \
+"loading_plrlc_radiobutton", \
+"loading_rr_radiobutton", \
+"loading_sdrlc_radiobutton", \
+"loading_wcon_radiobutton", \
+"loading_frame", \
+"loading_i2_label", \
+"loading_i2_spinbutton", \
+"loading_f1_label", \
+"loading_f1_spinbutton", \
+"loading_i3_label", \
+"loading_i3_spinbutton", \
+"loading_f2_label", \
+"loading_f2_spinbutton", \
+"loading_i4_label", \
+"loading_i4_spinbutton", \
+"loading_f3_label", \
+"loading_f3_spinbutton", \
+"loading_new_button", \
+"loading_cancel_button", \
+"loading_apply_button", \
+"loading_ok_button", \
+NULL
+
+#define NEARFIELD_EDITOR_IDS \
+"nearfield_f1_adjustment", \
+"nearfield_f2_adjustment", \
+"nearfield_f3_adjustment", \
+"nearfield_f4_adjustment", \
+"nearfield_f5_adjustment", \
+"nearfield_f6_adjustment", \
+"nearfield_nx_adjustment", \
+"nearfield_ny_adjustment", \
+"nearfield_nz_adjustment", \
+"nearfield_command", \
+"nearfield_ne_checkbutton", \
+"nearfield_rect_radiobutton", \
+"nearfield_nh_checkbutton", \
+"nearfield_sph_radiobutton", \
+"nearfield_i1_label", \
+"nearfield_nx_spinbutton", \
+"nearfield_f1_label", \
+"nearfield_f1_spinbutton", \
+"nearfield_f4_label", \
+"nearfield_f4_spinbutton", \
+"nearfield_i2_label", \
+"nearfield_ny_spinbutton", \
+"nearfield_f2_label", \
+"nearfield_f2_spinbutton", \
+"nearfield_f5_label", \
+"nearfield_f5_spinbutton", \
+"nearfield_i3_label", \
+"nearfield_nz_spinbutton", \
+"nearfield_f3_label", \
+"nearfield_f3_spinbutton", \
+"nearfield_f6_label", \
+"nearfield_f6_spinbutton", \
+"nearfield_new_button", \
+"nearfield_cancel_button", \
+"nearfield_apply_button", \
+"nearfield_ok_button", \
+NULL
+
+#define NEC2_EDITOR_IDS \
+"nec2_editor", \
+"nec2_row_add", \
+"nec2_row_remv", \
+"nec2_treeview_clear", \
+"nec2_save_as", \
+"nec2_save", \
+"nec2_apply_checkbutton", \
+"nec2_revert", \
+"cmnt_scrolledwindow", \
+"nec2_cmnt_treeview", \
+"gw", \
+"ga", \
+"gh", \
+"sp", \
+"gr", \
+"gm", \
+"gx", \
+"gs", \
+"geom_scrolledwindow", \
+"nec2_geom_treeview", \
+"ex", \
+"rp", \
+"fr", \
+"ne", \
+"gn", \
+"gd", \
+"ld", \
+"ek", \
+"nt", \
+"kh", \
+"tl", \
+"xq", \
+"cmnd_scrolledwindow", \
+"nec2_cmnd_treeview", \
+NULL
+
+#define NETWORK_EDITOR_IDS \
+"network_f1_adjustment", \
+"network_f2_adjustment", \
+"network_f3_adjustment", \
+"network_f4_adjustment", \
+"network_f5_adjustment", \
+"network_f6_adjustment", \
+"network_i1_adjustment", \
+"network_i2_adjustment", \
+"network_i3_adjustment", \
+"network_i4_adjustment", \
+"network_command", \
+"network_i1_spinbutton", \
+"network_i3_spinbutton", \
+"network_i2_spinbutton", \
+"network_i4_spinbutton", \
+"network_f1_spinbutton", \
+"network_f3_spinbutton", \
+"network_f5_spinbutton", \
+"network_f2_spinbutton", \
+"network_f4_spinbutton", \
+"network_f6_spinbutton", \
+"network_new_button", \
+"network_cancel_button", \
+"network_apply_button", \
+"network_ok_button", \
+NULL
+
+#define PATCH_EDITOR_IDS \
+"patch_nx_adjustment", \
+"patch_ny_adjustment", \
+"patch_x1_adjustment", \
+"patch_x2_adjustment", \
+"patch_x3_adjustment", \
+"patch_x4_adjustment", \
+"patch_y1_adjustment", \
+"patch_y2_adjustment", \
+"patch_y3_adjustment", \
+"patch_y4_adjustment", \
+"patch_z1_adjustment", \
+"patch_z2_adjustment", \
+"patch_z3_adjustment", \
+"patch_z4_adjustment", \
+"patch_editor", \
+"patch_type_frame", \
+"patch_arbitrary_radiobutton", \
+"patch_rectangular_radiobutton", \
+"patch_triangular_radiobutton", \
+"patch_quadrilateral_radiobutton", \
+"patch_surface_radiobutton", \
+"patch_sm_frame", \
+"patch_nx_spinbutton", \
+"patch_ny_spinbutton", \
+"patch_x1_label", \
+"patch_x1_spinbutton", \
+"patch_x2_label", \
+"patch_x2_spinbutton", \
+"patch_y1_label", \
+"patch_y1_spinbutton", \
+"patch_y2_label", \
+"patch_y2_spinbutton", \
+"patch_z1_label", \
+"patch_z1_spinbutton", \
+"patch_z2_label", \
+"patch_z2_spinbutton", \
+"patch_sc_frame", \
+"patch_sc_grid", \
+"patch_x3_spinbutton", \
+"patch_y3_spinbutton", \
+"patch_z3_spinbutton", \
+"patch_x4_spinbutton", \
+"patch_y4_spinbutton", \
+"patch_z4_spinbutton", \
+"patch_new_button", \
+"patch_cancel_button", \
+"patch_apply_button", \
+"patch_ok_button", \
+NULL
+
+#define QUIT_DIALOG_IDS \
+"quit_dialog", \
+"quit_cancelbutton", \
+"quit_okbutton", \
+"quit_label", \
+NULL
+
+#define RADIATION_EDITOR_IDS \
+"radiation_f1_adjustment", \
+"radiation_f2_adjustment", \
+"radiation_f3_adjustment", \
+"radiation_f4_adjustment", \
+"radiation_f5_adjustment", \
+"radiation_f6_adjustment", \
+"radiation_i2_adjustment", \
+"radiation_i3_adjustment", \
+"radiation_command", \
+"radiation_i10_radiobutton", \
+"radiation_i11_radiobutton", \
+"radiation_i12_radiobutton", \
+"radiation_i14_radiobutton", \
+"radiation_i16_radiobutton", \
+"radiation_i13_radiobutton", \
+"radiation_i15_radiobutton", \
+"radiation_x0_radiobutton", \
+"radiation_x1_radiobutton", \
+"radiation_n1_radiobutton", \
+"radiation_n3_radiobutton", \
+"radiation_n5_radiobutton", \
+"radiation_d1_radiobutton", \
+"radiation_n0_radiobutton", \
+"radiation_n2_radiobutton", \
+"radiation_n4_radiobutton", \
+"radiation_d0_radiobutton", \
+"radiation_a0_radiobutton", \
+"radiation_a2_radiobutton", \
+"radiation_a1_radiobutton", \
+"radiation_f1_label", \
+"radiation_f3_label", \
+"radiation_i2_spinbutton", \
+"radiation_f1_spinbutton", \
+"radiation_f3_spinbutton", \
+"radiation_i1_label", \
+"radiation_i3_spinbutton", \
+"radiation_f2_spinbutton", \
+"radiation_f4_spinbutton", \
+"radiation_f5_label", \
+"radiation_f5_spinbutton", \
+"radiation_f6_label", \
+"radiation_f6_spinbutton", \
+"radiation_new_button", \
+"radiation_cancel_button", \
+"radiation_apply_button", \
+"radiation_ok_button", \
+NULL
+
+#define RDPATTERN_WINDOW_IDS \
+"rdpattern_freq_adjustment", \
+"rdpattern_incline_adjustment", \
+"rdpattern_rotate_adjustment", \
+"rdpattern_zoom_adjustment", \
+"rdpattern_window", \
+"menuitem9_menu", \
+"rdpattern_new", \
+"rdpattern_open", \
+"rdpattern_save", \
+"rdpattern_save_as", \
+"rdpattern_save_as_gnuplot", \
+"rdpattern_quit", \
+"rdpattern_view_menuitem", \
+"rdpattern_view_menuitem_menu", \
+"rdpattern_pol_menu", \
+"rdpattern_pol_menu_menu", \
+"rdpattern_total", \
+"rdpattern_horizontal", \
+"rdpattern_vertical", \
+"rdpattern_right_hand", \
+"rdpattern_left_hand", \
+"rdpattern_gain_scaling", \
+"rdpattern_gain_scaling_menu", \
+"rdpattern_linear_power", \
+"rdpattern_linear_voltage", \
+"rdpattern_arrl_style", \
+"rdpattern_logarithmic", \
+"near_field", \
+"near_field_menu", \
+"rdpattern_e_field", \
+"rdpattern_h_field", \
+"rdpattern_poynting_vector", \
+"rdpattern_animate", \
+"total_field", \
+"total_field_menu", \
+"near_peak_value", \
+"near_snapshot", \
+"rdpattern_common_projection", \
+"rdpattern_common_frequency", \
+"rdpattern_overlay_structure", \
+"rdpattern_gain_togglebutton", \
+"rdpattern_eh_togglebutton", \
+"rdpatttern_loop_start", \
+"rdpattern_loop_pause", \
+"rdpattern_loop_reset", \
+"rdpattern_fstep_entry", \
+"rdpattern_colorcode_minlabel", \
+"rdpattern_colorcode_drawingarea", \
+"rdpattern_colorcode_maxlabel", \
+"rdpattern_viewer_gain", \
+"rdpattern_freq_spinbutton", \
+"rdpattern_freq_label", \
+"rdpattern_freq_checkbutton", \
+"rdpattern_new_freq_button", \
+"rdpattern_x_axis", \
+"rdpattern_y_axis", \
+"rdpattern_z_axis", \
+"rdpattern_default_view", \
+"rdpattern_rotate_spinbutton", \
+"rdpattern_incline_spinbutton", \
+"rdpattern_zoom_spinbutton", \
+"rdpattern_plus_button", \
+"rdpattern_minus_button", \
+"rdpattern_one_button", \
+"rdpattern_drawingarea", \
+"rdpattern_label", \
+"saveas_gnuplot", \
+NULL
+
+#define REFLECT_EDITOR_IDS \
+"reflect_taginc_adjustment", \
+"reflect_editor", \
+"reflect_x_checkbutton", \
+"reflect_z_checkbutton", \
+"reflect_y_checkbutton", \
+"reflect_taginc_spinbutton", \
+"reflect_new_button", \
+"reflect_cancel_button", \
+"reflect_apply_button", \
+"reflect_ok_button", \
+NULL
+
+#define SCALE_EDITOR_IDS \
+"scale_factor_adjustment", \
+"scale_from_adjustment", \
+"scale_to_adjustment", \
+"scale_editor", \
+"scale_from_spinbutton", \
+"scale_factor_spinbutton", \
+"scale_to_spinbutton", \
+"scale_new_button", \
+"scale_cancel_button", \
+"scale_apply_button", \
+"scale_ok_button", \
+NULL
+
+#define MAIN_WINDOW_IDS \
+"main_freq_adjustment", \
+"main_incline_adjustment", \
+"main_rotate_adjustment", \
+"structure_zoom_adjustment", \
+"main_window", \
+"menuitem1_menu", \
+"main_new", \
+"main_open_input", \
+"nec2_edit", \
+"main_save", \
+"main_save_as", \
+"struct_save_as_gnuplot", \
+"main_quit", \
+"main_view_menuitem", \
+"main_view_menuitem_menu", \
+"main_rdpattern", \
+"main_freqplots", \
+"main_pol_menu", \
+"main_pol_menu_menu", \
+"main_total", \
+"main_horizontal", \
+"main_vertical", \
+"main_right_hand", \
+"main_left_hand", \
+"main_common_projection", \
+"main_common_frequency", \
+"menuitem4_menu", \
+"about", \
+"main_hbox1", \
+"main_currents_togglebutton", \
+"main_charges_togglebutton", \
+"main_loop_start", \
+"main_loop_pause", \
+"main_loop_reset", \
+"structure_fstep_entry", \
+"main_hbox2", \
+"main_colorcode_zerolabel", \
+"main_colorcode_drawingarea", \
+"main_colorcode_maxlabel", \
+"main_gain_entry", \
+"main_freq_spinbutton", \
+"main_freq_label", \
+"main_freq_checkbutton", \
+"main_new_freq_button", \
+"main_hbox3", \
+"main_x_axis", \
+"main_y_axis", \
+"main_z-axis", \
+"main_default_view", \
+"main_rotate_spinbutton", \
+"main_incline_spinbutton", \
+"saveas_gnuplot", \
+"structure_zoom_spinbutton", \
+"structure_plus_button", \
+"structure_minus_button", \
+"structure_one_button", \
+"structure_drawingarea", \
+"struct_label", \
+NULL
+
+#define TRANSFORM_EDITOR_IDS \
+"transform_mx_adjustment", \
+"transform_my_adjustment", \
+"transform_mz_adjustment", \
+"transform_new_adjustment", \
+"transform_rx_adjustment", \
+"transform_ry_adjustment", \
+"transform_rz_adjustment", \
+"transform_start_adjustment", \
+"transform_taginc_adjustment", \
+"transform_editor", \
+"transform_taginc_spinbutton", \
+"transform_rx_spinbutton", \
+"transform_mx_spinbutton", \
+"transform_new_spinbutton", \
+"transform_ry_spinbutton", \
+"transform_my_spinbutton", \
+"transform_start_spinbutton", \
+"transform_rz_spinbutton", \
+"transform_mz_spinbutton", \
+"transform_new_button", \
+"transform_cancel_button", \
+"transform_apply_button", \
+"transform_ok_button", \
+NULL
+
+#define TXLINE_EDITOR_IDS \
+"txline_f1_adjustment", \
+"txline_f2_adjustment", \
+"txline_f3_adjustment", \
+"txline_f4_adjustment", \
+"txline_f5_adjustment", \
+"txline_f6_adjustment", \
+"txline_command", \
+"txline_i1_spinbutton", \
+"txline_i3_spinbutton", \
+"txline_i2_spinbutton", \
+"txline_i4_spinbutton", \
+"txline_crossed_checkbutton", \
+"txline_f1_spinbutton", \
+"txline_f3_spinbutton", \
+"txline_f5_spinbutton", \
+"txline_f2_spinbutton", \
+"txline_f4_spinbutton", \
+"txline_f6_spinbutton", \
+"txline_new_button", \
+"txline_cancel_button", \
+"txline_apply_button", \
+"txline_ok_button", \
+"txline_i1_adjustment", \
+"txline_i2_adjustment", \
+"txline_i3_adjustment", \
+"txline_i4_adjustment", \
+NULL
+
+#define WIRE_EDITOR_IDS \
+"wire_dia1_adjustment", \
+"wire_dia_adjustment", \
+"wire_dian_adjustment", \
+"wire_len_adjustment", \
+"wire_numseg_adjustment", \
+"wire_pcl_adjustment", \
+"wire_rdia_adjustment", \
+"wire_res_adjustment", \
+"wire_rlen_adjustment", \
+"wire_tagnum_adjustment", \
+"wire_x1_adjustment", \
+"wire_x2_adjustment", \
+"wire_y1_adjustment", \
+"wire_y2_adjustment", \
+"wire_z1_adjustment", \
+"wire_z2_adjustment", \
+"wire_editor", \
+"wire_tagnum_spinbutton", \
+"wire_x1_spinbutton", \
+"wire_x2_spinbutton", \
+"wire_numseg_spinbutton", \
+"wire_y1_spinbutton", \
+"wire_y2_spinbutton", \
+"wire_pcl_spinbutton", \
+"wire_z1_spinbutton", \
+"wire_z2_spinbutton", \
+"wire_dia_spinbutton", \
+"wire_len_spinbutton", \
+"wire_res_spinbutton", \
+"wire_taperframe", \
+"wire_taper_checkbutton", \
+"wire_rlen_spinbutton", \
+"wire_dia1_spinbutton", \
+"wire_dian_spinbutton", \
+"wire_rdia_spinbutton", \
+"wire_new_button", \
+"wire_cancel_button", \
+"wire_apply_button", \
+"wire_ok_button", \
+NULL
+
+#endif
diff --git a/src/main.c b/src/main.c
index cd7ea73..4e445e1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,19 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- * Initial main.c file generated by Glade. Edit as required.
- * Glade will not overwrite this file.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <sys/wait.h>
-#include <locale.h>
-
 #include "main.h"
 #include "shared.h"
 
@@ -187,53 +172,41 @@ main (int argc, char *argv[])
 	FORKED = TRUE;
   } /* if( calc_data.num_jobs > 1 ) */
 
-  gtk_set_locale ();
   gtk_init (&argc, &argv);
-  setlocale(LC_NUMERIC, "C");
-  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
-
-  /*
-   * The following code was added by Glade to create one of each component
-   * (except popup menus), just so that you see something after building
-   * the project. Delete any components that you don't want shown initially.
-   */
-  main_window = create_main_window ();
+
+  /* Create home folder paths for glade file and NEC2 files */
+  Strlcpy( xnec2c_glade, getenv("HOME"), sizeof(xnec2c_glade) );
+  Strlcat( xnec2c_glade, "/xnec2c/xnec2c.glade", sizeof(xnec2c_glade) );
+  Strlcpy( xnec2c_files, getenv("HOME"), sizeof(xnec2c_files) );
+  Strlcat( xnec2c_files, "/xnec2c/nec2_files/", sizeof(xnec2c_files) );
+
+  /* Create the main window */
+  main_window = create_main_window( &main_window_builder );
   gtk_window_set_title( GTK_WINDOW(main_window), PACKAGE_STRING );
   gtk_widget_show (main_window);
-  mainwin_frequency = GTK_SPIN_BUTTON(lookup_widget(
-		main_window, "main_freq_spinbutton") );
-
-  gtk_widget_hide_all( lookup_widget(
-		main_window, "main_hbox1") );
-  gtk_widget_hide_all( lookup_widget(
-		main_window, "main_hbox2") );
-  gtk_widget_hide_all( lookup_widget(
-		main_window, "main_hbox3") );
-  gtk_widget_hide_all( lookup_widget(
-		main_window, "main_view_menuitem") );
-  gtk_widget_hide( lookup_widget(
-		main_window, "structure_drawingarea") );
-
-  structure_drawingarea = lookup_widget(
-	  main_window, "structure_drawingarea");
-  gtk_widget_add_events(
-	  GTK_WIDGET(structure_drawingarea),
-	  GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK );
-  structure_motion_handler = g_signal_connect (
-	  (gpointer) structure_drawingarea,
-	  "motion_notify_event",
-	  G_CALLBACK (on_structure_drawingarea_motion_notify_event),
-	  NULL);
+  mainwin_frequency = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(main_window_builder, "main_freq_spinbutton") );
+
+  gtk_widget_hide( Builder_Get_Object(main_window_builder, "main_hbox1") );
+  gtk_widget_hide( Builder_Get_Object(main_window_builder, "main_hbox2") );
+  gtk_widget_hide( Builder_Get_Object(main_window_builder, "main_hbox3") );
+  gtk_widget_hide( Builder_Get_Object(main_window_builder,
+		"main_view_menuitem") );
+  gtk_widget_hide( Builder_Get_Object(main_window_builder,
+		"structure_drawingarea") );
+
+  structure_drawingarea =
+	Builder_Get_Object(main_window_builder, "structure_drawingarea");
 
   /* Initialize structure projection angles */
-  rotate_structure  = GTK_SPIN_BUTTON(lookup_widget(
-		main_window, "main_rotate_spinbutton"));
-  incline_structure = GTK_SPIN_BUTTON(lookup_widget(
-		main_window, "main_incline_spinbutton"));
-  structure_zoom = GTK_SPIN_BUTTON(lookup_widget(
-		main_window, "structure_zoom_spinbutton"));
-  structure_fstep_entry = GTK_ENTRY(lookup_widget(
-		main_window, "structure_fstep_entry")) ;
+  rotate_structure  = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(main_window_builder, "main_rotate_spinbutton"));
+  incline_structure = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(main_window_builder, "main_incline_spinbutton"));
+  structure_zoom = GTK_SPIN_BUTTON(
+	  Builder_Get_Object(main_window_builder, "structure_zoom_spinbutton"));
+  structure_fstep_entry = GTK_ENTRY(
+	  Builder_Get_Object(main_window_builder, "structure_fstep_entry")) ;
 
   structure_proj_params.Wr =
 	gtk_spin_button_get_value(rotate_structure);
@@ -292,14 +265,14 @@ Open_Input_File( gpointer udata )
   if( !ok )
   {
 	/* Hide main control buttons etc */
-	gtk_widget_hide_all( lookup_widget(
-		  main_window, "main_hbox1") );
-	gtk_widget_hide_all( lookup_widget(
-		  main_window, "main_hbox2") );
-	gtk_widget_hide_all( lookup_widget(
-		  main_window, "main_view_menuitem") );
-	gtk_widget_hide( lookup_widget(
-		  main_window, "structure_drawingarea") );
+	gtk_widget_hide(
+	Builder_Get_Object( main_window_builder, "main_hbox1") );
+	gtk_widget_hide(
+		Builder_Get_Object(main_window_builder, "main_hbox2") );
+	gtk_widget_hide(
+		Builder_Get_Object(main_window_builder, "main_view_menuitem") );
+	gtk_widget_hide(
+		Builder_Get_Object(main_window_builder, "structure_drawingarea") );
 
 	/* Close plot/rdpat windows */
 	if( rdpattern_window != NULL )
@@ -330,14 +303,12 @@ Open_Input_File( gpointer udata )
 	}
   } /* if( FORKED ) */
 
-  /* Allow redraws on expose events etc */
-  ClearFlag( INPUT_PENDING );
-
   /* Initialize xnec2c */
   SetFlag( COMMON_PROJECTION );
   SetFlag( COMMON_FREQUENCY );
   SetFlag( MAIN_NEW_FREQ );
-  SetFlag( FREQ_LOOP_INIT );
+  if( isFlagSet(PLOT_ENABLED) )
+	SetFlag( FREQ_LOOP_INIT );
   floop_tag = 0;
   save.last_freq = 0.0;
   crnt.newer = 0;
@@ -345,6 +316,9 @@ Open_Input_File( gpointer udata )
   near_field.newer = 0;
   near_field.valid = 0;
 
+  /* Allow redraws on expose events etc */
+  ClearFlag( INPUT_PENDING );
+
   /* Set projection at 45 deg rotation and
    * inclination if NEC2 editor window is not open */
   if( nec2_edit_window == NULL )
@@ -353,20 +327,14 @@ Open_Input_File( gpointer udata )
   New_Structure_Projection_Angle();
 
   /* Show current frequency */
-  gtk_spin_button_set_value(
-	  mainwin_frequency, (gdouble)calc_data.fmhz );
+  gtk_spin_button_set_value( mainwin_frequency, (gdouble)calc_data.fmhz );
 
   /* Show main control buttons etc */
-  gtk_widget_show_all( lookup_widget(
-		main_window, "main_hbox1") );
-  gtk_widget_show_all( lookup_widget(
-		main_window, "main_hbox2") );
-  gtk_widget_show_all( lookup_widget(
-		main_window, "main_hbox3") );
-  gtk_widget_show_all( lookup_widget(
-		main_window, "main_view_menuitem") );
-  gtk_widget_show( lookup_widget(
-		main_window, "structure_drawingarea") );
+  gtk_widget_show( Builder_Get_Object(main_window_builder, "main_hbox1") );
+  gtk_widget_show( Builder_Get_Object(main_window_builder, "main_hbox2") );
+  gtk_widget_show( Builder_Get_Object(main_window_builder, "main_hbox3") );
+  gtk_widget_show( Builder_Get_Object(main_window_builder, "main_view_menuitem") );
+  gtk_widget_show( structure_drawingarea );
 
   /* If currents or charges draw button is active
    * re-initialize structure currents/charges drawing */
@@ -383,9 +351,6 @@ Open_Input_File( gpointer udata )
   else
 	Nec2_Input_File_Treeview( NEC2_EDITOR_RELOAD );
 
-  /* Display sructure */
-  Draw_Structure( structure_drawingarea );
-
   /* Re-initialize Rad Pattern drawing if window open */
   if( rdpattern_window != NULL )
   {
diff --git a/src/main.h b/src/main.h
index 37853db..c360f36 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -22,9 +20,9 @@
 #include "common.h"
 #include "callbacks.h"
 #include "interface.h"
-#include "support.h"
 #include "fork.h"
 #include "nec2_model.h"
+#include <sys/wait.h>
 
 #define OPEN_INPUT_FLAGS \
   RDPAT_FLAGS		| \
diff --git a/src/matrix.c b/src/matrix.c
index a9a840b..fe29395 100644
--- a/src/matrix.c
+++ b/src/matrix.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -46,160 +44,9 @@
 
 /*-------------------------------------------------------------------*/
 
-/* cmset sets up the complex structure matrix in the array cm */
-void cmset( int nrow, complex double *cmx, double rkhx, int iexkx )
-{
-  int mp2, neq, npeq, it, i, j, i1, i2, in2, im1;
-  int im2, ist, ij, ipr, jss, jm1, jm2, jst, k, ka, kk;
-  complex double zaj, deter, *scm = NULL;
-
-  mp2=2* data.mp;
-  npeq= data.np+ mp2;
-  neq= data.n+2* data.m;
-  smat.nop = neq/npeq;
-
-  dataj.rkh= rkhx;
-  dataj.iexk= iexkx;
-  it= matpar.nlast;
-
-  for( i = 0; i < nrow; i++ )
-	for( j = 0; j < it; j++ )
-	  cmx[i+j*nrow]= CPLX_00;
-
-  i1= 1;
-  i2= it;
-  in2= i2;
-
-  if( in2 > data.np)
-	in2= data.np;
-
-  im1= i1- data.np;
-  im2= i2- data.np;
-
-  if( im1 < 1)
-	im1=1;
-
-  ist=1;
-  if( i1 <= data.np)
-	ist= data.np- i1+2;
-
-  /* wire source loop */
-  if( data.n != 0)
-  {
-	for( j = 1; j <= data.n; j++ )
-	{
-	  trio(j);
-	  for( i = 0; i < segj.jsno; i++ )
-	  {
-		ij= segj.jco[i];
-		segj.jco[i]=(( ij-1)/ data.np)* mp2+ ij;
-	  }
-
-	  if( i1 <= in2)
-		cmww( j, i1, in2, cmx, nrow, cmx, nrow,1);
-
-	  if( im1 <= im2)
-		cmws( j, im1, im2, &cmx[(ist-1)*nrow], nrow, cmx, 1);
-
-	  /* matrix elements modified by loading */
-	  if( zload.nload == 0)
-		continue;
-
-	  if( j > data.np)
-		continue;
-
-	  ipr= j;
-	  if( (ipr < 1) || (ipr > it) )
-		continue;
-
-	  zaj= zload.zarray[j-1];
-
-	  for( i = 0; i < segj.jsno; i++ )
-	  {
-		jss= segj.jco[i];
-		cmx[(jss-1)+(ipr-1)*nrow] -=
-		  ( segj.ax[i]+ segj.cx[i])* zaj;
-	  }
-
-	} /* for( j = 1; j <= n; j++ ) */
-
-  } /* if( n != 0) */
-
-  if( data.m != 0)
-  {
-	/* matrix elements for patch current sources */
-	jm1=1- data.mp;
-	jm2=0;
-	jst=1- mp2;
-
-	for( i = 0; i < smat.nop; i++ )
-	{
-	  jm1 += data.mp;
-	  jm2 += data.mp;
-	  jst += npeq;
-
-	  if( i1 <= in2)
-		cmsw( jm1, jm2, i1, in2,
-			&cmx[(jst-1)], cmx, 0, nrow, 1);
-
-	  if( im1 <= im2)
-		cmss( jm1, jm2, im1, im2,
-			&cmx[(jst-1)+(ist-1)*nrow], nrow, 1);
-	}
-
-  } /* if( m != 0) */
-
-  if( matpar.icase == 1)
-	return;
-
-  /* Allocate to scratch memory */
-  size_t mreq = (size_t)data.np2m * sizeof(complex double);
-  mem_alloc( (void **)&scm, mreq, "in matrix.c");
-
-  /* combine elements for symmetry modes */
-  for( i = 0; i < it; i++ )
-  {
-	for( j = 0; j < npeq; j++ )
-	{
-	  for( k = 0; k < smat.nop; k++ )
-	  {
-		ka= j+ k*npeq;
-		scm[k]= cmx[ka+i*nrow];
-	  }
-
-	  deter= scm[0];
-
-	  for( kk = 1; kk < smat.nop; kk++ )
-		deter += scm[kk];
-
-	  cmx[j+i*nrow]= deter;
-
-	  for( k = 1; k < smat.nop; k++ )
-	  {
-		ka= j+ k*npeq;
-		deter= scm[0];
-
-		for( kk = 1; kk < smat.nop; kk++ )
-		{
-		  deter += scm[kk]* smat.ssx[k+kk*smat.nop];
-		  cmx[ka+i*nrow]= deter;
-		}
-
-	  } /* for( k = 1; k < smat.nop; k++ ) */
-
-	} /* for( j = 0; j < npeq; j++ ) */
-
-  } /* for( i = 0; i < it; i++ ) */
-
-  free_ptr( (void **)&scm );
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* cmss computes matrix elements for surface-surface interactions. */
-void cmss( int j1, int j2, int im1, int im2,
+  static void
+cmss( int j1, int j2, int im1, int im2,
 	complex double *cmx, int nrow, int itrp )
 {
   int i1, i2, icomp, ii1, i, il, ii2, jj1, j, jl, jj2;
@@ -304,212 +151,69 @@ void cmss( int j1, int j2, int im1, int im2,
 
 /*-----------------------------------------------------------------------*/
 
-/* computes matrix elements for e along wires due to patch current */
-void cmsw( int j1, int j2, int i1, int i2, complex double *cmx,
-	complex double *cw, int ncw, int nrow, int itrp )
+/* cmws computes matrix elements for wire-surface interactions */
+  static void
+cmws( int j, int i1, int i2, complex double *cmx,
+	int nr, complex double *cw, int itrp )
 {
-  int jsnox; /* -1 offset to "jsno" for array indexing */
-  static complex double *emel = NULL;
-
-  size_t mreq = 9 * sizeof(complex double);
-  mem_alloc( (void **)&emel, mreq, "in matrix.c");
+  int ipr, i, ipatch, ik, js=0, ij, jx;
+  double xi, yi, zi, tx, ty, tz;
+  complex double etk, ets, etc;
 
-  jsnox = segj.jsno-1;
+  j--;
+  dataj.s= data.si[j];
+  dataj.b= data.bi[j];
+  dataj.xj= data.x[j];
+  dataj.yj= data.y[j];
+  dataj.zj= data.z[j];
+  dataj.cabj= data.cab[j];
+  dataj.sabj= data.sab[j];
+  dataj.salpj= data.salp[j];
 
-  if( itrp >= 0)
+  /* observation loop */
+  ipr= -1;
+  for( i = i1; i <= i2; i++ )
   {
-	int k, icgo, i, ipch, jl, j, js, il, ip;
-	double xi, yi, zi, cabi, sabi, salpi, fsign=1.0, pyl, pxl;
-
-	k=-1;
-	icgo=0;
+	ipr++;
+	ipatch=(i+1)/2;
+	ik= i-( i/2)*2;
 
-	/* observation loop */
-	for( i = i1-1; i < i2; i++ )
+	if( (ik != 0) || (ipr == 0) )
 	{
-	  k++;
-	  xi= data.x[i];
-	  yi= data.y[i];
-	  zi= data.z[i];
-	  cabi= data.cab[i];
-	  sabi= data.sab[i];
-	  salpi= data.salp[i];
-	  ipch=0;
+	  js= ipatch-1;
+	  xi= data.px[js];
+	  yi= data.py[js];
+	  zi= data.pz[js];
+	  hsfld( xi, yi, zi, 0.0);
 
-	  if( data.icon1[i] >= PCHCON)
+	  if( ik != 0 )
 	  {
-		ipch= data.icon1[i]-PCHCON;
-		fsign=-1.0;
+		tx= data.t2x[js];
+		ty= data.t2y[js];
+		tz= data.t2z[js];
 	  }
-
-	  if( data.icon2[i] >= PCHCON)
+	  else
 	  {
-		ipch= data.icon2[i]-PCHCON;
-		fsign=1.0;
+		tx= data.t1x[js];
+		ty= data.t1y[js];
+		tz= data.t1z[js];
 	  }
 
-	  /* source loop */
-	  jl = -1;
-	  for( j = j1; j <= j2; j++ )
-	  {
-		jl += 2;
-		js = j-1;
-		dataj.t1xj= data.t1x[js];
-		dataj.t1yj= data.t1y[js];
-		dataj.t1zj= data.t1z[js];
-		dataj.t2xj= data.t2x[js];
-		dataj.t2yj= data.t2y[js];
-		dataj.t2zj= data.t2z[js];
-		dataj.xj= data.px[js];
-		dataj.yj= data.py[js];
-		dataj.zj= data.pz[js];
-		dataj.s= data.pbi[js];
+	} /* if( (ik != 0) || (ipr == 0) ) */
+	else
+	{
+	  tx= data.t1x[js];
+	  ty= data.t1y[js];
+	  tz= data.t1z[js];
 
-		/* ground loop */
-		for( ip = 1; ip <= gnd.ksymp; ip++ )
-		{
-		  dataj.ipgnd= ip;
+	} /* if( (ik != 0) || (ipr == 0) ) */
 
-		  if( ((ipch == j) || (icgo != 0)) && (ip != 2) )
-		  {
-			if( icgo <= 0 )
-			{
-			  pcint( xi, yi, zi, cabi, sabi, salpi, emel);
-
-			  pyl= PI* data.si[i]* fsign;
-			  pxl= sin( pyl);
-			  pyl= cos( pyl);
-			  dataj.exc= emel[8]* fsign;
-
-			  trio(i+1);
-
-			  il= i-ncw;
-			  if( i < data.np)
-				il += (il/data.np)*2*data.mp;
-
-			  if( itrp == 0 )
-				cw[k+il*nrow] +=
-				  dataj.exc*( segj.ax[jsnox] +
-					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
-			  else
-				cw[il+k*nrow] +=
-				  dataj.exc*( segj.ax[jsnox] +
-					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
-
-			} /* if( icgo <= 0 ) */
-
-			if( itrp == 0)
-			{
-			  cmx[k+(jl-1)*nrow]= emel[icgo];
-			  cmx[k+jl*nrow]    = emel[icgo+4];
-			}
-			else
-			{
-			  cmx[(jl-1)+k*nrow]= emel[icgo];
-			  cmx[jl+k*nrow]    = emel[icgo+4];
-			}
-
-			icgo++;
-			if( icgo == 4)
-			  icgo=0;
-
-			continue;
-
-		  } /* if( ((ipch == (j+1)) || (icgo != 0)) && (ip != 2) ) */
-
-		  unere( xi, yi, zi);
-
-		  /* normal fill */
-		  if( itrp == 0)
-		  {
-			cmx[k+(jl-1)*nrow] +=
-			  dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
-			cmx[k+jl*nrow]     +=
-			  dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
-			continue;
-		  }
-
-		  /* transposed fill */
-		  cmx[(jl-1)+k*nrow] +=
-			dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
-		  cmx[jl+k*nrow]     +=
-			dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
-
-		} /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
-
-	  } /* for( j = j1; j <= j2; j++ ) */
-
-	} /* for( i = i1-1; i < i2; i++ ) */
-
-  } /* if( itrp >= 0) */
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
-/* cmws computes matrix elements for wire-surface interactions */
-void cmws( int j, int i1, int i2, complex double *cmx,
-	int nr, complex double *cw, int itrp )
-{
-  int ipr, i, ipatch, ik, js=0, ij, jx;
-  double xi, yi, zi, tx, ty, tz;
-  complex double etk, ets, etc;
-
-  j--;
-  dataj.s= data.si[j];
-  dataj.b= data.bi[j];
-  dataj.xj= data.x[j];
-  dataj.yj= data.y[j];
-  dataj.zj= data.z[j];
-  dataj.cabj= data.cab[j];
-  dataj.sabj= data.sab[j];
-  dataj.salpj= data.salp[j];
-
-  /* observation loop */
-  ipr= -1;
-  for( i = i1; i <= i2; i++ )
-  {
-	ipr++;
-	ipatch=(i+1)/2;
-	ik= i-( i/2)*2;
-
-	if( (ik != 0) || (ipr == 0) )
-	{
-	  js= ipatch-1;
-	  xi= data.px[js];
-	  yi= data.py[js];
-	  zi= data.pz[js];
-	  hsfld( xi, yi, zi, 0.0);
-
-	  if( ik != 0 )
-	  {
-		tx= data.t2x[js];
-		ty= data.t2y[js];
-		tz= data.t2z[js];
-	  }
-	  else
-	  {
-		tx= data.t1x[js];
-		ty= data.t1y[js];
-		tz= data.t1z[js];
-	  }
-
-	} /* if( (ik != 0) || (ipr == 0) ) */
-	else
-	{
-	  tx= data.t1x[js];
-	  ty= data.t1y[js];
-	  tz= data.t1z[js];
-
-	} /* if( (ik != 0) || (ipr == 0) ) */
-
-	etk=-( dataj.exk* tx+ dataj.eyk* ty +
-		dataj.ezk* tz)* data.psalp[js];
-	ets=-( dataj.exs* tx+ dataj.eys* ty +
-		dataj.ezs* tz)* data.psalp[js];
-	etc=-( dataj.exc* tx+ dataj.eyc* ty +
-		dataj.ezc* tz)* data.psalp[js];
+	etk=-( dataj.exk* tx+ dataj.eyk* ty +
+		dataj.ezk* tz)* data.psalp[js];
+	ets=-( dataj.exs* tx+ dataj.eys* ty +
+		dataj.ezs* tz)* data.psalp[js];
+	etc=-( dataj.exc* tx+ dataj.eyc* ty +
+		dataj.ezc* tz)* data.psalp[js];
 
 	/* fill matrix elements.  element locations */
 	/* determined by connection data. */
@@ -563,7 +267,8 @@ void cmws( int j, int i1, int i2, complex double *cmx,
 /*-----------------------------------------------------------------------*/
 
 /* cmww computes matrix elements for wire-wire interactions */
-void cmww( int j, int i1, int i2, complex double *cmx,
+  static void
+cmww( int j, int i1, int i2, complex double *cmx,
 	int nr, complex double *cw, int nw, int itrp)
 {
   int ipr, iprx, i, ij, jx;
@@ -604,167 +309,465 @@ void cmww( int j, int i1, int i2, complex double *cmx,
 		else
 		  dataj.ind1=0;
 
-	  } /* if( -data.icon1[iprx] != jx ) */
+	  } /* if( -data.icon1[iprx] != jx ) */
+
+	} /* if( ipr < 0 ) */
+	else
+	{
+	  iprx = ipr-1;
+	  if( ipr == 0 )
+		dataj.ind1=1;
+	  else
+	  {
+		if( ipr != jx )
+		{
+		  if( data.icon2[iprx] != jx )
+			dataj.ind1=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+
+		  } /* if( data.icon2[iprx] != jx ) */
+
+		} /* if( ipr != jx ) */
+		else if( (dataj.cabj* dataj.cabj +
+			  dataj.sabj* dataj.sabj) > 1.0e-8)
+		  dataj.ind1=2;
+		else
+		  dataj.ind1=0;
+
+	  } /* if( ipr == 0 ) */
+
+	} /* if( ipr < 0 ) */
+
+	ipr = data.icon2[j];
+	if (ipr > PCHCON) dataj.ind2 = 2;
+	else if( ipr < 0 )
+	{
+	  ipr= -ipr;
+	  iprx = ipr-1;
+	  if( -data.icon2[iprx] != jx )
+		dataj.ind2=2;
+	  else
+	  {
+		xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+			data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+		if( (xi < 0.99999) ||
+			(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+		  dataj.ind2=2;
+		else
+		  dataj.ind2=0;
+
+	  } /* if( -data.icon1[iprx] != jx ) */
+
+	} /* if( ipr < 0 ) */
+	else
+	{
+	  iprx = ipr-1;
+	  if( ipr == 0 )
+		dataj.ind2=1;
+	  else
+	  {
+		if( ipr != jx )
+		{
+		  if( data.icon1[iprx] != jx )
+			dataj.ind2=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind2=2;
+			else
+			  dataj.ind2=0;
+
+		  } /* if( data.icon2[iprx] != jx ) */
+
+		} /* if( ipr != jx ) */
+		else if( (dataj.cabj* dataj.cabj +
+			  dataj.sabj* dataj.sabj) > 1.0e-8)
+		  dataj.ind2=2;
+		else
+		  dataj.ind2=0;
+
+	  } /* if( ipr == 0 ) */
+
+	} /* if( ipr < 0 ) */
+
+  } /* if( dataj.iexk != 0) */
+
+  /* observation loop */
+  ipr=-1;
+  for( i = i1-1; i < i2; i++ )
+  {
+	ipr++;
+	ij= i-j;
+	xi= data.x[i];
+	yi= data.y[i];
+	zi= data.z[i];
+	ai= data.bi[i];
+	cabi= data.cab[i];
+	sabi= data.sab[i];
+	salpi= data.salp[i];
+
+	efld( xi, yi, zi, ai, ij);
+
+	etk= dataj.exk* cabi+ dataj.eyk *
+	  sabi+ dataj.ezk* salpi;
+	ets= dataj.exs* cabi+ dataj.eys *
+	  sabi+ dataj.ezs* salpi;
+	etc= dataj.exc* cabi+ dataj.eyc *
+	  sabi+ dataj.ezc* salpi;
+
+	/* fill matrix elements. element locations */
+	/* determined by connection data. */
+
+	/* normal fill */
+	if( itrp == 0)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx = segj.jco[ij]-1;
+		cmx[ipr+jx*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+	  continue;
+	}
+
+	/* transposed fill */
+	if( itrp != 2)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx= segj.jco[ij]-1;
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+	  continue;
+	}
+
+	/* trans. fill for c(ww) - test for elements for d(ww)prime */
+	for( ij = 0; ij < segj.jsno; ij++ )
+	{
+	  jx= segj.jco[ij]-1;
+	  if( jx < nr)
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  else
+	  {
+		jx -= nr;
+		cw[jx*ipr*nw] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+
+	} /* for( ij = 0; ij < segj.jsno; ij++ ) */
+
+  } /* for( i = i1-1; i < i2; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cmset sets up the complex structure matrix in the array cm */
+  void
+cmset( int nrow, complex double *cmx, double rkhx, int iexkx )
+{
+  int mp2, neq, npeq, it, i, j, i1, i2, in2, im1;
+  int im2, ist, ij, ipr, jss, jm1, jm2, jst, k, ka, kk;
+  complex double zaj, deter, *scm = NULL;
+
+  mp2=2* data.mp;
+  npeq= data.np+ mp2;
+  neq= data.n+2* data.m;
+  smat.nop = neq/npeq;
+
+  dataj.rkh= rkhx;
+  dataj.iexk= iexkx;
+  it= matpar.nlast;
+
+  for( i = 0; i < nrow; i++ )
+	for( j = 0; j < it; j++ )
+	  cmx[i+j*nrow]= CPLX_00;
+
+  i1= 1;
+  i2= it;
+  in2= i2;
+
+  if( in2 > data.np)
+	in2= data.np;
+
+  im1= i1- data.np;
+  im2= i2- data.np;
+
+  if( im1 < 1)
+	im1=1;
+
+  ist=1;
+  if( i1 <= data.np)
+	ist= data.np- i1+2;
+
+  /* wire source loop */
+  if( data.n != 0)
+  {
+	for( j = 1; j <= data.n; j++ )
+	{
+	  trio(j);
+	  for( i = 0; i < segj.jsno; i++ )
+	  {
+		ij= segj.jco[i];
+		segj.jco[i]=(( ij-1)/ data.np)* mp2+ ij;
+	  }
+
+	  if( i1 <= in2)
+		cmww( j, i1, in2, cmx, nrow, cmx, nrow,1);
+
+	  if( im1 <= im2)
+		cmws( j, im1, im2, &cmx[(ist-1)*nrow], nrow, cmx, 1);
+
+	  /* matrix elements modified by loading */
+	  if( zload.nload == 0)
+		continue;
+
+	  if( j > data.np)
+		continue;
+
+	  ipr= j;
+	  if( (ipr < 1) || (ipr > it) )
+		continue;
+
+	  zaj= zload.zarray[j-1];
+
+	  for( i = 0; i < segj.jsno; i++ )
+	  {
+		jss= segj.jco[i];
+		cmx[(jss-1)+(ipr-1)*nrow] -=
+		  ( segj.ax[i]+ segj.cx[i])* zaj;
+	  }
+
+	} /* for( j = 1; j <= n; j++ ) */
+
+  } /* if( n != 0) */
+
+  if( data.m != 0)
+  {
+	/* matrix elements for patch current sources */
+	jm1=1- data.mp;
+	jm2=0;
+	jst=1- mp2;
+
+	for( i = 0; i < smat.nop; i++ )
+	{
+	  jm1 += data.mp;
+	  jm2 += data.mp;
+	  jst += npeq;
+
+	  if( i1 <= in2)
+		cmsw( jm1, jm2, i1, in2,
+			&cmx[(jst-1)], cmx, 0, nrow, 1);
+
+	  if( im1 <= im2)
+		cmss( jm1, jm2, im1, im2,
+			&cmx[(jst-1)+(ist-1)*nrow], nrow, 1);
+	}
+
+  } /* if( m != 0) */
+
+  if( matpar.icase == 1)
+	return;
+
+  /* Allocate to scratch memory */
+  size_t mreq = (size_t)data.np2m * sizeof(complex double);
+  mem_alloc( (void **)&scm, mreq, "in matrix.c");
+
+  /* combine elements for symmetry modes */
+  for( i = 0; i < it; i++ )
+  {
+	for( j = 0; j < npeq; j++ )
+	{
+	  for( k = 0; k < smat.nop; k++ )
+	  {
+		ka= j+ k*npeq;
+		scm[k]= cmx[ka+i*nrow];
+	  }
+
+	  deter= scm[0];
+
+	  for( kk = 1; kk < smat.nop; kk++ )
+		deter += scm[kk];
+
+	  cmx[j+i*nrow]= deter;
+
+	  for( k = 1; k < smat.nop; k++ )
+	  {
+		ka= j+ k*npeq;
+		deter= scm[0];
+
+		for( kk = 1; kk < smat.nop; kk++ )
+		{
+		  deter += scm[kk]* smat.ssx[k+kk*smat.nop];
+		  cmx[ka+i*nrow]= deter;
+		}
+
+	  } /* for( k = 1; k < smat.nop; k++ ) */
+
+	} /* for( j = 0; j < npeq; j++ ) */
+
+  } /* for( i = 0; i < it; i++ ) */
 
-	} /* if( ipr < 0 ) */
-	else
-	{
-	  iprx = ipr-1;
-	  if( ipr == 0 )
-		dataj.ind1=1;
-	  else
-	  {
-		if( ipr != jx )
-		{
-		  if( data.icon2[iprx] != jx )
-			dataj.ind1=2;
-		  else
-		  {
-			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
-				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
-			if( (xi < 0.999999) ||
-				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
-			  dataj.ind1=2;
-			else
-			  dataj.ind1=0;
+  free_ptr( (void **)&scm );
 
-		  } /* if( data.icon2[iprx] != jx ) */
+  return;
+}
 
-		} /* if( ipr != jx ) */
-		else if( (dataj.cabj* dataj.cabj +
-			  dataj.sabj* dataj.sabj) > 1.0e-8)
-		  dataj.ind1=2;
-		else
-		  dataj.ind1=0;
+/*-----------------------------------------------------------------------*/
 
-	  } /* if( ipr == 0 ) */
+/* computes matrix elements for e along wires due to patch current */
+  void
+cmsw( int j1, int j2, int i1, int i2, complex double *cmx,
+	complex double *cw, int ncw, int nrow, int itrp )
+{
+  int jsnox; /* -1 offset to "jsno" for array indexing */
+  static complex double *emel = NULL;
 
-	} /* if( ipr < 0 ) */
+  size_t mreq = 9 * sizeof(complex double);
+  mem_alloc( (void **)&emel, mreq, "in matrix.c");
 
-	ipr = data.icon2[j];
-	if (ipr > PCHCON) dataj.ind2 = 2;
-	else if( ipr < 0 )
+  jsnox = segj.jsno-1;
+
+  if( itrp >= 0)
+  {
+	int k, icgo, i, ipch, jl, j, js, il, ip;
+	double xi, yi, zi, cabi, sabi, salpi, fsign=1.0, pyl, pxl;
+
+	k=-1;
+	icgo=0;
+
+	/* observation loop */
+	for( i = i1-1; i < i2; i++ )
 	{
-	  ipr= -ipr;
-	  iprx = ipr-1;
-	  if( -data.icon2[iprx] != jx )
-		dataj.ind2=2;
-	  else
+	  k++;
+	  xi= data.x[i];
+	  yi= data.y[i];
+	  zi= data.z[i];
+	  cabi= data.cab[i];
+	  sabi= data.sab[i];
+	  salpi= data.salp[i];
+	  ipch=0;
+
+	  if( data.icon1[i] >= PCHCON)
 	  {
-		xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
-			data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
-		if( (xi < 0.99999) ||
-			(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
-		  dataj.ind2=2;
-		else
-		  dataj.ind2=0;
+		ipch= data.icon1[i]-PCHCON;
+		fsign=-1.0;
+	  }
 
-	  } /* if( -data.icon1[iprx] != jx ) */
+	  if( data.icon2[i] >= PCHCON)
+	  {
+		ipch= data.icon2[i]-PCHCON;
+		fsign=1.0;
+	  }
 
-	} /* if( ipr < 0 ) */
-	else
-	{
-	  iprx = ipr-1;
-	  if( ipr == 0 )
-		dataj.ind2=1;
-	  else
+	  /* source loop */
+	  jl = -1;
+	  for( j = j1; j <= j2; j++ )
 	  {
-		if( ipr != jx )
+		jl += 2;
+		js = j-1;
+		dataj.t1xj= data.t1x[js];
+		dataj.t1yj= data.t1y[js];
+		dataj.t1zj= data.t1z[js];
+		dataj.t2xj= data.t2x[js];
+		dataj.t2yj= data.t2y[js];
+		dataj.t2zj= data.t2z[js];
+		dataj.xj= data.px[js];
+		dataj.yj= data.py[js];
+		dataj.zj= data.pz[js];
+		dataj.s= data.pbi[js];
+
+		/* ground loop */
+		for( ip = 1; ip <= gnd.ksymp; ip++ )
 		{
-		  if( data.icon1[iprx] != jx )
-			dataj.ind2=2;
-		  else
+		  dataj.ipgnd= ip;
+
+		  if( ((ipch == j) || (icgo != 0)) && (ip != 2) )
 		  {
-			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
-				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
-			if( (xi < 0.999999) ||
-				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
-			  dataj.ind2=2;
-			else
-			  dataj.ind2=0;
+			if( icgo <= 0 )
+			{
+			  pcint( xi, yi, zi, cabi, sabi, salpi, emel);
 
-		  } /* if( data.icon2[iprx] != jx ) */
+			  pyl= M_PI* data.si[i]* fsign;
+			  pxl= sin( pyl);
+			  pyl= cos( pyl);
+			  dataj.exc= emel[8]* fsign;
 
-		} /* if( ipr != jx ) */
-		else if( (dataj.cabj* dataj.cabj +
-			  dataj.sabj* dataj.sabj) > 1.0e-8)
-		  dataj.ind2=2;
-		else
-		  dataj.ind2=0;
+			  trio(i+1);
 
-	  } /* if( ipr == 0 ) */
+			  il= i-ncw;
+			  if( i < data.np)
+				il += (il/data.np)*2*data.mp;
 
-	} /* if( ipr < 0 ) */
+			  if( itrp == 0 )
+				cw[k+il*nrow] +=
+				  dataj.exc*( segj.ax[jsnox] +
+					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
+			  else
+				cw[il+k*nrow] +=
+				  dataj.exc*( segj.ax[jsnox] +
+					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
 
-  } /* if( dataj.iexk != 0) */
+			} /* if( icgo <= 0 ) */
 
-  /* observation loop */
-  ipr=-1;
-  for( i = i1-1; i < i2; i++ )
-  {
-	ipr++;
-	ij= i-j;
-	xi= data.x[i];
-	yi= data.y[i];
-	zi= data.z[i];
-	ai= data.bi[i];
-	cabi= data.cab[i];
-	sabi= data.sab[i];
-	salpi= data.salp[i];
+			if( itrp == 0)
+			{
+			  cmx[k+(jl-1)*nrow]= emel[icgo];
+			  cmx[k+jl*nrow]    = emel[icgo+4];
+			}
+			else
+			{
+			  cmx[(jl-1)+k*nrow]= emel[icgo];
+			  cmx[jl+k*nrow]    = emel[icgo+4];
+			}
 
-	efld( xi, yi, zi, ai, ij);
+			icgo++;
+			if( icgo == 4)
+			  icgo=0;
 
-	etk= dataj.exk* cabi+ dataj.eyk *
-	  sabi+ dataj.ezk* salpi;
-	ets= dataj.exs* cabi+ dataj.eys *
-	  sabi+ dataj.ezs* salpi;
-	etc= dataj.exc* cabi+ dataj.eyc *
-	  sabi+ dataj.ezc* salpi;
+			continue;
 
-	/* fill matrix elements. element locations */
-	/* determined by connection data. */
+		  } /* if( ((ipch == (j+1)) || (icgo != 0)) && (ip != 2) ) */
 
-	/* normal fill */
-	if( itrp == 0)
-	{
-	  for( ij = 0; ij < segj.jsno; ij++ )
-	  {
-		jx = segj.jco[ij]-1;
-		cmx[ipr+jx*nr] += etk* segj.ax[ij] +
-		  ets* segj.bx[ij]+ etc* segj.cx[ij];
-	  }
-	  continue;
-	}
+		  unere( xi, yi, zi);
 
-	/* transposed fill */
-	if( itrp != 2)
-	{
-	  for( ij = 0; ij < segj.jsno; ij++ )
-	  {
-		jx= segj.jco[ij]-1;
-		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
-		  ets* segj.bx[ij]+ etc* segj.cx[ij];
-	  }
-	  continue;
-	}
+		  /* normal fill */
+		  if( itrp == 0)
+		  {
+			cmx[k+(jl-1)*nrow] +=
+			  dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
+			cmx[k+jl*nrow]     +=
+			  dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
+			continue;
+		  }
 
-	/* trans. fill for c(ww) - test for elements for d(ww)prime */
-	for( ij = 0; ij < segj.jsno; ij++ )
-	{
-	  jx= segj.jco[ij]-1;
-	  if( jx < nr)
-		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
-		  ets* segj.bx[ij]+ etc* segj.cx[ij];
-	  else
-	  {
-		jx -= nr;
-		cw[jx*ipr*nw] += etk* segj.ax[ij] +
-		  ets* segj.bx[ij]+ etc* segj.cx[ij];
-	  }
+		  /* transposed fill */
+		  cmx[(jl-1)+k*nrow] +=
+			dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
+		  cmx[jl+k*nrow]     +=
+			dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
 
-	} /* for( ij = 0; ij < segj.jsno; ij++ ) */
+		} /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
 
-  } /* for( i = i1-1; i < i2; i++ ) */
+	  } /* for( j = j1; j <= j2; j++ ) */
+
+	} /* for( i = i1-1; i < i2; i++ ) */
+
+  } /* if( itrp >= 0) */
 
   return;
 }
@@ -774,7 +777,8 @@ void cmww( int j, int i1, int i2, complex double *cmx,
 /* etmns fills the array e with the negative of the */
 /* electric field incident on the structure. e is the */
 /* right hand side of the matrix equation. */
-void etmns( double p1, double p2, double p3, double p4,
+  void
+etmns( double p1, double p2, double p3, double p4,
 	double p5, double p6, int ipr, complex double *e )
 {
   int i, is, i1, i2=0, neq;
@@ -856,7 +860,7 @@ void etmns( double p1, double p2, double p3, double p4,
 	  {
 		for( i = 0; i < data.n; i++ )
 		{
-		  arg= -TWOPI*( wx* data.x[i]+ wy* data.y[i]+ wz* data.z[i]);
+		  arg= -M_2PI*( wx* data.x[i]+ wy* data.y[i]+ wz* data.z[i]);
 		  e[i]=-( pxl* data.cab[i]+ pyl* data.sab[i]+ pzl*
 			  data.salp[i])* cmplx( cos( arg), sin( arg));
 		}
@@ -870,7 +874,7 @@ void etmns( double p1, double p2, double p3, double p4,
 
 		  for( i = 0; i < data.n; i++ )
 		  {
-			arg= -TWOPI*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
+			arg= -M_2PI*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
 			e[i]= e[i]-( cx* data.cab[i]+ cy* data.sab[i]+
 				cz* data.salp[i])* cmplx(cos( arg), sin( arg));
 		  }
@@ -889,7 +893,7 @@ void etmns( double p1, double p2, double p3, double p4,
 		i++;
 		i1 += 2;
 		i2 = i1+1;
-		arg= -TWOPI*( wx* data.px[i] +
+		arg= -M_2PI*( wx* data.px[i] +
 			wy* data.py[i]+ wz* data.pz[i]);
 		tt1= cmplx( cos( arg), sin( arg)) *
 		  data.psalp[i]* RETA;
@@ -914,7 +918,7 @@ void etmns( double p1, double p2, double p3, double p4,
 		i++;
 		i1 += 2;
 		i2 = i1+1;
-		arg= -TWOPI*( wx* data.px[i] +
+		arg= -M_2PI*( wx* data.px[i] +
 			wy* data.py[i]- wz* data.pz[i]);
 		tt1= cmplx( cos( arg), sin( arg)) *
 		  data.psalp[i]* RETA;
@@ -940,7 +944,7 @@ void etmns( double p1, double p2, double p3, double p4,
 
 	  for( i = 0; i < data.n; i++ )
 	  {
-		arg= -TWOPI*( wx* data.x[i]+ wy* data.y[i] + wz* data.z[i]);
+		arg= -M_2PI*( wx* data.x[i]+ wy* data.y[i] + wz* data.z[i]);
 		e[i]=-( cx* data.cab[i]+ cy* data.sab[i] +
 			cz * data.salp[i])* cmplx( cos( arg), sin( arg));
 	  }
@@ -954,7 +958,7 @@ void etmns( double p1, double p2, double p3, double p4,
 
 		for( i = 0; i < data.n; i++ )
 		{
-		  arg= -TWOPI*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
+		  arg= -M_2PI*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
 		  e[i]= e[i]-( cx* data.cab[i]+ cy* data.sab[i]+
 			  cz* data.salp[i])* cmplx(cos( arg), sin( arg));
 		}
@@ -977,7 +981,7 @@ void etmns( double p1, double p2, double p3, double p4,
 	  i++;
 	  i1 += 2;
 	  i2 = i1+1;
-	  arg= -TWOPI*( wx* data.px[i] +
+	  arg= -M_2PI*( wx* data.px[i] +
 		  wy* data.py[i]+ wz* data.pz[i]);
 	  tt2= cmplx( cos( arg),
 		  sin( arg)) * data.psalp[i] * RETA;
@@ -1002,7 +1006,7 @@ void etmns( double p1, double p2, double p3, double p4,
 	  i++;
 	  i1 += 2;
 	  i2 = i1+1;
-	  arg= -TWOPI*( wx* data.px[i] +
+	  arg= -M_2PI*( wx* data.px[i] +
 		  wy* data.py[i]- wz* data.pz[i]);
 	  tt1= cmplx( cos( arg), sin( arg)) *
 		data.psalp[i]* RETA;
@@ -1022,7 +1026,7 @@ void etmns( double p1, double p2, double p3, double p4,
   wy= wz* sin( p5);
   wz= sin( p4);
   ds= p6*59.9580;
-  dsh= p6/(2.0* TWOPI);
+  dsh= p6/(2.0* M_2PI);
 
   is= 0;
   i1= data.n-2;
@@ -1072,14 +1076,14 @@ void etmns( double p1, double p2, double p3, double p4,
 
 	} /* if( arg >= 1.0e-30) */
 
-	arg= -TWOPI* r;
+	arg= -M_2PI* r;
 	tt1= cmplx( cos( arg), sin( arg));
 
 	if( i < data.n )
 	{
-	  tt2= cmplx(1.0,-1.0/( r* TWOPI))/ rs;
+	  tt2= cmplx(1.0,-1.0/( r* M_2PI))/ rs;
 	  er= ds* tt1* tt2* cth;
-	  et=.5* ds* tt1*((CPLX_01)* TWOPI/ r+ tt2)* sth;
+	  et=.5* ds* tt1*((CPLX_01)* M_2PI/ r+ tt2)* sth;
 	  ezh= er* cth- et* sth;
 	  erh= er* sth+ et* cth;
 	  cx= ezh* wx+ erh* qx;
@@ -1093,7 +1097,7 @@ void etmns( double p1, double p2, double p3, double p4,
 	  pxl= wy* qz- wz* qy;
 	  pyl= wz* qx- wx* qz;
 	  pzl= wx* qy- wy* qx;
-	  tt2= dsh* tt1* cmplx(1.0/ r, TWOPI) /
+	  tt2= dsh* tt1* cmplx(1.0/ r, M_2PI) /
 		r* sth* data.psalp[is];
 	  cx= tt2* pxl;
 	  cy= tt2* pyl;
@@ -1118,7 +1122,8 @@ void etmns( double p1, double p2, double p3, double p4,
 /* numerical analysis.  comments below refer to comments in ralstons */
 /* text.    (matrix transposed.) */
 
-void factr( int n, complex double *a, int *ip, int ndim)
+  void
+factr( int n, complex double *a, int *ip, int ndim)
 {
   int r, rm1, rp1, pj, pr, iflg, k, j, jp1, i;
   double dmax, elmag;
@@ -1217,7 +1222,8 @@ void factr( int n, complex double *a, int *ip, int ndim)
 /* matricies of the symmetric modes and calls routine to factor */
 /* matricies.  if no symmetry, the routine is called to factor the */
 /* complete matrix. */
-void factrs( int np, int nrow, complex double *a, int *ip )
+  void
+factrs( int np, int nrow, complex double *a, int *ip )
 {
   int kk, ka;
 
@@ -1267,7 +1273,7 @@ fblock( int nrow, int ncol, int imax, int ipsym )
   /* set up smat.ssx matrix for rotational symmetry. */
   if( ipsym <= 0)
   {
-	phaz = TWOPI/smat.nop;
+	phaz = M_2PI/smat.nop;
 
 	for( i = 1; i < smat.nop; i++ )
 	{
diff --git a/src/matrix.h b/src/matrix.h
index 7c59ea7..2c5e686 100644
--- a/src/matrix.h
+++ b/src/matrix.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	MATRIX_H	1
 
 #include "common.h"
-#include "support.h"
 
 #define	RETA	2.654420938E-3
 
diff --git a/src/nec2_model.c b/src/nec2_model.c
index 9512b7f..c2c17e3 100644
--- a/src/nec2_model.c
+++ b/src/nec2_model.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,66 +14,48 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* nec2_model.c
- *
- * Structure modelling functions for xnec2c
- */
-
 #include "nec2_model.h"
 #include "shared.h"
 
 /*------------------------------------------------------------------------*/
 
-/* Nec2_Input_File_Treeview()
+/* Insert_Columns()
  *
- * Reads a NEC2 input file and renders it in a tree view
+ * Inserts columns in a list store
  */
-  void
-Nec2_Input_File_Treeview( int action )
+  static void
+Insert_Columns(
+	GtkBuilder *builder,
+	gchar *treeview,
+	GtkListStore* store,
+	int ncols,
+	char *colname[] )
 {
-  /* Abort if editor window is not opened */
-  if( nec2_edit_window == NULL ) return;
-
-  /* Signal save of edited file */
-  SetFlag( NEC2_EDIT_SAVE );
+  int idx;
+  GtkTreeModel *model;
+  GtkCellRenderer *renderer;
 
-  /* Implement user action */
-  switch( action )
+  static GtkWidget *view;
+  view = Builder_Get_Object( builder, treeview );
+  for( idx = 0; idx < ncols; idx++ )
   {
-	case NEC2_EDITOR_REVERT: /* Revert editor to file contents */
-	  /* Clear all tree view list stores */
-	  gtk_list_store_clear( cmnt_store );
-	  gtk_list_store_clear( geom_store );
-	  gtk_list_store_clear( cmnd_store );
-	  break;
-
-	case NEC2_EDITOR_NEW: /* Create new default input file */
-	  /* If tree view stores are already
-	   * created, just make the new file */
-	  Create_List_Stores(); /* Only done if needed */
-	  Create_Default_File();
-	  return;
-
-	case NEC2_EDITOR_RELOAD: /* Just reload input file */
-	  Create_List_Stores();  /* Only done if needed */
-	  break;
-
-  } /* switch( action ) */
-
-  /* Rewind NEC2 input file */
-  rewind( input_fp );
-
-  /*** List Comment cards ***/
-  List_Comments();
-
-  /*** List Geometry cards ***/
-  List_Geometry();
+	renderer = gtk_cell_renderer_text_new();
+	g_object_set(renderer, "editable", TRUE, NULL);
+	g_signal_connect( renderer, "edited",
+		(GCallback)cell_edited_callback, view );
+	g_object_set_data( G_OBJECT(renderer),
+		"column", GUINT_TO_POINTER(idx) );
+	gtk_tree_view_insert_column_with_attributes(
+		GTK_TREE_VIEW(view), -1, colname[idx],
+		renderer, "text", idx, NULL );
+  }
+  model = GTK_TREE_MODEL(store);
+  gtk_tree_view_set_model( GTK_TREE_VIEW (view), model );
 
-  /*** Read Command cards ***/
-  List_Commands();
+  /* Destroy model automatically with view */
+  g_object_unref( model );
 
-  return;
-} /* Nec2_Input_File_Treeview() */
+} /* Insert_Columns() */
 
 /*------------------------------------------------------------------------*/
 
@@ -83,7 +63,7 @@ Nec2_Input_File_Treeview( int action )
  *
  * Create stores needed for the treeview
  */
-  void
+  static void
 Create_List_Stores( void )
 {
   /* Comments column names */
@@ -126,31 +106,28 @@ Create_List_Stores( void )
 
   /* Insert comment columns */
   Insert_Columns(
-	  nec2_edit_window, "nec2_cmnt_treeview",
+	  nec2_editor_builder, "nec2_cmnt_treeview",
 	  cmnt_store, CMNT_NUM_COLS, cmnt_col_name );
 
   /* Insert geometry columns */
   Insert_Columns(
-	  nec2_edit_window, "nec2_geom_treeview",
+	  nec2_editor_builder, "nec2_geom_treeview",
 	  geom_store, GEOM_NUM_COLS, geom_col_name );
 
   /* Insert command columns */
   Insert_Columns(
-	  nec2_edit_window, "nec2_cmnd_treeview",
+	  nec2_editor_builder, "nec2_cmnd_treeview",
 	  cmnd_store, CMND_NUM_COLS, cmnd_col_name );
 
   /* Set models to treviews */
-  gtk_tree_view_set_model(
-	  GTK_TREE_VIEW(lookup_widget(
-		  nec2_edit_window, "nec2_cmnt_treeview")),
+  gtk_tree_view_set_model( GTK_TREE_VIEW(
+		Builder_Get_Object(nec2_editor_builder, "nec2_cmnt_treeview")),
 	  GTK_TREE_MODEL(cmnt_store) );
-  gtk_tree_view_set_model(
-	  GTK_TREE_VIEW(lookup_widget(
-		  nec2_edit_window, "nec2_geom_treeview")),
+  gtk_tree_view_set_model( GTK_TREE_VIEW(
+		Builder_Get_Object(nec2_editor_builder, "nec2_geom_treeview")),
 	  GTK_TREE_MODEL(geom_store) );
-  gtk_tree_view_set_model(
-	  GTK_TREE_VIEW(lookup_widget(
-		  nec2_edit_window, "nec2_cmnd_treeview")),
+  gtk_tree_view_set_model( GTK_TREE_VIEW(
+		Builder_Get_Object(nec2_editor_builder, "nec2_cmnd_treeview")),
 	  GTK_TREE_MODEL(cmnd_store) );
 
 } /* Create_List_Stores() */
@@ -161,7 +138,7 @@ Create_List_Stores( void )
  *
  * Creates a default NEC2 file if needed
  */
-  void
+  static void
 Create_Default_File( void )
 {
   GtkTreeIter iter;
@@ -311,7 +288,7 @@ Create_Default_File( void )
  *
  * Reads comments from file and lists in tree view
  */
-  void
+  static void
 List_Comments( void )
 {
   GtkTreeIter iter;
@@ -329,15 +306,15 @@ List_Comments( void )
   {
 	/* Read a line from input file */
 	if( Load_Line(line_buf, input_fp) == EOF )
-	  stop( _("List_Comments():\n"\
-			"Error reading input file\n"\
+	  stop( _("List_Comments():\n"
+			"Error reading input file\n"
 			"Unexpected EOF (End of File)"), ERR_OK );
 
 	/* Check for short or missing CM or CE and fix */
 	if( strlen(line_buf) < 2 )
 	{
-	  stop( _("List_Comments():\n"\
-			"Error reading input file\n"\
+	  stop( _("List_Comments():\n"
+			"Error reading input file\n"
 			"Comment mnemonic short or missing"), ERR_OK );
 	  Strlcpy( line_buf, "XX ", sizeof(line_buf) );
 	}
@@ -373,7 +350,7 @@ List_Comments( void )
  *
  * Reads geometry cards from file and lists in tree view
  */
-  void
+  static void
 List_Geometry( void )
 {
   GtkTreeIter iter;
@@ -442,7 +419,7 @@ List_Geometry( void )
  *
  * Reads command cards from file and lists in tree view
  */
-  void
+  static void
 List_Commands( void )
 {
   GtkTreeIter iter;
@@ -509,39 +486,56 @@ List_Commands( void )
 
 /*------------------------------------------------------------------------*/
 
-/* Insert_Columns()
+/* Nec2_Input_File_Treeview()
  *
- * Inserts columns in a list store
+ * Reads a NEC2 input file and renders it in a tree view
  */
   void
-Insert_Columns(	GtkWidget *window, gchar *treeview,
-	GtkListStore* store, int ncols, char *colname[] )
+Nec2_Input_File_Treeview( int action )
 {
-  int idx;
-  GtkTreeModel *model;
-  GtkCellRenderer *renderer;
+  /* Abort if editor window is not opened */
+  if( nec2_edit_window == NULL ) return;
 
-  static GtkWidget *view;
-  view = lookup_widget( window, treeview );
-  for( idx = 0; idx < ncols; idx++ )
+  /* Signal save of edited file */
+  SetFlag( NEC2_EDIT_SAVE );
+
+  /* Implement user action */
+  switch( action )
   {
-	renderer = gtk_cell_renderer_text_new();
-	g_object_set(renderer, "editable", TRUE, NULL);
-	g_signal_connect( renderer, "edited",
-		(GCallback)cell_edited_callback, view );
-	g_object_set_data( G_OBJECT(renderer),
-		"column", GUINT_TO_POINTER(idx) );
-	gtk_tree_view_insert_column_with_attributes(
-		GTK_TREE_VIEW(view), -1, colname[idx],
-		renderer, "text", idx, NULL );
-  }
-  model = GTK_TREE_MODEL(store);
-  gtk_tree_view_set_model( GTK_TREE_VIEW (view), model );
+	case NEC2_EDITOR_REVERT: /* Revert editor to file contents */
+	  /* Clear all tree view list stores */
+	  gtk_list_store_clear( cmnt_store );
+	  gtk_list_store_clear( geom_store );
+	  gtk_list_store_clear( cmnd_store );
+	  break;
 
-  /* Destroy model automatically with view */
-  g_object_unref( model );
+	case NEC2_EDITOR_NEW: /* Create new default input file */
+	  /* If tree view stores are already
+	   * created, just make the new file */
+	  Create_List_Stores(); /* Only done if needed */
+	  Create_Default_File();
+	  return;
 
-} /* Insert_Columns() */
+	case NEC2_EDITOR_RELOAD: /* Just reload input file */
+	  Create_List_Stores();  /* Only done if needed */
+	  break;
+
+  } /* switch( action ) */
+
+  /* Rewind NEC2 input file */
+  rewind( input_fp );
+
+  /*** List Comment cards ***/
+  List_Comments();
+
+  /*** List Geometry cards ***/
+  List_Geometry();
+
+  /*** Read Command cards ***/
+  List_Commands();
+
+  return;
+} /* Nec2_Input_File_Treeview() */
 
 /*------------------------------------------------------------------------*/
 
@@ -590,50 +584,11 @@ cell_edited_callback(
 
 /*------------------------------------------------------------------------*/
 
-/* Save_Nec2_Input_File()
- *
- * Saves the data in a NEC2 input treeview to a given filename
- */
-  void
-Save_Nec2_Input_File( GtkWidget *treeview_window, char *nec2_file )
-{
-  FILE *nec2_fp = NULL;
-  GtkTreeView *tree_view;
-
-
-  /* Abort if editor window is not opened */
-  if( nec2_edit_window == NULL ) return;
-
-  /* Open NEC2 input file for writing */
-  if( !Open_File(&nec2_fp, nec2_file, "w") ) return;
-
-  /* Save comments to file */
-  tree_view = GTK_TREE_VIEW( lookup_widget(
-		treeview_window, "nec2_cmnt_treeview") );
-  Save_Treeview_Data( tree_view, CMNT_NUM_COLS, nec2_fp );
-
-  /* Save geometry to file */
-  tree_view = GTK_TREE_VIEW( lookup_widget(
-		treeview_window, "nec2_geom_treeview") );
-  Save_Treeview_Data( tree_view, GEOM_NUM_COLS, nec2_fp );
-
-  /* Save commands to file */
-  tree_view = GTK_TREE_VIEW( lookup_widget(
-		treeview_window, "nec2_cmnd_treeview") );
-  Save_Treeview_Data( tree_view, CMND_NUM_COLS, nec2_fp );
-
-  /* Re-open file in read mode */
-  Close_File( &nec2_fp );
-
-} /* Save_Nec2_Input_File() */
-
-/*------------------------------------------------------------------------*/
-
 /* Save_Treeview_Data()
  *
  * Saves tree view data to an open NEC2 input file
  */
-  void
+  static void
 Save_Treeview_Data( GtkTreeView *tree_view, int ncols, FILE *nec2_fp )
 {
   GtkTreeModel *list_store;
@@ -644,8 +599,8 @@ Save_Treeview_Data( GtkTreeView *tree_view, int ncols, FILE *nec2_fp )
   /* Abort if no open file to sane to */
   if( nec2_fp == NULL )
   {
-	stop( _("Cannot save treeview data\n"\
-		  "Please use the Save button\n"\
+	stop( _("Cannot save treeview data\n"
+		  "Please use the Save button\n"
 		  "to specify a file path"), ERR_STOP );
   }
 
@@ -676,20 +631,42 @@ Save_Treeview_Data( GtkTreeView *tree_view, int ncols, FILE *nec2_fp )
 
 /*------------------------------------------------------------------------*/
 
-/* Helper function */
-  gboolean
-gtk_tree_model_iter_previous(GtkTreeModel *tree_model, GtkTreeIter *iter)
+/* Save_Nec2_Input_File()
+ *
+ * Saves the data in a NEC2 input treeview to a given filename
+ */
+  void
+Save_Nec2_Input_File( GtkWidget *treeview_window, char *nec2_file )
 {
-  GtkTreePath *path;
-  gboolean ret;
+  FILE *nec2_fp = NULL;
+  GtkTreeView *tree_view;
+
 
-  path = gtk_tree_model_get_path (tree_model, iter);
-  ret = gtk_tree_path_prev (path);
-  if (ret == TRUE)
-	gtk_tree_model_get_iter (tree_model, iter, path);
-  gtk_tree_path_free (path);
-  return ret;
-}
+  /* Abort if editor window is not opened */
+  if( nec2_edit_window == NULL ) return;
+
+  /* Open NEC2 input file for writing */
+  if( !Open_File(&nec2_fp, nec2_file, "w") ) return;
+
+  /* Save comments to file */
+  tree_view = GTK_TREE_VIEW( Builder_Get_Object(
+		nec2_editor_builder, "nec2_cmnt_treeview") );
+  Save_Treeview_Data( tree_view, CMNT_NUM_COLS, nec2_fp );
+
+  /* Save geometry to file */
+  tree_view = GTK_TREE_VIEW( Builder_Get_Object(
+		nec2_editor_builder, "nec2_geom_treeview") );
+  Save_Treeview_Data( tree_view, GEOM_NUM_COLS, nec2_fp );
+
+  /* Save commands to file */
+  tree_view = GTK_TREE_VIEW( Builder_Get_Object(
+		nec2_editor_builder, "nec2_cmnd_treeview") );
+  Save_Treeview_Data( tree_view, CMND_NUM_COLS, nec2_fp );
+
+  /* Re-open file in read mode */
+  Close_File( &nec2_fp );
+
+} /* Save_Nec2_Input_File() */
 
 /*------------------------------------------------------------------------*/
 
diff --git a/src/nec2_model.h b/src/nec2_model.h
index 3dbe3f5..4c002f8 100644
--- a/src/nec2_model.h
+++ b/src/nec2_model.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -21,7 +19,6 @@
 
 #include "common.h"
 #include "interface.h"
-#include "support.h"
 #include "editors.h"
 
 /* Commands for the NEC2 file editor */
diff --git a/src/network.c b/src/network.c
index 9e910a3..11d4154 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -49,7 +47,8 @@
 /* subroutine netwk solves for structure currents for a given */
 /* excitation including the effect of non-radiating networks if */
 /* present. */
-void netwk( complex double *cmx, int *ip, complex double *einc )
+void
+netwk( complex double *cmx, int *ip, complex double *einc )
 {
   int *ipnt = NULL, *nteqa = NULL, *ntsca = NULL;
   int nteq=0, ntsc=0, j, ndimn;
@@ -100,7 +99,7 @@ void netwk( complex double *cmx, int *ip, complex double *einc )
 	if( netcx.masym != 0)
 	{
 	  irow1=0;
-	  if( netcx.nonet != 0)
+	  if( netcx.nonet > 0)
 	  {
 		for( i = 0; i < netcx.nonet; i++ )
 		{
@@ -131,7 +130,7 @@ void netwk( complex double *cmx, int *ip, complex double *einc )
 
 		} /* for( i = 0; i < netcx.nonet; i++ ) */
 
-	  } /* if( netcx.nonet != 0) */
+	  } /* if( netcx.nonet > 0) */
 
 	  if( vsorc.nsant != 0)
 	  {
@@ -159,7 +158,7 @@ void netwk( complex double *cmx, int *ip, complex double *einc )
 
 	  } /* if( vsorc.nsant != 0) */
 
-	  if( irow1 >= 2)
+	  if( irow1 >= 2 )
 	  {
 		double asmx;
 
@@ -243,7 +242,7 @@ void netwk( complex double *cmx, int *ip, complex double *einc )
 		}
 		else
 		{
-		  y22r= TWOPI* netcx.x11i[j]/ data.wlam;
+		  y22r= M_2PI* netcx.x11i[j]/ data.wlam;
 		  y12r=0.0;
 		  y12i=1.0/( netcx.x11r[j]* sin( y22r));
 		  y11r= netcx.x12r[j];
@@ -574,7 +573,7 @@ void netwk( complex double *cmx, int *ip, complex double *einc )
 	  cux= cmplx( crnt.air[isc1], crnt.aii[isc1]);
 	  ymit= cmplx( crnt.bir[isc1], crnt.bii[isc1]);
 	  netcx.zped= cmplx( crnt.cir[isc1], crnt.cii[isc1]);
-	  pwr= data.si[isc1]* TWOPI*.5;
+	  pwr= data.si[isc1]* M_2PI*.5;
 	  cux=( cux- ymit* sin( pwr) +
 		  netcx.zped* cos( pwr))* data.wlam;
 	  netcx.zped= vlt/ cux;
@@ -737,7 +736,7 @@ load( int *ldtyp, int *ldtag, int *ldtagf, int *ldtagt,
 	  fprintf( stderr,
 		  "xnec2c: load(): loading data card error,"
 		  " no segment has an itag = %d\n", ldtags );
-	  stop( _("load(): Loading data card\n"\
+	  stop( _("load(): Loading data card\n"
 			"Tag number mismatch error"), ERR_STOP );
 	}
 
diff --git a/src/network.h b/src/network.h
index 3d455d7..5c7004b 100644
--- a/src/network.h
+++ b/src/network.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	NETWORK_H		1
 
 #include "common.h"
-#include "support.h"
 
 #endif
 
diff --git a/src/plot_freqdata.c b/src/plot_freqdata.c
index 5f38555..2730bad 100644
--- a/src/plot_freqdata.c
+++ b/src/plot_freqdata.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,12 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* plot_freqdata.c
- *
- * Code for plotting graphs of structure
- * data (VSWR, impedance, gain etc)
- */
-
 /*
  * Net gain added by Mark Whitis http://www.freelabs.com/~whitis/
  * References:
@@ -45,517 +37,370 @@ static int nval_fscale;
 
 /*-----------------------------------------------------------------------*/
 
-/* Plot_Frequency_Data()
+/* Display_Frequency_Data()
  *
+ * Displays freq dependent data (gain, impedance etc)
+ * in the entry widgets in the freq plots window
  */
-  void
-Plot_Frequency_Data( void )
+  static void
+Display_Frequency_Data( void )
 {
-  /* Abort plotting if main window is to be closed
-   * or when plots drawing area not available */
-  if(
-	  isFlagSet(MAIN_QUIT) ||
-	  isFlagClear(PLOT_ENABLED) ||
-	  isFlagClear(ENABLE_EXCITN) )
-	return;
+  int pol, fstep;
+  double vswr, gamma;
+  double zrpro2, zrmro2, zimag2;
+  char txt[12];
 
-  /* Titles for plots */
-  char *titles[3];
+  if( isFlagClear(PLOT_ENABLED) ) return;
 
-  int
-	idx,
-	posn,  /* Position num of plot in drawingarea */
-	fstep; /* Freq step number */
+  /* Limit freq stepping to nfrq */
+  fstep = calc_data.fstep;
+  if( fstep >= calc_data.nfrq )
+	fstep = calc_data.nfrq;
 
-  static double
-	*gmax     = NULL, /* Max gain buffer */
-	*vgain    = NULL, /* Viewer direction gain buffer */
-	*netgain  = NULL, /* Viewer direction net gain buffer */
-	*gdir_tht = NULL, /* Direction in theta of gain */
-	*gdir_phi = NULL, /* Direction in phi of gain */
-	*fbratio  = NULL; /* Front to back ratio */
+  /* Polarization type */
+  pol = calc_data.pol_type;
 
-  /* Used to calculate net gain */
-  double Zr, Zo, Zi;
+  /* Index to gtot buffer where max gain
+   * occurs for given polarization type */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	/* Max gain for given polarization type */
+	int mgidx = rad_pattern[fstep].max_gain_idx[pol];
+	double gmax = rad_pattern[fstep].gtot[mgidx] +
+	  Polarization_Factor(pol, fstep, mgidx);
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+	/* Display max gain */
+	snprintf( txt, 7, "%5.1f", gmax );
+	gtk_entry_set_text( GTK_ENTRY(Builder_Get_Object(
+			freqplots_window_builder, "freqplots_maxgain_entry")), txt );
 
-  /* Clear pixmap */
-  cairo_set_source_rgb( cr, BLACK );
-  cairo_rectangle(
-	  cr, 0.0, 0.0,
-	  (double)freqplots_pixmap_width,
-	  (double)freqplots_pixmap_height );
-  cairo_fill( cr );
+  } /* isFlagSet(ENABLE_RDPAT) */
 
-  /* Abort if plotting is not possible */
-  if( (calc_data.fstep < 1)				||
-	  (isFlagClear(FREQ_LOOP_RUNNING)	&&
-	   isFlagClear(FREQ_LOOP_DONE))		||
-	  (isFlagClear(PLOT_GMAX)			&&
-	   isFlagClear(PLOT_GVIEWER)		&&
-	   isFlagClear(PLOT_VSWR)			&&
-	   isFlagClear(PLOT_ZREAL_ZIMAG)	&&
-	   isFlagClear(PLOT_ZMAG_ZPHASE)) )
-  {
-	/* Render pixmap to screen */
-	gdk_window_set_back_pixmap(
-		freqplots_drawingarea->window, freqplots_pixmap, FALSE );
-	gdk_window_clear( freqplots_drawingarea->window );
-	cairo_destroy( cr );
-	return;
-  }
+  /* Display frequency */
+  snprintf( txt, 11, "%9.3f", (double)calc_data.fmhz );
+  gtk_entry_set_text( GTK_ENTRY(
+		Builder_Get_Object(freqplots_window_builder, "freqplots_fmhz_entry")), txt );
 
-  /* Fit frequency range to scale */
-  min_fscale  = (double)save.freq[0];
-  if( isFlagSet(FREQ_LOOP_RUNNING) )
-	max_fscale = (double)save.freq[calc_data.fstep];
-  else
-	max_fscale = (double)save.freq[calc_data.lastf];
-  nval_fscale = freqplots_pixmap_width / 75;
-  Fit_to_Scale( &max_fscale, &min_fscale, &nval_fscale );
+  /* Calculate VSWR */
+  zrpro2 = (double)creal( netcx.zped ) + calc_data.zo;
+  zrpro2 *= zrpro2;
+  zrmro2 = (double)creal( netcx.zped ) - calc_data.zo;
+  zrmro2 *= zrmro2;
+  zimag2 = (double)cimag( netcx.zped );
+  zimag2 *= zimag2;
+  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
+  vswr = (1+gamma)/(1-gamma);
+  if( vswr > 999.0 )
+	vswr = 999.0;
 
-  /* Graph position */
-  posn = 0;
+  /* Display VSWR */
+  snprintf( txt, 7, "%5.1f", vswr );
+  gtk_entry_set_text( GTK_ENTRY(
+		Builder_Get_Object(freqplots_window_builder, "freqplots_vswr_entry")), txt );
 
-  /* Limit freq stepping to last freq step */
-  fstep = calc_data.lastf + 1;
+  /* Display Z real */
+  snprintf( txt, 7, "%5.1f", (double)creal( netcx.zped ) );
+  gtk_entry_set_text( GTK_ENTRY(
+		Builder_Get_Object(freqplots_window_builder, "freqplots_zreal_entry")), txt );
 
-  /* Plot max gain vs frequency, if possible */
-  if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) )
-  {
-	int nth, nph, pol;
-	gboolean no_fbr;
+  /* Display Z imaginary */
+  snprintf( txt, 7, "%5.1f", (double)cimag( netcx.zped ) );
+  gtk_entry_set_text( GTK_ENTRY(
+		Builder_Get_Object(freqplots_window_builder, "freqplots_zimag_entry")), txt );
 
-	/* Allocate max gmax and directions */
-	size_t mreq = (size_t)fstep * sizeof(double);
-	mem_realloc( (void **)&gmax,     mreq, "in plot_freqdata.c" );
-	mem_realloc( (void **)&gdir_tht, mreq, "in plot_freqdata.c" );
-	mem_realloc( (void **)&gdir_phi, mreq, "in plot_freqdata.c" );
-	mem_realloc( (void **)&fbratio,  mreq, "in plot_freqdata.c" );
+} /* Display_Frequency_Data() */
 
-	if( isFlagSet(PLOT_NETGAIN) )
-	  mem_realloc( (void **)&netgain, mreq, "in plot_freqdata.c" );
+/*-----------------------------------------------------------------------*/
 
-	/* Find max gain and direction, F/B ratio */
-	no_fbr = FALSE;
+/* New_Max_Min()
+ *
+ * Calculates new max and min scale
+ * values and the number of steps
+ */
+  static void
+New_Max_Min( double *max, double *min, double sval, int *nval )
+{
+  int ix;
+  double i;
 
-	/* Polarization type and impedance */
-	pol = calc_data.pol_type;
-	Zo = calc_data.zo;
+  i = ceil(*max / sval - 0.000001);
+  ix = (int)i;
+  *max = (double)ix * sval;
+  i = floor(*min / sval + 0.000001);
+  ix = (int)i;
+  *min = (double)ix * sval;
+  *nval = (int)((*max - *min) / sval + 0.5) + 1;
 
-	/* When freq loop is done, calcs are done for all freq steps */
-	for( idx = 0; idx < fstep; idx++ )
-	{
-	  double fbdir;
-	  int fbidx, mgidx;
+} /* New_Max_Min() */
 
-	  /* Index to gtot buffer where max gain
-	   * occurs for given polarization type */
-	  mgidx = rad_pattern[idx].max_gain_idx[pol];
+/*-----------------------------------------------------------------------*/
 
-	  /* Max gain for given polarization type */
-	  gmax[idx] = rad_pattern[idx].gtot[mgidx] +
-		Polarization_Factor(pol, idx, mgidx);
+/* Fit_to_Scale()
+ *
+ * Adjust the max and min value of data to be plotted,
+ * as well as the number of scale sub-divisions, so that
+ * sub-division values are easier to interpolate between.
+ * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
+ */
+  static void
+Fit_to_Scale( double *max, double *min, int *nval )
+{
+  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
+  /* Intermediate values are geometric mean of pairs */
+  double scale_val[] =
+  { 1.0, 1.4142, 2.0, 2.2360, 2.5, 3.5355, 5.0, 7.0710, 10.0, 14.142 };
+  double subdiv_val, subdiv_order;
+  int idx;
 
-	  /* Net gain if selected */
-	  if( isFlagSet(PLOT_NETGAIN) )
-	  {
-		Zr = impedance_data.zreal[idx];
-		Zi = impedance_data.zimag[idx];
-		netgain[idx] = gmax[idx] +
-		  10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
-	  }
+  /* Do nothing in this case */
+  if( *max <= *min ) return;
 
-	  /* Radiation angle/phi where max gain occurs */
-	  gdir_tht[idx] = 90.0 - rad_pattern[idx].max_gain_tht[pol];
-	  gdir_phi[idx] = rad_pattern[idx].max_gain_phi[pol];
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val = (*max - *min) / (double)(*nval-1);
+  subdiv_order = 1.0;
+  while( subdiv_order < subdiv_val )
+	subdiv_order *= 10.0;
+  while( subdiv_order > subdiv_val )
+	subdiv_order /= 10.0;
 
-	  /* Find F/B ratio if possible or net gain not required */
-	  if( no_fbr || isFlagSet(PLOT_NETGAIN) )
-		continue;
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val /= subdiv_order;
 
-	  /* Find F/B direction in theta */
-	  fbdir = 180.0 - rad_pattern[idx].max_gain_tht[pol];
-	  if( fpat.dth == 0.0 )
-		nth = 0;
-	  else
-		nth = (int)( fbdir/fpat.dth + 0.5 );
+  /* Find nearest prefered subdiv value */
+  for( idx = 1; idx <= 9; idx += 2 )
+	if( scale_val[idx] >= subdiv_val )
+	  break;
 
-	  /* If the antenna is modelled over ground, then use the same
-	   * theta as the max gain direction, relying on phi alone to
-	   * take us to the back. Patch supplied by Rik van Riel AB1KW
-	   */
-	  if( (nth >= fpat.nth) || (nth < 0) )
-	  {
-		fbdir = rad_pattern[idx].max_gain_tht[pol];
-		if( fpat.dth == 0.0 )
-		  nth = 0;
-		else
-		  nth = (int)( fbdir/fpat.dth + 0.5 );
-	  }
+  /* Scale prefered subdiv value */
+  if( idx > 9 ) idx = 9;
+  subdiv_val = scale_val[idx-1] * subdiv_order;
 
-	  /* Find F/B direction in phi */
-	  fbdir = gdir_phi[idx] + 180.0;
-	  if( fbdir >= 360.0 ) fbdir -= 360.0;
-	  nph = (int)( fbdir/fpat.dph + 0.5 );
+  /* Recalculate new max and min value */
+  New_Max_Min( max, min, subdiv_val, nval );
 
-	  /* No F/B calc. possible if no phi step at +180 from max gain */
-	  if( (nph >= fpat.nph) || (nph < 0) )
-	  {
-		no_fbr = TRUE;
-		continue;
-	  }
+} /* Fit_to_Scale() */
 
-	  /* Index to gtot buffer for gain in back direction */
-	  fbidx = nth + nph*fpat.nth;
+/*-----------------------------------------------------------------------*/
 
-	  /* Front to back ratio */
-	  fbratio[idx]  = pow( 10.0, gmax[idx] / 10.0 );
-	  fbratio[idx] /= pow( 10.0,
-		  (rad_pattern[idx].gtot[fbidx] +
-		   Polarization_Factor(pol, idx, fbidx)) / 10.0 );
-	  fbratio[idx] = 10.0 * log10( fbratio[idx] );
+/* Fit_to_Scale2()
+ *
+ * Adjust the max and min value of data to be plotted,
+ * as well as the number of scale sub-divisions, so that
+ * sub-division values are easier to interpolate between.
+ * This is done for two scales (left & right) simultaneously.
+ * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
+ */
+  static void
+Fit_to_Scale2( double *max1, double *min1,
+	double *max2, double *min2, int *nval )
+{
+  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
+  /* Intermediate values are geometric mean of pairs */
+  double scale_val[] = { 10.0, 5.0, 2.5, 2.0, 1.0, 0.5 };
 
-	} /* for( idx = 0; idx < fstep; idx++ ) */
+  double subdiv_val1, subdiv_order1, subdiv_val2, subdiv_order2;
+  double max_1, min_1, max_2, min_2, range1, range2, min_stretch;
+  double max1sv=0.0, min1sv=0.0, max2sv=0.0, min2sv=0.0;
+  int idx1, idx2, nval1, nval2, nvalsv=0, mx, i1, i2;
 
-	/*** Plot gain and f/b ratio (if possible) graph(s) */
-	if( no_fbr || isFlagSet(PLOT_NETGAIN) )
-	{
-	  /* Plotting frame titles */
-	  titles[0] = _("Raw Gain dbi");
-	  if( isFlagSet(PLOT_NETGAIN) )
-	  {
-		titles[1] = _("Max Gain & Net Gain vs Frequency");
-		titles[2] = _("Net Gain dbi");
-		if( fstep > 1 )
-		  Plot_Graph2( gmax, netgain, save.freq, fstep,
-			  titles, calc_data.ngraph, ++posn );
-	  }
-	  else
-	  {
-		titles[1] = _("Max Gain & F/B Ratio vs Frequency");
-		titles[2] = "        ";
-		if( fstep > 1 )
-		  Plot_Graph( gmax, save.freq, fstep,
-			  titles, calc_data.ngraph, ++posn );
-	  }
-	}
-	else
-	{
-	  /* Plotting frame titles */
-	  titles[0] = _("Raw Gain dbi");
-	  titles[1] = _("Max Gain & F/B Ratio vs Frequency");
-	  titles[2] = _("F/B Ratio db");
-	  if( fstep > 1 )
-		Plot_Graph2( gmax, fbratio, save.freq, fstep,
-			titles, calc_data.ngraph, ++posn );
-	}
+  /* Do nothing in these cases */
+  if( *max1 <= *min1 ) return;
+  if( *max2 == *min2 ) return;
 
-	/* Plot max gain direction if enabled */
-	if( isFlagSet(PLOT_GAIN_DIR) )
-	{
-	  /* Plotting frame titles */
-	  titles[0] = _("Rad Angle - deg");
-	  titles[1] = _("Max Gain Direction vs Frequency");
-	  titles[2] = _("Phi - deg");
-	  if( fstep > 1 )
-		Plot_Graph2( gdir_tht, gdir_phi, save.freq, fstep,
-			titles, calc_data.ngraph, ++posn );
-	}
+  /* For each scale */
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val1 = (*max1 - *min1) / (double)(*nval-1);
+  subdiv_order1 = 1.0;
+  while( subdiv_order1 < subdiv_val1 )
+	subdiv_order1 *= 10.0;
+  while( subdiv_order1 > subdiv_val1 )
+	subdiv_order1 /= 10.0;
 
-  } /* if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) ) */
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val1 /= subdiv_order1;
 
-  /* Plot gain in direction of viewer vs freq, if possible */
-  if( isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) )
-  {
-	/* Plotting frame titles */
-	titles[0] = _("Raw Gain dbi");
-	titles[1] = _("Gain in Viewer Direction vs Frequency");
+  /* Find nearest prefered subdiv value */
+  idx1 = 1;
+  while( (scale_val[idx1] > subdiv_val1) && (idx1 <= 4) )
+	idx1++;
 
-	/* Allocate viewer gain buffer */
-	size_t mreq = (size_t)fstep * sizeof(double);
-	mem_realloc( (void **)&vgain, mreq, "in plot_freqdata.c" );
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val2 = (*max2 - *min2) / (double)(*nval-1);
+  subdiv_order2 = 1.0;
+  while( subdiv_order2 < subdiv_val2 )
+	subdiv_order2 *= 10.0;
+  while( subdiv_order2 > subdiv_val2 )
+	subdiv_order2 /= 10.0;
 
-	/* Calcs are done for all freq steps */
-	for( idx = 0; idx < fstep; idx++ )
-	  vgain[idx] = Viewer_Gain( structure_proj_params, idx );
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val2 /= subdiv_order2;
 
-	/* Plot net gain if selected */
-	if( isFlagSet(PLOT_NETGAIN) )
-	{
-	  mreq = (size_t)fstep * sizeof(double);
-	  mem_realloc( (void **)&netgain, mreq, "in plot_freqdata.c" );
+  /* Find nearest prefered subdiv value */
+  idx2 = 1;
+  while( (scale_val[idx2] > subdiv_val2) && (idx2 <= 4) )
+	idx2++;
 
-	  Zo = calc_data.zo;
-	  for( idx = 0; idx < fstep; idx++ )
-	  {
-		Zr = impedance_data.zreal[idx];
-		Zi = impedance_data.zimag[idx];
-		netgain[idx] = vgain[idx] +
-		  10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
-	  }
+  /* Search for a compromize in scale stretching */
+  range1 = *max1 - *min1;
+  range2 = *max2 - *min2;
+  min_stretch = 10.0;
 
-	  /* Plot net gain if selected */
-	  titles[2] = _("Net gain dbi");
-	  if( fstep > 1 )
-		Plot_Graph2( vgain, netgain, save.freq, fstep,
-			titles, calc_data.ngraph, ++posn );
-	} /* if( isFlagSet(PLOT_NETGAIN) ) */
-	else
-	{
-	  titles[2] = "        ";
-	  if( fstep > 1 )
-		Plot_Graph( vgain, save.freq, fstep,
-			titles, calc_data.ngraph, ++posn );
-	}
-  } /* isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) */
+  /* Scale prefered subdiv values */
+  subdiv_val1 = scale_val[idx1] * subdiv_order1;
+  subdiv_val2 = scale_val[idx2] * subdiv_order2;
 
-  /* Plot VSWR vs freq */
-  if( isFlagSet(PLOT_VSWR) )
-  {
-	double *vswr = NULL, gamma;
-	double zrpro2, zrmro2, zimag2;
+  /* Recalculate new max and min values */
+  max_1 = *max1; min_1 = *min1; nval1 = *nval;
+  max_2 = *max2; min_2 = *min2; nval2 = *nval;
+  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
+  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
 
-	/* Plotting frame titles */
-	titles[0] = _("VSWR");
-	titles[1] = _("VSWR vs Frequency");
+  /* This is a lucky case */
+  if( (nval1 == nval2) && (nval1 >= *nval) )
+  {
+	*max1 = max_1; *min1 = min_1;
+	*max2 = max_2; *min2 = min_2;
+	*nval = nval1;
+	return;
+  }
 
-	/* Calculate VSWR */
-	mem_alloc( (void **)&vswr,
-		(size_t)calc_data.nfrq * sizeof(double),
-		"in Plot_Frequency_Data()" );
-	if( vswr == NULL )
-	{
-	  fprintf( stderr, "xnec2c: Plot_Frequency_Data():"
-		  "memory allocation for vswr failed\n" );
-	  stop( _("Plot_Frequency_Data():"
-			"Memory allocation for vswr failed"), ERR_OK );
-	  return;
-	}
-	for(idx = 0; idx < fstep; idx++ )
+  /* More likely look for a compromise */
+  for( i1 = 0; i1 < 2; i1++ )
+	for( i2 = 0; i2 < 2; i2++ )
 	{
-	  zrpro2 = impedance_data.zreal[idx] + calc_data.zo;
-	  zrpro2 *= zrpro2;
-	  zrmro2 = impedance_data.zreal[idx] - calc_data.zo;
-	  zrmro2 *= zrmro2;
-	  zimag2 = impedance_data.zimag[idx] * impedance_data.zimag[idx];
-	  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
-	  vswr[idx] = (1+gamma)/(1-gamma);
-	  if( vswr[idx] > 10.0 ) vswr[idx] = 10.0;
-	}
-
-	titles[2] = "        ";
-	if( fstep > 1 )
-	  Plot_Graph( vswr, save.freq, fstep,
-		  titles, calc_data.ngraph, ++posn );
-
-	free_ptr( (void **)&vswr );
-  } /* if( isFlagSet(PLOT_VSWR) ) */
-
-  /* Plot z-real and z-imag */
-  if( isFlagSet(PLOT_ZREAL_ZIMAG) )
-  {
-	/* Plotting frame titles */
-	titles[0] = _("Z-real");
-	titles[1] = _("Impedance vs Frequency");
-	titles[2] = _("Z-imag");
-	if( fstep > 1 )
-	  Plot_Graph2(
-		  impedance_data.zreal, impedance_data.zimag, save.freq,
-		  fstep, titles, calc_data.ngraph, ++posn );
+	  double stretch;
 
-  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+	  /* Scale prefered subdiv values */
+	  subdiv_val1 = scale_val[idx1-i1] * subdiv_order1;
+	  subdiv_val2 = scale_val[idx2-i2] * subdiv_order2;
 
-  /* Plot z-magn and z-phase */
-  if( isFlagSet(PLOT_ZMAG_ZPHASE) )
-  {
-	/* Plotting frame titles */
-	titles[0] = _("Z-magn");
-	titles[1] = _("Impedance vs Frequency");
-	titles[2] = _("Z-phase");
-	if( fstep > 1 )
-	  Plot_Graph2( impedance_data.zmagn, impedance_data.zphase,
-		  save.freq, fstep, titles, calc_data.ngraph, ++posn );
+	  /* Recalculate new max and min values */
+	  max_1 = *max1; min_1 = *min1; nval1 = *nval;
+	  max_2 = *max2; min_2 = *min2; nval2 = *nval;
+	  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
+	  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
 
-  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+	  /* This is a lucky case */
+	  if( nval1 == nval2 )
+	  {
+		*max1 = max_1; *min1 = min_1;
+		*max2 = max_2; *min2 = min_2;
+		*nval = nval1;
+		return;
+	  }
 
-  /* Render pixmap to screen */
-  gdk_window_set_back_pixmap(
-	  freqplots_drawingarea->window, freqplots_pixmap, FALSE );
-  gdk_window_clear( freqplots_drawingarea->window );
+	  /* Stretch scale with the fewer steps */
+	  if( nval1 > nval2 )
+	  {
+		mx = nval1 - nval2;
+		max_2 += ((mx+1)/2) * subdiv_val2;
+		min_2 -= (mx/2) * subdiv_val2;
+		stretch = (max_2-min_2)/range2;
+		if( (stretch < min_stretch) )
+		{
+		  min_stretch = stretch;
+		  max2sv = max_2; min2sv = min_2;
+		  max1sv = max_1; min1sv = min_1;
+		  nvalsv = nval1;
+		}
+	  }
+	  else
+	  {
+		mx = nval2 - nval1;
+		max_1 += ((mx+1)/2) * subdiv_val1;
+		min_1 -= (mx/2) * subdiv_val1;
+		stretch = (max_1-min_1)/range1;
+		if( (stretch < min_stretch) )
+		{
+		  min_stretch = stretch;
+		  max1sv = max_1; min1sv = min_1;
+		  max2sv = max_2; min2sv = min_2;
+		  nvalsv = nval2;
+		}
+	  }
 
-  /* Display freq data in entry widgets */
-  Display_Frequency_Data();
+	} /* for( i1 = 0; i1 < 3; i1++ ) */
 
-  /* Wait for GTK to complete its tasks */
-  while( g_main_context_iteration(NULL, FALSE) );
+  *max1 = max1sv; *min1 = min1sv;
+  *max2 = max2sv; *min2 = min2sv;
+  *nval = nvalsv;
 
-  cairo_destroy( cr );
-} /* Plot_Frequency_Data() */
+} /* Fit_to_Scale2() */
 
 /*-----------------------------------------------------------------------*/
 
-/* Display_Frequency_Data()
+/* Set_Rectangle()
  *
- * Displays freq dependent data (gain, impedance etc)
- * in the entry widgets in the freq plots window
+ * Sets the parameters of a GdkRectangle
  */
-  void
-Display_Frequency_Data( void )
+  static void
+Set_Rectangle( GdkRectangle *rect, int x, int y, int w, int h )
 {
-  int pol, fstep;
-  double vswr, gamma;
-  double zrpro2, zrmro2, zimag2;
-  char txt[11];
-
-  if( isFlagClear(PLOT_ENABLED) ) return;
+  rect->x = x;
+  rect->y = y;
+  rect->width  = w;
+  rect->height = h;
+}
 
-  /* Limit freq stepping to nfrq */
-  fstep = calc_data.fstep;
-  if( fstep >= calc_data.nfrq )
-	fstep = calc_data.nfrq;
+/*-----------------------------------------------------------------------*/
 
-  /* Polarization type */
-  pol = calc_data.pol_type;
-
-  /* Index to gtot buffer where max gain
-   * occurs for given polarization type */
-  if( isFlagSet(ENABLE_RDPAT) )
-  {
-	/* Max gain for given polarization type */
-	int mgidx = rad_pattern[fstep].max_gain_idx[pol];
-	double gmax = rad_pattern[fstep].gtot[mgidx] +
-	  Polarization_Factor(pol, fstep, mgidx);
-
-	/* Display max gain */
-	snprintf( txt, 6, "%5f", gmax );
-	gtk_entry_set_text( GTK_ENTRY(lookup_widget(
-			freqplots_window, "freqplots_maxgain_entry")), txt );
-
-  } /* isFlagSet(ENABLE_RDPAT) */
-
-  /* Display frequency */
-  snprintf( txt, 11, "%10.3f", (double)calc_data.fmhz );
-  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
-		  freqplots_window, "freqplots_fmhz_entry")), txt );
-
-  /* Calculate VSWR */
-  zrpro2 = (double)creal( netcx.zped ) + calc_data.zo;
-  zrpro2 *= zrpro2;
-  zrmro2 = (double)creal( netcx.zped ) - calc_data.zo;
-  zrmro2 *= zrmro2;
-  zimag2 = (double)cimag( netcx.zped );
-  zimag2 *= zimag2;
-  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
-  vswr = (1+gamma)/(1-gamma);
-  if( vswr > 999.0 )
-	vswr = 999.0;
-
-  /* Display VSWR */
-  snprintf( txt, 6, "%5f", vswr );
-  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
-		  freqplots_window, "freqplots_vswr_entry")), txt );
-
-  /* Display Z real */
-  snprintf( txt, 6, "%5f", (double)creal( netcx.zped ) );
-  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
-		  freqplots_window, "freqplots_zreal_entry")), txt );
-
-  /* Display Z imaginary */
-  snprintf( txt, 6, "%5f", (double)cimag( netcx.zped ) );
-  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
-		  freqplots_window, "freqplots_zimag_entry")), txt );
-
-} /* Display_Frequency_Data() */
-
-/*-----------------------------------------------------------------------*/
-
-/* Draw_Plotting_Frame()
+/* Plot_Horizontal_Scale()
  *
- * Draws a graph plotting frame, including
- * horizontal and vertical divisions
+ * Draws out a horizontal scale, between the min
+ * and max value of the variable to be plotted
  */
-void
-Draw_Plotting_Frame(
-	gchar **title,
-	GdkRectangle *rect,
-	int nhor, int nvert )
+  static void
+Plot_Horizontal_Scale(
+	cairo_t *cr,
+	double red, double grn, double blu,
+	int x, int y, int width,
+	double max, double min,
+	int nval )
 {
-  int idx, xpw, xps, yph, yps;
+  int idx, xps, order;
+  double hstep = 1.0;
+  char value[16], format[8];
   PangoLayout *layout;
-  int width0, width1, width2, height; /* Layout size */
-
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
-
-  /* Draw titles (left scale, center and right scale) */
-  cairo_set_source_rgb( cr, MAGENTA );
-  layout = gtk_widget_create_pango_layout(
-	  freqplots_drawingarea, title[0] );
-  pango_layout_get_pixel_size( layout, &width0, &height);
-  cairo_move_to( cr, rect->x, rect->y );
-  pango_cairo_show_layout( cr, layout );
-
-  cairo_set_source_rgb( cr, CYAN );
-  pango_layout_set_text( layout, title[2], -1 );
-  pango_layout_get_pixel_size( layout, &width2, &height);
-  xpw = rect->x + rect->width - width2;
-  cairo_move_to( cr, xpw, rect->y );
-  pango_cairo_show_layout( cr, layout );
+  int pl_width, pl_height; /* Layout size */
 
-  cairo_set_source_rgb( cr, YELLOW );
-  pango_layout_set_text( layout, title[1], -1 );
-  pango_layout_get_pixel_size( layout, &width1, &height);
-  xpw = rect->x + width0/2 + (rect->width-width1-width2)/2;
-  cairo_move_to( cr, xpw, rect->y );
-  pango_cairo_show_layout( cr, layout );
+  /* Abort if not enough values to plot */
+  if( nval <= 1 ) return;
 
-  /* Move to plot box and divisions */
-  rect->y += height;
-  xpw = rect->x + rect->width;
-  yph = rect->y + rect->height;
+  /* Cairo context */
+  cairo_set_source_rgb( cr, red, grn, blu );
 
-  /* Draw vertical divisions */
-  cairo_set_source_rgb( cr, GREY );
-  nvert--;
-  for( idx = 1; idx <= nvert; idx++ )
-  {
-	xps = rect->x + (idx * rect->width) / nvert;
-	Cairo_Draw_Line( cr, xps, rect->y, xps, yph );
-  }
+  /* Calculate step between scale values */
+  hstep = (max - min) / (nval - 1);
 
-  /* Draw horizontal divisions */
-  nhor--;
-  for( idx = 1; idx <= nhor; idx++ )
-  {
-	yps = rect->y + (idx * rect->height) / nhor;
-	Cairo_Draw_Line( cr, rect->x, yps, xpw, yps );
-  }
+  /* Determine format for scale values */
+  /* Use order of horizontal step to determine format of print */
+  double ord = log10( fabs(hstep + 0.0000001) );
+  order = (int)ord;
+  if( order > 0 )  order = 0;
+  if( order < -9 ) order = -9;
+  snprintf( format, 7, "%%6.%df", 1-order );
 
-  /* Draw outer box */
-  cairo_rectangle(
-	  cr, rect->x, rect->y, rect->width, rect->height );
-  cairo_stroke( cr );
+  /* Create a pango layout */
+  layout = gtk_widget_create_pango_layout(
+	  freqplots_drawingarea, "1234.5" );
+  pango_layout_get_pixel_size( layout, &pl_width, &pl_height);
 
-  /* Draw a vertical line to show current freq if it was
-   * changed by a user click on the plots drawingarea */
-  if( isFlagSet(FREQ_LOOP_DONE) && isFlagSet(PLOT_FREQ_LINE) )
+  /* Draw horizontal scale values */
+  /* Align with plot box */
+  x -= pl_width/2;
+  for( idx = 0; idx < nval; idx++ )
   {
-	double fr;
-
-	fr = ((double)calc_data.fmhz - min_fscale) /
-	  (max_fscale - min_fscale);
-	fr = fr * (double)rect->width + 0.5;
-
-	cairo_set_source_rgb( cr, GREEN );
-	Cairo_Draw_Line( cr, rect->x+(int)fr, rect->y, rect->x+(int)fr, yph );
+	xps = x + (idx * width) / (nval-1);
+	snprintf( value, sizeof(value), (const char *)format, min );
+	pango_layout_set_text( layout, value, -1 );
+	cairo_move_to( cr, xps, y );
+	pango_cairo_show_layout( cr, layout );
+	min += hstep;
   }
 
   g_object_unref( layout );
-  cairo_destroy( cr );
-} /* Draw_Plotting_Frame() */
+
+} /* Plot_Horizontal_Scale() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -564,8 +409,9 @@ Draw_Plotting_Frame(
  * Draws out a vertical scale, between the min
  * and max value of the variable to be plotted
  */
-void
+  static void
 Plot_Vertical_Scale(
+	cairo_t *cr,
 	double red, double grn, double blu,
 	int x, int y, int height,
 	double max, double min,
@@ -582,7 +428,6 @@ Plot_Vertical_Scale(
   if( nval <= 1 ) return;
 
   /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
   cairo_set_source_rgb( cr, red, grn, blu );
 
   /* Calculate step between scale values */
@@ -629,68 +474,93 @@ Plot_Vertical_Scale(
   }
 
   g_object_unref( layout );
-  cairo_destroy( cr );
+
 } /* Plot_Vertical_Scale() */
 
 /*-----------------------------------------------------------------------*/
 
-/* Plot_Horizontal_Scale()
+/* Draw_Plotting_Frame()
  *
- * Draws out a horizontal scale, between the min
- * and max value of the variable to be plotted
+ * Draws a graph plotting frame, including
+ * horizontal and vertical divisions
  */
-void
-Plot_Horizontal_Scale(
-	double red, double grn, double blu,
-	int x, int y, int width,
-	double max, double min,
-	int nval )
+  static void
+Draw_Plotting_Frame(
+	cairo_t *cr,
+	gchar **title,
+	GdkRectangle *rect,
+	int nhor, int nvert )
 {
-  int idx, xps, order;
-  double hstep = 1.0;
-  char value[16], format[6];
+  int idx, xpw, xps, yph, yps;
   PangoLayout *layout;
-  int pl_width, pl_height; /* Layout size */
+  int width0, width1, width2, height; /* Layout size */
 
-  /* Abort if not enough values to plot */
-  if( nval <= 1 ) return;
+  /* Draw titles (left scale, center and right scale) */
+  cairo_set_source_rgb( cr, MAGENTA );
+  layout = gtk_widget_create_pango_layout(
+	  freqplots_drawingarea, title[0] );
+  pango_layout_get_pixel_size( layout, &width0, &height );
+  cairo_move_to( cr, rect->x, rect->y );
+  pango_cairo_show_layout( cr, layout );
 
-  /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
-  cairo_set_source_rgb( cr, red, grn, blu );
+  cairo_set_source_rgb( cr, CYAN );
+  pango_layout_set_text( layout, title[2], -1 );
+  pango_layout_get_pixel_size( layout, &width2, &height );
+  xpw = rect->x + rect->width - width2;
+  cairo_move_to( cr, xpw, rect->y );
+  pango_cairo_show_layout( cr, layout );
 
-  /* Calculate step between scale values */
-  hstep = (max-min) / (nval-1);
+  cairo_set_source_rgb( cr, YELLOW );
+  pango_layout_set_text( layout, title[1], -1 );
+  pango_layout_get_pixel_size( layout, &width1, &height );
+  xpw = rect->x + width0/2 + (rect->width-width1-width2)/2;
+  cairo_move_to( cr, xpw, rect->y );
+  pango_cairo_show_layout( cr, layout );
 
-  /* Determine format for scale values */
-  /* Use order of horizontal step to determine format of print */
-  double ord = log10( fabs(hstep + 0.0000001) );
-  order = (int)ord;
-  if( order > 0 )  order = 0;
-  if( order < -9 ) order = -9;
-  snprintf( format, 6, "%%6.%df", 1-order );
+  /* Move to plot box and divisions */
+  rect->y += height;
+  xpw = rect->x + rect->width;
+  yph = rect->y + rect->height;
 
-  /* Create a pango layout */
-  layout = gtk_widget_create_pango_layout(
-	  freqplots_drawingarea, "1234.5" );
-  pango_layout_get_pixel_size( layout, &pl_width, &pl_height);
+  /* Draw vertical divisions */
+  cairo_set_source_rgb( cr, GREY );
+  nvert--;
+  for( idx = 1; idx <= nvert; idx++ )
+  {
+	xps = rect->x + (idx * rect->width) / nvert;
+	Cairo_Draw_Line( cr, xps, rect->y, xps, yph );
+  }
 
-  /* Draw horizontal scale values */
-  /* Align with plot box */
-  x -= pl_width/2;
-  for( idx = 0; idx < nval; idx++ )
+  /* Draw horizontal divisions */
+  nhor--;
+  for( idx = 1; idx <= nhor; idx++ )
   {
-	xps = x + (idx * width) / (nval-1);
-	snprintf( value, sizeof(value), (const char *)format, min );
-	pango_layout_set_text( layout, value, -1 );
-	cairo_move_to( cr, xps, y );
-	pango_cairo_show_layout( cr, layout );
-	min += hstep;
+	yps = rect->y + (idx * rect->height) / nhor;
+	Cairo_Draw_Line( cr, rect->x, yps, xpw, yps );
+  }
+
+  /* Draw outer box */
+  cairo_rectangle(
+	  cr, rect->x, rect->y, rect->width, rect->height );
+  cairo_stroke( cr );
+
+  /* Draw a vertical line to show current freq if it was
+   * changed by a user click on the plots drawingarea */
+  if( isFlagSet(FREQ_LOOP_DONE) && isFlagSet(PLOT_FREQ_LINE) )
+  {
+	double fr;
+
+	fr = ((double)calc_data.fmhz - min_fscale) /
+	  (max_fscale - min_fscale);
+	fr = fr * (double)rect->width + 0.5;
+
+	cairo_set_source_rgb( cr, GREEN );
+	Cairo_Draw_Line( cr, rect->x+(int)fr, rect->y, rect->x+(int)fr, yph );
   }
 
   g_object_unref( layout );
-  cairo_destroy( cr );
-} /* Plot_Horizontal_Scale() */
+
+} /* Draw_Plotting_Frame() */
 
 /*-----------------------------------------------------------------------*/
 
@@ -698,8 +568,9 @@ Plot_Horizontal_Scale(
  *
  * Plots a graph of a vs b
  */
-void
+  static void
 Draw_Graph(
+	cairo_t *cr,
 	double red, double grn, double blu,
 	GdkRectangle *rect,
 	double *a, double *b,
@@ -712,7 +583,6 @@ Draw_Graph(
   GdkPoint *points = NULL, polygn[4];
 
   /* Cairo context */
-  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
   cairo_set_source_rgb( cr, red, grn, blu );
 
   /* Range of values to plot */
@@ -722,7 +592,7 @@ Draw_Graph(
   /* Calculate points to plot */
   mem_alloc( (void **)&points,
 	  (size_t)calc_data.nfrq * sizeof(GdkPoint),
-	  "in Plot_Frequency_Data()" );
+	  "in Draw_Graph()" );
   if( points == NULL )
   {
 	fprintf( stderr, "xnec2c: Draw_Graph():"
@@ -761,307 +631,25 @@ Draw_Graph(
   Cairo_Draw_Lines( cr, points, nval );
 
   free_ptr( (void **)&points );
-  cairo_destroy( cr );
+
 } /* Draw_Graph() */
 
 /*-----------------------------------------------------------------------*/
 
-/* Set_Rectangle()
+/* Plot_Graph2()
  *
- * Sets the parameters of a GdkRectangle
+ * Plots graphs of two functions against a common variable
  */
-  void
-Set_Rectangle( GdkRectangle *rect, int x, int y, int w, int h )
-{
-  rect->x = x;
-  rect->y = y;
-  rect->width  = w;
-  rect->height = h;
-}
-
-/*-----------------------------------------------------------------------*/
-
-/* Fit_to_Scale()
- *
- * Adjust the max and min value of data to be plotted,
- * as well as the number of scale sub-divisions, so that
- * sub-division values are easier to interpolate between.
- * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
- */
-  void
-Fit_to_Scale( double *max, double *min, int *nval )
-{
-  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
-  /* Intermediate values are geometric mean of pairs */
-  double scale_val[] =
-  { 1.0, 1.4142, 2.0, 2.2360, 2.5, 3.5355, 5.0, 7.0710, 10.0, 14.142 };
-  double subdiv_val, subdiv_order;
-  int idx;
-
-  /* Fix input */
-  if( *max == *min )
-  {
-	if( *max == 0.0 )
-	{
-	  *max =  1.0;
-	  *min = -1.0;
-	}
-	else if( *max > 0.0 )
-	{
-	  *max *= 1.5;
-	  *min /= 2.0;
-	}
-	else
-	{
-	  *max /= 2.0;
-	  *min *= 1.5;
-	}
-  }
-
-  /* Find subdivision's lower order of magnitude */
-  subdiv_val = (*max - *min) / (double)(*nval-1);
-  subdiv_order = 1.0;
-  while( subdiv_order < subdiv_val )
-	subdiv_order *= 10.0;
-  while( subdiv_order > subdiv_val )
-	subdiv_order /= 10.0;
-
-  /* Scale subdivision 1 < subd < 10 */
-  subdiv_val /= subdiv_order;
-
-  /* Find nearest prefered subdiv value */
-  for( idx = 1; idx <= 9; idx += 2 )
-	if( scale_val[idx] >= subdiv_val )
-	  break;
-
-  /* Scale prefered subdiv value */
-  if( idx > 9 ) idx = 9;
-  subdiv_val = scale_val[idx-1] * subdiv_order;
-
-  /* Recalculate new max and min value */
-  New_Max_Min( max, min, subdiv_val, nval );
-
-} /* Fit_to_Scale() */
-
-/*-----------------------------------------------------------------------*/
-
-/* Fit_to_Scale2()
- *
- * Adjust the max and min value of data to be plotted,
- * as well as the number of scale sub-divisions, so that
- * sub-division values are easier to interpolate between.
- * This is done for two scales (left & right) simultaneously.
- * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
- */
-  void
-Fit_to_Scale2( double *max1, double *min1,
-	double *max2, double *min2, int *nval )
-{
-  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
-  /* Intermediate values are geometric mean of pairs */
-  double scale_val[] = { 10.0, 5.0, 2.5, 2.0, 1.0, 0.5 };
-
-  double subdiv_val1, subdiv_order1, subdiv_val2, subdiv_order2;
-  double max_1, min_1, max_2, min_2, range1, range2, min_stretch;
-  double max1sv=0.0, min1sv=0.0, max2sv=0.0, min2sv=0.0;
-  int idx1, idx2, nval1, nval2, nvalsv=0, mx, i1, i2;
-
-  /* Fix input for both scales */
-  if( *max1 == *min1 )
-  {
-	if( *max1 == 0.0 )
-	{
-	  *max1 =  1.0;
-	  *min1 = -1.0;
-	}
-	else if( *max1 > 0.0 )
-	{
-	  *max1 *= 1.5;
-	  *min1 /= 2.0;
-	}
-	else
-	{
-	  *max1 /= 2.0;
-	  *min1 *= 1.5;
-	}
-  }
-
-  if( *max2 == *min2 )
-  {
-	if( *max2 == 0.0 )
-	{
-	  *max2 =  1.0;
-	  *min2 = -1.0;
-	}
-	else if( *max2 > 0.0 )
-	{
-	  *max2 *= 1.5;
-	  *min2 /= 2.0;
-	}
-	else
-	{
-	  *max2 /= 2.0;
-	  *min2 *= 1.5;
-	}
-  }
-
-  /* For each scale */
-  /* Find subdivision's lower order of magnitude */
-  subdiv_val1 = (*max1 - *min1) / (double)(*nval-1);
-  subdiv_order1 = 1.0;
-  while( subdiv_order1 < subdiv_val1 )
-	subdiv_order1 *= 10.0;
-  while( subdiv_order1 > subdiv_val1 )
-	subdiv_order1 /= 10.0;
-
-  /* Scale subdivision 1 < subd < 10 */
-  subdiv_val1 /= subdiv_order1;
-
-  /* Find nearest prefered subdiv value */
-  idx1 = 1;
-  while( (scale_val[idx1] > subdiv_val1) && (idx1 <= 4) )
-	idx1++;
-
-  /* Find subdivision's lower order of magnitude */
-  subdiv_val2 = (*max2 - *min2) / (double)(*nval-1);
-  subdiv_order2 = 1.0;
-  while( subdiv_order2 < subdiv_val2 )
-	subdiv_order2 *= 10.0;
-  while( subdiv_order2 > subdiv_val2 )
-	subdiv_order2 /= 10.0;
-
-  /* Scale subdivision 1 < subd < 10 */
-  subdiv_val2 /= subdiv_order2;
-
-  /* Find nearest prefered subdiv value */
-  idx2 = 1;
-  while( (scale_val[idx2] > subdiv_val2) && (idx2 <= 4) )
-	idx2++;
-
-  /* Search for a compromize in scale stretching */
-  range1 = *max1 - *min1;
-  range2 = *max2 - *min2;
-  min_stretch = 10.0;
-
-  /* Scale prefered subdiv values */
-  subdiv_val1 = scale_val[idx1] * subdiv_order1;
-  subdiv_val2 = scale_val[idx2] * subdiv_order2;
-
-  /* Recalculate new max and min values */
-  max_1 = *max1; min_1 = *min1; nval1 = *nval;
-  max_2 = *max2; min_2 = *min2; nval2 = *nval;
-  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
-  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
-
-  /* This is a lucky case */
-  if( (nval1 == nval2) && (nval1 >= *nval) )
-  {
-	*max1 = max_1; *min1 = min_1;
-	*max2 = max_2; *min2 = min_2;
-	*nval = nval1;
-	return;
-  }
-
-  /* More likely look for a compromise */
-  for( i1 = 0; i1 < 2; i1++ )
-	for( i2 = 0; i2 < 2; i2++ )
-	{
-	  double stretch;
-
-	  /* Scale prefered subdiv values */
-	  subdiv_val1 = scale_val[idx1-i1] * subdiv_order1;
-	  subdiv_val2 = scale_val[idx2-i2] * subdiv_order2;
-
-	  /* Recalculate new max and min values */
-	  max_1 = *max1; min_1 = *min1; nval1 = *nval;
-	  max_2 = *max2; min_2 = *min2; nval2 = *nval;
-	  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
-	  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
-
-	  /* This is a lucky case */
-	  if( nval1 == nval2 )
-	  {
-		*max1 = max_1; *min1 = min_1;
-		*max2 = max_2; *min2 = min_2;
-		*nval = nval1;
-		return;
-	  }
-
-	  /* Stretch scale with the fewer steps */
-	  if( nval1 > nval2 )
-	  {
-		mx = nval1 - nval2;
-		max_2 += ((mx+1)/2) * subdiv_val2;
-		min_2 -= (mx/2) * subdiv_val2;
-		stretch = (max_2-min_2)/range2;
-		if( (stretch < min_stretch) )
-		{
-		  min_stretch = stretch;
-		  max2sv = max_2; min2sv = min_2;
-		  max1sv = max_1; min1sv = min_1;
-		  nvalsv = nval1;
-		}
-	  }
-	  else
-	  {
-		mx = nval2 - nval1;
-		max_1 += ((mx+1)/2) * subdiv_val1;
-		min_1 -= (mx/2) * subdiv_val1;
-		stretch = (max_1-min_1)/range1;
-		if( (stretch < min_stretch) )
-		{
-		  min_stretch = stretch;
-		  max1sv = max_1; min1sv = min_1;
-		  max2sv = max_2; min2sv = min_2;
-		  nvalsv = nval2;
-		}
-	  }
-
-	} /* for( i1 = 0; i1 < 3; i1++ ) */
-
-  *max1 = max1sv; *min1 = min1sv;
-  *max2 = max2sv; *min2 = min2sv;
-  *nval = nvalsv;
-
-} /* Fit_to_Scale2() */
-
-/*-----------------------------------------------------------------------*/
-
-/* New_Max_Min()
- *
- * Calculates new max and min scale
- * values and the number of steps
- */
-  void
-New_Max_Min( double *max, double *min, double sval, int *nval )
-{
-  int ix;
-  double i;
-
-  i = ceil(*max / sval - 0.000001);
-  ix = (int)i;
-  *max = (double)ix * sval;
-  i = floor(*min / sval + 0.000001);
-  ix = (int)i;
-  *min = (double)ix * sval;
-  *nval = (int)((*max - *min) / sval + 0.5) + 1;
-
-} /* New_Max_Min() */
-
-/*-----------------------------------------------------------------------*/
-
-/* Plot_Graph2()
- *
- * Plots graphs of two functions against a common variable
- */
-void
-Plot_Graph2(
-	double *fa, double *fb, double *fc, int nc,
-	char *titles[], int nplt, int posn )
+  static void
+Plot_Graph2(
+	cairo_t *cr,
+	double *fa, double *fb, double *fc, int nc,
+	char *titles[], int nplt, int posn )
 {
   double max_fa, min_fa, max_fb, min_fb;
   static int first_call = TRUE;
   int idx, nval_ab, plot_height, plot_posn;
+
   /* Pango layout size */
   static int layout_width, layout_height;
 
@@ -1079,18 +667,19 @@ Plot_Graph2(
 
   /* Available height for each graph.
    * (np=number of graphs to be plotted) */
-  plot_height = freqplots_pixmap_height/nplt;
-  plot_posn   = (freqplots_pixmap_height * (posn-1))/nplt;
+  plot_height = freqplots_height/nplt;
+  plot_posn   = (freqplots_height * (posn-1))/nplt;
 
   /* Plot box rectangle */
   Set_Rectangle(
 	  &plot_rect,
 	  layout_width+4, plot_posn+2,
-	  freqplots_pixmap_width-8 - 2*layout_width,
+	  freqplots_width-8 - 2*layout_width,
 	  plot_height-8 - 2*layout_height );
 
   /*** Draw horizontal (freq) scale ***/
   Plot_Horizontal_Scale(
+	  cr,
 	  YELLOW,
 	  layout_width+2,
 	  plot_posn+plot_height-2 - layout_height,
@@ -1124,6 +713,7 @@ Plot_Graph2(
 
   /* Draw left scale */
   Plot_Vertical_Scale(
+	  cr,
 	  MAGENTA,
 	  2, plot_posn+2,
 	  plot_rect.height,
@@ -1131,16 +721,18 @@ Plot_Graph2(
 
   /* Draw right scale */
   Plot_Vertical_Scale(
+	  cr,
 	  CYAN,
-	  freqplots_pixmap_width-2 - layout_width, plot_posn+2,
+	  freqplots_width-2 - layout_width, plot_posn+2,
 	  plot_rect.height,
 	  max_fb, min_fb, nval_ab );
 
   /* Draw plotting frame */
-  Draw_Plotting_Frame( titles, &plot_rect, nval_ab, nval_fscale );
+  Draw_Plotting_Frame( cr, titles, &plot_rect, nval_ab, nval_fscale );
 
   /* Draw graph */
   Draw_Graph(
+	  cr,
 	  MAGENTA,
 	  &plot_rect, fa, fc,
 	  max_fa, min_fa,
@@ -1149,6 +741,7 @@ Plot_Graph2(
 
   /* Draw graph */
   Draw_Graph(
+	  cr,
 	  CYAN, &plot_rect,
 	  fb, fc,
 	  max_fb, min_fb,
@@ -1161,10 +754,11 @@ Plot_Graph2(
 
 /* Plot_Graph()
  *
- * Plots graph of a functions against a variable
+ * Plots graph of a function against a variable
  */
-void
+  static void
 Plot_Graph(
+	cairo_t *cr,
 	double *fa, double *fb, int nb,
 	char *titles[], int nplt, int posn )
 {
@@ -1189,18 +783,19 @@ Plot_Graph(
 
   /* Available height for each graph.
    * (np=number of graphs to be plotted) */
-  plot_height = freqplots_pixmap_height/nplt;
-  plot_posn   = (freqplots_pixmap_height * (posn-1))/nplt;
+  plot_height = freqplots_height/nplt;
+  plot_posn   = (freqplots_height * (posn-1))/nplt;
 
   /* Plot box rectangle */
   Set_Rectangle(
 	  &plot_rect,
 	  layout_width + 4, plot_posn+2,
-	  freqplots_pixmap_width-8 - 2*layout_width,
+	  freqplots_width-8 - 2*layout_width,
 	  plot_height-8 - 2*layout_height );
 
   /*** Draw horizontal (freq) scale ***/
   Plot_Horizontal_Scale(
+	  cr,
 	  YELLOW,
 	  layout_width+2,
 	  plot_posn+plot_height-2 - layout_height,
@@ -1224,16 +819,18 @@ Plot_Graph(
 
   /* Draw left scale */
   Plot_Vertical_Scale(
+	  cr,
 	  MAGENTA,
 	  2, plot_posn+2,
 	  plot_rect.height,
 	  max_fa, min_fa, nval_fa );
 
   /* Draw plotting frame */
-  Draw_Plotting_Frame( titles, &plot_rect, nval_fa, nval_fscale );
+  Draw_Plotting_Frame( cr, titles, &plot_rect, nval_fa, nval_fscale );
 
   /* Draw graph */
   Draw_Graph(
+	  cr,
 	  MAGENTA,
 	  &plot_rect, fa, fb,
 	  max_fa, min_fa,
@@ -1244,22 +841,364 @@ Plot_Graph(
 
 /*-----------------------------------------------------------------------*/
 
+/* Plot_Frequency_Data()
+ *
+ * Plots a graph of frequency-dependent parameters
+ * (gain, vswr, imoedance etc) against frequency
+ */
+  void
+Plot_Frequency_Data( cairo_t *cr )
+{
+  /* Abort plotting if main window is to be closed
+   * or when plots drawing area not available */
+  if(
+	  isFlagSet(MAIN_QUIT) ||
+	  isFlagClear(PLOT_ENABLED) ||
+	  isFlagClear(ENABLE_EXCITN) )
+	return;
+
+  /* Titles for plots */
+  char *titles[3];
+
+  int
+	idx,
+	posn,  /* Position num of plot in drawingarea */
+	fstep; /* Freq step number */
+
+  static double
+	*gmax     = NULL, /* Max gain buffer */
+	*vgain    = NULL, /* Viewer direction gain buffer */
+	*netgain  = NULL, /* Viewer direction net gain buffer */
+	*gdir_tht = NULL, /* Direction in theta of gain */
+	*gdir_phi = NULL, /* Direction in phi of gain */
+	*fbratio  = NULL; /* Front to back ratio */
+
+  /* Used to calculate net gain */
+  double Zr, Zo, Zi;
+
+
+  /* Clear drawingarea */
+  cairo_set_source_rgb( cr, BLACK );
+  cairo_rectangle(
+	  cr, 0.0, 0.0,
+	  (double)freqplots_width,
+	  (double)freqplots_height );
+  cairo_fill( cr );
+
+  /* Abort if plotting is not possible */
+  if( (calc_data.fstep < 1)				||
+	  isFlagClear(FREQLOOP_READY)		||
+	  (isFlagClear(FREQ_LOOP_RUNNING)	&&
+	   isFlagClear(FREQ_LOOP_DONE))		||
+	  (isFlagClear(PLOT_GMAX)			&&
+	   isFlagClear(PLOT_GVIEWER)		&&
+	   isFlagClear(PLOT_VSWR)			&&
+	   isFlagClear(PLOT_ZREAL_ZIMAG)	&&
+	   isFlagClear(PLOT_ZMAG_ZPHASE)) )
+  {
+	return;
+  }
+
+  /* Fit frequency range to scale */
+  min_fscale  = (double)save.freq[0];
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+	max_fscale = (double)save.freq[calc_data.fstep];
+  else
+	max_fscale = (double)save.freq[calc_data.lastf];
+  nval_fscale = freqplots_width / 75;
+  Fit_to_Scale( &max_fscale, &min_fscale, &nval_fscale );
+
+  /* Graph position */
+  posn = 0;
+
+  /* Limit freq stepping to last freq step */
+  fstep = calc_data.lastf + 1;
+
+  /* Plot max gain vs frequency, if possible */
+  if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) )
+  {
+	int nth, nph, pol;
+	gboolean no_fbr;
+
+	/* Allocate max gmax and directions */
+	size_t mreq = (size_t)fstep * sizeof(double);
+	mem_realloc( (void **)&gmax,     mreq, "in plot_freqdata.c" );
+	mem_realloc( (void **)&gdir_tht, mreq, "in plot_freqdata.c" );
+	mem_realloc( (void **)&gdir_phi, mreq, "in plot_freqdata.c" );
+	mem_realloc( (void **)&fbratio,  mreq, "in plot_freqdata.c" );
+
+	if( isFlagSet(PLOT_NETGAIN) )
+	  mem_realloc( (void **)&netgain, mreq, "in plot_freqdata.c" );
+
+	/* Find max gain and direction, F/B ratio */
+	no_fbr = FALSE;
+
+	/* Polarization type and impedance */
+	pol = calc_data.pol_type;
+	Zo = calc_data.zo;
+
+	/* When freq loop is done, calcs are done for all freq steps */
+	for( idx = 0; idx < fstep; idx++ )
+	{
+	  double fbdir;
+	  int fbidx, mgidx;
+
+	  /* Index to gtot buffer where max gain
+	   * occurs for given polarization type */
+	  mgidx = rad_pattern[idx].max_gain_idx[pol];
+
+	  /* Max gain for given polarization type */
+	  gmax[idx] =
+		rad_pattern[idx].gtot[mgidx] + Polarization_Factor(pol, idx, mgidx);
+
+	  /* Net gain if selected */
+	  if( isFlagSet(PLOT_NETGAIN) )
+	  {
+		Zr = impedance_data.zreal[idx];
+		Zi = impedance_data.zimag[idx];
+		netgain[idx] = gmax[idx] + 10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
+	  }
+
+	  /* Radiation angle/phi where max gain occurs */
+	  gdir_tht[idx] = 90.0 - rad_pattern[idx].max_gain_tht[pol];
+	  gdir_phi[idx] = rad_pattern[idx].max_gain_phi[pol];
+
+	  /* Find F/B ratio if possible or net gain not required */
+	  if( no_fbr || isFlagSet(PLOT_NETGAIN) )
+		continue;
+
+	  /* Find F/B direction in theta */
+	  fbdir = 180.0 - rad_pattern[idx].max_gain_tht[pol];
+	  if( fpat.dth == 0.0 )
+		nth = 0;
+	  else
+		nth = (int)( fbdir/fpat.dth + 0.5 );
+
+	  /* If the antenna is modelled over ground, then use the same
+	   * theta as the max gain direction, relying on phi alone to
+	   * take us to the back. Patch supplied by Rik van Riel AB1KW
+	   */
+	  if( (nth >= fpat.nth) || (nth < 0) )
+	  {
+		fbdir = rad_pattern[idx].max_gain_tht[pol];
+		if( fpat.dth == 0.0 )
+		  nth = 0;
+		else
+		  nth = (int)( fbdir/fpat.dth + 0.5 );
+	  }
+
+	  /* Find F/B direction in phi */
+	  fbdir = gdir_phi[idx] + 180.0;
+	  if( fbdir >= 360.0 ) fbdir -= 360.0;
+	  nph = (int)( fbdir/fpat.dph + 0.5 );
+
+	  /* No F/B calc. possible if no phi step at +180 from max gain */
+	  if( (nph >= fpat.nph) || (nph < 0) )
+	  {
+		no_fbr = TRUE;
+		continue;
+	  }
+
+	  /* Index to gtot buffer for gain in back direction */
+	  fbidx = nth + nph*fpat.nth;
+
+	  /* Front to back ratio */
+	  fbratio[idx]  = pow( 10.0, gmax[idx] / 10.0 );
+	  fbratio[idx] /= pow( 10.0,
+		  (rad_pattern[idx].gtot[fbidx] +
+		   Polarization_Factor(pol, idx, fbidx)) / 10.0 );
+	  fbratio[idx] = 10.0 * log10( fbratio[idx] );
+
+	} /* for( idx = 0; idx < fstep; idx++ ) */
+
+	/*** Plot gain and f/b ratio (if possible) graph(s) */
+	if( no_fbr || isFlagSet(PLOT_NETGAIN) )
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Raw Gain dbi");
+	  if( isFlagSet(PLOT_NETGAIN) )
+	  {
+		titles[1] = _("Max Gain & Net Gain vs Frequency");
+		titles[2] = _("Net Gain dbi");
+		if( fstep > 1 )
+		  Plot_Graph2( cr, gmax, netgain, save.freq, fstep,
+			  titles, calc_data.ngraph, ++posn );
+	  }
+	  else
+	  {
+		titles[1] = _("Max Gain & F/B Ratio vs Frequency");
+		titles[2] = "        ";
+		if( fstep > 1 )
+		  Plot_Graph( cr, gmax, save.freq, fstep,
+			  titles, calc_data.ngraph, ++posn );
+	  }
+	}
+	else
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Raw Gain dbi");
+	  titles[1] = _("Max Gain & F/B Ratio vs Frequency");
+	  titles[2] = _("F/B Ratio db");
+	  if( fstep > 1 )
+		Plot_Graph2( cr, gmax, fbratio, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+
+	/* Plot max gain direction if enabled */
+	if( isFlagSet(PLOT_GAIN_DIR) )
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Rad Angle - deg");
+	  titles[1] = _("Max Gain Direction vs Frequency");
+	  titles[2] = _("Phi - deg");
+	  if( fstep > 1 )
+		Plot_Graph2( cr, gdir_tht, gdir_phi, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+
+  } /* if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) ) */
+
+  /* Plot gain in direction of viewer vs freq, if possible */
+  if( isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Raw Gain dbi");
+	titles[1] = _("Gain in Viewer Direction vs Frequency");
+
+	/* Allocate viewer gain buffer */
+	size_t mreq = (size_t)fstep * sizeof(double);
+	mem_realloc( (void **)&vgain, mreq, "in plot_freqdata.c" );
+
+	/* Calcs are done for all freq steps */
+	for( idx = 0; idx < fstep; idx++ )
+	  vgain[idx] = Viewer_Gain( structure_proj_params, idx );
+
+	/* Plot net gain if selected */
+	if( isFlagSet(PLOT_NETGAIN) )
+	{
+	  mreq = (size_t)fstep * sizeof(double);
+	  mem_realloc( (void **)&netgain, mreq, "in plot_freqdata.c" );
+
+	  Zo = calc_data.zo;
+	  for( idx = 0; idx < fstep; idx++ )
+	  {
+		Zr = impedance_data.zreal[idx];
+		Zi = impedance_data.zimag[idx];
+		netgain[idx] = vgain[idx] +
+		  10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
+	  }
+
+	  /* Plot net gain if selected */
+	  titles[2] = _("Net gain dbi");
+	  if( fstep > 1 )
+		Plot_Graph2( cr, vgain, netgain, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	} /* if( isFlagSet(PLOT_NETGAIN) ) */
+	else
+	{
+	  titles[2] = "        ";
+	  if( fstep > 1 )
+		Plot_Graph( cr, vgain, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+  } /* isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) */
+
+  /* Plot VSWR vs freq */
+  if( isFlagSet(PLOT_VSWR) )
+  {
+	double *vswr = NULL, gamma;
+	double zrpro2, zrmro2, zimag2;
+
+	/* Plotting frame titles */
+	titles[0] = _("VSWR");
+	titles[1] = _("VSWR vs Frequency");
+
+	/* Calculate VSWR */
+	mem_alloc( (void **)&vswr,
+		(size_t)calc_data.nfrq * sizeof(double),
+		"in Plot_Frequency_Data()" );
+	if( vswr == NULL )
+	{
+	  fprintf( stderr, "xnec2c: Plot_Frequency_Data():"
+		  "memory allocation for vswr failed\n" );
+	  stop( _("Plot_Frequency_Data():"
+			"Memory allocation for vswr failed"), ERR_OK );
+	  return;
+	}
+	for(idx = 0; idx < fstep; idx++ )
+	{
+	  zrpro2 = impedance_data.zreal[idx] + calc_data.zo;
+	  zrpro2 *= zrpro2;
+	  zrmro2 = impedance_data.zreal[idx] - calc_data.zo;
+	  zrmro2 *= zrmro2;
+	  zimag2 = impedance_data.zimag[idx] * impedance_data.zimag[idx];
+	  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
+	  vswr[idx] = (1+gamma)/(1-gamma);
+	  if( vswr[idx] > 10.0 ) vswr[idx] = 10.0;
+	}
+
+	titles[2] = "        ";
+	if( fstep > 1 )
+	  Plot_Graph( cr, vswr, save.freq, fstep,
+		  titles, calc_data.ngraph, ++posn );
+
+	free_ptr( (void **)&vswr );
+  } /* if( isFlagSet(PLOT_VSWR) ) */
+
+  /* Plot z-real and z-imag */
+  if( isFlagSet(PLOT_ZREAL_ZIMAG) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Z-real");
+	titles[1] = _("Impedance vs Frequency");
+	titles[2] = _("Z-imag");
+	if( fstep > 1 )
+	  Plot_Graph2( cr,
+		  impedance_data.zreal, impedance_data.zimag, save.freq,
+		  fstep, titles, calc_data.ngraph, ++posn );
+
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  /* Plot z-magn and z-phase */
+  if( isFlagSet(PLOT_ZMAG_ZPHASE) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Z-magn");
+	titles[1] = _("Impedance vs Frequency");
+	titles[2] = _("Z-phase");
+	if( fstep > 1 )
+	  Plot_Graph2( cr, impedance_data.zmagn, impedance_data.zphase,
+		  save.freq, fstep, titles, calc_data.ngraph, ++posn );
+
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  /* Display freq data in entry widgets */
+  Display_Frequency_Data();
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+
+} /* Plot_Frequency_Data() */
+
+/*-----------------------------------------------------------------------*/
+
 /* Plots_Window_Killed()
  *
  * Cleans up after the plots window is closed
  */
   void
-Plots_Window_Killed(void)
+Plots_Window_Killed( void )
 {
   if( isFlagSet(PLOT_ENABLED) )
   {
 	ClearFlag( PLOT_FLAGS );
 	freqplots_drawingarea = NULL;
 	freqplots_window = NULL;
+	g_object_unref( freqplots_window_builder );
+	freqplots_window_builder = NULL;
 
-	gtk_check_menu_item_set_active(
-		GTK_CHECK_MENU_ITEM(lookup_widget(
-			main_window, "main_freqplots")), FALSE );
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  Builder_Get_Object(main_window_builder, "main_freqplots")), FALSE );
   }
 
 } /* Plots_Window_Killed() */
@@ -1303,7 +1242,9 @@ Set_Frequency_On_Click( GdkEventButton *event )
 
 	case 2: /* Disable drawing of freq line */
 	  ClearFlag( PLOT_FREQ_LINE );
-	  Plot_Frequency_Data();
+	  /* Wait for GTK to complete its tasks */
+	  gtk_widget_queue_draw( freqplots_drawingarea );
+	  while( g_main_context_iteration(NULL, FALSE) );
 	  return;
 
 	case 3: /* Calculate frequency corresponding to mouse position in plot */
diff --git a/src/plot_freqdata.h b/src/plot_freqdata.h
index 2954772..4d2f434 100644
--- a/src/plot_freqdata.h
+++ b/src/plot_freqdata.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	PLOT_FREQDATA_H		1
 
 #include "common.h"
-#include "support.h"
 
 /* For plotting graphs */
 #define	LEFT	1
diff --git a/src/radiation.c b/src/radiation.c
index a9d2541..441fd30 100644
--- a/src/radiation.c
+++ b/src/radiation.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -45,11 +43,56 @@
 #include "shared.h"
 
 /* Radiation pattern data */
+
+/*-----------------------------------------------------------------------*/
+
+/* calculates the xyz components of the electric */
+/* field due to surface currents */
+static void
+fflds( double rox, double roy, double roz,
+	complex double *scur, complex double *ex,
+	complex double *ey, complex double *ez )
+{
+  double *xs, *ys, *zs, *s;
+  int j, i, k;
+  double arg;
+  complex double ct;
+
+  xs = data.px;
+  ys = data.py;
+  zs = data.pz;
+  s = data.pbi;
+
+  *ex=CPLX_00;
+  *ey=CPLX_00;
+  *ez=CPLX_00;
+
+  i= -1;
+  for( j = 0; j < data.m; j++ )
+  {
+	i++;
+	arg= M_2PI*( rox* xs[i]+ roy* ys[i]+ roz* zs[i]);
+	ct= cmplx( cos( arg)* s[i], sin( arg)* s[i]);
+	k=3*j;
+	*ex += scur[k  ]* ct;
+	*ey += scur[k+1]* ct;
+	*ez += scur[k+2]* ct;
+  }
+
+  ct= rox* *ex+ roy* *ey+ roz* *ez;
+  *ex= CONST4*( ct* rox- *ex);
+  *ey= CONST4*( ct* roy- *ey);
+  *ez= CONST4*( ct* roz- *ez);
+
+  return;
+}
+
 /*-----------------------------------------------------------------------*/
 
 /* ffld calculates the far zone radiated electric fields, */
 /* the factor exp(j*k*r)/(r/lamda) not included */
-void ffld( double thet, double phi,
+static void
+ffld( double thet, double phi,
 	complex double *eth, complex double *eph )
 {
   int k, i, ip, jump;
@@ -108,7 +151,7 @@ void ffld( double thet, double phi,
 			zrsin= csqrt(1.0- gnd.zrati2* gnd.zrati2* thz* thz);
 			rrv2=-( roz- gnd.zrati2* zrsin)/( roz+ gnd.zrati2* zrsin);
 			rrh2=( gnd.zrati2* roz- zrsin)/( gnd.zrati2* roz+ zrsin);
-			darg= -TWOPI*2.0* gnd.ch* roz;
+			darg= -M_2PI*2.0* gnd.ch* roz;
 		  }
 		} /* if( gnd.ifar > 1) */
 
@@ -127,7 +170,7 @@ void ffld( double thet, double phi,
 	  for( i = 0; i < data.n; i++ )
 	  {
 		omega=-( rox* data.cab[i] +	roy* data.sab[i]+ roz* data.salp[i]);
-		el= PI* data.si[i];
+		el= M_PI* data.si[i];
 		sill= omega* el;
 		top= el+ sill;
 		bot= el- sill;
@@ -151,7 +194,7 @@ void ffld( double thet, double phi,
 		c= el*( boo+ too);
 		rr= a* crnt.air[i]+ b* crnt.bii[i]+ c* crnt.cir[i];
 		ri= a* crnt.aii[i]- b* crnt.bir[i]+ c* crnt.cii[i];
-		arg= TWOPI*( data.x[i]* rox+ data.y[i]* roy+ data.z[i]* roz);
+		arg= M_2PI*( data.x[i]* rox+ data.y[i]* roy+ data.z[i]* roz);
 
 		if( (k != 1) || (gnd.ifar < 2) )
 		{
@@ -342,7 +385,7 @@ void ffld( double thet, double phi,
   ex = ex + cix * CONST3;
   ey = ey + ciy * CONST3;
   ez = ez + ciz * CONST3;
-  
+
   *eth = ex * thx + ey * thy + ez * thz;
   *eph = ex * phx + ey * phy;
 
@@ -351,50 +394,9 @@ void ffld( double thet, double phi,
 
 /*-----------------------------------------------------------------------*/
 
-/* calculates the xyz components of the electric */
-/* field due to surface currents */
-void fflds( double rox, double roy, double roz,
-	complex double *scur, complex double *ex,
-	complex double *ey, complex double *ez )
-{
-  double *xs, *ys, *zs, *s;
-  int j, i, k;
-  double arg;
-  complex double ct;
-
-  xs = data.px;
-  ys = data.py;
-  zs = data.pz;
-  s = data.pbi;
-
-  *ex=CPLX_00;
-  *ey=CPLX_00;
-  *ez=CPLX_00;
-
-  i= -1;
-  for( j = 0; j < data.m; j++ )
-  {
-	i++;
-	arg= TWOPI*( rox* xs[i]+ roy* ys[i]+ roz* zs[i]);
-	ct= cmplx( cos( arg)* s[i], sin( arg)* s[i]);
-	k=3*j;
-	*ex += scur[k  ]* ct;
-	*ey += scur[k+1]* ct;
-	*ez += scur[k+2]* ct;
-  }
-
-  ct= rox* *ex+ roy* *ey+ roz* *ez;
-  *ex= CONST4*( ct* rox- *ex);
-  *ey= CONST4*( ct* roy- *ey);
-  *ez= CONST4*( ct* roz- *ez);
-
-  return;
-}
-
-/*-----------------------------------------------------------------------*/
-
 /* gfld computes the radiated field including ground wave. */
-void gfld( double rho, double phi, double rz,
+static void
+gfld( double rho, double phi, double rz,
 	complex double *eth, complex double *epi,
 	complex double *erd, complex double ux, int ksymp )
 {
@@ -415,10 +417,10 @@ void gfld( double rho, double phi, double rz,
 	if( rz >= 1.0e-20)
 	  thet= atan( rho/ rz);
 	else
-	  thet= PI*.5;
+	  thet= M_PI*.5;
 
 	ffld( thet, phi, eth, epi);
-	arg= -TWOPI* r;
+	arg= -M_2PI* r;
 	exa= cmplx( cos( arg), sin( arg))/ r;
 	*eth= *eth* exa;
 	*epi= *epi* exa;
@@ -474,7 +476,7 @@ void gfld( double rho, double phi, double rz,
 	  sph= rhy;
 	}
 
-	el= PI* data.si[i];
+	el= M_PI* data.si[i];
 	rfl=-1.0;
 
 	/* integration of (current)*(phase factor)
@@ -514,9 +516,9 @@ void gfld( double rho, double phi, double rz,
 		b* crnt.bii[i]+ c* crnt.cir[i];
 	  ri= a* crnt.aii[i] -
 		b* crnt.bir[i]+ c* crnt.cii[i];
-	  arg= TWOPI*( data.x[i] *
+	  arg= M_2PI*( data.x[i] *
 		  rnx+ data.y[i]* rny+ data.z[i]* rnz* rfl);
-	  exa= cmplx( cos( arg), sin( arg))* cmplx( rr, ri)/ TWOPI;
+	  exa= cmplx( cos( arg), sin( arg))* cmplx( rr, ri)/ M_2PI;
 
 	  if( k != 1 )
 	  {
@@ -546,7 +548,7 @@ void gfld( double rho, double phi, double rz,
 
   } /* for( i = 0; i < n; i++ ) */
 
-  arg= -TWOPI* r;
+  arg= -M_2PI* r;
   exa= cmplx( cos( arg), sin( arg));
   cix= cix* exa;
   ciy= ciy* exa;
@@ -567,7 +569,8 @@ void gfld( double rho, double phi, double rz,
 /*-----------------------------------------------------------------------*/
 
 /* compute radiation pattern, gain, normalized gain */
-void rdpat(void)
+void
+rdpat( void )
 {
   int kth, kph, isens;
   double  prad, gcon, gcop;
@@ -585,33 +588,31 @@ void rdpat(void)
   {
 	gnd.cl= fpat.clt/ data.wlam;
 	gnd.ch= fpat.cht/ data.wlam;
-	gnd.zrati2= csqrt(1.0/ cmplx(
-		  fpat.epsr2,- fpat.sig2* data.wlam*59.96));
+	gnd.zrati2= csqrt(1.0/ cmplx(fpat.epsr2,- fpat.sig2* data.wlam*59.96));
   }
 
   /* Calculate radiation pattern data */
   /*** For applied voltage excitation ***/
   if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) )
   {
-	gcop= data.wlam* data.wlam* 2.0* PI/(376.73* fpat.pinr);
+	gcop= data.wlam* data.wlam* 2.0* M_PI/(376.73* fpat.pinr);
 	prad= fpat.pinr- fpat.ploss- fpat.pnlr;
 	gcon= gcop;
 	if( fpat.ipd != 0)
 	  gcon *= fpat.pinr/ prad;
   }
-  /*** For elementary current source ***/
-  else if( fpat.ixtyp == 4)
+  else if( fpat.ixtyp == 4) /*** For elementary current source ***/
   {
 	fpat.pinr=394.510* calc_data.xpr6*
 	  calc_data.xpr6* data.wlam* data.wlam;
-	gcop= data.wlam* data.wlam*2.0* PI/(376.73* fpat.pinr);
+	gcop= data.wlam* data.wlam*2.0* M_PI/(376.73* fpat.pinr);
 	prad= fpat.pinr- fpat.ploss- fpat.pnlr;
 	gcon= gcop;
 	if( fpat.ipd != 0)
 	  gcon= gcon* fpat.pinr/ prad;
   }
+  else gcon=4.0* M_PI/(1.0+ calc_data.xpr6* calc_data.xpr6);
   /*** Incident field source ***/
-  else gcon=4.0* PI/(1.0+ calc_data.xpr6* calc_data.xpr6);
 
   phi  = fpat.phis - fpat.dph;
 
@@ -648,7 +649,7 @@ void rdpat(void)
 		  gtk_widget_destroy( rdpattern_window );
 		fprintf( stderr, "xnec2c: rdpat(): Theta > 90 deg with ground specified\n"
 			"Please check RP card data and correct\n" );
-		stop( _("rdpat(): Theta > 90 deg with ground specified\n"\
+		stop( _("rdpat(): Theta > 90 deg with ground specified\n"
 			  "Please check RP card data and correct"), ERR_STOP );
 	  }
 
diff --git a/src/radiation.h b/src/radiation.h
index c077312..84b92f0 100644
--- a/src/radiation.h
+++ b/src/radiation.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	RADIATION_H		1
 
 #include "common.h"
-#include "support.h"
 
 #define	CONST3	(0.0-I*29.97922085)
 
diff --git a/src/shared.c b/src/shared.c
index 2915d02..e46ad64 100644
--- a/src/shared.c
+++ b/src/shared.c
@@ -1,5 +1,17 @@
 /*
- * Shared global variables for nec2c.c
+ *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #include "shared.h"
@@ -69,9 +81,56 @@ GtkWidget
   *nec2_edit_window = NULL;
 
 /* Drawing area widgets */
-GtkWidget *structure_drawingarea = NULL;
-GtkWidget *freqplots_drawingarea = NULL;
-GtkWidget *rdpattern_drawingarea = NULL;
+GtkWidget
+  *structure_drawingarea = NULL,
+  *freqplots_drawingarea = NULL,
+  *rdpattern_drawingarea = NULL;
+
+GtkWidget *saveas_drawingarea = NULL;
+
+/* Sizes of above */
+int
+  structure_width,
+  structure_height,
+  freqplots_width,
+  freqplots_height,
+  rdpattern_width,
+  rdpattern_height;
+
+GtkBuilder
+  *main_window_builder = NULL,
+  *freqplots_window_builder = NULL,
+  *rdpattern_window_builder = NULL,
+  *animate_dialog_builder = NULL,
+  *excitation_editor_builder = NULL,
+  *radiation_editor_builder = NULL,
+  *quit_dialog_builder = NULL,
+  *frequency_editor_builder = NULL,
+  *ground_editor_builder = NULL,
+  *loading_editor_builder = NULL,
+  *ground2_editor_builder = NULL,
+  *network_editor_builder = NULL,
+  *txline_editor_builder = NULL,
+  *nearfield_editor_builder = NULL,
+  *kernel_editor_builder = NULL,
+  *intrange_editor_builder = NULL,
+  *execute_editor_builder = NULL,
+  *wire_editor_builder = NULL,
+  *arc_editor_builder = NULL,
+  *helix_editor_builder = NULL,
+  *patch_editor_builder = NULL,
+  *reflect_editor_builder = NULL,
+  *scale_editor_builder = NULL,
+  *cylinder_editor_builder = NULL,
+  *transform_editor_builder = NULL,
+  *gend_editor_builder = NULL,
+  *nec2_editor_builder = NULL;
+
+/* xnec2c's glade file */
+char xnec2c_glade[128];
+
+/* xnec2c's NEC2 files folder */
+char xnec2c_files[128];
 
 /* Motion event handler id */
 gulong rdpattern_motion_handler;
@@ -104,18 +163,6 @@ GtkWidget *kill_window = NULL;
 /* Animation timeout callback tag */
 guint anim_tag = 0;
 
-/* Pixmap for drawing structures */
-GdkPixmap *structure_pixmap = NULL;
-int structure_pixmap_width, structure_pixmap_height;
-
-/* Pixmap for drawing plots */
-GdkPixmap *freqplots_pixmap = NULL;
-int freqplots_pixmap_width, freqplots_pixmap_height;
-
-/* Pixmap for drawing radiation patterns */
-GdkPixmap *rdpattern_pixmap = NULL;
-int rdpattern_pixmap_width, rdpattern_pixmap_height;
-
 /* Frequency loop idle function tag */
 guint floop_tag = 0;
 
@@ -126,10 +173,10 @@ rad_pattern_t *rad_pattern = NULL;
 near_field_t near_field;
 
 /* Segments for drawing structure */
-GdkSegment *structure_segs = NULL;
+Segment_t *structure_segs = NULL;
 
 /* Global tag number for geometry editors */
-gint gbl_tag_num = 0;
+gint tag_num = 0;
 
 GtkWidget *error_dialog = NULL;
 
diff --git a/src/shared.h b/src/shared.h
index 2b689e5..381ff7b 100644
--- a/src/shared.h
+++ b/src/shared.h
@@ -1,3 +1,19 @@
+/*
+ *  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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
 #ifndef SHARED_H
 #define SHARED_H	1
 
@@ -8,30 +24,30 @@
 
 /* Editor windows */
 extern GtkWidget
-  *wire_editor,	/* Wire designer window  */
-  *arc_editor,	/* Arc designer window   */
-  *helix_editor, /* Helix designer window */
+  *wire_editor,		/* Wire designer window  */
+  *arc_editor,		/* Arc designer window   */
+  *helix_editor,	/* Helix designer window */
   *patch_editor,	/* Patch designer window */
   *reflect_editor,	/* Reflect design window */
   *scale_editor,	/* Scale designer window */
   *cylinder_editor,	/* Cylinder designer window  */
-  *transform_editor, /* Transform designer window */
-  *gend_editor;	/* Geom End designer window  */
+  *transform_editor,/* Transform designer window */
+  *gend_editor;		/* Geom End designer window  */
 
 /* Command windows */
 extern GtkWidget
-  *excitation_command, /* Ecitation command editor */
-  *frequency_command, /* Frequency command editor */
-  *ground_command, /* Ground command editor (GN) */
-  *ground2_command, /* Ground command editor (GD) */
-  *loading_command, /* Loading command editor 	*/
-  *network_command, /* Network command editor	*/
-  *txline_command, /* Tran Line command editor */
-  *radiation_command, /* Rad Pattern command editor */
-  *nearfield_command, /* Near Fields command editor */
-  *kernel_command, /* Thin-wire Kernel command editor  */
-  *intrange_command, /* Interaction Range command editor */
-  *execute_command	 ; /* Execute (EX card) command editor */
+  *excitation_command,	/* Ecitation command editor */
+  *frequency_command,	/* Frequency command editor */
+  *ground_command,		/* Ground command editor (GN) */
+  *ground2_command,		/* Ground command editor (GD) */
+  *loading_command,		/* Loading command editor 	*/
+  *network_command,		/* Network command editor	*/
+  *txline_command,		/* Tran Line command editor */
+  *radiation_command,	/* Rad Pattern command editor */
+  *nearfield_command,	/* Near Fields command editor */
+  *kernel_command,		/* Thin-wire Kernel command editor  */
+  *intrange_command,	/* Interaction Range command editor */
+  *execute_command;		/* Execute (EX card) command editor */
 
 /* Frequency step entry */
 extern GtkEntry *rdpattern_fstep_entry ;
@@ -83,12 +99,59 @@ extern GtkWidget
   *main_window,
   *freqplots_window,
   *rdpattern_window,
-  *nec2_edit_window ;
+  *nec2_edit_window;
+
+extern GtkBuilder
+  *main_window_builder,
+  *freqplots_window_builder,
+  *rdpattern_window_builder,
+  *animate_dialog_builder,
+  *quit_dialog_builder,
+  *excitation_editor_builder,
+  *radiation_editor_builder,
+  *frequency_editor_builder,
+  *ground2_editor_builder,
+  *ground_editor_builder,
+  *loading_editor_builder,
+  *network_editor_builder,
+  *txline_editor_builder,
+  *nearfield_editor_builder,
+  *kernel_editor_builder,
+  *intrange_editor_builder,
+  *execute_editor_builder,
+  *wire_editor_builder,
+  *arc_editor_builder,
+  *helix_editor_builder,
+  *patch_editor_builder,
+  *reflect_editor_builder,
+  *scale_editor_builder,
+  *cylinder_editor_builder,
+  *transform_editor_builder,
+  *gend_editor_builder,
+  *nec2_editor_builder;
+
+/* xnec2c's glade file */
+extern char xnec2c_glade[128];
+
+/* xnec2c's NEC2 files folder */
+extern char xnec2c_files[128];
 
 /* Drawing area widgets */
-extern GtkWidget *structure_drawingarea ;
-extern GtkWidget *freqplots_drawingarea ;
-extern GtkWidget *rdpattern_drawingarea ;
+extern GtkWidget
+  *structure_drawingarea,
+  *freqplots_drawingarea,
+  *rdpattern_drawingarea;
+
+extern GtkWidget *saveas_drawingarea;
+
+/* Sizes of above */
+extern int
+  structure_width,
+  structure_height,
+  freqplots_width,
+  freqplots_height,
+  rdpattern_width,
+  rdpattern_height;
 
 /* Motion event handler id */
 extern gulong rdpattern_motion_handler;
@@ -103,18 +166,6 @@ extern GtkWidget *kill_window ;
 /* Animation timeout callback tag */
 extern guint anim_tag;
 
-/* Pixmap for drawing structures */
-extern GdkPixmap *structure_pixmap ;
-extern int structure_pixmap_width, structure_pixmap_height;
-
-/* Pixmap for drawing plots */
-extern GdkPixmap *freqplots_pixmap ;
-extern int freqplots_pixmap_width, freqplots_pixmap_height;
-
-/* Pixmap for drawing radiation patterns */
-extern GdkPixmap *rdpattern_pixmap ;
-extern int rdpattern_pixmap_width, rdpattern_pixmap_height;
-
 /* Frequency loop idle function tag */
 extern guint floop_tag;
 
@@ -125,10 +176,10 @@ extern rad_pattern_t *rad_pattern ;
 extern near_field_t near_field;
 
 /* Segments for drawing structure */
-extern GdkSegment *structure_segs ;
+extern Segment_t *structure_segs ;
 
 /* Global tag number for geometry editors */
-extern gint gbl_tag_num;
+extern gint tag_num;
 
 extern GtkWidget *error_dialog ;
 
@@ -205,6 +256,9 @@ extern vsorc_t vsorc;
 /* common  /zload/ */
 extern zload_t zload;
 
+/* Segments for drawing structure */
+extern Segment_t *structure_segs;
+
 #define MOTION_EVENTS_COUNT 8
 
 /*------------------------------------------------------------------------*/
diff --git a/src/somnec.c b/src/somnec.c
index daf90d5..a218650 100644
--- a/src/somnec.c
+++ b/src/somnec.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -48,191 +46,12 @@ static complex double a, b;
 
 /*-----------------------------------------------------------------------*/
 
-/* This is the "main" of somnec */
-void somnec( double epr, double sig, double fmhz )
+/* compute integration parameter xlam=lambda from parameter t. */
+  static void
+lambda( double t, complex double *xlam, complex double *dxlam )
 {
-  int k, nth, ith, irs, ir, nr;
-  double wlam, dr, dth=0.0, r, rk, thet, tfac1, tfac2;
-  complex double erv, ezv, erh, eph, cl1, cl2, con;
-
-  static gboolean first_call = TRUE;
-
-  if( first_call )
-  {
-	first_call = FALSE;
-
-	/* Allocate some buffers */
-	size_t mreq = sizeof(complex double) * 11 * 10 * 4;
-	mem_alloc( (void **)&ggrid.ar1, mreq, "in somnec.c");
-	mreq = sizeof(complex double) * 17 * 5 * 4;
-	mem_alloc( (void **)&ggrid.ar2, mreq, "in somnec.c");
-	mreq = sizeof(complex double) * 9 * 8 * 4;
-	mem_alloc( (void **)&ggrid.ar3, mreq, "in somnec.c");
-
-	mreq = sizeof(int) * 3;
-	mem_alloc( (void **)&ggrid.nxa, mreq, "in somnec.c");
-	mem_alloc( (void **)&ggrid.nya, mreq, "in somnec.c");
-
-	mreq = sizeof(double) * 3;
-	mem_alloc( (void **)&ggrid.dxa, mreq, "in somnec.c");
-	mem_alloc( (void **)&ggrid.dya, mreq, "in somnec.c");
-	mem_alloc( (void **)&ggrid.xsa, mreq, "in somnec.c");
-	mem_alloc( (void **)&ggrid.ysa, mreq, "in somnec.c");
-
-	/* Initialize ground grid parameters for somnec */
-	ggrid.nxa[0] = 11;
-	ggrid.nxa[1] = 17;
-	ggrid.nxa[2] = 9;
-
-	ggrid.nya[0] = 10;
-	ggrid.nya[1] = 5;
-	ggrid.nya[2] = 8;
-
-	ggrid.dxa[0] = .02;
-	ggrid.dxa[1] = .05;
-	ggrid.dxa[2] = .1;
-
-	ggrid.dya[0] = .1745329252;
-	ggrid.dya[1] = .0872664626;
-	ggrid.dya[2] = .1745329252;
-
-	ggrid.xsa[0] = 0.0;
-	ggrid.xsa[1] = .2;
-	ggrid.xsa[2] = .2;
-
-	ggrid.ysa[0] = 0.0;
-	ggrid.ysa[1] = 0.0;
-	ggrid.ysa[2] = .3490658504;
-
-  } /* if( first_call ) */
-
-  if(sig >= 0.0)
-  {
-	wlam=CVEL/fmhz;
-	ggrid.epscf=cmplx(epr,-sig*wlam*59.96);
-  }
-  else ggrid.epscf=cmplx(epr,sig);
-
-  ck2=TWOPI;
-  ck2sq=ck2*ck2;
-
-  /* sommerfeld integral evaluation uses exp(-jwt),
-   * nec uses exp(+jwt), hence need conjg(ggrid.epscf).
-   * conjugate of fields occurs in subroutine evlua. */
-
-  ck1sq=ck2sq*conj(ggrid.epscf);
-  ck1=csqrt(ck1sq);
-  ck1r=creal(ck1);
-  tkmag=100.0*cabs(ck1);
-  tsmag=100.0*creal( ck1*conj(ck1) );
-  cksm=ck2sq/(ck1sq+ck2sq);
-  ct1=.5*(ck1sq-ck2sq);
-  erv=ck1sq*ck1sq;
-  ezv=ck2sq*ck2sq;
-  ct2=.125*(erv-ezv);
-  erv *= ck1sq;
-  ezv *= ck2sq;
-  ct3=.0625*(erv-ezv);
-
-  /* loop over 3 grid regions */
-  for( k = 0; k < 3; k++ )
-  {
-	nr=ggrid.nxa[k];
-	nth=ggrid.nya[k];
-	dr=ggrid.dxa[k];
-	dth=ggrid.dya[k];
-	r=ggrid.xsa[k]-dr;
-	irs=1;
-	if(k == 0)
-	{
-	  r=ggrid.xsa[k];
-	  irs=2;
-	}
-
-	/*  loop over r.  (r=sqrt(rho**2 + (z+h)**2)) */
-	for( ir = irs-1; ir < nr; ir++ )
-	{
-	  r += dr;
-	  thet = ggrid.ysa[k]-dth;
-
-	  /* loop over theta.  (theta=atan((z+h)/rho)) */
-	  for( ith = 0; ith < nth; ith++ )
-	  {
-		thet += dth;
-		rho=r*cos(thet);
-		zph=r*sin(thet);
-		if(rho < 1.0e-7)
-		  rho=1.0e-8;
-		if(zph < 1.0e-7)
-		  zph=0.0;
-
-		evlua( &erv, &ezv, &erh, &eph );
-
-		rk=ck2*r;
-		con=-CONST1*r/cmplx(cos(rk),-sin(rk));
-
-		switch( k )
-		{
-		  case 0:
-			ggrid.ar1[ir+ith*11+  0]=erv*con;
-			ggrid.ar1[ir+ith*11+110]=ezv*con;
-			ggrid.ar1[ir+ith*11+220]=erh*con;
-			ggrid.ar1[ir+ith*11+330]=eph*con;
-			break;
-
-		  case 1:
-			ggrid.ar2[ir+ith*17+  0]=erv*con;
-			ggrid.ar2[ir+ith*17+ 85]=ezv*con;
-			ggrid.ar2[ir+ith*17+170]=erh*con;
-			ggrid.ar2[ir+ith*17+255]=eph*con;
-			break;
-
-		  case 2:
-			ggrid.ar3[ir+ith*9+  0]=erv*con;
-			ggrid.ar3[ir+ith*9+ 72]=ezv*con;
-			ggrid.ar3[ir+ith*9+144]=erh*con;
-			ggrid.ar3[ir+ith*9+216]=eph*con;
-
-		} /* switch( k ) */
-
-	  } /* for( ith = 0; ith < nth; ith++ ) */
-
-	} /* for( ir = irs-1; ir < nr; ir++; ) */
-
-  } /* for( k = 0; k < 3; k++; ) */
-
-  /* fill grid 1 for r equal to zero. */
-  cl2=-CONST4*(ggrid.epscf-1.0)/(ggrid.epscf+1.0);
-  cl1=cl2/(ggrid.epscf+1.0);
-  ezv=ggrid.epscf*cl1;
-  thet=-dth;
-  nth=ggrid.nya[0];
-
-  for( ith = 0; ith < nth; ith++ )
-  {
-	thet += dth;
-	if( (ith+1) != nth )
-	{
-	  tfac2=cos(thet);
-	  tfac1=(1.0-sin(thet))/tfac2;
-	  tfac2=tfac1/tfac2;
-	  erv=ggrid.epscf*cl1*tfac1;
-	  erh=cl1*(tfac2-1.0)+cl2;
-	  eph=cl1*tfac2-cl2;
-	}
-	else
-	{
-	  erv=0.0;
-	  erh=cl2-.5*cl1;
-	  eph=-erh;
-	}
-
-	ggrid.ar1[0+ith*11+  0]=erv;
-	ggrid.ar1[0+ith*11+110]=ezv;
-	ggrid.ar1[0+ith*11+220]=erh;
-	ggrid.ar1[0+ith*11+330]=eph;
-  }
-
+  *dxlam=b-a;
+  *xlam=a+*dxlam*t;
   return;
 }
 
@@ -240,7 +59,8 @@ void somnec( double epr, double sig, double fmhz )
 
 /* bessel evaluates the zero-order bessel function */
 /* and its derivative for complex argument z. */
-void bessel( complex double z,
+  static void
+bessel( complex double z,
 	complex double *j0, complex double *j0p )
 {
   int k, ib;
@@ -350,219 +170,416 @@ void bessel( complex double z,
 
 /*-----------------------------------------------------------------------*/
 
-/* evlua controls the integration contour in the complex */
-/* lambda plane for evaluation of the sommerfeld integrals */
-  void
-evlua( complex double *erv, complex double *ezv,
-	complex double *erh, complex double *eph )
+/* hankel evaluates hankel function of the first kind,   */
+/* order zero, and its derivative for complex argument z */
+  static void
+hankel( complex double z,
+	complex double *h0, complex double *h0p )
 {
-  int i, jump;
-  static double del, slope, rmis;
-  static complex double cp1, cp2, cp3, bk, delta, delta2;
-  static complex double *sum = NULL, *ans = NULL;
+  int k, ib;
+  static int *m = NULL, init = FALSE;
+  static double *a1 = NULL, *a2 = NULL, *a3 = NULL;
+  static double *a4, psi, tst, zms;
+  complex double clogz, j0, j0p, p0z, p1z, q0z, q1z;
+  complex double y0 = CPLX_00, y0p = CPLX_00, zi, zi2, zk;
   static gboolean first_call = TRUE;
 
   if( first_call )
   {
 	first_call = FALSE;
-	size_t mreq = 6 * sizeof(complex double);
-	mem_alloc( (void **)&sum, mreq, "in somnec.c");
-	mem_alloc( (void **)&ans, mreq, "in somnec.c");
+	size_t mreq = 101 * sizeof(int);
+	mem_alloc( (void **)&m, mreq, "in somnec.c");
+	mreq = 25 * sizeof(double);
+	mem_alloc( (void **)&a1, mreq, "in somnec.c");
+	mem_alloc( (void **)&a2, mreq, "in somnec.c");
+	mem_alloc( (void **)&a3, mreq, "in somnec.c");
+	mem_alloc( (void **)&a4, mreq, "in somnec.c");
   }
 
-  del=zph;
-  if( rho > del )
-	del=rho;
-
-  if(zph >= 2.0*rho)
+  /* initialization of constants */
+  if( ! init )
   {
-	/* bessel function form of sommerfeld integrals */
-	jh=0;
-	a=CPLX_00;
-	del=1.0/del;
+	int i;
 
-	if( del > tkmag)
-	{
-	  b=cmplx(0.1*tkmag,-0.1*tkmag);
-	  rom1(6,sum,2);
-	  a=b;
-	  b=cmplx(del,-del);
-	  rom1 (6,ans,2);
-	  for( i = 0; i < 6; i++ )
-		sum[i] += ans[i];
-	}
-	else
+	psi=-GAMMA;
+	for( k = 1; k <= 25; k++ )
 	{
-	  b=cmplx(del,-del);
-	  rom1(6,sum,2);
+	  i = k-1;
+	  a1[i]=-0.25/(k*k);
+	  a2[i]=1.0/(k+1.0);
+	  psi += 1.0/k;
+	  a3[i]=psi+psi;
+	  a4[i]=(psi+psi+1.0/(k+1.0))/(k+1.0);
 	}
 
-	delta=PTP*del;
-	gshank(b,delta,ans,6,sum,0,b,b);
-	ans[5] *= ck1;
-
-	/* conjugate since nec uses exp(+jwt) */
-	*erv=conj(ck1sq*ans[2]);
-	*ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
-	*erh=conj(ck2sq*(ans[0]+ans[5]));
-	*eph=-conj(ck2sq*(ans[3]+ans[5]));
+	for( i = 1; i <= 101; i++ )
+	{
+	  tst=1.0;
+	  for( k = 0; k < 24; k++ )
+	  {
+		init = k;
+		tst *= -i*a1[k];
+		if(tst*a3[k] < 1.0e-6)
+		  break;
+	  }
+	  m[i-1]=init+1;
+	}
 
-	return;
-  } /* if(zph >= 2.0*rho) */
+	init = TRUE;
 
-  /* hankel function form of sommerfeld integrals */
-  jh=1;
-  cp1=cmplx(0.0, 0.4*ck2);
-  cp2=cmplx(0.6*ck2, -0.2*ck2);
-  cp3=cmplx(1.02*ck2,-0.2*ck2);
-  a=cp1;
-  b=cp2;
-  rom1(6,sum,2);
-  a=cp2;
-  b=cp3;
-  rom1(6,ans,2);
+  } /* if( ! init ) */
 
-  for( i = 0; i < 6; i++ )
-	sum[i]=-(sum[i]+ans[i]);
+  zms=creal( z*conj(z) );
+  if(zms == 0.0)
+  {
+	fprintf( stderr, "xnec2c: hankel(): Hankel not valid for z = 0\n" );
+	stop( _("hankel(): Hankel not valid for z = 0"), ERR_STOP );
+  }
 
-  /* path from imaginary axis to -infinity */
-  if(zph > .001*rho)
-	slope=rho/zph;
-  else
-	slope=1000.0;
+  ib=0;
+  if(zms <= 16.81)
+  {
+	int iz, miz;
 
-  del=PTP/del;
-  delta=cmplx(-1.0,slope)*del/sqrt(1.0+slope*slope);
-  delta2=-conj(delta);
-  gshank(cp1,delta,ans,6,sum,0,bk,bk);
-  rmis=rho*(creal(ck1)-ck2);
+	if(zms > 16.0)
+	  ib=1;
 
-  jump = FALSE;
-  if( (rmis >= 2.0*ck2) && (rho >= 1.0e-10) )
-  {
-	if(zph >= 1.0e-10)
-	{
-	  bk=cmplx(-zph,rho)*(ck1-cp3);
-	  rmis=-creal(bk)/fabs(cimag(bk));
-	  if(rmis > 4.0*rho/zph)
-		jump = TRUE;
-	}
+	/* series expansion */
+	iz=(int)zms;
+	miz=m[iz];
+	j0=CPLX_10;
+	j0p=j0;
+	y0=CPLX_00;
+	y0p=y0;
+	zk=j0;
+	zi=z*z;
 
-	if( ! jump )
+	for( k = 0; k < miz; k++ )
 	{
-	  /* integrate up between branch cuts, then to + infinity */
-	  cp1=ck1-(0.1+I*0.2);
-	  cp2=cp1+0.2;
-	  bk=cmplx(0.0,del);
-	  gshank(cp1,bk,sum,6,ans,0,bk,bk);
-	  a=cp1;
-	  b=cp2;
-	  rom1(6,ans,1);
-	  for( i = 0; i < 6; i++ )
-		ans[i] -= sum[i];
-
-	  gshank(cp3,bk,sum,6,ans,0,bk,bk);
-	  gshank(cp2,delta2,ans,6,sum,0,bk,bk);
+	  zk *= a1[k]*zi;
+	  j0 += zk;
+	  j0p += a2[k]*zk;
+	  y0 += a3[k]*zk;
+	  y0p += a4[k]*zk;
 	}
 
-	jump = TRUE;
-
-  } /* if( (rmis >= 2.0*ck2) || (rho >= 1.0e-10) ) */
-  else jump = FALSE;
-
-  if( ! jump )
-  {
-	/* integrate below branch points, then to + infinity */
-	for( i = 0; i < 6; i++ )
-	  sum[i]=-ans[i];
+	j0p *= -0.5*z;
+	clogz=clog(0.5*z);
+	y0=(2.0*j0*clogz-y0)/M_PI+C2;
+	y0p=(2.0/z+2.0*j0p*clogz+0.5*y0p*z)/M_PI+C1*z;
+	*h0=j0+CPLX_01*y0;
+	*h0p=j0p+CPLX_01*y0p;
 
-	rmis=creal(ck1)*1.01;
-	if( (ck2+1.0) > rmis )
-	  rmis=ck2+1.0;
+	if(ib == 0) return;
 
-	bk=cmplx(rmis,0.99*cimag(ck1));
-	delta=bk-cp3;
-	delta *= del/cabs(delta);
-	gshank(cp3,delta,ans,6,sum,1,bk,delta2);
+	y0=*h0;
+	y0p=*h0p;
+  } /* if(zms <= 16.81) */
 
-  } /* if( ! jump ) */
+  /* asymptotic expansion */
+  zi=1.0/z;
+  zi2=zi*zi;
+  p0z=1.0+(P20*zi2-P10)*zi2;
+  p1z=1.0+(P11-P21*zi2)*zi2;
+  q0z=(Q20*zi2-Q10)*zi;
+  q1z=(Q11-Q21*zi2)*zi;
+  zk=cexp(CPLX_01*(z-POF))*csqrt(zi)*C3;
+  *h0=zk*(p0z+CPLX_01*q0z);
+  *h0p=CPLX_01*zk*(p1z+CPLX_01*q1z);
 
-  ans[5] *= ck1;
+  if(ib == 0) return;
 
-  /* conjugate since nec uses exp(+jwt) */
-  *erv=conj(ck1sq*ans[2]);
-  *ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
-  *erh=conj(ck2sq*(ans[0]+ans[5]));
-  *eph=-conj(ck2sq*(ans[3]+ans[5]));
+  zms=cos((sqrt(zms)-4.0)*31.41592654);
+  *h0=0.5*(y0*(1.0+zms)+ *h0*(1.0-zms));
+  *h0p=0.5*(y0p*(1.0+zms)+ *h0p*(1.0-zms));
 
   return;
 }
 
 /*-----------------------------------------------------------------------*/
 
-/* fbar is sommerfeld attenuation function for numerical distance p */
-  void
-fbar( complex double p, complex double *fbar )
+/* saoa computes the integrand for each of the 6 sommerfeld */
+/* integrals for source and observer above ground */
+  static void
+saoa( double t, complex double *ans)
 {
-  int i, minus;
-  double tms, sms;
-  complex double z, zs, sum, pow, term;
+  double xlr;
+  static complex double xl, dxl, cgam1, cgam2, b0;
+  static complex double b0p, com, dgam, den1, den2;
 
-  z= CPLX_01* csqrt( p);
-  if( cabs( z) <= 3.0)
+  lambda(t, &xl, &dxl);
+  if( jh == 0 )
   {
-	/* series expansion */
-	zs= z* z;
-	sum= z;
-	pow= z;
+	/* bessel function form */
+	bessel(xl*rho, &b0, &b0p);
+	b0  *=2.0;
+	b0p *=2.0;
+	cgam1=csqrt(xl*xl-ck1sq);
+	cgam2=csqrt(xl*xl-ck2sq);
+	if(creal(cgam1) == 0.0)
+	  cgam1=cmplx(0.0,-fabs(cimag(cgam1)));
+	if(creal(cgam2) == 0.0)
+	  cgam2=cmplx(0.0,-fabs(cimag(cgam2)));
+  }
+  else
+  {
+	/* hankel function form */
+	hankel(xl*rho, &b0, &b0p);
+	com=xl-ck1;
+	cgam1=csqrt(xl+ck1)*csqrt(com);
+	if(creal(com) < 0.0 && cimag(com) >= 0.0)
+	  cgam1=-cgam1;
+	com=xl-ck2;
+	cgam2=csqrt(xl+ck2)*csqrt(com);
+	if(creal(com) < 0.0 && cimag(com) >= 0.0)
+	  cgam2=-cgam2;
+  }
 
-	for( i = 1; i <= 100; i++ )
+  xlr=creal( xl*conj(xl) );
+  if(xlr >= tsmag)
+  {
+	double sign;
+	if(cimag(xl) >= 0.0)
 	{
-	  pow= -pow* zs/ (double)i;
-	  term= pow/(2.0* i+1.0);
-	  sum= sum+ term;
-	  tms= creal( term* conj( term));
-	  sms= creal( sum* conj( sum));
-	  if( tms/sms < ACCS)
-		break;
+	  xlr=creal(xl);
+	  if(xlr >= ck2)
+	  {
+		if(xlr <= ck1r)
+		  dgam=cgam2-cgam1;
+		else
+		{
+		  sign=1.0;
+		  dgam=1.0/(xl*xl);
+		  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+		}
+	  }
+	  else
+	  {
+		sign=-1.0;
+		dgam=1.0/(xl*xl);
+		dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+	  } /* if(xlr >= ck2) */
+
+	} /* if(cimag(xl) >= 0.0) */
+	else
+	{
+	  sign=1.0;
+	  dgam=1.0/(xl*xl);
+	  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
 	}
 
-	*fbar=1.0-(1.0- sum* TOSP)* z* cexp( zs)* SP;
+  } /* if(xlr < tsmag) */
+  else dgam=cgam2-cgam1;
 
-  } /* if( cabs( z) <= 3.0) */
+  den2=cksm*dgam/(cgam2*(ck1sq*cgam2+ck2sq*cgam1));
+  den1=1.0/(cgam1+cgam2)-cksm/cgam2;
+  com=dxl*xl*cexp(-cgam2*zph);
+  ans[5]=com*b0*den1/ck1;
+  com *= den2;
 
-  /* asymptotic expansion */
-  if( creal( z) < 0.0)
+  if(rho != 0.0)
   {
-	minus=1;
-	z= -z;
+	b0p=b0p/rho;
+	ans[0]=-com*xl*(b0p+b0*xl);
+	ans[3]=com*xl*b0p;
   }
-  else minus=0;
-
-  zs=0.5/( z* z);
-  sum=CPLX_00;
-  term=CPLX_10;
-
-  for( i = 1; i <= 6; i++ )
+  else
   {
-	term = -term*(2.0*i -1.0)* zs;
-	sum += term;
+	ans[0]=-com*xl*xl*0.5;
+	ans[3]=ans[0];
   }
 
-  if( minus == 1)
-	sum -= 2.0* SP* z* cexp( z* z);
-  *fbar= -sum;
+  ans[1]=com*cgam2*cgam2*b0;
+  ans[2]=-ans[3]*cgam2*rho;
+  ans[4]=com*b0;
 
+  return;
 }
 
 /*-----------------------------------------------------------------------*/
 
-/* gshank integrates the 6 sommerfeld integrals from start to */
-/* infinity (until convergence) in lambda.  at the break point, bk, */
-/* the step increment may be changed from dela to delb.  shank's */
+/* rom1 integrates the 6 sommerfeld integrals from a to b in lambda. */
+/* the method of variable interval width romberg integration is used. */
+  static void
+rom1( int n, complex double *sum, int nx )
+{
+  int jump, lstep, nogo, i, ns, nt;
+  static double z, ze, s, ep, zend, dz=0.0, dzot=0.0, tr, ti;
+  static complex double t00, t11, t02;
+  static complex double *g1 = NULL, *g2 = NULL;
+  static complex double *g3 = NULL, *g4 = NULL;
+  static complex double *g5 = NULL, *t01 = NULL;
+  static complex double *t10 = NULL, *t20 = NULL;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 6 * sizeof(complex double);
+	mem_alloc( (void **)&g1, mreq, "in somnec.c");
+	mem_alloc( (void **)&g2, mreq, "in somnec.c");
+	mem_alloc( (void **)&g3, mreq, "in somnec.c");
+	mem_alloc( (void **)&g4, mreq, "in somnec.c");
+	mem_alloc( (void **)&g5, mreq, "in somnec.c");
+	mem_alloc( (void **)&t01, mreq, "in somnec.c");
+	mem_alloc( (void **)&t10, mreq, "in somnec.c");
+	mem_alloc( (void **)&t20, mreq, "in somnec.c");
+  }
+
+  lstep=0;
+  z=0.0;
+  ze=1.0;
+  s=1.0;
+  ep=s/(1.0e4*NM);
+  zend=ze-ep;
+  for( i = 0; i < n; i++ )
+	sum[i]=CPLX_00;
+  ns=nx;
+  nt=0;
+  saoa(z,g1);
+
+  jump = FALSE;
+  while( TRUE )
+  {
+	if( ! jump )
+	{
+	  dz=s/ns;
+	  if( (z+dz) > ze )
+	  {
+		dz=ze-z;
+		if( dz <= ep ) return;
+	  }
+
+	  dzot=dz*.5;
+	  saoa(z+dzot,g3);
+	  saoa(z+dz,g5);
+
+	} /* if( ! jump ) */
+
+	nogo=FALSE;
+	for( i = 0; i < n; i++ )
+	{
+	  t00=(g1[i]+g5[i])*dzot;
+	  t01[i]=(t00+dz*g3[i])*.5;
+	  t10[i]=(4.0*t01[i]-t00)/3.0;
+
+	  /* test convergence of 3 point romberg result */
+	  test( creal(t01[i]), creal(t10[i]), &tr,
+		  cimag(t01[i]), cimag(t10[i]), &ti, 0.0 );
+	  if( (tr > CRIT) || (ti > CRIT) )
+		nogo = TRUE;
+	}
+
+	if( ! nogo )
+	{
+	  for( i = 0; i < n; i++ )
+		sum[i] += t10[i];
+
+	  nt += 2;
+	  z += dz;
+	  if(z > zend) return;
+
+	  for( i = 0; i < n; i++ )
+		g1[i]=g5[i];
+
+	  if( (nt >= NTS) && (ns > nx) )
+	  {
+		ns=ns/2;
+		nt=1;
+	  }
+
+	  jump = FALSE;
+	  continue;
+
+	} /* if( ! nogo ) */
+
+	saoa(z+dz*.250,g2);
+	saoa(z+dz*.75,g4);
+	nogo=FALSE;
+	for( i = 0; i < n; i++ )
+	{
+	  t02=(t01[i]+dzot*(g2[i]+g4[i]))*0.50;
+	  t11=(4.0*t02-t01[i])/3.0;
+	  t20[i]=(16.0*t11-t10[i])/15.0;
+
+	  /* test convergence of 5 point romberg result */
+	  test( creal(t11), creal(t20[i]), &tr,
+		  cimag(t11), cimag(t20[i]), &ti, 0.0 );
+	  if( (tr > CRIT) || (ti > CRIT) )
+		nogo = TRUE;
+	}
+
+	if( ! nogo )
+	{
+	  for( i = 0; i < n; i++ )
+		sum[i] += t20[i];
+
+	  nt++;
+	  z += dz;
+	  if(z > zend) return;
+
+	  for( i = 0; i < n; i++ )
+		g1[i]=g5[i];
+
+	  if( (nt >= NTS) && (ns > nx) )
+	  {
+		ns=ns/2;
+		nt=1;
+	  }
+
+	  jump = FALSE;
+	  continue;
+
+	} /* if( ! nogo ) */
+
+	nt=0;
+	if(ns < NM)
+	{
+	  ns *= 2;
+	  dz=s/ns;
+	  dzot=dz*0.50;
+
+	  for( i = 0; i < n; i++ )
+	  {
+		g5[i]=g3[i];
+		g3[i]=g2[i];
+	  }
+
+	  jump = TRUE;
+	  continue;
+
+	} /* if(ns < nm) */
+
+	if( ! lstep )
+	{
+	  lstep = TRUE;
+	  lambda( z, &t00, &t11 );
+	}
+
+	for( i = 0; i < n; i++ )
+	  sum[i] += t20[i];
+
+	nt++;
+	z += dz;
+	if(z > zend) return;
+
+	for( i = 0; i < n; i++ )
+	  g1[i]=g5[i];
+
+	jump = FALSE;
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* gshank integrates the 6 sommerfeld integrals from start to */
+/* infinity (until convergence) in lambda.  at the break point, bk, */
+/* the step increment may be changed from dela to delb.  shank's */
 /* algorithm to accelerate convergence of a slowly converging series */
 /* is used */
-  void
+  static void
 gshank( complex double start, complex double dela,
 	complex double *sum, int nans, complex double *seed,
 	int ibk, complex double bk, complex double delb )
@@ -734,415 +751,400 @@ gshank( complex double start, complex double dela,
 
 /*-----------------------------------------------------------------------*/
 
-/* hankel evaluates hankel function of the first kind,   */
-/* order zero, and its derivative for complex argument z */
-  void
-hankel( complex double z,
-	complex double *h0, complex double *h0p )
+/* evlua controls the integration contour in the complex */
+/* lambda plane for evaluation of the sommerfeld integrals */
+  static void
+evlua( complex double *erv, complex double *ezv,
+	complex double *erh, complex double *eph )
 {
-  int k, ib;
-  static int *m = NULL, init = FALSE;
-  static double *a1 = NULL, *a2 = NULL, *a3 = NULL;
-  static double *a4, psi, tst, zms;
-  complex double clogz, j0, j0p, p0z, p1z, q0z, q1z;
-  complex double y0 = CPLX_00, y0p = CPLX_00, zi, zi2, zk;
+  int i, jump;
+  static double del, slope, rmis;
+  static complex double cp1, cp2, cp3, bk, delta, delta2;
+  static complex double *sum = NULL, *ans = NULL;
   static gboolean first_call = TRUE;
 
   if( first_call )
   {
 	first_call = FALSE;
-	size_t mreq = 101 * sizeof(int);
-	mem_alloc( (void **)&m, mreq, "in somnec.c");
-	mreq = 25 * sizeof(double);
-	mem_alloc( (void **)&a1, mreq, "in somnec.c");
-	mem_alloc( (void **)&a2, mreq, "in somnec.c");
-	mem_alloc( (void **)&a3, mreq, "in somnec.c");
-	mem_alloc( (void **)&a4, mreq, "in somnec.c");
+	size_t mreq = 6 * sizeof(complex double);
+	mem_alloc( (void **)&sum, mreq, "in somnec.c");
+	mem_alloc( (void **)&ans, mreq, "in somnec.c");
   }
 
-  /* initialization of constants */
-  if( ! init )
+  del=zph;
+  if( rho > del )
+	del=rho;
+
+  if(zph >= 2.0*rho)
   {
-	int i;
+	/* bessel function form of sommerfeld integrals */
+	jh=0;
+	a=CPLX_00;
+	del=1.0/del;
 
-	psi=-GAMMA;
-	for( k = 1; k <= 25; k++ )
+	if( del > tkmag)
 	{
-	  i = k-1;
-	  a1[i]=-0.25/(k*k);
-	  a2[i]=1.0/(k+1.0);
-	  psi += 1.0/k;
-	  a3[i]=psi+psi;
-	  a4[i]=(psi+psi+1.0/(k+1.0))/(k+1.0);
+	  b=cmplx(0.1*tkmag,-0.1*tkmag);
+	  rom1(6,sum,2);
+	  a=b;
+	  b=cmplx(del,-del);
+	  rom1 (6,ans,2);
+	  for( i = 0; i < 6; i++ )
+		sum[i] += ans[i];
 	}
-
-	for( i = 1; i <= 101; i++ )
+	else
 	{
-	  tst=1.0;
-	  for( k = 0; k < 24; k++ )
-	  {
-		init = k;
-		tst *= -i*a1[k];
-		if(tst*a3[k] < 1.0e-6)
-		  break;
-	  }
-	  m[i-1]=init+1;
+	  b=cmplx(del,-del);
+	  rom1(6,sum,2);
 	}
 
-	init = TRUE;
-
-  } /* if( ! init ) */
+	delta=PTP*del;
+	gshank(b,delta,ans,6,sum,0,b,b);
+	ans[5] *= ck1;
 
-  zms=creal( z*conj(z) );
-  if(zms == 0.0)
-  {
-  fprintf( stderr, "xnec2c: hankel(): Hankel not valid for z = 0\n" );
-	stop( _("hankel(): Hankel not valid for z = 0"), ERR_STOP );
-  }
+	/* conjugate since nec uses exp(+jwt) */
+	*erv=conj(ck1sq*ans[2]);
+	*ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
+	*erh=conj(ck2sq*(ans[0]+ans[5]));
+	*eph=-conj(ck2sq*(ans[3]+ans[5]));
 
-  ib=0;
-  if(zms <= 16.81)
-  {
-	int iz, miz;
+	return;
+  } /* if(zph >= 2.0*rho) */
 
-	if(zms > 16.0)
-	  ib=1;
+  /* hankel function form of sommerfeld integrals */
+  jh=1;
+  cp1=cmplx(0.0, 0.4*ck2);
+  cp2=cmplx(0.6*ck2, -0.2*ck2);
+  cp3=cmplx(1.02*ck2,-0.2*ck2);
+  a=cp1;
+  b=cp2;
+  rom1(6,sum,2);
+  a=cp2;
+  b=cp3;
+  rom1(6,ans,2);
 
-	/* series expansion */
-	iz=(int)zms;
-	miz=m[iz];
-	j0=CPLX_10;
-	j0p=j0;
-	y0=CPLX_00;
-	y0p=y0;
-	zk=j0;
-	zi=z*z;
+  for( i = 0; i < 6; i++ )
+	sum[i]=-(sum[i]+ans[i]);
 
-	for( k = 0; k < miz; k++ )
+  /* path from imaginary axis to -infinity */
+  if(zph > .001*rho)
+	slope=rho/zph;
+  else
+	slope=1000.0;
+
+  del=PTP/del;
+  delta=cmplx(-1.0,slope)*del/sqrt(1.0+slope*slope);
+  delta2=-conj(delta);
+  gshank(cp1,delta,ans,6,sum,0,bk,bk);
+  rmis=rho*(creal(ck1)-ck2);
+
+  jump = FALSE;
+  if( (rmis >= 2.0*ck2) && (rho >= 1.0e-10) )
+  {
+	if(zph >= 1.0e-10)
 	{
-	  zk *= a1[k]*zi;
-	  j0 += zk;
-	  j0p += a2[k]*zk;
-	  y0 += a3[k]*zk;
-	  y0p += a4[k]*zk;
+	  bk=cmplx(-zph,rho)*(ck1-cp3);
+	  rmis=-creal(bk)/fabs(cimag(bk));
+	  if(rmis > 4.0*rho/zph)
+		jump = TRUE;
 	}
 
-	j0p *= -0.5*z;
-	clogz=clog(0.5*z);
-	y0=(2.0*j0*clogz-y0)/PI+C2;
-	y0p=(2.0/z+2.0*j0p*clogz+0.5*y0p*z)/PI+C1*z;
-	*h0=j0+CPLX_01*y0;
-	*h0p=j0p+CPLX_01*y0p;
+	if( ! jump )
+	{
+	  /* integrate up between branch cuts, then to + infinity */
+	  cp1=ck1-(0.1+I*0.2);
+	  cp2=cp1+0.2;
+	  bk=cmplx(0.0,del);
+	  gshank(cp1,bk,sum,6,ans,0,bk,bk);
+	  a=cp1;
+	  b=cp2;
+	  rom1(6,ans,1);
+	  for( i = 0; i < 6; i++ )
+		ans[i] -= sum[i];
 
-	if(ib == 0) return;
+	  gshank(cp3,bk,sum,6,ans,0,bk,bk);
+	  gshank(cp2,delta2,ans,6,sum,0,bk,bk);
+	}
 
-	y0=*h0;
-	y0p=*h0p;
-  } /* if(zms <= 16.81) */
+	jump = TRUE;
 
-  /* asymptotic expansion */
-  zi=1.0/z;
-  zi2=zi*zi;
-  p0z=1.0+(P20*zi2-P10)*zi2;
-  p1z=1.0+(P11-P21*zi2)*zi2;
-  q0z=(Q20*zi2-Q10)*zi;
-  q1z=(Q11-Q21*zi2)*zi;
-  zk=cexp(CPLX_01*(z-POF))*csqrt(zi)*C3;
-  *h0=zk*(p0z+CPLX_01*q0z);
-  *h0p=CPLX_01*zk*(p1z+CPLX_01*q1z);
+  } /* if( (rmis >= 2.0*ck2) || (rho >= 1.0e-10) ) */
+  else jump = FALSE;
 
-  if(ib == 0) return;
+  if( ! jump )
+  {
+	/* integrate below branch points, then to + infinity */
+	for( i = 0; i < 6; i++ )
+	  sum[i]=-ans[i];
 
-  zms=cos((sqrt(zms)-4.0)*31.41592654);
-  *h0=0.5*(y0*(1.0+zms)+ *h0*(1.0-zms));
-  *h0p=0.5*(y0p*(1.0+zms)+ *h0p*(1.0-zms));
+	rmis=creal(ck1)*1.01;
+	if( (ck2+1.0) > rmis )
+	  rmis=ck2+1.0;
 
-  return;
-}
+	bk=cmplx(rmis,0.99*cimag(ck1));
+	delta=bk-cp3;
+	delta *= del/cabs(delta);
+	gshank(cp3,delta,ans,6,sum,1,bk,delta2);
 
-/*-----------------------------------------------------------------------*/
+  } /* if( ! jump ) */
+
+  ans[5] *= ck1;
+
+  /* conjugate since nec uses exp(+jwt) */
+  *erv=conj(ck1sq*ans[2]);
+  *ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
+  *erh=conj(ck2sq*(ans[0]+ans[5]));
+  *eph=-conj(ck2sq*(ans[3]+ans[5]));
 
-/* compute integration parameter xlam=lambda from parameter t. */
-void lambda( double t,
-	complex double *xlam, complex double *dxlam )
-{
-  *dxlam=b-a;
-  *xlam=a+*dxlam*t;
   return;
 }
 
 /*-----------------------------------------------------------------------*/
 
-/* rom1 integrates the 6 sommerfeld integrals from a to b in lambda. */
-/* the method of variable interval width romberg integration is used. */
-void rom1( int n, complex double *sum, int nx )
+/* This is the "main" of somnec */
+  void
+somnec( double epr, double sig, double fmhz )
 {
-  int jump, lstep, nogo, i, ns, nt;
-  static double z, ze, s, ep, zend, dz=0.0, dzot=0.0, tr, ti;
-  static complex double t00, t11, t02;
-  static complex double *g1 = NULL, *g2 = NULL;
-  static complex double *g3 = NULL, *g4 = NULL;
-  static complex double *g5 = NULL, *t01 = NULL;
-  static complex double *t10 = NULL, *t20 = NULL;
+  int k, nth, ith, irs, ir, nr;
+  double wlam, dr, dth=0.0, r, rk, thet, tfac1, tfac2;
+  complex double erv, ezv, erh, eph, cl1, cl2, con;
+
   static gboolean first_call = TRUE;
 
   if( first_call )
   {
 	first_call = FALSE;
-	size_t mreq = 6 * sizeof(complex double);
-	mem_alloc( (void **)&g1, mreq, "in somnec.c");
-	mem_alloc( (void **)&g2, mreq, "in somnec.c");
-	mem_alloc( (void **)&g3, mreq, "in somnec.c");
-	mem_alloc( (void **)&g4, mreq, "in somnec.c");
-	mem_alloc( (void **)&g5, mreq, "in somnec.c");
-	mem_alloc( (void **)&t01, mreq, "in somnec.c");
-	mem_alloc( (void **)&t10, mreq, "in somnec.c");
-	mem_alloc( (void **)&t20, mreq, "in somnec.c");
-  }
 
-  lstep=0;
-  z=0.0;
-  ze=1.0;
-  s=1.0;
-  ep=s/(1.0e4*NM);
-  zend=ze-ep;
-  for( i = 0; i < n; i++ )
-	sum[i]=CPLX_00;
-  ns=nx;
-  nt=0;
-  saoa(z,g1);
+	/* Allocate some buffers */
+	size_t mreq = sizeof(complex double) * 11 * 10 * 4;
+	mem_alloc( (void **)&ggrid.ar1, mreq, "in somnec.c");
+	mreq = sizeof(complex double) * 17 * 5 * 4;
+	mem_alloc( (void **)&ggrid.ar2, mreq, "in somnec.c");
+	mreq = sizeof(complex double) * 9 * 8 * 4;
+	mem_alloc( (void **)&ggrid.ar3, mreq, "in somnec.c");
 
-  jump = FALSE;
-  while( TRUE )
-  {
-	if( ! jump )
-	{
-	  dz=s/ns;
-	  if( (z+dz) > ze )
-	  {
-		dz=ze-z;
-		if( dz <= ep ) return;
-	  }
+	mreq = sizeof(int) * 3;
+	mem_alloc( (void **)&ggrid.nxa, mreq, "in somnec.c");
+	mem_alloc( (void **)&ggrid.nya, mreq, "in somnec.c");
 
-	  dzot=dz*.5;
-	  saoa(z+dzot,g3);
-	  saoa(z+dz,g5);
+	mreq = sizeof(double) * 3;
+	mem_alloc( (void **)&ggrid.dxa, mreq, "in somnec.c");
+	mem_alloc( (void **)&ggrid.dya, mreq, "in somnec.c");
+	mem_alloc( (void **)&ggrid.xsa, mreq, "in somnec.c");
+	mem_alloc( (void **)&ggrid.ysa, mreq, "in somnec.c");
 
-	} /* if( ! jump ) */
+	/* Initialize ground grid parameters for somnec */
+	ggrid.nxa[0] = 11;
+	ggrid.nxa[1] = 17;
+	ggrid.nxa[2] = 9;
 
-	nogo=FALSE;
-	for( i = 0; i < n; i++ )
-	{
-	  t00=(g1[i]+g5[i])*dzot;
-	  t01[i]=(t00+dz*g3[i])*.5;
-	  t10[i]=(4.0*t01[i]-t00)/3.0;
+	ggrid.nya[0] = 10;
+	ggrid.nya[1] = 5;
+	ggrid.nya[2] = 8;
 
-	  /* test convergence of 3 point romberg result */
-	  test( creal(t01[i]), creal(t10[i]), &tr,
-		  cimag(t01[i]), cimag(t10[i]), &ti, 0.0 );
-	  if( (tr > CRIT) || (ti > CRIT) )
-		nogo = TRUE;
-	}
+	ggrid.dxa[0] = .02;
+	ggrid.dxa[1] = .05;
+	ggrid.dxa[2] = .1;
 
-	if( ! nogo )
-	{
-	  for( i = 0; i < n; i++ )
-		sum[i] += t10[i];
+	ggrid.dya[0] = .1745329252;
+	ggrid.dya[1] = .0872664626;
+	ggrid.dya[2] = .1745329252;
 
-	  nt += 2;
-	  z += dz;
-	  if(z > zend) return;
+	ggrid.xsa[0] = 0.0;
+	ggrid.xsa[1] = .2;
+	ggrid.xsa[2] = .2;
 
-	  for( i = 0; i < n; i++ )
-		g1[i]=g5[i];
+	ggrid.ysa[0] = 0.0;
+	ggrid.ysa[1] = 0.0;
+	ggrid.ysa[2] = .3490658504;
 
-	  if( (nt >= NTS) && (ns > nx) )
-	  {
-		ns=ns/2;
-		nt=1;
-	  }
+  } /* if( first_call ) */
 
-	  jump = FALSE;
-	  continue;
+  if(sig >= 0.0)
+  {
+	wlam=CVEL/fmhz;
+	ggrid.epscf=cmplx(epr,-sig*wlam*59.96);
+  }
+  else ggrid.epscf=cmplx(epr,sig);
 
-	} /* if( ! nogo ) */
+  ck2=M_2PI;
+  ck2sq=ck2*ck2;
+
+  /* sommerfeld integral evaluation uses exp(-jwt),
+   * nec uses exp(+jwt), hence need conjg(ggrid.epscf).
+   * conjugate of fields occurs in subroutine evlua. */
+
+  ck1sq=ck2sq*conj(ggrid.epscf);
+  ck1=csqrt(ck1sq);
+  ck1r=creal(ck1);
+  tkmag=100.0*cabs(ck1);
+  tsmag=100.0*creal( ck1*conj(ck1) );
+  cksm=ck2sq/(ck1sq+ck2sq);
+  ct1=.5*(ck1sq-ck2sq);
+  erv=ck1sq*ck1sq;
+  ezv=ck2sq*ck2sq;
+  ct2=.125*(erv-ezv);
+  erv *= ck1sq;
+  ezv *= ck2sq;
+  ct3=.0625*(erv-ezv);
 
-	saoa(z+dz*.250,g2);
-	saoa(z+dz*.75,g4);
-	nogo=FALSE;
-	for( i = 0; i < n; i++ )
+  /* loop over 3 grid regions */
+  for( k = 0; k < 3; k++ )
+  {
+	nr=ggrid.nxa[k];
+	nth=ggrid.nya[k];
+	dr=ggrid.dxa[k];
+	dth=ggrid.dya[k];
+	r=ggrid.xsa[k]-dr;
+	irs=1;
+	if(k == 0)
 	{
-	  t02=(t01[i]+dzot*(g2[i]+g4[i]))*0.50;
-	  t11=(4.0*t02-t01[i])/3.0;
-	  t20[i]=(16.0*t11-t10[i])/15.0;
-
-	  /* test convergence of 5 point romberg result */
-	  test( creal(t11), creal(t20[i]), &tr,
-		  cimag(t11), cimag(t20[i]), &ti, 0.0 );
-	  if( (tr > CRIT) || (ti > CRIT) )
-		nogo = TRUE;
+	  r=ggrid.xsa[k];
+	  irs=2;
 	}
 
-	if( ! nogo )
+	/*  loop over r.  (r=sqrt(rho**2 + (z+h)**2)) */
+	for( ir = irs-1; ir < nr; ir++ )
 	{
-	  for( i = 0; i < n; i++ )
-		sum[i] += t20[i];
-
-	  nt++;
-	  z += dz;
-	  if(z > zend) return;
-
-	  for( i = 0; i < n; i++ )
-		g1[i]=g5[i];
+	  r += dr;
+	  thet = ggrid.ysa[k]-dth;
 
-	  if( (nt >= NTS) && (ns > nx) )
+	  /* loop over theta.  (theta=atan((z+h)/rho)) */
+	  for( ith = 0; ith < nth; ith++ )
 	  {
-		ns=ns/2;
-		nt=1;
-	  }
+		thet += dth;
+		rho=r*cos(thet);
+		zph=r*sin(thet);
+		if(rho < 1.0e-7)
+		  rho=1.0e-8;
+		if(zph < 1.0e-7)
+		  zph=0.0;
 
-	  jump = FALSE;
-	  continue;
+		evlua( &erv, &ezv, &erh, &eph );
 
-	} /* if( ! nogo ) */
+		rk=ck2*r;
+		con=-CONST1*r/cmplx(cos(rk),-sin(rk));
 
-	nt=0;
-	if(ns < NM)
-	{
-	  ns *= 2;
-	  dz=s/ns;
-	  dzot=dz*0.50;
+		switch( k )
+		{
+		  case 0:
+			ggrid.ar1[ir+ith*11+  0]=erv*con;
+			ggrid.ar1[ir+ith*11+110]=ezv*con;
+			ggrid.ar1[ir+ith*11+220]=erh*con;
+			ggrid.ar1[ir+ith*11+330]=eph*con;
+			break;
 
-	  for( i = 0; i < n; i++ )
-	  {
-		g5[i]=g3[i];
-		g3[i]=g2[i];
-	  }
+		  case 1:
+			ggrid.ar2[ir+ith*17+  0]=erv*con;
+			ggrid.ar2[ir+ith*17+ 85]=ezv*con;
+			ggrid.ar2[ir+ith*17+170]=erh*con;
+			ggrid.ar2[ir+ith*17+255]=eph*con;
+			break;
 
-	  jump = TRUE;
-	  continue;
+		  case 2:
+			ggrid.ar3[ir+ith*9+  0]=erv*con;
+			ggrid.ar3[ir+ith*9+ 72]=ezv*con;
+			ggrid.ar3[ir+ith*9+144]=erh*con;
+			ggrid.ar3[ir+ith*9+216]=eph*con;
 
-	} /* if(ns < nm) */
+		} /* switch( k ) */
 
-	if( ! lstep )
-	{
-	  lstep = TRUE;
-	  lambda( z, &t00, &t11 );
-	}
+	  } /* for( ith = 0; ith < nth; ith++ ) */
 
-	for( i = 0; i < n; i++ )
-	  sum[i] += t20[i];
+	} /* for( ir = irs-1; ir < nr; ir++; ) */
 
-	nt++;
-	z += dz;
-	if(z > zend) return;
+  } /* for( k = 0; k < 3; k++; ) */
 
-	for( i = 0; i < n; i++ )
-	  g1[i]=g5[i];
+  /* fill grid 1 for r equal to zero. */
+  cl2=-CONST4*(ggrid.epscf-1.0)/(ggrid.epscf+1.0);
+  cl1=cl2/(ggrid.epscf+1.0);
+  ezv=ggrid.epscf*cl1;
+  thet=-dth;
+  nth=ggrid.nya[0];
 
-	jump = FALSE;
+  for( ith = 0; ith < nth; ith++ )
+  {
+	thet += dth;
+	if( (ith+1) != nth )
+	{
+	  tfac2=cos(thet);
+	  tfac1=(1.0-sin(thet))/tfac2;
+	  tfac2=tfac1/tfac2;
+	  erv=ggrid.epscf*cl1*tfac1;
+	  erh=cl1*(tfac2-1.0)+cl2;
+	  eph=cl1*tfac2-cl2;
+	}
+	else
+	{
+	  erv=0.0;
+	  erh=cl2-.5*cl1;
+	  eph=-erh;
+	}
 
-  } /* while( TRUE ) */
+	ggrid.ar1[0+ith*11+  0]=erv;
+	ggrid.ar1[0+ith*11+110]=ezv;
+	ggrid.ar1[0+ith*11+220]=erh;
+	ggrid.ar1[0+ith*11+330]=eph;
+  }
 
+  return;
 }
 
 /*-----------------------------------------------------------------------*/
 
-/* saoa computes the integrand for each of the 6 sommerfeld */
-/* integrals for source and observer above ground */
-void saoa( double t, complex double *ans)
+/* fbar is sommerfeld attenuation function for numerical distance p */
+  void
+fbar( complex double p, complex double *fbar )
 {
-  double xlr;
-  static complex double xl, dxl, cgam1, cgam2, b0;
-  static complex double b0p, com, dgam, den1, den2;
-
-  lambda(t, &xl, &dxl);
-  if( jh == 0 )
-  {
-	/* bessel function form */
-	bessel(xl*rho, &b0, &b0p);
-	b0  *=2.0;
-	b0p *=2.0;
-	cgam1=csqrt(xl*xl-ck1sq);
-	cgam2=csqrt(xl*xl-ck2sq);
-	if(creal(cgam1) == 0.0)
-	  cgam1=cmplx(0.0,-fabs(cimag(cgam1)));
-	if(creal(cgam2) == 0.0)
-	  cgam2=cmplx(0.0,-fabs(cimag(cgam2)));
-  }
-  else
-  {
-	/* hankel function form */
-	hankel(xl*rho, &b0, &b0p);
-	com=xl-ck1;
-	cgam1=csqrt(xl+ck1)*csqrt(com);
-	if(creal(com) < 0.0 && cimag(com) >= 0.0)
-	  cgam1=-cgam1;
-	com=xl-ck2;
-	cgam2=csqrt(xl+ck2)*csqrt(com);
-	if(creal(com) < 0.0 && cimag(com) >= 0.0)
-	  cgam2=-cgam2;
-  }
+  int i, minus;
+  double tms, sms;
+  complex double z, zs, sum, pow, term;
 
-  xlr=creal( xl*conj(xl) );
-  if(xlr >= tsmag)
+  z= CPLX_01* csqrt( p);
+  if( cabs( z) <= 3.0)
   {
-	double sign;
-	if(cimag(xl) >= 0.0)
-	{
-	  xlr=creal(xl);
-	  if(xlr >= ck2)
-	  {
-		if(xlr <= ck1r)
-		  dgam=cgam2-cgam1;
-		else
-		{
-		  sign=1.0;
-		  dgam=1.0/(xl*xl);
-		  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
-		}
-	  }
-	  else
-	  {
-		sign=-1.0;
-		dgam=1.0/(xl*xl);
-		dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
-	  } /* if(xlr >= ck2) */
+	/* series expansion */
+	zs= z* z;
+	sum= z;
+	pow= z;
 
-	} /* if(cimag(xl) >= 0.0) */
-	else
+	for( i = 1; i <= 100; i++ )
 	{
-	  sign=1.0;
-	  dgam=1.0/(xl*xl);
-	  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+	  pow= -pow* zs/ (double)i;
+	  term= pow/(2.0* i+1.0);
+	  sum= sum+ term;
+	  tms= creal( term* conj( term));
+	  sms= creal( sum* conj( sum));
+	  if( tms/sms < ACCS)
+		break;
 	}
 
-  } /* if(xlr < tsmag) */
-  else dgam=cgam2-cgam1;
+	*fbar=1.0-(1.0- sum* TOSP)* z* cexp( zs)* SP;
 
-  den2=cksm*dgam/(cgam2*(ck1sq*cgam2+ck2sq*cgam1));
-  den1=1.0/(cgam1+cgam2)-cksm/cgam2;
-  com=dxl*xl*cexp(-cgam2*zph);
-  ans[5]=com*b0*den1/ck1;
-  com *= den2;
+  } /* if( cabs( z) <= 3.0) */
 
-  if(rho != 0.0)
+  /* asymptotic expansion */
+  if( creal( z) < 0.0)
   {
-	b0p=b0p/rho;
-	ans[0]=-com*xl*(b0p+b0*xl);
-	ans[3]=com*xl*b0p;
+	minus=1;
+	z= -z;
   }
-  else
+  else minus=0;
+
+  zs=0.5/( z* z);
+  sum=CPLX_00;
+  term=CPLX_10;
+
+  for( i = 1; i <= 6; i++ )
   {
-	ans[0]=-com*xl*xl*0.5;
-	ans[3]=ans[0];
+	term = -term*(2.0*i -1.0)* zs;
+	sum += term;
   }
 
-  ans[1]=com*cgam2*cgam2*b0;
-  ans[2]=-ans[3]*cgam2*rho;
-  ans[4]=com*b0;
+  if( minus == 1)
+	sum -= 2.0* SP* z* cexp( z* z);
+  *fbar= -sum;
 
-  return;
 }
 
 /*-----------------------------------------------------------------------*/
diff --git a/src/somnec.h b/src/somnec.h
index 7fc3d38..f256397 100644
--- a/src/somnec.h
+++ b/src/somnec.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,7 +18,6 @@
 #define	SOMNEC_H	1
 
 #include "common.h"
-#include "support.h"
 
 #define	PTP		.6283185308
 #define PI10	31.41592654
diff --git a/src/support.c b/src/support.c
deleted file mode 100644
index 00aff29..0000000
--- a/src/support.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gtk/gtk.h>
-
-#include "support.h"
-
-GtkWidget*
-lookup_widget                          (GtkWidget       *widget,
-                                        const gchar     *widget_name)
-{
-  GtkWidget *parent, *found_widget;
-
-  for (;;)
-    {
-      if (GTK_IS_MENU (widget))
-        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
-      else
-        parent = widget->parent;
-      if (!parent)
-        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
-      if (parent == NULL)
-        break;
-      widget = parent;
-    }
-
-  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
-                                                 widget_name);
-  if (!found_widget)
-    g_warning ("Widget not found: %s", widget_name);
-  return found_widget;
-}
-
-static GList *pixmaps_directories = NULL;
-
-/* Use this function to set the directory containing installed pixmaps. */
-void
-add_pixmap_directory                   (const gchar     *directory)
-{
-  pixmaps_directories = g_list_prepend (pixmaps_directories,
-                                        g_strdup (directory));
-}
-
-/* This is an internally used function to find pixmap files. */
-static gchar*
-find_pixmap_file                       (const gchar     *filename)
-{
-  GList *elem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  elem = pixmaps_directories;
-  while (elem)
-    {
-      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
-                                         G_DIR_SEPARATOR_S, filename);
-      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
-        return pathname;
-      g_free (pathname);
-      elem = elem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget*
-create_pixmap                          (GtkWidget       *widget,
-                                        const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GtkWidget *pixmap;
-
-  if (!filename || !filename[0])
-      return gtk_image_new ();
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return gtk_image_new ();
-    }
-
-  pixmap = gtk_image_new_from_file (pathname);
-  g_free (pathname);
-  return pixmap;
-}
-
-/* This is an internally used function to create pixmaps. */
-GdkPixbuf*
-create_pixbuf                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GdkPixbuf *pixbuf;
-  GError *error = NULL;
-
-  if (!filename || !filename[0])
-      return NULL;
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return NULL;
-    }
-
-  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
-  if (!pixbuf)
-    {
-      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-               pathname, error->message);
-      g_error_free (error);
-    }
-  g_free (pathname);
-  return pixbuf;
-}
-
-/* This is used to set ATK action descriptions. */
-void
-glade_set_atk_action_description       (AtkAction       *action,
-                                        const gchar     *action_name,
-                                        const gchar     *description)
-{
-  gint n_actions, i;
-
-  n_actions = atk_action_get_n_actions (action);
-  for (i = 0; i < n_actions; i++)
-    {
-      if (!strcmp (atk_action_get_name (action, i), action_name))
-        atk_action_set_description (action, i, description);
-    }
-}
-
diff --git a/src/support.h b/src/support.h
deleted file mode 100644
index a32649e..0000000
--- a/src/support.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-
-/*
- * Standard gettext macros.
- */
-#ifdef ENABLE_NLS
-#  include <libintl.h>
-#  undef _
-#  define _(String) dgettext (PACKAGE, String)
-#  define Q_(String) g_strip_context ((String), gettext (String))
-#  ifdef gettext_noop
-#    define N_(String) gettext_noop (String)
-#  else
-#    define N_(String) (String)
-#  endif
-#else
-#  define textdomain(String) (String)
-#  define gettext(String) (String)
-#  define dgettext(Domain,Message) (Message)
-#  define dcgettext(Domain,Message,Type) (Message)
-#  define bindtextdomain(Domain,Directory) (Domain)
-#  define _(String) (String)
-#  define Q_(String) g_strip_context ((String), (String))
-#  define N_(String) (String)
-#endif
-
-
-/*
- * Public Functions.
- */
-
-/*
- * This function returns a widget in a component created by Glade.
- * Call it with the toplevel widget in the component (i.e. a window/dialog),
- * or alternatively any widget in the component, and the name of the widget
- * you want returned.
- */
-GtkWidget*  lookup_widget              (GtkWidget       *widget,
-                                        const gchar     *widget_name);
-
-
-/* Use this function to set the directory containing installed pixmaps. */
-void        add_pixmap_directory       (const gchar     *directory);
-
-
-/*
- * Private Functions.
- */
-
-/* This is used to create the pixmaps used in the interface. */
-GtkWidget*  create_pixmap              (GtkWidget       *widget,
-                                        const gchar     *filename);
-
-/* This is used to create the pixbufs used in the interface. */
-GdkPixbuf*  create_pixbuf              (const gchar     *filename);
-
-/* This is used to set ATK action descriptions. */
-void        glade_set_atk_action_description (AtkAction       *action,
-                                              const gchar     *action_name,
-                                              const gchar     *description);
-
diff --git a/src/utils.c b/src/utils.c
index 4caa18f..db206cb 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,12 +14,8 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* misc.c
- *
- * Miscellaneous support functions for xnec2c.c
- */
-
 #include "utils.h"
+#include "shared.h"
 
 /*------------------------------------------------------------------------*/
 
@@ -30,13 +24,14 @@
  *  Prints usage information
  */
 
-void usage(void)
+void
+usage(void)
 {
   fprintf( stderr,
-	  _("Usage: xnec2c <input-file-name>\n"\
-		"              [-i <input-file-name>]\n"\
-		"              [-j <number of processors in SMP machine>]\n"\
-		"              [-h: print this usage information and exit]\n"\
+	  _("Usage: xnec2c <input-file-name>\n"
+		"              [-i <input-file-name>]\n"
+		"              [-j <number of processors in SMP machine>]\n"
+		"              [-h: print this usage information and exit]\n"
 		"              [-v: print xnec2c version number and exit]\n") );
 
 } /* end of usage() */
@@ -54,8 +49,7 @@ stop( char *mesg, int err )
 	if( err )
 	{
 	  fprintf( stderr,
-		  _("xnec2c: fatal: child process %d exiting\n"),
-		  num_child_procs );
+		  _("xnec2c: fatal: child process %d exiting\n"), num_child_procs );
 	  _exit(-1);
 	}
 	else return( err );
@@ -64,15 +58,16 @@ stop( char *mesg, int err )
 
   /* Stop operation */
   Stop_Frequency_Loop();
-  error_dialog = create_error_dialog();
+  GtkBuilder *builder;
+  error_dialog = create_error_dialog( &builder );
   gtk_label_set_text( GTK_LABEL(
-		lookup_widget(error_dialog, "error_label")), mesg );
+		Builder_Get_Object(builder, "error_label")), mesg );
 
   /* Hide ok button according to error */
   if( err == TRUE )
-	gtk_widget_hide( lookup_widget(
-		  error_dialog, "error_okbutton") );
+	gtk_widget_hide( Builder_Get_Object(builder, "error_okbutton") );
   gtk_widget_show( error_dialog );
+  g_object_unref( builder );
 
   /* Loop over usleep till user decides what to do */
   /* Could not think of another way to do this :-( */
@@ -96,12 +91,14 @@ Nec2_Save_Warn( const gchar *mesg )
 {
   if( isFlagSet(FREQ_LOOP_RUNNING) )
   {
-	error_dialog = create_error_dialog();
+	GtkBuilder *builder;
+	error_dialog = create_error_dialog( &builder );
 	gtk_label_set_text( GTK_LABEL(
-		  lookup_widget(error_dialog, "error_label")), mesg );
-	gtk_widget_hide( lookup_widget(
-		  error_dialog, "error_stopbutton") );
+		  Builder_Get_Object(builder, "error_label")), mesg );
+	gtk_widget_hide(
+		Builder_Get_Object(builder, "error_stopbutton") );
 	gtk_widget_show( error_dialog );
+	g_object_unref( builder );
 
 	/* Loop over usleep till user decides what to do */
 	/* Could not think of another way to do this :-( */
@@ -130,7 +127,8 @@ Nec2_Save_Warn( const gchar *mesg )
  *  EOF is returned.
  */
 
-int Load_Line( char *buff, FILE *pfile )
+int
+Load_Line( char *buff, FILE *pfile )
 {
   int
 	num_chr, /* number of characters read, excluding lf/cr */
@@ -199,7 +197,8 @@ int Load_Line( char *buff, FILE *pfile )
 
 /***  Memory allocation/freeing utils ***/
 static size_t cnt = 0; /* Total allocation */
-void mem_alloc( void **ptr, size_t req, gchar *str )
+void
+mem_alloc( void **ptr, size_t req, gchar *str )
 {
   gchar mesg[MESG_SIZE];
 
@@ -218,7 +217,8 @@ void mem_alloc( void **ptr, size_t req, gchar *str )
 
 /*------------------------------------------------------------------------*/
 
-void mem_realloc( void **ptr, size_t req, gchar *str )
+void
+mem_realloc( void **ptr, size_t req, gchar *str )
 {
   gchar mesg[MESG_SIZE];
 
@@ -236,7 +236,8 @@ void mem_realloc( void **ptr, size_t req, gchar *str )
 
 /*------------------------------------------------------------------------*/
 
-void free_ptr( void **ptr )
+void
+free_ptr( void **ptr )
 {
   if( *ptr != NULL )
 	free( *ptr );
diff --git a/src/utils.h b/src/utils.h
index 460afcb..733d0f5 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -20,10 +18,6 @@
 #define	UTILS_H		1
 
 #include "common.h"
-#include "interface.h"
-#include "support.h"
-#include "shared.h"
-#include <locale.h>
 #include <ctype.h>
 
 /* Carriage return and line feed */
diff --git a/src/xnec2c.c b/src/xnec2c.c
index 3372d31..61d2e47 100644
--- a/src/xnec2c.c
+++ b/src/xnec2c.c
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -16,13 +14,6 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/* xnec2c.c
- *
- * Contains functions that carry out various
- * operations that were packed spaggetti-fashion
- * in the original NEC2 main() function
- */
-
 #include "xnec2c.h"
 #include "shared.h"
 
@@ -35,7 +26,7 @@ static double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
  *
  * Scales geometric parameters to frequency
  */
-  void
+  static void
 Frequency_Scale_Geometry()
 {
   double fr;
@@ -81,7 +72,7 @@ Frequency_Scale_Geometry()
  *
  * Calculates structure (segment) impedance loading
  */
-  void
+  static void
 Structure_Impedance_Loading( void )
 {
   /* Calculate some loading parameters */
@@ -100,7 +91,7 @@ Structure_Impedance_Loading( void )
  *
  * Calculates ground parameters (antenna environment)
  */
-  void
+  static void
 Ground_Parameters( void )
 {
   complex double epsc;
@@ -139,7 +130,7 @@ Ground_Parameters( void )
 			  "                            requested: %12.5E%+12.5Ej\n",
 			  creal(ggrid.epscf), cimag(ggrid.epscf),
 			  creal(epsc), cimag(epsc) );
-		  stop( _("Ground_Parameters():"\
+		  stop( _("Ground_Parameters():"
 				"Error in ground parameters"), ERR_STOP );
 		}
 	  } /* if( gnd.iperf != 2) */
@@ -162,7 +153,7 @@ Ground_Parameters( void )
  *
  * Sets and factors the interaction matrix
  */
-  void
+  static void
 Set_Interaction_Matrix( void )
 {
   /* Memory allocation for symmetry array */
@@ -187,7 +178,7 @@ Set_Interaction_Matrix( void )
  *
  * Sets the excitation part of the matrix
  */
-  void
+  static void
 Set_Excitation( void )
 {
   if( (fpat.ixtyp >= 1) && (fpat.ixtyp <= 4) )
@@ -223,7 +214,7 @@ Set_Excitation( void )
  *
  * Sets up network data and solves for currents
  */
-  void
+  static void
 Set_Network_Data( void )
 {
   if( netcx.nonet != 0 )
@@ -277,8 +268,7 @@ Set_Network_Data( void )
 	impedance_data.zphase[calc_data.fstep]= (double)cang( netcx.zped);
 
 	if( (calc_data.iped == 1) &&
-		((double)impedance_data.zmagn[calc_data.fstep] >
-		 calc_data.zpnorm) )
+		((double)impedance_data.zmagn[calc_data.fstep] > calc_data.zpnorm) )
 	  calc_data.zpnorm =
 		(double)impedance_data.zmagn[calc_data.fstep];
   }
@@ -291,7 +281,7 @@ Set_Network_Data( void )
  *
  * Calculate power loss due to segment loading
  */
-  void
+  static void
 Power_Loss( void )
 {
   int i;
@@ -325,7 +315,7 @@ Power_Loss( void )
  *
  * Calculates far field (radiation) pattern
  */
-  void
+  static void
 Radiation_Pattern( void )
 {
   if( (gnd.ifar != 1) && isFlagSet(ENABLE_RDPAT) )
@@ -370,7 +360,8 @@ New_Frequency( void )
 {
   /* Abort if freq has not really changed, as when changing
    * between current or charge density structure coloring */
-  if( (save.last_freq == calc_data.fmhz) || isFlagClear(ENABLE_EXCITN) )
+  if( (save.last_freq == calc_data.fmhz) ||
+	  isFlagClear(ENABLE_EXCITN) )
 	return;
   save.last_freq = calc_data.fmhz;
 
@@ -414,7 +405,7 @@ static gboolean retval;	/* Function's return value */
  * Loops over frequency if calculations over a frequency range is
  * requested, dividing the job between child processes if forked
  */
-  gboolean
+  static gboolean
 Frequency_Loop( gpointer udata )
 {
   /* Value of frequency and step num in the loop */
@@ -434,7 +425,7 @@ Frequency_Loop( gpointer udata )
   if( isFlagSet(FREQ_LOOP_INIT) )
   {
 	/* Clear global flags */
-	ClearFlag( FREQ_LOOP_INIT |	FREQ_LOOP_DONE );
+	ClearFlag( FREQ_LOOP_INIT | FREQ_LOOP_DONE );
 
 	/* (Re)-enable freq loop (back to start freq) */
 	freq = save.fmhz;
@@ -469,6 +460,7 @@ Frequency_Loop( gpointer udata )
 	return ( retval );
 
   } /* isFlagSet(INIT_FREQ_LOOP) */
+  ClearFlag( FREQ_LOOP_INIT );
 
   /* Repeat freq stepping over number of child processes
    * if forked. calc_data.num_jobs = 1 for non-forked runs.
@@ -482,10 +474,6 @@ Frequency_Loop( gpointer udata )
 	/* Frequency loop is completed or was paused by user */
 	if( (fstep >= calc_data.nfrq) || isFlagSet(FREQ_LOOP_STOP) )
 	{
-	  /* Re-initialize if loop completed all steps */
-	  if( fstep >= calc_data.nfrq )
-		SetFlag( FREQ_LOOP_INIT );
-
 	  /* Points to last buffer in rad_pattern filled by loop */
 	  fstep--;
 
@@ -611,25 +599,37 @@ Frequency_Loop( gpointer udata )
   calc_data.lastf = calc_data.fstep;
   calc_data.fmhz = (double)save.freq[calc_data.fstep];
 
-  /* Trigger a redraw of plots drawingarea */
-  Plot_Frequency_Data();
+  /* Trigger a redraw of open drawingareas */
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	char txt[10];
+	snprintf( txt, sizeof(txt), "%9.3f", (gdouble)calc_data.fmhz );
+	gtk_entry_set_text( GTK_ENTRY(Builder_Get_Object(
+			freqplots_window_builder, "freqplots_fmhz_entry")), txt );
 
-  /* Set frequency spinbuttons */
-  gtk_spin_button_set_value(
-	  mainwin_frequency, (gdouble)calc_data.fmhz );
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( freqplots_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
+  }
 
   if( isFlagSet(DRAW_ENABLED) )
+  {
 	gtk_spin_button_set_value(
 		rdpattern_frequency, (gdouble)calc_data.fmhz );
-
-  if( isFlagSet(PLOT_ENABLED) )
-  {
-	char txt[10];
-	snprintf( txt, sizeof(txt), "%10.3f", (gdouble)calc_data.fmhz );
-	gtk_entry_set_text( GTK_ENTRY(
-		  lookup_widget(freqplots_window, "freqplots_fmhz_entry")), txt );
+	/* Wait for GTK to complete its tasks */
+	gtk_widget_queue_draw( rdpattern_drawingarea );
+	while( g_main_context_iteration(NULL, FALSE) );
   }
 
+  /* Set frequency spinbuttons */
+  gtk_spin_button_set_value(
+	  mainwin_frequency, (gdouble)calc_data.fmhz );
+  /* Wait for GTK to complete its tasks */
+  gtk_widget_queue_draw( structure_drawingarea );
+  while( g_main_context_iteration(NULL, FALSE) );
+
+  SetFlag( FREQLOOP_READY );
+
   /* Change flags at exit if loop is done */
   if( !retval && !num_busy_procs )
   {
@@ -653,7 +653,8 @@ Start_Frequency_Loop( void )
   if( isFlagClear(FREQ_LOOP_RUNNING) && (calc_data.nfrq > 1) )
   {
 	retval = TRUE;
-	SetFlag(FREQ_LOOP_RUNNING);
+	SetFlag( FREQ_LOOP_INIT );
+	SetFlag( FREQ_LOOP_RUNNING );
 	floop_tag = g_idle_add( Frequency_Loop, NULL );
 	return( TRUE );
   }
diff --git a/src/xnec2c.h b/src/xnec2c.h
index 9d8a88e..15f1d20 100644
--- a/src/xnec2c.h
+++ b/src/xnec2c.h
@@ -1,6 +1,4 @@
 /*
- *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
- *
  *  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
@@ -19,8 +17,8 @@
 #ifndef	XNEC2C_H
 #define XNEC2C_H		1
 
+#include "common.h"
 #include "fork.h"
-#include "support.h"
 
 #endif
 
diff --git a/xnec2c.glade b/xnec2c.glade
deleted file mode 100644
index 6e0bcc9..0000000
--- a/xnec2c.glade
+++ /dev/null
@@ -1,19636 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="main_window">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Xnec2c: Structure Display</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_EAST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_main_window_destroy" last_modification_time="Wed, 09 Feb 2005 11:30:01 GMT"/>
-  <signal name="delete_event" handler="on_main_window_delete_event" last_modification_time="Wed, 09 Feb 2005 11:30:12 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkHBox" id="hbox8">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkMenuBar" id="menubar1">
-	      <property name="visible">True</property>
-	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menuitem1">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_File</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menuitem1_menu">
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="main_new">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-new</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:53:52 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="main_open_input">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-open</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:53:52 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="nec2_edit">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Edit NEC2 Input File</property>
-			  <property name="label">gtk-edit</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_nec2_edit_activate" last_modification_time="Wed, 04 Jan 2006 05:31:42 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="main_save">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_main_save_activate" last_modification_time="Tue, 10 Jan 2006 15:46:10 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="main_save_as">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save-as</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_main_save_as_activate" last_modification_time="Fri, 18 Mar 2005 14:16:02 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="struct_save_as_gnuplot">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Save As gnuplot</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_struct_save_as_gnuplot_activate" last_modification_time="Tue, 26 Jun 2012 05:04:59 GMT"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image102">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-save-as</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkSeparatorMenuItem" id="separator1">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="main_quit">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-quit</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_quit_activate" last_modification_time="Tue, 15 Feb 2005 12:40:34 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="main_view_menuitem">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_View</property>
-		  <property name="use_underline">True</property>
-		  <signal name="activate" handler="main_view_menuitem_activate" last_modification_time="Sun, 28 Aug 2005 11:28:47 GMT"/>
-
-		  <child>
-		    <widget class="GtkMenu" id="main_view_menuitem_menu">
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="main_rdpattern">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Open radiation pattern window</property>
-			  <property name="label" translatable="yes">Radiation Pattern</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">False</property>
-			  <signal name="activate" handler="on_main_rdpattern_activate" last_modification_time="Sat, 30 Jul 2005 05:40:22 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="main_freqplots">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Open frequency data plots window</property>
-			  <property name="label" translatable="yes">Frequency Plots</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">False</property>
-			  <signal name="activate" handler="on_main_freqplots_activate" last_modification_time="Sat, 30 Jul 2005 05:40:22 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="main_pol_menu">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display gain data relevant to polarization</property>
-			  <property name="label" translatable="yes">Polarization</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="main_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:28:47 GMT"/>
-
-			  <child>
-			    <widget class="GtkMenu" id="main_pol_menu_menu">
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_total">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Total gain</property>
-				  <property name="label" translatable="yes">Total</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
-				  <property name="label" translatable="yes">Horizontal</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in vertical polarization</property>
-				  <property name="label" translatable="yes">Vertical</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in rhcp</property>
-				  <property name="label" translatable="yes">Right Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in lhcp</property>
-				  <property name="label" translatable="yes">Left Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="common_projection">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Synchronize projection parameters in different windows</property>
-			  <property name="label" translatable="yes">Common Projection</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="on_common_projection_activate" last_modification_time="Sat, 09 Jul 2005 09:27:59 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="common_freq">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Synchronize frequency selection in different windows</property>
-			  <property name="label" translatable="yes">Common Frequency</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="on_common_freq_activate" last_modification_time="Sun, 17 Jul 2005 07:24:47 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menuitem4">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Help</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menuitem4_menu">
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="about">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">About</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_about_activate" last_modification_time="Tue, 27 Nov 2007 07:10:02 GMT"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image103">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-about</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="main_hbox1">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkVSeparator" id="vseparator2">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="padding">4</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="main_currents_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Calculate and Display
-Structure Currents</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Currents</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_main_currents_togglebutton_toggled" last_modification_time="Wed, 13 Apr 2005 14:15:50 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="main_charges_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Calculate and Display
-Charge Densities</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Charges</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_main_charges_togglebutton_toggled" last_modification_time="Wed, 13 Apr 2005 14:15:38 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVSeparator" id="vseparator7">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="padding">4</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label214">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Frequency Loop </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_loop_start">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Start Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:52:41 GMT"/>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment49">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">0</property>
-		      <property name="yscale">0</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">0</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox47">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">2</property>
-
-			  <child>
-			    <widget class="GtkImage" id="image52">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-media-play</property>
-			      <property name="icon_size">4</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label213">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">True</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_loop_pause">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:53:27 GMT"/>
-		  <accelerator key="h" modifiers="0" signal="clicked"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image54">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-media-pause</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_loop_reset">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:54:27 GMT"/>
-		  <accelerator key="r" modifiers="0" signal="clicked"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image53">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-media-rewind</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label244">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"> Step </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="structure_fstep_entry">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Current Frequency Step</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">False</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">3</property>
-		  <property name="text" translatable="yes">1</property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">●</property>
-		  <property name="activates_default">False</property>
-		  <property name="width_chars">3</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator1">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">4</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="main_hbox2">
-	  <property name="height_request">30</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="main_colorcode_zerolabel">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">0</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkDrawingArea" id="main_colorcode_drawingarea">
-	      <property name="width_request">160</property>
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Color Code for Structure's
-Current or Charge Values</property>
-	      <signal name="expose_event" handler="on_main_colorcode_drawingarea_expose_event" last_modification_time="Sat, 16 Apr 2005 07:32:14 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="main_colorcode_maxlabel">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">0.00</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">11</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="main_gain_entry">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Gain in Direction of Viewer
-(Perpenticular to Screen)</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">6</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label10">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">dB </property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">True</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="main_freq_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Enter Frequency in MHz</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">0.0010000000475</property>
-	      <property name="digits">3</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">0.00999999977648 0.00999999977648 9999 0.00999999977648 10 0</property>
-	      <signal name="value_changed" handler="on_main_freq_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:31:47 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="main_freq_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">MHz </property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">True</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkCheckButton" id="main_freq_checkbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Enable Data Calculation
-on Frequency Change</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Apply</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">False</property>
-	      <property name="active">True</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	      <signal name="toggled" handler="on_main_freq_checkbutton_toggled" last_modification_time="Wed, 11 Oct 2006 06:44:53 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="main_new_freq_button">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Calculate Data
-for New Frequency</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_main_new_freq_clicked" last_modification_time="Mon, 11 Apr 2005 12:11:27 GMT"/>
-	      <accelerator key="a" modifiers="0" signal="clicked"/>
-
-	      <child>
-		<widget class="GtkImage" id="image46">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-apply</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator11">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">4</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame1">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment1">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">0</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkDrawingArea" id="structure_drawingarea">
-		  <property name="width_request">681</property>
-		  <property name="height_request">769</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <signal name="configure_event" handler="on_structure_drawingarea_configure_event" last_modification_time="Wed, 09 Feb 2005 06:20:26 GMT"/>
-		  <signal name="expose_event" handler="on_structure_drawingarea_expose_event" last_modification_time="Wed, 17 Aug 2005 05:14:01 GMT"/>
-		  <signal name="button_press_event" handler="on_structure_drawingarea_button_press_event" last_modification_time="Thu, 24 May 2012 17:11:23 GMT"/>
-		  <signal name="scroll_event" handler="on_structure_drawingarea_scroll_event" last_modification_time="Sat, 26 May 2012 04:30:42 GMT"/>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="main_hbox3">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="struct_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">View Geometry</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">14</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_x_axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View Structure along X-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">X</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_main_x_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:05:39 GMT"/>
-		  <accelerator key="x" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_y_axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View Structure along Y-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Y</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_main_y_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:05:51 GMT"/>
-		  <accelerator key="y" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_z-axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View Strucure along Z-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Z</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_main_z_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:06:03 GMT"/>
-		  <accelerator key="z" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="main_default_view">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View Strucure
-in Default Projection</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_main_default_view_clicked" last_modification_time="Sat, 16 Apr 2005 07:33:52 GMT"/>
-		  <accelerator key="r" modifiers="0" signal="clicked"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image32">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-redo</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVSeparator" id="vseparator1">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkImage" id="image50">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-refresh</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="main_rotate_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Rotate Structure
- around Z-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">True</property>
-		  <property name="adjustment">45 -360 360 1 10 0</property>
-		  <signal name="value_changed" handler="on_main_rotate_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:33:16 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkImage" id="image51">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-go-down</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="main_incline_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Incline Structure
-to Plane of Screen</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">True</property>
-		  <property name="adjustment">45 -180 180 1 10 0</property>
-		  <signal name="value_changed" handler="on_main_incline_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:32:55 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label245">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"> Zoom % </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="structure_zoom_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom Structure Display</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">False</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">100 10 999 1 10 0</property>
-		  <signal name="value_changed" handler="on_structure_zoom_spinbutton_value_changed" last_modification_time="Fri, 25 May 2012 08:46:11 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="structure_plus_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom In</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_structure_plus_button_clicked" last_modification_time="Fri, 25 May 2012 08:46:50 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image94">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-in</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="structure_minus_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom Out</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_structure_minus_button_clicked" last_modification_time="Fri, 25 May 2012 08:47:27 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image95">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-out</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="structure_one_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom to Default 1:1</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_structure_one_button_clicked" last_modification_time="Fri, 25 May 2012 08:48:03 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image96">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-100</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkFileChooserDialog" id="filechooserdialog">
-  <property name="border_width">5</property>
-  <property name="visible">True</property>
-  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
-  <property name="local_only">True</property>
-  <property name="select_multiple">False</property>
-  <property name="show_hidden">True</property>
-  <property name="do_overwrite_confirmation">False</property>
-  <property name="title" translatable="yes">xnec2c</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_MOUSE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="role">GtkFileChooserDialog</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="response" handler="on_filechooserdialog_response" last_modification_time="Wed, 16 Feb 2005 05:49:28 GMT"/>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">24</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area1">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="filechoser_cancel">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	      <signal name="clicked" handler="on_filechoser_cancel_clicked" last_modification_time="Sat, 10 Sep 2005 04:30:01 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="filechooser_open">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="has_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-open</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkFileSelection" id="fileselection">
-  <property name="border_width">10</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Select File</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_MOUSE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="show_fileops">True</property>
-  <signal name="response" handler="on_fileselection_response" last_modification_time="Tue, 15 Feb 2005 17:19:19 GMT"/>
-
-  <child internal-child="cancel_button">
-    <widget class="GtkButton" id="fileselection_cancel">
-      <property name="visible">True</property>
-      <property name="can_default">True</property>
-      <property name="can_focus">True</property>
-      <property name="relief">GTK_RELIEF_NORMAL</property>
-      <property name="focus_on_click">True</property>
-      <signal name="clicked" handler="on_fileselection_cancel_clicked" last_modification_time="Thu, 15 Sep 2005 08:31:34 GMT"/>
-    </widget>
-  </child>
-
-  <child internal-child="ok_button">
-    <widget class="GtkButton" id="ok_button1">
-      <property name="visible">True</property>
-      <property name="can_default">True</property>
-      <property name="can_focus">True</property>
-      <property name="relief">GTK_RELIEF_NORMAL</property>
-      <property name="focus_on_click">True</property>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="freqplots_window">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Xnec2c: Frequency Data Plots</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_EAST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="delete_event" handler="on_freqplots_window_delete_event" last_modification_time="Sun, 20 Mar 2005 16:54:15 GMT"/>
-  <signal name="destroy" handler="on_freqplots_window_destroy" last_modification_time="Sun, 20 Mar 2005 16:54:25 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox2">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkHBox" id="freqplots_hbox1">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkMenuBar" id="menubar2">
-	      <property name="visible">True</property>
-	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menuitem5">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_File</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menuitem5_menu">
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="freqplots_new">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-new</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:06:28 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="freqplots_open_input">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-open</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:06:40 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="freqplots_save">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_freqplots_save_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="freqplots_save_as">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save-as</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_freqplots_save_as_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="freqplots_save_as_gnuplot">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Save As gnuplot</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_freqplots_save_as_gnuplot_activate" last_modification_time="Fri, 22 Jun 2012 10:54:20 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="freqplots_quit">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-quit</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="view_menuitem">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_View</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="view_menuitem_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="freqplots_pol_menu">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Disply gain data relevant to polarization</property>
-			  <property name="label" translatable="yes">Polarization</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="freqplots_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:30:19 GMT"/>
-
-			  <child>
-			    <widget class="GtkMenu" id="freqplots_pol_menu_menu">
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_total">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Total gain</property>
-				  <property name="label" translatable="yes">Total</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
-				  <property name="label" translatable="yes">Horizontal</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Plot gain in vertical polarization</property>
-				  <property name="label" translatable="yes">Vertical</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Plot gain in rhcp</property>
-				  <property name="label" translatable="yes">Right Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Plot gain in lhcp</property>
-				  <property name="label" translatable="yes">Left Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="net_gain">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display Net Gain towards Viewer</property>
-			  <property name="label" translatable="yes">Net Gain</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">False</property>
-			  <signal name="activate" handler="on_net_gain_activate" last_modification_time="Thu, 26 Jun 2008 07:43:18 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox10">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_gmax_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot maximum gain over frequency range</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Max Gain</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_gmax_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:21:18 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_gdir_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot direction of maximum gain</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Direct.</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_gdir_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:12:12 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_gviewer_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot gain in direction of viewer
-(perpenticular to screen)</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Viewer</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_gviewer_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:12:23 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_vswr_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot VSWR over frequency</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">VSWR</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_vswr_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:41:01 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_zrlzim_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot real and imaginary input impedances</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Zr/Zi</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_zrlzim_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:41:14 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="freqplots_zmgzph_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Plot magnitude and phase of input impedance</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Zm/Zph</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_freqplots_zmgzph_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:42:01 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label215">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">  Freq Loop </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="plot_loop_start">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Start Frequency Loop</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:55:15 GMT"/>
-
-	      <child>
-		<widget class="GtkImage" id="image61">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-play</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="plot_loop_pause">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:56:30 GMT"/>
-
-	      <child>
-		<widget class="GtkImage" id="image64">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-pause</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="plot_loop_reset">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:56:53 GMT"/>
-
-	      <child>
-		<widget class="GtkImage" id="image63">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-rewind</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator4">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">4</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox15">
-	  <property name="height_request">30</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label16">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">F MHz</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="freqplots_fmhz_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">8</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label12">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes"> Max Gain</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="freqplots_maxgain_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">6</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label13">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes"> VSWR</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="freqplots_vswr_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">5</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label14">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes"> Zreal</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="freqplots_zreal_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">5</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label15">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes"> Zim</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="freqplots_zimag_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">5</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label212">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes"> Zo</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="freqplots_zo_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Specify Zo of transmission line</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">0.20000000298</property>
-	      <property name="digits">1</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">50 1 999 0.10000000149 10 0</property>
-	      <signal name="value_changed" handler="on_freqplots_zo_spinbutton_value_changed" last_modification_time="Thu, 14 Jul 2005 05:09:01 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">4</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame2">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment2">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">0</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkDrawingArea" id="freqplots_drawingarea">
-		  <property name="width_request">1025</property>
-		  <property name="height_request">769</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="events">GDK_BUTTON_PRESS_MASK</property>
-		  <signal name="expose_event" handler="on_freqplots_drawingarea_expose_event" last_modification_time="Sun, 20 Mar 2005 16:58:32 GMT"/>
-		  <signal name="configure_event" handler="on_freqplots_drawingarea_configure_event" last_modification_time="Sun, 20 Mar 2005 16:58:37 GMT"/>
-		  <signal name="button_press_event" handler="on_freqplots_drawingarea_button_press_event" last_modification_time="Sat, 06 Aug 2005 06:40:15 GMT"/>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="freqplots_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Structure Data Plots</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="rdpattern_window">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Xnec2c: Radiation Patterns</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="delete_event" handler="on_rdpattern_window_delete_event" last_modification_time="Sun, 20 Mar 2005 16:54:47 GMT"/>
-  <signal name="destroy" handler="on_rdpattern_window_destroy" last_modification_time="Sun, 20 Mar 2005 16:54:54 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox3">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkHBox" id="hbox11">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkMenuBar" id="menubar3">
-	      <property name="visible">True</property>
-	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menuitem9">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_File</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menuitem9_menu">
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_new">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-new</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:07:20 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_open">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-open</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:07:20 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_save">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_rdpattern_save_activate" last_modification_time="Fri, 18 Mar 2005 15:39:15 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_save_as">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-save-as</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_rdpattern_save_as_activate" last_modification_time="Mon, 21 Mar 2005 09:55:37 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_save_as_gnuplot">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Save As gnuplot</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_rdpattern_save_as_gnuplot_activate" last_modification_time="Thu, 21 Jun 2012 05:56:35 GMT"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image101">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-save-as</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkSeparatorMenuItem" id="separatormenuitem3">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="rdpattern_quit">
-			  <property name="visible">True</property>
-			  <property name="label">gtk-quit</property>
-			  <property name="use_stock">True</property>
-			  <signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="rdpattern_view_menuitem">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_View</property>
-		  <property name="use_underline">True</property>
-		  <signal name="activate" handler="rdpattern_view_menuitem_activate" last_modification_time="Sun, 28 Aug 2005 11:31:15 GMT"/>
-
-		  <child>
-		    <widget class="GtkMenu" id="rdpattern_view_menuitem_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="rdpattern_pol_menu">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display gain data relevant to polarization</property>
-			  <property name="label" translatable="yes">Polarization</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="rdpattern_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:31:57 GMT"/>
-
-			  <child>
-			    <widget class="GtkMenu" id="rdpattern_pol_menu_menu">
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_total">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Total gain</property>
-				  <property name="label" translatable="yes">Total</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
-				  <property name="label" translatable="yes">Horizontal</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in vertical polarization</property>
-				  <property name="label" translatable="yes">Vertical</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in rhcp</property>
-				  <property name="label" translatable="yes">Right Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Gain in lhcp</property>
-				  <property name="label" translatable="yes">Left Hand</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_total</property>
-				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="rdpattern_gain_scaling">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Select a style of gain scaling</property>
-			  <property name="label" translatable="yes">Gain Scaling</property>
-			  <property name="use_underline">True</property>
-
-			  <child>
-			    <widget class="GtkMenu" id="rdpattern_gain_scaling_menu">
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_linear_power">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Linear power scaling</property>
-				  <property name="label" translatable="yes">Linear Power</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_linear_power_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_linear_voltage">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Linear field voltage scaling</property>
-				  <property name="label" translatable="yes">Linear Voltage</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_linear_power</property>
-				  <signal name="activate" handler="on_rdpattern_linear_voltage_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_arrl_style">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Scale gain in ARRL style</property>
-				  <property name="label" translatable="yes">ARRL Style</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_linear_power</property>
-				  <signal name="activate" handler="on_rdpattern_arrl_style_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="rdpattern_logarithmic">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Logarithmic gain scaling</property>
-				  <property name="label" translatable="yes">Logarithmic</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">False</property>
-				  <property name="group">rdpattern_linear_power</property>
-				  <signal name="activate" handler="on_rdpattern_logarithmic_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="near_field">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Near Field</property>
-			  <property name="use_underline">True</property>
-
-			  <child>
-			    <widget class="GtkMenu" id="near_field_menu">
-
-			      <child>
-				<widget class="GtkCheckMenuItem" id="rdpattern_e_field">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Display near E field</property>
-				  <property name="label" translatable="yes">Near E Field</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_e_field_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkCheckMenuItem" id="rdpattern_h_field">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Display near H field</property>
-				  <property name="label" translatable="yes">Near H Field</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_h_field_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkCheckMenuItem" id="rdpattern_poynting_vector">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Display Poynting vector</property>
-				  <property name="label" translatable="yes">Poynting Vector</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="on_rdpattern_poynting_vector_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkMenuItem" id="rdpattern_animate">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Animate Dialog</property>
-				  <property name="use_underline">True</property>
-				  <signal name="activate" handler="on_rdpattern_animate_activate" last_modification_time="Sun, 06 Nov 2005 12:59:55 GMT"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkMenuItem" id="total_field">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Total Field</property>
-				  <property name="use_underline">True</property>
-
-				  <child>
-				    <widget class="GtkMenu" id="total_field_menu">
-
-				      <child>
-					<widget class="GtkRadioMenuItem" id="near_peak_value">
-					  <property name="visible">True</property>
-					  <property name="label" translatable="yes">Peak Value</property>
-					  <property name="use_underline">True</property>
-					  <property name="active">True</property>
-					  <signal name="activate" handler="on_near_peak_value_activate" last_modification_time="Sun, 30 Oct 2005 18:27:25 GMT"/>
-					</widget>
-				      </child>
-
-				      <child>
-					<widget class="GtkRadioMenuItem" id="near_snapshot">
-					  <property name="visible">True</property>
-					  <property name="label" translatable="yes">Snapshot</property>
-					  <property name="use_underline">True</property>
-					  <property name="active">False</property>
-					  <property name="group">near_peak_value</property>
-					  <signal name="activate" handler="on_near_snapshot_activate" last_modification_time="Sun, 30 Oct 2005 18:27:25 GMT"/>
-					</widget>
-				      </child>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="common_projection">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Synchronize projection parametrs in different windows</property>
-			  <property name="label" translatable="yes">Common Projection</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="on_common_projection_activate" last_modification_time="Sat, 09 Jul 2005 09:47:18 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="common_freq">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Synchronize frequency selection in different windows</property>
-			  <property name="label" translatable="yes">Common Frequency</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="on_common_freq_activate" last_modification_time="Sun, 17 Jul 2005 07:29:53 GMT"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckMenuItem" id="rdpattern_overlay_structure">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Overlay Structure</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">False</property>
-			  <signal name="activate" handler="on_rdpattern_overlay_structure_activate" last_modification_time="Sat, 26 May 2012 14:41:35 GMT"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVSeparator" id="vseparator8">
-	      <property name="visible">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">4</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="rdpattern_hbox1">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkToggleButton" id="rdpattern_gain_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Calculate and display radiation pattern</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Gain Pattern</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_rdpattern_gain_togglebutton_toggled" last_modification_time="Thu, 07 Jul 2005 06:35:07 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToggleButton" id="rdpattern_eh_togglebutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Calculate and display the near E/H fields</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">E/H Fields</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <signal name="toggled" handler="on_rdpattern_eh_togglebutton_toggled" last_modification_time="Thu, 07 Jul 2005 06:35:19 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVSeparator" id="vseparator9">
-		  <property name="visible">True</property>
-		</widget>
-		<packing>
-		  <property name="padding">4</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label216">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Frequency Loop </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpatttern_loop_start">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Start Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:58:03 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image59">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-media-play</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_loop_pause">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:59:03 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image60">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-media-pause</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_loop_reset">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:59:40 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image58">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-media-rewind</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label246">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"> Step </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="rdpattern_fstep_entry">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Current Frequency Step</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">False</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">3</property>
-		  <property name="text" translatable="yes">1</property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">●</property>
-		  <property name="activates_default">False</property>
-		  <property name="width_chars">3</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator3">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">4</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="rdpattern_hbox2">
-	  <property name="height_request">30</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="rdpattern_colorcode_minlabel">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">0.0</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">5</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkDrawingArea" id="rdpattern_colorcode_drawingarea">
-	      <property name="width_request">160</property>
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Color code for Gain or E/H field values</property>
-	      <signal name="expose_event" handler="on_rdpattern_colorcode_drawingarea_expose_event" last_modification_time="Thu, 07 Jul 2005 06:35:49 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="rdpattern_colorcode_maxlabel">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">0.00</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">9</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="rdpattern_viewer_gain">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Gain in direction of viewer
-(perpenticular to screen)</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"> - - - - -</property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	      <property name="width_chars">6</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label11">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">dB</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">True</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="rdpattern_freq_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Enter frequency in MHz</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">0.0010000000475</property>
-	      <property name="digits">3</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">0.00999999977648 0.00999999977648 9999 0.00999999977648 10 0</property>
-	      <signal name="value_changed" handler="on_rdpattern_freq_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:10:35 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="rdpattern_freq_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">MHz</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">True</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">1</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkCheckButton" id="rdpattern_freq_checkbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Enable data calculation on frequency change</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Apply</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">True</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="rdpattern_new_freq_button">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Calculate data for new frequency</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_rdpattern_new_freq_clicked" last_modification_time="Sat, 09 Jul 2005 15:27:05 GMT"/>
-
-	      <child>
-		<widget class="GtkImage" id="image49">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-apply</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">2</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator12">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">4</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkLabel" id="rdpattern_label">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">Radiation Patterns</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">False</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	  <property name="width_chars">14</property>
-	  <property name="single_line_mode">True</property>
-	  <property name="angle">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame3">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment3">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">0</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkDrawingArea" id="rdpattern_drawingarea">
-		  <property name="width_request">681</property>
-		  <property name="height_request">769</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <signal name="configure_event" handler="on_rdpattern_drawingarea_configure_event" last_modification_time="Sat, 19 Mar 2005 14:26:17 GMT"/>
-		  <signal name="expose_event" handler="on_rdpattern_drawingarea_expose_event" last_modification_time="Sat, 19 Mar 2005 14:26:27 GMT"/>
-		  <signal name="button_press_event" handler="on_rdpattern_drawingarea_button_press_event" last_modification_time="Fri, 25 May 2012 09:46:58 GMT"/>
-		  <signal name="scroll_event" handler="on_rdpattern_drawingarea_scroll_event" last_modification_time="Sat, 26 May 2012 04:31:04 GMT"/>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="rdpattern_hbox3">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label248">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">View Radiation</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">14</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_x_axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View radiation pattern along X-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">X</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_x_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:07:46 GMT"/>
-		  <accelerator key="X" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_y_axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View radiation pattern along Y-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Y</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_y_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:08:05 GMT"/>
-		  <accelerator key="Y" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_z_axis">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View radiation pattern along Z-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Z</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_z_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:08:20 GMT"/>
-		  <accelerator key="Z" modifiers="0" signal="clicked"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_default_view">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">View radiation pattern in default projection</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_default_view_clicked" last_modification_time="Fri, 08 Jul 2005 18:41:58 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image34">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-redo</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkImage" id="image55">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-refresh</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="rdpattern_rotate_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Rotate radiation pattern around Z-axis</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">True</property>
-		  <property name="adjustment">45 -360 360 1 10 0</property>
-		  <signal name="value_changed" handler="on_rdpattern_rotate_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:41:18 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkImage" id="image56">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-go-down</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="rdpattern_incline_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Incline radiation pattern to plane of screen</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">True</property>
-		  <property name="adjustment">45 -180 180 1 10 0</property>
-		  <signal name="value_changed" handler="on_rdpattern_incline_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:42:24 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label247">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"> Zoom % </property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">True</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="rdpattern_zoom_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom Structure Display</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">False</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">100 10 999 1 10 0</property>
-		  <signal name="value_changed" handler="on_rdpattern_zoom_spinbutton_value_changed" last_modification_time="Fri, 25 May 2012 09:43:50 GMT"/>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_plus_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom In</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_plus_button_clicked" last_modification_time="Fri, 25 May 2012 09:44:13 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image98">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-in</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_minus_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom Out</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_minus_button_clicked" last_modification_time="Fri, 25 May 2012 09:44:29 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image99">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-out</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkButton" id="rdpattern_one_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Zoom to Default 1:1</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <signal name="clicked" handler="on_rdpattern_one_button_clicked" last_modification_time="Fri, 25 May 2012 09:45:00 GMT"/>
-
-		  <child>
-		    <widget class="GtkImage" id="image100">
-		      <property name="visible">True</property>
-		      <property name="stock">gtk-zoom-100</property>
-		      <property name="icon_size">4</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="quit_dialog">
-  <property name="border_width">2</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Confirmation</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_MOUSE</property>
-  <property name="modal">True</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">True</property>
-  <signal name="destroy" handler="on_quit_dialog_destroy" last_modification_time="Fri, 16 Dec 2005 12:08:18 GMT"/>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox2">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area2">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="quit_cancelbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	      <signal name="clicked" handler="on_quit_cancelbutton_clicked" last_modification_time="Wed, 31 Aug 2005 05:57:10 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="quit_okbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	      <signal name="clicked" handler="on_quit_okbutton_clicked" last_modification_time="Tue, 02 Aug 2005 17:48:36 GMT"/>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox12">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkImage" id="image36">
-	      <property name="visible">True</property>
-	      <property name="stock">gtk-dialog-question</property>
-	      <property name="icon_size">6</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="quit_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Quit xnec2c?</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="error_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Error</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_CENTER</property>
-  <property name="modal">True</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">True</property>
-  <signal name="delete_event" handler="on_error_dialog_delete_event" last_modification_time="Fri, 16 Dec 2005 12:33:54 GMT"/>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox4">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area4">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="error_quitbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-quit</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	      <signal name="clicked" handler="on_error_quitbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:57:12 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="error_okbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	      <signal name="clicked" handler="on_error_okbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:56:32 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="error_stopbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-stop</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">0</property>
-	      <signal name="clicked" handler="on_error_stopbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:54:54 GMT"/>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox14">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkImage" id="image38">
-	      <property name="visible">True</property>
-	      <property name="stock">gtk-dialog-error</property>
-	      <property name="icon_size">6</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="error_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Error</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkDialog" id="animate_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Near Field Animation</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_MOUSE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">True</property>
-  <signal name="destroy" handler="on_animate_dialog_destroy" last_modification_time="Fri, 16 Dec 2005 11:19:27 GMT"/>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox5">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area5">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="animation_applybutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-10</property>
-	      <signal name="clicked" handler="on_animation_applybutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:17:25 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="animation_cancelbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	      <signal name="clicked" handler="on_animation_cancelbutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:17:32 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="animation_okbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="has_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	      <signal name="clicked" handler="on_animation_okbutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:20:17 GMT"/>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkTable" id="table1">
-	  <property name="visible">True</property>
-	  <property name="n_rows">2</property>
-	  <property name="n_columns">2</property>
-	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">0</property>
-	  <property name="column_spacing">0</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label17">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Steps/Cycle</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">2</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_padding">2</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label18">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Animate Frequency (Hz)</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">2</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_padding">2</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="animate_steps_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Steps per Cycle of Excitation</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">0</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">36 12 360 1 10 0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="y_padding">4</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="animate_freq_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="tooltip" translatable="yes">Frequency of Excitaion Animation</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">1</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">1 0.10000000149 10 0.10000000149 10 0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="y_padding">4</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="nec2_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Xnec2c: NEC2 Input File Editor</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="delete_event" handler="on_nec2_editor_delete_event" last_modification_time="Wed, 04 Jan 2006 05:48:29 GMT"/>
-  <signal name="destroy" handler="on_nec2_editor_destroy" last_modification_time="Wed, 04 Jan 2006 05:48:41 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox4">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkHBox" id="hbox16">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame8">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment8">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox17">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_row_add">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-add</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="on_nec2_row_add_clicked" last_modification_time="Thu, 12 Jan 2006 12:49:14 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_row_remv">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-remove</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="on_nec2_row_remv_clicked" last_modification_time="Thu, 12 Jan 2006 12:48:51 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_treeview_clear">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-clear</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="on_nec2_treeview_clear_clicked" last_modification_time="Thu, 12 Jan 2006 17:02:08 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label23">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Edit Tree View Rows</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">2</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame7">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment7">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox18">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_save_as">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-save-as</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="on_nec2_save_as_clicked" last_modification_time="Wed, 11 Jan 2006 11:50:38 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_save">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-save</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="on_nec2_save_clicked" last_modification_time="Wed, 11 Jan 2006 11:44:36 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkCheckButton" id="nec2_apply_checkbutton">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-apply</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <property name="active">True</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="nec2_revert">
-			  <property name="border_width">2</property>
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-revert-to-saved</property>
-			  <property name="use_stock">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">False</property>
-			  <signal name="clicked" handler="on_nec2_revert_clicked" last_modification_time="Fri, 13 Jan 2006 05:05:19 GMT"/>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label22">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">NEC2 Input File</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">2</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame6">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment6">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="scrolledwindow5">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="nec2_cmnt_treeview">
-		      <property name="height_request">138</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">True</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="button_press_event" handler="on_nec2_cmnt_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:02 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label21">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Comments</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame9">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment9">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table34">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">8</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="gw">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Wire</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gw_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="ga">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Arc</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_ga_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:17 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gh">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Helix</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gh_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="sp">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Patch</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_sp_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gr">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Cylinder</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gr_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:34 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">4</property>
-		      <property name="right_attach">5</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gm">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Move</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gm_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:23 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">5</property>
-		      <property name="right_attach">6</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gx">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Reflect</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gx_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:13 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">6</property>
-		      <property name="right_attach">7</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gs">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Scale</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gs_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">7</property>
-		      <property name="right_attach">8</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label24">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Edit Geometry Data</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame5">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment5">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="scrolledwindow4">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="nec2_geom_treeview">
-		      <property name="height_request">204</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">True</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="button_press_event" handler="on_nec2_geom_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:24 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label20">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Geometry</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame10">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment10">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table4">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">6</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="ex">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Excitation</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_ex_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:18 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="fr">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Frequency</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_fr_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:29 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gn">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Ground (GN)</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gn_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:38 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="rp">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Radiation</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_rp_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="ld">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Loading</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_ld_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:45 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="nt">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Network</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_nt_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:52 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">4</property>
-		      <property name="right_attach">5</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="tl">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Trans. Line</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_tl_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:36 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">5</property>
-		      <property name="right_attach">6</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="ne">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Near Fields</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_ne_clicked" last_modification_time="Fri, 11 Aug 2006 18:48:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="xq">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Execute</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_xq_clicked" last_modification_time="Tue, 18 Apr 2006 07:50:10 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">5</property>
-		      <property name="right_attach">6</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="kh">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Interaction</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_kh_clicked" last_modification_time="Tue, 18 Apr 2006 07:40:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">4</property>
-		      <property name="right_attach">5</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="ek">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Kernel</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_ek_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:59 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkButton" id="gd">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Ground (GD)</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <signal name="clicked" handler="on_gd_clicked" last_modification_time="Fri, 18 Aug 2006 08:33:53 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label25">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Edit Control Commands</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame4">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment4">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="scrolledwindow3">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="nec2_cmnd_treeview">
-		      <property name="height_request">204</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">True</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="button_press_event" handler="on_nec2_cmnd_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:36 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label19">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Commands</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">2</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="wire_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Wire Element (GW & GC cards)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_wire_editor_destroy" last_modification_time="Tue, 17 Jan 2006 13:00:03 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox5">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame11">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkTable" id="table2">
-	      <property name="visible">True</property>
-	      <property name="n_rows">6</property>
-	      <property name="n_columns">4</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">2</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label29">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">No. Segments</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label30">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Segs % lambda</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label31">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"></property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label32">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire X1</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label33">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Wire Y1</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">True</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label34">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Z1</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label36">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire X2</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label37">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Y2</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label38">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Z2</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_tagnum_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 1 100000 1 10 0</property>
-		  <signal name="value_changed" handler="on_wire_tagnum_spinbutton_value_changed" last_modification_time="Sat, 29 Jul 2006 07:53:57 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_numseg_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">15 1 100000 1 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:21 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_pcl_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_pcl_spinbutton_value_changed" last_modification_time="Sat, 21 Jan 2006 05:14:49 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_x1_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:02 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_y1_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:11 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_z1_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">-1 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:42 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_z2_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:51 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_y2_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:37 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_x2_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:51 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label28">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Tag Number</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_dia_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0.00300000002608 0 100 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:49:54 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label35">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Diameter</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label39">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Length</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_len_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">2 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_len_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:35:13 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label44">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Conductivity S/m</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="wire_res_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_wire_res_spinbutton_value_changed" last_modification_time="Mon, 06 Mar 2006 16:17:50 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkCheckButton" id="wire_taper_checkbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Tapered Wire</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">False</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	      <signal name="toggled" handler="on_wire_taper_checkbutton_toggled" last_modification_time="Tue, 17 Jan 2006 13:52:40 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">2</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="wire_taperframe">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment12">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table3">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">4</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label40">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Length Taper</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label41">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Diameter Seg 1</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label42">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Diameter Seg N</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label43">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Diam. Taper</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="wire_rdia_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.920000016689 0.5 2 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_wire_rdia_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:36:34 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="wire_dian_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.0179999992251 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Tue, 24 Jan 2006 17:03:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="wire_dia1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.0309999994934 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_wire_rdia_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="wire_rlen_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.920000016689 0.5 2 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_wire_rlen_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:36:02 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label27">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Wire Taper Data</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox21">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">2</property>
-
-	  <child>
-	    <widget class="GtkButton" id="wire_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_wire_new_button_clicked" last_modification_time="Mon, 23 Jan 2006 09:12:34 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="wire_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_wire_cancel_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:32:24 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment50">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox48">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image70">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label222">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="wire_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_wire_apply_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:32:42 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="wire_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_wire_ok_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:33:02 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="patch_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Patch Element (SP & SC Cards)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_patch_editor_destroy" last_modification_time="Tue, 25 Jul 2006 05:59:53 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox6">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
-
-      <child>
-	<widget class="GtkFrame" id="patch_type_frame">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment13">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox22">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="patch_arbitrary_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Arbitary</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_patch_arbitrary_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:28:57 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="patch_rectangular_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Rectangle</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">patch_arbitrary_radiobutton</property>
-		      <signal name="toggled" handler="on_patch_rectangular_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:10 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="patch_triangular_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Triangle</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">patch_arbitrary_radiobutton</property>
-		      <signal name="toggled" handler="on_patch_triangular_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:22 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="patch_quadrilateral_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Quadrilateral</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">patch_arbitrary_radiobutton</property>
-		      <signal name="toggled" handler="on_patch_quadrilateral_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:32 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="patch_surface_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Surface</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">patch_arbitrary_radiobutton</property>
-		      <signal name="toggled" handler="on_patch_surface_radiobutton_toggled" last_modification_time="Thu, 03 Aug 2006 07:11:38 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label45">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Patch Type</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="patch_sm_frame">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment18">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table10">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label87">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Corners 1-2 sub-division (NX)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label88">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Corners 2-3 sub-division (NY)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_nx_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">8 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_ny_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">8 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label86">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Surface Sub-division</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame13">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment14">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table5">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_x1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Center - X</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_y1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Center - Y</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_z1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Center - Z</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_x1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_y1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_z1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:51 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_x2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">45 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:32 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_y2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">45 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:15 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="patch_z2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.10000000149 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:43 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_x2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Normal - Elev.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_y2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Normal - Azim.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="patch_z2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Patch Area</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label46">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">SP/SM Cards</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="patch_sc_frame">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment15">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox7">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">2</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table6">
-		      <property name="visible">True</property>
-		      <property name="n_rows">2</property>
-		      <property name="n_columns">3</property>
-		      <property name="homogeneous">False</property>
-		      <property name="row_spacing">2</property>
-		      <property name="column_spacing">2</property>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_x3_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:54 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_y3_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:23 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_z3_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:36 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label54">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 3 - X</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label57">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 3 - Y</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label58">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 3 - Z</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkTable" id="patch_sc_table">
-		      <property name="visible">True</property>
-		      <property name="n_rows">2</property>
-		      <property name="n_columns">3</property>
-		      <property name="homogeneous">False</property>
-		      <property name="row_spacing">2</property>
-		      <property name="column_spacing">2</property>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_x4_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:47 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_y4_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:00 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkSpinButton" id="patch_z4_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">0.00999999977648</property>
-			  <property name="digits">5</property>
-			  <property name="numeric">True</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:10 GMT"/>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_padding">2</property>
-			  <property name="y_padding">4</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label55">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 4 - X</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label56">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 4 - Y</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label59">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Corner 4 - Z</property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.10000000149</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label47">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">SC Card</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox23">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">2</property>
-
-	  <child>
-	    <widget class="GtkButton" id="patch_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_patch_new_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:49:47 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="patch_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_patch_cancel_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:49:54 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment51">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox49">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image71">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label223">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="patch_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_patch_apply_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:50:00 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="patch_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_patch_ok_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:50:07 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="arc_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Arc Element (GA card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">True</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_arc_editor_destroy" last_modification_time="Mon, 31 Jul 2006 04:10:17 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox8">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame14">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment16">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table7">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">4</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label66">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 1 Angle</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label67">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 2 Angle</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_end1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">45 -360 360 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_end2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">135 -360 360 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:14:07 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_tagnum_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_arc_tagnum_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:15:04 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_numseg_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">15 1 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:06 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label63">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label64">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">No. Segments</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label65">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Radius from Y</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_rad_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:21 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label69">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segs % lambda</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_pcl_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_pcl_spinbutton_value_changed" last_modification_time="Mon, 31 Jul 2006 10:27:40 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_res_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_res_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:37:42 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label70">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Conductivity S/m</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label68">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Wire Diameter</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="arc_dia_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.00300000002608 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:14:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">3</property>
-		      <property name="right_attach">4</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label60">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Wire Arc Data</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox24">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">2</property>
-
-	  <child>
-	    <widget class="GtkButton" id="arc_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_arc_new_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:26 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="arc_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_arc_cancel_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:15 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment52">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox50">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image72">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label224">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="arc_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_arc_apply_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:04 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="arc_ok_buttonbutton">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_arc_ok_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:10:53 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="transform_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Co-ordinate Transformation (GM card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_transform_editor_destroy" last_modification_time="Sat, 05 Aug 2006 10:48:57 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox9">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame15">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment17">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table8">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label62">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Increment</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label98">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">New Structures</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label99">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Start From Tag</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label100">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Rotate about X</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label101">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Rotate about Y</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label102">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Rotate about Z</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label103">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Move along X</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label104">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Move along Y</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label105">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Move along Z</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_my_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_mx_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:27 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_mz_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:52 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_rx_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 11:13:43 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_taginc_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:24:27 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_new_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:24:53 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_start_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:25:26 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_ry_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="transform_rz_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:10 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label61">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Co-ordinate Transformation Data</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox25">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="transform_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_transform_new_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:34:23 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="transform_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_transform_cancel_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:34:13 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment53">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox51">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image73">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label225">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="transform_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_transform_apply_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:33:56 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="transform_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_transform_ok_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:33:43 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="helix_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Helical Element (GA card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_helix_editor_destroy" last_modification_time="Tue, 01 Aug 2006 07:43:24 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox10">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame16">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkTable" id="table9">
-	      <property name="visible">True</property>
-	      <property name="n_rows">7</property>
-	      <property name="n_columns">4</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">2</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label72">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Segments/Turn</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label73">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Segs % lambda</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label75">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Turns Spacing</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label76">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Helix Length</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">True</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_tagnum_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 1 100000 1 10 0</property>
-		  <signal name="value_changed" handler="on_helix_tagnum_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:05:59 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_numseg_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">8 1 100000 1 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:34:39 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_pcl_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_pcl_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:06:22 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_tspace_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 0 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:34:15 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_len_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">5 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:33:39 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label81">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Tag Number</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_nturns_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">8 0.10000000149 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_nturns_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:06:36 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label82">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Num. of Turns</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="helix_linkzo_radiobutton">
-		  <property name="border_width">2</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Link @ Z=0</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <signal name="toggled" handler="on_helix_linkzo_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:11 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="helix_linkzhl_radiobutton">
-		  <property name="border_width">2</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Link @ Z=HL</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">helix_linkzo_radiobutton</property>
-		  <signal name="toggled" handler="on_helix_linkzhl_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:17 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="helix_linkall_radiobutton">
-		  <property name="border_width">2</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Link all Radii</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">True</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">helix_linkzo_radiobutton</property>
-		  <signal name="toggled" handler="on_helix_linkall_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:05 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkCheckButton" id="helix_lh_checkbutton">
-		  <property name="border_width">2</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Left Hand</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <signal name="toggled" handler="on_helix_lh_checkbutton_toggled" last_modification_time="Tue, 01 Aug 2006 06:22:08 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_dia_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0.00300000002608 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:15 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_res_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_res_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:09:23 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label80">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Wire Diameter</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label84">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Conductivity S/m</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_radyzhl_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:34:55 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">6</property>
-		  <property name="bottom_attach">7</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label79">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Rad. @ Y,Z=HL</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">3</property>
-		  <property name="right_attach">4</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label83">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Radius @ Y,Z=0</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_radyzo_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:46 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">6</property>
-		  <property name="bottom_attach">7</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label78">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Rad. @ X,Z=HL</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_radxzhl_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:35 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">2</property>
-		  <property name="right_attach">3</property>
-		  <property name="top_attach">6</property>
-		  <property name="bottom_attach">7</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label77">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Radius @ X,Z=0</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.10000000149</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="helix_radxzo_spinbutton">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">0.00999999977648</property>
-		  <property name="digits">5</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">False</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:34:20 GMT"/>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">6</property>
-		  <property name="bottom_attach">7</property>
-		  <property name="x_padding">2</property>
-		  <property name="y_padding">4</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label85">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">GH Card</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">2</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox26">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">2</property>
-
-	  <child>
-	    <widget class="GtkButton" id="helix_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_helix_new_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:09 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="helix_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_helix_cancel_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:22 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment54">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox52">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image74">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label226">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="helix_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_helix_apply_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:33 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="helix_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_helix_ok_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:46 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="reflect_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Reflect Structure (GX card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_reflect_editor_destroy" last_modification_time="Fri, 04 Aug 2006 09:47:36 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox11">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame17">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment19">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table11">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">8</property>
-		  <property name="column_spacing">8</property>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="reflect_y_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Reflect in XZ plane</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="reflect_taginc_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">1</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_reflect_taginc_spinbutton_value_changed" last_modification_time="Fri, 25 Aug 2006 14:41:57 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="reflect_z_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Reflect in XY plane</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:30 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="reflect_x_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Reflect in YZ plane</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:20 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label91">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number Increment</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label90">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Reflect Options</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox27">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="reflect_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_reflect_new_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:25 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="reflect_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_reflect_cancel_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:18 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment55">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox53">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image75">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label227">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="reflect_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_reflect_apply_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:07 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="reflect_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_reflect_ok_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:46:53 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="scale_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Scale Structure (GS card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_scale_editor_destroy" last_modification_time="Fri, 04 Aug 2006 13:21:55 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox12">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame18">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment20">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table35">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">True</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label217">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Structure Scale Factor</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label220">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">From Tag No.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label221">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">To Tag No.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="scale_from_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:07:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="scale_to_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:07:11 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="scale_factor_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0 100000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:06:47 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label93">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Scale Strucure</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox28">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="scale_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_scale_new_button_clicked" last_modification_time="Fri, 04 Aug 2006 14:38:11 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="scale_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_scale_cancel_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:28:15 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment56">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox54">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image76">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label228">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="scale_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_scale_apply_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:28:51 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="scale_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_scale_ok_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:29:14 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="cylinder_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Cylindrical Structure (GR card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_cylinder_editor_destroy" last_modification_time="Sat, 05 Aug 2006 07:28:12 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox13">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame19">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment21">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table12">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">8</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label95">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number Increment</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label97">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Number of Structures</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="cylinder_taginc_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 0 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_cylinder_taginc_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 07:09:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="cylinder_total_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 100000 1 10 0</property>
-		      <signal name="value_changed" handler="on_cylinder_total_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 07:09:11 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label96">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Cylindrical Structure</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox30">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="cylinder_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_cylinder_new_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:31 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="cylinder_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_cylinder_cancel_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:42 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment57">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox55">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image77">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label229">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="cylinder_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_cylinder_apply_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:53 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="cylinder_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_cylinder_ok_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:24:07 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="kernel_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Thin Wire Kernel (EK Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_kernel_command_destroy" last_modification_time="Tue, 08 Aug 2006 06:40:15 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox14">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame21">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment23">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkCheckButton" id="kernel_checkbutton">
-		  <property name="border_width">8</property>
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Extended Thin Wire Kernel</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">True</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <signal name="toggled" handler="on_kernel_checkbutton_toggled" last_modification_time="Tue, 08 Aug 2006 06:29:05 GMT"/>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label107">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Thin Wire Kernel</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox31">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="kernel_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_kernel_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:13 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="kernel_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_kernel_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:25 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment58">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox56">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image78">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label230">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="kernel_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_kernel_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:33 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="kernel_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_kernel_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:44 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="execute_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Execute Command (XQ Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_execute_command_destroy" last_modification_time="Tue, 08 Aug 2006 06:40:03 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox15">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame20">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment22">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table14">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="execute_none_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">No Pattern Cuts</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:31:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="execute_xz_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Pattern in XZ Plane</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">execute_none_radiobutton</property>
-		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:32:03 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="execute_yz_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Pattern in YZ Plane</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">execute_none_radiobutton</property>
-		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:32:12 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="execute_both_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Both XZ/YZ Patterns</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">execute_none_radiobutton</property>
-		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Sat, 12 Aug 2006 06:41:18 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label106">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Execute Command</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox32">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="execute_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_execute_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:26 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="execute_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_execute_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:39 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment59">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox57">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image79">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label231">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="execute_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_execute_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:46 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="execute_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_execute_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:59 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="intrange_command">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Interaction Approx Range (KH Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_intrange_command_destroy" last_modification_time="Tue, 08 Aug 2006 11:28:25 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox16">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame22">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment24">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox34">
-		  <property name="border_width">8</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label109">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Approximation Range (W/lengths)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="intrange_wlen_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_intrange_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:31:33 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">4</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label108">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Interaction Approximation Range</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox33">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="intrange_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_intrange_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:27:05 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="intrange_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_intrange_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:55 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment60">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox58">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image80">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label232">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="intrange_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_intrange_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:49 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="intrange_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_intrange_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:39 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="ground_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Ground Parameters (GN & GD Cards)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_ground_command_destroy" last_modification_time="Tue, 08 Aug 2006 08:57:08 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox17">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame23">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment25">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table15">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="ground_perf_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Perfect Ground</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:27 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="ground_refl_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Reflection Coeff. Approx</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">ground_perf_radiobutton</property>
-		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:35 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="ground_smfld_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Sommerfeld/Norton</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">ground_perf_radiobutton</property>
-		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:43 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="ground_null_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Nullify Previous Params</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">ground_perf_radiobutton</property>
-		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:52 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="ground_radl_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Radial Ground Screen</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_ground_checkbutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:29:15 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="ground_secmd_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Second Medium (Cliff)</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_ground_checkbutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:29:06 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label110">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Ground Type</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="ground_med1_frame">
-	  <property name="border_width">4</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment26">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table16">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_diel1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:29 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_res1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:38 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label116">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label117">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label111">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">1st Medium Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="ground_med2_frame">
-	  <property name="border_width">4</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment27">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table18">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label118">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label123">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label124">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Distance to 2nd Medium</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label125">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Dist. below 1st Medium</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_diel2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_res2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_below_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Sat, 12 Aug 2006 06:24:10 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_dist2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:04 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label114">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">2nd Medium Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="ground_radial_frame">
-	  <property name="border_width">4</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment28">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table17">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label126">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Number of Radials</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.899999976158</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label127">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Radial Screen Radius</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label128">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Radial Wire Diameter</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_nrad_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 1000 1 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_diam_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.00499999988824 9.99999974738e-06 10 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:31:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground_scrnrd_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:50 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label115">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Radial Screen Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox35">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="ground_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:30:53 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:02 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment61">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox59">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image81">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label233">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:13 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:19 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="nearfield_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Near Fields Command (NE/NH Cards)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_nearfield_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:30 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox18">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame27">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment29">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table20">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">True</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="nearfield_nh_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Near Magnetic Field</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_nearfield_nh_checkbutton_toggled" last_modification_time="Sun, 20 Aug 2006 05:19:50 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="nearfield_ne_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Near Electric Field</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_nearfield_ne_checkbutton_toggled" last_modification_time="Sun, 20 Aug 2006 05:19:40 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="nearfield_rect_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Rectangular Co-ordinates</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_nearfield_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:58:34 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="nearfield_sph_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Spherical Co-ordinates</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">nearfield_rect_radiobutton</property>
-		      <signal name="toggled" handler="on_nearfield_radiobutton_toggled" last_modification_time="Sat, 12 Aug 2006 05:40:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label129">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Field Type & Co-ordinates</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame28">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment30">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table19">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_i1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">NX</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_i2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">NY</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_i3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">NZ</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">X</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Y</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Z</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f4_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">DX</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f5_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">DY</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="nearfield_f6_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">DZ</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_nx_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:55:44 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_ny_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:55:52 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_nz_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:33 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:42 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:50 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f5_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:57:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="nearfield_f6_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:57:09 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label130">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Field Pattern Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox36">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="nearfield_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_nearfield_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:37:42 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="nearfield_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_nearfield_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:37:48 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment62">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox60">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image82">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label234">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="nearfield_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_nearfield_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:38:03 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="nearfield_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_nearfield_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:38:10 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="radiation_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Radiation Pattern (RP Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="icon_name">gtk-dialog-info</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_radiation_command_destroy" last_modification_time="Wed, 09 Aug 2006 13:24:07 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox19">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame29">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment31">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table21">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i10_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Normal (Space) Wave</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:43:16 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i16_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Circular Cliff + Radials</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:54 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i14_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Radial wire screen</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:18 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i12_radiobutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Linear Cliff</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:45:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i11_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Space + Ground Wave</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:45:43 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i13_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Circular Cliff</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:08 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_i15_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Linear Cliff + Radials</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:29 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label145">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes"><b>See GN/GD Card Documentation</b></property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label140">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Wave Type and Ground (I1)</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame33">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment35">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table22">
-		  <property name="visible">True</property>
-		  <property name="n_rows">10</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_x0_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Major & Minor Axis & Total Gain</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:08 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_x1_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Vertical, Horizontal & Total Gain</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_x0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:20 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n0_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">No Normalized Gain</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:32 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n2_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Minor Axis Gain Normalized</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_n0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:51 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n4_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Horizontal Axis Gain Normalized</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_n0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:11 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_d0_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Print/Normalize Power Gain</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:28 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">6</property>
-		      <property name="bottom_attach">7</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_a0_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">No Gain Averaging</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">8</property>
-		      <property name="bottom_attach">9</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_a2_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Points in Average Not Printed</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_a0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:49:03 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">9</property>
-		      <property name="bottom_attach">10</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_a1_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Average Gain Computed</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_a0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">8</property>
-		      <property name="bottom_attach">9</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_d1_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Print/Normalize Directive Gain</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_d0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">6</property>
-		      <property name="bottom_attach">7</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n5_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Total Gain Normalized</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_n0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n3_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Vertical Axis Gain Normalized</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_n0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:00 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiation_n1_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Major Axis Gain Normalized</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiation_n0_radiobutton</property>
-		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:41 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label146">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes"><b>See RP Card Documentation</b></property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">9</property>
-		      <property name="bottom_attach">10</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator5">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator6">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options">fill</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator7">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_options">fill</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator8">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options">fill</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator9">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">7</property>
-		      <property name="bottom_attach">8</property>
-		      <property name="x_options">fill</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator10">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">7</property>
-		      <property name="bottom_attach">8</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options">fill</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label144">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Data Output Control (XNDA)</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame31">
-	  <property name="border_width">5</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment33">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table23">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="radiation_f6_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Gain Normalization</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:57 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f6_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:52:04 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="radiation_f1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Initial Theta (deg)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label148">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Initial Phi (deg)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_i3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_i2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">4 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="radiation_i1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Points in Phi</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label210">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Points in Theta</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="radiation_f3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Increment in Theta</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">5 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:09 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="radiation_f5_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Field Point Distance</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f5_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:36 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label150">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Increment in Phi</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="radiation_f4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">5 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:25 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label142">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Radiation Pattern Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox37">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="radiation_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_radiation_new_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:26:01 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="radiation_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_radiation_cancel_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:46 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment63">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox61">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image83">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label235">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="radiation_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_radiation_apply_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:40 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="radiation_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_radiation_ok_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:23 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="excitation_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Excitation Command (EX Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_excitation_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:19 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox20">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame34">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment36">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table24">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i10_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Voltage Source</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:13 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i11_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Incident Linear Wave </property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">excitation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:41 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i12_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Incident RH Wave</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">excitation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i13_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Incident LH Wave</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">excitation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:07 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i15_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Current Slope Discontinuity</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">excitation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:29 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="excitation_i14_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Current Source</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">excitation_i10_radiobutton</property>
-		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:18 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label153">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Excitation Type</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame35">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment37">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox39">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="excitation_i419_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Maximum Admittance Matrix Asymmetry</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_excitation_checkbutton_toggled" last_modification_time="Tue, 15 Aug 2006 07:56:58 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckButton" id="excitation_i420_checkbutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Impedance of Source Segment</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_excitation_checkbutton_toggled" last_modification_time="Tue, 15 Aug 2006 07:57:08 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label154">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Print Control</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame36">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment38">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table25">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_i2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_i3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segment Number</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Voltage - Real Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Voltage - Imaginary Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Eta</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f4_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Theta</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f5_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Phi</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="excitation_f6_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Ratio</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_i2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:13 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_i3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:27 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:48 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:57 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:07 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f5_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:16 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f6_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:25 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="excitation_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:39 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label155">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Excitation Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox38">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="excitation_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_excitation_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:39 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="excitation_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_excitation_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:30 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment64">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox62">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image84">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label236">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="excitation_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_excitation_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:20 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="excitation_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_excitation_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:13 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="frequency_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Frequecy Command (FR Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_frequency_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:05 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox21">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame37">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment39">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox41">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="frequency_add_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Additive Stepping</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_frequency_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 14:11:28 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="frequency_mul_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Multiplicative Stepping</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">frequency_add_radiobutton</property>
-		      <signal name="toggled" handler="on_frequency_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 14:11:38 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label165">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Frequency Stepping</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame38">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment40">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table26">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label167">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">No. Frequency Points</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label168">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Frequency Step (MHz)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="frequency_num_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">11 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:11:49 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="frequency_step_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.10000000149 -1000 1000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_frequency_step_spinbutton_value_changed" last_modification_time="Wed, 16 Aug 2006 06:38:58 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label170">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Start Frequency (MHz)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label171">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End Frequency (MHz)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="frequency_start_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">50 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:12:06 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="frequency_end_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">100 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:14:12 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label166">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Frequency Stepping Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox40">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="frequency_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_frequency_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:12:59 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="frequency_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_frequency_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:08 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment65">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox63">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image85">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label237">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="frequency_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_frequency_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:18 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="frequency_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_frequency_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:27 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="loading_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Loading Command (LD Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_loading_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:52 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox22">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame39">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment41">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table27">
-		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_slrlc_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Series, Lumped</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:06 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_pdrlc_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Parallel, Distributed</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:40:48 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_rr_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Resistance & Reactance</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_plrlc_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Parallel, Lumped</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:29 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_sdrlc_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Series, Distributed</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_wcon_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Wire Conductivity</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:48 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="loading_null_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Short all Loads (Nulls previous Loading Cards)</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">loading_slrlc_radiobutton</property>
-		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:40:58 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label172">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Loading Type</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="loading_frame">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment42">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table28">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">3</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_i2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Load Tag Number</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_i3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">From Segment #</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_i4_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">To Segment #</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_f1_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Resistance</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_f2_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Inductance</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="loading_f3_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Capacitance</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0 1000000000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:40:20 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_i2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:11 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_i3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">2 0 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:25 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_i4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">3 0 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:40 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -1000000 1000000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:39:54 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="loading_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0 1000000000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:39:44 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">2</property>
-		      <property name="right_attach">3</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label173">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Loading Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox42">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="loading_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loading_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:31:15 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="loading_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loading_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:31:07 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment66">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox64">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image86">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label238">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="loading_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loading_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:30:49 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="loading_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_loading_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:30:42 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="network_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Network Command (NT Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_network_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:42 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox23">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame41">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment43">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table29">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label184">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number, Port 2  </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_i4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:15:33 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_i1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:14:27 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_i2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:14:41 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label183">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segment Num, Port 1</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label182">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number, Port 1  </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label185">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segment Num, Port 2</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_i3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">2 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:15:15 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label180">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Segment Identity</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame42">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment44">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table30">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label186">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 1,1 Real Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label187">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 1,1 Imag Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label189">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 1,2 Real Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label190">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 1,2 Imag Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:25 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:35 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label191">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 2,2 Real Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label192">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Element 2,2 Imag Part</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:05 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:15 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f6_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:55 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="network_f5_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:46 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label181">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Admittance Matrix Elements</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox43">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="network_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_network_new_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:05 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="network_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_network_cancel_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:25 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment67">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox65">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image87">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label239">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="network_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_network_apply_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:37 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="network_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_network_ok_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:45 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="txline_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Trans. Line Command (TL Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_txline_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:29 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox24">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame43">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment45">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table31">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_i4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:54 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_i1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:10 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_i2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:25 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label194">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segment Num, End 1</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label195">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number, End 1  </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label196">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Segment Num, End 2</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_i3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">0</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">2 1 10000 1 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:37 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label193">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Tag Number, End 2  </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label197">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Segment Identity</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkFrame" id="frame44">
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment46">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table32">
-		  <property name="visible">True</property>
-		  <property name="n_rows">6</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">0</property>
-		  <property name="column_spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label198">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Characteristic Impedance</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">4</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label199">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Length of Tx Line (m)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">4</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label200">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 1 Y Real Part (S)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label201">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 1 Y Imag Part (S)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f3_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:44 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f4_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label202">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 2 Y Real Part (S)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label203">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">End 2 Y Imag Part (S)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.10000000149</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f1_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f2_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:33 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f6_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:41:19 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="txline_f5_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:41:08 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkCheckButton" id="txline_crossed_checkbutton">
-	      <property name="border_width">4</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Crossed Transmission Line</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">False</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	      <signal name="toggled" handler="on_txline_checkbutton_toggled" last_modification_time="Sat, 12 Aug 2006 05:51:26 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox44">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="txline_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_txline_new_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:41:45 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="txline_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_txline_cancel_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:41:55 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment68">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox66">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image88">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label240">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="txline_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_txline_apply_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:42:05 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="txline_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_txline_ok_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:42:17 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="ground2_command">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Ground Parameters (GD Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_ground2_command_destroy" last_modification_time="Fri, 18 Aug 2006 10:54:46 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox25">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame45">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment47">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table33">
-		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">2</property>
-		  <property name="column_spacing">2</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label204">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label205">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label206">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Distance to 2nd Medium</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label207">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Dist. below 1st Medium</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground2_diel_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:05:02 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground2_res_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 12:13:38 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground2_below_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:04:48 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSpinButton" id="ground2_dist_spinbutton">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="climb_rate">0.00999999977648</property>
-		      <property name="digits">5</property>
-		      <property name="numeric">True</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		      <property name="snap_to_ticks">False</property>
-		      <property name="wrap">False</property>
-		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
-		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:04:56 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label208">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">2nd Medium Parameters</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox45">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="ground2_new_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-new</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground2_new_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:21 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground2_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground2_cancel_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:29 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment69">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox67">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image89">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label241">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground2_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground2_apply_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:06 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ground2_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_ground2_ok_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:06:59 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="gend_editor">
-  <property name="border_width">4</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Geometry End (GE Card)</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <signal name="destroy" handler="on_gend_editor_destroy" last_modification_time="Tue, 22 Aug 2006 07:30:16 GMT"/>
-
-  <child>
-    <widget class="GtkVBox" id="vbox26">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-	<widget class="GtkFrame" id="frame46">
-	  <property name="border_width">4</property>
-	  <property name="visible">True</property>
-	  <property name="label_xalign">0</property>
-	  <property name="label_yalign">0.5</property>
-	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment48">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">12</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox27">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="gend_nognd_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">No Ground, Free Space condition</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">True</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:15:39 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="gend_img_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Ground present, Strucure reflection</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">gend_nognd_radiobutton</property>
-		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:16:02 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="gend_noimg_radiobutton">
-		      <property name="border_width">2</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Ground present, no Structure reflection</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">gend_nognd_radiobutton</property>
-		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:16:20 GMT"/>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label211">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Ground Plane type</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">4</property>
-	      <property name="ypad">4</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="type">label_item</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox46">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="gend_cancel_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_gend_cancel_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:10 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment70">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox68">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image90">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-delete</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label242">
-			  <property name="visible">True</property>
-			  <property name="label">Delete Card</property>
-			  <property name="use_underline">True</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="gend_apply_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-apply</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_gend_apply_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:16 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="gend_ok_button">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_gend_ok_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:32 GMT"/>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkAboutDialog" id="aboutdialog">
-  <property name="border_width">5</property>
-  <property name="visible">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="name" translatable="yes">Xnec2c</property>
-  <property name="copyright" translatable="yes">(C) 2007-2010 Neoklis Kyriazis</property>
-  <property name="comments" translatable="yes">xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.
-
-xnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.
-
-xnec2c has a built-in NEC2 input file editor that makes it easier to create or edit antenna description files and specify NEC2 commands.
-
-PLEASE read the documantation in the doc/ sub-directory as xnec2c is not fully compatible with NEC2 input files and it works in different ways!</property>
-  <property name="license" translatable="yes">GPL v2 or higher</property>
-  <property name="wrap_license">False</property>
-  <property name="website">http://www.qsl.net/5b4az</property>
-  <property name="authors">Neoklis Kyriazis
-Ham Radio Call: 5B4AZ
-http://www.qsl.net/5b4az</property>
-  <property name="documenters">Neoklis Kyriazis</property>
-  <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
-  <signal name="close" handler="on_aboutdialog_close" last_modification_time="Tue, 27 Nov 2007 07:13:44 GMT"/>
-  <signal name="response" handler="on_aboutdialog_response" last_modification_time="Tue, 27 Nov 2007 07:42:36 GMT"/>
-</widget>
-
-</glade-interface>
diff --git a/xnec2c.gladep b/xnec2c.gladep
deleted file mode 100644
index 212a661..0000000
--- a/xnec2c.gladep
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
-  <name>Xnec2c</name>
-  <program_name>xnec2c</program_name>
-  <gnome_support>FALSE</gnome_support>
-</glade-project>
diff --git a/xnec2c.png b/xnec2c.png
deleted file mode 100644
index 29b3e57..0000000
Binary files a/xnec2c.png and /dev/null differ
diff --git a/xnec2c/xnec2c.glade b/xnec2c/xnec2c.glade
new file mode 100644
index 0000000..33520dc
--- /dev/null
+++ b/xnec2c/xnec2c.glade
@@ -0,0 +1,13691 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.2 -->
+<!--*- mode: xml -*-->
+<interface>
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkAboutDialog" id="aboutdialog">
+    <property name="name">Xnec2c</property>
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="type_hint">normal</property>
+    <property name="copyright" translatable="yes">(C) 2007-2017 Neoklis Kyriazis</property>
+    <property name="comments" translatable="yes">xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.
+
+xnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.
+
+xnec2c has a built-in NEC2 input file editor that makes it easier to create or edit antenna description files and specify NEC2 commands.
+
+PLEASE read the documantation in the doc/ sub-directory as xnec2c is not fully compatible with NEC2 input files and it works in different ways!</property>
+    <property name="website">http://www.qsl.net/5b4az</property>
+    <property name="authors">Neoklis Kyriazis
+	  Ham Radio Call: 5B4AZ
+	  http://www.qsl.net/5b4az</property>
+    <property name="documenters">Neoklis Kyriazis</property>
+    <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+    <property name="logo_icon_name">image-missing</property>
+    <property name="license_type">gpl-3-0</property>
+    <signal name="close" handler="on_aboutdialog_close" swapped="no"/>
+    <signal name="response" handler="on_aboutdialog_response" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="animate_freq_adjustment">
+    <property name="lower">0.10000000000000001</property>
+    <property name="upper">10</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.10000000000000001</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="animate_steps_adjustment">
+    <property name="lower">12</property>
+    <property name="upper">360</property>
+    <property name="value">36</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="animate_dialog">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Near Field Animation</property>
+    <property name="window_position">mouse</property>
+    <property name="type_hint">dialog</property>
+    <signal name="destroy" handler="on_animate_dialog_destroy" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <property name="homogeneous">True</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="animation_applybutton">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_animation_applybutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="animation_cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_animation_cancelbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="animation_okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_animation_okbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">2</property>
+            <property name="column_spacing">2</property>
+            <property name="row_homogeneous">True</property>
+            <property name="column_homogeneous">True</property>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Steps/Cycle</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Animate Freq (Hz)</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="animate_steps_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">animate_steps_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="animate_freq_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">animate_freq_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="digits">1</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-10">animation_applybutton</action-widget>
+      <action-widget response="-6">animation_cancelbutton</action-widget>
+      <action-widget response="-5">animation_okbutton</action-widget>
+    </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="arc_dia_adjustment">
+    <property name="upper">100</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_end1_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="value">45</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_end2_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="value">135</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_numseg_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">15</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_pcl_adjustment">
+    <property name="upper">30</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_rad_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_res_adjustment">
+    <property name="upper">1000000000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="arc_tagnum_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="arc_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Arc Element (GA card)</property>
+    <property name="destroy_with_parent">True</property>
+    <signal name="destroy" handler="on_arc_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">No. Segments</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segs % lambda</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Diameter</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_tagnum_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_tagnum_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_tagnum_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_numseg_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_numseg_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_pcl_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_pcl_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_pcl_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_dia_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_dia_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">0.01</property>
+                    <signal name="value-changed" handler="on_arc_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Radius from Y</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 1 Angle</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 2 Angle</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_rad_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_rad_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_end1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="max_length">7</property>
+                    <property name="width_chars">8</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_end1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_end2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="max_length">7</property>
+                    <property name="width_chars">8</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_end2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">135</property>
+                    <signal name="value-changed" handler="on_arc_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="arc_res_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">arc_res_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_arc_res_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Wire Arc Data</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="arc_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_arc_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="arc_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_arc_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="arc_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_arc_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="arc_ok_buttonbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_arc_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="cylinder_taginc_adjustment">
+    <property name="upper">100000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="cylinder_total_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="cylinder_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Cylindrical Structure (GR card)</property>
+    <signal name="destroy" handler="on_cylinder_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number Increment</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Number of Structures</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="cylinder_total_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">cylinder_total_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_cylinder_total_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="cylinder_taginc_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">cylinder_taginc_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_cylinder_taginc_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Cylindrical Structure</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="cylinder_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_cylinder_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cylinder_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_cylinder_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cylinder_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_cylinder_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cylinder_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_cylinder_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkDialog" id="error_dialog">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Xnec2c Error</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">center</property>
+    <property name="type_hint">dialog</property>
+    <signal name="delete-event" handler="on_error_dialog_delete_event" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="error_quitbutton">
+                <property name="label">gtk-quit</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_error_quitbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="error_okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_error_okbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="error_stopbutton">
+                <property name="label">gtk-stop</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_error_stopbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">4</property>
+                <property name="margin_right">4</property>
+                <property name="margin_top">4</property>
+                <property name="margin_bottom">4</property>
+                <property name="stock">gtk-dialog-error</property>
+                <property name="icon_size">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="error_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">4</property>
+                <property name="margin_right">4</property>
+                <property name="margin_top">4</property>
+                <property name="margin_bottom">4</property>
+                <property name="label" translatable="yes">Error</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-5">error_quitbutton</action-widget>
+      <action-widget response="-5">error_okbutton</action-widget>
+      <action-widget response="0">error_stopbutton</action-widget>
+    </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f5_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_f6_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_i2_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="excitation_i3_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="excitation_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Excitation Command (EX Card)</property>
+    <signal name="destroy" handler="on_excitation_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i13_radiobutton">
+                    <property name="label" translatable="yes">Incident LH Wave</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">excitation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i11_radiobutton">
+                    <property name="label" translatable="yes">Incident Linear Wave </property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">excitation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i14_radiobutton">
+                    <property name="label" translatable="yes">Current Source</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">excitation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i12_radiobutton">
+                    <property name="label" translatable="yes">Incident RH Wave</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">excitation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i15_radiobutton">
+                    <property name="label" translatable="yes">Current Slope Discontinuity</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">excitation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="excitation_i10_radiobutton">
+                    <property name="label" translatable="yes">Voltage Source</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_excitation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Excitation Type</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkCheckButton" id="excitation_i419_checkbutton">
+                    <property name="label" translatable="yes">Maximum Admittance Matrix Asymmetry</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_excitation_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="excitation_i420_checkbutton">
+                    <property name="label" translatable="yes">Impedance of Source Segment</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_excitation_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Print Control</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="excitation_i2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_i3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segment Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_i2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_i2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_i3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_i3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Voltage - Real Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Voltage - Imaginary Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Eta</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f4_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Theta</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f5_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Phi</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="excitation_f6_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Ratio</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f6_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f6_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f5_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f5_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="excitation_f4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">excitation_f4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_excitation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Excitation Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="excitation_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_excitation_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="excitation_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_excitation_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="excitation_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_excitation_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="excitation_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_excitation_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkWindow" id="execute_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Execute Command (XQ Card)</property>
+    <signal name="destroy" handler="on_execute_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="execute_none_radiobutton">
+                    <property name="label" translatable="yes">No Pattern Cuts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_execute_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="execute_xz_radiobutton">
+                    <property name="label" translatable="yes">Pattern in XZ Plane</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">execute_none_radiobutton</property>
+                    <signal name="toggled" handler="on_execute_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="execute_yz_radiobutton">
+                    <property name="label" translatable="yes">Pattern in YZ Plane</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">execute_none_radiobutton</property>
+                    <signal name="toggled" handler="on_execute_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="execute_both_radiobutton">
+                    <property name="label" translatable="yes">Both XZ/YZ Patterns</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">execute_none_radiobutton</property>
+                    <signal name="toggled" handler="on_execute_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Execute Command</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="execute_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_execute_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="execute_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_execute_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="execute_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_execute_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="execute_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_execute_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkFileChooserDialog" id="filechooserdialog">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">xnec2c</property>
+    <property name="role">GtkFileChooserDialog</property>
+    <property name="window_position">mouse</property>
+    <property name="type_hint">dialog</property>
+    <property name="do_overwrite_confirmation">True</property>
+    <property name="show_hidden">True</property>
+    <signal name="destroy" handler="on_filechooserdialog_destroy" swapped="no"/>
+    <signal name="response" handler="on_filechooserdialog_response" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="filechooserdialog_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_filechooserdialog_cancel_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="filechooser_open">
+                <property name="label">gtk-open</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-5">filechooser_open</action-widget>
+    </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="freqplots_zo_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">999</property>
+    <property name="value">50</property>
+    <property name="step_increment">0.10000000000000001</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="frequency_end_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">100</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="frequency_num_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">11</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="frequency_start_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">50</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="frequency_step_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">0.10000000000000001</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="frequency_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Frequecy Command (FR Card)</property>
+    <signal name="destroy" handler="on_frequency_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="spacing">2</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="frequency_add_radiobutton">
+                    <property name="label" translatable="yes">Additive Stepping</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_frequency_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="frequency_mul_radiobutton">
+                    <property name="label" translatable="yes">Multiplicative Stepping</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">frequency_add_radiobutton</property>
+                    <signal name="toggled" handler="on_frequency_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Frequency Stepping</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">No. Frequency Points</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="frequency_num_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">frequency_num_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_frequency_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Start Frequency (MHz)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="frequency_start_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">frequency_start_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_frequency_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Frequency Step (MHz)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="frequency_step_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">frequency_step_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">5</property>
+                    <signal name="value-changed" handler="on_frequency_step_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End Frequency (MHz)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="frequency_end_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">frequency_end_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_frequency_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Frequency Stepping Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="frequency_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_frequency_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="frequency_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_frequency_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="frequency_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_frequency_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="frequency_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_frequency_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkWindow" id="gend_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Geometry End (GE Card)</property>
+    <signal name="destroy" handler="on_gend_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkRadioButton" id="gend_nognd_radiobutton">
+                    <property name="label" translatable="yes">No Ground, Free Space condition</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_gend_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="gend_img_radiobutton">
+                    <property name="label" translatable="yes">Ground present, Strucure reflection</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">gend_nognd_radiobutton</property>
+                    <signal name="toggled" handler="on_gend_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="gend_noimg_radiobutton">
+                    <property name="label" translatable="yes">Ground present, no Structure reflection</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">gend_nognd_radiobutton</property>
+                    <signal name="toggled" handler="on_gend_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Ground Plane type</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="gend_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_gend_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="gend_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_gend_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="gend_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_gend_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="ground2_below_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground2_diel_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">12</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground2_dist_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground2_res_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="ground2_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Ground Parameters (GD Card)</property>
+    <signal name="destroy" handler="on_ground2_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Relative Dielectric Const.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground2_diel_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground2_diel_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground2_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Distance to 2nd Medium</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground2_dist_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground2_dist_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground2_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Ground Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground2_res_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground2_res_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground2_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Dist. below 1st Medium</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground2_below_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground2_below_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground2_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">2nd Medium Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="ground2_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground2_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground2_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_ground2_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground2_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground2_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground2_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground2_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="ground_below_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_diam_adjustment">
+    <property name="upper">10</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_diel1_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">12</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_diel2_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">12</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_dist2_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_nrad_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">1000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_res1_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_res2_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="ground_scrnrd_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="ground_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Ground Parameters (GN & GD Cards)</property>
+    <signal name="destroy" handler="on_ground_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="ground_perf_radiobutton">
+                    <property name="label" translatable="yes">Perfect Ground</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_ground_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="ground_smfld_radiobutton">
+                    <property name="label" translatable="yes">Sommerfeld/Norton</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">ground_perf_radiobutton</property>
+                    <signal name="toggled" handler="on_ground_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="ground_radl_checkbutton">
+                    <property name="label" translatable="yes">Radial Ground Screen</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_ground_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="ground_refl_radiobutton">
+                    <property name="label" translatable="yes">Reflection Coeff. Approx</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">ground_perf_radiobutton</property>
+                    <signal name="toggled" handler="on_ground_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="ground_null_radiobutton">
+                    <property name="label" translatable="yes">Nullify Previous Params</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">ground_perf_radiobutton</property>
+                    <signal name="toggled" handler="on_ground_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="ground_secmd_checkbutton">
+                    <property name="label" translatable="yes">Second Medium (Cliff)</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_ground_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Ground Type</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="ground_med1_frame">
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Relative Dielectric Const.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_diel1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_diel1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Ground Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_res1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_res1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="ground_med2_frame">
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Relative Dielectric Const.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_diel2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="text" translatable="yes">0.00000</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_diel2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Distance to 2nd Medium</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_dist2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_dist2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Ground Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_res2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_res2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Dist. below 1st Medium</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_below_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_below_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">2nd Medium Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="ground_radial_frame">
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="margin_right">4</property>
+                    <property name="label" translatable="yes">Number of Radials</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Radial Screen Radius</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_scrnrd_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_scrnrd_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_nrad_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_nrad_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Radial Wire Diameter</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="ground_diam_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">ground_diam_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">5</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_ground_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Radial Screen Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="ground_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_ground_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ground_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ground_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="helix_dia_adjustment">
+    <property name="lower">0.01</property>
+    <property name="upper">100</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_len_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_nturns_adjustment">
+    <property name="lower">0.10000000000000001</property>
+    <property name="upper">10000</property>
+    <property name="value">8</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_numseg_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">8</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_pcl_adjustment">
+    <property name="upper">30</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_radxzhl_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_radxzo_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_radyzhl_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_radyzo_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_res_adjustment">
+    <property name="upper">1000000000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_tagnum_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="helix_tspace_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="helix_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Helical Element (GA card)</property>
+    <signal name="destroy" handler="on_helix_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkCheckButton" id="helix_lh_checkbutton">
+                    <property name="label" translatable="yes">Left Hand</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_helix_lh_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="helix_linkall_radiobutton">
+                    <property name="label" translatable="yes">Link all Radii</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_helix_linkall_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="helix_linkzo_radiobutton">
+                    <property name="label" translatable="yes">Link @ Z=0</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">helix_linkall_radiobutton</property>
+                    <signal name="toggled" handler="on_helix_linkzo_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="helix_linkzhl_radiobutton">
+                    <property name="label" translatable="yes">Link @ Z=HL</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">helix_linkall_radiobutton</property>
+                    <signal name="toggled" handler="on_helix_linkzhl_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_tagnum_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_tagnum_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_tagnum_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Turns Spacing</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_tspace_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_tspace_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Radius @ X,Z=0</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_radxzo_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_radxzo_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segments/Turn</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_numseg_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_numseg_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Helix Length</property>
+                    <property name="selectable">True</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_len_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_len_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Radius @ Y,Z=0</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_radyzo_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_radyzo_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segs % lambda</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_pcl_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_pcl_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_pcl_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Diameter</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_dia_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_dia_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">0.01</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Rad. @ X,Z=HL</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_radxzhl_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_radxzhl_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Num. of Turns</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_nturns_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_nturns_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_nturns_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_res_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_res_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_res_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Rad. @ Y,Z=HL</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="helix_radyzhl_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">helix_radyzhl_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_helix_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">GH Card</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="helix_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_helix_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="helix_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_helix_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="helix_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_helix_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="helix_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_helix_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="intrange_wlen_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="intrange_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Interaction Approx Range (KH Card)</property>
+    <signal name="destroy" handler="on_intrange_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Approximation Range (W/lengths)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="intrange_wlen_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">intrange_wlen_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_intrange_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Interaction Approximation Range</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="intrange_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_intrange_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="intrange_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_intrange_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="intrange_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_intrange_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="intrange_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_intrange_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkWindow" id="kernel_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Thin Wire Kernel (EK Card)</property>
+    <signal name="destroy" handler="on_kernel_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkCheckButton" id="kernel_checkbutton">
+                <property name="label" translatable="yes">Extended Thin Wire Kernel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="halign">start</property>
+                <property name="border_width">2</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="on_kernel_checkbutton_toggled" swapped="no"/>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Thin Wire Kernel</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="kernel_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_kernel_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="kernel_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_kernel_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="kernel_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_kernel_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="kernel_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_kernel_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="loading_f1_adjustment">
+    <property name="upper">1000000000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="loading_f2_adjustment">
+    <property name="lower">-1000000</property>
+    <property name="upper">1000000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="loading_f3_adjustment">
+    <property name="upper">1000000000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="loading_i2_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="loading_i3_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="loading_i4_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">3</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="loading_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Loading Command (LD Card)</property>
+    <signal name="destroy" handler="on_loading_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkRadioButton" id="loading_null_radiobutton">
+                    <property name="label" translatable="yes">Short all Loads (Nulls previous Loading Cards)</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_slrlc_radiobutton">
+                    <property name="label" translatable="yes">Series, Lumped</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_pdrlc_radiobutton">
+                    <property name="label" translatable="yes">Parallel, Distributed</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_plrlc_radiobutton">
+                    <property name="label" translatable="yes">Parallel, Lumped</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_rr_radiobutton">
+                    <property name="label" translatable="yes">Resistance & Reactance</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_sdrlc_radiobutton">
+                    <property name="label" translatable="yes">Series, Distributed</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="loading_wcon_radiobutton">
+                    <property name="label" translatable="yes">Wire Conductivity</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">loading_null_radiobutton</property>
+                    <signal name="toggled" handler="on_loading_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Loading Type</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="loading_frame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="loading_i2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Load Tag Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_i2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_i2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="loading_f1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Resistance</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="loading_i3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">From Segment #</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_i3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_i3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="loading_f2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Inductance</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_f2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="loading_i4_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">To Segment #</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_i4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_i4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="loading_f3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Capacitance</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="loading_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">loading_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_loading_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Loading Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="loading_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_loading_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="loading_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_loading_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="loading_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_loading_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="loading_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_loading_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="main_freq_adjustment">
+    <property name="lower">0.01</property>
+    <property name="upper">9999</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="main_incline_adjustment">
+    <property name="lower">-180</property>
+    <property name="upper">180</property>
+    <property name="value">45</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="main_rotate_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="value">45</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f4_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f5_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_f6_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_nx_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_ny_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="nearfield_nz_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="nearfield_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Near Fields Command (NE/NH Cards)</property>
+    <signal name="destroy" handler="on_nearfield_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkCheckButton" id="nearfield_ne_checkbutton">
+                    <property name="label" translatable="yes">Near Electric Field</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_nearfield_ne_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="nearfield_rect_radiobutton">
+                    <property name="label" translatable="yes">Rectangular Co-ordinates</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_nearfield_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="nearfield_nh_checkbutton">
+                    <property name="label" translatable="yes">Near Magnetic Field</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_nearfield_nh_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="nearfield_sph_radiobutton">
+                    <property name="label" translatable="yes">Spherical Co-ordinates</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">nearfield_rect_radiobutton</property>
+                    <signal name="toggled" handler="on_nearfield_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Field Type & Co-ordinates</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="nearfield_i1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">NX</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_nx_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_nx_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">X</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f4_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">DX</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_i2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">NY</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_ny_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_ny_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Y</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_f2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f5_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">DY</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f5_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_i3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">NZ</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_nz_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_nz_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Z</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">nearfield_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="nearfield_f6_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">DZ</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="nearfield_f6_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_nearfield_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Field Pattern Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="nearfield_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_nearfield_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="nearfield_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_nearfield_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="nearfield_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_nearfield_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="nearfield_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_nearfield_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkWindow" id="nec2_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Xnec2c: NEC2 Input File Editor</property>
+    <property name="gravity">west</property>
+    <signal name="delete-event" handler="on_nec2_editor_delete_event" swapped="no"/>
+    <signal name="destroy" handler="on_nec2_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkFrame">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0.019999999552965164</property>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">2</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkButton" id="nec2_row_add">
+                        <property name="label">gtk-add</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_row_add_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="nec2_row_remv">
+                        <property name="label">gtk-remove</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_row_remv_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="nec2_treeview_clear">
+                        <property name="label">gtk-clear</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_treeview_clear_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">2</property>
+                    <property name="margin_right">2</property>
+                    <property name="label" translatable="yes">Manage Cards</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0.019999999552965164</property>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">2</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkButton" id="nec2_save_as">
+                        <property name="label">gtk-save-as</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_save_as_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="nec2_save">
+                        <property name="label">gtk-save</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_save_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="nec2_apply_checkbutton">
+                        <property name="label">gtk-apply</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="nec2_revert">
+                        <property name="label">gtk-revert-to-saved</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_nec2_revert_clicked" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">2</property>
+                    <property name="margin_right">2</property>
+                    <property name="label" translatable="yes">File Save</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkScrolledWindow" id="cmnt_scrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">2</property>
+                <property name="hscrollbar_policy">always</property>
+                <property name="vscrollbar_policy">always</property>
+                <property name="shadow_type">in</property>
+                <property name="propagate_natural_width">True</property>
+                <property name="propagate_natural_height">True</property>
+                <child>
+                  <object class="GtkTreeView" id="nec2_cmnt_treeview">
+                    <property name="height_request">138</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="button-press-event" handler="on_nec2_cmnt_treeview_button_press_event" swapped="no"/>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Comments</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkButton" id="gw">
+                    <property name="label" translatable="yes">Wire</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gw_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="ga">
+                    <property name="label" translatable="yes">Arc</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_ga_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gh">
+                    <property name="label" translatable="yes">Helix</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gh_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="sp">
+                    <property name="label" translatable="yes">Patch</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_sp_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gr">
+                    <property name="label" translatable="yes">Cylinder</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gr_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gm">
+                    <property name="label" translatable="yes">Move</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gm_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gx">
+                    <property name="label" translatable="yes">Reflect</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gx_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gs">
+                    <property name="label" translatable="yes">Scale</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gs_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Edit Geometry Data</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkScrolledWindow" id="geom_scrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">2</property>
+                <property name="hscrollbar_policy">always</property>
+                <property name="vscrollbar_policy">always</property>
+                <property name="shadow_type">in</property>
+                <property name="propagate_natural_width">True</property>
+                <property name="propagate_natural_height">True</property>
+                <child>
+                  <object class="GtkTreeView" id="nec2_geom_treeview">
+                    <property name="height_request">204</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="button-press-event" handler="on_nec2_geom_treeview_button_press_event" swapped="no"/>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Geometry</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <child>
+                  <object class="GtkButton" id="ex">
+                    <property name="label" translatable="yes">Excitation</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_ex_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="rp">
+                    <property name="label" translatable="yes">Radiation</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_rp_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="fr">
+                    <property name="label" translatable="yes">Frequency</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_fr_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="ne">
+                    <property name="label" translatable="yes">Near Fields</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_ne_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gn">
+                    <property name="label" translatable="yes">Ground (GN)</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gn_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="gd">
+                    <property name="label" translatable="yes">Ground (GD)</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_gd_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="ld">
+                    <property name="label" translatable="yes">Loading</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_ld_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="ek">
+                    <property name="label" translatable="yes">Kernel</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_ek_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="nt">
+                    <property name="label" translatable="yes">Network</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_nt_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="kh">
+                    <property name="label" translatable="yes">Interaction</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_kh_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="tl">
+                    <property name="label" translatable="yes">Trans. Line</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_tl_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="xq">
+                    <property name="label" translatable="yes">Execute</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="hexpand">True</property>
+                    <signal name="clicked" handler="on_xq_clicked" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Edit Control Commands</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkScrolledWindow" id="cmnd_scrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">2</property>
+                <property name="hscrollbar_policy">always</property>
+                <property name="vscrollbar_policy">always</property>
+                <property name="shadow_type">in</property>
+                <property name="propagate_natural_width">True</property>
+                <property name="propagate_natural_height">True</property>
+                <child>
+                  <object class="GtkTreeView" id="nec2_cmnd_treeview">
+                    <property name="height_request">204</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="button-press-event" handler="on_nec2_cmnd_treeview_button_press_event" swapped="no"/>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Commands</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="network_f1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_f2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_f3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_f4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_f5_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_f6_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_i1_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_i2_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_i3_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="network_i4_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="network_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Network Command (NT Card)</property>
+    <signal name="destroy" handler="on_network_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number, Port 1  </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_i1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_i1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number, Port 2  </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_i3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_i3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segment Num, Port 1</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_i2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_i2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segment Num, Port 2</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_i4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_i4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Segment Identity</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 1,1 Real Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 1,2 Real Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 2,2 Real Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f5_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f5_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 1,1 Imag Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 1,2 Imag Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Element 2,2 Imag Part</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="network_f6_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">network_f6_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_network_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Admittance Matrix Elements</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="network_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_network_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="network_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_network_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="network_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_network_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="network_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_network_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="patch_nx_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">8</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_ny_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">8</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_x1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_x2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">45</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_x3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_x4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_y1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_y2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">45</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_y3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_y4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_z1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_z2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">0.10000000000000001</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_z3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="patch_z4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="patch_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Patch Element (SP & SC Cards)</property>
+    <signal name="destroy" handler="on_patch_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="patch_type_frame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkRadioButton" id="patch_arbitrary_radiobutton">
+                    <property name="label" translatable="yes">Arbitary</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_patch_arbitrary_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="patch_rectangular_radiobutton">
+                    <property name="label" translatable="yes">Rectangle</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">patch_arbitrary_radiobutton</property>
+                    <signal name="toggled" handler="on_patch_rectangular_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="patch_triangular_radiobutton">
+                    <property name="label" translatable="yes">Triangle</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">patch_arbitrary_radiobutton</property>
+                    <signal name="toggled" handler="on_patch_triangular_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="patch_quadrilateral_radiobutton">
+                    <property name="label" translatable="yes">Quadrilateral</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">patch_arbitrary_radiobutton</property>
+                    <signal name="toggled" handler="on_patch_quadrilateral_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="patch_surface_radiobutton">
+                    <property name="label" translatable="yes">Surface</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">patch_arbitrary_radiobutton</property>
+                    <signal name="toggled" handler="on_patch_surface_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Patch Type</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="patch_sm_frame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Corners 1-2 sub-division (NX)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_nx_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_nx_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Corners 2-3 sub-division (NY)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_ny_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_ny_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Surface Sub-division</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel" id="patch_x1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Center - X</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_x1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_x1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="patch_x2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Normal - Elev.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_x2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_x2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="patch_y1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Center - Y</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_y1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_y1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="patch_y2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Normal - Azim.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_y2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_y2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="patch_z1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Center - Z</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_z1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_z1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="patch_z2_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Patch Area</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="patch_z2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">patch_z2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">SP/SM Cards</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="patch_sc_frame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkGrid">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">2</property>
+                    <property name="row_spacing">2</property>
+                    <property name="column_spacing">2</property>
+                    <property name="column_homogeneous">True</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 3 - X</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_x3_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_x3_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 3 - Y</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_y3_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_y3_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 3 - Z</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_z3_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_z3_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="patch_sc_grid">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">2</property>
+                    <property name="row_spacing">2</property>
+                    <property name="column_spacing">2</property>
+                    <property name="column_homogeneous">True</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 4 - X</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_x4_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_x4_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 4 - Y</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_y4_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_y4_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Corner 4 - Z</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="patch_z4_spinbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="input_purpose">number</property>
+                        <property name="adjustment">patch_z4_adjustment</property>
+                        <property name="climb_rate">0.10000000000000001</property>
+                        <property name="digits">3</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                        <signal name="value-changed" handler="on_patch_data_spinbutton_value_changed" swapped="no"/>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="top_attach">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">SC Card</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="patch_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_patch_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="patch_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_patch_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="patch_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_patch_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="patch_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_patch_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkDialog" id="quit_dialog">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Confirmation</property>
+    <property name="modal">True</property>
+    <property name="window_position">mouse</property>
+    <property name="type_hint">dialog</property>
+    <signal name="destroy" handler="on_quit_dialog_destroy" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="homogeneous">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="quit_cancelbutton">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_quit_cancelbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="quit_okbutton">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_quit_okbutton_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">1</property>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">4</property>
+                <property name="margin_right">4</property>
+                <property name="margin_top">4</property>
+                <property name="margin_bottom">4</property>
+                <property name="stock">gtk-dialog-question</property>
+                <property name="icon_size">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="quit_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">4</property>
+                <property name="margin_right">4</property>
+                <property name="margin_top">4</property>
+                <property name="margin_bottom">4</property>
+                <property name="label" translatable="yes">Quit xnec2c?</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">quit_cancelbutton</action-widget>
+      <action-widget response="-5">quit_okbutton</action-widget>
+    </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f3_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f4_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f5_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_f6_adjustment">
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_i2_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="radiation_i3_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">4</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="radiation_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Radiation Pattern (RP Card)</property>
+    <property name="icon_name">gtk-dialog-info</property>
+    <signal name="destroy" handler="on_radiation_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i10_radiobutton">
+                    <property name="label" translatable="yes">Normal (Space) Wave</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i11_radiobutton">
+                    <property name="label" translatable="yes">Space + Ground Wave</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i12_radiobutton">
+                    <property name="label" translatable="yes">Linear Cliff</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i14_radiobutton">
+                    <property name="label" translatable="yes">Radial wire screen</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i16_radiobutton">
+                    <property name="label" translatable="yes">Circular Cliff + Radials</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i13_radiobutton">
+                    <property name="label" translatable="yes">Circular Cliff</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_i15_radiobutton">
+                    <property name="label" translatable="yes">Linear Cliff + Radials</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_i10_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes"><b>See GN/GD Card Documentation</b></property>
+                    <property name="use_markup">True</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Wave Type and Ground (I1)</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_x0_radiobutton">
+                    <property name="label" translatable="yes">Major & Minor Axis & Total Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_x1_radiobutton">
+                    <property name="label" translatable="yes">Vertical, Horizontal & Total Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_x0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n1_radiobutton">
+                    <property name="label" translatable="yes">Major Axis Gain Normalized</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_n0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n3_radiobutton">
+                    <property name="label" translatable="yes">Vertical Axis Gain Normalized</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_n0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n5_radiobutton">
+                    <property name="label" translatable="yes">Total Gain Normalized</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_n0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_d1_radiobutton">
+                    <property name="label" translatable="yes">Print/Normalize Directive Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_d0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n0_radiobutton">
+                    <property name="label" translatable="yes">No Normalized Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n2_radiobutton">
+                    <property name="label" translatable="yes">Minor Axis Gain Normalized</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_n0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_n4_radiobutton">
+                    <property name="label" translatable="yes">Horizontal Axis Gain Normalized</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_n0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_d0_radiobutton">
+                    <property name="label" translatable="yes">Print/Normalize Power Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_a0_radiobutton">
+                    <property name="label" translatable="yes">No Gain Averaging</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_a2_radiobutton">
+                    <property name="label" translatable="yes">Points in Average Not Printed</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_a0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radiation_a1_radiobutton">
+                    <property name="label" translatable="yes">Average Gain Computed</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radiation_a0_radiobutton</property>
+                    <signal name="toggled" handler="on_radiation_radiobutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes"><b>See RP Card Documentation</b></property>
+                    <property name="use_markup">True</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Data Output Control (XNDA)</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Points in Theta</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="radiation_f1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_right">6</property>
+                    <property name="label" translatable="yes">Initial Theta (deg)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="radiation_f3_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Increment in Theta</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_i2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_i2_adjustment</property>
+                    <property name="climb_rate">1</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="radiation_i1_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Points in Phi</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Initial Phi (deg)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Increment in Phi</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_i3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_i3_adjustment</property>
+                    <property name="climb_rate">1</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f2_adjustment</property>
+                    <property name="climb_rate">0.01</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f4_adjustment</property>
+                    <property name="climb_rate">0.01</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="radiation_f5_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Field Point Distance</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f5_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f5_adjustment</property>
+                    <property name="climb_rate">0.01</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="radiation_f6_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Gain Normalization</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="radiation_f6_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">radiation_f6_adjustment</property>
+                    <property name="climb_rate">0.01</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_radiation_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Radiation Pattern Parameters</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="radiation_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_radiation_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="radiation_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_radiation_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="radiation_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_radiation_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="radiation_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_radiation_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="rdpattern_freq_adjustment">
+    <property name="lower">0.01</property>
+    <property name="upper">9999</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="rdpattern_incline_adjustment">
+    <property name="lower">-180</property>
+    <property name="upper">180</property>
+    <property name="value">45</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="rdpattern_rotate_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="value">45</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="rdpattern_zoom_adjustment">
+    <property name="lower">10</property>
+    <property name="upper">999</property>
+    <property name="value">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="reflect_taginc_adjustment">
+    <property name="upper">100000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="reflect_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Reflect Structure (GX card)</property>
+    <signal name="destroy" handler="on_reflect_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkCheckButton" id="reflect_x_checkbutton">
+                    <property name="label" translatable="yes">Reflect in YZ plane</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_reflect_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="reflect_z_checkbutton">
+                    <property name="label" translatable="yes">Reflect in XY plane</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_reflect_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="reflect_y_checkbutton">
+                    <property name="label" translatable="yes">Reflect in XZ plane</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_reflect_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number Increment</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="reflect_taginc_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">reflect_taginc_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_reflect_taginc_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Reflect Options</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="reflect_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_reflect_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="reflect_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_reflect_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="reflect_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_reflect_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="reflect_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_reflect_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkImage" id="saveas_gnuplot">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-save-as</property>
+    <property name="icon_size">1</property>
+  </object>
+  <object class="GtkWindow" id="freqplots_window">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Xnec2c: Frequency Data Plots</property>
+    <property name="gravity">east</property>
+    <signal name="delete-event" handler="on_freqplots_window_delete_event" swapped="no"/>
+    <signal name="destroy" handler="on_freqplots_window_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkMenuBar">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkMenuItem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">File</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="menuitem5_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_new">
+                            <property name="label">gtk-new</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_new_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_open_input">
+                            <property name="label">gtk-open</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_open_input_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_save">
+                            <property name="label">gtk-save</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_freqplots_save_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_save_as">
+                            <property name="label">gtk-save-as</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_freqplots_save_as_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_save_as_gnuplot">
+                            <property name="label" translatable="yes">Save as gnuplot</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="image">saveas_gnuplot</property>
+                            <property name="use_stock">False</property>
+                            <signal name="activate" handler="on_freqplots_save_as_gnuplot_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="freqplots_quit">
+                            <property name="label">gtk-quit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_quit_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="view_menuitem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">View</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="view_menuitem_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="freqplots_pol_menu">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Polarization</property>
+                            <signal name="activate" handler="freqplots_pol_menu_activate" swapped="no"/>
+                            <child type="submenu">
+                              <object class="GtkMenu" id="freqplots_pol_menu_menu">
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="freqplots_total">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Total</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_total_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="freqplots_horizontal">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Horizontal</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">freqplots_total</property>
+                                    <signal name="activate" handler="on_rdpattern_horizontal_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="freqplots_vertical">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Vertical</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">freqplots_total</property>
+                                    <signal name="activate" handler="on_rdpattern_vertical_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="freqplots_right_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Right Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">freqplots_total</property>
+                                    <signal name="activate" handler="on_rdpattern_right_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="freqplots_left_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Left Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">freqplots_total</property>
+                                    <signal name="activate" handler="on_rdpattern_left_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="net_gain">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Net Gain</property>
+                            <signal name="activate" handler="on_net_gain_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_gmax_togglebutton">
+                    <property name="label" translatable="yes">Max Gain</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_gmax_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_gdir_togglebutton">
+                    <property name="label" translatable="yes">Direct.</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_gdir_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_gviewer_togglebutton">
+                    <property name="label" translatable="yes">Viewer</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_gviewer_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_vswr_togglebutton">
+                    <property name="label" translatable="yes">VSWR</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_vswr_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_zrlzim_togglebutton">
+                    <property name="label" translatable="yes">Zr/Zi</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_zrlzim_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="freqplots_zmgzph_togglebutton">
+                    <property name="label" translatable="yes">Zm/Zph</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_freqplots_zmgzph_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="margin_left">4</property>
+                    <property name="label" translatable="yes">  Freq Loop </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="plot_loop_start">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_start_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-play</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">7</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="plot_loop_pause">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_pause_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-pause</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="plot_loop_reset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_reset_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-rewind</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">9</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes">F MHz</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="freqplots_fmhz_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">9</property>
+                <property name="text" translatable="yes"> - - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Max Gain</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="freqplots_maxgain_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">6</property>
+                <property name="text" translatable="yes"> - - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> VSWR</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="freqplots_vswr_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">5</property>
+                <property name="text" translatable="yes"> - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Zreal</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="freqplots_zreal_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">5</property>
+                <property name="text" translatable="yes"> - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Zim</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="freqplots_zimag_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">5</property>
+                <property name="text" translatable="yes"> - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Zo</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">10</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="freqplots_zo_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">6</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">freqplots_zo_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="digits">1</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_freqplots_zo_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">11</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkViewport">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkDrawingArea" id="freqplots_drawingarea">
+                    <property name="height_request">480</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="margin_left">2</property>
+                    <property name="margin_right">2</property>
+                    <property name="margin_top">2</property>
+                    <property name="margin_bottom">2</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <signal name="button-press-event" handler="on_freqplots_drawingarea_button_press_event" swapped="no"/>
+                    <signal name="configure-event" handler="on_freqplots_drawingarea_configure_event" swapped="no"/>
+                    <signal name="draw" handler="on_freqplots_drawingarea_draw" swapped="no"/>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="freqplots_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Frequency Data Plots</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkWindow" id="rdpattern_window">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Xnec2c: Radiation Patterns</property>
+    <property name="gravity">west</property>
+    <signal name="delete-event" handler="on_rdpattern_window_delete_event" swapped="no"/>
+    <signal name="destroy" handler="on_rdpattern_window_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkMenuBar">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkMenuItem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">File</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="menuitem9_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_new">
+                            <property name="label">gtk-new</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_new_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_open">
+                            <property name="label">gtk-open</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_open_input_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_save">
+                            <property name="label">gtk-save</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_rdpattern_save_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_save_as">
+                            <property name="label">gtk-save-as</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_rdpattern_save_as_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_save_as_gnuplot">
+                            <property name="label" translatable="yes">Save As gnuplot</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="image">saveas_gnuplot</property>
+                            <property name="use_stock">False</property>
+                            <signal name="activate" handler="on_rdpattern_save_as_gnuplot_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="rdpattern_quit">
+                            <property name="label">gtk-quit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_quit_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="rdpattern_view_menuitem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">View</property>
+                    <signal name="activate" handler="rdpattern_view_menuitem_activate" swapped="no"/>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="rdpattern_view_menuitem_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkMenuItem" id="rdpattern_pol_menu">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Polarization</property>
+                            <signal name="activate" handler="rdpattern_pol_menu_activate" swapped="no"/>
+                            <child type="submenu">
+                              <object class="GtkMenu" id="rdpattern_pol_menu_menu">
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_total">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Total</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_total_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_horizontal">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Horizontal</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_total</property>
+                                    <signal name="activate" handler="on_rdpattern_horizontal_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_vertical">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Vertical</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_total</property>
+                                    <signal name="activate" handler="on_rdpattern_vertical_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_right_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Right Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_total</property>
+                                    <signal name="activate" handler="on_rdpattern_right_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_left_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Left Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_total</property>
+                                    <signal name="activate" handler="on_rdpattern_left_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="rdpattern_gain_scaling">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Gain Scaling</property>
+                            <child type="submenu">
+                              <object class="GtkMenu" id="rdpattern_gain_scaling_menu">
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_linear_power">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Linear Power</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_linear_power_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_linear_voltage">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Linear Voltage</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_linear_power</property>
+                                    <signal name="activate" handler="on_rdpattern_linear_voltage_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_arrl_style">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">ARRL Style</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_linear_power</property>
+                                    <signal name="activate" handler="on_rdpattern_arrl_style_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="rdpattern_logarithmic">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Logarithmic</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">rdpattern_linear_power</property>
+                                    <signal name="activate" handler="on_rdpattern_logarithmic_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="near_field">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Near Field</property>
+                            <child type="submenu">
+                              <object class="GtkMenu" id="near_field_menu">
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkCheckMenuItem" id="rdpattern_e_field">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Near E Field</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_e_field_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckMenuItem" id="rdpattern_h_field">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Near H Field</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_h_field_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckMenuItem" id="rdpattern_poynting_vector">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Poynting Vector</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_poynting_vector_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkMenuItem" id="rdpattern_animate">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Animate Dialog</property>
+                                    <signal name="activate" handler="on_rdpattern_animate_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkMenuItem" id="total_field">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Total Field</property>
+                                    <child type="submenu">
+                                      <object class="GtkMenu" id="total_field_menu">
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkRadioMenuItem" id="near_peak_value">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">Peak Value</property>
+                                            <property name="active">True</property>
+                                            <property name="draw_as_radio">True</property>
+                                            <signal name="activate" handler="on_near_peak_value_activate" swapped="no"/>
+                                          </object>
+                                        </child>
+                                        <child>
+                                          <object class="GtkRadioMenuItem" id="near_snapshot">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label" translatable="yes">Snapshot</property>
+                                            <property name="draw_as_radio">True</property>
+                                            <property name="group">near_peak_value</property>
+                                            <signal name="activate" handler="on_near_snapshot_activate" swapped="no"/>
+                                          </object>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="rdpattern_common_projection">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Common Projection</property>
+                            <property name="active">True</property>
+                            <signal name="activate" handler="on_common_projection_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="rdpattern_common_frequency">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Common Frequency</property>
+                            <property name="active">True</property>
+                            <signal name="activate" handler="on_common_freq_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="rdpattern_overlay_structure">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Overlay Structure</property>
+                            <signal name="activate" handler="on_rdpattern_overlay_structure_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkToggleButton" id="rdpattern_gain_togglebutton">
+                    <property name="label" translatable="yes">Gain Pattern</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_rdpattern_gain_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="rdpattern_eh_togglebutton">
+                    <property name="label" translatable="yes">E/H Fields</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_rdpattern_eh_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSeparator">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Frequency Loop </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="rdpatttern_loop_start">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_start_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-play</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="rdpattern_loop_pause">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_pause_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-pause</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="rdpattern_loop_reset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_reset_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-rewind</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes"> Step </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">7</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="rdpattern_fstep_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="editable">False</property>
+                    <property name="max_length">3</property>
+                    <property name="invisible_char">●</property>
+                    <property name="width_chars">3</property>
+                    <property name="text" translatable="yes">1</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">9</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="height_request">30</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkLabel" id="rdpattern_colorcode_minlabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes">0.0</property>
+                <property name="width_chars">5</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkDrawingArea" id="rdpattern_colorcode_drawingarea">
+                <property name="width_request">160</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <signal name="draw" handler="on_rdpattern_colorcode_drawingarea_draw" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="rdpattern_colorcode_maxlabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">0.00</property>
+                <property name="width_chars">9</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="rdpattern_viewer_gain">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">6</property>
+                <property name="text" translatable="yes"> - - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">dB</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="rdpattern_freq_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">9</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">rdpattern_freq_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="digits">3</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_rdpattern_freq_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="rdpattern_freq_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">MHz</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="rdpattern_freq_checkbutton">
+                <property name="label" translatable="yes">Apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="halign">start</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_new_freq_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_new_freq_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-apply</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="rdpattern_x_axis">
+                <property name="label" translatable="yes">X</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_x_axis_clicked" swapped="no"/>
+                <accelerator key="X" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_y_axis">
+                <property name="label" translatable="yes">Y</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_y_axis_clicked" swapped="no"/>
+                <accelerator key="Y" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_z_axis">
+                <property name="label" translatable="yes">Z</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_z_axis_clicked" swapped="no"/>
+                <accelerator key="Z" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_default_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_default_view_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-redo</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="stock">gtk-refresh</property>
+                <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="rdpattern_rotate_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">5</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">rdpattern_rotate_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_rdpattern_rotate_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="stock">gtk-go-down</property>
+                <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="rdpattern_incline_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">5</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">rdpattern_incline_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_rdpattern_incline_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Zoom % </property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="rdpattern_zoom_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">4</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">rdpattern_zoom_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_rdpattern_zoom_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">10</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_plus_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_plus_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-in</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">11</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_minus_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_minus_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-out</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">12</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="rdpattern_one_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_rdpattern_one_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-100</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">13</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkViewport">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkDrawingArea" id="rdpattern_drawingarea">
+                    <property name="height_request">480</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
+                    <property name="margin_left">2</property>
+                    <property name="margin_right">2</property>
+                    <property name="margin_top">2</property>
+                    <property name="margin_bottom">2</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <signal name="button-press-event" handler="on_rdpattern_drawingarea_button_press_event" swapped="no"/>
+                    <signal name="configure-event" handler="on_rdpattern_drawingarea_configure_event" swapped="no"/>
+                    <signal name="draw" handler="on_rdpattern_drawingarea_draw" swapped="no"/>
+                    <signal name="motion-notify-event" handler="on_rdpattern_drawingarea_motion_notify_event" swapped="no"/>
+                    <signal name="scroll-event" handler="on_rdpattern_drawingarea_scroll_event" swapped="no"/>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="rdpattern_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Radiation Patterns</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="scale_factor_adjustment">
+    <property name="upper">100000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="scale_from_adjustment">
+    <property name="upper">100000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="scale_to_adjustment">
+    <property name="upper">100000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="scale_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Scale Structure (GS card)</property>
+    <signal name="destroy" handler="on_scale_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Structure Scale Factor</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">From Tag No.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="scale_from_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">scale_from_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_scale_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="scale_factor_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">scale_factor_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_scale_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">To Tag No.</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="scale_to_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">scale_to_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_scale_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Scale Strucure</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="scale_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_scale_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">-1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="scale_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_scale_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="scale_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_scale_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="scale_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_scale_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="structure_zoom_adjustment">
+    <property name="lower">10</property>
+    <property name="upper">999</property>
+    <property name="value">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="main_window">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Xnec2c: Structure Display</property>
+    <property name="gravity">east</property>
+    <signal name="delete-event" handler="on_main_window_delete_event" swapped="no"/>
+    <signal name="destroy" handler="on_main_window_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkMenuBar">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkMenuItem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">File</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="menuitem1_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkImageMenuItem" id="main_new">
+                            <property name="label">gtk-new</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_new_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="main_open_input">
+                            <property name="label">gtk-open</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_open_input_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="nec2_edit">
+                            <property name="label">gtk-edit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_nec2_edit_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="main_save">
+                            <property name="label">gtk-save</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_main_save_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="main_save_as">
+                            <property name="label">gtk-save-as</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_main_save_as_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="struct_save_as_gnuplot">
+                            <property name="label" translatable="yes">Save as gnuplot</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="image">saveas_gnuplot</property>
+                            <property name="use_stock">False</property>
+                            <signal name="activate" handler="on_struct_save_as_gnuplot_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImageMenuItem" id="main_quit">
+                            <property name="label">gtk-quit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="activate" handler="on_quit_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem" id="main_view_menuitem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">View</property>
+                    <signal name="activate" handler="main_view_menuitem_activate" swapped="no"/>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="main_view_menuitem_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="main_rdpattern">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Radiation Pattern</property>
+                            <signal name="activate" handler="on_main_rdpattern_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="main_freqplots">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Frequency Plots</property>
+                            <signal name="activate" handler="on_main_freqplots_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="main_pol_menu">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Polarization</property>
+                            <signal name="activate" handler="main_pol_menu_activate" swapped="no"/>
+                            <child type="submenu">
+                              <object class="GtkMenu" id="main_pol_menu_menu">
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="main_total">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Total</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <signal name="activate" handler="on_rdpattern_total_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="main_horizontal">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Horizontal</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">main_total</property>
+                                    <signal name="activate" handler="on_rdpattern_horizontal_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="main_vertical">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Vertical</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">main_total</property>
+                                    <signal name="activate" handler="on_rdpattern_vertical_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="main_right_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Right Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">main_total</property>
+                                    <signal name="activate" handler="on_rdpattern_right_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkRadioMenuItem" id="main_left_hand">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Left Hand</property>
+                                    <property name="draw_as_radio">True</property>
+                                    <property name="group">main_total</property>
+                                    <signal name="activate" handler="on_rdpattern_left_hand_activate" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="main_common_projection">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Common Projection</property>
+                            <property name="active">True</property>
+                            <signal name="activate" handler="on_common_projection_activate" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="main_common_frequency">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Common Frequency</property>
+                            <property name="active">True</property>
+                            <signal name="activate" handler="on_common_freq_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuItem">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Help</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="menuitem4_menu">
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkImageMenuItem" id="about">
+                            <property name="label" translatable="yes">About</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_stock">False</property>
+                            <signal name="activate" handler="on_about_activate" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="main_hbox1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">2</property>
+                <child>
+                  <object class="GtkSeparator">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="main_currents_togglebutton">
+                    <property name="label" translatable="yes">Currents</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_main_currents_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="main_charges_togglebutton">
+                    <property name="label" translatable="yes">Charges</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="toggled" handler="on_main_charges_togglebutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSeparator">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">Frequency Loop </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="main_loop_start">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_start_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-play</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="main_loop_pause">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_pause_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-pause</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                    <accelerator key="h" signal="clicked"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="main_loop_reset">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <signal name="clicked" handler="on_loop_reset_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-media-rewind</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                    </child>
+                    <accelerator key="r" signal="clicked"/>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">7</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes"> Step </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="structure_fstep_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="editable">False</property>
+                    <property name="max_length">3</property>
+                    <property name="invisible_char">●</property>
+                    <property name="width_chars">3</property>
+                    <property name="text" translatable="yes">1</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">9</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="main_hbox2">
+            <property name="height_request">30</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkLabel" id="main_colorcode_zerolabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes">0.0</property>
+                <property name="width_chars">5</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkDrawingArea" id="main_colorcode_drawingarea">
+                <property name="width_request">160</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <signal name="draw" handler="on_main_colorcode_drawingarea_draw" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="main_colorcode_maxlabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">0.00</property>
+                <property name="width_chars">11</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="main_gain_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">*</property>
+                <property name="width_chars">6</property>
+                <property name="text" translatable="yes"> - - - - -</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">dB </property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="main_freq_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="width_chars">9</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">main_freq_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="digits">3</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <property name="value">0.01</property>
+                <signal name="value-changed" handler="on_main_freq_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="main_freq_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">MHz </property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="main_freq_checkbutton">
+                <property name="label" translatable="yes">Apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="focus_on_click">False</property>
+                <property name="receives_default">False</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="on_main_freq_checkbutton_toggled" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="main_new_freq_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_main_new_freq_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-apply</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+                <accelerator key="a" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="main_hbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="main_x_axis">
+                <property name="label" translatable="yes">X</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_main_x_axis_clicked" swapped="no"/>
+                <accelerator key="x" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="main_y_axis">
+                <property name="label" translatable="yes">Y</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_main_y_axis_clicked" swapped="no"/>
+                <accelerator key="y" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="main_z-axis">
+                <property name="label" translatable="yes">Z</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_main_z_axis_clicked" swapped="no"/>
+                <accelerator key="z" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="main_default_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_main_default_view_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-redo</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+                <accelerator key="r" signal="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="stock">gtk-refresh</property>
+                <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="main_rotate_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">4</property>
+                <property name="width_chars">5</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">main_rotate_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_main_rotate_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="stock">gtk-go-down</property>
+                <property name="icon_size">3</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="main_incline_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">4</property>
+                <property name="width_chars">5</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">main_incline_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_main_incline_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">8</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="label" translatable="yes"> Zoom % </property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="structure_zoom_spinbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">3</property>
+                <property name="width_chars">4</property>
+                <property name="input_purpose">number</property>
+                <property name="adjustment">structure_zoom_adjustment</property>
+                <property name="climb_rate">0.10000000000000001</property>
+                <property name="numeric">True</property>
+                <property name="update_policy">if-valid</property>
+                <signal name="value-changed" handler="on_structure_zoom_spinbutton_value_changed" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">10</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="structure_plus_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_structure_plus_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-in</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">11</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="structure_minus_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_structure_minus_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-out</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">12</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="structure_one_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_structure_one_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkImage">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-zoom-100</property>
+                    <property name="icon_size">3</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">13</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkViewport">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkDrawingArea" id="structure_drawingarea">
+                    <property name="height_request">480</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
+                    <property name="margin_left">2</property>
+                    <property name="margin_right">2</property>
+                    <property name="margin_top">2</property>
+                    <property name="margin_bottom">2</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <signal name="button-press-event" handler="on_structure_drawingarea_button_press_event" swapped="no"/>
+                    <signal name="configure-event" handler="on_structure_drawingarea_configure_event" swapped="no"/>
+                    <signal name="draw" handler="on_structure_drawingarea_draw" swapped="no"/>
+                    <signal name="motion-notify-event" handler="on_structure_drawingarea_motion_notify_event" swapped="no"/>
+                    <signal name="scroll-event" handler="on_structure_drawingarea_scroll_event" swapped="no"/>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="struct_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Structure Geometry</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="transform_mx_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_my_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_mz_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_new_adjustment">
+    <property name="upper">100000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_rx_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_ry_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_rz_adjustment">
+    <property name="lower">-360</property>
+    <property name="upper">360</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_start_adjustment">
+    <property name="upper">10000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="transform_taginc_adjustment">
+    <property name="upper">100000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="transform_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Co-ordinate Transformation (GM card)</property>
+    <signal name="destroy" handler="on_transform_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Increment</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_taginc_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_taginc_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Rotate about X</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_rx_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_rx_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Move along X</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_mx_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_mx_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">New Structures</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_new_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_new_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Rotate about Y</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_ry_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_ry_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Move along Y</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_my_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_my_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Start From Tag</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_start_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_start_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Rotate about Z</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_rz_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_rz_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Move along Z</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="transform_mz_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">transform_mz_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_transform_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Co-ordinate Transformation Data</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="transform_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_transform_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="transform_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_transform_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="transform_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_transform_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="transform_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_transform_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="txline_f1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_f2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_f3_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_f4_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_f5_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_f6_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_i1_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_i2_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_i3_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="txline_i4_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="txline_command">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Trans. Line Command (TL Card)</property>
+    <signal name="destroy" handler="on_txline_command_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number, End 1  </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_i1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_i1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number, End 2  </property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_i3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_i3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segment Num, End 1</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_i2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_i2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">1</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segment Num, End 2</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_i4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_i4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Segment Identity</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <property name="column_homogeneous">True</property>
+                <child>
+                  <object class="GtkCheckButton" id="txline_crossed_checkbutton">
+                    <property name="label" translatable="yes">Crossed Transmission Line</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_txline_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Characteristic Impedance</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 1 Y Real Part (S)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f3_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f3_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 2 Y Real Part (S)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f5_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f5_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Length of Tx Line (m)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 1 Y Imag Part (S)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f4_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f4_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">End 2 Y Imag Part (S)</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="txline_f6_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">txline_f6_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_txline_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">6</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Transmission Line</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" id="txline_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_txline_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="txline_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_txline_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="txline_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_txline_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="txline_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_txline_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="wire_dia1_adjustment">
+    <property name="upper">100</property>
+    <property name="value">0.029999999999999999</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_dia_adjustment">
+    <property name="upper">100</property>
+    <property name="value">0.01</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_dian_adjustment">
+    <property name="upper">100</property>
+    <property name="value">0.02</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_len_adjustment">
+    <property name="upper">10000</property>
+    <property name="value">2</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_numseg_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">15</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_pcl_adjustment">
+    <property name="upper">30</property>
+    <property name="value">5</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_rdia_adjustment">
+    <property name="lower">0.5</property>
+    <property name="upper">2</property>
+    <property name="value">0.92000000000000004</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_res_adjustment">
+    <property name="upper">1000000000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_rlen_adjustment">
+    <property name="lower">0.5</property>
+    <property name="upper">2</property>
+    <property name="value">0.92000000000000004</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_tagnum_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">100000</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_x1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_x2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_y1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_y2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_z1_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">-1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="wire_z2_adjustment">
+    <property name="lower">-10000</property>
+    <property name="upper">10000</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.01</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="wire_editor">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Wire Element (GW & GC cards)</property>
+    <signal name="destroy" handler="on_wire_editor_destroy" swapped="no"/>
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Tag Number</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_tagnum_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_tagnum_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_tagnum_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire X1</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_x1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_x1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire X2</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_x2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_x2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">No. Segments</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_numseg_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_numseg_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Y1</property>
+                    <property name="selectable">True</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_y1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_y1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Y2</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_y2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_y2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Segs % lambda</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_pcl_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_pcl_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">2</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_pcl_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Z1</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_z1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_z1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Z2</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_z2_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_z2_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Diameter</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_dia_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_dia_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">4</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <property name="value">0.01</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Wire Length</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_len_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_len_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_len_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Conductivity S/m</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_res_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_res_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_res_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">5</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Wire Data</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="wire_taperframe">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0.019999999552965164</property>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">2</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">2</property>
+                <property name="row_homogeneous">True</property>
+                <child>
+                  <object class="GtkCheckButton" id="wire_taper_checkbutton">
+                    <property name="label" translatable="yes">Tapered Wire</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="halign">start</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_wire_taper_checkbutton_toggled" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Length Taper</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_rlen_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_rlen_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">5</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_rlen_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Diameter Seg 1</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_dia1_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_dia1_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_rdia_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Diameter Seg N</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_dian_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_dian_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_data_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Diam. Taper</property>
+                    <property name="single_line_mode">True</property>
+                    <property name="track_visited_links">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="wire_rdia_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="input_purpose">number</property>
+                    <property name="adjustment">wire_rdia_adjustment</property>
+                    <property name="climb_rate">0.10000000000000001</property>
+                    <property name="digits">3</property>
+                    <property name="numeric">True</property>
+                    <property name="update_policy">if-valid</property>
+                    <signal name="value-changed" handler="on_wire_rdia_spinbutton_value_changed" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">2</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">Wire Taper Data</property>
+                <property name="single_line_mode">True</property>
+                <property name="track_visited_links">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="wire_new_button">
+                <property name="label">gtk-new</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_wire_new_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="wire_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <signal name="clicked" handler="on_wire_cancel_button_clicked" swapped="no"/>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="spacing">2</property>
+                    <child>
+                      <object class="GtkImage">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-delete</property>
+                        <property name="icon_size">3</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Delete Card</property>
+                        <property name="single_line_mode">True</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="wire_apply_button">
+                <property name="label">gtk-apply</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_wire_apply_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="wire_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_wire_ok_button_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+  </object>
+</interface>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/xnec2c.git



More information about the pkg-hamradio-commits mailing list