Improvements to addon-prefs key search suggested by Yang Niren.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 10 Mar 2013 07:18:43 +0000 (07:18 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 10 Mar 2013 07:18:43 +0000 (07:18 +0000)
- add accent_grave.
- strip the search string.
- add numpad numbers (currently these match regular numbers).

also remove unneeded forward declarations in path_util.c

release/scripts/startup/bl_ui/space_userpref_keymap.py
source/blender/blenlib/intern/path_util.c

index 0842a90..e800171 100644 (file)
@@ -230,12 +230,16 @@ class InputKeyMapPanel:
 
                 del enum
                 self._EVENT_TYPE_MAP.update({
+                    "`": 'ACCENT_GRAVE',
                     "*": 'NUMPAD_ASTERIX',
                     "/": 'NUMPAD_SLASH',
                     "RMB": 'RIGHTMOUSE',
                     "LMB": 'LEFTMOUSE',
                     "MMB": 'MIDDLEMOUSE',
                     })
+                self._EVENT_TYPE_MAP.update({
+                    "%d" % i: "NUMPAD_%d" % i for i in range(9)
+                    })
             # done with once off init
 
             filter_text_split = filter_text.strip()
@@ -365,8 +369,8 @@ class InputKeyMapPanel:
         col.separator()
         display_keymaps = keyconfig_utils.keyconfig_merge(kc, kc)
         filter_type = spref.filter_type
-        filter_text = spref.filter_text
-        if filter_text != "":
+        filter_text = spref.filter_text.strip()
+        if filter_text:
             filter_text = filter_text.lower()
             ok = self.draw_filtered(display_keymaps, filter_type, filter_text, col)
         else:
@@ -377,7 +381,7 @@ class InputKeyMapPanel:
         rowsub.prop(spref, "filter_type", text="")
         rowsubsub = rowsub.row(align=True)
         if not ok:
-               rowsubsub.alert = True
+            rowsubsub.alert = True
         rowsubsub.prop(spref, "filter_text", text="", icon='VIEWZOOM')
 
 
index a6f50c5..7237f7d 100644 (file)
@@ -83,9 +83,6 @@ static char bprogname[FILE_MAX];    /* full path to program executable */
 static char bprogdir[FILE_MAX];     /* full path to directory in which executable is located */
 static char btempdir[FILE_MAX];     /* temporary directory */
 
-static int add_win32_extension(char *name);
-static char *blender_version_decimal(const int ver);
-
 /* implementation */
 
 /**