Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton
2018-06-30 13:52:04 +02:00
6 changed files with 7 additions and 10 deletions

View File

@@ -1140,7 +1140,7 @@ void uiItemsFullEnumO_items(
void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon); /* label icon for dragging */
void uiItemM(uiLayout *layout, struct bContext *C, const char *menuname, const char *name, int icon); /* menu */
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon); /* menu */
void uiItemV(uiLayout *layout, const char *name, int icon, int argval); /* value */
void uiItemS(uiLayout *layout); /* separator */
void uiItemSpacer(uiLayout *layout); /* Special separator. */

View File

@@ -2113,7 +2113,7 @@ static uiBut *ui_item_menu(
return but;
}
void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const char *name, int icon)
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
{
MenuType *mt;

View File

@@ -3944,7 +3944,7 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs(
block->ui_operator = op;
row = uiLayoutRow(layout, true);
uiItemM(row, (bContext *)C, "WM_MT_operator_presets", NULL, ICON_NONE);
uiItemM(row, "WM_MT_operator_presets", NULL, ICON_NONE);
wmOperatorType *ot = WM_operatortype_find("WM_OT_operator_preset_add", false);
uiItemFullO_ptr(row, ot, "", ICON_ZOOMIN, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);

View File

@@ -172,8 +172,7 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
else if (umi->type == USER_MENU_TYPE_MENU) {
bUserMenuItem_Menu *umi_mt = (bUserMenuItem_Menu *)umi;
uiItemM(
menu->layout, NULL, umi_mt->mt_idname, umi->ui_name[0] ? umi->ui_name : NULL,
uiItemM(menu->layout, umi_mt->mt_idname, umi->ui_name[0] ? umi->ui_name : NULL,
ICON_NONE);
}
else if (umi->type == USER_MENU_TYPE_SEP) {

View File

@@ -262,7 +262,7 @@ static void rna_uiItemL(
}
static void rna_uiItemM(
uiLayout *layout, bContext *C, const char *menuname, const char *name, const char *text_ctxt,
uiLayout *layout, const char *menuname, const char *name, const char *text_ctxt,
int translate, int icon, int icon_value)
{
/* Get translated name (label). */
@@ -272,7 +272,7 @@ static void rna_uiItemM(
icon = icon_value;
}
uiItemM(layout, C, menuname, name, icon);
uiItemM(layout, menuname, name, icon);
}
static void rna_uiItemPopoverPanel(
@@ -709,7 +709,6 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item");
func = RNA_def_function(srna, "menu", "rna_uiItemM");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu");
api_ui_item_common(func);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);

View File

@@ -2019,8 +2019,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
if (mt) {
UI_menutype_draw(C, mt, layout);
// wmWindowManager *wm = CTX_wm_manager(C);
// uiItemM(layout, C, "USERPREF_MT_keyconfigs", U.keyconfigstr, ICON_NONE);
// uiItemM(layout, "USERPREF_MT_keyconfigs", U.keyconfigstr, ICON_NONE);
}
UI_block_emboss_set(block, UI_EMBOSS_PULLDOWN);