diff dwt/custom/CTabItem.d @ 255:5a30aa9820f3

removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author Frank Benoit <benoit@tionex.de>
date Sun, 15 Jun 2008 22:32:20 +0200
parents ce446666f5a2
children c0d810de7093
line wrap: on
line diff
--- a/dwt/custom/CTabItem.d	Sun Jun 08 15:11:48 2008 +0200
+++ b/dwt/custom/CTabItem.d	Sun Jun 15 22:32:20 2008 +0200
@@ -772,14 +772,14 @@
  * Returns <code>true</code> to indicate that the receiver's close button should be shown.
  * Otherwise return <code>false</code>. The initial value is defined by the style (DWT.CLOSE)
  * that was used to create the receiver.
- * 
+ *
  * @return <code>true</code> if the close button should be shown
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @since 3.4
  */
 public bool getShowClose() {
@@ -1021,14 +1021,14 @@
  * Sets to <code>true</code> to indicate that the receiver's close button should be shown.
  * If the parent (CTabFolder) was created with DWT.CLOSE style, changing this value has
  * no effect.
- * 
+ *
  * @param close the new state of the close button
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @since 3.4
  */
 public void setShowClose(bool close) {
@@ -1040,8 +1040,9 @@
 }
 public override void setText (String string) {
     checkWidget();
-    if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
-    if (string==getText()) return;
+    // DWT extension: allow null for zero length string
+    //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
+    if (string.equals (getText())) return;
     super.setText(string);
     shortenedText = null;
     shortenedTextWidth = 0;