# HG changeset patch # User Frank Benoit # Date 1225751730 -3600 # Node ID f1bb3949939b271aacb161b9927584008b0c558a # Parent 373b48b9eaf0667db647c5fb1939aa62e7bbaa79 Update to SWT 3.4.1 diff -r 373b48b9eaf0 -r f1bb3949939b dsss.conf --- a/dsss.conf Sun Nov 02 01:30:09 2008 -0800 +++ b/dsss.conf Mon Nov 03 23:35:30 2008 +0100 @@ -1,4 +1,5 @@ [dwt] +buildflags+=-Jres type=library diff -r 373b48b9eaf0 -r f1bb3949939b dwt/custom/CCombo.d --- a/dwt/custom/CCombo.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/custom/CCombo.d Mon Nov 03 23:35:30 2008 +0100 @@ -532,7 +532,7 @@ list.deselectAll (); } void dropDown (bool drop) { - if (drop is isDropped () || !isVisible()) return; + if (drop is isDropped ()) return; if (!drop) { popup.setVisible (false); if (!isDisposed () && isFocusControl()) { @@ -540,7 +540,7 @@ } return; } - + if (!isVisible()) return; if (getShell() !is popup.getParent ()) { String[] items = list.getItems (); int selectionIndex = list.getSelectionIndex (); diff -r 373b48b9eaf0 -r f1bb3949939b dwt/internal/Library.d --- a/dwt/internal/Library.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/internal/Library.d Mon Nov 03 23:35:30 2008 +0100 @@ -35,7 +35,7 @@ /** * DWT Minor version number (must be in the range 0..999) */ - static const int MINOR_VERSION = 448; + static const int MINOR_VERSION = 449; /** * DWT revision number (must be >= 0) diff -r 373b48b9eaf0 -r f1bb3949939b dwt/internal/gtk/OS.d --- a/dwt/internal/gtk/OS.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/internal/gtk/OS.d Mon Nov 03 23:35:30 2008 +0100 @@ -1239,6 +1239,7 @@ mixin ForwardGtkOsCFunc!(.XSetIOErrorHandler); mixin ForwardGtkOsCFunc!(.XSetErrorHandler); mixin ForwardGtkOsCFunc!(.XSetInputFocus); + mixin ForwardGtkOsCFunc!(.XSetTransientForHint); mixin ForwardGtkOsCFunc!(.XSynchronize); mixin ForwardGtkOsCFunc!(.XTestFakeButtonEvent); mixin ForwardGtkOsCFunc!(.XTestFakeKeyEvent); diff -r 373b48b9eaf0 -r f1bb3949939b dwt/program/Program.d --- a/dwt/program/Program.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/program/Program.d Mon Nov 03 23:35:30 2008 +0100 @@ -246,7 +246,7 @@ if (desktop is DESKTOP_UNKNOWN) { String gnomeName = "_NET_SUPPORTING_WM_CHECK"; int /*long*/ gnome = OS.XInternAtom(xDisplay, gnomeName.ptr, true); - if (gnome !is OS.None && gnome_init()) { + if (gnome !is OS.None && (OS.GTK_VERSION >= OS.buildVERSION (2, 2, 0)) && gnome_init()) { desktop = DESKTOP_GNOME; int icon_theme = cast(int)GNOME.gnome_icon_theme_new(); display.setData(ICON_THEME_DATA, new ValueWrapperInt(icon_theme)); diff -r 373b48b9eaf0 -r f1bb3949939b dwt/widgets/Combo.d --- a/dwt/widgets/Combo.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/widgets/Combo.d Mon Nov 03 23:35:30 2008 +0100 @@ -71,6 +71,7 @@ alias Composite.computeSize computeSize; alias Composite.createHandle createHandle; alias Composite.dragDetect dragDetect; + alias Composite.gtk_button_press_event gtk_button_press_event; alias Composite.setBackgroundColor setBackgroundColor; alias Composite.setBounds setBounds; alias Composite.setForegroundColor setForegroundColor; @@ -924,7 +925,7 @@ *
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  • * - * + * * @since 3.4 */ public bool getListVisible () { @@ -1133,7 +1134,11 @@ * send the mouse event from the event_after handler. */ if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { - if (event.type is OS.GDK_BUTTON_PRESS) return 0; + GdkEventButton* gdkEvent = event; + if (gdkEvent.type is OS.GDK_BUTTON_PRESS && gdkEvent.button is 1 && (style & DWT.READ_ONLY) !is 0) { + return gtk_button_press_event(widget, event, false); + } + } return super.gtk_button_press_event (widget, event); } @@ -1277,7 +1282,7 @@ case OS.GDK_BUTTON_PRESS: { GdkEventButton* gdkEventButton = cast(GdkEventButton*)event; if (gdkEventButton.button is 1) { - if (!sendMouseEvent (DWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) { + 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)) { return 1; } if (OS.GTK_VERSION >= OS.buildVERSION (2, 6, 0)) { @@ -1966,7 +1971,7 @@ *
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  • * - * + * * @since 3.4 */ public void setListVisible (bool visible) { diff -r 373b48b9eaf0 -r f1bb3949939b dwt/widgets/Composite.d --- a/dwt/widgets/Composite.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/widgets/Composite.d Mon Nov 03 23:35:30 2008 +0100 @@ -71,6 +71,7 @@ alias Scrollable.computeSize computeSize; alias Scrollable.fixStyle fixStyle; alias Scrollable.forceFocus forceFocus; + alias Scrollable.gtk_button_press_event gtk_button_press_event; alias Scrollable.moveAbove moveAbove; alias Scrollable.moveBelow moveBelow; alias Scrollable.setBounds setBounds; diff -r 373b48b9eaf0 -r f1bb3949939b dwt/widgets/Control.d --- a/dwt/widgets/Control.d Sun Nov 02 01:30:09 2008 -0800 +++ b/dwt/widgets/Control.d Mon Nov 03 23:35:30 2008 +0100 @@ -78,7 +78,7 @@ * IMPORTANT: This class is intended to be subclassed only * within the DWT implementation. *

    - * + * * @see Control snippets * @see DWT Example: ControlExample * @see Sample code and further information @@ -337,7 +337,7 @@ /** * Prints the receiver and all children. - * + * * @param gc the gc where the drawing occurs * @return true if the operation was successful and false otherwise * @@ -349,7 +349,7 @@ *
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • *
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  • * - * + * * @since 3.4 */ public bool print (GC gc) { @@ -1000,7 +1000,7 @@ * * @exception IllegalArgumentException + * * @exception DWTException