- Improve print/page setup dialog (rafravago).
- Switch to GtkTooltip from deprecated GtkTooltips (Emilien Kia).
-- wxTLW generates wxEVT_MAXIMIZE
+- wxTLW generates wxEVT_MAXIMIZE.
+- Fix copying clipboard data to primary selection (David Hart).
MSW:
// get our clipboard item (depending on m_usePrimary value)
GdkAtom GTKGetClipboardAtom() const;
- // get the data object currently being used
- wxDataObject *GTKGetDataObject() { return Data(); }
+ // get the data object currently being requested
+ wxDataObject *GTKGetDataObject( GdkAtom atom );
// clear the data for the given clipboard kind
void GTKClearData(Kind kind);
if ( !clipboard )
return;
- wxDataObject * const data = clipboard->GTKGetDataObject();
+ wxDataObject * const data = clipboard->GTKGetDataObject(selection_data->selection);
if ( !data )
return;
return false;
}
+wxDataObject* wxClipboard::GTKGetDataObject( GdkAtom atom )
+{
+ if ( atom == GDK_NONE )
+ return Data();
+
+ if ( atom == GDK_SELECTION_PRIMARY )
+ {
+ wxLogTrace(TRACE_CLIPBOARD, wxT("Primary selection requested" ));
+
+ return Data( wxClipboard::Primary );
+ }
+ else if ( atom == g_clipboardAtom )
+ {
+ wxLogTrace(TRACE_CLIPBOARD, wxT("Clipboard data requested" ));
+
+ return Data( wxClipboard::Clipboard );
+ }
+ else // some other selection, we're not concerned
+ {
+ return (wxDataObject*)NULL;
+ }
+}
+
#endif // wxUSE_CLIPBOARD