summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT
diff options
context:
space:
mode:
authorArun Thondapu <arunkumar.thondapu@in.ibm.com>2012-09-11 19:16:12 +0530
committerArun Thondapu <arunkumar.thondapu@in.ibm.com>2012-09-11 20:32:23 +0530
commite146916783f37aa41636cc83669e5f610cf7343a (patch)
tree60d6fd4261724b8c74de1f48b6f5d0a29793bcbe /bundles/org.eclipse.swt/Eclipse SWT
parent1ff5dc76daca83722cbc3a22652379df0452b7e8 (diff)
downloadeclipse.platform.swt-e146916783f37aa41636cc83669e5f610cf7343a.tar.gz
eclipse.platform.swt-e146916783f37aa41636cc83669e5f610cf7343a.tar.xz
eclipse.platform.swt-e146916783f37aa41636cc83669e5f610cf7343a.zip
Bug 388265 fix formatting and remove redundant else check in Widget
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java6
7 files changed, 11 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index 1a28ecebdb..d10d2b8bf1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -160,9 +160,9 @@ String openChooserDialog () {
if (message.length () > 0) {
byte [] buffer = Converter.wcsToMbcs (null, message, true);
int /*long*/ box = 0;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)){
- box = OS.gtk_box_new(OS.GTK_ORIENTATION_HORIZONTAL, 0);
- OS.gtk_box_set_homogeneous(box, false);
+ if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) {
+ box = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0);
+ OS.gtk_box_set_homogeneous (box, false);
} else {
box = OS.gtk_hbox_new (false, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index cf156cb5c9..c515ebaf77 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
@@ -130,12 +130,7 @@ void createHandle (int index) {
fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
gtk_widget_set_has_window (fixedHandle, true);
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)){
- handle = OS.gtk_box_new(OS.GTK_ORIENTATION_VERTICAL, 0);
- OS.gtk_box_set_homogeneous(handle, false);
- } else {
- handle = OS.gtk_vbox_new (false, 0);
- }
+ handle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
if ((style & SWT.V_SCROLL) != 0) {
scrolledHandle = OS.gtk_scrolled_window_new (0, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index 232b05af5a..e8ff75e44b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -217,7 +217,7 @@ void createItem (TabItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- int /*long*/ boxHandle = gtk_box_new ( OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
+ int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
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 d859a2f916..70621ce8c7 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
@@ -658,7 +658,7 @@ void createItem (TableColumn column, int index) {
} else {
createColumn (column, index);
}
- int /*long*/ boxHandle = gtk_box_new ( OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
+ int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 6145bc6524..742d742ead 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -215,7 +215,7 @@ void createHandle (int index) {
*/
handle = OS.gtk_tool_button_new (0, null);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- arrowBoxHandle = gtk_box_new ( OS.GTK_ORIENTATION_HORIZONTAL, false, 0);;
+ arrowBoxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
if (arrowBoxHandle == 0) error(SWT.ERROR_NO_HANDLES);
arrowHandle = OS.gtk_arrow_new (OS.GTK_ARROW_DOWN, OS.GTK_SHADOW_NONE);
if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index a105fefe3c..f3a061833a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -769,7 +769,7 @@ void createItem (TreeColumn column, int index) {
} else {
createColumn (column, index);
}
- int /*long*/ boxHandle = gtk_box_new ( OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
+ int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
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 e9db87b1ae..5161141007 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
@@ -1826,7 +1826,7 @@ void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) {
}
void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) {
- if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) {
width[0] = OS.gdk_window_get_width (drawable);
height[0] = OS.gdk_window_get_height (drawable);
} else {
@@ -1836,13 +1836,13 @@ void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) {
int /*long*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) {
int /*long*/ box = 0;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) {
box = OS.gtk_box_new (orientation, spacing);
OS.gtk_box_set_homogeneous (box, homogeneous);
} else {
if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) {
box = OS.gtk_hbox_new (homogeneous, spacing);
- } else if (orientation == OS.GTK_ORIENTATION_VERTICAL) {
+ } else {
box = OS.gtk_vbox_new (homogeneous, spacing);
}
}