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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-10-04 22:53:17 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-10-04 22:53:17 +0400
commit592f80625bec2d31b22e3e309df9bb693eb967f3 (patch)
tree4721aecac72b53627495e20c3d30f1110a39e758 /source/blender/makesrna/intern/rna_speaker.c
parent63840fd5058293e7bc9f16cea16507a410748b50 (diff)
Fix for commit r51049: no need to create two contexts when one if enough.
Also please define and use constants in BLF_translation.h rather than directly typing contexts' names, it's safer (typo would break at compile time, instead of generating more contexts!).
Diffstat (limited to 'source/blender/makesrna/intern/rna_speaker.c')
-rw-r--r--source/blender/makesrna/intern/rna_speaker.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_speaker.c b/source/blender/makesrna/intern/rna_speaker.c
index 6c226489ad7..a160aaf94e2 100644
--- a/source/blender/makesrna/intern/rna_speaker.c
+++ b/source/blender/makesrna/intern/rna_speaker.c
@@ -35,6 +35,8 @@
#include "DNA_speaker_types.h"
#include "DNA_sound_types.h"
+#include "BLF_translation.h"
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -45,7 +47,6 @@
#include "WM_api.h"
#include "WM_types.h"
-
#else
static void rna_def_speaker(BlenderRNA *brna)
@@ -151,7 +152,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "volume");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Volume", "How loud the sound is");
- RNA_def_property_translation_context(prop, "Audio");
+ RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_AUDIO);
/* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL); */
/* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
@@ -159,6 +160,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
+ RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_AUDIO);
/* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL); */
/* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */