# HG changeset patch # User John Reimer # Date 1225256821 25200 # Node ID 5abc6f7f7a958b69b7b521baeefc1f5da8f3766c # Parent 8198e60520120f0355fc3e55cbf94962aa35b98f Fixups diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/Download.d --- a/dwt/browser/Download.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/Download.d Tue Oct 28 22:07:01 2008 -0700 @@ -18,6 +18,8 @@ import dwt.DWT; +import dwt.browser.Mozilla; + //import dwt.internal.Compatibility; import XPCOM = dwt.internal.mozilla.XPCOM; //import dwt.internal.mozilla.XPCOMObject; @@ -37,6 +39,7 @@ import dwt.internal.mozilla.nsIWebProgress; import dwt.internal.mozilla.nsIRequest; import dwt.internal.mozilla.nsStringAPI; +import dwt.internal.mozilla.nsEmbedString; import dwt.layout.GridData; import dwt.layout.GridLayout; @@ -98,10 +101,11 @@ /* nsIDownload */ /* Note. The argument startTime is defined as a PRInt64. This translates into two java ints. */ +/* EXCEPTION: not for D */ nsresult Init (nsIURI aSource, nsIURI aTarget, nsAString* aDisplayName, nsIMIMEInfo aMIMEInfo, PRTime startTime, PRBool aPersist) { //nsIURI source = new nsIURI (aSource); - scope auto aSpec = new nsEmbedString; - int rc = aSource.GetHost (cast(nsAString*)aSpec); + scope auto aSpec = new nsEmbedCString; + int rc = aSource.GetHost (cast(nsACString*)aSpec); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); //int length = XPCOM.nsEmbedCString_Length (aSpec); //int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec); @@ -118,7 +122,7 @@ String filename = null; //nsISupports supports = new nsISupports (aTarget); nsIURI target = null; - rc = aTarget.QueryInterface (nsIURI.IID, cast(void**)&target); + rc = aTarget.QueryInterface (&nsIURI.IID, cast(void**)&target); if (rc is 0) { /* >= 1.7 */ //result[0] = 0; //int /*long*/ aPath = XPCOM.nsEmbedCString_new (); @@ -131,10 +135,15 @@ //XPCOM.memmove (dest, buffer, length); //XPCOM.nsEmbedCString_delete (aPath); filename = aPath.toString; - int separator = Util.locatePrior(filename, System.getProperty ("file.separator")); //$NON-NLS-1$ - filename = filename[separator + 1 .. $]; + int separator = filename.lastIndexOf (System.getProperty ("file.separator")); //$NON-NLS-1$ + filename = filename.substring (separator + 1); target.Release (); } else { /* < 1.7 */ + // Earlier versions (<1.7) of Mozilla are not really supported + // in the D port (yet) because we depend on bindings where the interface + // is directly mapped, not wrapped as in the Java SWT case + implMissing(__FILE__,__LINE__); + /* //nsILocalFile target = new nsILocalFile (aTarget); scope auto aNativeTarget = new nsEmbedCString; rc = aTarget.GetNativeLeafName (cast(nsACString*)aNativeTarget); @@ -145,6 +154,7 @@ //XPCOM.memmove (dest, buffer, length); //XPCOM.nsEmbedCString_delete (aNativeTarget); filename = aNativeTarget.toString; + */ } Listener listener = new class() Listener { @@ -215,7 +225,7 @@ return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } -nsresult GetStartTime (PRInt64 aStartTime) { +nsresult GetStartTime (PRInt64* aStartTime) { return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } @@ -239,7 +249,7 @@ if (aObserver !is null) { // nsISupports supports = new nsISupports (aObserver); nsIHelperAppLauncher result; - int rc = aObserver.QueryInterface (nsIHelperAppLauncher.IID, cast(void**)&result); + int rc = aObserver.QueryInterface (&nsIHelperAppLauncher.IID, cast(void**)&result); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); if (result is null) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); helperAppLauncher = result; diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/DownloadFactory.d --- a/dwt/browser/DownloadFactory.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/DownloadFactory.d Tue Oct 28 22:07:01 2008 -0700 @@ -20,6 +20,8 @@ import dwt.internal.mozilla.nsIFactory; import dwt.internal.mozilla.nsISupports; +import dwt.browser.Download; + class DownloadFactory : nsIFactory { int refCount = 0; @@ -63,7 +65,7 @@ nsresult rv = download.QueryInterface( iid, result ); if (XPCOM.NS_FAILED(rv)) { *result = null; - delete promptService; + delete download; } return rv; } diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/DownloadFactory_1_8.d --- a/dwt/browser/DownloadFactory_1_8.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/DownloadFactory_1_8.d Tue Oct 28 22:07:01 2008 -0700 @@ -21,6 +21,7 @@ import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIFactory; import dwt.internal.mozilla.nsISupports; +import dwt.browser.Download_1_8; class DownloadFactory_1_8 : nsIFactory { //XPCOMObject supports; @@ -35,39 +36,7 @@ refCount++; return refCount; } -/+ -void createCOMInterfaces () { - /* Create each of the interfaces that this object implements */ - supports = new XPCOMObject (new int[] {2, 0, 0}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - }; - - factory = new XPCOMObject (new int[] {2, 0, 0, 3, 1}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return CreateInstance (args[0], args[1], args[2]);} - public int /*long*/ method4 (int /*long*/[] args) {return LockFactory ((int)/*64*/args[0]);} - }; -} -void disposeCOMInterfaces () { - if (supports !is null) { - supports.dispose (); - supports = null; - } - if (factory !is null) { - factory.dispose (); - factory = null; - } -} - -int /*long*/ getAddress () { - return factory.getAddress (); -} -+/ nsresult QueryInterface (nsIID* riid, void** ppvObject) { if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; //nsID guid = new nsID (); diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/FilePicker.d --- a/dwt/browser/FilePicker.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/FilePicker.d Tue Oct 28 22:07:01 2008 -0700 @@ -30,6 +30,8 @@ import dwt.internal.mozilla.nsISimpleEnumerator; import dwt.internal.mozilla.nsStringAPI; +import dwt.browser.Mozilla; + import dwt.widgets.DirectoryDialog; import dwt.widgets.Display; import dwt.widgets.FileDialog; @@ -54,25 +56,25 @@ } nsresult QueryInterface (nsID* riid, void** ppvObject) { - if (riid is null || ppvObject is null) return NS_ERROR_NO_INTERFACE; + if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; - if (riid == nsISupports.IID) { + if (*riid == nsISupports.IID) { *ppvObject = cast(void*)cast(nsISupports) this; AddRef (); - return NS_OK; + return XPCOM.NS_OK; } - if (riid == nsIFilePicker.IID) { + if (*riid == nsIFilePicker.IID) { *ppvObject = cast(void*)cast(nsIFilePicker) this; AddRef (); - return NS_OK; + return XPCOM.NS_OK; } - if (riid == nsIFilePicker_1_8.IID) { + if (*riid == nsIFilePicker_1_8.IID) { *ppvObject = cast(void*)cast(nsIFilePicker_1_8) this; AddRef (); - return NS_OK; + return XPCOM.NS_OK; } *ppvObject = null; - return NS_ERROR_NO_INTERFACE; + return XPCOM.NS_ERROR_NO_INTERFACE; } nsrefcnt Release () { @@ -99,11 +101,11 @@ return XPCOM.NS_OK; } -nsresult Show (PRUint32* _retval) { +nsresult Show (PRInt16* _retval) { if (mode is nsIFilePicker.modeGetFolder) { /* picking a directory */ int result = showDirectoryPicker (); - *_retval = cast(int)cast(short)result; /* PRInt16 */ + *_retval = cast(int)cast(PRInt16)result; /* PRInt16 */ return XPCOM.NS_OK; } @@ -149,7 +151,7 @@ return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } -nsresult GetFileURL ( nsIFileURL aFileURL ) { +nsresult GetFileURL ( nsIFileURL* aFileURL ) { return XPCOM.NS_ERROR_NOT_IMPLEMENTED; } @@ -157,7 +159,7 @@ String filename = ""; //$NON-NLS-1$ if (directory !is null) filename ~= directory ~ SEPARATOR; if (files !is null && files.length > 0) filename ~= files[0]; - scope auto path = new nsEmbedString (filename); + scope auto path = new nsEmbedString (toString16(filename)); int rc = XPCOM.NS_NewLocalFile (cast(nsAString*)path, 1, aFile); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); if (aFile is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/FilePickerFactory.d --- a/dwt/browser/FilePickerFactory.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/FilePickerFactory.d Tue Oct 28 22:07:01 2008 -0700 @@ -22,6 +22,8 @@ import dwt.internal.mozilla.nsIFactory; import dwt.internal.mozilla.nsISupports; +import dwt.browser.FilePicker; + class FilePickerFactory : nsIFactory { //XPCOMObject supports; //XPCOMObject factory; diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/FilePickerFactory_1_8.d --- a/dwt/browser/FilePickerFactory_1_8.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/FilePickerFactory_1_8.d Tue Oct 28 22:07:01 2008 -0700 @@ -14,14 +14,14 @@ import dwt.dwthelper.utils; -//import dwt.internal.C; import XPCOM = dwt.internal.mozilla.XPCOM; import dwt.browser.FilePickerFactory; +import dwt.browser.FilePicker_1_8; import dwt.internal.mozilla.Common; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsISupports; -//import dwt.internal.mozilla.XPCOMObject; + class FilePickerFactory_1_8 : FilePickerFactory { diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/HelperAppLauncherDialog.d --- a/dwt/browser/HelperAppLauncherDialog.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/HelperAppLauncherDialog.d Tue Oct 28 22:07:01 2008 -0700 @@ -17,10 +17,10 @@ import Utf = tango.text.convert.Utf; import dwt.DWT; -//import dwt.internal.C; + import XPCOM = dwt.internal.mozilla.XPCOM; + import dwt.internal.mozilla.Common; -//import dwt.internal.mozilla.XPCOMObject; import dwt.internal.mozilla.nsEmbedString; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsIHelperAppLauncher; @@ -29,6 +29,10 @@ import dwt.internal.mozilla.nsIHelperAppLauncher_1_9; import dwt.internal.mozilla.nsISupports; import dwt.internal.mozilla.nsILocalFile; +import dwt.internal.mozilla.nsStringAPI; + +import dwt.browser.Mozilla; + import dwt.widgets.FileDialog; import dwt.widgets.Shell; @@ -45,39 +49,7 @@ refCount++; return refCount; } -/+ -void createCOMInterfaces () { - /* Create each of the interfaces that this object implements */ - supports = new XPCOMObject (new int[] {2, 0, 0}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - }; - - helperAppLauncherDialog = new XPCOMObject (new int[] {2, 0, 0, 3, 5}) { - public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);} - public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();} - public int /*long*/ method2 (int /*long*/[] args) {return Release ();} - public int /*long*/ method3 (int /*long*/[] args) {return Show (args[0], args[1], (int)/*64*/args[2]);} - public int /*long*/ method4 (int /*long*/[] args) {return PromptForSaveToFile (args[0], args[1], args[2], args[3], args[4]);} - }; -} -void disposeCOMInterfaces () { - if (supports !is null) { - supports.dispose (); - supports = null; - } - if (helperAppLauncherDialog !is null) { - helperAppLauncherDialog.dispose (); - helperAppLauncherDialog = null; - } -} - -int /*long*/ getAddress () { - return helperAppLauncherDialog.getAddress (); -} -+/ nsresult QueryInterface (nsID* riid, void** ppvObject) { if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; //nsID guid = new nsID (); @@ -121,32 +93,29 @@ // FIXME: Not sure if this will work because of different versions of // nsIHelperAppLauncher. Remember to check. -JJR nsIHelperAppLauncher_1_9 helperAppLauncher1; - int rc = aLauncher.QueryInterface (nsIHelperAppLauncher_1_9.IID, cast(void*)&helperAppLauncher1); + int rc = aLauncher.QueryInterface (&nsIHelperAppLauncher_1_9.IID, cast(void**)&helperAppLauncher1); if (rc is 0) { // nsIHelperAppLauncher_1_9 helperAppLauncher = new nsIHelperAppLauncher_1_9 (aLauncher); - rc = helperAppLauncher1.SaveToDisk (0, 0); + rc = helperAppLauncher1.SaveToDisk (null, 0); helperAppLauncher1.Release (); return rc; } //result[0] = 0; nsIHelperAppLauncher_1_8 helperAppLauncher2; - rc = aLauncher.QueryInterface (nsIHelperAppLauncher_1_8.IID, cast(void*)&helperAppLauncher2); + rc = aLauncher.QueryInterface (&nsIHelperAppLauncher_1_8.IID, cast(void**)&helperAppLauncher2); if (rc is 0) { //nsIHelperAppLauncher_1_8 helperAppLauncher = new nsIHelperAppLauncher_1_8 (aLauncher); - rc = helperAppLauncher2.SaveToDisk (0, 0); + rc = helperAppLauncher2.SaveToDisk (null, 0); helperAppLauncher2.Release (); return rc; } //nsIHelperAppLauncher helperAppLauncher = new nsIHelperAppLauncher (aLauncher); /* < 1.8 */ - return aLauncher.SaveToDisk (0, 0); + return aLauncher.SaveToDisk (null, 0); } -int PromptForSaveToFile (nsIHelperAppLauncher arg0, nsISupports arg1, PRUnichar* arg2, PRUnichar* arg3, nsILocalFile* arg4) { - PRUnichar* aDefaultFile; - PRUnichar* aSuggestedFileExtension; - nsILocalFile* _retval; +nsresult PromptForSaveToFile (nsIHelperAppLauncher aLauncher, nsISupports aWindowContext, PRUnichar* aDefaultFile, PRUnichar* aSuggestedFileExtension, nsILocalFile* _retval) { bool hasLauncher = false; /* @@ -164,35 +133,45 @@ */ bool using_1_8 = false, using_1_9 = false; // technically this should have an AddRef? -JJR - nsISupports support = cast(nsISupports)arg0; + //nsISupports support = cast(nsISupports)arg0; //int /*long*/[] result = new int /*long*/[1]; - if (arg0 is null) + if (aLauncher is null) assert(0); + // TODO: D Bindings are locked to the XPCOM interface version provided in + // dwt/internal/mozilla package; therefore the following version checks + // are redundant for now. In this case, 1.8 and 1.9 + // will be bypassed. To get 1.8 and 1.9 working for D, we will + // have to customize this section a bit or simply remove the references + // until the default aligns with these versions in later swt updates. + // For now this should work as is. + nsIHelperAppLauncher_1_8 helperAppLauncher1; - int rc = support.QueryInterface (nsIHelperAppLauncher_1_8.IID, cast(void*)&helperAppLauncher1); + + int rc = aLauncher.QueryInterface (&nsIHelperAppLauncher_1_8.IID, cast(void**)&helperAppLauncher1); if (rc is 0) { using_1_8 = true; hasLauncher = true; helperAppLauncher1.Release (); } else { nsIHelperAppLauncher_1_9 helperAppLauncher2; - rc = support.QueryInterface (nsIHelperAppLauncher_1_9.IID, cast(void*)&helperAppLauncher2); + rc = aLauncher.QueryInterface (&nsIHelperAppLauncher_1_9.IID, cast(void**)&helperAppLauncher2); if (rc is 0) { using_1_9 = true; hasLauncher = true; helperAppLauncher2.Release; } else { nsIHelperAppLauncher helperAppLauncher; - rc = support.QueryInterface (nsIHelperAppLauncher.IID, cast(void*)&helperAppLauncher); + rc = aLauncher.QueryInterface (&nsIHelperAppLauncher.IID, cast(void**)&helperAppLauncher); if (rc is 0) { hasLauncher = true; helperAppLauncher.Release; } } } - //result[0] = 0; +/+ + // In D port, Mozilla version is determined by the bindings used if (hasLauncher) { /* >= 1.5 */ aDefaultFile = arg2; aSuggestedFileExtension = arg3; @@ -204,15 +183,15 @@ aSuggestedFileExtension = arg2; _retval = arg3; } - ++/ //int span = XPCOM.strlen_PRUnichar (aDefaultFile); // XPCOM.memmove (dest, aDefaultFile, length * 2); - String defaultFile = aDefaultFile.fromString16z().toString(); + String defaultFile = Utf.toString(fromString16z(aDefaultFile)); //span = XPCOM.strlen_PRUnichar (aSuggestedFileExtension); //dest = new char[length]; //XPCOM.memmove (dest, aSuggestedFileExtension, length * 2); - String suggestedFileExtension = aSuggestedFileExtension.fromString16z().toString(); + String suggestedFileExtension = Utf.toString(fromString16z(aSuggestedFileExtension)); Shell shell = new Shell (); FileDialog fileDialog = new FileDialog (shell, DWT.SAVE); @@ -225,29 +204,26 @@ if (name is null) { if (hasLauncher) { // not sure if these produce correct interface alignment. Check. -JJR - if (using_1_8) { - auto launcher = cast(nsIHelperAppLauncher_1_8)cast(void*)arg0; - rc = launcher.Cancel (XPCOM.NS_BINDING_ABORTED); - } else if (using_1_9) { - auto launcher = cast(nsIHelperAppLauncher_1_9)cast(void*)arg0; - rc = launcher.Cancel (XPCOM.NS_BINDING_ABORTED); + if (using_1_8 || using_1_9) { + //rc = aLauncher.Cancel (XPCOM.NS_BINDING_ABORTED); + implMissing(__FILE__,__LINE__); } else { //nsIHelperAppLauncher launcher = new nsIHelperAppLauncher (arg0); - rc = arg0.Cancel (); + rc = aLauncher.Cancel (); } - if (rc !is XPCOM.NS_OK) Mozilla.error (rc); + if (rc !is XPCOM.NS_OK) Mozilla.error (rc); return XPCOM.NS_OK; } return XPCOM.NS_ERROR_FAILURE; } - scope auto path = new nsEmbedString (name); + scope auto path = new nsEmbedString (name.toString16()); nsILocalFile localFile; - rc = XPCOM.NS_NewLocalFile (cast(nsAString*)path, 1, cast(void*)&localFile); + rc = XPCOM.NS_NewLocalFile (cast(nsAString*)path, 1, &localFile); //path.dispose (); if (rc !is XPCOM.NS_OK) Mozilla.error (rc); if (localFile is null) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); /* Our own nsIDownload has been registered during the Browser initialization. It will be invoked by Mozilla. */ - *_retval = cast(void*)&localFile; + *_retval = localFile; //XPCOM.memmove (_retval, result, C.PTR_SIZEOF); return XPCOM.NS_OK; } diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/InputStream.d --- a/dwt/browser/InputStream.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/InputStream.d Tue Oct 28 22:07:01 2008 -0700 @@ -126,7 +126,7 @@ PRUint32 cnt = max; while (cnt > 0) { PRUint32 aWriteCount; - nsresult rc = aWrite (cast(nsIInputStream)this, aClosure, buffer.ptr, index, cnt, &aWriteCount); + nsresult rc = aWriter (cast(nsIInputStream)this, aClosure, buffer.ptr, index, cnt, &aWriteCount); if (rc !is XPCOM.NS_OK) break; index += aWriteCount; cnt -= aWriteCount; diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/MozillaDelegate.d --- a/dwt/browser/MozillaDelegate.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/MozillaDelegate.d Tue Oct 28 22:07:01 2008 -0700 @@ -25,6 +25,7 @@ import dwt.widgets.Widget; import dwt.browser.Browser; +import dwt.browser.Mozilla; import dwt.internal.c.glib_object; @@ -45,7 +46,7 @@ } this (Browser browser) { - super (); + //super (); if (!IsLinux) { browser.dispose (); DWT.error (DWT.ERROR_NO_HANDLES, null, " [Unsupported platform]"); //$NON-NLS-1$ @@ -180,7 +181,7 @@ if (mozillaHandle !is null) { /* Note. Callback to get events before Mozilla receives and consumes them. */ - OS.g_signal_connect (mozillaHandle, OS.event, cast(GCallback)&eventProc, null); + OS.g_signal_connect (mozillaHandle, OS.event.toStringz(), cast(GCallback)&eventProc, null); /* * Note. Callback to get the events not consumed by Mozilla - and to block @@ -188,9 +189,9 @@ * This hook is set after Mozilla and is therefore called after Mozilla's * handler because GTK dispatches events in their order of registration. */ - OS.g_signal_connect (mozillaHandle, OS.key_press_event, cast(GCallback)&eventProc, STOP_PROPOGATE); - OS.g_signal_connect (mozillaHandle, OS.key_release_event, cast(GCallback)&eventProc, STOP_PROPOGATE); - OS.g_signal_connect (mozillaHandle, OS.button_press_event, cast(GCallback)&eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.key_press_event.toStringz(), cast(GCallback)&eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.key_release_event.toStringz(), cast(GCallback)&eventProc, STOP_PROPOGATE); + OS.g_signal_connect (mozillaHandle, OS.button_press_event.toStringz(), cast(GCallback)&eventProc, STOP_PROPOGATE); } } } diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/browser/PromptDialog.d --- a/dwt/browser/PromptDialog.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/browser/PromptDialog.d Tue Oct 28 22:07:01 2008 -0700 @@ -49,7 +49,7 @@ Label label = new Label(shell, DWT.WRAP); label.setText(text); GridData data = new GridData(); - Monitor monitor = parent.getMonitor(); + dwt.widgets.Monitor.Monitor monitor = parent.getMonitor(); int maxWidth = monitor.getBounds().width * 2 / 3; int width = label.computeSize(DWT.DEFAULT, DWT.DEFAULT).x; data.widthHint = Math.min(width, maxWidth); @@ -95,7 +95,7 @@ Label label = new Label(shell, DWT.WRAP); label.setText(text); GridData data = new GridData(); - Monitor monitor = parent.getMonitor(); + dwt.widgets.Monitor.Monitor monitor = parent.getMonitor(); int maxWidth = monitor.getBounds().width * 2 / 3; int width = label.computeSize(DWT.DEFAULT, DWT.DEFAULT).x; data.widthHint = Math.min(width, maxWidth); @@ -175,7 +175,7 @@ Label label = new Label(shell, DWT.WRAP); label.setText(text); GridData data = new GridData(); - Monitor monitor = parent.getMonitor(); + dwt.widgets.Monitor.Monitor monitor = parent.getMonitor(); int maxWidth = monitor.getBounds().width * 2 / 3; int width = label.computeSize(DWT.DEFAULT, DWT.DEFAULT).x; data.widthHint = Math.min(width, maxWidth); @@ -242,7 +242,7 @@ Label label = new Label(shell, DWT.WRAP); label.setText(text); GridData data = new GridData(); - Monitor monitor = parent.getMonitor(); + dwt.widgets.Monitor.Monitor monitor = parent.getMonitor(); int maxWidth = monitor.getBounds().width * 2 / 3; int width = label.computeSize(DWT.DEFAULT, DWT.DEFAULT).x; data.widthHint = Math.min(width, maxWidth); diff -r 8198e6052012 -r 5abc6f7f7a95 dwt/internal/mozilla/nsStringAPI.d --- a/dwt/internal/mozilla/nsStringAPI.d Mon Oct 27 22:41:01 2008 -0700 +++ b/dwt/internal/mozilla/nsStringAPI.d Tue Oct 28 22:07:01 2008 -0700 @@ -73,7 +73,7 @@ struct nsAString { -/+ + static nsAString opCall(wchar[] s) { nsAString result; @@ -93,7 +93,7 @@ { return Utf.toString( nsAString.toString16( str ) ); } - +/ + private: void *v; }