summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe>2007-07-17 19:05:35 +0000
committerBogdan Gheorghe <gheorghe>2007-07-17 19:05:35 +0000
commit032721721e5a61fc56a8e6cdc454700c34588ee0 (patch)
tree2cd26473661c0d512ff82cf08d6a089cf06607a2 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org
parent0ea3ba112b0ceff1fe244cd0857e6be23b89ecd1 (diff)
downloadeclipse.platform.swt-032721721e5a61fc56a8e6cdc454700c34588ee0.tar.gz
eclipse.platform.swt-032721721e5a61fc56a8e6cdc454700c34588ee0.tar.xz
eclipse.platform.swt-032721721e5a61fc56a8e6cdc454700c34588ee0.zip
167562 SIGSEGV in Tree#destroyItem()
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java15
2 files changed, 2 insertions, 28 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 7f6316d0d6..7657f94474 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -2337,22 +2337,9 @@ public void removeAll () {
}
items = new TableItem [4];
itemCount = 0;
-
- /*
- * Bug in GTK. In version 2.3.2, when the property fixed-height-mode
- * is set and there are items in the list, OS.gtk_list_store_clear()
- * segment faults. The fix is to create a new empty model instead.
- */
int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
-// OS.gtk_list_store_clear (modelHandle);
- int /*long*/ oldModel = modelHandle;
- int /*long*/[] types = getColumnTypes (Math.max (1,columnCount));
- int /*long*/ newModel = OS.gtk_list_store_newv (types.length, types);
- if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- OS.gtk_tree_view_set_model (handle, newModel);
- OS.g_object_unref (oldModel);
- modelHandle = newModel;
+ OS.gtk_list_store_clear (modelHandle);
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
resetCustomDraw ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 8c983903d0..2f0c64ab68 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -2274,22 +2274,9 @@ public void removeAll () {
if (item != null && !item.isDisposed ()) item.release (false);
}
items = new TreeItem[4];
- /*
- * Bug in GTK. In version 2.3.2, when the property fixed-height-mode
- * is set and there are items in the list, OS.gtk_tree_store_clear()
- * segment faults. The fix is to create a new empty model instead.
- */
int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
- // TODO verify if true for tree store
- //OS.gtk_tree_store_clear (modelHandle);
- int /*long*/ oldModel = modelHandle;
- int /*long*/[] types = getColumnTypes (Math.max (1,columnCount));
- int /*long*/ newModel = OS.gtk_tree_store_newv (types.length, types);
- if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
- OS.gtk_tree_view_set_model (handle, newModel);
- OS.g_object_unref (oldModel);
- modelHandle = newModel;
+ OS.gtk_tree_store_clear (modelHandle);
OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
/* Disable searching when using VIRTUAL */