Files
haiku-beta6/src/apps/terminal/ShellInfo.cpp
T
Siarzhuk Zharski 19bfeaa786 Support %e (cur.encoding) for Terminal titles
Optional parameter %e to indicate current tab view encoding in the
window title. It is not shown in case tab view encoding is default
UTF-8. Inspired by Sergei Reznikov. Thanks.
2013-03-29 16:26:00 +01:00

36 lines
616 B
C++

/*
* Copyright 2010, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#include "ShellInfo.h"
#include <CharacterSet.h>
#include <CharacterSetRoster.h>
#include "TermConst.h"
using namespace BPrivate ; // BCharacterSet stuff
ShellInfo::ShellInfo()
:
fProcessID(-1),
fIsDefaultShell(true),
fEncoding(M_UTF8),
fEncodingName("UTF-8")
{
}
void
ShellInfo::SetEncoding(int encoding)
{
fEncoding = encoding;
const BCharacterSet* charset
= BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding);
fEncodingName = charset ? charset->GetName() : "UTF-8";
}