Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java22
1 files changed, 11 insertions, 11 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 0437f78610..54c0ecdb17 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
@@ -519,12 +519,12 @@ void createColumn (TableColumn column, int index) {
TableItem item = items [i];
if (item != null) {
int /*long*/ oldItem = item.handle;
- /* the first three columns contain int values, subsequent columns contain pointers */
- for (int j=0; j<3; j++) {
+ /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+ for (int j=0; j<FOREGROUND_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
}
- for (int j=3; j<modelLength; j++) {
+ for (int j=FOREGROUND_COLUMN; j<modelLength; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
if (types [j] == OS.G_TYPE_STRING ()) {
@@ -962,12 +962,12 @@ void destroyItem (TableColumn column) {
TableItem item = items [i];
if (item != null) {
int /*long*/ oldItem = item.handle;
- /* the first three columns contain int values, subsequent columns contain pointers */
- for (int j=0; j<3; j++) {
+ /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+ for (int j=0; j<FOREGROUND_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
}
- for (int j=3; j<FIRST_COLUMN; j++) {
+ for (int j=FOREGROUND_COLUMN; j<FIRST_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
if (ptr [0] != 0) {
@@ -1009,11 +1009,11 @@ void destroyItem (TableColumn column) {
if (item != null) {
int /*long*/ iter = item.handle;
int modelIndex = column.modelIndex;
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1);
Font [] cellFont = item.cellFont;
if (cellFont != null) {

Back to the top