summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx16
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");