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.
This commit is contained in:
2014-02-09 12:00:03 +11:00
parent 52f080604b
commit 873f901e5a
4 changed files with 51 additions and 29 deletions

View File

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