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:
authorBastien Montagne <montagne29@wanadoo.fr>2013-10-15 17:55:06 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-10-15 17:55:06 +0400
commitef765b3606754bd639b48995900d01258c71f002 (patch)
treecbd26f1bccd41cf41c1788c81b715cf1283944f7 /source/blender/windowmanager/intern/wm_keymap.c
parent23612a8598bc4cb3ed3a21be6a9c181b8866112b (diff)
Fix [#37077] User prefs > Input and Outliner Keymaps mismatch in representation.
Remove KeyMap mode from outliner, was an old half-finished features redondant with user preferences settings... Also moved key map item's "event type to map type" and map type defines at WM level, this is too much generic to be at RNA level. Also added a check in versionning code to convert all outdated outliner modes to a valid one (seems old 'verse' ones were not handled as well). Thanks to Brecht for reviews and advices!
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index f6ba3a29344..06719514483 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -139,6 +139,29 @@ void WM_keymap_properties_reset(wmKeyMapItem *kmi, struct IDProperty *properties
wm_keymap_item_properties_set(kmi);
}
+int WM_keymap_map_type_get(wmKeyMapItem *kmi) {
+ if (ISTIMER(kmi->type)) {
+ return KMI_TYPE_TIMER;
+ }
+ if (ISKEYBOARD(kmi->type)) {
+ return KMI_TYPE_KEYBOARD;
+ }
+ if (ISTWEAK(kmi->type)) {
+ return KMI_TYPE_TWEAK;
+ }
+ if (ISMOUSE(kmi->type)) {
+ return KMI_TYPE_MOUSE;
+ }
+ if (ISNDOF(kmi->type)) {
+ return KMI_TYPE_NDOF;
+ }
+ if (kmi->type == KM_TEXTINPUT) {
+ return KMI_TYPE_TEXTINPUT;
+ }
+ return KMI_TYPE_KEYBOARD;
+}
+
+
/**************************** Keymap Diff Item *********************************
* Item in a diff keymap, used for saving diff of keymaps in user preferences */