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:
authorCampbell Barton <ideasman42@gmail.com>2013-09-27 18:27:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-27 18:27:01 +0400
commit6c4c4f2bece9c19b81f8e2cb3185d586b4319fb4 (patch)
treece83ce285f786c3f4916a0dfdf688392c46a965e
parentc2afa5cfaf4034f07ff0336991ceeda29014c75e (diff)
replace ints with bools for keymap functions.
-rw-r--r--source/blender/windowmanager/WM_keymap.h6
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index 49e9b4fd445..121e5e401fa 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -44,7 +44,7 @@ struct EnumPropertyItem;
wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, const char *idname);
wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, const char *idname);
-int WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
+bool WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
void WM_keyconfig_free (struct wmKeyConfig *keyconf);
void WM_keyconfig_set_active(struct wmWindowManager *wm, const char *idname);
@@ -64,7 +64,7 @@ wmKeyMapItem *WM_keymap_add_item(struct wmKeyMap *keymap, const char *idname, in
wmKeyMapItem *WM_keymap_add_menu(struct wmKeyMap *keymap, const char *idname, int type,
int val, int modifier, int keymodifier);
-int WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
+bool WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
int WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, const int len);
wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int regionid);
@@ -72,7 +72,7 @@ wmKeyMap *WM_keymap_find(struct wmKeyConfig *keyconf, const char *idname, int sp
wmKeyMap *WM_keymap_find_all(const struct bContext *C, const char *idname, int spaceid, int regionid);
wmKeyMap *WM_keymap_active(struct wmWindowManager *wm, struct wmKeyMap *keymap);
wmKeyMap *WM_keymap_guess_opname(const struct bContext *C, const char *opname);
-int WM_keymap_remove(struct wmKeyConfig *keyconfig, struct wmKeyMap *keymap);
+bool WM_keymap_remove(struct wmKeyConfig *keyconfig, struct wmKeyMap *keymap);
wmKeyMapItem *WM_keymap_item_find_id(struct wmKeyMap *keymap, int id);
int WM_keymap_item_compare(struct wmKeyMapItem *k1, struct wmKeyMapItem *k2);
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 1b3ef890299..43a98a4600b 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -190,7 +190,7 @@ wmKeyConfig *WM_keyconfig_new_user(wmWindowManager *wm, const char *idname)
return keyconf;
}
-int WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
+bool WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
{
if (BLI_findindex(&wm->keyconfigs, keyconf) != -1) {
if (strncmp(U.keyconfigstr, keyconf->idname, sizeof(U.keyconfigstr)) == 0) {
@@ -201,10 +201,10 @@ int WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
BLI_remlink(&wm->keyconfigs, keyconf);
WM_keyconfig_free(keyconf);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
@@ -299,7 +299,7 @@ void WM_keymap_free(wmKeyMap *keymap)
BLI_freelistN(&keymap->items);
}
-int WM_keymap_remove(wmKeyConfig *keyconf, wmKeyMap *keymap)
+bool WM_keymap_remove(wmKeyConfig *keyconf, wmKeyMap *keymap)
{
if (BLI_findindex(&keyconf->keymaps, keymap) != -1) {
@@ -307,10 +307,10 @@ int WM_keymap_remove(wmKeyConfig *keyconf, wmKeyMap *keymap)
BLI_remlink(&keyconf->keymaps, keymap);
MEM_freeN(keymap);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
@@ -390,7 +390,7 @@ wmKeyMapItem *WM_keymap_add_menu(wmKeyMap *keymap, const char *idname, int type,
return kmi;
}
-int WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
+bool WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
{
if (BLI_findindex(&keymap->items, kmi) != -1) {
if (kmi->ptr) {
@@ -400,10 +400,10 @@ int WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
BLI_freelinkN(&keymap->items, kmi);
WM_keyconfig_update_tag(keymap, NULL);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}