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/text_draw.c2
-rw-r--r--source/blender/editors/space_text/text_header.c5
-rw-r--r--source/blender/editors/space_text/text_ops.c13
-rw-r--r--source/blender/editors/space_text/text_python.c4
4 files changed, 9 insertions, 15 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 97eb5b41db7..5111d20b8ee 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1232,7 +1232,7 @@ static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back)
uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT) ? UI_SCROLL_PRESSED : 0);
uiSetRoundBox(UI_CNR_ALL);
- rad = 0.4f * mini(BLI_RCT_SIZE_X(&st->txtscroll), BLI_RCT_SIZE_Y(&st->txtscroll));
+ rad = 0.4f * mini(BLI_rcti_size_x(&st->txtscroll), BLI_rcti_size_y(&st->txtscroll));
UI_GetThemeColor3ubv(TH_HILITE, col);
col[3] = 48;
glColor4ubv(col);
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index b0cd6aeaab4..7dc3ec1ac60 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -59,17 +59,12 @@
#include "WM_types.h"
-
-
-
#ifdef WITH_PYTHON
// XXX #include "BPY_menus.h"
#endif
#include "text_intern.h"
-#define HEADER_PATH_MAX 260
-
/* ************************ header area region *********************** */
/************************** properties ******************************/
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 5af44f93d06..75b8e2f218d 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -602,9 +602,12 @@ static int text_run_script(bContext *C, ReportList *reports)
/* Don't report error messages while live editing */
if (!is_live) {
- if (text->curl != curl_prev || curc_prev != text->curc) {
- text_update_cursor_moved(C);
- WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
+ /* text may have freed its self */
+ if (CTX_data_edit_text(C) == text) {
+ if (text->curl != curl_prev || curc_prev != text->curc) {
+ text_update_cursor_moved(C);
+ WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
+ }
}
BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now...");
@@ -2409,8 +2412,8 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* jump scroll, works in v2d but needs to be added here too :S */
if (event->type == MIDDLEMOUSE) {
- tsc->old[0] = ar->winrct.xmin + BLI_RCT_CENTER_X(&st->txtbar);
- tsc->old[1] = ar->winrct.ymin + BLI_RCT_CENTER_Y(&st->txtbar);
+ tsc->old[0] = ar->winrct.xmin + BLI_rcti_cent_x(&st->txtbar);
+ tsc->old[1] = ar->winrct.ymin + BLI_rcti_cent_y(&st->txtbar);
tsc->delta[0] = 0;
tsc->delta[1] = 0;
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index f980e19e9c8..966afe22e42 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -180,13 +180,9 @@ static void confirm_suggestion(Text *text, int skipleft)
}
// XXX
-#define L_MOUSE 0
-#define M_MOUSE 0
-#define R_MOUSE 0
#define LR_SHIFTKEY 0
#define LR_ALTKEY 0
#define LR_CTRLKEY 0
-#define LR_OSKEY 0
// XXX
static int doc_scroll = 0;