Moved the reusable part of the tab/window title prefs tool tips to

TermConst.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39496 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-11-19 11:42:47 +00:00
parent 58bee54422
commit b647673227
4 changed files with 40 additions and 17 deletions
+4 -17
View File
@@ -110,30 +110,17 @@ AppearancePrefView::AppearancePrefView(const char* name,
NULL);
fTabTitle->SetModificationMessage(
new BMessage(MSG_TAB_TITLE_SETTING_CHANGED));
fTabTitle->SetToolTip(B_TRANSLATE(
fTabTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the tab titles. The following placeholders\n"
"can be used:\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\tspecified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the tab.\n"
"\t%p\t-\tThe name of the active process.\n"
"\t%%\t-\tThe character '%'."));
"can be used:\n")) << kTooTipSetTabTitlePlaceholders);
fWindowTitle = new BTextControl("windowTitle", B_TRANSLATE("Window title:"),
"", NULL);
fWindowTitle->SetModificationMessage(
new BMessage(MSG_WINDOW_TITLE_SETTING_CHANGED));
fWindowTitle->SetToolTip(B_TRANSLATE(
fWindowTitle->SetToolTip(BString(B_TRANSLATE(
"The pattern specifying the window titles. The following placeholders\n"
"can be used:\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\tcan be specified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the window.\n"
"\t%p\t-\tThe name of the active process in the current tab.\n"
"\t%t\t-\tThe title of the current tab.\n"
"\t%%\t-\tThe character '%'."));
"can be used:\n")) << kTooTipSetWindowTitlePlaceholders);
BLayoutBuilder::Group<>(this)
.SetInsets(5, 5, 5, 5)
+1
View File
@@ -26,6 +26,7 @@ Application Terminal :
TermApp.cpp
TerminalBuffer.cpp
TerminalCharClassifier.cpp
TermConst.cpp
TermParse.cpp
TermScrollView.cpp
TermView.cpp
+31
View File
@@ -0,0 +1,31 @@
/*
* Copyright 2010, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#include "TermConst.h"
#include <Catalog.h>
#undef B_TRANSLATE_CONTEXT
#define B_TRANSLATE_CONTEXT "Terminal ToolTips"
const char* const kTooTipSetTabTitlePlaceholders = B_TRANSLATE(
"\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\tspecified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the tab.\n"
"\t%p\t-\tThe name of the active process.\n"
"\t%%\t-\tThe character '%'.");
const char* const kTooTipSetWindowTitlePlaceholders = B_TRANSLATE(
"\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\tcan be specified. E.g. '%2d' for at most two components.\n"
"\t%i\t-\tThe index of the window.\n"
"\t%p\t-\tThe name of the active process in the current tab.\n"
"\t%t\t-\tThe title of the current tab.\n"
"\t%%\t-\tThe character '%'.");
+4
View File
@@ -134,6 +134,10 @@ static const char* const PREF_WARN_ON_EXIT = "Warn on exit";
static const char* const PREF_TAB_TITLE = "Tab title";
static const char* const PREF_WINDOW_TITLE = "Window title";
// shared strings
extern const char* const kTooTipSetTabTitlePlaceholders;
extern const char* const kTooTipSetWindowTitlePlaceholders;
// Color type
enum {
TEXT_FOREGROUND_COLOR,