menu: modified rotation menu name
authorgiwoong.kim <giwoong.kim@samsung.com>
Fri, 15 Mar 2013 05:52:50 +0000 (14:52 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 15 Mar 2013 05:52:50 +0000 (14:52 +0900)
modified rotation menu name

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java

index 5ed3d9a..2393efa 100644 (file)
@@ -65,6 +65,7 @@ import org.eclipse.swt.widgets.Shell;
 import org.tizen.emulator.skin.comm.ICommunicator.KeyEventType;
 import org.tizen.emulator.skin.comm.ICommunicator.MouseButtonType;
 import org.tizen.emulator.skin.comm.ICommunicator.MouseEventType;
+import org.tizen.emulator.skin.comm.ICommunicator.RotationInfo;
 import org.tizen.emulator.skin.comm.ICommunicator.Scale;
 import org.tizen.emulator.skin.comm.ICommunicator.SendCommand;
 import org.tizen.emulator.skin.comm.sock.SocketCommunicator;
@@ -1339,6 +1340,33 @@ public class EmulatorSkin {
 
                }
 
+               /* temp : swap rotation menu names */
+               if (currentState.getCurrentResolutionWidth() >
+                               currentState.getCurrentResolutionHeight())
+               {
+                       for (MenuItem m : rotationList) {
+                               short rotationId = (Short) m.getData();
+
+                               if (rotationId == RotationInfo.PORTRAIT.id()) {
+                                       String landscape = SkinRotation.getRotation(
+                                                       RotationInfo.LANDSCAPE.id()).getName().value();
+                                       m.setText(landscape);
+                               } else if (rotationId == RotationInfo.LANDSCAPE.id()) {
+                                       String portrait = SkinRotation.getRotation(
+                                                       RotationInfo.PORTRAIT.id()).getName().value();
+                                       m.setText(portrait);
+                               } else if (rotationId == RotationInfo.REVERSE_PORTRAIT.id()) {
+                                       String landscapeReverse = SkinRotation.getRotation(
+                                                       RotationInfo.REVERSE_LANDSCAPE.id()).getName().value();
+                                       m.setText(landscapeReverse);
+                               } else if (rotationId == RotationInfo.REVERSE_LANDSCAPE.id()) {
+                                       String portraitReverse = SkinRotation.getRotation(
+                                                       RotationInfo.REVERSE_PORTRAIT.id()).getName().value();
+                                       m.setText(portraitReverse);
+                               }
+                       }
+               }
+
                SelectionAdapter selectionAdapter = new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {