Author: lluis
Date: 2006-04-03 08:20:25 -0400 (Mon, 03 Apr 2006)
New Revision: 58940
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Dialogs/ResourceService.cs
Log:
2006-04-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Core.Gui.Dialogs/ResourceService.cs: Check that
icon resources exist before trying to add them.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/ChangeLog 2006-04-03
12:19:09 UTC (rev 58939)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/ChangeLog 2006-04-03
12:20:25 UTC (rev 58940)
@@ -1,3 +1,8 @@
+2006-04-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Core.Gui.Dialogs/ResourceService.cs: Check that
+ icon resources exist before trying to add them.
+
2006-03-31 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Core.Gui.addin.xml: Break compatibility
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Dialogs/ResourceService.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Dialogs/ResourceService.cs
2006-04-03 12:19:09 UTC (rev 58939)
+++
trunk/monodevelop/Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Dialogs/ResourceService.cs
2006-04-03 12:20:25 UTC (rev 58940)
@@ -65,9 +65,14 @@
foreach (StockIconCodon icon in icons) {
foreach (Assembly a in
icon.AddIn.RuntimeLibraries.Values) {
try {
- Gdk.Pixbuf px = new Gdk.Pixbuf
(a, icon.Resource);
- AddToIconFactory (icon.StockId,
px, icon.IconSize);
- break;
+ System.IO.Stream s =
a.GetManifestResourceStream (icon.Resource);
+ if (s != null) {
+ using (s) {
+ Gdk.Pixbuf px =
new Gdk.Pixbuf (s);
+
AddToIconFactory (icon.StockId, px, icon.IconSize);
+ }
+ break;
+ }
} catch {}
}
}
@@ -293,9 +298,14 @@
if (!hash.Contains (sid)) {
foreach (Assembly asm in
addin.RuntimeLibraries.Values) {
try {
- Gdk.Pixbuf pix = new Gdk.Pixbuf
(asm, id);
- AddToIconFactory (sid, pix,
Gtk.IconSize.Invalid);
- break;
+ System.IO.Stream s =
asm.GetManifestResourceStream (id);
+ if (s != null) {
+ using (s) {
+ Gdk.Pixbuf pix
= new Gdk.Pixbuf (s);
+
AddToIconFactory (sid, pix, Gtk.IconSize.Invalid);
+ break;
+ }
+ }
} catch {}
}
hash [sid] = sid;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches