diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 10:19:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-10 14:04:51 +0300 |
commit | 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch) | |
tree | e7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/editors/space_text | |
parent | c735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff) |
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_header.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 9 |
3 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index ec5175eae51..d3e6fd8f79c 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1094,7 +1094,7 @@ static void draw_documentation(const SpaceText *st, ARegion *region) i = 0; br = DOC_WIDTH; - lines = 0; // XXX -doc_scroll; + lines = 0; /* XXX -doc_scroll; */ for (p = docs; *p; p++) { if (*p == '\r' && *(++p) != '\n') { *(--p) = '\n'; /* Fix line endings */ @@ -1400,7 +1400,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi char ch; - // syntax_highlight must be on or else the format string will be null + /* syntax_highlight must be on or else the format string will be null */ if (!text->curl || !tdc->syntax_highlight) { return; } diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index c4052fcef84..c583634f440 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -113,7 +113,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) #if 0 { - // RMB + /* RMB */ uiPopupMenu *pup; @@ -140,7 +140,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+E + /* Alt+Shift+E */ uiPopupMenu *pup; @@ -152,7 +152,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+F + /* Alt+Shift+F */ uiPopupMenu *pup; @@ -174,7 +174,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) } { - // Alt+Shift+V + /* Alt+Shift+V */ uiPopupMenu *pup; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 2ae8d4cde7a..5c7f84ea386 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -407,7 +407,7 @@ void TEXT_OT_open(wmOperatorType *ot) FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); // XXX TODO, relative_path + FILE_SORT_ALPHA); /* TODO: relative_path. */ RNA_def_boolean( ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); } @@ -733,7 +733,7 @@ void TEXT_OT_save_as(wmOperatorType *ot) FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY, - FILE_SORT_ALPHA); // XXX TODO, relative_path + FILE_SORT_ALPHA); /* XXX TODO, relative_path. */ } /** \} */ @@ -1208,7 +1208,7 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op)) text_drawcache_tag_update(st, 0); - // double check tabs/spaces before splitting the line + /* Double check tabs/spaces before splitting the line. */ curts = txt_setcurr_tab_spaces(text, space); ED_text_undo_push_init(C); txt_split_curline(text); @@ -3463,7 +3463,8 @@ static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event) { int ret; - // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */ + /* Note, the "text" property is always set from key-map, + * so we can't use #RNA_struct_property_is_set, check the length instead. */ if (!RNA_string_length(op->ptr, "text")) { /* if alt/ctrl/super are pressed pass through except for utf8 character event * (when input method are used for utf8 inputs, the user may assign key event |