Further UNicode fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-08-15 20:45:58 +00:00
parent acbeb7b368
commit 2e1d710482
8 changed files with 118 additions and 24 deletions

View File

@@ -95,7 +95,7 @@ wxDataFormatId wxDataFormat::GetType() const
wxString wxDataFormat::GetId() const
{
wxString ret( gdk_atom_name( m_format ) ); // this will convert from ascii to Unicode
wxString ret = wxString::FromAscii( gdk_atom_name( m_format ) );
return ret;
}
@@ -121,7 +121,7 @@ void wxDataFormat::SetId( const wxChar *id )
PrepareFormats();
m_type = wxDF_PRIVATE;
wxString tmp( id );
m_format = gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE ); // what is the string cast for?
m_format = gdk_atom_intern( (const char*) tmp.ToAscii(), FALSE );
}
void wxDataFormat::PrepareFormats()
@@ -134,7 +134,11 @@ void wxDataFormat::PrepareFormats()
// text/uri-list for file dnd because compatibility is not important
// here (with whom?)
if (!g_textAtom)
#if wxUSE_UNICODE
g_textAtom = gdk_atom_intern( "text/utf8", FALSE );
#else
g_textAtom = gdk_atom_intern( "STRING" /* "text/plain" */, FALSE );
#endif
if (!g_pngAtom)
g_pngAtom = gdk_atom_intern( "image/png", FALSE );
if (!g_fileAtom)