diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-20 14:07:46 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-20 14:07:46 +0400 |
commit | 9a2f36b50f818c0c1b659363a1df298f7043e207 (patch) | |
tree | 29356fc32cdf7faba05e099e67e3da5adf349c39 /source/blender/editors/interface | |
parent | 558d549aeb2ec7da41d31986707774eae0821da8 (diff) |
handle SpaceType and UserPref popups
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 39 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 8 |
3 files changed, 13 insertions, 38 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e2bfedcf3ea..6a35ba9baf1 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -217,9 +217,9 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op)) static void UI_OT_reset_default_theme(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset to Default Theme"; + ot->name= _("Reset to Default Theme"); ot->idname= "UI_OT_reset_default_theme"; - ot->description= "Reset to the default theme colors"; + ot->description= _("Reset to the default theme colors"); /* callbacks */ ot->exec= reset_default_theme_exec; diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 9ebf7c9cd4f..64280bbda03 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -351,39 +351,14 @@ void uiStyleInit(void) /* XXX Maybe it's bad to do this */ if(style==NULL) { - if( strcmp(lang_set,"hr.UTF-8")==0 - || strcmp(lang_set,"ar.UTF-8")==0 - || strcmp(lang_set,"bg.UTF-8")==0 - || strcmp(lang_set,"ca.UTF-8")==0 - || strcmp(lang_set,"cs.UTF-8")==0 - || strcmp(lang_set,"de.UTF-8")==0 - || strcmp(lang_set,"el.UTF-8")==0 - || strcmp(lang_set,"es.UTF-8")==0 - || strcmp(lang_set,"fi.UTF-8")==0 - || strcmp(lang_set,"fr.UTF-8")==0 - || strcmp(lang_set,"it.UTF-8")==0 - || strcmp(lang_set,"ja.UTF-8")==0 - || strcmp(lang_set,"ko.UTF-8")==0 - || strcmp(lang_set,"pl.UTF-8")==0 - || strcmp(lang_set,"ro.UTF-8")==0 - || strcmp(lang_set,"ru.UTF-8")==0 - || strcmp(lang_set,"sr.UTF-8")==0 - || strcmp(lang_set,"sv.UTF-8")==0 - || strcmp(lang_set,"uk.UTF-8")==0 - || strcmp(lang_set,"zh_CN.UTF-8")==0 - ) + // load unifont only when need. It takes 15MB memories + // get_datatoc_bunifont_ttf() may return null, BLF_load_mem_unique() will handle it + if( blf_unifont == -1 ) + blf_unifont= BLF_load_mem_unique("unifont", (unsigned char *)get_datatoc_bunifont_ttf(), datatoc_bunifont_ttf_size); + if( blf_unifont != -1 ) { - // load unifont only when need. It takes 15MB memories - // get_datatoc_bunifont_ttf() may return null, BLF_load_mem_unique() will handle it - if( blf_unifont == -1 ) - blf_unifont= BLF_load_mem_unique("unifont", (unsigned char *)get_datatoc_bunifont_ttf(), datatoc_bunifont_ttf_size); - if( blf_unifont != -1 ) - { - BLF_size(blf_unifont, 12, 72); - ui_style_new(&U.uistyles, "Unifont Style", blf_unifont ); - } - else - ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT ); + BLF_size(blf_unifont, 12, 72); + ui_style_new(&U.uistyles, "Unifont Style", blf_unifont ); } else ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT ); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index bbd1bd8773b..625ca4c70ec 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1288,10 +1288,10 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand if(coba==NULL) return; - bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); + bt= uiDefBut(block, BUT, 0, _("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband"); uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, "Delete", 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position"); + bt= uiDefBut(block, BUT, 0, _("Delete"), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position"); uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); @@ -1301,8 +1301,8 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop"); - bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4", - 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops"); + bt= uiDefButS(block, MENU, 0, _("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), + 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, _("Set interpolation between color stops")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); uiBlockEndAlign(block); |