More wxT() macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -584,7 +584,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
bookFull = fn.GetFullPath( wxPATH_UNIX );
|
||||
#else
|
||||
if (wxIsAbsolutePath(book)) bookFull = book;
|
||||
else bookFull = wxGetCwd() + "/" + book;
|
||||
else bookFull = wxGetCwd() + wxT("/") + book;
|
||||
#endif
|
||||
|
||||
fi = fsys.OpenFile(bookFull);
|
||||
@@ -607,7 +607,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
{
|
||||
lineptr = ReadLine(lineptr, linebuf, 300);
|
||||
|
||||
for (wxChar *ch = linebuf; *ch != '\0' && *ch != '='; ch++)
|
||||
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
|
||||
*ch = tolower(*ch);
|
||||
|
||||
if (wxStrstr(linebuf, _T("title=")) == linebuf)
|
||||
|
@@ -45,7 +45,7 @@ void wxPrivate_ReadString(wxString& str, wxInputStream* s)
|
||||
s->Read(buffer, bufSize);
|
||||
lastRead = s->LastRead();
|
||||
buffer[lastRead] = 0;
|
||||
str.Append(buffer);
|
||||
str.Append( wxString::FromAscii(buffer) ); // TODO: What encoding ?
|
||||
}
|
||||
while(lastRead == bufSize);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ void wxPrivate_ReadString(wxString& str, wxInputStream* s)
|
||||
char* src = new char[streamSize+1];
|
||||
s->Read(src, streamSize);
|
||||
src[streamSize] = 0;
|
||||
str = src;
|
||||
str = wxString::FromAscii( src); // TODO: What encoding ?
|
||||
delete [] src;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file) const
|
||||
doc.Replace(wxT("&"), wxT("&"), TRUE);
|
||||
doc.Replace(wxT("<"), wxT("<"), TRUE);
|
||||
doc.Replace(wxT(">"), wxT(">"), TRUE);
|
||||
doc2 = "<HTML><BODY><PRE>\n" + doc + "\n</PRE></BODY></HTML>";
|
||||
doc2 = wxT("<HTML><BODY><PRE>\n") + doc + wxT("\n</PRE></BODY></HTML>");
|
||||
return doc2;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,8 @@ bool wxHtmlFilterImage::CanRead(const wxFSFile& file) const
|
||||
|
||||
wxString wxHtmlFilterImage::ReadFile(const wxFSFile& file) const
|
||||
{
|
||||
return ("<HTML><BODY><IMG SRC=\"" + file.GetLocation() + "\"></BODY></HTML>");
|
||||
wxString res = wxT("<HTML><BODY><IMG SRC=\"") + file.GetLocation() + wxT("\"></BODY></HTML>");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -34,7 +34,7 @@ FORCE_LINK_ME(m_dflist)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD")
|
||||
TAG_HANDLER_BEGIN(DEFLIST, wxT("DL,DT,DD") )
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -31,7 +31,7 @@
|
||||
FORCE_LINK_ME(m_fonts)
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(FONT, "FONT")
|
||||
TAG_HANDLER_BEGIN(FONT, wxT("FONT") )
|
||||
|
||||
TAG_HANDLER_VARS
|
||||
wxArrayString m_Faces;
|
||||
@@ -112,7 +112,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
||||
TAG_HANDLER_END(FONT)
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE")
|
||||
TAG_HANDLER_BEGIN(FACES_U, wxT("U,STRIKE"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -135,7 +135,7 @@ TAG_HANDLER_END(FACES_U)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(FACES_B, "B,STRONG")
|
||||
TAG_HANDLER_BEGIN(FACES_B, wxT("B,STRONG"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -158,7 +158,7 @@ TAG_HANDLER_END(FACES_B)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(FACES_I, "I,EM,CITE,ADDRESS")
|
||||
TAG_HANDLER_BEGIN(FACES_I, wxT("I,EM,CITE,ADDRESS"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -181,7 +181,7 @@ TAG_HANDLER_END(FACES_I)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(FACES_TT, "TT,CODE,KBD,SAMP")
|
||||
TAG_HANDLER_BEGIN(FACES_TT, wxT("TT,CODE,KBD,SAMP"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ TAG_HANDLER_END(FACES_TT)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
|
||||
TAG_HANDLER_BEGIN(Hx, wxT("H1,H2,H3,H4,H5,H6"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
|
||||
TAG_HANDLER_END(Hx)
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(BIGSMALL, "BIG,SMALL")
|
||||
TAG_HANDLER_BEGIN(BIGSMALL, wxT("BIG,SMALL"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -69,7 +69,7 @@ void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXU
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(HR, "HR")
|
||||
TAG_HANDLER_BEGIN(HR, wxT("HR"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -611,7 +611,7 @@ wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const
|
||||
// tag handler
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
|
||||
TAG_HANDLER_BEGIN(IMG, wxT("IMG,MAP,AREA"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -31,7 +31,7 @@
|
||||
FORCE_LINK_ME(m_layout)
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(P, "P")
|
||||
TAG_HANDLER_BEGIN(P, wxT("P"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ TAG_HANDLER_END(P)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(BR, "BR")
|
||||
TAG_HANDLER_BEGIN(BR, wxT("BR"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ TAG_HANDLER_END(BR)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(CENTER, "CENTER")
|
||||
TAG_HANDLER_BEGIN(CENTER, wxT("CENTER"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ TAG_HANDLER_END(CENTER)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(DIV, "DIV")
|
||||
TAG_HANDLER_BEGIN(DIV, wxT("DIV"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ TAG_HANDLER_END(DIV)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(TITLE, "TITLE")
|
||||
TAG_HANDLER_BEGIN(TITLE, wxT("TITLE"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -167,7 +167,7 @@ TAG_HANDLER_END(TITLE)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(BODY, "BODY")
|
||||
TAG_HANDLER_BEGIN(BODY, wxT("BODY"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ TAG_HANDLER_END(BODY)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE")
|
||||
TAG_HANDLER_BEGIN(BLOCKQUOTE, wxT("BLOCKQUOTE"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -48,23 +48,23 @@ class wxHtmlAnchorCell : public wxHtmlCell
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(A, "A")
|
||||
TAG_HANDLER_BEGIN(A, wxT("A"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
if (tag.HasParam("NAME"))
|
||||
if (tag.HasParam( wxT("NAME") ))
|
||||
{
|
||||
m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam("NAME")));
|
||||
m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam( wxT("NAME") )));
|
||||
}
|
||||
|
||||
if (tag.HasParam("HREF"))
|
||||
if (tag.HasParam( wxT("HREF") ))
|
||||
{
|
||||
wxHtmlLinkInfo oldlnk = m_WParser->GetLink();
|
||||
wxColour oldclr = m_WParser->GetActualColor();
|
||||
int oldund = m_WParser->GetFontUnderlined();
|
||||
wxString name(tag.GetParam("HREF")), target;
|
||||
wxString name(tag.GetParam( wxT("HREF") )), target;
|
||||
|
||||
if (tag.HasParam("TARGET")) target = tag.GetParam("TARGET");
|
||||
if (tag.HasParam( wxT("TARGET") )) target = tag.GetParam( wxT("TARGET") );
|
||||
m_WParser->SetActualColor(m_WParser->GetLinkColor());
|
||||
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(m_WParser->GetLinkColor()));
|
||||
m_WParser->SetFontUnderlined(TRUE);
|
||||
|
@@ -70,7 +70,7 @@ void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
|
||||
TAG_HANDLER_BEGIN(OLULLI, wxT("OL,UL,LI") )
|
||||
|
||||
TAG_HANDLER_VARS
|
||||
int m_Numbering;
|
||||
|
@@ -34,7 +34,7 @@ FORCE_LINK_ME(m_meta)
|
||||
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(META, "META")
|
||||
TAG_HANDLER_BEGIN(META, wxT("META") )
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -68,7 +68,7 @@ static wxString LINKAGEMODE HtmlizeWhitespaces(const wxString& str)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(PRE, "PRE")
|
||||
TAG_HANDLER_BEGIN(PRE, wxT("PRE"))
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
|
@@ -30,7 +30,7 @@
|
||||
FORCE_LINK_ME(m_style)
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(STYLE, "STYLE")
|
||||
TAG_HANDLER_BEGIN(STYLE, wxT("STYLE"))
|
||||
|
||||
TAG_HANDLER_PROC(WXUNUSED(tag))
|
||||
{
|
||||
|
@@ -519,7 +519,7 @@ void wxHtmlTableCell::Layout(int w)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
|
||||
TAG_HANDLER_BEGIN(TABLE, wxT("TABLE,TR,TD,TH"))
|
||||
|
||||
TAG_HANDLER_VARS
|
||||
wxHtmlTableCell* m_Table;
|
||||
|
@@ -72,7 +72,7 @@ wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser()
|
||||
#else
|
||||
static int default_sizes[7] = {10, 12, 14, 16, 19, 24, 32};
|
||||
#endif
|
||||
SetFonts("", "", default_sizes);
|
||||
SetFonts(wxT(""), wxT(""), default_sizes);
|
||||
}
|
||||
|
||||
// fill in wxHtmlParser's tables:
|
||||
@@ -138,18 +138,18 @@ void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const
|
||||
void wxHtmlWinParser::InitParser(const wxString& source)
|
||||
{
|
||||
wxHtmlParser::InitParser(source);
|
||||
wxASSERT_MSG(m_DC != NULL, _T("no DC assigned to wxHtmlWinParser!!"));
|
||||
wxASSERT_MSG(m_DC != NULL, wxT("no DC assigned to wxHtmlWinParser!!"));
|
||||
|
||||
m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE;
|
||||
m_FontSize = 3; //default one
|
||||
CreateCurrentFont(); // we're selecting default font into
|
||||
m_DC->GetTextExtent("H", &m_CharWidth, &m_CharHeight);
|
||||
m_DC->GetTextExtent( wxT("H"), &m_CharWidth, &m_CharHeight);
|
||||
/* NOTE : we're not using GetCharWidth/Height() because
|
||||
of differences under X and win
|
||||
*/
|
||||
|
||||
m_UseLink = FALSE;
|
||||
m_Link = wxHtmlLinkInfo("", "");
|
||||
m_Link = wxHtmlLinkInfo( wxT(""), wxT("") );
|
||||
m_LinkColor.Set(0, 0, 0xFF);
|
||||
m_ActualColor.Set(0, 0, 0);
|
||||
m_Align = wxHTML_ALIGN_LEFT;
|
||||
|
@@ -676,26 +676,26 @@ wxDialUpManagerImpl::CheckIfconfig()
|
||||
wxASSERT_MSG( m_IfconfigPath.length(),
|
||||
_T("can't use ifconfig if it wasn't found") );
|
||||
|
||||
wxString tmpfile = wxGetTempFileName("_wxdialuptest");
|
||||
wxString cmd = "/bin/sh -c \'";
|
||||
wxString tmpfile = wxGetTempFileName( wxT("_wxdialuptest") );
|
||||
wxString cmd = wxT("/bin/sh -c \'");
|
||||
cmd << m_IfconfigPath;
|
||||
#if defined(__SOLARIS__) || defined (__SUNOS__)
|
||||
// need to add -a flag
|
||||
cmd << " -a";
|
||||
cmd << wxT(" -a");
|
||||
#elif defined(__LINUX__) || defined(__SGI__)
|
||||
// nothing to be added to ifconfig
|
||||
#elif defined(__FREEBSD__) || defined(__DARWIN__)
|
||||
// add -l flag
|
||||
cmd << " -l";
|
||||
cmd << wxT(" -l");
|
||||
#elif defined(__HPUX__)
|
||||
// VZ: a wild guess (but without it, ifconfig fails completely)
|
||||
cmd << _T(" ppp0");
|
||||
cmd << wxT(" ppp0");
|
||||
#else
|
||||
# pragma warning "No ifconfig information for this OS."
|
||||
m_CanUseIfconfig = 0;
|
||||
return -1;
|
||||
#endif
|
||||
cmd << " >" << tmpfile << '\'';
|
||||
cmd << wxT(" >") << tmpfile << wxT('\'');
|
||||
/* I tried to add an option to wxExecute() to not close stdout,
|
||||
so we could let ifconfig write directly to the tmpfile, but
|
||||
this does not work. That should be faster, as it doesn<73>t call
|
||||
@@ -759,13 +759,13 @@ wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckPing()
|
||||
if(m_CanUsePing == -1) // unknown
|
||||
{
|
||||
#ifdef __VMS
|
||||
if(wxFileExists("SYS$SYSTEM:TCPIP$PING.EXE"))
|
||||
m_PingPath = "$SYS$SYSTEM:TCPIP$PING";
|
||||
if (wxFileExists( wxT("SYS$SYSTEM:TCPIP$PING.EXE") ))
|
||||
m_PingPath = wxT("$SYS$SYSTEM:TCPIP$PING");
|
||||
#else
|
||||
if(wxFileExists("/bin/ping"))
|
||||
m_PingPath = "/bin/ping";
|
||||
else if(wxFileExists("/usr/sbin/ping"))
|
||||
m_PingPath = "/usr/sbin/ping";
|
||||
if (wxFileExists( wxT("/bin/ping") ))
|
||||
m_PingPath = wxT("/bin/ping");
|
||||
else if (wxFileExists( wxT("/usr/sbin/ping") ))
|
||||
m_PingPath = wxT("/usr/sbin/ping");
|
||||
#endif
|
||||
if (!m_PingPath)
|
||||
{
|
||||
@@ -782,13 +782,13 @@ wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckPing()
|
||||
wxLogNull ln; // suppress all error messages
|
||||
wxASSERT(m_PingPath.length());
|
||||
wxString cmd;
|
||||
cmd << m_PingPath << ' ';
|
||||
cmd << m_PingPath << wxT(' ');
|
||||
#if defined(__SOLARIS__) || defined (__SUNOS__)
|
||||
// nothing to add to ping command
|
||||
#elif defined(__LINUX__) || defined (__BSD__) || defined( __VMS )
|
||||
cmd << "-c 1 "; // only ping once
|
||||
cmd << wxT("-c 1 "); // only ping once
|
||||
#elif defined(__HPUX__)
|
||||
cmd << "64 1 "; // only ping once (need also specify the packet size)
|
||||
cmd << wxT("64 1 "); // only ping once (need also specify the packet size)
|
||||
#else
|
||||
# pragma warning "No Ping information for this OS."
|
||||
m_CanUsePing = 0;
|
||||
|
@@ -925,12 +925,12 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
|
||||
wxArrayString sExts;
|
||||
wxString mimetype, mime_desc, strIcon;
|
||||
|
||||
int nIndex = file.pIndexOf ("MimeType=");
|
||||
int nIndex = file.pIndexOf( wxT("MimeType=") );
|
||||
if (nIndex == wxNOT_FOUND)
|
||||
{
|
||||
// construct mimetype from the directory name and the basename of the
|
||||
// file (it always has .kdelnk extension)
|
||||
mimetype << subdir << _T('/') << filename.BeforeLast(_T('.'));
|
||||
mimetype << subdir << wxT('/') << filename.BeforeLast( wxT('.') );
|
||||
}
|
||||
else mimetype = file.GetCmd (nIndex);
|
||||
|
||||
@@ -1097,15 +1097,15 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir)
|
||||
wxArrayString icondirs;
|
||||
|
||||
// settings in ~/.kde have maximal priority
|
||||
dirs.Add(wxGetHomeDir() + _T("/.kde/share"));
|
||||
icondirs.Add(wxGetHomeDir() + _T("/.kde/share/icons/"));
|
||||
dirs.Add(wxGetHomeDir() + wxT("/.kde/share"));
|
||||
icondirs.Add(wxGetHomeDir() + wxT("/.kde/share/icons/"));
|
||||
|
||||
// the variable KDEDIR is set when KDE is running
|
||||
const char *kdedir = getenv("KDEDIR");
|
||||
const wxChar *kdedir = wxGetenv( wxT("KDEDIR") );
|
||||
if ( kdedir )
|
||||
{
|
||||
dirs.Add(wxString(kdedir) + _T("/share"));
|
||||
icondirs.Add(wxString(kdedir) + _T("/share/icons/"));
|
||||
dirs.Add( wxString(kdedir) + wxT("/share") );
|
||||
icondirs.Add( wxString(kdedir) + wxT("/share/icons/") );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -952,7 +952,7 @@ wxString wxGetOsDescription()
|
||||
#ifndef WXWIN_OS_DESCRIPTION
|
||||
#error WXWIN_OS_DESCRIPTION should be defined in config.h by configure
|
||||
#else
|
||||
return WXWIN_OS_DESCRIPTION;
|
||||
return wxString::FromAscii( WXWIN_OS_DESCRIPTION );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user