git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -555,8 +555,8 @@ wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer,
|
|||||||
wxListWidgetCocoaImpl* c = new wxListWidgetCocoaImpl( wxpeer, scrollview, tableview, ds );
|
wxListWidgetCocoaImpl* c = new wxListWidgetCocoaImpl( wxpeer, scrollview, tableview, ds );
|
||||||
|
|
||||||
// temporary hook for dnd
|
// temporary hook for dnd
|
||||||
[tableview registerForDraggedTypes:[NSArray arrayWithObjects:
|
// [tableview registerForDraggedTypes:[NSArray arrayWithObjects:
|
||||||
NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
|
// NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
|
||||||
|
|
||||||
[ds setImplementation:c];
|
[ds setImplementation:c];
|
||||||
return c;
|
return c;
|
||||||
|
@@ -2084,8 +2084,12 @@ void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target)
|
|||||||
if( dobj )
|
if( dobj )
|
||||||
{
|
{
|
||||||
CFMutableArrayRef typesarray = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);
|
CFMutableArrayRef typesarray = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);
|
||||||
|
dobj->AddSupportedTypes(typesarray);
|
||||||
|
NSView* targetView = m_osxView;
|
||||||
|
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
|
||||||
|
targetView = [(NSScrollView*) m_osxView documentView];
|
||||||
|
|
||||||
[m_osxView registerForDraggedTypes:(NSArray*)typesarray];
|
[targetView registerForDraggedTypes:(NSArray*)typesarray];
|
||||||
CFRelease(typesarray);
|
CFRelease(typesarray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user