Mercurial > projects > dwt-linux
diff dwt/widgets/Display.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | dc5328912f3d |
children | ce446666f5a2 |
line wrap: on
line diff
--- a/dwt/widgets/Display.d Sat Apr 26 10:01:30 2008 +0200 +++ b/dwt/widgets/Display.d Mon May 05 00:42:55 2008 +0200 @@ -144,9 +144,9 @@ CallbackData filterProcCallbackData; EventTable eventTable, filterTable; - static char[] APP_NAME = "DWT"; - static const char[] DISPATCH_EVENT_KEY = "dwt.internal.gtk.dispatchEvent"; - static const char[] ADD_WIDGET_KEY = "dwt.internal.addWidget"; + static String APP_NAME = "DWT"; + static const String DISPATCH_EVENT_KEY = "dwt.internal.gtk.dispatchEvent"; + static const String ADD_WIDGET_KEY = "dwt.internal.addWidget"; GClosure*[] closures; int [] signalIds; @@ -212,8 +212,8 @@ /* Idle proc callback */ CallbackData idleProcCallbackData; int idleHandle; - static const char[] ADD_IDLE_PROC_KEY = "dwt.internal.gtk2.addIdleProc"; - static const char[] REMOVE_IDLE_PROC_KEY = "dwt.internal.gtk2.removeIdleProc"; + static const String ADD_IDLE_PROC_KEY = "dwt.internal.gtk2.addIdleProc"; + static const String REMOVE_IDLE_PROC_KEY = "dwt.internal.gtk2.removeIdleProc"; Object idleLock; bool idleNeeded; @@ -381,12 +381,12 @@ static Display [] Displays; /* Package name */ - static const char[] PACKAGE_PREFIX = "dwt.widgets."; + static const String PACKAGE_PREFIX = "dwt.widgets."; /* This code is intentionally commented. * ".class" can not be used on CLDC. */ // static { -// char[] name = Display.class.getName (); +// String name = Display.class.getName (); // int index = name.lastIndexOf ('.'); // PACKAGE_NAME = name.substring (0, index + 1); // } @@ -412,7 +412,7 @@ /* Display Data */ Object data; - char[] [] keys; + String [] keys; Object [] values; /* Initial Guesses for Shell Trimmings. */ @@ -424,7 +424,7 @@ bool ignoreTrim; /* Window Manager */ - char[] windowManager; + String windowManager; /* * TEMPORARY CODE. Install the runnable that @@ -983,9 +983,9 @@ OS.gdk_window_remove_filter(window, &filterProcFunc, cbdata ); } -Image createImage (char[] name) { +Image createImage (String name) { auto style = OS.gtk_widget_get_default_style (); - char[] buffer = name; + String buffer = name; auto pixbuf = OS.gtk_icon_set_render_icon ( OS.gtk_icon_factory_lookup_default (buffer.ptr), style, OS.GTK_TEXT_DIR_NONE, @@ -1584,7 +1584,7 @@ * @see #setData(String, Object) * @see #disposeExec(Runnable) */ -public Object getData (char[] key) { +public Object getData (String key) { checkDevice (); if (key is null) error (DWT.ERROR_NULL_ARGUMENT); if (key ==/*eq*/ DISPATCH_EVENT_KEY) { @@ -1673,7 +1673,7 @@ } // /+static bool isValidClass (Class clazz) { -// //PORTING_TODO char[] name = clazz.getName (); +// //PORTING_TODO String name = clazz.getName (); // //PORTING_TODO int index = name.lastIndexOf ('.'); // //PORTING_TODO return name.substring (0, index + 1)==/*eq*/ PACKAGE_PREFIX; // return true; @@ -3369,7 +3369,7 @@ * * @param name the new app name or <code>null</code> */ -public static void setAppName (char[] name) { +public static void setAppName (String name) { APP_NAME = name; } @@ -3443,7 +3443,7 @@ * @see #getData(String) * @see #disposeExec(Runnable) */ -public void setData (char[] key, Object value) { +public void setData (String key, Object value) { checkDevice (); if (key is null) error (DWT.ERROR_NULL_ARGUMENT); @@ -3488,7 +3488,7 @@ keys = null; values = null; } else { - char[] [] newKeys = new char[] [keys.length - 1]; + String [] newKeys = new String [keys.length - 1]; Object [] newValues = new Object [values.length - 1]; System.arraycopy (keys, 0, newKeys, 0, index); System.arraycopy (keys, index + 1, newKeys, index, newKeys.length - index); @@ -3512,7 +3512,7 @@ return; } } - char[] [] newKeys = new char[] [keys.length + 1]; + String [] newKeys = new String [keys.length + 1]; Object [] newValues = new Object [values.length + 1]; System.arraycopy (keys, 0, newKeys, 0, keys.length); System.arraycopy (values, 0, newValues, 0, values.length);