[Bf-committers] Re: CVS commit: blender/source/blender/include BIF_resources.h blender/source/blender/src resources.c interface.c interface_draw.c

GSR gsr.b3d at infernal-iceberg.com
Mon Oct 30 22:53:09 CET 2006


Hi,
gsr.b3d at infernal-iceberg.com (2006-10-30 at 2225.42 +0100):
> Hi,
> matt at mke3.net (2006-10-28 at 1521.03 +0200):
> > broken (Matt Ebb) 2006/10/28 15:21:03 CEST
> > 
> >   Modified files:
> >     blender/source/blender/include BIF_resources.h 
> >     blender/source/blender/src resources.c interface.c 
> >                                interface_draw.c 
> >   
> >   Log:
> >   * Simple patch 5058 from gsrb3d to use constants instead of magic numbers for
> >     theme drawtypes
> 
> source/blender/src/space.c still has magic numbers, while original
> patch had them changed to defines with a cast (to match previous
> uiDefButC with magic floats instead of magic ints).

Ops, sorry, original patch had not space.c while bug text said it did
change the floats too, see attachement for that missing part (using
the commited defines, so should apply cleanly).

GSR
 
-------------- next part --------------
Index: source/blender/src/space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.385
diff -u -p -r1.385 space.c
--- source/blender/src/space.c	19 Oct 2006 05:06:41 -0000	1.385
+++ source/blender/src/space.c	30 Oct 2006 21:05:56 -0000
@@ -2457,10 +2457,10 @@ static void info_user_themebuts(uiBlock 
 	}
 	else if(th_curcol==TH_BUT_DRAWTYPE) {
 		uiBlockBeginAlign(block);
-		uiDefButC(block, ROW, B_UPDATE_THEME, "Minimal",	465,y3,100,20,  col, 2.0, 0.0, 0, 0, "");
-		uiDefButC(block, ROW, B_UPDATE_THEME, "Shaded",	565,y3,100,20,  col, 2.0, 1.0, 0, 0, "");
-		uiDefButC(block, ROW, B_UPDATE_THEME, "Rounded",	465,y2,100,20,  col, 2.0, 2.0, 0, 0, "");
-		uiDefButC(block, ROW, B_UPDATE_THEME, "OldSkool",	565,y2,100,20,  col, 2.0, 3.0, 0, 0, "");
+		uiDefButC(block, ROW, B_UPDATE_THEME, "Minimal", 465,y3,100,20,  col, 2.0, (float) TH_MINIMAL, 0, 0, "");
+		uiDefButC(block, ROW, B_UPDATE_THEME, "Shaded",	565,y3,100,20,  col, 2.0, (float) TH_SHADED, 0, 0, "");
+		uiDefButC(block, ROW, B_UPDATE_THEME, "Rounded", 465,y2,100,20,  col, 2.0, (float) TH_ROUNDED, 0, 0, "");
+		uiDefButC(block, ROW, B_UPDATE_THEME, "OldSkool", 565,y2,100,20,  col, 2.0, (float) TH_OLDSKOOL, 0, 0, "");
 		uiBlockEndAlign(block);
 	}
 	else {


More information about the Bf-committers mailing list