#include "gdk/gdk.h"
+
+//-------------------------------------------------------------------------
+// global data
+//-------------------------------------------------------------------------
+
+GdkAtom g_textAtom = 0;
+
//-------------------------------------------------------------------------
// wxDataFormat
//-------------------------------------------------------------------------
wxDataFormat::wxDataFormat()
{
+ if (!g_textAtom) g_textAtom = gdk_atom_intern( "text/plain", FALSE );
m_type = wxDF_INVALID;
m_hasAtom = FALSE;
m_atom = (GdkAtom) 0;
wxDataFormat::wxDataFormat( wxDataType type )
{
+ if (!g_textAtom) g_textAtom = gdk_atom_intern( "text/plain", FALSE );
SetType( type );
}
wxDataFormat::wxDataFormat( const wxString &id )
{
+ if (!g_textAtom) g_textAtom = gdk_atom_intern( "text/plain", FALSE );
SetId( id );
}
wxDataFormat::wxDataFormat( wxDataFormat &format )
{
+ if (!g_textAtom) g_textAtom = gdk_atom_intern( "text/plain", FALSE );
m_type = format.GetType();
m_id = format.GetId();
m_hasAtom = TRUE;
wxDataFormat::wxDataFormat( const GdkAtom atom )
{
+ if (!g_textAtom) g_textAtom = gdk_atom_intern( "text/plain", FALSE );
m_hasAtom = TRUE;
m_atom = atom;
- if (m_atom == GDK_TARGET_STRING)
+ if (m_atom == g_textAtom)
{
m_type = wxDF_TEXT;
} else
if (m_type == wxDF_TEXT)
{
- m_id = "STRING";
+ m_id = "text/plain";
}
else
if (m_type == wxDF_BITMAP)
if (m_type == wxDF_TEXT)
{
- m_atom = GDK_TARGET_STRING;
- }
+ m_atom = g_textAtom;
+ }
else
if (m_type == wxDF_BITMAP)
{