Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-06-03 11:27:55 +0400
committerMatt Ebb <matt@mke3.net>2010-06-03 11:27:55 +0400
commit21d112c36f661f3ce8648f4eadfe1325929e9184 (patch)
tree0f880b11d750b7d5800154faa67e9920012e8b83 /source/blender/windowmanager/intern/wm.c
parent3b6aa5b6a588b76e1ed6f25f11ae77dd07ecfa46 (diff)
Reworked the non-blocking reports display in the info header:
* Now it displays the last report from the global list, not just from operators * Rather than disappearing when a new operator is run, it stays until it times out or a new report is added * Fun animated transitions ;) http://mke3.net/blender/devel/2.5/reports_header.mov Now need to investigate report usage with popups. Ideally we can have most reports non-blocking, so they're less intrusive, only popping up for dire errors. Problem is many things in Blender right now are marked as RPT_ERROR when probably RPT_WARNING is more appropriate. Should probably keep RPT_ERROR for things that demand immediate attention.
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 452c37dbe77..fcf8951d796 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -98,13 +98,18 @@ void WM_operator_free(wmOperator *op)
MEM_freeN(op);
}
+static void wm_reports_free(wmWindowManager *wm)
+{
+ BKE_reports_clear(&wm->reports);
+ WM_event_remove_timer(wm, NULL, wm->reports.reporttimer);
+}
+
/* all operations get registered in the windowmanager here */
/* called on event handling by event_system.c */
void wm_operator_register(bContext *C, wmOperator *op)
{
wmWindowManager *wm= CTX_wm_manager(C);
int tot;
- char *buf;
BLI_addtail(&wm->operators, op);
tot= BLI_countlist(&wm->operators);
@@ -116,12 +121,6 @@ void wm_operator_register(bContext *C, wmOperator *op)
tot--;
}
-
- /* Report the string representation of the operator */
- buf = WM_operator_pystring(C, op->type, op->ptr, 1);
- BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
- MEM_freeN(buf);
-
/* so the console is redrawn */
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL);
@@ -309,7 +308,8 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
BLI_freelistN(&wm->paintcursors);
BLI_freelistN(&wm->drags);
- BKE_reports_clear(&wm->reports);
+
+ wm_reports_free(wm);
if(C && CTX_wm_manager(C)==wm) CTX_wm_manager_set(C, NULL);
}