comparison dwt/dnd/DropTarget.d @ 238:380bad9f6852

reverted char[] to String
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:42:55 +0200
parents 08789b28bdf3
children ce446666f5a2
comparison
equal deleted inserted replaced
237:98b80b00af79 238:380bad9f6852
114 int drag_motion_handler; 114 int drag_motion_handler;
115 int drag_leave_handler; 115 int drag_leave_handler;
116 int drag_data_received_handler; 116 int drag_data_received_handler;
117 int drag_drop_handler; 117 int drag_drop_handler;
118 118
119 static const char[] DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$ 119 static const String DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$
120 static const char[] DROPTARGETID = "DropTarget"; //$NON-NLS-1$ 120 static const String DROPTARGETID = "DropTarget"; //$NON-NLS-1$
121 static const int DRAGOVER_HYSTERESIS = 50; 121 static const int DRAGOVER_HYSTERESIS = 50;
122 122
123 // static Callback Drag_Motion; 123 // static Callback Drag_Motion;
124 // static Callback Drag_Leave; 124 // static Callback Drag_Leave;
125 // static Callback Drag_Data_Received; 125 // static Callback Drag_Data_Received;
367 addListener (DND.Drop, typedListener); 367 addListener (DND.Drop, typedListener);
368 addListener (DND.DropAccept, typedListener); 368 addListener (DND.DropAccept, typedListener);
369 } 369 }
370 370
371 protected override void checkSubclass () { 371 protected override void checkSubclass () {
372 char[] name = this.classinfo.name; 372 String name = this.classinfo.name;
373 char[] validName = DropTarget.classinfo.name; 373 String validName = DropTarget.classinfo.name;
374 if ( validName !=/*eq*/ name ) { 374 if ( validName !=/*eq*/ name ) {
375 DND.error (DWT.ERROR_INVALID_SUBCLASS); 375 DND.error (DWT.ERROR_INVALID_SUBCLASS);
376 } 376 }
377 } 377 }
378 378
700 GtkTargetEntry*[] targets; 700 GtkTargetEntry*[] targets;
701 for (int i = 0; i < transferAgents.length; i++) { 701 for (int i = 0; i < transferAgents.length; i++) {
702 Transfer transfer = transferAgents[i]; 702 Transfer transfer = transferAgents[i];
703 if (transfer !is null) { 703 if (transfer !is null) {
704 int[] typeIds = transfer.getTypeIds(); 704 int[] typeIds = transfer.getTypeIds();
705 char[][] typeNames = transfer.getTypeNames(); 705 String[] typeNames = transfer.getTypeNames();
706 for (int j = 0; j < typeIds.length; j++) { 706 for (int j = 0; j < typeIds.length; j++) {
707 GtkTargetEntry* entry = new GtkTargetEntry(); 707 GtkTargetEntry* entry = new GtkTargetEntry();
708 entry.target = cast(char*)OS.g_malloc(typeNames[j].length +1); 708 entry.target = cast(char*)OS.g_malloc(typeNames[j].length +1);
709 entry.target[ 0 .. typeNames[j].length ] = typeNames[j]; 709 entry.target[ 0 .. typeNames[j].length ] = typeNames[j];
710 entry.target[ typeNames[j].length ] = '\0'; 710 entry.target[ typeNames[j].length ] = '\0';