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:
@@ -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 **************************************/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user