diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2011-01-07 13:57:46 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2011-10-23 20:18:14 (GMT) |
commit | ceff6ec5254bbee898ac6a193624dba5ccf18e56 (patch) | |
tree | 841729e02124b26000f46fa5082bbe823a2f60de /Source/CursesDialog/cmCursesMainForm.cxx | |
parent | 19da10629d96333b2cdae8c0fa926a354fc9d79e (diff) | |
download | CMake-ceff6ec5254bbee898ac6a193624dba5ccf18e56.zip CMake-ceff6ec5254bbee898ac6a193624dba5ccf18e56.tar.gz CMake-ceff6ec5254bbee898ac6a193624dba5ccf18e56.tar.bz2 |
ccmake: Factor toggle key help instructions.
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 735854d..6c7627f 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -427,15 +427,13 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) { sprintf(firstLine, "Press [c] to configure "); } - if (this->AdvancedMode) - { - sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently On)"); - } - else - { - sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)"); - } - + { + const char* toggleKeyInstruction = + "Press [t] to toggle advanced mode (Currently %s)"; + sprintf(thirdLine, + toggleKeyInstruction, + this->AdvancedMode ? "On" : "Off"); + } sprintf(secondLine, "Press [h] for help " "Press [q] to quit without generating"); |