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>2018-11-20 01:15:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-20 01:15:53 +0300
commit5f9de429acdb9e4df93f659b4ac8ad118f286f57 (patch)
tree441f5ddbbafa3c1b1c692098dca891a408294bc1 /source/blender
parentf0b5a9da017a00c094cb7ab8bd0aa289c921a117 (diff)
UI: show keyconfig prefs directly under preset
The keyconfig preset and it's preferences were too far apart, show the preferences under the preset in a collapsible box.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h10
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c4
2 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 58beb729892..6ae6eaed1c6 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -541,7 +541,9 @@ typedef struct UserDef {
* which are outside the scope of typical preferences. */
short app_flag;
short language;
- short userpref, viewzoom;
+ short userpref;
+ char userpref_flag;
+ char viewzoom;
int mixbufsize;
int audiodevice;
@@ -684,6 +686,12 @@ typedef enum eUserPref_Section {
USER_SECTION_LIGHT = 7,
} eUserPref_Section;
+/* UserDef.userpref_flag (State of the user preferences UI). */
+typedef enum eUserPref_SectionFlag {
+ /* Hide/expand keymap preferences. */
+ USER_SECTION_INPUT_HIDE_UI_KEYCONFIG = (1 << 0),
+} eUserPref_SectionFlag;
+
/* UserDef.flag */
typedef enum eUserPref_Flag {
USER_AUTOSAVE = (1 << 0),
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index a195ff7c1cb..f1312eeaa2c 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4523,6 +4523,10 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
+ prop = RNA_def_property(srna, "show_ui_keyconfig", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "userpref_flag", USER_SECTION_INPUT_HIDE_UI_KEYCONFIG);
+ RNA_def_property_ui_text(prop, "Show UI Key-Config", "");
+
prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
RNA_def_property_enum_items(prop, view_zoom_styles);