Changeset 351:f1bb3949939b

Show
Ignore:
Timestamp:
11/03/08 17:35:30 (2 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Update to SWT 3.4.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dsss.conf

    r350 r351  
    11 
    22[dwt] 
     3buildflags+=-Jres 
    34type=library 
    45 
  • dwt/custom/CCombo.d

    r259 r351  
    533533} 
    534534void dropDown (bool drop) { 
    535     if (drop is isDropped () || !isVisible()) return; 
     535    if (drop is isDropped ()) return; 
    536536    if (!drop) { 
    537537        popup.setVisible (false); 
     
    541541        return; 
    542542    } 
    543  
     543    if (!isVisible()) return; 
    544544    if (getShell() !is popup.getParent ()) { 
    545545        String[] items = list.getItems (); 
  • dwt/internal/Library.d

    r259 r351  
    3636     * DWT Minor version number (must be in the range 0..999) 
    3737     */ 
    38     static const int MINOR_VERSION = 448
     38    static const int MINOR_VERSION = 449
    3939 
    4040    /** 
  • dwt/internal/gtk/OS.d

    r325 r351  
    12401240    mixin ForwardGtkOsCFunc!(.XSetErrorHandler); 
    12411241    mixin ForwardGtkOsCFunc!(.XSetInputFocus); 
     1242    mixin ForwardGtkOsCFunc!(.XSetTransientForHint); 
    12421243    mixin ForwardGtkOsCFunc!(.XSynchronize); 
    12431244    mixin ForwardGtkOsCFunc!(.XTestFakeButtonEvent); 
  • dwt/program/Program.d

    r328 r351  
    247247        String gnomeName = "_NET_SUPPORTING_WM_CHECK"; 
    248248        int /*long*/ gnome = OS.XInternAtom(xDisplay, gnomeName.ptr, true); 
    249         if (gnome !is OS.None && gnome_init()) { 
     249        if (gnome !is OS.None && (OS.GTK_VERSION >= OS.buildVERSION (2, 2, 0)) && gnome_init()) { 
    250250            desktop = DESKTOP_GNOME; 
    251251            int icon_theme = cast(int)GNOME.gnome_icon_theme_new(); 
  • dwt/widgets/Combo.d

    r259 r351  
    7272    alias Composite.createHandle createHandle; 
    7373    alias Composite.dragDetect dragDetect; 
     74    alias Composite.gtk_button_press_event gtk_button_press_event; 
    7475    alias Composite.setBackgroundColor setBackgroundColor; 
    7576    alias Composite.setBounds setBounds; 
     
    925926 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
    926927 * </ul> 
    927  *  
     928 * 
    928929 * @since 3.4 
    929930 */ 
     
    11341135    */ 
    11351136    if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { 
    1136         if (event.type is OS.GDK_BUTTON_PRESS) return 0; 
     1137        GdkEventButton* gdkEvent = event; 
     1138        if (gdkEvent.type is OS.GDK_BUTTON_PRESS && gdkEvent.button is 1 && (style & DWT.READ_ONLY) !is 0) { 
     1139            return gtk_button_press_event(widget, event, false); 
     1140        } 
     1141 
    11371142    } 
    11381143    return super.gtk_button_press_event (widget, event); 
     
    12781283                GdkEventButton* gdkEventButton = cast(GdkEventButton*)event; 
    12791284                if (gdkEventButton.button is 1) { 
    1280                     if (!sendMouseEvent (DWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) { 
     1285                    if ((style & DWT.READ_ONLY) !is 0 && !sendMouseEvent (DWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) { 
    12811286                        return 1; 
    12821287                    } 
     
    19671972 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
    19681973 * </ul> 
    1969  *  
     1974 * 
    19701975 * @since 3.4 
    19711976 */ 
  • dwt/widgets/Composite.d

    r259 r351  
    7272    alias Scrollable.fixStyle fixStyle; 
    7373    alias Scrollable.forceFocus forceFocus; 
     74    alias Scrollable.gtk_button_press_event gtk_button_press_event; 
    7475    alias Scrollable.moveAbove moveAbove; 
    7576    alias Scrollable.moveBelow moveBelow; 
  • dwt/widgets/Control.d

    r259 r351  
    7979 * within the DWT implementation. 
    8080 * </p> 
    81  *  
     81 * 
    8282 * @see <a href="http://www.eclipse.org/swt/snippets/#control">Control snippets</a> 
    8383 * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a> 
     
    338338/** 
    339339 * Prints the receiver and all children. 
    340  *  
     340 * 
    341341 * @param gc the gc where the drawing occurs 
    342342 * @return <code>true</code> if the operation was successful and <code>false</code> otherwise 
     
    350350 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
    351351 * </ul> 
    352  *  
     352 * 
    353353 * @since 3.4 
    354354 */ 
     
    10011001 * @exception IllegalArgumentException <ul> 
    10021002 *    <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li> 
    1003  * </ul>   
     1003 * </ul> 
    10041004 * @exception DWTException <ul> 
    10051005 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    24702470} 
    24712471 
    2472 /**  
     2472/** 
    24732473 * Returns the region that defines the shape of the control, 
    24742474 * or null if the control has the default shape. 
    24752475 * 
    24762476 * @return the region that defines the shape of the shell (or null) 
    2477  *   
     2477 * 
    24782478 * @exception DWTException <ul> 
    24792479 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    25492549} 
    25502550 
    2551 override int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* gdkEvent) { 
     2551override int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* event) { 
     2552    return gtk_button_press_event (widget, event, true); 
     2553
     2554 
     2555int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* gdkEvent, bool sendMouseDown) { 
    25522556    if (gdkEvent.type is OS.GDK_3BUTTON_PRESS) return 0; 
    25532557 
     
    25832587            } 
    25842588        } 
    2585         if (!sendMouseEvent (DWT.MouseDown, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state)) { 
     2589        if (sendMouseDown && !sendMouseEvent (DWT.MouseDown, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state)) { 
    25862590            result = 1; 
    25872591        }