[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50393] trunk/blender/source/blender/ editors/interface/interface.c: Do not show %t to user on right click menu buttons which use "Name%t|... %x0|..." syntax
Sv. Lockal
lockalsash at gmail.com
Tue Sep 4 19:09:41 CEST 2012
Revision: 50393
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50393
Author: lockal
Date: 2012-09-04 17:09:40 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
Do not show %t to user on right click menu buttons which use "Name%t|...%x0|..." syntax
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface.c
Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c 2012-09-04 16:55:12 UTC (rev 50392)
+++ trunk/blender/source/blender/editors/interface/interface.c 2012-09-04 17:09:40 UTC (rev 50393)
@@ -3722,8 +3722,14 @@
if (type == BUT_GET_LABEL) {
if (but->str) {
- /* Menu labels can have some complex formating stuff marked by pipes, we don't want those here! */
- char *tc = strchr(but->str, '|');
+ /* Menu labels can have some complex formating stuff marked by pipes or %t, we don't want those here! */
+ const char *tc;
+
+ if (but->type == MENU)
+ tc = strstr(but->str, "%t");
+ else
+ tc = strchr(but->str, '|');
+
if (tc)
tmp = BLI_strdupn(but->str, tc - but->str);
else
More information about the Bf-blender-cvs
mailing list