Minor Terminal fixes

In the Terminal settings window, the pop-up help text for
"Tab title:" had two entries for "%% - The character '%'.".
Removed one of the entries.

Fixed the spelling of some constants: kTooTip* vs kToolTip*

Changing the window title and tab title directly will now
show the same tool-tips as the Terminal settings window.

Change-Id: Ic36cc1f8af0305b757105a229203115efee870c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4989
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Máximo Castañeda <[email protected]>
This commit is contained in:
Zakero
2022-02-27 19:10:39 +00:00
committed by Máximo Castañeda
parent 7753e163c9
commit 11dc1393cf
4 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ AppearancePrefView::AppearancePrefView(const char* name,
new BMessage(MSG_TAB_TITLE_SETTING_CHANGED)); new BMessage(MSG_TAB_TITLE_SETTING_CHANGED));
fTabTitle->SetToolTip(BString(B_TRANSLATE( fTabTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the tab titles. The following placeholders\n" "The pattern specifying the tab titles. The following placeholders\n"
"can be used:")) << "\n" << kTooTipSetTabTitlePlaceholders "can be used:")) << "\n" << kToolTipSetTabTitlePlaceholders
<< "\n" << kToolTipCommonTitlePlaceholders); << "\n" << kToolTipCommonTitlePlaceholders);
fWindowTitle = new BTextControl("windowTitle", B_TRANSLATE("Window title:"), fWindowTitle = new BTextControl("windowTitle", B_TRANSLATE("Window title:"),
@@ -136,7 +136,7 @@ AppearancePrefView::AppearancePrefView(const char* name,
new BMessage(MSG_WINDOW_TITLE_SETTING_CHANGED)); new BMessage(MSG_WINDOW_TITLE_SETTING_CHANGED));
fWindowTitle->SetToolTip(BString(B_TRANSLATE( fWindowTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the window titles. The following placeholders\n" "The pattern specifying the window titles. The following placeholders\n"
"can be used:")) << "\n" << kTooTipSetWindowTitlePlaceholders "can be used:")) << "\n" << kToolTipSetWindowTitlePlaceholders
<< "\n" << kToolTipCommonTitlePlaceholders); << "\n" << kToolTipCommonTitlePlaceholders);
BLayoutBuilder::Group<>(this) BLayoutBuilder::Group<>(this)
+3 -4
View File
@@ -13,16 +13,15 @@
#define B_TRANSLATION_CONTEXT "Terminal ToolTips" #define B_TRANSLATION_CONTEXT "Terminal ToolTips"
const char* const kTooTipSetTabTitlePlaceholders = B_TRANSLATE( const char* const kToolTipSetTabTitlePlaceholders = B_TRANSLATE(
"\t%d\t-\tThe current working directory of the active process.\n" "\t%d\t-\tThe current working directory of the active process.\n"
"\t\t\tOptionally the maximum number of path components can be\n" "\t\t\tOptionally the maximum number of path components can be\n"
"\t\t\tspecified. E.g. '%2d' for at most two components.\n" "\t\t\tspecified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the tab.\n" "\t%i\t-\tThe index of the tab.\n"
"\t%e\t-\tThe encoding of the current tab. Not shown for UTF-8.\n" "\t%e\t-\tThe encoding of the current tab. Not shown for UTF-8.\n"
"\t%p\t-\tThe name of the active process.\n" "\t%p\t-\tThe name of the active process.");
"\t%%\t-\tThe character '%'.");
const char* const kTooTipSetWindowTitlePlaceholders = B_TRANSLATE( const char* const kToolTipSetWindowTitlePlaceholders = B_TRANSLATE(
"\t%d\t-\tThe current working directory of the active process in the\n" "\t%d\t-\tThe current working directory of the active process in the\n"
"\t\t\tcurrent tab. Optionally the maximum number of path components\n" "\t\t\tcurrent tab. Optionally the maximum number of path components\n"
"\t\t\tcan be specified. E.g. '%2d' for at most two components.\n" "\t\t\tcan be specified. E.g. '%2d' for at most two components.\n"
+2 -2
View File
@@ -146,8 +146,8 @@ static const char* const PREF_TAB_TITLE = "Tab title";
static const char* const PREF_WINDOW_TITLE = "Window title"; static const char* const PREF_WINDOW_TITLE = "Window title";
// shared strings // shared strings
extern const char* const kTooTipSetTabTitlePlaceholders; extern const char* const kToolTipSetTabTitlePlaceholders;
extern const char* const kTooTipSetWindowTitlePlaceholders; extern const char* const kToolTipSetWindowTitlePlaceholders;
extern const char* const kToolTipCommonTitlePlaceholders; extern const char* const kToolTipCommonTitlePlaceholders;
extern const char* const kShellEscapeCharacters; extern const char* const kShellEscapeCharacters;
+4 -2
View File
@@ -1913,7 +1913,8 @@ TermWindow::_OpenSetTabTitleDialog(int32 index)
BString toolTip = BString(B_TRANSLATE( BString toolTip = BString(B_TRANSLATE(
"The pattern specifying the current tab title. The following " "The pattern specifying the current tab title. The following "
"placeholders\n" "placeholders\n"
"can be used:\n")) << kTooTipSetTabTitlePlaceholders; "can be used:\n")) << kToolTipSetTabTitlePlaceholders << "\n"
<< kToolTipCommonTitlePlaceholders;
fSetTabTitleDialog = new SetTitleDialog( fSetTabTitleDialog = new SetTitleDialog(
B_TRANSLATE("Set tab title"), B_TRANSLATE("Tab title:"), B_TRANSLATE("Set tab title"), B_TRANSLATE("Tab title:"),
toolTip); toolTip);
@@ -1942,7 +1943,8 @@ TermWindow::_OpenSetWindowTitleDialog()
BString toolTip = BString(B_TRANSLATE( BString toolTip = BString(B_TRANSLATE(
"The pattern specifying the window title. The following placeholders\n" "The pattern specifying the window title. The following placeholders\n"
"can be used:\n")) << kTooTipSetTabTitlePlaceholders; "can be used:\n")) << kToolTipSetWindowTitlePlaceholders << "\n"
<< kToolTipCommonTitlePlaceholders;
fSetWindowTitleDialog = new SetTitleDialog(B_TRANSLATE("Set window title"), fSetWindowTitleDialog = new SetTitleDialog(B_TRANSLATE("Set window title"),
B_TRANSLATE("Window title:"), toolTip); B_TRANSLATE("Window title:"), toolTip);