merged the confllict resolution (I've fixed the m_format bug independently); no real changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -84,21 +84,20 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
|||||||
m_format = kDragFlavorTypeHFS ;
|
m_format = kDragFlavorTypeHFS ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_format = '????' ;
|
|
||||||
wxFAIL_MSG( wxT("invalid dataformat") );
|
wxFAIL_MSG( wxT("invalid dataformat") );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDataFormatId wxDataFormat::GetType() const
|
m_format = '????';
|
||||||
{
|
}
|
||||||
return m_type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxDataFormat::GetId() const
|
wxString wxDataFormat::GetId() const
|
||||||
{
|
{
|
||||||
char text[5] ;
|
// note that m_format is not a pointer to string, it *is* itself a 4
|
||||||
strncpy( text , (char*) &m_format , 4 ) ;
|
// character string
|
||||||
text[4] = 0 ;
|
char text[5] ;
|
||||||
|
strncpy( text , (char*) &m_format , 4 ) ;
|
||||||
|
text[4] = 0 ;
|
||||||
|
|
||||||
return wxString::FromAscii( text ) ;
|
return wxString::FromAscii( text ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,14 +107,11 @@ void wxDataFormat::SetId( NativeFormat format )
|
|||||||
|
|
||||||
if (m_format == kScrapFlavorTypeText)
|
if (m_format == kScrapFlavorTypeText)
|
||||||
m_type = wxDF_TEXT;
|
m_type = wxDF_TEXT;
|
||||||
else
|
else if (m_format == kScrapFlavorTypeUnicode )
|
||||||
if (m_format == kScrapFlavorTypeUnicode )
|
|
||||||
m_type = wxDF_UNICODETEXT;
|
m_type = wxDF_UNICODETEXT;
|
||||||
else
|
else if (m_format == kScrapFlavorTypePicture)
|
||||||
if (m_format == kScrapFlavorTypePicture)
|
|
||||||
m_type = wxDF_BITMAP;
|
m_type = wxDF_BITMAP;
|
||||||
else
|
else if (m_format == kDragFlavorTypeHFS )
|
||||||
if (m_format == kDragFlavorTypeHFS )
|
|
||||||
m_type = wxDF_FILENAME;
|
m_type = wxDF_FILENAME;
|
||||||
else
|
else
|
||||||
m_type = wxDF_PRIVATE;
|
m_type = wxDF_PRIVATE;
|
||||||
@@ -123,8 +119,6 @@ void wxDataFormat::SetId( NativeFormat format )
|
|||||||
|
|
||||||
void wxDataFormat::SetId( const wxChar* zId )
|
void wxDataFormat::SetId( const wxChar* zId )
|
||||||
{
|
{
|
||||||
wxString tmp(zId);
|
|
||||||
|
|
||||||
m_type = wxDF_PRIVATE;
|
m_type = wxDF_PRIVATE;
|
||||||
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
|
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
|
||||||
}
|
}
|
||||||
|
@@ -84,21 +84,20 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
|||||||
m_format = kDragFlavorTypeHFS ;
|
m_format = kDragFlavorTypeHFS ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_format = '????' ;
|
|
||||||
wxFAIL_MSG( wxT("invalid dataformat") );
|
wxFAIL_MSG( wxT("invalid dataformat") );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDataFormatId wxDataFormat::GetType() const
|
m_format = '????';
|
||||||
{
|
}
|
||||||
return m_type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxDataFormat::GetId() const
|
wxString wxDataFormat::GetId() const
|
||||||
{
|
{
|
||||||
char text[5] ;
|
// note that m_format is not a pointer to string, it *is* itself a 4
|
||||||
strncpy( text , (char*) &m_format , 4 ) ;
|
// character string
|
||||||
text[4] = 0 ;
|
char text[5] ;
|
||||||
|
strncpy( text , (char*) &m_format , 4 ) ;
|
||||||
|
text[4] = 0 ;
|
||||||
|
|
||||||
return wxString::FromAscii( text ) ;
|
return wxString::FromAscii( text ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,14 +107,11 @@ void wxDataFormat::SetId( NativeFormat format )
|
|||||||
|
|
||||||
if (m_format == kScrapFlavorTypeText)
|
if (m_format == kScrapFlavorTypeText)
|
||||||
m_type = wxDF_TEXT;
|
m_type = wxDF_TEXT;
|
||||||
else
|
else if (m_format == kScrapFlavorTypeUnicode )
|
||||||
if (m_format == kScrapFlavorTypeUnicode )
|
|
||||||
m_type = wxDF_UNICODETEXT;
|
m_type = wxDF_UNICODETEXT;
|
||||||
else
|
else if (m_format == kScrapFlavorTypePicture)
|
||||||
if (m_format == kScrapFlavorTypePicture)
|
|
||||||
m_type = wxDF_BITMAP;
|
m_type = wxDF_BITMAP;
|
||||||
else
|
else if (m_format == kDragFlavorTypeHFS )
|
||||||
if (m_format == kDragFlavorTypeHFS )
|
|
||||||
m_type = wxDF_FILENAME;
|
m_type = wxDF_FILENAME;
|
||||||
else
|
else
|
||||||
m_type = wxDF_PRIVATE;
|
m_type = wxDF_PRIVATE;
|
||||||
@@ -123,8 +119,6 @@ void wxDataFormat::SetId( NativeFormat format )
|
|||||||
|
|
||||||
void wxDataFormat::SetId( const wxChar* zId )
|
void wxDataFormat::SetId( const wxChar* zId )
|
||||||
{
|
{
|
||||||
wxString tmp(zId);
|
|
||||||
|
|
||||||
m_type = wxDF_PRIVATE;
|
m_type = wxDF_PRIVATE;
|
||||||
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
|
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user