UI: Bring back User Preferences entry in Editors list.
It's nonstandard and kind of weird, but it's nice when making keymaps, themes, quickly test things without spawning a new window.
This commit is contained in:
parent
32ab0647a5
commit
0217af2f99
|
@ -33,8 +33,7 @@ class USERPREF_HT_header(Header):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# No need to show type selector.
|
||||
# layout.template_header()
|
||||
layout.template_header()
|
||||
|
||||
userpref = context.user_preferences
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ static const EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerR
|
|||
|
||||
/* +1 to skip SPACE_EMPTY */
|
||||
for (const EnumPropertyItem *item_from = rna_enum_space_type_items + 1; item_from->identifier; item_from++) {
|
||||
if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
|
||||
if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
|
||||
continue;
|
||||
}
|
||||
RNA_enum_item_add(&item, &totitem, item_from);
|
||||
|
@ -174,7 +174,7 @@ static int rna_Area_type_get(PointerRNA *ptr)
|
|||
|
||||
static void rna_Area_type_set(PointerRNA *ptr, int value)
|
||||
{
|
||||
if (ELEM(value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
|
||||
if (ELEM(value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
|
||||
/* Special case: An area can not be set to show the top-bar editor (or
|
||||
* other global areas). However it should still be possible to identify
|
||||
* its type from Python. */
|
||||
|
@ -232,7 +232,7 @@ static const EnumPropertyItem *rna_Area_ui_type_itemf(
|
|||
|
||||
/* +1 to skip SPACE_EMPTY */
|
||||
for (const EnumPropertyItem *item_from = rna_enum_space_type_items + 1; item_from->identifier; item_from++) {
|
||||
if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
|
||||
if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue