Commit Graph

217 Commits

Author SHA1 Message Date
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
47ad078402 show tooltips for menus, currently works for operators and enum properties which are can be accessed as menus from the UI (camera overlay enum for example) 2011-11-15 14:20:57 +00:00
9e6860d864 fix [#29242] menus have no keyboard shortcuts 2011-11-14 14:42:47 +00:00
cd191b7d17 UI/Nodes: templates to edit nodes from the properties editor using a tree view,
to be used by cycles. For testing there's a panel in the node editor if you set
debug to 777, didn't enable it because I'm not sure it's very useful there.
2011-11-07 22:28:49 +00:00
7c88bc5952 replace macros for bli math functions in editors 2011-11-06 16:34:44 +00:00
04db8ad282 misc cleanup
- remove redundant casts
- replace strcmp's with "" to just check first char.
- added WM_event_print(), debug mode only to print events since the structs values are not that meaningful.
- added warnings if locale/font dirs cant be found.
2011-10-21 08:16:15 +00:00
874c96a2b9 Cleaning i18n code.
Previous state:
Right now, there are "memories" of the "old" (less than a month!) translation way:
* A few remaining calls to BLF_gettext() (only UI_translate_do_iface and UI_translate_do_tooltip should be used).
* The _() macro still also calls BLF_gettext()!

New state:
Here are the changes made by the patch:
* Removing the no more needed _() macro.
* Removing most N_() and _() calls, only keeping the few needed ones (i.e. strings that are in no other way findable by xgettext and/or update_msg script).
* Defining in UI_interface.h IFACE_() and TIP_() macros (resp. for UI_translate_do_iface and UI_translate_do_tooltip).
* Replacing all calls to BLF_gettext by relevant IFACE_ or TIP_ one.
* Replacing all calls to UI_translate_do_iface by IFACE_.
* Replacing all calls to UI_translate_do_tooltip by TIP_.

All this somewhat clarifies and simplifies the code.
On the bf-translations scripts side, this only implies adding IFACE_ and TIP_ as detection markers for xgettext.
It also allows to reduce POTFILES.in quite notably (only 20 files remaining in it).

Please also have a look at those pages:
* Coder POV: http://wiki.blender.org/index.php/Dev:2.5/Source/Interface/Internationalization
* Translator POV: http://wiki.blender.org/index.php/Dev:2.5/Doc/How_to/Translate_Blender
2011-10-20 20:38:26 +00:00
7f4bb1f71b spelling corrections in comments and quiet warning 2011-10-15 14:14:22 +00:00
cdc564064c revert r40738, flipepd enums give quick access to first items, even if it does seem odd to have them flipped. 2011-10-03 17:59:33 +00:00
91283853b2 fix [#28786] Large enum lists display columns in inverted order (right to left)
also cleared annoying intel c++ warnings.
2011-10-01 21:09:42 +00:00
2bc2752374 correct own fix for #28751 2011-09-28 02:02:57 +00:00
3bcbefa558 minor changes to interface code (no functional changes)
- made 2 loops on menu items break out of the loop when the item is found.
- include function names in error prints.
2011-09-27 17:04:38 +00:00
aaae90af33 fix [#28751] Item in Enum propertie is grayed out
was infact a very old bug where an empty title took the following word for the title, eg: "%t|First Item|Second Item"
the first item would be evaluated as a title.
2011-09-27 16:23:40 +00:00
dc76be62d9 replace strnlen with BLI_strnlen, make some args const - no functional changes. 2011-09-26 17:30:56 +00:00
fbdfdfefd8 use BLI_snprintf rather than sprintf for interface functions 2011-09-26 16:53:04 +00:00
6d125e159d i18n: code clean-up
- Move all translation-related declarations to BLF_translation.h
- Reverted some changes to match trunk svn rev40365
2011-09-20 07:39:25 +00:00
706a2c80f0 i18n: code cleanup and fixing unneeded translation (when partial translation is used only) 2011-09-19 15:10:38 +00:00
1c0bdad835 svn merge -r40222:40344 ^/trunk/blender 2011-09-19 10:48:15 +00:00
9b7b8464b9 i18n: do not translate obect mode enum and transform orientation enum if UI translation is disabled 2011-09-19 10:32:53 +00:00
0abe1911d5 - fix for access past the buffer size (paint / sculpt used some 2d vecs as 3d)
- remove redundant NULL checks on old code where it would crash if the result was NULL later on.
- add some missing NULL checks.
2011-09-16 06:47:01 +00:00
0eda51f2ea Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
  can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
  and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
  collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
  (it was codepage issue).
- Added operator "Get Messages" which generates new text block with
  with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
  messages collected from rna to automatically gathered messages.
  To update .pot you have to re-generate messages.txt using "Get Messages"
  operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
  wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
  gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.

TODO:
- Custom fonts and font size.
  Current font isn't nice at least for russian locale, it's
  difficult to read it.
- Put references to messages.txt so gettext can merge translation when
  name/description of some property changes.
2011-09-15 13:20:18 +00:00
Xiao Xiangquan
981f7fcd0d merge with trunk r39834 2011-09-01 15:08:32 +00:00
feb52de6b5 fix for error calling RNA_property_float_get_index on non array float rotations when displaying. 2011-08-16 22:18:24 +00:00
2c8e1e633c comment unused lines. 2011-08-15 03:41:31 +00:00
Xiao Xiangquan
465c3b82fa merge with trunk r39216 2011-08-10 14:32:03 +00:00
79e359f92a rna/ui: avoid duplicate property gHash lookups by passing the property when its already been found.
added _prop suffix to ui functions which take a prop rather then a propname, may change this later since its not that nice but for gsoc branches this keeps existing UI functions working the same.
2011-08-06 16:00:00 +00:00
Xiao Xiangquan
287b24926f merge with trunk r38787 2011-07-29 17:42:53 +00:00
06ae122f60 include menu ID's in tooltips when python tips are enabled, there was no way to find the ID of a menu which become annoying if you wanted to reference it from a script. 2011-07-26 09:19:51 +00:00
Xiao Xiangquan
77926a7f9d select uiStyle according to UserDef and update lang-packs 2011-07-16 18:28:24 +00:00
Xiao Xiangquan
79c129647e right panel done 2011-06-24 04:22:27 +00:00
Xiao Xiangquan
b429af10d0 merge from trunk #37722 2011-06-24 03:30:50 +00:00
68a12c74b6 fix [#26621] Memory leaks when creating popup window.
also fixes memory leak when cancelling a popup dialog (new image for example).
2011-06-17 12:48:33 +00:00
88676349a4 Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage

- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.

- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.

- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
2011-06-04 17:03:46 +00:00
7138fef58a UI: fix two issues with expanded enum property buttons:
* they were too slow for dynamic python enums, calling the callback
  to list the items for each button, to get a tooltip
* enum tooltips sometimes were showing the same description twice
2011-06-02 14:18:51 +00:00
5f5cdf9d00 for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.

this problem still happens on linux because of XTranslateCoordinates
2011-05-12 16:47:36 +00:00
015a32d01c new BLF functions
- BLF_height_max
- BLF_width_max
- BLF_descender
- BLF_ascender

use for tooltip and image stamp.
2011-05-04 15:09:48 +00:00
12a78aceee fix [#27218] Tooltip text renders incorrectly. 2011-05-03 13:12:47 +00:00
76d4c75881 - Description of texture angle sources and stroke methods
- Fixed bug with empty tooltip for some ENUMs
2011-05-01 08:50:09 +00:00
696512f8cc Added tooltip note that parent curve 'Follow' needs to be enabled for track axis to do anything.
also show both enum descriptions in the tooltip (the enum properties description and the individual enums).
2011-04-28 13:01:29 +00:00
d6d2f09dd9 quiet some clang warnings & fix for bugs in exceptional cases.
- ghost C api, BLI_get_folder_version() could assign garbage values.
- pointcache ptcache_find_frames_around() had a superfluous NULL check which would have crashed anyway if actually NULL.
2011-04-23 12:57:03 +00:00
b6a1df337d tooltips were part way of the bottom of the screen (timeline play button for eg) 2011-04-05 12:05:47 +00:00
2b90eb18e2 Commit r33378 adds a red alert to search buttons which have items which are not in the list.
Disable this for pointer buttons since this was intended for vgroups & uvlayers.

Pointer buttons often reference ID's which can be in the 1000+, lookups like this on each button draw is not useful since invalid pointers here will likely crash on scene evaluation.
2011-04-05 07:13:23 +00:00
8d7c3f8a7e interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double. 2011-03-27 14:52:16 +00:00
27abad190a Bugfix #26483
Two small draw fixes to make the giant preview-image search-menu draw
correctly. (previews were drawing over a button)
2011-03-17 14:52:01 +00:00