Commit Graph

310 Commits

Author SHA1 Message Date
319831d7b8 code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.
2012-09-11 23:10:23 +00:00
c276ef6a26 change to auto-opening menus so the first menu item in popup menu wont auto open.
This way we can do predictable key-shortcut-chaining. Eg.

Shift+A, M, O --- adds a metaball cone.

In editmode
Ctrl+V, X, A --- Assign new vertex group.
2012-09-10 10:50:08 +00:00
b1ff5651fb make alphanumeric key shortcuts work for submenu's so you can chain keys together to select items in a menu.
eg: 'Ctrl+V, E, S'
for - Vertex, Separate, Selection
2012-09-10 06:44:25 +00:00
bad06c158e fix for error in own recent commit: do not hide alpha in HSV and Hex modes 2012-09-08 19:40:34 +00:00
ebbfc46bea Use function pointers instead of hard-coded english button names in color picker block.
This solves the problem with es/ru translations of color picker block reported by Gabriel Gazzán in Bf-translations-dev.
2012-09-02 13:36:33 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +00:00
abd031bb4e code cleanup: use rect size macros for the interface 2012-08-21 19:35:06 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
a5b5f5d3fb code cleanup: use BLI rect functions for interface button and block code. 2012-08-18 18:11:51 +00:00
63f143a3cc use rctf struct for UI buttons and blocks, easier to read and means we can use BLI_rctf functions. 2012-08-18 16:53:46 +00:00
dac761057d fix for crash showing tooltip for NODE_OT_add_search() 2012-08-17 11:31:54 +00:00
a199ae5368 style cleanup: whitespace, also add '?' to save over popup since it wasnt totally clear it was a question (user pointed this out, they thought it was just notification and lost their work). 2012-07-31 23:06:12 +00:00
7217927414 add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these). 2012-07-29 18:14:20 +00:00
0dafa97ea3 UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.

It also adds a few getters (to get RNA i18n context, and current language iso code).

Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).

For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
358f7d40b6 style cleanup: use TRUE/FALSE for ui align args. 2012-06-19 23:08:16 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
63788b47d6 add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compat 2012-05-26 11:01:01 +00:00
d2a37d464a code cleanup: double promotion warnings 2012-05-22 21:16:59 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
4c1c092fb9 Fixed (or partly fixed) various missing UI translations, mainly with some specific ops invocations (popup menus…), and (to some extent) with the undo/redo stuff. 2012-04-13 19:59:29 +00:00
ec8a26e040 use 'const float' when passing readonly colors, and include array size. 2012-04-04 01:02:15 +00:00
Lukas Toenne
123f7d3eb3 Popup menu layout inherits context store from button.
When adding extra context data in a layout using uiLayoutSetContextPointer, this info was not inherited by popup menus generated in this layout. While operators from regular buttons work fine, the data is missing in operators from menus and such. This patch copies the bContextStore from buttons to the new uiLayout used for popups.
2012-04-03 15:18:59 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
81d8f17843 style cleanup: pep8, indentation 2012-03-24 07:36:32 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
c0e702694f patch [#30620] Wiki Quick Hack: Make Tooltip Text Colour Themeable
from luke frisken (lfrisken), with some edits.

some tooltip colors weren't visible with different backgrounds, now the base tooltip color is used and tinted for python/alert/shortcuts etc. the tint colors are still hard coded.
2012-03-22 20:24:11 +00:00
7ba8c9e3bf patch [#30595] Wiki Quick Hacks: Make Tooltip Background Colour Themeable
from luke frisken (lfrisken)
2012-03-19 22:29:16 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
19ff61bfb3 Fix #30155: crash with popup menu open while new .blend file is loaded,
CTX_wm_window is then set to NULL and checked in the event queue, but it
should be checked for removing handlers too.
2012-02-13 21:05:04 +00:00
e76a87c0b2 Fix #28011: Dropdown lists to add Brick elements in Game Logic view miss letters if zoomed small
Now fonts in popup lists will also be scaled together with panel from which they're displaying.
2012-01-31 15:59:52 +00:00
b95beea539 style chang, made mainly because I wanted to be able to add breakpoints to MEM_freeN calls which were on the same line as the if's. 2012-01-21 22:00:40 +00:00
7add5e2bac Better api use for paths.
Avoid possibly copy past buffer.
2012-01-21 14:48:07 +00:00
7af10e9812 Fix #29762: columns in long enum property menu's were in the wrong order. 2012-01-17 16:06:16 +00:00
9f2443293e replace fixed sizes with sizeof when passing string length since size wasn't always correct. 2012-01-12 13:16:30 +00:00
535d27eb49 minor cleanup for string use - no functional changes
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch.
- pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).
2012-01-11 09:33:44 +00:00
32896bbf59 remove unneeded NULL check in ui_searchbox_create() which confuses static checkers since the values used later. 2011-12-18 22:42:43 +00:00
3e7ad0e271 fix [#29537] file/save crashes when target path isnt found
bug was that uiPupMenuSaveOver(...) could run the WM API call function which freed the operator, within the low level invoke function which kept using the freed memory.

Changed uiPupMenuSaveOver(...) to only show a popup so the caller needs to check if the file exists and should be immediately written (which was done everywhere except for blend saving anyway).

* added note that operators invoke/exec funcs cant call WM_operator_call(...) on themselves, ends up using freed memory.
* added BLI_is_file(path), checks the file exists and isnt a directory.
2011-12-12 18:06:36 +00:00
c1c3d66079 Fix #29306: Alt+N, Enter In Image View Does closes the dialog without executing.
If enter is pressed outside of any button in menu, generate two menu return values:
- UI_RETURN_CANCEL so button wouldn't be executed
- UI_RETURN_POPUP_OK so callback associated with popup block would be executed
2011-11-24 13:51:31 +00:00
22fda710ce Fix #29347: enum tooltip crash that showed up with recent changes.
Patch by Dan Eicher.
2011-11-21 12:45:48 +00:00
32b3fd3245 UI: fix issue with previous commit, could show wrong tooltip. 2011-11-18 23:32:00 +00:00
4d31654a61 Fix [#29018] Problem with multi-column dorpdown lists, when scrolling is enabled: the bottom-most elements are not shown.
ui_popup_block_scrolltest needs to be aware whether uiblock is flip or not, to avoid hiding irrelevant items in multi-column scrolled menus...
2011-11-18 23:10:56 +00:00
c26c5f3852 UI: small tweak to tooltips for enum menus, it wasn't very clear which
description was for the property and which for the item.
2011-11-18 21:06:36 +00:00