diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index ea6421c8d11..2b65bf4922c 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -30,6 +30,8 @@ #include "DNA_screen_types.h" #include "DNA_workspace_types.h" +#include "ED_info.h" + const EnumPropertyItem rna_enum_region_type_items[] = { {RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""}, {RGN_TYPE_HEADER, "HEADER", 0, "Header", ""}, @@ -286,6 +288,11 @@ static void rna_View2D_view_to_region( } } +static const char *rna_Screen_statusbar_info_get(struct bScreen *screen, Main *bmain, bContext *C) +{ + return ED_info_statusbar_string(bmain, screen, C); +} + #else /* Area.spaces */ @@ -536,6 +543,9 @@ static void rna_def_screen(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; + FunctionRNA *func; + PropertyRNA *parm; + srna = RNA_def_struct(brna, "Screen", "ID"); RNA_def_struct_sdna(srna, "Screen"); /* it is actually bScreen but for 2.5 the dna is patched! */ RNA_def_struct_ui_text( @@ -570,11 +580,18 @@ static void rna_def_screen(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL); RNA_def_property_ui_text(prop, "Maximize", "An area is maximized, filling this screen"); + /* Status Bar. */ + prop = RNA_def_property(srna, "show_statusbar", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SCREEN_COLLAPSE_STATUSBAR); - RNA_def_property_ui_text(prop, "Show Status Bar", "Show status bar"); + RNA_def_property_ui_text(prop, "Show Status Bar", "Show Status Bar"); RNA_def_property_update(prop, 0, "rna_Screen_bar_update"); + func = RNA_def_function(srna, "statusbar_info", "rna_Screen_statusbar_info_get"); + RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_CONTEXT); + parm = RNA_def_string(func, "statusbar_info", NULL, 0, "Status Bar Info", ""); + RNA_def_function_return(func, parm); + /* Define Anim Playback Areas */ prop = RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_REGION); |