Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6eec2beef7
commit
7dd6292482
@ -31,7 +31,7 @@ wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
|
||||
XrmDatabase wxResourceDatabase;
|
||||
|
||||
/* Useful buffer, initialized in wxCommonInit */
|
||||
char *wxBuffer = (char *) NULL;
|
||||
wxChar *wxBuffer = (wxChar *) NULL;
|
||||
|
||||
/* Windows List */
|
||||
wxWindowList wxTopLevelWindows;
|
||||
|
@ -401,7 +401,7 @@ GdkAtom wxDropTarget::GetMatchingPair()
|
||||
wxDataFormat format( formatAtom );
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
wxLogDebug("Drop target: drag has format: %s", format.GetId().c_str() );
|
||||
wxLogDebug( wxT("Drop target: drag has format: %s"), format.GetId().c_str() );
|
||||
#endif // Debug
|
||||
|
||||
if (m_dataObject->IsSupportedFormat( format ))
|
||||
|
@ -165,7 +165,7 @@ void wxSpinCtrl::SetValue( const wxString& value )
|
||||
else
|
||||
{
|
||||
// invalid number - set text as is (wxMSW compatible)
|
||||
gtk_entry_set_text( GTK_ENTRY(m_widget), value.c_str() );
|
||||
gtk_entry_set_text( GTK_ENTRY(m_widget), value.mbc_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
|
||||
XrmDatabase wxResourceDatabase;
|
||||
|
||||
/* Useful buffer, initialized in wxCommonInit */
|
||||
char *wxBuffer = (char *) NULL;
|
||||
wxChar *wxBuffer = (wxChar *) NULL;
|
||||
|
||||
/* Windows List */
|
||||
wxWindowList wxTopLevelWindows;
|
||||
|
@ -401,7 +401,7 @@ GdkAtom wxDropTarget::GetMatchingPair()
|
||||
wxDataFormat format( formatAtom );
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
wxLogDebug("Drop target: drag has format: %s", format.GetId().c_str() );
|
||||
wxLogDebug( wxT("Drop target: drag has format: %s"), format.GetId().c_str() );
|
||||
#endif // Debug
|
||||
|
||||
if (m_dataObject->IsSupportedFormat( format ))
|
||||
|
@ -165,7 +165,7 @@ void wxSpinCtrl::SetValue( const wxString& value )
|
||||
else
|
||||
{
|
||||
// invalid number - set text as is (wxMSW compatible)
|
||||
gtk_entry_set_text( GTK_ENTRY(m_widget), value.c_str() );
|
||||
gtk_entry_set_text( GTK_ENTRY(m_widget), value.mbc_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ public:
|
||||
{ m_started = TRUE; return wxTimer::Start(millisecs, FALSE); }
|
||||
|
||||
virtual void Notify()
|
||||
{ wxLogTrace("Checking dial up network status."); m_dupman->CheckStatus(); }
|
||||
{ wxLogTrace(wxT("Checking dial up network status.")); m_dupman->CheckStatus(); }
|
||||
|
||||
virtual void Stop()
|
||||
{ if ( m_started ) wxTimer::Stop(); }
|
||||
@ -281,7 +281,7 @@ wxDialUpManagerImpl::Dial(const wxString &isp,
|
||||
m_IsOnline = -1;
|
||||
m_ISPname = isp;
|
||||
wxString cmd;
|
||||
if(m_ConnectCommand.Find("%s"))
|
||||
if(m_ConnectCommand.Find(wxT("%s")))
|
||||
cmd.Printf(m_ConnectCommand,m_ISPname.c_str());
|
||||
else
|
||||
cmd = m_ConnectCommand;
|
||||
@ -315,7 +315,7 @@ wxDialUpManagerImpl::HangUp(void)
|
||||
}
|
||||
m_IsOnline = -1;
|
||||
wxString cmd;
|
||||
if(m_HangUpCommand.Find("%s"))
|
||||
if(m_HangUpCommand.Find(wxT("%s")))
|
||||
cmd.Printf(m_HangUpCommand,m_ISPname.c_str(), m_DialProcess);
|
||||
else
|
||||
cmd = m_HangUpCommand;
|
||||
@ -361,11 +361,11 @@ void
|
||||
wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
|
||||
{
|
||||
/// does hostname contain a port number?
|
||||
wxString port = hostname.After(':');
|
||||
wxString port = hostname.After(wxT(':'));
|
||||
if(port.Length())
|
||||
{
|
||||
m_BeaconHost = hostname.Before(':');
|
||||
m_BeaconPort = atoi(port);
|
||||
m_BeaconHost = hostname.Before(wxT(':'));
|
||||
m_BeaconPort = wxAtoi(port);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -470,7 +470,7 @@ wxDialUpManagerImpl::CheckStatusInternal(void)
|
||||
struct sockaddr_in serv_addr;
|
||||
|
||||
m_IsOnline = 0; // assume false
|
||||
if((hp = gethostbyname(m_BeaconHost)) == NULL)
|
||||
if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL)
|
||||
return; // no DNS no net
|
||||
|
||||
serv_addr.sin_family = hp->h_addrtype;
|
||||
|
@ -62,7 +62,7 @@ static char **CreateFontList(wxChar spacing, int *nFonts)
|
||||
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-*-*"), spacing);
|
||||
|
||||
// get the list of all fonts
|
||||
return XListFonts((Display *)wxGetDisplay(), pattern, 32767, nFonts);
|
||||
return XListFonts((Display *)wxGetDisplay(), pattern.mb_str(), 32767, nFonts);
|
||||
}
|
||||
|
||||
static bool ProcessFamiliesFromFontList(wxFontEnumerator *This,
|
||||
@ -74,7 +74,7 @@ static bool ProcessFamiliesFromFontList(wxFontEnumerator *This,
|
||||
for ( int n = 0; n < nFonts; n++ )
|
||||
{
|
||||
char *font = fonts[n];
|
||||
if ( !wxString(font).Matches("-*-*-*-*-*-*-*-*-*-*-*-*-*-*") )
|
||||
if ( !wxString(font).Matches(wxT("-*-*-*-*-*-*-*-*-*-*-*-*-*-*")) )
|
||||
{
|
||||
// it's not a full font name (probably an alias)
|
||||
continue;
|
||||
@ -84,16 +84,17 @@ static bool ProcessFamiliesFromFontList(wxFontEnumerator *This,
|
||||
char *family = dash + 1;
|
||||
dash = strchr(family, '-');
|
||||
*dash = '\0'; // !NULL because Matches() above succeeded
|
||||
wxString fam(family);
|
||||
|
||||
if ( families.Index(family) == wxNOT_FOUND )
|
||||
if ( families.Index(fam) == wxNOT_FOUND )
|
||||
{
|
||||
if ( !This->OnFontFamily(family) )
|
||||
if ( !This->OnFontFamily(fam) )
|
||||
{
|
||||
// stop enumerating
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
families.Add(family);
|
||||
families.Add(fam);
|
||||
}
|
||||
//else: already seen
|
||||
}
|
||||
@ -159,7 +160,7 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
|
||||
|
||||
// get the list of all fonts
|
||||
int nFonts;
|
||||
char **fonts = XListFonts((Display *)wxGetDisplay(), pattern,
|
||||
char **fonts = XListFonts((Display *)wxGetDisplay(), pattern.mb_str(),
|
||||
32767, &nFonts);
|
||||
|
||||
if ( !fonts )
|
||||
@ -173,7 +174,7 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
|
||||
for ( int n = 0; n < nFonts; n++ )
|
||||
{
|
||||
char *font = fonts[n];
|
||||
if ( !wxString(font).Matches("-*-*-*-*-*-*-*-*-*-*-*-*-*-*") )
|
||||
if ( !wxString(font).Matches(wxT("-*-*-*-*-*-*-*-*-*-*-*-*-*-*")) )
|
||||
{
|
||||
// it's not a full font name (probably an alias)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user