Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2012-01-27 11:35:57 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2012-01-27 11:35:57 +0400
commit959f2624ca58839ae8cc5ac6e13162759e5dc759 (patch)
treefce7fda56d720628e6fa26fa1311df7714a48d6f /source/blender/windowmanager
parent0c7a455c074304c7882ea6aca63dee22ef620dec (diff)
Fix [#29884] Splash screen only displays "r43"
Based on patch by perfection cat Removed the unnecessary char * juggling.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index faf2d3fd352..4052c221935 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1277,22 +1277,17 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
#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 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
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);