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:
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/space_text.c14
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c4
-rw-r--r--source/blender/editors/space_text/text_draw.c4
-rw-r--r--source/blender/editors/space_text/text_format.h2
-rw-r--r--source/blender/editors/space_text/text_format_lua.c2
-rw-r--r--source/blender/editors/space_text/text_format_osl.c2
-rw-r--r--source/blender/editors/space_text/text_format_py.c2
-rw-r--r--source/blender/editors/space_text/text_ops.c18
8 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 875496d5edf..6e49569314f 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -275,19 +275,19 @@ static void text_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", FALSE);
+ RNA_boolean_set(kmi->ptr, "reverse", false);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
+ RNA_boolean_set(kmi->ptr, "reverse", true);
WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
@@ -309,7 +309,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
if (U.uiflag & USER_MMB_PASTE) { // XXX not dynamic
kmi = WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "selection", TRUE);
+ RNA_boolean_set(kmi->ptr, "selection", true);
}
WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0);
@@ -368,7 +368,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_selection_set", EVT_TWEAK_L, KM_ANY, 0, 0);
WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "TEXT_OT_selection_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "select", TRUE);
+ RNA_boolean_set(kmi->ptr, "select", true);
RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELUPMOUSE, KM_PRESS, 0, 0)->ptr, "lines", -1);
RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0)->ptr, "lines", 1);
@@ -572,7 +572,7 @@ void ED_spacetype_text(void)
art->init = text_main_area_init;
art->draw = text_main_area_draw;
art->cursor = text_cursor;
- art->event_cursor = TRUE;
+ art->event_cursor = true;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 692cefd3ee9..d3b494631bb 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -280,7 +280,7 @@ static int text_autocomplete_invoke(bContext *C, wmOperator *op, const wmEvent *
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
- st->doplugins = TRUE;
+ st->doplugins = true;
op->customdata = text_autocomplete_build(text);
if (texttool_suggest_first()) {
@@ -524,7 +524,7 @@ static void text_autocomplete_free(bContext *C, wmOperator *op)
/* other stuff */
{
SpaceText *st = CTX_wm_space_text(C);
- st->doplugins = FALSE;
+ st->doplugins = false;
texttool_text_clear();
}
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index f25e09a905d..6a98fd802f9 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1340,7 +1340,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
lineno = 0;
for (i = 0; i < st->top && tmp; i++) {
if (st->showsyntax && !tmp->format)
- tft->format_line(st, tmp, 0);
+ tft->format_line(st, tmp, false);
if (st->wordwrap) {
int lines = text_get_visible_lines_no(st, lineno);
@@ -1389,7 +1389,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
for (i = 0; y > 0 && i < st->viewlines && tmp; i++, tmp = tmp->next) {
if (st->showsyntax && !tmp->format)
- tft->format_line(st, tmp, 0);
+ tft->format_line(st, tmp, false);
if (st->showlinenrs && !wrap_skip) {
/* draw line number */
diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h
index 808311cbb62..daed3b3e447 100644
--- a/source/blender/editors/space_text/text_format.h
+++ b/source/blender/editors/space_text/text_format.h
@@ -77,7 +77,7 @@ typedef struct TextFormatType {
*
* See: FMT_TYPE_ enums below
*/
- void (*format_line)(SpaceText *st, TextLine *line, int do_next);
+ void (*format_line)(SpaceText *st, TextLine *line, const bool do_next);
const char **ext; /* NULL terminated extensions */
} TextFormatType;
diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c
index d9d2a9213a3..1e842729ab3 100644
--- a/source/blender/editors/space_text/text_format_lua.c
+++ b/source/blender/editors/space_text/text_format_lua.c
@@ -150,7 +150,7 @@ static char txtfmt_lua_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c
index 2e863f2a569..97dc1be3b9a 100644
--- a/source/blender/editors/space_text/text_format_osl.c
+++ b/source/blender/editors/space_text/text_format_osl.c
@@ -174,7 +174,7 @@ static char txtfmt_osl_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c
index 50425e258e3..2f6962f0493 100644
--- a/source/blender/editors/space_text/text_format_py.c
+++ b/source/blender/editors/space_text/text_format_py.c
@@ -157,7 +157,7 @@ static char txtfmt_py_format_identifier(const char *str)
return fmt;
}
-static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_next)
+static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_next)
{
FlattenString fs;
const char *str;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 43776f28c62..b45838e0bac 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1571,7 +1571,7 @@ static int cursor_skip_find_line(SpaceText *st, ARegion *ar,
return 1;
}
-static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1643,7 +1643,7 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1713,7 +1713,7 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_up(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1746,7 +1746,7 @@ static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
if (!sel) txt_pop_sel(text);
}
-static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_down(SpaceText *st, ARegion *ar, const bool sel)
{
Text *text = st->text;
TextLine **linep;
@@ -1783,7 +1783,7 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
*
* This is to replace screen_skip for PageUp/Down operations.
*/
-static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int sel)
+static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1814,7 +1814,7 @@ static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int s
if (!sel) txt_pop_sel(text);
}
-static int text_move_cursor(bContext *C, int type, int select)
+static int text_move_cursor(bContext *C, int type, bool select)
{
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
@@ -2465,7 +2465,7 @@ static TextLine *get_first_visible_line(SpaceText *st, ARegion *ar, int *y)
return linep;
}
-static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, int sel)
+static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, const bool sel)
{
Text *text = st->text;
int max = wrap_width(st, ar); /* column */
@@ -2582,7 +2582,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
}
}
-static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
+static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, const bool sel)
{
Text *text = st->text;
text_update_character_width(st);
@@ -2845,7 +2845,7 @@ static int text_insert_exec(bContext *C, wmOperator *op)
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
char *str;
- int done = FALSE;
+ int done = false;
size_t i = 0;
unsigned int code;