removing workaround for listbox, finishing drop target support, fixes #14484, see #14281

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-07-15 18:05:17 +00:00
parent 2cd819c1ea
commit d757ef939e
2 changed files with 8 additions and 4 deletions

View File

@@ -555,8 +555,8 @@ wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer,
wxListWidgetCocoaImpl* c = new wxListWidgetCocoaImpl( wxpeer, scrollview, tableview, ds );
// temporary hook for dnd
[tableview registerForDraggedTypes:[NSArray arrayWithObjects:
NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
// [tableview registerForDraggedTypes:[NSArray arrayWithObjects:
// NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
[ds setImplementation:c];
return c;

View File

@@ -2084,8 +2084,12 @@ void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target)
if( dobj )
{
CFMutableArrayRef typesarray = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);
[m_osxView registerForDraggedTypes:(NSArray*)typesarray];
dobj->AddSupportedTypes(typesarray);
NSView* targetView = m_osxView;
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
targetView = [(NSScrollView*) m_osxView documentView];
[targetView registerForDraggedTypes:(NSArray*)typesarray];
CFRelease(typesarray);
}
}