Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-06 16:10:11 +0000
committerSilenio Quarti2012-03-09 22:28:51 +0000
commitcf2b66d490bff744ecd1ca3533d187040b308649 (patch)
tree09d4e832b4f3c02d9a15371171f53e30e153389f
parent4c663d635aec54a09b499d1d5f75818086111360 (diff)
downloadeclipse.platform.ui-cf2b66d490bff744ecd1ca3533d187040b308649.tar.gz
eclipse.platform.ui-cf2b66d490bff744ecd1ca3533d187040b308649.tar.xz
eclipse.platform.ui-cf2b66d490bff744ecd1ca3533d187040b308649.zip
Remove unneeded gtk version checks.
Checking whether we have gtk 2.4 or newer is pointless as older versions are not supported.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java44
1 files changed, 19 insertions, 25 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 3fb89d6fb0a..c63d83d26f5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -2593,13 +2593,11 @@ void initializeCallbacks () {
}
void initializeSubclasses () {
- if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
- int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
- int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
- pangoLayoutNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass);
- OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, OS.pangoLayoutNewProc_CALLBACK(pangoLayoutNewProc));
- OS.g_type_class_unref (pangoLayoutClass);
- }
+ int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
+ int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
+ pangoLayoutNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass);
+ OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, OS.pangoLayoutNewProc_CALLBACK(pangoLayoutNewProc));
+ OS.g_type_class_unref (pangoLayoutClass);
}
void initializeSystemSettings () {
@@ -2632,17 +2630,15 @@ void initializeWidgetTable () {
void initializeWindowManager () {
/* Get the window manager name */
windowManager = ""; //$NON-NLS-1$
- if (OS.GTK_VERSION >= OS.VERSION (2, 2, 0)) {
- int /*long*/ screen = OS.gdk_screen_get_default ();
- if (screen != 0) {
- int /*long*/ ptr2 = OS.gdk_x11_screen_get_window_manager_name (screen);
- if (ptr2 != 0) {
- int length = OS.strlen (ptr2);
- if (length > 0) {
- byte [] buffer2 = new byte [length];
- OS.memmove (buffer2, ptr2, length);
- windowManager = new String (Converter.mbcsToWcs (null, buffer2));
- }
+ int /*long*/ screen = OS.gdk_screen_get_default ();
+ if (screen != 0) {
+ int /*long*/ ptr2 = OS.gdk_x11_screen_get_window_manager_name (screen);
+ if (ptr2 != 0) {
+ int length = OS.strlen (ptr2);
+ if (length > 0) {
+ byte [] buffer2 = new byte [length];
+ OS.memmove (buffer2, ptr2, length);
+ windowManager = new String (Converter.mbcsToWcs (null, buffer2));
}
}
}
@@ -3385,13 +3381,11 @@ void releaseDisplay () {
signalProc = 0;
/* Dispose subclass */
- if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
- int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
- int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
- OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc);
- OS.g_type_class_unref (pangoLayoutClass);
- pangoLayoutNewProc = 0;
- }
+ int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
+ int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
+ OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc);
+ OS.g_type_class_unref (pangoLayoutClass);
+ pangoLayoutNewProc = 0;
/* Release the sleep resources */
max_priority = timeout = null;

Back to the top