diff --git a/ChangeLog b/ChangeLog index 890ecf92e..f5a21839e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-06 Mike Kestner + + * gdk/Pixbuf.custom : move the GetCallingAssembly invocations back out + the the public methods. + * gdk/PixbufLoader.custom : ditto. + 2005-05-06 Mike Kestner * bootstrap : diff --git a/gdk/Pixbuf.custom b/gdk/Pixbuf.custom index 818967475..276d5bd9e 100644 --- a/gdk/Pixbuf.custom +++ b/gdk/Pixbuf.custom @@ -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) {} diff --git a/gdk/PixbufLoader.custom b/gdk/PixbufLoader.custom index e9819d7ff..ca7137f6f 100644 --- a/gdk/PixbufLoader.custom +++ b/gdk/PixbufLoader.custom @@ -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()