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:
Pablo Vazquez 2018-11-27 14:19:00 +01:00
parent 32ab0647a5
commit 0217af2f99
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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;
}