UI: Input Placeholders #112104
@ -5926,17 +5926,18 @@ const char *UI_but_placeholder_get(uiBut *but)
|
|||||||
const short idcode = RNA_type_to_ID_code(type);
|
const short idcode = RNA_type_to_ID_code(type);
|
||||||
if (idcode != 0) {
|
if (idcode != 0) {
|
||||||
RNA_enum_name(rna_enum_id_type_items, idcode, &placeholder);
|
RNA_enum_name(rna_enum_id_type_items, idcode, &placeholder);
|
||||||
|
placeholder = CTX_IFACE_(BLT_I18NCONTEXT_ID_ID, placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (but->type == UI_BTYPE_TEXT) {
|
else if (but->type == UI_BTYPE_TEXT) {
|
||||||
const char *identifier = RNA_property_identifier(but->rnaprop);
|
const char *identifier = RNA_property_identifier(but->rnaprop);
|
||||||
if (STR_ELEM(identifier, "search_filter", "filter_text", "filter_search")) {
|
if (STR_ELEM(identifier, "search_filter", "filter_text", "filter_search")) {
|
||||||
placeholder = N_("Search");
|
placeholder = CTX_IFACE_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "Search");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return IFACE_(placeholder);
|
return placeholder;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UI_but_type_set_menu_from_pulldown(uiBut *but)
|
void UI_but_type_set_menu_from_pulldown(uiBut *but)
|
||||||
|
@ -109,6 +109,7 @@ static void rna_uiItemR(uiLayout *layout,
|
|||||||
|
|
||||||
/* Get translated name (label). */
|
/* Get translated name (label). */
|
||||||
name = rna_translate_ui_text(name, text_ctxt, nullptr, prop, translate);
|
name = rna_translate_ui_text(name, text_ctxt, nullptr, prop, translate);
|
||||||
|
placeholder = rna_translate_ui_text(placeholder, text_ctxt, nullptr, prop, translate);
|
||||||
|
|
||||||
if (slider) {
|
if (slider) {
|
||||||
flag |= UI_ITEM_R_SLIDER;
|
flag |= UI_ITEM_R_SLIDER;
|
||||||
|
Loading…
Reference in New Issue
Block a user