Commit: 34091feca4cf3625bbfa962c84d4eaa0dceacfcf
Author: Mateusz Grzeliński
Date:   Mon Aug 17 17:47:58 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB34091feca4cf3625bbfa962c84d4eaa0dceacfcf

Implement log delete operator

===================================================================

M       intern/clog/CLG_log.h
M       intern/clog/clog.c
M       release/scripts/startup/bl_ui/space_info.py
M       source/blender/editors/space_info/info_clog.c

===================================================================

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index f143ddc2a9a..771f52962b3 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -197,7 +197,7 @@ CLG_LogRecord *clog_log_record_init(CLG_LogType *type,
                                     const char *file_line,
                                     const char *function,
                                     const char *message);
-void clog_log_record_free(CLG_LogRecord *log_record);
+void CLG_log_record_free(CLG_LogRecord *log_record);
 
 /* Main initializer and distructor (per session, not logger). */
 void CLG_init(void);
diff --git a/intern/clog/clog.c b/intern/clog/clog.c
index 54bc7cd4e59..88efc3df592 100644
--- a/intern/clog/clog.c
+++ b/intern/clog/clog.c
@@ -424,7 +424,7 @@ CLG_LogRecord *clog_log_record_init(CLG_LogType *type,
   return log_record;
 }
 
-void clog_log_record_free(CLG_LogRecord *log_record)
+void CLG_log_record_free(CLG_LogRecord *log_record)
 {
   MEM_freeN(log_record->message);
   MEM_freeN(log_record);
@@ -863,7 +863,7 @@ static void CLG_ctx_free(CLogContext *ctx)
   CLG_LogRecord *log = ctx->log_records.first, *log_next = NULL;
   while (log) {
     log_next = log->next;
-    clog_log_record_free(log);
+    CLG_log_record_free(log);
     log = log_next;
   }
   if (ctx->output_file != NULL) {
diff --git a/release/scripts/startup/bl_ui/space_info.py 
b/release/scripts/startup/bl_ui/space_info.py
index af433952864..ebe5edb3e81 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -164,7 +164,7 @@ class INFO_MT_context_menu(Menu):
             layout.operator("info.clog_copy", text="Copy Message").method = 
'COPY_MESSAGE'
             layout.operator("info.clog_copy", text="Copy Path").method = 
'COPY_PATH'
             layout.operator("info.clog_copy", text="Copy Basename").method = 
'COPY_BASENAME'
-            layout.operator("info.clog_delete", text="Delete (mockup)")
+            layout.operator("info.clog_delete", text="Delete")
             layout.separator()
             layout.operator("info.clog_filter", text="Mute Selected 
Files").method = 'FILTER_FILE'
             layout.operator("info.clog_filter", text="Mute Selected 
Lines").method = 'FILTER_LINE'
diff --git a/source/blender/editors/space_info/info_clog.c 
b/source/blender/editors/space_info/info_clog.c
index 3065b912268..c2ff4e89f67 100644
--- a/source/blender/editors/space_info/info_clog.c
+++ b/source/blender/editors/space_info/info_clog.c
@@ -427,10 +427,8 @@ static int clog_delete_exec(bContext *C, wmOperator 
*UNUSED(op))
     record_next = record->next;
 
     if (is_clog_record_visible(record, sinfo) && (record->flag & CLG_SELECT)) {
-      printf("NOT IMPLEMENTED YET");
-      //      BLI_remlink((struct ListBase *)records, record);
-      //      MEM_freeN((void *)record->message);
-      //      MEM_freeN(record);
+      BLI_remlink((struct ListBase *)records, record);
+      CLG_log_record_free(record);
     }
 
     record = record_next;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to