diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-26 18:19:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-26 20:45:55 +0300 |
commit | df02675e21736bd79acb0e34bb410efe748a86bc (patch) | |
tree | 876e21c395f20fe945bae6a3bfd031a386f2620a /source/blender/makesrna/intern | |
parent | c817a89e73891307c2a04e75d0968d49be0e6c29 (diff) |
UI: move modal operator text from headers to status bar.
Python API is context.workspace.status_text_set()
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace_api.c | 12 |
3 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 2a16d2a41ee..adbfc33c698 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -320,7 +320,6 @@ static void rna_def_area(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - FunctionRNA *func; srna = RNA_def_struct(brna, "Area", NULL); RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor"); @@ -384,10 +383,6 @@ static void rna_def_area(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Height", "Area height"); RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw"); - - func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint"); - RNA_def_function_ui_description(func, "Set the header text"); - RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text"); } static void rna_def_view2d_api(StructRNA *srna) diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 702bcf15462..943e6c2e31f 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -1021,7 +1021,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - func = RNA_def_function(srna, "template_cursor_keymap", "uiTemplateCursorKeymap"); + func = RNA_def_function(srna, "template_input_status", "uiTemplateInputStatus"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); func = RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink"); diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index 81606dfba4a..1f3930c7259 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -41,6 +41,8 @@ #ifdef RNA_RUNTIME +#include "ED_screen.h" + static void rna_WorkspaceTool_setup( ID *id, bToolRef *tref, @@ -80,10 +82,14 @@ static PointerRNA rna_WorkspaceTool_operator_properties( #else -void RNA_api_workspace(StructRNA *UNUSED(srna)) +void RNA_api_workspace(StructRNA *srna) { - /* FunctionRNA *func; */ - /* PropertyRNA *parm; */ + FunctionRNA *func; + + func = RNA_def_function(srna, "status_text_set", "ED_workspace_status_text"); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Set the status bar text, typically for modal operators"); + RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, no argument clears the text"); } void RNA_api_workspace_tool(StructRNA *srna) |