Mercurial > projects > dwt-linux
diff dwt/dnd/Clipboard.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | de2578a843a7 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/dnd/Clipboard.d Sat Apr 26 10:01:30 2008 +0200 +++ b/dwt/dnd/Clipboard.d Mon May 05 00:42:55 2008 +0200 @@ -113,8 +113,8 @@ * </ul> */ protected void checkSubclass () { - char[] name = this.classinfo.name; - char[] validName = Clipboard.classinfo.name; + String name = this.classinfo.name; + String validName = Clipboard.classinfo.name; if ( validName !=/*eq*/ name ) { DND.error (DWT.ERROR_INVALID_SUBCLASS); } @@ -552,18 +552,18 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[][] getAvailableTypeNames() { +public String[] getAvailableTypeNames() { checkWidget(); auto types1 = getAvailableClipboardTypes(); auto types2 = getAvailablePrimaryTypes(); - char[][] result = new char[][types1.length + types2.length]; + String[] result = new String[types1.length + types2.length]; int count = 0; for (int i = 0; i < types1.length; i++) { auto pName = OS.gdk_atom_name(types1[i]); if (pName is null) { continue; } - char[] buffer = tango.stdc.stringz.fromStringz( pName ).dup; + String buffer = tango.stdc.stringz.fromStringz( pName ).dup; OS.g_free (pName); result[count++] = "GTKCLIPBOARD "~buffer; } @@ -572,12 +572,12 @@ if (pName is null) { continue; } - char[] buffer = tango.stdc.stringz.fromStringz( pName ).dup; + String buffer = tango.stdc.stringz.fromStringz( pName ).dup; OS.g_free (pName); result[count++] = "GTKPRIMARYCLIPBOARD "~buffer; } if (count < result.length){ - char[][] temp = new char[][count]; + String[] temp = new String[count]; System.arraycopy(result, 0, temp, 0, count); result = temp; } @@ -618,7 +618,7 @@ } GtkSelectionData* gtk_clipboard_wait_for_contents(void* clipboard, void* target) { - char[] key = "org.eclipse.swt.internal.gtk.dispatchEvent"; + String key = "org.eclipse.swt.internal.gtk.dispatchEvent"; Display display = this.display; ArrayWrapperInt arr = new ArrayWrapperInt( [ OS.GDK_PROPERTY_NOTIFY, OS.GDK_SELECTION_CLEAR, OS.GDK_SELECTION_REQUEST, OS.GDK_SELECTION_NOTIFY ] ); display.setData(key, arr );