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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-18 16:56:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-18 16:56:43 +0400
commitac2451c6be437fba14f9c0ceeeaeab382fd9ad58 (patch)
treee4799082130d796e00c44df6db75bf96f43d2f6b /source/blender/editors
parent6e10e93965291f011f48a0fb2cf0b3c149a8a1e6 (diff)
2.5: RNA. Default values were not set when calling functions, this
is fixed now. Also added option for spaces without menus in the header in uiTemplateHeader.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/interface/interface_templates.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index cc3b243d38d..8da2702b603 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -625,7 +625,7 @@ uiLayout *uiLayoutSplit(uiLayout *layout, float percentage);
uiBlock *uiLayoutFreeBlock(uiLayout *layout);
/* templates */
-void uiTemplateHeader(uiLayout *layout, struct bContext *C);
+void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus);
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *unlinkop);
uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 1a5c1178983..0ee21cbcf77 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -56,12 +56,13 @@ void ui_template_fix_linking()
/********************** Header Template *************************/
-void uiTemplateHeader(uiLayout *layout, bContext *C)
+void uiTemplateHeader(uiLayout *layout, bContext *C, int menus)
{
uiBlock *block;
block= uiLayoutFreeBlock(layout);
- ED_area_header_standardbuttons(C, block, 0);
+ if(menus) ED_area_header_standardbuttons(C, block, 0);
+ else ED_area_header_switchbutton(C, block, 0);
}
/********************** Search Callbacks *************************/