@@ -1262,73 +1262,8 @@ static bool fetch_dragboard(MCPlatformPasteboardFlavor p_flavor, void*& r_data,
12621262 return fetch_pasteboard (s_local_dragboard, p_flavor, r_data, r_data_size);
12631263}
12641264
1265- MCDragAction MCScreenDC::dodragdrop (Window w, MCPasteboard *p_pasteboard, MCDragActionSet p_allowed_actions, MCImage *p_image, const MCPoint* p_image_offset)
1265+ MCDragAction MCScreenDC::dodragdrop (Window w, MCDragActionSet p_allowed_actions, MCImage *p_image, const MCPoint* p_image_offset)
12661266{
1267- // ///////
1268-
1269- MCPlatformPasteboardRef t_dragboard;
1270- MCPlatformGetDragboard (t_dragboard);
1271-
1272- MCPlatformPasteboardClear (t_dragboard);
1273-
1274- // COCOA-TODO: Duplicate code - needs refactored along with code in setclipboard().
1275-
1276- MCTransferType *t_types;
1277- size_t t_type_count;
1278- if (!p_pasteboard -> Query (t_types, t_type_count))
1279- {
1280- t_type_count = 0 ;
1281- t_types = nil;
1282- }
1283-
1284- s_local_dragboard = p_pasteboard;
1285-
1286- for (uindex_t i = 0 ; i < t_type_count; i++)
1287- {
1288- MCPlatformPasteboardFlavor t_flavors[2 ];
1289- uindex_t t_flavor_count;
1290- t_flavor_count = 0 ;
1291-
1292- switch (t_types[i])
1293- {
1294- case TRANSFER_TYPE_TEXT:
1295- case TRANSFER_TYPE_UNICODE_TEXT:
1296- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorUTF8 ;
1297- break ;
1298- case TRANSFER_TYPE_STYLED_TEXT:
1299- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorRTF ;
1300- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorUTF8 ;
1301- break ;
1302- case TRANSFER_TYPE_IMAGE:
1303- {
1304- MCAutoDataRef t_data;
1305- if (p_pasteboard -> Fetch (TRANSFER_TYPE_IMAGE, &t_data))
1306- {
1307- if (MCImageDataIsPNG (*t_data))
1308- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorPNG ;
1309- if (MCImageDataIsGIF (*t_data))
1310- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorGIF ;
1311- if (MCImageDataIsJPEG (*t_data))
1312- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorJPEG ;
1313- }
1314- }
1315- break ;
1316- case TRANSFER_TYPE_FILES:
1317- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorFiles ;
1318- break ;
1319- case TRANSFER_TYPE_OBJECTS:
1320- t_flavors[t_flavor_count++] = kMCPlatformPasteboardFlavorObjects ;
1321- break ;
1322- case TRANSFER_TYPE_PRIVATE:
1323- break ;
1324- }
1325-
1326- if (t_flavor_count != 0 )
1327- MCPlatformPasteboardStore (t_dragboard, t_flavors, t_flavor_count, (void *)fetch_dragboard);
1328- }
1329-
1330- // ///////
1331-
13321267 MCPlatformAllowedDragOperations t_operations;
13331268 t_operations = kMCPlatformDragOperationNone ;
13341269 if ((p_allowed_actions & DRAG_ACTION_COPY) != 0 )
@@ -1353,10 +1288,6 @@ MCDragAction MCScreenDC::dodragdrop(Window w, MCPasteboard *p_pasteboard, MCDrag
13531288
13541289 MCImageFreeBitmap (t_image_bitmap);
13551290
1356- MCPlatformPasteboardRelease (t_dragboard);
1357-
1358- s_local_dragboard = nil;
1359-
13601291 MCDragAction t_action;
13611292 switch (t_op)
13621293 {
0 commit comments