From eed0eb6a476d54ce19aeff137984aa981d9e3976 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Jun 2010 00:59:57 -0700 Subject: Upgrading to iup 3.1 --- iup/src/iup_spin.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'iup/src/iup_spin.c') diff --git a/iup/src/iup_spin.c b/iup/src/iup_spin.c index 6fadab4..514703f 100755 --- a/iup/src/iup_spin.c +++ b/iup/src/iup_spin.c @@ -175,7 +175,7 @@ static int iSpinCreateMethod(Ihandle* ih, void** params) static int iSpinboxCreateMethod(Ihandle* ih, void** params) { - Ihandle *spin, *ctrl; + Ihandle *spin; if (!params || !(params[0])) return IUP_ERROR; @@ -184,8 +184,7 @@ static int iSpinboxCreateMethod(Ihandle* ih, void** params) IupSetAttribute(ih, "MARGIN", "0x0"); IupSetAttribute(ih, "ALIGNMENT", "ACENTER"); - ctrl = (Ihandle*)(params[0]); - iupChildTreeAppend(ih, ctrl); + /* IupText is already a child of Spinbox because of the IupHbox Create method */ spin = IupSpin(); iupChildTreeAppend(ih, spin); @@ -249,7 +248,7 @@ Iclass* iupSpinboxGetClass(void) ic->name = "spinbox"; ic->format = "h"; /* one Ihandle */ ic->nativetype = IUP_TYPEVOID; - ic->childtype = IUP_CHILDNONE; + ic->childtype = IUP_CHILD_ONE; /* fake value to define it as a container */ ic->is_interactive = 0; iupClassRegisterCallback(ic, "SPIN_CB", "i"); @@ -267,7 +266,7 @@ Iclass* iupSpinGetClass(void) ic->name = "spin"; ic->format = NULL; /* no parameters */ ic->nativetype = IUP_TYPEVOID; - ic->childtype = IUP_CHILDNONE; + ic->childtype = IUP_CHILD_ONE; /* fake value to define it as a container */ ic->is_interactive = 0; /* Class functions */ -- cgit v1.2.3