diff options
Diffstat (limited to 'source/blender/editors/interface')
6 files changed, 33 insertions, 41 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index dd7d2ca765f..76ed9891b8e 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -530,14 +530,11 @@ static void ui_draw_but_CHARTAB(uiBut *but) int charmax = G.charmax; /* FO_BUILTIN_NAME font in use. There are TTF FO_BUILTIN_NAME and non-TTF FO_BUILTIN_NAME fonts */ - if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) - { - if(G.ui_international == TRUE) - { + if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) { + if(G.ui_international == TRUE) { charmax = 0xff; } - else - { + else { charmax = 0xff; } } @@ -562,16 +559,13 @@ static void ui_draw_but_CHARTAB(uiBut *but) cs = G.charstart; /* Set the font, in case it is not FO_BUILTIN_NAME font */ - if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) - { + if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) { // Is the font file packed, if so then use the packed file - if(G.selfont->packedfile) - { + if(G.selfont->packedfile) { pf = G.selfont->packedfile; FTF_SetFont(pf->data, pf->size, 14.0); } - else - { + else { char tmpStr[256]; int err; @@ -580,10 +574,8 @@ static void ui_draw_but_CHARTAB(uiBut *but) err = FTF_SetFont((unsigned char *)tmpStr, 0, 14.0); } } - else - { - if(G.ui_international == TRUE) - { + else { + if(G.ui_international == TRUE) { FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 14.0); } } @@ -595,8 +587,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) glRectf((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax)); glColor3ub(0, 0, 0); - for(y = 0; y < 6; y++) - { + for(y = 0; y < 6; y++) { // Do not draw more than the category allows if(cs > charmax) break; @@ -676,23 +667,19 @@ static void ui_draw_but_CHARTAB(uiBut *but) glShadeModel(GL_FLAT); /* Return Font Settings to original */ - if(U.fontsize && U.fontname[0]) - { + if(U.fontsize && U.fontname[0]) { result = FTF_SetFont((unsigned char *)U.fontname, 0, U.fontsize); } - else if (U.fontsize) - { + else if (U.fontsize) { result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize); } - if (result == 0) - { + if (result == 0) { result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 11); } /* resets the font size */ - if(G.ui_international == TRUE) - { + if(G.ui_international == TRUE) { // uiSetCurFont(but->block, UI_HELV); } } @@ -1604,7 +1591,6 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select)) #endif { a= i*aspect; - } for(; i--; a-=aspect) { diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 173aa98374c..7661fa5994b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -800,8 +800,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to) if(!act_iter) return; /* (3) add a new controller */ - if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED) - { + if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED) { cont = (bController *)ob->controllers.last; /* (4) link the sensor->controller->actuator */ diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 412c0233c35..c3a0f438fbe 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1103,8 +1103,7 @@ int ui_id_icon_get(bContext *C, ID *id, int big) int iconid= 0; /* icon */ - switch(GS(id->name)) - { + switch(GS(id->name)) { case ID_BR: iconid= ui_id_brush_get_icon(C, id); break; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3575a8527fc..ef88bb0bbb6 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1361,7 +1361,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) { MenuType *mt= (MenuType*)arg_mt; - Menu menu = {0}; + Menu menu = {NULL}; menu.type= mt; menu.layout= layout; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 9aaba786050..d2cee11c755 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2373,6 +2373,7 @@ void uiTemplateOperatorSearch(uiLayout *layout) #define B_STOPCAST 2 #define B_STOPANIM 3 #define B_STOPCOMPO 4 +#define B_STOPSEQ 5 static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) { @@ -2389,6 +2390,9 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) case B_STOPCOMPO: WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL); break; + case B_STOPSEQ: + WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL); + break; } } @@ -2410,8 +2414,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) if(WM_jobs_test(wm, sa)) owner = sa; handle_event= B_STOPCOMPO; - } - else { + } else if (sa->spacetype==SPACE_SEQ) { + if(WM_jobs_test(wm, sa)) + owner = sa; + handle_event = B_STOPSEQ; + } else { Scene *scene; /* another scene can be rendering too, for example via compositor */ for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 02054fbe90f..692c8940a21 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1588,6 +1588,14 @@ void init_userdef_do_versions(void) } } + if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 1)) { + bTheme *btheme; + + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + btheme->tv3d.speaker[3] = 255; + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; @@ -1625,13 +1633,6 @@ void init_userdef_do_versions(void) NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE; } - { - bTheme *btheme; - for(btheme= U.themes.first; btheme; btheme= btheme->next) { - btheme->tv3d.speaker[3] = 255; - } - } - /* funny name, but it is GE stuff, moves userdef stuff to engine */ // XXX space_set_commmandline_options(); /* this timer uses U */ |