diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-09 05:00:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-09 05:00:03 +0400 |
commit | 873f901e5a3d0d10c4cca579ce1f2aaed852b1e8 (patch) | |
tree | 883d05045cf490da2d8393c5e94790b2cc368935 /source/blender/editors/interface/interface_utils.c | |
parent | 52f080604b642aa969c4ce076fb6bc2553acaa35 (diff) |
UI: improve reports popup
- use labels rather then menu items (items selected but did nothing)
- each report gets its own icon (icons besides first were ignored)
- use uiPupMenu rather then string based menu.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index ed4852bf81d..fa6eef40298 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -44,6 +44,7 @@ #include "BLF_translation.h" #include "BKE_context.h" +#include "BKE_report.h" #include "MEM_guardedalloc.h" @@ -231,6 +232,19 @@ int uiIconFromID(ID *id) return (ptr.type) ? RNA_struct_ui_icon(ptr.type) : ICON_NONE; } +/* see: report_type_str */ +int uiIconFromReportType(int type) +{ + if (type & RPT_ERROR_ALL) + return ICON_ERROR; + else if (type & RPT_WARNING_ALL) + return ICON_ERROR; + else if (type & RPT_INFO_ALL) + return ICON_INFO; + else + return ICON_NONE; +} + /********************************** Misc **************************************/ /** |