From: giwoong.kim Date: Wed, 22 May 2013 06:27:27 +0000 (+0900) Subject: skin: manage a most recently used position X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~972 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d885d5ab3088576f2bdd640543af323007dc87c;p=sdk%2Femulator%2Fqemu.git skin: manage a most recently used position manage a most recently used position of docked KeyWindow Change-Id: Ibe41b150b1e07ca98858fa042b146df691ff4c34 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index b683eb44b5..502abffd0a 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -423,16 +423,6 @@ public class EmulatorSkin { screenShotDialog = null; } - /* close the Key Window */ - if (skinInfo.isPhoneShape() == false) { - closeKeyWindow(); - } - - /* dispose the color */ - if (colorVM != null) { - colorVM.dispose(); - } - /* save config only for emulator close */ config.setSkinProperty( SkinPropertiesConstants.WINDOW_X, shell.getLocation().x); @@ -444,7 +434,25 @@ public class EmulatorSkin { SkinPropertiesConstants.WINDOW_ROTATION, currentState.getCurrentRotationId()); config.setSkinProperty( SkinPropertiesConstants.WINDOW_ONTOP, Boolean.toString(isOnTop)); + + int dockValue = 0; + if (keyWindow != null && keyWindow.getShell().isVisible()) { + dockValue = keyWindow.getDockPosition(); + } + config.setSkinProperty( + SkinPropertiesConstants.KEYWINDOW_POSITION, dockValue); + config.saveSkinProperties(); + + /* close the Key Window */ + if (skinInfo.isPhoneShape() == false) { + closeKeyWindow(); + } + + /* dispose the color */ + if (colorVM != null) { + colorVM.dispose(); + } } if (currentState.getCurrentImage() != null) { diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java index 3048bd4299..8bcd8ab3b8 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java @@ -89,7 +89,8 @@ public class EmulatorConfig { public static final String WINDOW_Y = "window.y"; public static final String WINDOW_ROTATION = "window.rotate"; public static final String WINDOW_SCALE = "window.scale"; - public static final String WINDOW_ONTOP = "window.ontop"; // always on top + public static final String WINDOW_ONTOP = "window.ontop"; /* always on top */ + public static final String KEYWINDOW_POSITION = "window.keywindow.position"; } public interface ConfigPropertiesConstants { diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java index a4b8ce07ca..0060150c9c 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/GeneralPurposeSkinComposer.java @@ -204,10 +204,17 @@ public class GeneralPurposeSkinComposer implements ISkinComposer { arrangeSkin(scale, rotationId); /* open the key window */ + final int dockValue = config.getSkinPropertyInt( + SkinPropertiesConstants.KEYWINDOW_POSITION, 0); + shell.getDisplay().asyncExec(new Runnable() { @Override public void run() { - skin.openKeyWindow(SWT.RIGHT | SWT.CENTER, false); + if (dockValue == 0 || dockValue == SWT.NONE) { + skin.openKeyWindow(SWT.RIGHT | SWT.CENTER, false); + } else { + skin.openKeyWindow(dockValue, false); + } } }); }