Commit Graph

214 Commits

Author SHA1 Message Date
fed6b2bcb7 code cleanup: remove paranoid/invalid NULL checks and also reduce some unneeded size_t -> int conversions. 2012-09-15 07:31:17 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
0c7fa76e59 remove some more pynode references in the code 2012-05-29 09:42:11 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
ba7d24559d fix for own mistake for ctrl+left/right movement and code cleanup for txt_jump_left/right 2012-05-08 11:18:20 +00:00
c93d7a193a style cleanup: BKE_*.c files which deal with library functions 2012-05-06 15:15:33 +00:00
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
b6edcc4b33 make text move up/down into a single operator with a direction property 2012-05-04 16:17:09 +00:00
2bc29ff426 Patch [#30654] Wiki Quick Hack: Text editor move lines up/down
Submitted by: Justin Dailey (dail)

Patch allows the current line (or selected lines) to be moved up and down with
Ctrl+Shift+Up and Ctrl+Shift+Down. Has undo/redo support and operators in python
menu.
2012-05-04 14:27:13 +00:00
435679b4b0 Word selection in the Text Editor:
* Fix word selection for words with multibyte characters. No need to call txt_move_left() or txt_move_right(), because these functions work with symbols, not bytes
* Word selection now treats tabs the same way as spaces. Also useful for words with multibyte characters
2012-04-30 13:14:15 +00:00
44d81faa43 patch [#30821] Wiki Quick Hack: Text editor duplicate line
from Justin Dailey (dail)

made this Ctrl+D, to replace Delete.
2012-04-29 18:53:43 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
2f74471dd9 fix invalid memcpy() use in text editor (backspace would call memcpy with overlapping source and destination). 2012-04-26 02:24:55 +00:00
2e734e4735 Fix #31007: text editor delete at end of last line did unnecessary undo push.
Patch by Justin Dailey, simplified a bit.
2012-04-19 09:27:11 +00:00
906cd4d8a6 update python keywords (remove exec, print, add nonlocal) 2012-04-06 05:53:01 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
f11a6d3a84 Adds support for utf paths on Windows.
Not all file formats/calls are supported yet. It will be expended.

Please from now on use BLI_fopen, BLI_* for file manipulations.
For non-windows systems BLI_fopen just calls fopen.
For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
2012-03-20 02:17:37 +00:00
3633858fdb code cleanup:
* replace 2D vector copy with copy_v2_v2().
* use puts rather then printf for single strings.
* style cleanup for drawobject.c indentation.
2012-03-18 06:01:33 +00:00
c21c58f44c style cleanup, also remove unused externs. 2012-03-11 19:09:01 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
c78f02d990 edit to cursor adjustment, use int rather then short to store the cursor position. 2012-03-07 16:24:25 +00:00
00781668ce Unify string stepping delimiter code for text buttons, text editor and console (all had duplicate code).
this is also a step toward the console working with utf8 though many todo's remain.
2012-03-07 15:55:12 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
df51fd74cf Quiet warnings in text editor 2012-01-22 17:26:56 +00:00
a98a75346c quiet warnings and possible NULL checking crash fix for indentation functions. 2012-01-20 23:03:41 +00:00
1726853226 comment some dead assibnment and set dummy values for image profile conversion in case of invalid input. 2012-01-20 15:18:57 +00:00
cd476ee531 fix [#29914] paste text into blender causes crash 2012-01-17 19:03:18 +00:00
c64ab6c2bf Whitespace tabs vs. spaces consistency changes 2012-01-17 17:26:58 +00:00
c150d0084f patch [#29859] UTF-8 support for text editor.
This also fixes cursor movement in the beginning of line and adds do_versions block for converting text files with old extended ascii encoding into UTF-8.
2012-01-16 16:23:25 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
cbd5b492b1 remove use of deprecated struct members
- editmesh smooth & subdivide were using old mirror axis flag still.
- removed colbits from outliner and object code.
- commented some other parts of the code which access deprecated members and aren't called anywhere.
2011-12-04 06:39:35 +00:00
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00
Dalai Felinto
d6e0508746 Text Editor: implement space-as-tab navigation
When "use tab as space" is on we will jump the spaces as if they were one single tab when navigating (left/right).
Tabsize still is hardcoded to 4, but this is a separate design issue left for another patch.

* patch done in the airplane while expaining the Text Editor code for a potencial new coder @ Blender PRO 2011 *
2011-11-14 17:33:32 +00:00
bb8fe0bf4a minor edits
- remove unneeded type check from convert grease pencil operator.
- correct some error prints & use __func__.
- make copy_libblock take an ID* argument rather than void*.
2011-11-07 04:36:37 +00:00
33accdb725 use (const char*) rather than (char*) where possible.
also removed some unused function definitons.
2011-11-05 11:04:28 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
bc40f11093 header cleanup (no functional changes) 2011-10-10 09:38:02 +00:00
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
48a64ffa70 more minor warning cleanups and improve error reporting if text fails to save. 2011-07-27 06:55:20 +00:00
7c9033d606 Fix #28087: Opening files in the text editor ignores the last newline '\n'
It was tricky conversion of file buffer to text lines. Should work fine now.
2011-07-26 08:13:27 +00:00
5ca36915a6 Silence some unused-but-set-variable warnings.
And small optimization for text search function :)
2011-05-28 14:52:28 +00:00
628a8151da Fix #27505: Text Editor always indent next line when a " is found (which is not always correct)
Do not indent if there's any non-space character after colon.

This only makes life a bit easier, but it's still not 100% correct indentation
strategy. For example when colon is inside non-closed string or so.
Also there's not indentation for { and un-indentation for }.

Handling such cases would require much smarter strategy..
2011-05-28 14:40:42 +00:00
9b5800bcd7 fixed "rather then" -> "rather than" typos all over the place 2011-05-28 13:11:24 +00:00