--- PlatformDefaults.java.ORIG	2008-10-29 16:33:30.000000000 +0100
+++ PlatformDefaults.java	2009-01-14 21:37:27.000000000 +0100
@@ -36,7 +36,7 @@
  *         Date: 2006-sep-08
  */
 
-/** Currently handles Windows and Mac OS X spacing.
+/** Currently handles Windows, Mac OS X, and GNOME spacing.
  */
 public final class PlatformDefaults
 {
@@ -48,30 +48,34 @@
 	private static volatile int MOD_COUNT = 0;
 
 	private static final UnitValue LPX4 = new UnitValue(4, UnitValue.LPX, null);
+	private static final UnitValue LPX6 = new UnitValue(6, UnitValue.LPX, null);
 	private static final UnitValue LPX7 = new UnitValue(7, UnitValue.LPX, null);
 //	private static final UnitValue LPX8 = new UnitValue(8, UnitValue.LPX, null);
 	private static final UnitValue LPX9 = new UnitValue(9, UnitValue.LPX, null);
 	private static final UnitValue LPX10 = new UnitValue(10, UnitValue.LPX, null);
 	private static final UnitValue LPX11 = new UnitValue(11, UnitValue.LPX, null);
-//	private static final UnitValue LPX12 = new UnitValue(12, UnitValue.LPX, null);
+	private static final UnitValue LPX12 = new UnitValue(12, UnitValue.LPX, null);
 	private static final UnitValue LPX14 = new UnitValue(14, UnitValue.LPX, null);
 	private static final UnitValue LPX16 = new UnitValue(16, UnitValue.LPX, null);
+	private static final UnitValue LPX18 = new UnitValue(18, UnitValue.LPX, null);
 	private static final UnitValue LPX20 = new UnitValue(20, UnitValue.LPX, null);
 
 	private static final UnitValue LPY4 = new UnitValue(4, UnitValue.LPY, null);
+	private static final UnitValue LPY6 = new UnitValue(6, UnitValue.LPY, null);
 	private static final UnitValue LPY7 = new UnitValue(7, UnitValue.LPY, null);
 //	private static final UnitValue LPY8 = new UnitValue(8, UnitValue.LPY, null);
 	private static final UnitValue LPY9 = new UnitValue(9, UnitValue.LPY, null);
 	private static final UnitValue LPY10 = new UnitValue(10, UnitValue.LPY, null);
 	private static final UnitValue LPY11 = new UnitValue(11, UnitValue.LPY, null);
-//	private static final UnitValue LPY12 = new UnitValue(12, UnitValue.LPY, null);
+	private static final UnitValue LPY12 = new UnitValue(12, UnitValue.LPY, null);
 	private static final UnitValue LPY14 = new UnitValue(14, UnitValue.LPY, null);
 	private static final UnitValue LPY16 = new UnitValue(16, UnitValue.LPY, null);
+	private static final UnitValue LPY18 = new UnitValue(18, UnitValue.LPY, null);
 	private static final UnitValue LPY20 = new UnitValue(20, UnitValue.LPY, null);
 
 	public static final int WINDOWS_XP = 0;
 	public static final int MAC_OSX = 1;
-//	private static final int GNOME = 2;
+	private static final int GNOME = 2;
 //	private static final int KDE = 3;
 
 	private static int CUR_PLAF = WINDOWS_XP;
@@ -101,7 +105,7 @@
 
 	/** I value indicating that the screen DPI will be used as a base for calculating the
 	 * logical pixel size.
-	 * <p>§
+	 * <p>
 	 * This is the default value.
 	 * @see net.miginfocom.layout.UnitValue#LPX
 	 * @see net.miginfocom.layout.UnitValue#LPY
@@ -131,11 +135,14 @@
 	}
 
 	/** Returns the platform that the JRE is running on currently.
-	 * @return The platform that the JRE is running on currently. E.g. {@link #MAC_OSX} or {@link #WINDOWS_XP}.
+	 * @return The platform that the JRE is running on currently. E.g. {@link #MAC_OSX}, {@link #WINDOWS_XP}, or {@link #GNOME}.
 	 */
 	public static int getCurrentPlatform()
 	{
-		return System.getProperty("os.name").startsWith("Mac OS") ? MAC_OSX : WINDOWS_XP;
+    final String os = System.getProperty("os.name");
+    if (os.startsWith("Mac OS")) return MAC_OSX;
+    else if (os.startsWith("Linux")) return GNOME;
+    else return WINDOWS_XP;
 	}
 
 	private PlatformDefaults()
@@ -143,15 +150,18 @@
 	}
 
 	/** Set the defaults to the default for the platform
-	 * @param plaf The platform. <code>PlatformDefaults.WINDOWS</code> or <code>PlatformDefaults.MAC_OSX</code>
+	 * @param plaf The platform. <code>PlatformDefaults.WINDOWS_XP</code>,
+	 * <code>PlatformDefaults.MAC_OSX</code>, or
+	 * <code>PlatformDefaults.GNOME</code>.
 	 */
 	public static void setPlatform(int plaf)
 	{
-		if (plaf < WINDOWS_XP || plaf > MAC_OSX)
+		if (plaf < WINDOWS_XP || plaf > GNOME)
 			throw new IllegalArgumentException("Unknown platform: " + plaf);
 
 		CUR_PLAF = plaf;
-		if (plaf == WINDOWS_XP) {
+    switch (plaf) {
+		case WINDOWS_XP:
 			setRelatedGap(LPX4, LPY4);
 			setUnrelatedGap(LPX7, LPY9);
 			setParagraphGap(LPX14, LPY14);
@@ -163,7 +173,8 @@
 			setDialogInsets(LPY11, LPX11, LPY11, LPX11);
 			setPanelInsets(LPY7, LPX7, LPY7, LPX7);
 			BASE_DPI = 96;
-		} else {
+      break;
+    case MAC_OSX:
 			setRelatedGap(LPX4, LPY4);
 			setUnrelatedGap(LPX7, LPY9);
 			setParagraphGap(LPX14, LPY14);
@@ -189,6 +200,20 @@
 			} catch (Throwable t) {
 				BASE_DPI = 72;
 			}
+      break;
+    case GNOME:
+      setRelatedGap(LPX6, LPY6);                    // GNOME HIG 8.2.3
+			setUnrelatedGap(LPX12, LPY12);                // GNOME HIG 8.2.3
+			setParagraphGap(LPX18, LPY18);                // GNOME HIG 8.2.3
+			setIndentGap(LPX12, LPY12);                   // GNOME HIG 8.2.3
+			setGridCellGap(LPX6, LPY6);                   // GNOME HIG 8.2.3
+
+      // GtkButtonBox, child-min-width property default value
+			setMinimumButtonWidth(new UnitValue(85, UnitValue.LPX, null));
+      setButtonOrder("L_HE+UNYACBXIO_R");           // GNOME HIG 3.4.2, 3.7.1
+			setDialogInsets(LPY12, LPX12, LPY12, LPX12);  // GNOME HIG 3.4.3
+			setPanelInsets(LPY6, LPX6, LPY6, LPX6);       // ???
+			BASE_DPI = 96;
 		}
 	}
 
@@ -449,7 +474,10 @@
 	 * <p>
 	 * Even though the style tags are normally applied to buttons this works with all components.
 	 * <p>
-	 * The normal style for MAC OS X is <code>"L_HE+U+FBI_NYCOA_R"</code> and for Windows is <code>"L_E+U+FBI_YNOCAH_R"</code>
+	 * The normal style for MAC OS X is <code>"L_HE+U+FBI_NYCOA_R"</code>,
+	 * for Windows is <code>"L_E+U+FBI_YNOCAH_R"</code>, and for GNOME is
+	 * <code>"L_HE+UNYACBXIO_R"</code>.
+	 *
 	 * @param order The new button order for the current platform.
 	 */
 	public static final void setButtonOrder(String order)
@@ -710,4 +738,4 @@
 	{
 		dra = b;
 	}
-}
\ No newline at end of file
+}
