summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java8
7 files changed, 14 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index 77d5d6b13d..1ff010bfd8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -294,7 +294,7 @@ void createHandle (int index) {
groupHandle = OS.gtk_radio_button_new (0);
if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (groupHandle);
- OS.gtk_object_sink (groupHandle);
+ g_object_ref_sink(groupHandle);
handle = OS.gtk_radio_button_new (OS.gtk_radio_button_get_group (groupHandle));
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
break;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
index 40e6c20bc5..08a15d7c10 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
@@ -128,7 +128,7 @@ void createHandle(int index) {
labelHandle = OS.gtk_label_new (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (labelHandle);
- OS.gtk_object_sink (labelHandle);
+ g_object_ref_sink (labelHandle);
clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (fixedHandle, handle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 69f6ae0f87..26e46e4c7b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -257,7 +257,7 @@ void createHandle (int index) {
groupHandle = OS.gtk_radio_menu_item_new (0);
if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (groupHandle);
- OS.gtk_object_sink (groupHandle);
+ g_object_ref_sink(groupHandle);
int /*long*/ group = OS.gtk_radio_menu_item_get_group (groupHandle);
handle = OS.gtk_radio_menu_item_new_with_label (group, buffer);
break;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index deed81c947..426bbc4b52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2461,7 +2461,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
tooltipsHandle = OS.gtk_tooltips_new ();
if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (tooltipsHandle);
- OS.gtk_object_sink (tooltipsHandle);
+ g_object_ref_sink(tooltipsHandle);
}
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index c7da6c4393..4550f3869a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -278,7 +278,7 @@ void createHandle (int index) {
OS.gtk_tooltips_force_window (handle);
}
OS.g_object_ref (handle);
- OS.gtk_object_sink (handle);
+ g_object_ref_sink(handle);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
index 2a82fb8e45..5506a95dc2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
@@ -591,7 +591,7 @@ public void setToolTipText (String string) {
tooltipsHandle = OS.gtk_tooltips_new ();
if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.g_object_ref (tooltipsHandle);
- OS.gtk_object_sink (tooltipsHandle);
+ g_object_ref_sink(tooltipsHandle);
}
if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
OS.gtk_status_icon_set_tooltip (handle, buffer);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index eb3bbcd8c5..824d4e47b9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -1673,6 +1673,14 @@ int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*lon
int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
return 0;
}
+int /*long*/ g_object_ref_sink (int /*long*/ object) {
+ if (OS.GLIB_VERSION >= OS.VERSION (2, 10, 0)) {
+ return OS.g_object_ref_sink (object);
+ } else {
+ OS.gtk_object_sink (object);
+ }
+ return 0;
+}
/**
* Returns a string containing a concise, human-readable