aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-06 11:10:11 (EST)
committerSilenio Quarti2012-03-09 17:28:51 (EST)
commitcf2b66d490bff744ecd1ca3533d187040b308649 (patch)
tree09d4e832b4f3c02d9a15371171f53e30e153389f
parent4c663d635aec54a09b499d1d5f75818086111360 (diff)
downloadeclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.zip
eclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.tar.gz
eclipse.platform.swt-cf2b66d490bff744ecd1ca3533d187040b308649.tar.bz2
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 3fb89d6..c63d83d 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;