[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25186] trunk/blender/source/blender/ editors: Text and Console operators don't need to register themselves.

Martin Poirier theeth at yahoo.com
Mon Dec 7 21:03:49 CET 2009


Revision: 25186
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25186
Author:   theeth
Date:     2009-12-07 21:03:49 +0100 (Mon, 07 Dec 2009)

Log Message:
-----------
Text and Console operators don't need to register themselves. (this cleans the reports quite a bit)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_console/console_ops.c
    trunk/blender/source/blender/editors/space_text/text_ops.c

Modified: trunk/blender/source/blender/editors/space_console/console_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_console/console_ops.c	2009-12-07 19:59:04 UTC (rev 25185)
+++ trunk/blender/source/blender/editors/space_console/console_ops.c	2009-12-07 20:03:49 UTC (rev 25186)
@@ -369,9 +369,6 @@
 	ot->exec= move_exec;
 	ot->poll= console_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
 }
@@ -415,9 +412,6 @@
 	ot->invoke= insert_invoke;
 	ot->poll= console_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
 }
@@ -482,9 +476,6 @@
 	ot->exec= delete_exec;
 	ot->poll= console_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete.");
 }
@@ -525,9 +516,6 @@
 	/* api callbacks */
 	ot->exec= clear_exec;
 	ot->poll= console_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 	
 	/* properties */
 	RNA_def_boolean(ot->srna, "scrollback", 1, "Scrollback", "Clear the scrollback history");
@@ -587,9 +575,6 @@
 	/* api callbacks */
 	ot->exec= history_cycle_exec;
 	ot->poll= console_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 	
 	/* properties */
 	RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "reverse cycle history");
@@ -635,9 +620,6 @@
 	/* api callbacks */
 	ot->exec= history_append_exec;
 	ot->poll= console_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 	
 	/* properties */
 	RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");	
@@ -683,9 +665,6 @@
 	/* api callbacks */
 	ot->exec= scrollback_append_exec;
 	ot->poll= console_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 	
 	/* properties */
 	RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");	
@@ -727,9 +706,6 @@
 	ot->poll= console_edit_poll;
 	ot->exec= copy_exec;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 }
 
@@ -762,9 +738,6 @@
 	ot->poll= console_edit_poll;
 	ot->exec= paste_exec;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 }
 
@@ -795,9 +768,6 @@
 	/* api callbacks */
 	ot->exec= zoom_exec;
 	ot->poll= console_poll;
-
-	/* flags */
-	/* ot->flag= OPTYPE_REGISTER; */ /* super annoying */
 	
 	/* properties */
 	RNA_def_int(ot->srna, "delta", 0, 0, INT_MAX, "Delta", "Scale the view font.", 0, 1000);

Modified: trunk/blender/source/blender/editors/space_text/text_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_ops.c	2009-12-07 19:59:04 UTC (rev 25185)
+++ trunk/blender/source/blender/editors/space_text/text_ops.c	2009-12-07 20:03:49 UTC (rev 25186)
@@ -735,9 +735,6 @@
 	ot->exec= paste_exec;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied, X11 only.");
 }
@@ -806,9 +803,6 @@
 	/* api callbacks */
 	ot->exec= cut_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* indent operator *********************/
@@ -842,9 +836,6 @@
 	/* api callbacks */
 	ot->exec= indent_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* unindent operator *********************/
@@ -878,9 +869,6 @@
 	/* api callbacks */
 	ot->exec= unindent_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* line break operator *********************/
@@ -919,9 +907,6 @@
 	/* api callbacks */
 	ot->exec= line_break_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* comment operator *********************/
@@ -952,9 +937,6 @@
 	/* api callbacks */
 	ot->exec= comment_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* uncomment operator *********************/
@@ -986,9 +968,6 @@
 	/* api callbacks */
 	ot->exec= uncomment_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* convert whitespace operator *********************/
@@ -1129,9 +1108,6 @@
 	ot->exec= convert_whitespace_exec;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, "type", "Type of whitespace to convert to.");
 }
@@ -1159,9 +1135,6 @@
 	/* api callbacks */
 	ot->exec= select_all_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* select line operator *********************/
@@ -1187,9 +1160,6 @@
 	/* api clinebacks */
 	ot->exec= select_line_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* previous marker operator *********************/
@@ -1225,9 +1195,6 @@
 	/* api callbacks */
 	ot->exec= previous_marker_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* next marker operator *********************/
@@ -1263,9 +1230,6 @@
 	/* api callbacks */
 	ot->exec= next_marker_exec;
 	ot->poll= text_edit_poll;
-	
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* clear all markers operator *********************/
@@ -1291,9 +1255,6 @@
 	/* api callbacks */
 	ot->exec= clear_all_markers_exec;
 	ot->poll= text_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /************************ move operator ************************/
@@ -1576,9 +1537,6 @@
 	ot->exec= move_exec;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
 }
@@ -1603,9 +1561,6 @@
 	ot->exec= move_select_exec;
 	ot->poll= text_space_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection.");
 }
@@ -1640,9 +1595,6 @@
 	ot->exec= jump_exec;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to.", 1, 10000);
 }
@@ -1693,9 +1645,6 @@
 	ot->exec= delete_exec;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete.");
 }
@@ -1721,9 +1670,6 @@
 	/* api callbacks */
 	ot->exec= toggle_overwrite_exec;
 	ot->poll= text_space_edit_poll;
-
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
 }
 
 /******************* scroll operator **********************/
@@ -2208,9 +2154,6 @@
 	ot->cancel= set_cursor_cancel;
 	ot->poll= text_region_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING;
-
 	/* properties */
 	RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor.");
 }
@@ -2332,9 +2275,6 @@
 	ot->invoke= insert_invoke;
 	ot->poll= text_edit_poll;
 
-	/* flags */
-	ot->flag= OPTYPE_REGISTER;
-
 	/* properties */
 	RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
 }





More information about the Bf-blender-cvs mailing list