Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gnunit
diff options
context:
space:
mode:
authorMike Kestner <mkestner@gmail.com>2005-04-23 19:50:25 +0400
committerMike Kestner <mkestner@gmail.com>2005-04-23 19:50:25 +0400
commit6380ee50bedde4b228907ddaf85c6ab1e8d50bb0 (patch)
tree4c7ff524c750acf96f5eb7dd0ec9398a5e0037cc /gnunit
parent799bacf0e65da6b56657f2e0372ae41a4a9eacff (diff)
2005-04-23 Mike Kestner <mkestner@novell.com>
* gnunit : moved the nunit-gtk project here. * monodoc-browser : moved the gui browser here from monodoc. svn path=/trunk/mono-tools/; revision=43485
Diffstat (limited to 'gnunit')
-rw-r--r--gnunit/AUTHORS1
-rw-r--r--gnunit/ChangeLog248
-rw-r--r--gnunit/Makefile.am2
-rw-r--r--gnunit/NEWS16
-rw-r--r--gnunit/README24
-rw-r--r--gnunit/TODO6
-rw-r--r--gnunit/art/.cvsignore2
-rw-r--r--gnunit/art/Makefile.am8
-rw-r--r--gnunit/art/green.pngbin0 -> 203 bytes
-rw-r--r--gnunit/art/none.pngbin0 -> 247 bytes
-rw-r--r--gnunit/art/nunit-gui.pngbin0 -> 8469 bytes
-rw-r--r--gnunit/art/red.pngbin0 -> 201 bytes
-rw-r--r--gnunit/art/yellow.pngbin0 -> 204 bytes
-rw-r--r--gnunit/src/.cvsignore5
-rw-r--r--gnunit/src/AssemblyInfo.cs.in17
-rw-r--r--gnunit/src/AssemblyStore.cs570
-rw-r--r--gnunit/src/CircleRenderer.cs65
-rw-r--r--gnunit/src/FileDialog.cs63
-rw-r--r--gnunit/src/Makefile.am70
-rw-r--r--gnunit/src/Settings.cs136
-rw-r--r--gnunit/src/catalog.cs.in73
-rw-r--r--gnunit/src/gnunit2.exe.config6
-rw-r--r--gnunit/src/main.cs870
-rw-r--r--gnunit/src/nunit-gtk.glade1102
-rw-r--r--gnunit/src/nunit-gtk.gladep12
-rw-r--r--gnunit/src/nunit-gtk.schema36
-rw-r--r--gnunit/src/script.in2
-rw-r--r--gnunit/src/script2.in2
28 files changed, 3336 insertions, 0 deletions
diff --git a/gnunit/AUTHORS b/gnunit/AUTHORS
new file mode 100644
index 00000000..43dda144
--- /dev/null
+++ b/gnunit/AUTHORS
@@ -0,0 +1 @@
+Gonzalo Paniagua Javier <gonzalo@ximian.com>
diff --git a/gnunit/ChangeLog b/gnunit/ChangeLog
new file mode 100644
index 00000000..147659af
--- /dev/null
+++ b/gnunit/ChangeLog
@@ -0,0 +1,248 @@
+2005-01-23 Ben Maurer <bmaurer@ximian.com>
+
+ * src/gnunit2.exe.config: Config file for 2.0
+
+ * src/Makefile.am: Do this the right way.
+
+ * configure.in: Remove 2.0 hackishness
+
+2004-12-27 Ben Maurer <bmaurer@ximian.com>
+
+ * configure.in: 2.0 happyness
+
+ * src/Makefile.am: Create gnunit2 for 2.0 apis. Make everything
+ follow the mono conventions now.
+
+2004-08-05 Martin Willemoes Hansen <mwh@sysrq.dk>
+
+ * src/main.cs: Implement translator credits the proper way.
+ * src/.cvsignore: Added catalog.cs
+
+2004-05-29 Jordi Mas <jordi@ximian.com>
+
+ * configure.in: added Catalan po processing
+
+2004-05-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * configure.in: added catalog.cs to the output.
+
+ * src/Makefile.am: use catalog.cs.in instead of catalog.cs.
+ * src/catalog.cs: Removed file.
+ * src/catalog.cs.in: added InitCatalog. It sets the directory to the one
+ where the .mo files are installed, not the default one, which might
+ be different.
+
+ * src/main.cs: commented out the Log stuff. It crashes.
+
+2004-05-28 Martin Willemoes Hansen <mwh@sysrq.dk>
+
+ * autogen.sh: Swapped automake and aclocal to prevent
+ error msgs on the first run of autogen.sh
+ * autogen.sh: I18N
+ * configure.in: Ditto
+ * Makefile.am: Ditto
+ * mkinstalldirs: Ditto (Workaround for automake-1.8.x)
+ * .cvsignore: Ditto
+ * po/ChangeLog: Ditto
+ * po/da.po: Ditto
+ * po/es.po: Ditto
+ * po/fr.po: Ditto
+ * po/README: Ditto (added)
+ * po/POTFILES.in: Ditto
+ * resources/*: Ditto (removed)
+ * src/AssemblyStore: Ditto
+ * src/catalog.cs: Ditto (added)
+ * src/FileDialog.cs: Ditto
+ * src/main.cs: Ditto
+ * src/Makefile.am: Ditto
+ * src/translation.cs: Ditto (removed)
+
+2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs:
+ * src/Makefile.am:
+ * src/main.cs: make it compile with new nunit 2.2 beta.
+
+2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * configure.in:
+ * src/Makefile.am: updated to use the fancy -pkg option in mcs.
+
+2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/main.cs: update to CVS gtk#.
+
+2004-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ distcheck works now.
+
+2004-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs: make it work with CVS gtk#.
+
+2004-02-27 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * src/nunit-gtk.glade: Beautify.
+
+2004-02-27 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * src/AssemblyStore.cs, src/main.cs: Some more code cleanup.
+ Also, made ctrl+f work in the treeview.
+
+2004-02-27 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * src/AssemblyStore.cs, src/CircleRenderer.cs, src/main.cs:
+ cleanup use of GLib.Value. Does a little bit of code cleanup.
+
+2004-02-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs: workaround for mcs bug. Canceling tests now is
+ inmediate; no need to wait for the current running test to finish.
+
+ * src/main.cs: make it compile with CVS Gtk#.
+
+2003-12-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs:
+ * src/main.cs: updated to CVS gtk#.
+
+2003-11-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/CircleRenderer.cs:
+ * src/main.cs:
+ * src/resources/strings.txt: readded the circles. CVS gtk# works now.
+
+2003-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/CircleRenderer.cs: fix nullef
+ * src/translation.cs: disabled translations by now.
+
+2003-10-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * configure.in: 0.2.99
+ * src/AssemblyInfo.cs: Removed file. It's autogenerated now...
+ * src/AssemblyInfo.cs.in: ...from this one.
+ * src/Makefile.in: modified accordingly.
+
+2003-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * INSTALL:
+ * README:
+ * NEWS: updated.
+
+ * configure.in:
+ * src/AssemblyInfo.cs: version 0.2
+
+ * src/main.cs: don't crash if the schema is not installed;
+
+2003-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/Makefile.in: dist works now.
+ * src/resources/strings.txt: Modified file.
+
+2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs: Get the path for the assembly. Weird.
+
+ * src/main.cs: gets the full path of the assembly and change the current
+ directory to the one containing the current test assembly. Don't
+ use a CellRendererPixbuf.
+
+ * src/CircleRenderer.cs: well, at least it displays something and
+ doesn't crash.
+
+2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/Makefile.am: some fixes for automake1.4 (i hope this also works
+ with 1.7). Thanks to Chris Turchin (chris@turchin.net).
+
+2003-07-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * .cvsignore:
+ * Makefile.am:
+ * autogen.sh:
+ * configure.in:
+ * makefile: Removed file.
+ * makefile.gnu: Removed file.
+ * art/.cvsignore:
+ * art/Makefile.am:
+ * src/.cvsignore:
+ * src/Makefile.am:
+ * src/makefile: Removed file.
+ * src/makefile.gnu: Removed file.
+ * src/resources/.cvsignore: use auto* and added .cvsignore.
+
+2003-07-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * README:
+ * src/main.cs: updated to use Data property instead of Get/SetData.
+ * src/makefile.gnu: fixed topdir and mcs options.
+
+2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * makefile.gnu: use monoresgen again. If you don't have a script for it,
+ try http://primates.ximian.com/~gonzalo/mono/util/ ;-).
+
+ * src/AssemblyStore.cs: the test are run in a separate thread now so
+ the UI doesn't freeze.
+
+ * src/main.cs: added an elapsed time counter when running the tests.
+
+2003-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/makefile.gnu: don't call 'monoresgen' directly. Uses
+ monoresgen.exe instead and allow the user defining RUNTIME and
+ MONORESGEN to locate and execute it.
+
+2003-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/makefile.gnu: added Danish translation from Martin.
+
+2003-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs:
+ * src/FileDialog.cs:
+ * src/getstrings.pl:
+ * src/main.cs:
+ * src/makefile.gnu:
+ * src/translation.cs:
+ * src/resources/strings.es.txt:
+ * src/resources/strings.txt: added I18N support à la .NET. You still
+ have to set the culture manually to see it working. Currently only
+ English and Spanish available ;-).
+
+Thu May 1 16:08:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
+
+ * src/main.cs: disable row expansion when a test suite is run.
+
+2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs: keep the result from the last test. Allow
+ quitting the application while loading an assembly.
+
+ * src/FileDialog.cs: title and complete are parameters now.
+ * src/main.cs: allow saving the result from the last test run to an XML
+ file.
+
+ * src/nunit-gtk.glade: added overwriteDialog.
+
+2003-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs: don't gray out the tests already run.
+ * src/main.cs: work around for the Gnome.About issue. Added a label for
+ displaying the number of tests run, ignored and failed. Double-clicking
+ on a test will run it.
+
+2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * src/AssemblyStore.cs:
+ * src/main.cs:
+ * src/nunit-gtk.glade: added ability to cancel running tests. Display
+ a dialog when an unhandled exception happens.
+
+ You need latest gtk# and mono runtime for this to work.
+
+2003-04-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Initial check in.
+
diff --git a/gnunit/Makefile.am b/gnunit/Makefile.am
new file mode 100644
index 00000000..b6762a58
--- /dev/null
+++ b/gnunit/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS= art src
+
diff --git a/gnunit/NEWS b/gnunit/NEWS
new file mode 100644
index 00000000..9be84954
--- /dev/null
+++ b/gnunit/NEWS
@@ -0,0 +1,16 @@
+2003-10-04
+
+ * Released 0.2
+
+2003-07-10
+
+ * Use auto*
+ * Renamed executable to gnunit.exe
+
+Initial release 0.1
+--------------------
+This initial release is able to load assemblies and run the tests in them.
+Only 1 at a time, though.
+
+It displays the results nicely.
+
diff --git a/gnunit/README b/gnunit/README
new file mode 100644
index 00000000..624c33e5
--- /dev/null
+++ b/gnunit/README
@@ -0,0 +1,24 @@
+* gnunit (formerly nunit-gtk)
+------------
+
+gnunit is a frontend for running NUnit 2 test suites.
+
+* Directory layout
+-------------------
+
+ AUTHORS
+ NEWS
+ README
+ ChangeLog
+ configure.in
+ autogen.sh
+ Makefile.am
+
+ src/
+ Source files for nunit-gtk.
+ art/
+ Actually this directory should be called pseudo-random-art.
+ It contains a few PNG images used in nunit-gtk.
+
+-Gonzalo
+
diff --git a/gnunit/TODO b/gnunit/TODO
new file mode 100644
index 00000000..8203b7d6
--- /dev/null
+++ b/gnunit/TODO
@@ -0,0 +1,6 @@
+TODO List
+----------
+
+ * Allow plugins that would receive events as the tests are run.
+ This way we can generate reports or anything else.
+
diff --git a/gnunit/art/.cvsignore b/gnunit/art/.cvsignore
new file mode 100644
index 00000000..282522db
--- /dev/null
+++ b/gnunit/art/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/gnunit/art/Makefile.am b/gnunit/art/Makefile.am
new file mode 100644
index 00000000..f5df9bac
--- /dev/null
+++ b/gnunit/art/Makefile.am
@@ -0,0 +1,8 @@
+FILES= green.png \
+ none.png \
+ nunit-gui.png \
+ red.png \
+ yellow.png
+
+EXTRA_DIST= $(FILES)
+
diff --git a/gnunit/art/green.png b/gnunit/art/green.png
new file mode 100644
index 00000000..458e8efa
--- /dev/null
+++ b/gnunit/art/green.png
Binary files differ
diff --git a/gnunit/art/none.png b/gnunit/art/none.png
new file mode 100644
index 00000000..1ffb2c77
--- /dev/null
+++ b/gnunit/art/none.png
Binary files differ
diff --git a/gnunit/art/nunit-gui.png b/gnunit/art/nunit-gui.png
new file mode 100644
index 00000000..c0086969
--- /dev/null
+++ b/gnunit/art/nunit-gui.png
Binary files differ
diff --git a/gnunit/art/red.png b/gnunit/art/red.png
new file mode 100644
index 00000000..eeca90ba
--- /dev/null
+++ b/gnunit/art/red.png
Binary files differ
diff --git a/gnunit/art/yellow.png b/gnunit/art/yellow.png
new file mode 100644
index 00000000..9940dba7
--- /dev/null
+++ b/gnunit/art/yellow.png
Binary files differ
diff --git a/gnunit/src/.cvsignore b/gnunit/src/.cvsignore
new file mode 100644
index 00000000..62fa7e77
--- /dev/null
+++ b/gnunit/src/.cvsignore
@@ -0,0 +1,5 @@
+catalog.cs
+Makefile
+Makefile.in
+.deps
+AssemblyInfo.cs
diff --git a/gnunit/src/AssemblyInfo.cs.in b/gnunit/src/AssemblyInfo.cs.in
new file mode 100644
index 00000000..208691a1
--- /dev/null
+++ b/gnunit/src/AssemblyInfo.cs.in
@@ -0,0 +1,17 @@
+//
+// AssemblyInfo.cs for gnunit
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("@VERSION@")]
+[assembly: AssemblyTitle ("Mono NUnit2 GUI")]
+[assembly: AssemblyDescription ("A graphical frontend for NUnit2 framework using Gtk#.")]
+[assembly: AssemblyCopyright ("Copyright (c) 2003 Ximian, Inc.")]
+[assembly: AssemblyCompany ("Ximian, Inc.")]
+
diff --git a/gnunit/src/AssemblyStore.cs b/gnunit/src/AssemblyStore.cs
new file mode 100644
index 00000000..b6bdfa34
--- /dev/null
+++ b/gnunit/src/AssemblyStore.cs
@@ -0,0 +1,570 @@
+//
+// AssemblyStore.cs
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Threading;
+using GLib;
+using Gtk;
+using NUnit.Core;
+using Thread = System.Threading.Thread;
+
+namespace Mono.NUnit.GUI
+{
+ delegate void FixtureAddedEventHandler (object sender, FixtureAddedEventArgs args);
+ delegate void FixtureLoadErrorHandler (object sender, FixtureLoadErrorEventArgs args);
+
+ class FixtureAddedEventArgs : EventArgs
+ {
+ int total;
+ int current;
+
+ public FixtureAddedEventArgs (int current, int total)
+ {
+ this.total = total;
+ this.current = current;
+ }
+
+ public int Total {
+ get { return total; }
+ }
+
+ public int Current {
+ get { return current; }
+ }
+ }
+
+ delegate void TestStartHandler (TestCase test);
+ delegate void TestFinishHandler (TestCaseResult result);
+ delegate void SuiteStartHandler (TestSuite test);
+ delegate void SuiteFinishHandler (TestSuiteResult result);
+ delegate void TestCaseResultHandler (TestResult result);
+
+ abstract class QueuedEvent
+ {
+ public abstract void DoCallback ();
+ }
+
+ class QueuedTestEvent : QueuedEvent
+ {
+ Delegate te;
+ object arg;
+
+ public QueuedTestEvent (TestCaseResultHandler te, object arg)
+ {
+ this.te = te;
+ this.arg = arg;
+ }
+
+ public override void DoCallback ()
+ {
+ te.DynamicInvoke (new object [] {arg});
+ }
+ }
+
+ class QueuedSuiteStart : QueuedEvent
+ {
+ SuiteStartHandler handler;
+ TestSuite suite;
+
+ public QueuedSuiteStart (SuiteStartHandler handler, TestSuite suite)
+ {
+ this.handler = handler;
+ this.suite = suite;
+ }
+
+ public override void DoCallback ()
+ {
+ handler (suite);
+ }
+ }
+
+ class QueuedSuiteFinish : QueuedEvent
+ {
+ SuiteFinishHandler handler;
+ TestSuiteResult result;
+
+ public QueuedSuiteFinish (SuiteFinishHandler handler, TestSuiteResult result)
+ {
+ this.handler = handler;
+ this.result = result;
+ }
+
+ public override void DoCallback ()
+ {
+ handler (result);
+ }
+ }
+
+ class QueuedTestStart : QueuedEvent
+ {
+ TestStartHandler handler;
+ TestCase test;
+
+ public QueuedTestStart (TestStartHandler handler, TestCase test)
+ {
+ this.handler = handler;
+ this.test = test;
+ }
+
+ public override void DoCallback ()
+ {
+ handler (test);
+ }
+ }
+
+ class QueuedTestFinish : QueuedEvent
+ {
+ TestFinishHandler handler;
+ TestCaseResult result;
+
+ public QueuedTestFinish (TestFinishHandler handler, TestCaseResult result)
+ {
+ this.handler = handler;
+ this.result = result;
+ }
+
+ public override void DoCallback ()
+ {
+ handler (result);
+ }
+ }
+
+ class FixtureLoadErrorEventArgs : EventArgs
+ {
+ string message;
+ string filename;
+
+ public FixtureLoadErrorEventArgs (string filename, Exception e)
+ {
+ this.filename = filename;
+ message = e.Message;
+ }
+
+ public string FileName {
+ get { return filename; }
+ }
+
+ public string Message {
+ get { return message; }
+ }
+ }
+
+ class AssemblyStore : TreeStore, EventListener
+ {
+ string assemblyName;
+ Hashtable iters;
+ TestSuite rootTS;
+ TestResult lastResult;
+ int totalTests;
+ int currentTest;
+
+ bool runningTest;
+ bool cancelled;
+ EventListener listener;
+ Test test;
+ ManualResetEvent idle;
+ Queue pending;
+ System.Threading.Thread th;
+ string location;
+
+ Exception exception;
+ static GLib.GType gtype = GLib.GType.Invalid;
+
+ public event FixtureAddedEventHandler FixtureAdded;
+ public event FixtureLoadErrorHandler FixtureLoadError;
+ public event EventHandler FinishedRunning;
+ public event EventHandler FinishedLoad;
+ public event EventHandler IdleCallback;
+
+ static string _ (string key)
+ {
+ return Catalog.GetString (key);
+ }
+
+ public AssemblyStore (string assemblyName)
+ : base (GType.Int, GType.String)
+ {
+ if (assemblyName == null)
+ throw new ArgumentNullException ("assemblyName");
+
+ this.assemblyName = assemblyName;
+ location = "";
+ }
+
+ public static new GLib.GType GType {
+ get {
+ if (gtype == GLib.GType.Invalid)
+ gtype = RegisterGType (typeof (AssemblyStore));
+ return gtype;
+ }
+ }
+ public string Location {
+ get { return location; }
+ }
+
+ public bool Running {
+ get { return runningTest; }
+ }
+
+ public bool CancelRequest {
+ set {
+ if (runningTest) {
+ th.Abort ();
+ }
+ }
+ }
+
+ public bool Cancelled {
+ get { return cancelled; }
+ }
+
+ public TestResult LastResult {
+ get { return lastResult; }
+ }
+
+ public int SearchColumn {
+ get { return 1; }
+ }
+
+ public void Load ()
+ {
+ // I don't like this...
+ Assembly a;
+ try {
+ a = Assembly.Load (assemblyName);
+ location = a.Location;
+ } catch (Exception e) {
+ Console.WriteLine (e);
+ try {
+ a = Assembly.LoadFrom (assemblyName);
+ location = a.Location;
+ } catch {
+ location = "";
+ }
+ }
+
+ Idle.Add (new IdleHandler (Populate));
+ }
+
+ void GrayOut (TreeIter iter)
+ {
+ SetValue (iter, 0, (int) CircleColor.None);
+ TreeIter child;
+ if (!IterChildren (out child, iter))
+ return;
+
+ do {
+ GrayOut (child);
+ } while (IterNext (ref child));
+ }
+
+ public void RunTestAtIter (TreeIter iter, EventListener listener, ref int ntests)
+ {
+ if (iter.Equals (TreeIter.Zero))
+ return;
+
+ RunTestAtPath (GetPath (iter), listener, ref ntests);
+ }
+
+ public void RunTestAtPath (TreePath path, EventListener listener, ref int ntests)
+ {
+ if (runningTest)
+ throw new InvalidOperationException (_("Already running some test(s)."));
+
+ cancelled = false;
+ if (idle == null) {
+ idle = new ManualResetEvent (false);
+ pending = new Queue ();
+ }
+
+ TreeIter iter;
+ GetIter (out iter, path);
+ GrayOut (iter);
+
+ if (iter.Equals (TreeIter.Zero))
+ return;
+
+ string p = GetPath (iter).ToString ();
+ if (p == null || p == "")
+ return;
+
+ test = LookForTestByPath (p, null);
+ if (test == null)
+ return;
+
+ ntests = test.CountTestCases ();
+ runningTest = true;
+ this.listener = listener;
+ th = new System.Threading.Thread (new ThreadStart (InternalRunTest));
+ th.IsBackground = true;
+ th.Start ();
+ Idle.Add (new IdleHandler (Updater));
+ }
+
+ public new void Clear ()
+ {
+ base.Clear ();
+ iters = null;
+ lastResult = null;
+ }
+
+ void DoPending ()
+ {
+ QueuedEvent [] events;
+ lock (pending) {
+ events = new QueuedEvent [pending.Count];
+ pending.CopyTo (events, 0);
+ pending.Clear ();
+ }
+
+ foreach (QueuedEvent e in events)
+ e.DoCallback ();
+ }
+
+ bool Updater ()
+ {
+ if (!idle.WaitOne (0, true)) {
+ if (IdleCallback != null)
+ IdleCallback (this, EventArgs.Empty);
+
+ return true;
+ }
+
+ DoPending ();
+ if (runningTest == false) {
+ DoPending ();
+ OnFinishedRunning ();
+ }
+
+ idle.Reset ();
+ return runningTest;
+ }
+
+ void InternalRunTest ()
+ {
+ lastResult = null;
+ try {
+ lastResult = test.Run (this);
+ } catch (ThreadAbortException) {
+ Thread.ResetAbort ();
+ cancelled = true;
+ } finally {
+ runningTest = false;
+ idle.Set ();
+ }
+ }
+
+ Test LookForTestByPath (string path, Test t)
+ {
+ string [] parts = path.Split (':');
+ if (t == null) {
+ if (parts.Length > 1)
+ return LookForTestByPath (String.Join (":", parts, 1, parts.Length - 1), rootTS);
+
+ return rootTS;
+ }
+
+ Test ret;
+ //Console.WriteLine ("Count: {0} Index: {1} path: '{2}'", t.Tests.Count, parts [0], path);
+ if (parts.Length == 1) {
+ ret = (Test) t.Tests [Int32.Parse (path)];
+ return ret;
+ }
+
+ ret = (Test) t.Tests [Int32.Parse (parts [0])];
+ //Console.WriteLine ("Recurse: " + ret.FullName + " " + String.Join (":", parts, 1, parts.Length - 1));
+ return LookForTestByPath (String.Join (":", parts, 1, parts.Length - 1), ret);
+
+ }
+
+ TreeIter AddFixture (TreeIter parent, string fullName)
+ {
+ string typeName = fullName;
+ string [] parts = typeName.Split ('.');
+ string index = "";
+
+ foreach (string s in parts) {
+ if (index == "")
+ index = s;
+ else
+ index += "." + s;
+
+ if (iters.ContainsKey (index)) {
+ parent = (TreeIter) iters [index];
+ continue;
+ }
+
+ parent = AppendValues (parent, (int) CircleColor.None, s);
+ iters [index] = parent;
+ }
+
+ return parent;
+ }
+
+ void AddSuite (TreeIter parent, TestSuite suite)
+ {
+ TreeIter next;
+ foreach (Test t in suite.Tests) {
+ next = AddFixture (parent, t.FullName);
+ while (GLib.MainContext.Iteration ());
+ if (t.IsSuite)
+ AddSuite (next, (TestSuite) t);
+ else if (FixtureAdded != null)
+ FixtureAdded (this, new FixtureAddedEventArgs (++currentTest, totalTests));
+
+ }
+ }
+
+ bool Populate ()
+ {
+ Clear ();
+ iters = new Hashtable ();
+ TreeIter first;
+ Append (out first);
+ SetValue (first, 0, (int) CircleColor.None);
+ SetValue (first, 1, assemblyName);
+ iters [assemblyName] = first;
+ ResolveEventHandler reh = new ResolveEventHandler (TryLoad);
+ AppDomain.CurrentDomain.AssemblyResolve += reh;
+
+ try {
+ rootTS = new TestSuiteBuilder ().Build (assemblyName);
+ } catch (Exception e) {
+ if (FixtureLoadError != null) {
+ exception = e;
+ Idle.Add (new IdleHandler (TriggerError));
+ }
+ return false;
+ } finally {
+ AppDomain.CurrentDomain.AssemblyResolve -= reh;
+ }
+
+ currentTest = 0;
+ totalTests = rootTS.CountTestCases ();
+ AddSuite (first, rootTS);
+ OnFinishedLoad ();
+
+ return false;
+ }
+
+ void OnFinishedLoad ()
+ {
+ if (FinishedLoad != null)
+ FinishedLoad (this, EventArgs.Empty);
+ }
+
+ void OnFinishedRunning ()
+ {
+ if (FinishedRunning != null)
+ FinishedRunning (this, EventArgs.Empty);
+ }
+
+ bool TriggerError ()
+ {
+ FixtureLoadError (this, new FixtureLoadErrorEventArgs (assemblyName, exception));
+ exception = null;
+ return false;
+ }
+
+ Assembly TryLoad (object sender, ResolveEventArgs args)
+ {
+ try {
+ // NUnit2 uses Assembly.Load on the filename without extension.
+ // This is done just to allow loading from a full path name.
+ return Assembly.LoadFrom (assemblyName);
+ } catch { }
+
+ return null;
+ }
+
+ // Interface NUnit.Core.EventListener
+ void EventListener.RunStarted (Test [] tests)
+ {
+ }
+
+ void EventListener.RunFinished (TestResult [] results)
+ {
+ }
+
+ void EventListener.UnhandledException (Exception exception)
+ {
+ }
+
+ void EventListener.RunFinished (Exception exc)
+ {
+ }
+
+ void EventListener.TestStarted (TestCase testCase)
+ {
+ if (listener != null) {
+ Monitor.Enter (pending);
+ pending.Enqueue (new QueuedTestStart (new TestStartHandler (listener.TestStarted), testCase));
+ Monitor.Exit (pending);
+ idle.Set ();
+ }
+ }
+
+ void EventListener.TestFinished (TestCaseResult result)
+ {
+ Monitor.Enter (pending);
+ if (listener != null)
+ pending.Enqueue (new QueuedTestFinish (new TestFinishHandler (listener.TestFinished), result));
+
+ pending.Enqueue (new QueuedTestEvent (new TestCaseResultHandler (SetIconFromResult), result));
+ Monitor.Exit (pending);
+ idle.Set ();
+ }
+
+ void EventListener.SuiteStarted (TestSuite suite)
+ {
+ if (listener != null) {
+ Monitor.Enter (pending);
+ pending.Enqueue (new QueuedSuiteStart (new SuiteStartHandler (listener.SuiteStarted), suite));
+ Monitor.Exit (pending);
+ idle.Set ();
+ }
+ }
+
+ void EventListener.SuiteFinished (TestSuiteResult result)
+ {
+ Monitor.Enter (pending);
+ if (listener != null)
+ pending.Enqueue (new QueuedSuiteFinish (new SuiteFinishHandler (listener.SuiteFinished), result));
+
+ pending.Enqueue (new QueuedTestEvent (new TestCaseResultHandler (SetIconFromResult), result));
+ Monitor.Exit (pending);
+ idle.Set ();
+ }
+
+ void SetIconFromResult (TestResult result)
+ {
+ CircleColor color;
+ if (!result.Executed)
+ color = CircleColor.NotRun;
+ else if (result.IsFailure)
+ color = CircleColor.Failure;
+ else if (result.IsSuccess)
+ color = CircleColor.Success;
+ else {
+ Console.WriteLine (_("Warning: unexpected combination."));
+ color = CircleColor.None;
+ }
+
+ string fullname = result.Test.FullName;
+ if (iters.ContainsKey (fullname)) {
+ TreeIter iter = (TreeIter) iters [fullname];
+ SetValue (iter, 0, (int) color);
+ } else {
+ Console.WriteLine (_("Don't know anything about {0}"), fullname);
+ }
+ }
+ }
+}
+
diff --git a/gnunit/src/CircleRenderer.cs b/gnunit/src/CircleRenderer.cs
new file mode 100644
index 00000000..53508648
--- /dev/null
+++ b/gnunit/src/CircleRenderer.cs
@@ -0,0 +1,65 @@
+//
+// CircleRenderer.cs
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+using System;
+using GLib;
+using Gdk;
+using Gtk;
+
+namespace Mono.NUnit.GUI
+{
+ enum CircleColor
+ {
+ None,
+ Failure,
+ NotRun,
+ Success
+ }
+
+ class CircleRenderer
+ {
+ static TreeCellDataFunc dataFunc = null;
+ static Pixbuf [] circles = null;
+ static string [] colors = null;
+
+ static void Init ()
+ {
+ if (circles != null)
+ return;
+
+ circles = new Pixbuf [4];
+ circles [(int) CircleColor.None] = new Pixbuf (null, "none.png");
+ circles [(int) CircleColor.Failure] = new Pixbuf (null, "red.png");
+ circles [(int) CircleColor.NotRun] = new Pixbuf (null, "yellow.png");
+ circles [(int) CircleColor.Success] = new Pixbuf (null, "green.png");
+ }
+
+ static void SetCellData (TreeViewColumn col, CellRenderer cell, TreeModel model, TreeIter iter)
+ {
+ try {
+ CellRendererPixbuf cr = (CellRendererPixbuf) cell;
+ cr.Pixbuf = circles [(int) model.GetValue (iter, 0)];
+ } catch (Exception e) {
+ Console.WriteLine (e);
+ Console.WriteLine ();
+ }
+ }
+
+ public static Gtk.TreeCellDataFunc CellDataFunc {
+ get {
+ if (dataFunc == null) {
+ dataFunc = new TreeCellDataFunc (SetCellData);
+ Init ();
+ }
+
+ return dataFunc;
+ }
+ }
+ }
+}
+
diff --git a/gnunit/src/FileDialog.cs b/gnunit/src/FileDialog.cs
new file mode 100644
index 00000000..4457c529
--- /dev/null
+++ b/gnunit/src/FileDialog.cs
@@ -0,0 +1,63 @@
+//
+// FileDialog.cs
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+using System;
+using GLib;
+using Gtk;
+using GtkSharp;
+
+namespace Mono.NUnit.GUI
+{
+ public class FileDialog : FileSelection
+ {
+ bool ok;
+ string filename;
+
+ static string _ (string key)
+ {
+ return Catalog.GetString (key);
+ }
+
+ public FileDialog () : this (_("Select an assembly to load"), "*.dll") {}
+
+ public FileDialog (string title, string complete)
+ : base (title)
+ {
+ ShowFileops = false;
+ SelectMultiple = false;
+ filename = null;
+ Complete (complete);
+ OkButton.Clicked += new EventHandler (OkClicked);
+ Response += new ResponseHandler (OnResponse);
+ }
+
+ void OkClicked (object sender, EventArgs args)
+ {
+ ok = true;
+ filename = base.Filename;
+ }
+
+ void OnResponse (object sender, ResponseArgs args)
+ {
+ Hide ();
+ }
+
+ public bool Cancelled {
+ get { return !ok; }
+ }
+
+ public bool Ok {
+ get { return ok; }
+ }
+
+ public new string Filename {
+ get { return filename; }
+ }
+ }
+}
+
diff --git a/gnunit/src/Makefile.am b/gnunit/src/Makefile.am
new file mode 100644
index 00000000..b2a6f6ce
--- /dev/null
+++ b/gnunit/src/Makefile.am
@@ -0,0 +1,70 @@
+#
+# Makefile.am for gnunit.exe
+#
+# Authors:
+# Gonzalo Paniagua Javier (gonzalo@ximian.com)
+# Martin Willemoes Hansen (mwh@sysrq.dk>
+#
+local_flags = -debug+ -debug:full -nologo $(NUNIT_LIBS)
+
+local_flags += $(MCSFLAGS) $(GTK_SHARP_LIBS)
+
+gnunit_SCRIPTS = gnunit.exe
+gnunit2_SCRIPTS = gnunit2.exe
+gnunit2dir = $(prefix)/lib/mono/2.0
+gnunitdir = $(prefix)/lib/mono/1.0
+
+CLEANFILES = gnunit.exe gnunit2.exe gnunit gnunit2
+EXTRA_DIST = $(gnunit_sources_dist) nunit-gtk.glade
+
+resources = $(srcdir)/nunit-gtk.glade \
+ $(srcdir)/../art/nunit-gui.png \
+ $(srcdir)/../art/none.png \
+ $(srcdir)/../art/red.png \
+ $(srcdir)/../art/yellow.png \
+ $(srcdir)/../art/green.png
+
+gnunit_sources = main.cs \
+ AssemblyStore.cs \
+ CircleRenderer.cs \
+ FileDialog.cs \
+ Settings.cs
+
+gnunit_sources_in = AssemblyInfo.cs.in catalog.cs.in
+gnunit_sources_dist = $(gnunit_sources) $(gnunit_sources_in)
+gnunit_sources_build = $(addprefix $(srcdir)/, $(gnunit_sources))
+gnunit_sources_build += $(gnunit_sources_in:.in=)
+
+schema=nunit-gtk.schema
+###
+ress= $(foreach res,$(resources), $(addprefix -resource:,$(res)),$(notdir $(res)))
+
+gnunit.exe: $(gnunit_sources_build) $(resources)
+ $(MCS) $(MCSFLAGS) $(local_flags) $(ress) -out:$@ $(gnunit_sources_build)
+
+gnunit2.exe: gnunit.exe
+ cp $^ $@
+
+installschema:
+ GCONF_CONFIG_SOURCE="" gconftool-2 --makefile-install-rule $(schema)
+
+scriptdir = $(bindir)
+
+script_SCRIPTS = \
+ gnunit \
+ gnunit2
+
+REWRITE = sed \
+ -e 's,@''bindir@,$(bindir),g' \
+ -e 's,@''mono_one_instdir@,$(gnunitdir),g' \
+ -e 's,@''mono_two_instdir@,$(gnunit2dir),g' \
+ -e 's,@''exe_file@,$@.exe,g' \
+ -e 's,@''mono_interp@,mono --debug,g'
+
+gnunit :
+ $(REWRITE) $(srcdir)/script.in > $@.tmp
+ mv $@.tmp $@
+
+gnunit2 :
+ $(REWRITE) $(srcdir)/script2.in > $@.tmp
+ mv $@.tmp $@
diff --git a/gnunit/src/Settings.cs b/gnunit/src/Settings.cs
new file mode 100644
index 00000000..2b5c1b28
--- /dev/null
+++ b/gnunit/src/Settings.cs
@@ -0,0 +1,136 @@
+//
+// Settings.cs
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+// Autogenerated
+// gconfsharp-schemagen.exe Mono.NUnit.GUI nunit-gtk.schema > Settings.cs
+
+namespace Mono.NUnit.GUI
+{
+ public class Settings
+ {
+ static GConf.Client client = new GConf.Client ();
+
+ public static event GConf.NotifyEventHandler Changed
+ {
+ add {
+ client.AddNotify ("/apps/nunitgtk", value);
+ }
+ remove{
+ client.RemoveNotify ("/apps/nunitgtk", value);
+ }
+ }
+
+ public static int Hpaned
+ {
+ get {
+ return (int) client.Get ("/apps/nunitgtk/hpaned");
+ }
+ set {
+ client.Set ("/apps/nunitgtk/hpaned", value);
+ }
+ }
+
+ public static event GConf.NotifyEventHandler HpanedChanged
+ {
+ add {
+ client.AddNotify ("/apps/nunitgtk/hpaned", value);
+ }
+ remove{
+ client.RemoveNotify ("/apps/nunitgtk/hpaned", value);
+ }
+ }
+
+ public static string Recentassemblies
+ {
+ get {
+ return (string) client.Get ("/apps/nunitgtk/recentassemblies");
+ }
+ set {
+ client.Set ("/apps/nunitgtk/recentassemblies", value);
+ }
+ }
+
+ public static event GConf.NotifyEventHandler RecentassembliesChanged
+ {
+ add {
+ client.AddNotify ("/apps/nunitgtk/recentassemblies", value);
+ }
+ remove{
+ client.RemoveNotify ("/apps/nunitgtk/recentassemblies", value);
+ }
+ }
+
+ public static int Width
+ {
+ get {
+ return (int) client.Get ("/apps/nunitgtk/width");
+ }
+ set {
+ client.Set ("/apps/nunitgtk/width", value);
+ }
+ }
+
+ public static event GConf.NotifyEventHandler WidthChanged
+ {
+ add {
+ client.AddNotify ("/apps/nunitgtk/width", value);
+ }
+ remove{
+ client.RemoveNotify ("/apps/nunitgtk/width", value);
+ }
+ }
+
+ public static int Height
+ {
+ get {
+ return (int) client.Get ("/apps/nunitgtk/height");
+ }
+ set {
+ client.Set ("/apps/nunitgtk/height", value);
+ }
+ }
+
+ public static event GConf.NotifyEventHandler HeightChanged
+ {
+ add {
+ client.AddNotify ("/apps/nunitgtk/height", value);
+ }
+ remove{
+ client.RemoveNotify ("/apps/nunitgtk/height", value);
+ }
+ }
+ }
+
+ public class SettingKeys
+ {
+ public static string Hpaned
+ {
+ get {
+ return "/apps/nunitgtk/hpaned";
+ }
+ }
+ public static string Recentassemblies
+ {
+ get {
+ return "/apps/nunitgtk/recentassemblies";
+ }
+ }
+ public static string Width
+ {
+ get {
+ return "/apps/nunitgtk/width";
+ }
+ }
+ public static string Height
+ {
+ get {
+ return "/apps/nunitgtk/height";
+ }
+ }
+ }
+}
diff --git a/gnunit/src/catalog.cs.in b/gnunit/src/catalog.cs.in
new file mode 100644
index 00000000..ce17a9ce
--- /dev/null
+++ b/gnunit/src/catalog.cs.in
@@ -0,0 +1,73 @@
+/// Catalog
+// Copyright (C) 2004 Edd Dumbill <edd@usefulinc.com>
+///
+/// This program is free software; you can redistribute it and/or modify
+/// it under the terms of the GNU General Public License as published by
+/// the Free Software Foundation; either version 2 of the License, or
+/// (at your option) any later version.
+///
+/// This program is distributed in the hope that it will be useful,
+/// but WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+/// GNU General Public License for more details.
+///
+/// You should have received a copy of the GNU General Public License
+/// along with this program; if not, write to the Free Software
+/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+/// catelog.cs I18N binding for gettext
+
+using System;
+using System.Runtime.InteropServices;
+
+class Catalog {
+ [DllImport("libc")]
+ static extern IntPtr bindtextdomain (IntPtr domainname, IntPtr dirname);
+ [DllImport("libc")]
+ static extern IntPtr bind_textdomain_codeset (IntPtr domainname,
+ IntPtr codeset);
+ [DllImport("libc")]
+ static extern IntPtr textdomain (IntPtr domainname);
+
+ public static void Init (String package, String localedir)
+ {
+ IntPtr ipackage = Marshal.StringToHGlobalAuto (package);
+ IntPtr ilocaledir = Marshal.StringToHGlobalAuto (localedir);
+ IntPtr iutf8 = Marshal.StringToHGlobalAuto ("UTF-8");
+ bindtextdomain (ipackage, ilocaledir);
+ bind_textdomain_codeset (ipackage, iutf8);
+ textdomain (ipackage);
+ Marshal.FreeHGlobal (ipackage);
+ Marshal.FreeHGlobal (ilocaledir);
+ Marshal.FreeHGlobal (iutf8);
+ }
+
+ [DllImport("libc")]
+ static extern IntPtr gettext (IntPtr instring);
+
+ public static String GetString (String s)
+ {
+ IntPtr ints = Marshal.StringToHGlobalAuto (s);
+ String t = Marshal.PtrToStringAuto (gettext (ints));
+ Marshal.FreeHGlobal (ints);
+ return t;
+ }
+
+ [DllImport("libc")]
+ static extern IntPtr ngettext (IntPtr singular, IntPtr plural, Int32 n);
+
+ public static String GetPluralString (String s, String p, Int32 n)
+ {
+ IntPtr ints = Marshal.StringToHGlobalAuto (s);
+ IntPtr intp = Marshal.StringToHGlobalAuto (p);
+ String t = Marshal.PtrToStringAnsi (ngettext (ints, intp, n));
+ Marshal.FreeHGlobal (ints);
+ Marshal.FreeHGlobal (intp);
+ return t;
+ }
+
+ public static void InitCatalog ()
+ {
+ Catalog.Init ("mono-tools", "@prefix@/share/locale");
+ }
+}
diff --git a/gnunit/src/gnunit2.exe.config b/gnunit/src/gnunit2.exe.config
new file mode 100644
index 00000000..169cb35b
--- /dev/null
+++ b/gnunit/src/gnunit2.exe.config
@@ -0,0 +1,6 @@
+<configuration>
+ <startup>
+ <requiredRuntime version="v2.0.40607" />
+ <supportedRuntime version="v2.0.40607" />
+ </startup>
+</configuration>
diff --git a/gnunit/src/main.cs b/gnunit/src/main.cs
new file mode 100644
index 00000000..58df3738
--- /dev/null
+++ b/gnunit/src/main.cs
@@ -0,0 +1,870 @@
+//
+// main.cs: nunit-gtk.exe - a frontend for running NUnit2 test cases.
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+using System;
+using System.Collections;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using Gdk;
+using GLib;
+using Gnome;
+using Gtk;
+using NUnit.Core;
+using NUnit.Util;
+
+namespace Mono.NUnit.GUI
+{
+ class OverWriteDialog
+ {
+ [Glade.Widget] Gtk.Dialog overwriteDialog;
+ [Glade.Widget] Label header;
+ [Glade.Widget] Label message;
+ bool yes;
+
+ public OverWriteDialog (string filename)
+ {
+ Glade.XML gXML = new Glade.XML (null, "nunit-gtk.glade", "overwriteDialog", null);
+ gXML.Autoconnect (this);
+ overwriteDialog.Response += new ResponseHandler (OnResponse);
+ header.Markup = String.Format ( _("<b>File {0} exists.</b>"), filename);
+ message.Text = _("Do you want to overwrite it?");
+ }
+
+ void OnResponse (object sender, ResponseArgs args)
+ {
+ yes = (args.ResponseId == ResponseType.Yes);
+ }
+
+ public void Run ()
+ {
+ overwriteDialog.Run ();
+ overwriteDialog.Hide ();
+ overwriteDialog.Dispose ();
+ }
+
+ public bool Yes {
+ get { return yes; }
+ }
+
+ static string _ (string key)
+ {
+ return Catalog.GetString (key);
+ }
+ }
+
+ class ErrorDialog
+ {
+ [Glade.Widget] Gtk.Dialog errorDialog;
+ [Glade.Widget] Label message;
+ [Glade.Widget] HBox detailBox;
+ [Glade.Widget] Button btnDetails;
+ [Glade.Widget] Button btnExit;
+ [Glade.Widget] Button btnOK;
+ [Glade.Widget] TextView details;
+
+ public ErrorDialog (string title, string text)
+ : this (title, text, null)
+ {
+ }
+
+ public ErrorDialog (string title, string text, string more)
+ {
+ Glade.XML gXML = new Glade.XML (null, "nunit-gtk.glade", "errorDialog", null);
+ gXML.Autoconnect (this);
+ errorDialog.Title = title;
+ errorDialog.Response += new ResponseHandler (OnResponse);
+ message.Markup = text;
+ btnExit.Visible = false;
+ detailBox.Visible = false;
+ if (more == null || more == "") {
+ btnDetails.Visible = false;
+ } else {
+ details.Buffer.InsertAtCursor (more);
+ }
+ }
+
+ public void UseExitButton ()
+ {
+ btnOK.Visible = false;
+ btnExit.Visible = true;
+ }
+
+ void OnDetailsClicked (object sender, EventArgs args)
+ {
+ if (detailBox.Visible) {
+ detailBox.Visible = false;
+ btnDetails.Label = _("Show details >>");
+ } else {
+ detailBox.Visible = true;
+ btnDetails.Label = _("Hide details <<");
+ }
+ }
+
+ void OnResponse (object sender, ResponseArgs args)
+ {
+ }
+
+ public void Run ()
+ {
+ errorDialog.Run ();
+ errorDialog.Hide ();
+ errorDialog.Dispose ();
+ }
+
+ static string _ (string key)
+ {
+ return Catalog.GetString (key);
+ }
+ }
+
+ public class NUnitGUI : Program, EventListener
+ {
+ static string version;
+ static string title;
+ static string copyright;
+ static string description;
+
+ [Glade.Widget("nunitgui")] Gtk.Window window;
+ [Glade.Widget] AppBar appbar;
+
+ // Run frame
+ [Glade.Widget] ProgressBar frameProgress;
+ [Glade.Widget] Label frameLabel;
+ [Glade.Widget] Label runStatus;
+ [Glade.Widget] Label clock;
+
+ // Menu
+ [Glade.Widget] ImageMenuItem menuRecent;
+ [Glade.Widget] MenuBar menubar;
+ [Glade.Widget] MenuItem menuSaveAs;
+ [Glade.Widget] Button btnOpen;
+ [Glade.Widget] Button btnSaveAs;
+ [Glade.Widget] Button btnRun;
+ [Glade.Widget] Button btnExit;
+ [Glade.Widget] Button btnStop;
+
+ // Notebook
+ [Glade.Widget] TreeView failures;
+ [Glade.Widget] Label failuresLabel;
+
+ [Glade.Widget] TreeView notRun;
+ [Glade.Widget] Label notRunLabel;
+
+ [Glade.Widget] TextView stdoutTV;
+ [Glade.Widget] Label stdoutLabel;
+
+ [Glade.Widget] TextView stderrTV;
+ [Glade.Widget] Label stderrLabel;
+
+ Label [] nbLabels;
+ //
+
+ [Glade.Widget] TreeView assemblyView;
+ [Glade.Widget] Paned hpaned;
+
+ string [] args;
+ AssemblyStore store;
+ TreeStore notRunStore;
+ TreeStore failuresStore;
+ int ntests;
+ int finishedTests;
+ int ignoredTests;
+ int errorTests;
+ TextWriter origStdout = Console.Out;
+ TextWriter origStderr = Console.Error;
+ StringWriter stdout = new StringWriter ();
+ StringWriter stderr = new StringWriter ();
+ Hashtable errorIters;
+ TreeViewColumn nameCol;
+ CellRendererPixbuf pr;
+ CellRendererText tr;
+ Gtk.Dialog about;
+ bool quitting;
+ long startTime;
+
+ static string _ (string key)
+ {
+ return Catalog.GetString (key);
+ }
+
+ static NUnitGUI ()
+ {
+ Assembly assembly = Assembly.GetExecutingAssembly ();
+ version = assembly.GetName ().Version.ToString ();
+ object [] att = assembly.GetCustomAttributes (typeof (AssemblyTitleAttribute), false);
+ title = ((AssemblyTitleAttribute) att [0]).Title;
+ att = assembly.GetCustomAttributes (typeof (AssemblyCopyrightAttribute), false);
+ copyright = ((AssemblyCopyrightAttribute) att [0]).Copyright;
+ att = assembly.GetCustomAttributes (typeof (AssemblyDescriptionAttribute), false);
+ description = ((AssemblyDescriptionAttribute) att [0]).Description;
+ }
+
+ public NUnitGUI (string [] args, params object [] props)
+ : base ("gnunit", version, Modules.UI, args, props)
+ {
+ Glade.XML gXML = new Glade.XML (null, "nunit-gtk.glade", "nunitgui", null);
+ gXML.Autoconnect (this);
+ window.Title = title;
+ btnStop.Sensitive = false;
+ nbLabels = new Label [] {failuresLabel, notRunLabel, stderrLabel, stdoutLabel};
+ this.args = args;
+
+ pr = new CellRendererPixbuf ();
+ tr = new CellRendererText ();
+ nameCol = new TreeViewColumn ();
+ nameCol.PackStart (pr, false);
+ nameCol.SetCellDataFunc (pr, CircleRenderer.CellDataFunc, IntPtr.Zero, null);
+ nameCol.PackStart (tr, false);
+ nameCol.AddAttribute (tr, "text", 1);
+ assemblyView.AppendColumn (nameCol);
+
+ if (args.Length == 1) {
+ LoadAssembly (args [0]);
+ } else {
+ btnRun.Sensitive = false;
+ window.Title = title;
+ appbar.SetStatus (_("No assembly loaded."));
+ }
+ menuSaveAs.Sensitive = false;
+ btnSaveAs.Sensitive = false;
+ SetupRecentAssembliesMenu (null, null);
+ Settings.RecentassembliesChanged += new GConf.NotifyEventHandler (SetupRecentAssembliesMenu);
+
+ int width, height, position;
+ try {
+ width = Settings.Width;
+ height = Settings.Height;
+ position = Settings.Hpaned;
+ } catch {
+ Settings.Width = width = 450;
+ Settings.Width = height = 300;
+ Settings.Hpaned = position = 150;
+ }
+
+ window.Resize (width, height);
+ hpaned.Position = position;
+ window.ShowAll ();
+ }
+
+ void LoadAssembly (string name)
+ {
+ window.Title = String.Format ("{0} - [{1}]", title, name);
+ appbar.SetStatus (String.Format (_("Loading {0}..."), name));
+ frameProgress.Fraction = 0.0;
+ frameProgress.Text = "";
+ frameLabel.Text = "";
+ runStatus.Text = "";
+ menubar.Sensitive = false;
+ btnOpen.Sensitive = false;
+ btnRun.Sensitive = false;
+ btnSaveAs.Sensitive = false;
+ clock.Text = "";
+
+ errorIters = null;
+ if (notRunStore != null)
+ notRunStore.Clear ();
+
+ if (failuresStore != null)
+ failuresStore.Clear ();
+
+ if (store != null) {
+ store.Clear ();
+ store.Dispose ();
+ }
+
+ stdoutTV.Buffer.Clear ();
+ stderrTV.Buffer.Clear ();
+ foreach (Label l in nbLabels)
+ SetColorLabel (l, false);
+
+ store = new AssemblyStore (name);
+ ntests = 0;
+ store.FixtureLoadError += new FixtureLoadErrorHandler (OnFixtureLoadError);
+ store.FixtureAdded += new FixtureAddedEventHandler (OnFixtureAdded);
+ store.FinishedRunning += new EventHandler (OnFinishedRunning);
+ store.FinishedLoad += new EventHandler (OnFinishedLoad);
+ store.IdleCallback += new EventHandler (ClockUpdater);
+ assemblyView.Model = store;
+ assemblyView.SearchColumn = store.SearchColumn;
+ store.Load ();
+ string path = store.Location;
+ AddRecent (path);
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (path));
+ }
+
+ void AddRecent (string name)
+ {
+ if (name == null || name == "")
+ return;
+
+ string [] recent;
+ try {
+ recent = Settings.Recentassemblies.Split (':');
+ } catch {
+ recent = new string [0];
+ }
+ ArrayList list = new ArrayList (recent);
+ list.Remove ("");
+
+ int i;
+ if ((i = list.IndexOf (name)) != -1) {
+ if (list.Count == 1)
+ return;
+
+ list.RemoveAt (i);
+ list.Insert (0, name);
+ } else {
+ list.Add (name);
+ }
+
+ while (list.Count > 10)
+ list.RemoveAt (0);
+
+ recent = (string []) list.ToArray (typeof (string));
+ Settings.Recentassemblies = String.Join (":", recent);
+ }
+
+ void RemoveRecent (string name)
+ {
+ string [] recent;
+ try {
+ recent = Settings.Recentassemblies.Split (':');
+ } catch {
+ recent = new string [0];
+ }
+ ArrayList list = new ArrayList (recent);
+ list.Remove ("");
+ list.Remove (name);
+
+ recent = (string []) list.ToArray (typeof (string));
+ Settings.Recentassemblies = String.Join (":", recent);
+ }
+
+ // assemblyView events
+ void OnTestActivated (object sender, RowActivatedArgs args)
+ {
+ if (store == null)
+ return;
+
+ TreeView tv = (TreeView) sender;
+ tv.ExpandRow (args.Path, true);
+ if (!store.Running) {
+ PrepareRun ();
+ store.RunTestAtPath (args.Path, this, ref ntests);
+ }
+ }
+
+ // AssemblyStore events
+ void OnFixtureAdded (object sender, FixtureAddedEventArgs args)
+ {
+ string msg = String.Format (_("Loading test {0} of {1}"), args.Current, args.Total);
+ ntests = args.Current;
+ appbar.Progress.Fraction = ntests / (double) args.Total;
+ appbar.SetStatus (msg);
+ }
+
+ void OnFixtureLoadError (object sender, FixtureLoadErrorEventArgs args)
+ {
+ store.Clear ();
+ store = null;
+ RemoveRecent (args.FileName);
+ appbar.SetStatus (_("Error loading assembly"));
+ Error (String.Format (_("Error loading '{0}'"), args.FileName), args.Message, null, false);
+ appbar.SetStatus ("");
+ btnRun.Sensitive = false;
+ menubar.Sensitive = true;
+ btnOpen.Sensitive = true;
+ }
+
+ // Window event handlers
+ void OnWindowDelete (object sender, EventArgs args)
+ {
+ OnQuitActivate (sender, args);
+ }
+
+ // Menu and toolbar event handlers
+ void OnQuitActivate (object sender, EventArgs args)
+ {
+ if (store != null)
+ store.CancelRequest = true;
+
+ quitting = true;
+ Settings.Width = window.Allocation.Width;
+ Settings.Height = window.Allocation.Height;
+ Settings.Hpaned = hpaned.Position;
+ Quit ();
+ Environment.Exit (0);
+ }
+
+ void OnExitActivate (object sender, EventArgs args)
+ {
+ OnQuitActivate (sender, args);
+ }
+
+ void OnCopyActivate (object sender, EventArgs args)
+ {
+ Console.WriteLine ("OnCopy");
+ }
+
+ void OnOpenActivate (object sender, EventArgs args)
+ {
+ FileDialog fd = new FileDialog ();
+ fd.Run ();
+ if (fd.Ok)
+ LoadAssembly (fd.Filename);
+ }
+
+ void OnAboutActivate (object sender, EventArgs args)
+ {
+ Pixbuf logo = Pixbuf.LoadFromResource ("nunit-gui.png");
+ string [] authors = new string[] { "Gonzalo Paniagua Javier (gonzalo@ximian.com)" };
+ string [] docs = new string[] { };
+ string translator = Catalog.GetString ("translator_credits");
+
+ about = new About (title, version, copyright, description, authors, docs, translator, logo);
+ about.Show ();
+ System.GC.SuppressFinalize (about);
+ }
+
+ void OnPreferencesActivate (object sender, EventArgs args)
+ {
+ Console.WriteLine ("OnPreferencesActivate");
+ }
+
+ void OnRunActivate (object sender, EventArgs args)
+ {
+ if (assemblyView.Model == null)
+ return;
+
+ TreeSelection selection = assemblyView.Selection;
+ TreeModel model;
+ TreeIter iter;
+
+ if (!selection.GetSelected (out model, out iter)) {
+ appbar.SetStatus (_("You have to select a test to run."));
+ return;
+ }
+
+ PrepareRun ();
+ store.RunTestAtIter (iter, this, ref ntests);
+ }
+
+ void LoadRecent (object sender, EventArgs args)
+ {
+ MenuItem item = (MenuItem) sender;
+ string assembly = (string) item.Data ["assemblyName"];
+ LoadAssembly (assembly);
+ }
+
+ void OnClearRecent (object sender, EventArgs args)
+ {
+ Settings.Recentassemblies = "";
+ }
+
+ void OnStopActivate (object sender, EventArgs args)
+ {
+ if (store != null && store.Running)
+ store.CancelRequest = true;
+ }
+
+ void OnSaveAs (object sender, EventArgs args)
+ {
+ if (store == null || store.LastResult == null) {
+ Error (_("No test results available"),
+ _("You must run some tests in order to get results to save."),
+ null,
+ false);
+ return;
+ }
+
+ FileDialog fd = new FileDialog (_("Save results to..."), "*.xml");
+ fd.Run ();
+ if (!fd.Ok)
+ return;
+
+ if (File.Exists (fd.Filename)) {
+ OverWriteDialog dlg = new OverWriteDialog (fd.Filename);
+ dlg.Run ();
+ if (!dlg.Yes) {
+ appbar.SetStatus (_("Results not saved."));
+ return;
+ }
+ }
+
+ TestResult result = store.LastResult;
+ XmlResultVisitor visitor = null;
+ try {
+ visitor = new XmlResultVisitor (fd.Filename, result);
+ } catch (Exception e) {
+ Error (_("Error"),
+ _("There has been an error saving the results.\n") +
+ _("Do you have correct permissions to write to that file?"),
+ e.ToString (),
+ false);
+ return;
+ }
+
+ result.Accept (visitor);
+ visitor.Write ();
+ appbar.SetStatus (String.Format (_("Results saved to {0}"), fd.Filename));
+ }
+
+ // Notebook
+ void OnSwitchPage (object sender, SwitchPageArgs args)
+ {
+ Notebook nb = (Notebook) sender;
+ if (nb.Page != args.PageNum) {
+ SetColorLabel (nbLabels [nb.Page], false);
+ }
+
+ SetColorLabel (nbLabels [args.PageNum], false);
+ }
+
+ // Used for the 2 treeviews in the notebook
+ void OnRowActivated (object sender, RowActivatedArgs args)
+ {
+ TreeView tv = (TreeView) sender;
+ TreePath path = args.Path;
+ if (tv.GetRowExpanded (path))
+ tv.CollapseRow (path);
+ else
+ tv.ExpandRow (path, true);
+ }
+
+ // Interface NUnit.Core.EventListener
+ void EventListener.RunStarted (Test [] tests)
+ {
+ }
+
+ void EventListener.RunFinished (TestResult [] results)
+ {
+ }
+
+ void EventListener.UnhandledException (Exception exception)
+ {
+ }
+
+ void EventListener.RunFinished (Exception exc)
+ {
+ }
+
+ void EventListener.TestStarted (TestCase testCase)
+ {
+ frameLabel.Text = "Test: " + testCase.FullName;
+ }
+
+ void EventListener.TestFinished (TestCaseResult result)
+ {
+ frameProgress.Fraction = ++finishedTests / (double) ntests;
+ frameProgress.Text = String.Format ("{0}/{1}", finishedTests, ntests);
+
+ if (result.Executed == false) {
+ AddIgnored (result.Test.FullName, result.Test.IgnoreReason);
+ } else if (result.IsFailure) {
+ AddError (result);
+ }
+
+ CheckWriters ();
+ UpdateRunStatus ();
+ ClockUpdater (this, EventArgs.Empty);
+ }
+
+ void EventListener.SuiteStarted (TestSuite suite)
+ {
+ frameLabel.Text = "Suite: " + suite.FullName;
+ }
+
+ void EventListener.SuiteFinished (TestSuiteResult result)
+ {
+ ClockUpdater (this, EventArgs.Empty);
+ }
+
+ // Misc.
+
+ void UpdateRunStatus ()
+ {
+ runStatus.Markup = String.Format (_("Tests: {0} Ignored: {1} Failures: {2}"),
+ finishedTests, ignoredTests, errorTests);
+ }
+
+ void AddIgnored (string name, string reason)
+ {
+ ignoredTests++;
+ if (notRunStore == null) {
+ notRunStore = new TreeStore (typeof (string));
+ CellRendererText tr = new CellRendererText ();
+ TreeViewColumn col = new TreeViewColumn ();
+ col.PackStart (tr, false);
+ col.AddAttribute (tr, "text", 0);
+ notRun.AppendColumn (col);
+ notRun.Model = notRunStore;
+ notRun.ShowAll ();
+ }
+
+ TreeIter iter;
+ iter = notRunStore.AppendValues (name);
+ iter = notRunStore.AppendValues (iter, reason);
+
+ SetColorLabel (notRunLabel, true);
+ }
+
+ void AddError (TestCaseResult result)
+ {
+ errorTests++;
+ if (failuresStore == null) {
+ failuresStore = new TreeStore (typeof (string));
+ CellRendererText tr = new CellRendererText ();
+ TreeViewColumn col = new TreeViewColumn ();
+ col.PackStart (tr, false);
+ col.AddAttribute (tr, "text", 0);
+ failures.AppendColumn (col);
+ failures.Model = failuresStore;
+ failures.ShowAll ();
+ }
+
+ if (errorIters == null)
+ errorIters = new Hashtable ();
+
+ int dot;
+ TreeIter main = TreeIter.Zero;
+ TreeIter iter;
+ string fullname = result.Test.FullName;
+ if ((dot = fullname.LastIndexOf ('.')) != -1) {
+ string key = fullname.Substring (0, dot);
+ if (!errorIters.ContainsKey (key)) {
+ main = failuresStore.AppendValues (key);
+ errorIters [key] = main;
+ } else {
+ main = (TreeIter) errorIters [key];
+ failuresStore.SetValue (main, 0, key);
+ }
+ } else {
+ main = failuresStore.AppendValues (fullname);
+ errorIters [fullname] = main;
+ }
+
+ iter = failuresStore.AppendValues (main, result.Test.Name);
+ iter = failuresStore.AppendValues (iter, result.Message);
+ iter = failuresStore.AppendValues (iter, result.StackTrace);
+
+ SetColorLabel (failuresLabel, true);
+ }
+
+ void SetOriginalWriters ()
+ {
+ Console.SetOut (origStdout);
+ Console.SetError (origStderr);
+ }
+
+ void SetStringWriters ()
+ {
+ Console.SetOut (stdout);
+ Console.SetError (stderr);
+ }
+
+ void CheckWriters ()
+ {
+ StringBuilder sb = stdout.GetStringBuilder ();
+ if (sb.Length != 0) {
+ InsertOutText (stdoutTV, sb.ToString ());
+ sb.Length = 0;
+ SetColorLabel (stdoutLabel, true);
+ }
+
+ sb = stderr.GetStringBuilder ();
+ if (sb.Length != 0) {
+ stderrTV.Buffer.InsertAtCursor (sb.ToString ());
+ sb.Length = 0;
+ SetColorLabel (stderrLabel, true);
+ }
+ }
+
+ void InsertOutText (TextView tv, string str)
+ {
+ TextBuffer buf = tv.Buffer;
+ buf.InsertAtCursor (str);
+ }
+
+ void SetColorLabel (Label label, bool color)
+ {
+ string text = label.Text;
+ if (color)
+ label.Markup = String.Format ("<span foreground=\"blue\">{0}</span>", text);
+ else
+ label.Markup = text;
+ }
+
+ void Error (string title, string text, string details, bool isExit)
+ {
+ ErrorDialog ed = new ErrorDialog (title, text, details);
+ if (isExit)
+ ed.UseExitButton ();
+
+ ed.Run ();
+ }
+
+ void SetupRecentAssembliesMenu (object sender, GConf.NotifyEventArgs args)
+ {
+ string [] recent;
+ try {
+ recent = Settings.Recentassemblies.Split (':');
+ } catch {
+ recent = new string [0];
+ }
+
+ if (recent.Length == 0) {
+ menuRecent.Submenu = null;
+ return;
+ }
+
+ EventHandler cb = new EventHandler (LoadRecent);
+ Menu menu = new Menu ();
+ int index = 1;
+ foreach (string s in recent) {
+ if (s == "")
+ continue;
+ MenuItem item = new MenuItem (String.Format ("_{0}. {1}",
+ index++,
+ s.Replace ("_", "__")));
+ item.Data ["assemblyName"] = s;
+ item.Activated += cb;
+ menu.Append (item);
+ }
+ menu.ShowAll ();
+ menuRecent.Submenu = menu;
+ }
+
+ void PrepareRun ()
+ {
+ if (errorIters != null)
+ errorIters.Clear ();
+
+ if (notRunStore != null)
+ notRunStore.Clear ();
+
+ if (failuresStore != null)
+ failuresStore.Clear ();
+
+ stdoutTV.Buffer.Clear ();
+ stderrTV.Buffer.Clear ();
+ foreach (Label l in nbLabels)
+ SetColorLabel (l, false);
+
+ errorTests = 0;
+ ignoredTests = 0;
+
+ ntests = -1;
+ finishedTests = 0;
+ frameProgress.Fraction = 0.0;
+
+ appbar.SetStatus (_("Running tests..."));
+ SetStringWriters ();
+ ToggleMenues (false);
+ startTime = DateTime.Now.Ticks;
+ ClockUpdater (this, EventArgs.Empty);
+ }
+
+ void ToggleMenues (bool saveAs)
+ {
+ if (btnStop.Sensitive) {
+ btnOpen.Sensitive = true;
+ btnSaveAs.Sensitive = saveAs;
+ menuSaveAs.Sensitive = saveAs;
+ btnRun.Sensitive = true;
+ btnExit.Sensitive = true;
+ btnStop.Sensitive = false;
+ menubar.Sensitive = true;
+ } else {
+ btnOpen.Sensitive = false;
+ btnSaveAs.Sensitive = false;
+ menuSaveAs.Sensitive = false;
+ btnRun.Sensitive = false;
+ btnExit.Sensitive = false;
+ btnStop.Sensitive = true;
+ menubar.Sensitive = false;
+ }
+ }
+
+ void OnFinishedRunning (object sender, EventArgs args)
+ {
+ if (quitting)
+ return;
+
+ ToggleMenues (store.LastResult != null);
+ SetOriginalWriters ();
+ if (!store.Cancelled) {
+ appbar.SetStatus ("");
+ stdout.GetStringBuilder ().Length = 0;
+ stderr.GetStringBuilder ().Length = 0;
+ return;
+ }
+
+ appbar.SetStatus (_("Cancelled on user request."));
+ frameLabel.Markup = String.Format ("<span foreground=\"red\">Cancelled: {0}</span>",
+ frameLabel.Text);
+ }
+
+ void OnFinishedLoad (object sender, EventArgs args)
+ {
+ if (store.Cancelled) // Application finished while loading
+ return;
+
+ appbar.Progress.Fraction = 0.0;
+ appbar.SetStatus (String.Format (_("{0} tests loaded."), ntests));
+ btnOpen.Sensitive = true;
+ btnRun.Sensitive = true;
+ menubar.Sensitive = true;
+ assemblyView.Selection.SelectPath (TreePath.NewFirst ());
+ }
+
+ long lastTick = -1;
+ void ClockUpdater (object o, EventArgs args)
+ {
+ long now = DateTime.Now.Ticks;
+ if (!store.Running || now - lastTick >= 10000 * 100) { // 100ms
+ lastTick = now;
+ string fmt = new TimeSpan (now - startTime).ToString ();
+ int i = fmt.IndexOf ('.');
+ if (i > 0 && fmt.Length - i > 2)
+ fmt = fmt.Substring (0, i + 2);
+
+ clock.Text = String.Format (_("Elapsed time: {0}"), fmt);
+ }
+ }
+
+ public void UnhandledException (object sender, UnhandledExceptionEventArgs args)
+ {
+ if (store != null)
+ store.CancelRequest = true;
+
+ try {
+ Error (_("Unhandled Exception"), _("There has been an unhandled exception.\n") +
+ _("The program will terminate now."), args.ExceptionObject.ToString (), true);
+ } catch (Exception e) {
+ Console.WriteLine (e);
+ }
+ Quit ();
+ Environment.Exit (0);
+ }
+
+ // Main
+ static void Main (string [] args)
+ {
+ Catalog.InitCatalog ();
+// LogFunc logFunc = new LogFunc (Log.PrintTraceLogFunction);
+// Log.SetLogHandler ("GLib-GObject", LogLevelFlags.All, logFunc);
+// Log.SetLogHandler ("Gtk", LogLevelFlags.All, logFunc);
+ NUnitGUI gui = new NUnitGUI (args);
+ AppDomain current = AppDomain.CurrentDomain;
+ current.UnhandledException += new UnhandledExceptionEventHandler (gui.UnhandledException);
+ gui.Run ();
+ }
+ }
+}
+
diff --git a/gnunit/src/nunit-gtk.glade b/gnunit/src/nunit-gtk.glade
new file mode 100644
index 00000000..043a23d2
--- /dev/null
+++ b/gnunit/src/nunit-gtk.glade
@@ -0,0 +1,1102 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+<requires lib="bonobo"/>
+
+<widget class="GnomeApp" id="nunitgui">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Mono NUnit2 GUI</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="enable_layout_config">True</property>
+ <signal name="delete_event" handler="OnWindowDelete" last_modification_time="Mon, 31 Mar 2003 03:33:15 GMT"/>
+
+ <child internal-child="dock">
+ <widget class="BonoboDock" id="bonobodock1">
+ <property name="visible">True</property>
+ <property name="allow_floating">True</property>
+
+ <child>
+ <widget class="BonoboDockItem" id="bonobodockitem1">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkMenuBar" id="menubar">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="file1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_FILE_TREE</property>
+
+ <child>
+ <widget class="GtkMenu" id="file1_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="open1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_OPEN_ITEM</property>
+ <signal name="activate" handler="OnOpenActivate" last_modification_time="Mon, 31 Mar 2003 03:03:24 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="menuSaveAs">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_SAVE_AS_ITEM</property>
+ <signal name="activate" handler="OnSaveAs" last_modification_time="Tue, 15 Apr 2003 15:00:08 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="separator1">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="menuRecent">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Recent assemblies</property>
+ <property name="use_underline">True</property>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="stock">gnome-stock-text-bulleted-list</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="GtkImageMenuItem" id="clearRecent">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Clear recent</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="OnClearRecent" last_modification_time="Wed, 02 Apr 2003 01:49:22 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="stock">gtk-remove</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="GtkMenuItem" id="separator4">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="quit1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
+ <signal name="activate" handler="OnQuitActivate" last_modification_time="Mon, 31 Mar 2003 03:03:24 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="edit1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_EDIT_TREE</property>
+
+ <child>
+ <widget class="GtkMenu" id="edit1_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
+ <signal name="activate" handler="OnCopyActivate" last_modification_time="Mon, 31 Mar 2003 03:03:24 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="separator3">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="preferences1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_PREFERENCES_ITEM</property>
+ <signal name="activate" handler="OnPreferencesActivate" last_modification_time="Mon, 31 Mar 2003 03:02:33 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="help1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_HELP_TREE</property>
+
+ <child>
+ <widget class="GtkMenu" id="help1_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="about2">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
+ <signal name="activate" handler="OnAboutActivate" last_modification_time="Mon, 31 Mar 2003 03:02:21 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="placement">BONOBO_DOCK_TOP</property>
+ <property name="band">0</property>
+ <property name="position">0</property>
+ <property name="offset">0</property>
+ <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="BonoboDockItem" id="bonobodockitem2">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_OUT</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar1">
+ <property name="border_width">1</property>
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+
+ <child>
+ <widget class="button" id="btnOpen">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Open assembly</property>
+ <property name="label" translatable="yes">Open</property>
+ <property name="use_underline">True</property>
+ <property name="stock_pixmap">gtk-open</property>
+ <signal name="clicked" handler="OnOpenActivate" last_modification_time="Mon, 31 Mar 2003 04:08:27 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="button" id="btnSaveAs">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save results to a XML file</property>
+ <property name="label" translatable="yes">Save As</property>
+ <property name="use_underline">True</property>
+ <property name="stock_pixmap">gtk-save-as</property>
+ <signal name="clicked" handler="OnSaveAs" last_modification_time="Tue, 15 Apr 2003 14:59:35 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="button" id="btnRun">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Run selected test fixture(s)</property>
+ <property name="label" translatable="yes">Run</property>
+ <property name="use_underline">True</property>
+ <property name="stock_pixmap">gtk-execute</property>
+ <property name="new_group">True</property>
+ <signal name="clicked" handler="OnRunActivate" last_modification_time="Mon, 31 Mar 2003 04:08:40 GMT"/>
+ </widget>
+ <packing>
+ <property name="new_group">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="button" id="btnStop">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Cancel</property>
+ <property name="label" translatable="yes">Stop</property>
+ <property name="use_underline">True</property>
+ <property name="stock_pixmap">gtk-stop</property>
+ <signal name="clicked" handler="OnStopActivate" last_modification_time="Thu, 03 Apr 2003 03:38:43 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="button" id="btnExit">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Exit program</property>
+ <property name="label" translatable="yes">Quit</property>
+ <property name="use_underline">True</property>
+ <property name="stock_pixmap">gtk-quit</property>
+ <property name="new_group">True</property>
+ <signal name="clicked" handler="OnExitActivate" last_modification_time="Mon, 31 Mar 2003 04:08:49 GMT"/>
+ </widget>
+ <packing>
+ <property name="new_group">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="placement">BONOBO_DOCK_TOP</property>
+ <property name="band">1</property>
+ <property name="position">0</property>
+ <property name="offset">0</property>
+ <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHPaned" id="hpaned">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="position">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkViewport" id="viewport1">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vboxn">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTreeView" id="assemblyView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <signal name="row_activated" handler="OnTestActivated" last_modification_time="Sun, 13 Apr 2003 13:31:45 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">False</property>
+ <property name="resize">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="border_width">6</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="GtkVBox" id="vbox2">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="frameLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Test: </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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <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.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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkProgressBar" id="frameProgress">
+ <property name="height_request">35</property>
+ <property name="visible">True</property>
+ <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+ <property name="fraction">0</property>
+ <property name="pulse_step">0.1</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="runStatus">
+ <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.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="clock">
+ <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_CENTER</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Run</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>
+ </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="GtkNotebook" id="notebook">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">True</property>
+ <property name="enable_popup">False</property>
+ <signal name="switch_page" handler="OnSwitchPage" last_modification_time="Tue, 01 Apr 2003 18:11:27 GMT"/>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="failures">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <signal name="row_activated" handler="OnRowActivated" last_modification_time="Tue, 01 Apr 2003 05:50:26 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="failuresLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Errors and failures</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>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="notRun">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <signal name="row_activated" handler="OnRowActivated" last_modification_time="Tue, 01 Apr 2003 05:50:47 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="notRunLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Tests not run</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>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="stderrTV">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">False</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="stderrLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Standard 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">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="stdoutTV">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">False</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="stdoutLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Standard out</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>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">True</property>
+ <property name="resize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child internal-child="appbar">
+ <widget class="GnomeAppBar" id="appbar">
+ <property name="visible">True</property>
+ <property name="has_progress">True</property>
+ <property name="has_status">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="errorDialog">
+ <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="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <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_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="btnOK">
+ <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="response_id">-5</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="btnExit">
+ <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="response_id">0</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>
+
+ <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="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image5">
+ <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">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="message">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label</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">10</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="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="btnDetails">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Show details &gt;&gt;</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <signal name="clicked" handler="OnDetailsClicked" last_modification_time="Thu, 03 Apr 2003 17:08:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</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">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="detailBox">
+ <property name="visible">True</property>
+ <property name="homogeneous">True</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame">
+ <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="GtkScrolledWindow" id="scrolledwindow6">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="details">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">False</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Error details</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>
+ </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>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </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="GtkDialog" id="overwriteDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">File exists. Overwrite?</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="has_separator">True</property>
+
+ <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="button1">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Don't save results</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-no</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">-9</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save results</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-yes</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">-8</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>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-warning</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">10</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="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="header">
+ <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.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">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="message">
+ <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_CENTER</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>
+ </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>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/gnunit/src/nunit-gtk.gladep b/gnunit/src/nunit-gtk.gladep
new file mode 100644
index 00000000..0bf9d9e9
--- /dev/null
+++ b/gnunit/src/nunit-gtk.gladep
@@ -0,0 +1,12 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+ <name>NUnitGtk</name>
+ <program_name>src</program_name>
+ <gettext_support>FALSE</gettext_support>
+ <output_main_file>FALSE</output_main_file>
+ <output_support_files>FALSE</output_support_files>
+ <output_build_files>FALSE</output_build_files>
+ <backup_source_files>FALSE</backup_source_files>
+</glade-project>
diff --git a/gnunit/src/nunit-gtk.schema b/gnunit/src/nunit-gtk.schema
new file mode 100644
index 00000000..2633fe27
--- /dev/null
+++ b/gnunit/src/nunit-gtk.schema
@@ -0,0 +1,36 @@
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/apps/nunitgtk/width</key>
+ <applyto>/apps/nunitgtk/width</applyto>
+ <owner>nunitgtk</owner>
+ <type>int</type>
+ <locale name="C"></locale>
+ <default>450</default>
+ </schema>
+ <schema>
+ <key>/schemas/apps/nunitgtk/height</key>
+ <applyto>/apps/nunitgtk/height</applyto>
+ <owner>nunitgtk</owner>
+ <type>int</type>
+ <locale name="C"></locale>
+ <default>300</default>
+ </schema>
+ <schema>
+ <key>/schemas/apps/nunitgtk/hpaned</key>
+ <applyto>/apps/nunitgtk/hpaned</applyto>
+ <owner>nunitgtk</owner>
+ <type>int</type>
+ <locale name="C"></locale>
+ <default>150</default>
+ </schema>
+ <schema>
+ <key>/schemas/apps/nunitgtk/recentassemblies</key>
+ <applyto>/apps/nunitgtk/recentassemblies</applyto>
+ <owner>nunitgtk</owner>
+ <type>string</type>
+ <locale name="C"></locale>
+ <default/>
+ </schema>
+ </schemalist>
+</gconfschemafile>
diff --git a/gnunit/src/script.in b/gnunit/src/script.in
new file mode 100644
index 00000000..e68eb084
--- /dev/null
+++ b/gnunit/src/script.in
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec @bindir@/@mono_interp@ @mono_one_instdir@/@exe_file@ "$@"
diff --git a/gnunit/src/script2.in b/gnunit/src/script2.in
new file mode 100644
index 00000000..0b594f30
--- /dev/null
+++ b/gnunit/src/script2.in
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec @bindir@/@mono_interp@ @mono_two_instdir@/@exe_file@ "$@"