[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43738] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: Fix [#29884] Splash screen only displays "r43"

Nathan Letwory nathan at letworyinteractive.com
Fri Jan 27 08:36:05 CET 2012


Revision: 43738
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43738
Author:   jesterking
Date:     2012-01-27 07:35:57 +0000 (Fri, 27 Jan 2012)
Log Message:
-----------
Fix [#29884] Splash screen only displays "r43"
Based on patch by perfection cat

Removed the unnecessary char * juggling.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2012-01-27 01:30:58 UTC (rev 43737)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2012-01-27 07:35:57 UTC (rev 43738)
@@ -1277,22 +1277,17 @@
 
 #ifdef WITH_BUILDINFO
 	int ver_width, rev_width;
-	char *version_str = NULL;
-	char *revision_str = NULL;
 	char version_buf[128];
 	char revision_buf[128];
 	extern char build_rev[];
 	
-	version_str = &version_buf[0];
-	revision_str = &revision_buf[0];
-	
-	BLI_snprintf(version_str, sizeof(version_str),
+	BLI_snprintf(version_buf, sizeof(version_buf),
 	             "%d.%02d.%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
-	BLI_snprintf(revision_str, sizeof(revision_str), "r%s", build_rev);
+	BLI_snprintf(revision_buf, sizeof(revision_buf), "r%s", build_rev);
 	
 	BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.dpi);
-	ver_width = (int)BLF_width(style->widgetlabel.uifont_id, version_str) + 5;
-	rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_str) + 5;
+	ver_width = (int)BLF_width(style->widgetlabel.uifont_id, version_buf) + 5;
+	rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_buf) + 5;
 #endif //WITH_BUILDINFO
 
 	block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
@@ -1303,8 +1298,8 @@
 	uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL);
 	
 #ifdef WITH_BUILDINFO	
-	uiDefBut(block, LABEL, 0, version_str, 494-ver_width, 282-24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
-	uiDefBut(block, LABEL, 0, revision_str, 494-rev_width, 282-36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+	uiDefBut(block, LABEL, 0, version_buf, 494-ver_width, 282-24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+	uiDefBut(block, LABEL, 0, revision_buf, 494-rev_width, 282-36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
 #endif //WITH_BUILDINFO
 	
 	layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 10, 2, 480, 110, style);



More information about the Bf-blender-cvs mailing list