diff options
author | Julian Eisel <julian@blender.org> | 2020-05-26 14:24:28 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-05-26 14:28:21 +0300 |
commit | 23520cbd13798b1d9db738f76012e91b3ce85c85 (patch) | |
tree | bb27870fb84a80232d2fa90d053a563416e5604e /source/blender/editors/interface/interface_templates.c | |
parent | 13e17cbd473f5fc2c825086e23af96db298981c4 (diff) |
Cleanup: Avoid mixing unlink-operator and menu name for ID-templates
The context menu name for `UILayout.template_ID_tabs()` would be passed
through multiple functions as `unlinkop`.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 0e67f943ee6..763e9ee0424 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1220,6 +1220,8 @@ static void ui_template_id(uiLayout *layout, const char *newop, const char *openop, const char *unlinkop, + /* Only respected by tabs (use_tabs). */ + const char *menu, const char *text, int flag, int prv_rows, @@ -1274,7 +1276,7 @@ static void ui_template_id(uiLayout *layout, if (template_ui->idlb) { if (use_tabs) { layout = uiLayoutRow(layout, true); - template_ID_tabs(C, layout, template_ui, type, flag, newop, unlinkop); + template_ID_tabs(C, layout, template_ui, type, flag, newop, menu); } else { layout = uiLayoutRow(layout, true); @@ -1313,6 +1315,7 @@ void uiTemplateID(uiLayout *layout, newop, openop, unlinkop, + NULL, text, UI_ID_BROWSE | UI_ID_RENAME | UI_ID_DELETE, 0, @@ -1341,6 +1344,7 @@ void uiTemplateIDBrowse(uiLayout *layout, newop, openop, unlinkop, + NULL, text, UI_ID_BROWSE | UI_ID_RENAME, 0, @@ -1372,6 +1376,7 @@ void uiTemplateIDPreview(uiLayout *layout, openop, unlinkop, NULL, + NULL, UI_ID_BROWSE | UI_ID_RENAME | UI_ID_DELETE | UI_ID_PREVIEWS, rows, cols, @@ -1399,6 +1404,7 @@ void uiTemplateGpencilColorPreview(uiLayout *layout, NULL, NULL, NULL, + NULL, UI_ID_BROWSE | UI_ID_PREVIEWS | UI_ID_DELETE, rows, cols, @@ -1417,7 +1423,7 @@ void uiTemplateIDTabs(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *newop, - const char *unlinkop, + const char *menu, int filter) { ui_template_id(layout, @@ -1426,7 +1432,8 @@ void uiTemplateIDTabs(uiLayout *layout, propname, newop, NULL, - unlinkop, + NULL, + menu, NULL, UI_ID_BROWSE | UI_ID_RENAME, 0, |