Show
Ignore:
Timestamp:
05/17/08 11:34:28 (8 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Update to SWT 3.4M7

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/custom/CTabFolder.d

    r212 r213  
    15391539    style |= single ? DWT.SINGLE : DWT.MULTI; 
    15401540    if (borderLeft !is 0) style |= DWT.BORDER; 
     1541    style &= ~DWT.CLOSE; 
     1542    if (showClose) style |= DWT.CLOSE; 
    15411543    return style; 
    15421544} 
     
    17131715        public void getLocation(AccessibleControlEvent e) { 
    17141716            Rectangle location = null; 
     1717            Point pt = null; 
    17151718            int childID = e.childID; 
    17161719            if (childID is ACC.CHILDID_SELF) { 
    17171720                location = getBounds(); 
    1718             } else if (childID >= 0 && childID < items.length) { 
    1719                 location = items[childID].getBounds(); 
    1720             } else if (showChevron && childID is items.length + CHEVRON_CHILD_ID) { 
    1721                 location = chevronRect; 
    1722             } else if (showMin && childID is items.length + MINIMIZE_CHILD_ID) { 
    1723                 location = minRect; 
    1724             } else if (showMax && childID is items.length + MAXIMIZE_CHILD_ID) { 
    1725                 location = maxRect; 
    1726             } 
    1727             if (location !is null) { 
    1728                 Point pt = toDisplay(location.x, location.y); 
     1721                pt = getParent().toDisplay(location.x, location.y); 
     1722            } else { 
     1723                if (childID >= 0 && childID < items.length && items[childID].isShowing()) { 
     1724                    location = items[childID].getBounds(); 
     1725                } else if (showChevron && childID is items.length + CHEVRON_CHILD_ID) { 
     1726                    location = chevronRect; 
     1727                } else if (showMin && childID is items.length + MINIMIZE_CHILD_ID) { 
     1728                    location = minRect; 
     1729                } else if (showMax && childID is items.length + MAXIMIZE_CHILD_ID) { 
     1730                    location = maxRect; 
     1731                } 
     1732                if (location !is null) { 
     1733                    pt = toDisplay(location.x, location.y); 
     1734                } 
     1735            } 
     1736            if (location !is null && pt !is null) { 
    17291737                e.x = pt.x; 
    17301738                e.y = pt.y; 
     
    22182226                        listener.itemClosed(e); 
    22192227                    } 
    2220                     if (e.doit) { 
    2221                         item.dispose(); 
     2228                    if (e.doit) item.dispose(); 
     2229                    if (!isDisposed() && item.isDisposed()) { 
    22222230                        Display display = getDisplay(); 
    22232231                        Point pt = display.getCursorLocation(); 
     
    32623270    selection.showing = false; 
    32633271 
    3264     Control control = selection.control; 
    3265     if (control !is null && !control.isDisposed()) { 
    3266         control.setBounds(getClientArea()); 
    3267         control.setVisible(true); 
    3268     } 
    3269  
     3272    Control newControl = selection.control; 
     3273    Control oldControl = null; 
    32703274    if (oldIndex !is -1) { 
    3271         control = items[oldIndex].control; 
    3272         if (control !is null && !control.isDisposed()) { 
    3273             control.setVisible(false); 
     3275        oldControl = items[oldIndex].control; 
     3276    } 
     3277 
     3278    if (newControl !is oldControl) { 
     3279        if (newControl !is null && !newControl.isDisposed()) { 
     3280            newControl.setBounds(getClientArea()); 
     3281            newControl.setVisible(true); 
     3282        } 
     3283        if (oldControl !is null && !oldControl.isDisposed()) { 
     3284            oldControl.setVisible(false); 
    32743285        } 
    32753286    }