Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Header Template | /** \name Header Template | ||||
| * \{ */ | * \{ */ | ||||
| void uiTemplateHeader(uiLayout *layout, bContext *C) | void uiTemplateHeader(uiLayout *layout, bContext *C) | ||||
| { | { | ||||
| const bScreen *screen = CTX_wm_screen(C); | |||||
| if (screen->state != SCREENNORMAL || screen->temp) { | |||||
Severin: Better to put this in a function:
```lang=C
bool ED_screen_editable(const bScreen *screen)
{… | |||||
| return; | |||||
| } | |||||
| uiBlock *block = uiLayoutAbsoluteBlock(layout); | uiBlock *block = uiLayoutAbsoluteBlock(layout); | ||||
| ED_area_header_switchbutton(C, block, 0); | ED_area_header_switchbutton(C, block, 0); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Search Menu Helpers | /** \name Search Menu Helpers | ||||
| ▲ Show 20 Lines • Show All 6,482 Lines • Show Last 20 Lines | |||||
Better to put this in a function:
Avoids duplicating this check but also documents the intended meaning of the check via the function name.