# HG changeset patch # User Frank Benoit # Date 1204794533 -3600 # Node ID e0ffca35fe5926ac3aa22a3eb1188a7361dd05bb # Parent b6bee07cfc0b45a37c1eca6b00b5c653d2af947d Fix: more ==/is diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/accessibility/AccessibleObject.d --- a/dwt/accessibility/AccessibleObject.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/accessibility/AccessibleObject.d Thu Mar 06 10:08:53 2008 +0100 @@ -863,7 +863,7 @@ } case ATK.ATK_TEXT_BOUNDARY_LINE_START: { int lineStart1 = locate( text, '\n' ); - if( lineStart1 == text.length ) lineStart1 = -1; + if( lineStart1 is text.length ) lineStart1 = -1; if (lineStart1 is -1) { startBounds = endBounds = length; break; @@ -875,7 +875,7 @@ } startBounds = lineStart1; int lineStart2 = locate( text, '\n' ); - if( lineStart2 == text.length ) lineStart2 = -1; + if( lineStart2 is text.length ) lineStart2 = -1; if (lineStart2 is -1) { endBounds = length; break; diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/graphics/ImageLoader.d --- a/dwt/graphics/ImageLoader.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/graphics/ImageLoader.d Thu Mar 06 10:08:53 2008 +0100 @@ -293,7 +293,7 @@ */ public void removeImageLoaderListener(ImageLoaderListener listener) { if (listener is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); - if (imageLoaderListeners.length == 0 ) return; + if (imageLoaderListeners.length is 0 ) return; tango.core.Array.remove( imageLoaderListeners, listener, delegate bool(ImageLoaderListener l1, ImageLoaderListener l2 ){ return l1 is l2; }); } diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/graphics/Region.d --- a/dwt/graphics/Region.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/graphics/Region.d Thu Mar 06 10:08:53 2008 +0100 @@ -394,7 +394,7 @@ gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - return OS.gdk_region_rect_in(handle, gdkRect) != OS.GDK_OVERLAP_RECTANGLE_OUT; + return OS.gdk_region_rect_in(handle, gdkRect) !is OS.GDK_OVERLAP_RECTANGLE_OUT; } /** * Returns true if the given rectangle intersects diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/layout/FormAttachment.d --- a/dwt/layout/FormAttachment.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/layout/FormAttachment.d Thu Mar 06 10:08:53 2008 +0100 @@ -185,7 +185,7 @@ * @param offset the offset of the side from the position */ public this (int numerator, int denominator, int offset) { - if (denominator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (denominator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); this.numerator = numerator; this.denominator = denominator; this.offset = offset; @@ -244,7 +244,7 @@ m = n; n = temp; } - while (n != 0){ + while (n !is 0){ temp = m; m = n; n = temp % n; @@ -283,12 +283,12 @@ } int solveX (int value) { - if (denominator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (denominator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); return ((numerator * value) / denominator) + offset; } int solveY (int value) { - if (numerator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (numerator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); return (value - offset) * denominator / numerator; } @@ -299,7 +299,7 @@ * @return a string representation of the FormAttachment */ public override char[] toString () { - char[] string = control != null ? control.toString () : Format( "{}/{}", numerator, denominator ); + char[] string = control !is null ? control.toString () : Format( "{}/{}", numerator, denominator ); return Format("{{y = ({})x + {}}", string, ( offset >= 0 ? Format(")x + {}", offset ) : Format( ")x - {}", -offset))); } diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/printing/PrintDialog.d --- a/dwt/printing/PrintDialog.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/printing/PrintDialog.d Thu Mar 06 10:08:53 2008 +0100 @@ -299,7 +299,7 @@ default: } - printToFile = ( data.name ==/*eq*/ "Print to File" ); //$NON-NLS-1$ + printToFile = ( data.name.equals("Print to File")); //$NON-NLS-1$ if (printToFile) { auto address = OS.gtk_print_settings_get(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI.ptr); data.fileName = tango.stdc.stringz.fromStringz( address).dup; diff -r b6bee07cfc0b -r e0ffca35fe59 dwt/printing/Printer.d --- a/dwt/printing/Printer.d Thu Mar 06 09:59:42 2008 +0100 +++ b/dwt/printing/Printer.d Thu Mar 06 10:08:53 2008 +0100 @@ -103,7 +103,7 @@ * which means the event loop never ends. The fix is to check to see if the driver * is of type Lpr, and stop the enumeration, which exits the event loop. */ - if (printerList[length_].driver ==/*eq*/ GTK_LPR_BACKEND) return 1; + if (printerList[length_].driver.equals(GTK_LPR_BACKEND)) return 1; return 0; } @@ -144,7 +144,7 @@ } int GtkPrinterFunc_FindNamedPrinter (GtkPrinter* printer, void* user_data) { PrinterData pd = printerDataFromGtkPrinter(printer); - if (pd.driver ==/*eq*/data.driver && pd.name ==/*eq*/ data.name ) { + if (pd.driver.equals(data.driver) && pd.name.equals(data.name)) { this.printer = printer; OS.g_object_ref(printer); return 1; @@ -707,7 +707,7 @@ char* buffer = tango.stdc.stringz.toStringz( data.fileName ); OS.gtk_print_settings_set(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI.ptr, buffer); } - if (data.driver ==/*eq*/ "GtkPrintBackendFile" && data.name ==/*eq*/ "Print to File" ) { //$NON-NLS-1$ //$NON-NLS-2$ + if (data.driver.equals("GtkPrintBackendFile") && data.name.equals("Print to File")) { //$NON-NLS-1$ //$NON-NLS-2$ char* buffer = tango.stdc.stringz.toStringz( data.fileName ); OS.gtk_print_settings_set(settings, OS.GTK_PRINT_SETTINGS_OUTPUT_URI.ptr, buffer); }