From 810324c83b62b69acbf9861055c5d53de5692c0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 10 Jun 2004 19:24:08 +0000 Subject: [PATCH] don't confuse wxDF_UNICODETEXT and wxDF_TEXT git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dataobj.cpp | 14 ++++++++++++++ src/gtk1/dataobj.cpp | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index aa7455040f..0602e78037 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -80,8 +80,15 @@ void wxDataFormat::SetType( wxDataFormatId type ) m_type = type; +#if wxUSE_UNICODE + if (m_type == wxDF_UNICODETEXT) + m_format = g_textAtom; + else if (m_type == wxDF_TEXT) + m_format = g_altTextAtom; +#else if (m_type == wxDF_TEXT || m_type == wxDF_UNICODETEXT) m_format = g_textAtom; +#endif else if (m_type == wxDF_BITMAP) m_format = g_pngAtom; @@ -111,6 +118,13 @@ void wxDataFormat::SetId( NativeFormat format ) m_format = format; if (m_format == g_textAtom) +#if wxUSE_UNICODE + m_type = wxDF_UNICODETEXT; +#else + m_type = wxDF_TEXT; +#endif + else + if (m_format == g_altTextAtom) m_type = wxDF_TEXT; else if (m_format == g_pngAtom) diff --git a/src/gtk1/dataobj.cpp b/src/gtk1/dataobj.cpp index aa7455040f..0602e78037 100644 --- a/src/gtk1/dataobj.cpp +++ b/src/gtk1/dataobj.cpp @@ -80,8 +80,15 @@ void wxDataFormat::SetType( wxDataFormatId type ) m_type = type; +#if wxUSE_UNICODE + if (m_type == wxDF_UNICODETEXT) + m_format = g_textAtom; + else if (m_type == wxDF_TEXT) + m_format = g_altTextAtom; +#else if (m_type == wxDF_TEXT || m_type == wxDF_UNICODETEXT) m_format = g_textAtom; +#endif else if (m_type == wxDF_BITMAP) m_format = g_pngAtom; @@ -111,6 +118,13 @@ void wxDataFormat::SetId( NativeFormat format ) m_format = format; if (m_format == g_textAtom) +#if wxUSE_UNICODE + m_type = wxDF_UNICODETEXT; +#else + m_type = wxDF_TEXT; +#endif + else + if (m_format == g_altTextAtom) m_type = wxDF_TEXT; else if (m_format == g_pngAtom) -- 2.50.0