diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-16 19:53:30 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-16 19:53:30 +0400 |
commit | ec7498ce0bbaab14db49d1b45efbd528d443c0fb (patch) | |
tree | dcdb87b1945e1c6bbe92898fb633e37b4df1f733 /source | |
parent | 42e50719df8827135b95ae9226d0f84766eb6d45 (diff) |
Reverting changes in commit r43458.
That was intended change to clear PROP_TRANSLATE flag from bl_label property of
operators, panels and menus (see rev40570)
If this flag leads to another issues it should be fixed in another way.
This fixes #30210: International Font Problem
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 8e3178a6298..1bfed372626 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -698,7 +698,10 @@ static void rna_def_panel(BlenderRNA *brna) "name of the class used to define the panel. For example, if the " "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the " "script, then bl_idname = \"OBJECT_PT_hello\""); - + + /* panel's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime + * when drawing panel and having this flag set will make runtime switching of language much more tricky + * because label will be stored translated */ prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); @@ -823,7 +826,10 @@ static void rna_def_menu(BlenderRNA *brna) "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the " "script, then bl_idname = \"OBJECT_MT_hello\")"); - prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE); + /* menu's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime + * when drawing panel and having this flag set will make runtime switching of language much more tricky + * because label will be stored translated */ + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Label", "The menu label"); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 4f8f301dcbd..41941334e4c 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1245,6 +1245,9 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP); RNA_def_struct_name_property(srna, prop); + /* operator's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime + * when drawing panel and having this flag set will make runtime switching of language much more tricky + * because label will be stored translated */ prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->name"); RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ |