mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-02 16:11:02 +00:00
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:
parent
217d0a5d55
commit
0a695bb305
|
@ -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>
|
2005-05-06 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* bootstrap :
|
* bootstrap :
|
||||||
|
|
|
@ -107,20 +107,12 @@
|
||||||
|
|
||||||
public Pixbuf (System.Reflection.Assembly assembly, string resource) : base (IntPtr.Zero)
|
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)
|
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) {}
|
public Pixbuf (byte[] buffer) : base(new PixbufLoader (buffer).PixbufHandle) {}
|
||||||
|
|
|
@ -82,15 +82,12 @@
|
||||||
|
|
||||||
public PixbufLoader (System.Reflection.Assembly assembly, string resource) : this ()
|
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)
|
private void InitFromAssemblyResource(System.Reflection.Assembly assembly, string resource)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (assembly == null)
|
|
||||||
assembly = System.Reflection.Assembly.GetCallingAssembly ();
|
|
||||||
|
|
||||||
if (resource == null)
|
if (resource == null)
|
||||||
throw new ArgumentNullException ("resource");
|
throw new ArgumentNullException ("resource");
|
||||||
|
|
||||||
|
@ -107,7 +104,7 @@
|
||||||
public PixbufLoader (System.Reflection.Assembly assembly, string resource, int width, int height) : this ()
|
public PixbufLoader (System.Reflection.Assembly assembly, string resource, int width, int height) : this ()
|
||||||
{
|
{
|
||||||
SetSize(width, height);
|
SetSize(width, height);
|
||||||
InitFromAssemblyResource(assembly, resource);
|
InitFromAssemblyResource(assembly == null ? System.Reflection.Assembly.GetCallingAssembly () : assembly, resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PixbufLoader (byte[] buffer) : this()
|
public PixbufLoader (byte[] buffer) : this()
|
||||||
|
|
Loading…
Reference in a new issue