projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
byte ordering changed to network ordering
[wxWidgets.git]
/
src
/
gtk1
/
clipbrd.cpp
diff --git
a/src/gtk1/clipbrd.cpp
b/src/gtk1/clipbrd.cpp
index 251709b69ec780c2ef8c1ad0e80bb500be79bac9..6faf83eaadcda452f6d4bfd3edd6e6322b1beeef 100644
(file)
--- a/
src/gtk1/clipbrd.cpp
+++ b/
src/gtk1/clipbrd.cpp
@@
-7,10
+7,13
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "clipbrd.h"
#endif
#pragma implementation "clipbrd.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/clipbrd.h"
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#if wxUSE_CLIPBOARD
@@
-37,6
+40,10
@@
GdkAtom g_clipboardAtom = 0;
GdkAtom g_targetsAtom = 0;
GdkAtom g_clipboardAtom = 0;
GdkAtom g_targetsAtom = 0;
+#if defined(__WXGTK20__) && wxUSE_UNICODE
+extern GdkAtom g_altTextAtom;
+#endif
+
// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
@@
-166,13
+173,16
@@
selection_received( GtkWidget *WXUNUSED(widget),
return;
}
return;
}
- /* make sure we got the data in the correct form (selection type).
- if so, copy data to target object */
+#if 0
+ This seems to cause problems somehow
+ // make sure we got the data in the correct form (selection type).
+ // if so, copy data to target object
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
clipboard->m_waiting = FALSE;
return;
}
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
clipboard->m_waiting = FALSE;
return;
}
+#endif
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
@@
-270,6
+280,7
@@
IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject)
wxClipboard::wxClipboard()
{
m_open = FALSE;
wxClipboard::wxClipboard()
{
m_open = FALSE;
+ m_waiting = FALSE;
m_ownsClipboard = FALSE;
m_ownsPrimarySelection = FALSE;
m_ownsClipboard = FALSE;
m_ownsPrimarySelection = FALSE;
@@
-495,6
+506,15
@@
bool wxClipboard::IsSupported( const wxDataFormat& format )
while (m_waiting) gtk_main_iteration();
while (m_waiting) gtk_main_iteration();
+#if defined(__WXGTK20__) && wxUSE_UNICODE
+ if (!m_formatSupported && format == wxDataFormat(wxDF_UNICODETEXT))
+ {
+ // Another try with plain STRING format
+ extern GdkAtom g_altTextAtom;
+ return IsSupported(g_altTextAtom);
+ }
+#endif
+
if (!m_formatSupported) return FALSE;
return TRUE;
if (!m_formatSupported) return FALSE;
return TRUE;