# HG changeset patch # User Jacob Carlborg # Date 1282770507 -7200 # Node ID b397a43d66d13e79db3cca3befe11b02a13e775f # Parent e944a4cf537bec6c8dbed09311b3eb2f4e0abac0 Updated swt linux for DMD 1.063 and latest Tango trunk. diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/accessibility/AccessibleObject.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/accessibility/AccessibleObject.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/accessibility/AccessibleObject.d Wed Aug 25 23:08:27 2010 +0200 @@ -157,7 +157,7 @@ auto atkObject = cast(AtkObject*)obj; if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_extents"); AccessibleObject object = getAccessibleObject (atkObject); - if (object is null) return 0; + if (object is null) return; *x = 0; *y = 0; *width = 0; @@ -169,7 +169,7 @@ } } AccessibleControlListener[] listeners = object.getControlListeners (); - if (listeners.length is 0) return 0; + if (listeners.length is 0) return; int parentX = *x, parentY = *y; int parentWidth = *width, parentHeight = *height; @@ -211,7 +211,7 @@ auto atkObject = cast(AtkObject*)obj; if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_position, object: {} x:{} y:{} coord:{}", atkObject, x, y, coord_type); AccessibleObject object = getAccessibleObject (atkObject); - if (object is null) return 0; + if (object is null) return; *x=0; *y=0; if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { @@ -221,7 +221,7 @@ } } AccessibleControlListener[] listeners = object.getControlListeners (); - if (listeners.length is 0) return 0; + if (listeners.length is 0) return; int parentX, parentY; parentX = *x; @@ -263,7 +263,7 @@ auto atkObject = cast(AtkObject*)obj; if (DEBUG) getDwtLogger().info (__FILE__, __LINE__, "-->atkComponent_get_size"); AccessibleObject object = getAccessibleObject (atkObject); - if (object is null) return 0; + if (object is null) return; *width=0; *height=0; if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) { @@ -274,7 +274,7 @@ } } AccessibleControlListener[] listeners = object.getControlListeners (); - if (listeners.length is 0) return 0; + if (listeners.length is 0) return; int parentWidth, parentHeight; parentWidth= *width; diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/TableCursor.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/TableCursor.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/TableCursor.d Wed Aug 25 23:08:27 2010 +0200 @@ -208,7 +208,7 @@ public void handleEvent(Event event) { switch (event.type) { case SWT.Dispose : - dispose(event); + TableCursor.dispose(event); break; case SWT.FocusIn : case SWT.FocusOut : diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/dnd/ClipboardProxy.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/dnd/ClipboardProxy.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/dnd/ClipboardProxy.d Wed Aug 25 23:08:27 2010 +0200 @@ -119,7 +119,7 @@ * This function provides the data to the clipboard on request. * When this clipboard is disposed, the data will no longer be available. */ -void getFunc( +int getFunc( GtkClipboard *clipboard, GtkSelectionData *selectionData, uint info) diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/Device.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/Device.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/Device.d Wed Aug 25 23:08:27 2010 +0200 @@ -699,7 +699,7 @@ } OS.g_log_default_handler (log_domain, log_level, message, user_data); } - return 0; + return; } void new_Object (Object object) { diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/printing/PrintDialog.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/printing/PrintDialog.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/printing/PrintDialog.d Wed Aug 25 23:08:27 2010 +0200 @@ -345,7 +345,7 @@ int /*long*/ hookId = 0; if ((getStyle () & SWT.RIGHT_TO_LEFT) !is 0) { signalId = OS.g_signal_lookup (OS.map.ptr, OS.GTK_TYPE_WIDGET()); - hookId = OS.g_signal_add_emission_hook (signalId, 0, cast(GSignalEmissionHook)cast(void*)(cast(LONG) display.getData (GET_EMISSION_PROC_KEY)).value, handle, null); + hookId = OS.g_signal_add_emission_hook (signalId, 0, cast(GSignalEmissionHook)cast(void*)(cast(LONG) display.getData (GET_EMISSION_PROC_KEY)).intValue, handle, null); } display.setData (ADD_IDLE_PROC_KEY, null); Object oldModal = null; diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/program/Program.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/program/Program.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/program/Program.d Wed Aug 25 23:08:27 2010 +0200 @@ -232,7 +232,7 @@ static int getDesktop(Display display) { if (display is null) return DESKTOP_UNKNOWN; Integer desktopValue = cast(Integer)display.getData(DESKTOP_DATA); - if (desktopValue !is null) return desktopValue.value; + if (desktopValue !is null) return desktopValue.intValue; int desktop = DESKTOP_UNKNOWN; /* Get the list of properties on the root window. */ @@ -275,14 +275,13 @@ * Note. gnome_icon_theme_new uses g_object_new to allocate the * data it returns. Use g_object_unref to free the pointer it returns. */ - if (gnomeIconTheme.value !is 0) OS.g_object_unref( cast(void*)gnomeIconTheme.value); + if (gnomeIconTheme.intValue !is 0) OS.g_object_unref( cast(void*)gnomeIconTheme.intValue); } }); /* Check for libgnomevfs-2 version 2.4 */ String buffer = "libgnomevfs-2.so.0"; - SharedLib.tryUseSymbol( "gnome_vfs_url_show", buffer, (void*){ - desktop = DESKTOP_GNOME_24; - }); + void delegate (void*) dg = (void*){ desktop = DESKTOP_GNOME_24; }; + SharedLib.tryUseSymbol( "gnome_vfs_url_show", buffer, dg); if( desktop is DESKTOP_GNOME_24 ){ SharedLib.loadLibSymbols( GNOME.symbols, buffer ); } @@ -689,10 +688,10 @@ buffer = (fromStringz( application.id) ~ '\0')._idup(); Integer gnomeIconTheme = cast(Integer)display.getData(ICON_THEME_DATA); - char* icon_name = GNOME.gnome_icon_lookup( cast(GtkIconTheme*) gnomeIconTheme.value, null, null, cast(char*)buffer.ptr, null, mimeTypeBuffer, + char* icon_name = GNOME.gnome_icon_lookup( cast(GtkIconTheme*) gnomeIconTheme.intValue, null, null, cast(char*)buffer.ptr, null, mimeTypeBuffer, GNOME.GNOME_ICON_LOOKUP_FLAGS_NONE, null); char* path = null; - if (icon_name !is null) path = GNOME.gnome_icon_theme_lookup_icon(cast(GtkIconTheme*)gnomeIconTheme.value, icon_name, PREFERRED_ICON_SIZE, null, null); + if (icon_name !is null) path = GNOME.gnome_icon_theme_lookup_icon(cast(GtkIconTheme*)gnomeIconTheme.intValue, icon_name, PREFERRED_ICON_SIZE, null, null); if (path !is null) { program.iconPath = fromStringz( path)._idup(); OS.g_free(path); diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Display.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Display.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Display.d Wed Aug 25 23:08:27 2010 +0200 @@ -1241,11 +1241,10 @@ } if (!dispatch) { addGdkEvent (OS.gdk_event_copy (event)); - return 0; + return; } OS.gtk_main_do_event (event); if (dispatchEvents is null) putGdkEvents (); - return 0; } /** @@ -2805,7 +2804,7 @@ void menuPositionProc (GtkMenu* menu, int* x, int* y, int* push_in, void* user_data) { Widget widget = getWidget (cast(GtkWidget*)menu); - if (widget is null) return 0; + if (widget is null) return; widget.menuPositionProc (menu, x, y, push_in, user_data); } @@ -3553,7 +3552,7 @@ auto wrap = cast(ArrayWrapperObject) value; if( wrap is null ) SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " []"); Object [] data = wrap.array; - auto handle = (cast(LONG) data [0]).value; + auto handle = (cast(LONG) data [0]).intValue; Widget widget = cast(Widget) data [1]; if (widget !is null) { addWidget (cast(GtkWidget*)handle, widget); @@ -3954,7 +3953,7 @@ void sizeAllocateProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) { Widget widget = getWidget ( cast(GtkWidget*)user_data); - if (widget is null) return 0; + if (widget is null) return; widget.sizeAllocateProc (handle, arg0, user_data); } @@ -3991,7 +3990,7 @@ void treeSelectionProcMeth (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void* data) { Widget widget = getWidget (cast(GtkWidget*)data); - if (widget is null) return 0; + if (widget is null) return; widget.treeSelectionProc (model, path, iter, treeSelection, treeSelectionLength++); } diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/List.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/List.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/List.d Wed Aug 25 23:08:27 2010 +0200 @@ -1558,7 +1558,6 @@ selection [length_] = indices[0]; } } - return 0; } } diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Table.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Table.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Table.d Wed Aug 25 23:08:27 2010 +0200 @@ -236,7 +236,7 @@ customDraw = column.customDraw; } } - if (modelIndex is -1) return 0; + if (modelIndex is -1) return; bool setData = false; if ((style & SWT.VIRTUAL) !is 0) { /* @@ -259,7 +259,7 @@ if (imageList !is null && imageList.pixbufs.length > 0) { if (isPixbuf) OS.g_object_set1 (cell, OS.pixbuf.ptr, cast(int)imageList.pixbufs [0] ); } - return 0; + return; } } if (!item.cached) { diff -r e944a4cf537b -r b397a43d66d1 org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Tree.d --- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Tree.d Sun Aug 22 18:53:29 2010 +0200 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/widgets/Tree.d Wed Aug 25 23:08:27 2010 +0200 @@ -277,7 +277,7 @@ customDraw = column.customDraw; } } - if (modelIndex is -1) return 0; + if (modelIndex is -1) return; bool setData = false; if ((style & SWT.VIRTUAL) !is 0) { /* @@ -300,7 +300,7 @@ if (imageList !is null && imageList.pixbufs.length > 0) { if (isPixbuf) OS.g_object_set1 (cell, OS.pixbuf.ptr, cast(int)imageList.pixbufs [0]); } - return 0; + return; } } if (!item.cached) { @@ -1990,7 +1990,7 @@ } override void gtk_row_activated (GtkTreeView* tree, GtkTreePath* path, GtkTreeViewColumn* column) { - if (path is null) return 0; + if (path is null) return; TreeItem item = null; GtkTreeIter iter; if (OS.gtk_tree_model_get_iter (modelHandle, &iter, path)) { @@ -2001,7 +2001,7 @@ Event event = new Event (); event.item = item; postEvent (SWT.DefaultSelection, event); - return 0; + return; } override int gtk_test_collapse_row ( @@ -2675,7 +2675,7 @@ } } } - return result; + //return result; } void resetCustomDraw () { @@ -3330,7 +3330,6 @@ OS.gtk_tree_model_get1 (modelHandle, iter, ID_COLUMN, cast(void**)&index); selection [length_] = index; } - return 0; } override void updateScrollBarValue (ScrollBar bar) {