OSDN Git Service

SDK Manager: Fix disabled quit menu on Mac. Do not merge.
authorRaphael <raphael@google.com>
Wed, 12 Oct 2011 22:45:44 +0000 (15:45 -0700)
committerRaphael Moll <raphael@google.com>
Mon, 17 Oct 2011 17:47:51 +0000 (10:47 -0700)
This was due to the shell being marked as app_modal.
SDK Bug: 20616

(cherry picked from commit ae3597ad203b835eeded92fc01466456cfeccf39)

Change-Id: Ic1f7d79efcabd28700978c4ac8ae13b283146c8e

sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AvdManagerWindowImpl1.java
sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/SdkUpdaterWindowImpl2.java

index 0e5c3d0..a26e7ef 100755 (executable)
@@ -28,9 +28,9 @@ import com.android.sdkuilib.internal.repository.UpdaterPage;
 import com.android.sdkuilib.internal.repository.UpdaterPage.Purpose;\r
 import com.android.sdkuilib.internal.repository.icons.ImageFactory;\r
 import com.android.sdkuilib.internal.repository.sdkman1.AvdManagerPage;\r
+import com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext;\r
 import com.android.sdkuilib.repository.ISdkChangeListener;\r
 import com.android.sdkuilib.repository.SdkUpdaterWindow;\r
-import com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext;\r
 import com.android.sdkuilib.ui.GridDataBuilder;\r
 import com.android.sdkuilib.ui.GridLayoutBuilder;\r
 import com.android.sdkuilib.ui.SwtBaseDialog;\r
@@ -154,15 +154,9 @@ public class AvdManagerWindowImpl1 {
         // or a dialog trim when invoked from somewhere else.\r
         int style = SWT.SHELL_TRIM;\r
         if (mContext != AvdInvocationContext.STANDALONE) {\r
-            style = SWT.DIALOG_TRIM;\r
-        }\r
-        if (SdkConstants.currentPlatform() != SdkConstants.PLATFORM_LINUX ||\r
-                mContext != AvdInvocationContext.STANDALONE) {\r
-            // Ideally we want the window to be app-modal, but this prevents the\r
-            // log window from working properly on Linux so don't use the app modal\r
-            // flag if this is linux and the app is standalone.\r
-            style += SWT.APPLICATION_MODAL;\r
+            style = SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL;\r
         }\r
+\r
         mShell = new Shell(mParentShell, style);\r
         mShell.addDisposeListener(new DisposeListener() {\r
             public void widgetDisposed(DisposeEvent e) {\r
index 9385793..d7d8dc6 100755 (executable)
@@ -34,8 +34,8 @@ import com.android.sdkuilib.internal.tasks.ProgressView;
 import com.android.sdkuilib.internal.tasks.ProgressViewFactory;\r
 import com.android.sdkuilib.internal.widgets.ImgDisabledButton;\r
 import com.android.sdkuilib.internal.widgets.ToggleButton;\r
-import com.android.sdkuilib.repository.ISdkChangeListener;\r
 import com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext;\r
+import com.android.sdkuilib.repository.ISdkChangeListener;\r
 import com.android.sdkuilib.repository.SdkUpdaterWindow.SdkInvocationContext;\r
 import com.android.sdkuilib.ui.GridDataBuilder;\r
 import com.android.sdkuilib.ui.GridLayoutBuilder;\r
@@ -169,15 +169,9 @@ public class SdkUpdaterWindowImpl2 implements ISdkUpdaterWindow {
         // or a dialog trim when invoked from somewhere else.\r
         int style = SWT.SHELL_TRIM;\r
         if (mContext != SdkInvocationContext.STANDALONE) {\r
-            style = SWT.DIALOG_TRIM;\r
-        }\r
-        if (SdkConstants.currentPlatform() != SdkConstants.PLATFORM_LINUX ||\r
-                mContext != SdkInvocationContext.STANDALONE) {\r
-            // Ideally we want the window to be app-modal, but this prevents the\r
-            // log window from working properly on Linux so don't use the app modal\r
-            // flag if this is linux and the app is standalone.\r
-            style += SWT.APPLICATION_MODAL;\r
+            style = SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL;\r
         }\r
+\r
         mShell = new Shell(mParentShell, style);\r
         mShell.addDisposeListener(new DisposeListener() {\r
             public void widgetDisposed(DisposeEvent e) {\r