Author: miguel
Date: 2007-12-06 23:32:49 -0500 (Thu, 06 Dec 2007)
New Revision: 90892
Modified:
trunk/mono-tools/gui-compare/CompareWindow.cs
trunk/mono-tools/gui-compare/Makefile
trunk/mono-tools/gui-compare/driver.cs
Log:
Embed resources
Modified: trunk/mono-tools/gui-compare/CompareWindow.cs
===================================================================
--- trunk/mono-tools/gui-compare/CompareWindow.cs 2007-12-07 03:38:59 UTC
(rev 90891)
+++ trunk/mono-tools/gui-compare/CompareWindow.cs 2007-12-07 04:32:49 UTC
(rev 90892)
@@ -1,32 +1,50 @@
-
+//
+//
+// Authors:
+// Chris Toshok
+//
using Gtk;
using System;
using System.IO;
+using System.Reflection;
using IOPath = System.IO.Path;
namespace GuiCompare {
public class CompareWindow : Window
{
- static Gdk.Pixbuf classPixbuf = new Gdk.Pixbuf ("cm/c.gif");
- static Gdk.Pixbuf delegatePixbuf = new Gdk.Pixbuf ("cm/d.gif");
- static Gdk.Pixbuf enumPixbuf = new Gdk.Pixbuf ("cm/en.gif");
- static Gdk.Pixbuf eventPixbuf = new Gdk.Pixbuf ("cm/e.gif");
- static Gdk.Pixbuf fieldPixbuf = new Gdk.Pixbuf ("cm/f.gif");
- static Gdk.Pixbuf interfacePixbuf = new Gdk.Pixbuf ("cm/i.gif");
- static Gdk.Pixbuf methodPixbuf = new Gdk.Pixbuf ("cm/m.gif");
- static Gdk.Pixbuf namespacePixbuf = new Gdk.Pixbuf ("cm/n.gif");
- static Gdk.Pixbuf propertyPixbuf = new Gdk.Pixbuf ("cm/p.gif");
- static Gdk.Pixbuf attributePixbuf = new Gdk.Pixbuf ("cm/r.gif");
- static Gdk.Pixbuf structPixbuf = new Gdk.Pixbuf ("cm/s.gif");
- static Gdk.Pixbuf assemblyPixbuf = new Gdk.Pixbuf ("cm/y.gif");
+ static Gdk.Pixbuf classPixbuf, delegatePixbuf, enumPixbuf;
+ static Gdk.Pixbuf eventPixbuf, fieldPixbuf, interfacePixbuf;
+ static Gdk.Pixbuf methodPixbuf, namespacePixbuf, propertyPixbuf;
+ static Gdk.Pixbuf attributePixbuf, structPixbuf, assemblyPixbuf;
- static Gdk.Pixbuf okPixbuf = new Gdk.Pixbuf ("cm/sc.gif");
- static Gdk.Pixbuf errorPixbuf = new Gdk.Pixbuf ("cm/se.gif");
- static Gdk.Pixbuf missingPixbuf = new Gdk.Pixbuf ("cm/sm.gif");
- static Gdk.Pixbuf todoPixbuf = new Gdk.Pixbuf ("cm/st.gif");
- static Gdk.Pixbuf extraPixbuf = new Gdk.Pixbuf ("cm/sx.gif");
+ static Gdk.Pixbuf okPixbuf, errorPixbuf;
+ static Gdk.Pixbuf missingPixbuf, todoPixbuf, extraPixbuf;
+ static CompareWindow ()
+ {
+ Assembly ta = typeof (CompareWindow).Assembly;
+
+ classPixbuf = new Gdk.Pixbuf (ta, "c.gif");
+ delegatePixbuf = new Gdk.Pixbuf (ta, "d.gif");
+ enumPixbuf = new Gdk.Pixbuf (ta, "en.gif");
+ eventPixbuf = new Gdk.Pixbuf (ta, "e.gif");
+ fieldPixbuf = new Gdk.Pixbuf (ta, "f.gif");
+ interfacePixbuf = new Gdk.Pixbuf (ta, "i.gif");
+ methodPixbuf = new Gdk.Pixbuf (ta, "m.gif");
+ namespacePixbuf = new Gdk.Pixbuf (ta, "n.gif");
+ propertyPixbuf = new Gdk.Pixbuf (ta, "p.gif");
+ attributePixbuf = new Gdk.Pixbuf (ta, "r.gif");
+ structPixbuf = new Gdk.Pixbuf (ta, "s.gif");
+ assemblyPixbuf = new Gdk.Pixbuf (ta, "y.gif");
+
+ okPixbuf = new Gdk.Pixbuf (ta, "sc.gif");
+ errorPixbuf = new Gdk.Pixbuf (ta, "se.gif");
+ missingPixbuf = new Gdk.Pixbuf (ta, "sm.gif");
+ todoPixbuf = new Gdk.Pixbuf (ta, "st.gif");
+ extraPixbuf = new Gdk.Pixbuf (ta, "sx.gif");
+ }
+
public CompareWindow ()
: base ("Mono GuiCompare")
{
Modified: trunk/mono-tools/gui-compare/Makefile
===================================================================
--- trunk/mono-tools/gui-compare/Makefile 2007-12-07 03:38:59 UTC (rev
90891)
+++ trunk/mono-tools/gui-compare/Makefile 2007-12-07 04:32:49 UTC (rev
90892)
@@ -1,4 +1,26 @@
sources=driver.cs CompareWindow.cs CompareContext.cs Masterinfo.cs
Comparison.cs Metadata.cs CecilMetadata.cs MasterMetadata.cs
+resources= \
+ -resource:cm/c.gif,c.gif \
+ -resource:cm/d.gif,d.gif \
+ -resource:cm/e.gif,e.gif \
+ -resource:cm/en.gif,en.gif \
+ -resource:cm/f.gif,f.gif \
+ -resource:cm/i.gif,i.gif \
+ -resource:cm/m.gif,m.gif \
+ -resource:cm/n.gif,n.gif \
+ -resource:cm/p.gif,p.gif \
+ -resource:cm/r.gif,r.gif \
+ -resource:cm/sc.gif,sc.gif \
+ -resource:cm/se.gif,se.gif \
+ -resource:cm/s.gif,s.gif \
+ -resource:cm/sm.gif,sm.gif \
+ -resource:cm/st.gif,st.gif \
+ -resource:cm/sx.gif,sx.gif \
+ -resource:cm/tb.gif,tb.gif \
+ -resource:cm/tm.gif,tm.gif \
+ -resource:cm/tp.gif,tp.gif \
+ -resource:cm/w.gif,w.gif \
+ -resource:cm/y.gif,y.gif
guicompare.exe: $(sources)
- gmcs -debug -pkg:gtk-sharp-2.0 -pkg:cecil -out:guicompare.exe $(sources)
+ gmcs -debug -pkg:gtk-sharp-2.0 -pkg:cecil -out:guicompare.exe
$(sources) $(resources)
Modified: trunk/mono-tools/gui-compare/driver.cs
===================================================================
--- trunk/mono-tools/gui-compare/driver.cs 2007-12-07 03:38:59 UTC (rev
90891)
+++ trunk/mono-tools/gui-compare/driver.cs 2007-12-07 04:32:49 UTC (rev
90892)
@@ -17,9 +17,7 @@
foreach (string a in args) {
string ext = Path.GetExtension (a);
- if (!(ext == ".dll"
- || ext == ".exe")
- || !File.Exists (a))
+ if (!(ext == ".dll" || ext == ".exe")
|| !File.Exists (a))
continue;
CompareWindow mw = new CompareWindow ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches