Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_text/text_ops.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void TEXT_OT_comment_toggle(wmOperatorType *ot) | void TEXT_OT_comment_toggle(wmOperatorType *ot) | ||||
| { | { | ||||
| static const EnumPropertyItem comment_items[] = { | static const EnumPropertyItem comment_items[] = { | ||||
| {0, "TOGGLE", 0, "Toggle Comments", NULL}, | {0, "TOGGLE", 0, "Toggle Comments", NULL}, | ||||
| {1, "COMMENT", 0, "Comment", NULL}, | {1, "COMMENT", 0, "Comment", NULL}, | ||||
| {-1, "UNCOMMENT", 0, "Un-Comment", NULL}, | {-1, "UNCOMMENT", 0, "Uncomment", NULL}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Toggle Comments"; | ot->name = "Toggle Comments"; | ||||
| ot->idname = "TEXT_OT_comment_toggle"; | ot->idname = "TEXT_OT_comment_toggle"; | ||||
| ot->description = "Add or remove comments"; | |||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = text_comment_exec; | ot->exec = text_comment_exec; | ||||
| ot->poll = text_edit_poll; | ot->poll = text_edit_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||