Cleanup: use define for key-config string
This commit is contained in:
@@ -401,7 +401,7 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
|
||||
if (!USER_VERSION_ATLEAST(280, 32)) {
|
||||
if ((userdef->flag & USER_LMOUSESELECT) ) {
|
||||
userdef->flag &= ~USER_LMOUSESELECT;
|
||||
wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, "blender");
|
||||
wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT);
|
||||
IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &(IDPropertyTemplate){ .i = 0, }, "select_mouse"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,8 @@ enum {
|
||||
WM_KEYCONFIG_IS_INITIALIZED = (1<<1),
|
||||
};
|
||||
|
||||
#define WM_KEYCONFIG_STR_DEFAULT "blender"
|
||||
|
||||
/* IME is win32 only! */
|
||||
#ifndef WIN32
|
||||
# ifdef __GNUC__
|
||||
|
||||
@@ -241,13 +241,13 @@ void WM_keyconfig_init(bContext *C)
|
||||
/* create standard key configs */
|
||||
if (wm->defaultconf == NULL) {
|
||||
/* Keep lowercase to match the preset filename. */
|
||||
wm->defaultconf = WM_keyconfig_new(wm, "blender", false);
|
||||
wm->defaultconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT, false);
|
||||
}
|
||||
if (wm->addonconf == NULL) {
|
||||
wm->addonconf = WM_keyconfig_new(wm, "blender addon", false);
|
||||
wm->addonconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT " addon", false);
|
||||
}
|
||||
if (wm->userconf == NULL) {
|
||||
wm->userconf = WM_keyconfig_new(wm, "blender user", false);
|
||||
wm->userconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT " user", false);
|
||||
}
|
||||
|
||||
/* initialize only after python init is done, for keymaps that
|
||||
|
||||
Reference in New Issue
Block a user