Project: SWT
Bug 93724 Drag-and-drop creates signal names every time
Reported: 2005-05-04 17:35:58 | Status: resolved fixed

Here is an example of some code in DragSource.java for GTK+: byte[] buffer = Converter.wcsToMbcs(null, "drag_data_get", true); OS.g_signal_connect(control.handle, buffer, DragGetData.getAddress(), 0); buffer = Converter.wcsToMbcs(null, "drag_end", true); OS.g_signal_connect(control.handle, buffer, DragEnd.getAddress(), 0); buffer = Converter.wcsToMbcs(null, "drag_data_delete", true); OS.g_signal_connect(control.handle, buffer, DragDataDelete.getAddress(), 0); Rather than converting the names for the signals every time, these signal names should be defined in OS.java so that they can be only created once.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java