diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-03-06 18:10:11 +0200 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-03-09 17:28:51 -0500 |
commit | cf2b66d490bff744ecd1ca3533d187040b308649 (patch) | |
tree | 09d4e832b4f3c02d9a15371171f53e30e153389f /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | |
parent | 4c663d635aec54a09b499d1d5f75818086111360 (diff) | |
download | eclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.tar.gz eclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.tar.xz eclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.zip |
Remove unneeded gtk version checks.
Checking whether we have gtk 2.4 or newer is pointless as older versions
are not supported.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | 44 |
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 3fb89d6fb0..c63d83d26f 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; |