[Monodevelop-patches-list] r2291 - trunk/MonoDevelop/Unused/Gdl
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Thu Mar 3 22:35:48 EST 2005
Author: jluke
Date: 2005-03-03 22:35:48 -0500 (Thu, 03 Mar 2005)
New Revision: 2291
Modified:
trunk/MonoDevelop/Unused/Gdl/
trunk/MonoDevelop/Unused/Gdl/Makefile
trunk/MonoDevelop/Unused/Gdl/Stock.cs
Log:
load the images as resources
Property changes on: trunk/MonoDevelop/Unused/Gdl
___________________________________________________________________
Name: svn:ignore
- Gdl.pidb
Gdl.dll
GdlDockTest.exe
build
+ *.pidb
*.mdb
*.dll
*.exe
build
Modified: trunk/MonoDevelop/Unused/Gdl/Makefile
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/Makefile 2005-03-04 00:33:27 UTC (rev 2290)
+++ trunk/MonoDevelop/Unused/Gdl/Makefile 2005-03-04 03:35:48 UTC (rev 2291)
@@ -4,6 +4,12 @@
GLADE = layout.glade
+IMAGES = stock-close-12.png stock-menu-left-12.png stock-menu-right-12.png
+
+RESOURCES = -resource:$(GLADE) -resource:stock-close-12.png -resource:stock-menu-left-12.png -resource:stock-menu-right-12.png
+
+REFS = -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0
+
FILES = AssemblyInfo.cs \
DockedHandler.cs \
DockMaster.cs \
@@ -23,7 +29,8 @@
DockParamFlags.cs \
Dock.cs \
DockPaned.cs \
- DockItemBehavior.cs
+ DockItemBehavior.cs \
+ IPersistLayout.cs
all: $(GDL) $(TEST)
@@ -31,8 +38,8 @@
rm -f $(GDL) $(GDL).mdb
rm -f $(TEST) $(TEST).mdb
-$(GDL): $(FILES) $(GLADE)
- $(CSC) -out:$@ -target:library $(FILES) -resource:$(GLADE) -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0
+$(GDL): $(FILES) $(GLADE) $(IMAGES)
+ $(CSC) -out:$@ -target:library $(FILES) $(RESOURCES) $(REFS)
$(TEST) : GdlDockTest.cs $(GDL)
$(CSC) -out:$@ -r:$(GDL) -pkg:gtk-sharp-2.0 GdlDockTest.cs -codepage:utf8
Modified: trunk/MonoDevelop/Unused/Gdl/Stock.cs
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/Stock.cs 2005-03-04 00:33:27 UTC (rev 2290)
+++ trunk/MonoDevelop/Unused/Gdl/Stock.cs 2005-03-04 03:35:48 UTC (rev 2291)
@@ -1,12 +1,10 @@
-namespace Gdl {
+using System;
+using Gtk;
- using System;
- using System.Collections;
- using System.Runtime.InteropServices;
- using Gtk;
-
- public class Stock {
-
+namespace Gdl
+{
+ public static class Stock
+ {
static Gtk.IconFactory stock = new Gtk.IconFactory ();
public static string Close {
@@ -28,13 +26,13 @@
stock.AddDefault ();
}
- static void AddIcon (string stockid, string file)
+ static void AddIcon (string stockid, string resource)
{
Gtk.IconSet iconset = stock.Lookup (stockid);
if (iconset == null) {
iconset = new Gtk.IconSet ();
- Gdk.Pixbuf img = new Gdk.Pixbuf (file);
+ Gdk.Pixbuf img = Gdk.Pixbuf.LoadFromResource (resource);
IconSource source = new IconSource ();
source.Size = Gtk.IconSize.Menu;
source.SizeWildcarded = false;
@@ -45,3 +43,4 @@
}
}
}
+
More information about the Monodevelop-patches-list
mailing list