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-10-13 04:32:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-13 04:32:31 +0400
commiteabf7ab3351ade8415cd38d6faf2cfba79ba7400 (patch)
treede69cec6b43dcbf8bf08529f09c8bba90c508deb /source/blender/windowmanager
parent3a63adb5ff7e52084d279d64a0afc0f8067c0499 (diff)
code cleanup: utility function for getting a bool as a string.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_keymap.h2
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index 121e5e401fa..eab27286709 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -98,6 +98,8 @@ const char *WM_key_event_string(short type);
int WM_key_event_operator_id(const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, int hotkey, struct wmKeyMap **keymap_r);
char *WM_key_event_operator_string(const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, const bool strict, char *str, int len);
+const char *WM_bool_as_string(bool test);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 43a98a4600b..f6ba3a29344 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -50,6 +50,7 @@
#include "BKE_main.h"
#include "BKE_screen.h"
+#include "BLF_translation.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
@@ -1479,3 +1480,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
return km;
}
+const char *WM_bool_as_string(bool test)
+{
+ return test ? IFACE_("ON") : IFACE_("OFF");
+}