2005-05-06 Mike Kestner <mkestner@novell.com>

* gdk/Pixbuf.custom : move the GetCallingAssembly invocations back out
	the the public methods.
	* gdk/PixbufLoader.custom : ditto.

svn path=/trunk/gtk-sharp/; revision=44165
This commit is contained in:
Mike Kestner 2005-05-06 20:14:56 +00:00
parent 217d0a5d55
commit 0a695bb305
3 changed files with 10 additions and 15 deletions

View file

@ -1,3 +1,9 @@
2005-05-06 Mike Kestner <mkestner@novell.com>
* gdk/Pixbuf.custom : move the GetCallingAssembly invocations back out
the the public methods.
* gdk/PixbufLoader.custom : ditto.
2005-05-06 Mike Kestner <mkestner@novell.com>
* bootstrap :

View file

@ -107,20 +107,12 @@
public Pixbuf (System.Reflection.Assembly assembly, string resource) : base (IntPtr.Zero)
{
Raw = new PixbufLoader (CheckAssembly(assembly), resource).PixbufHandle;
Raw = new PixbufLoader (assembly == null ? System.Reflection.Assembly.GetCallingAssembly () : assembly, resource).PixbufHandle;
}
private System.Reflection.Assembly CheckAssembly(System.Reflection.Assembly assembly)
{
if (assembly == null)
return System.Reflection.Assembly.GetCallingAssembly ();
else
return assembly;
}
public Pixbuf (System.Reflection.Assembly assembly, string resource, int width, int height) : base (IntPtr.Zero)
{
Raw = new PixbufLoader (CheckAssembly(assembly), resource, width, height).PixbufHandle;
Raw = new PixbufLoader (assembly == null ? System.Reflection.Assembly.GetCallingAssembly () : assembly, resource, width, height).PixbufHandle;
}
public Pixbuf (byte[] buffer) : base(new PixbufLoader (buffer).PixbufHandle) {}

View file

@ -82,15 +82,12 @@
public PixbufLoader (System.Reflection.Assembly assembly, string resource) : this ()
{
InitFromAssemblyResource(assembly, resource);
InitFromAssemblyResource(assembly == null ? System.Reflection.Assembly.GetCallingAssembly () : assembly, resource);
}
private void InitFromAssemblyResource(System.Reflection.Assembly assembly, string resource)
{
try {
if (assembly == null)
assembly = System.Reflection.Assembly.GetCallingAssembly ();
if (resource == null)
throw new ArgumentNullException ("resource");
@ -107,7 +104,7 @@
public PixbufLoader (System.Reflection.Assembly assembly, string resource, int width, int height) : this ()
{
SetSize(width, height);
InitFromAssemblyResource(assembly, resource);
InitFromAssemblyResource(assembly == null ? System.Reflection.Assembly.GetCallingAssembly () : assembly, resource);
}
public PixbufLoader (byte[] buffer) : this()