From b906ff8e9106f8faa529b5be94bdb7dd8bc4563d Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Thu, 11 Jul 2013 18:18:42 +0900 Subject: [PATCH] skin: modified function name isPhoneShape -> isGeneralPurposeSkin Change-Id: I09019c6a7b1ba427fcf42dda360f34cbd61f1a88 Signed-off-by: GiWoong Kim --- .../src/org/tizen/emulator/skin/EmulatorSkin.java | 6 ++---- .../org/tizen/emulator/skin/EmulatorSkinMain.java | 6 +++--- .../org/tizen/emulator/skin/dialog/AboutDialog.java | 2 -- .../tizen/emulator/skin/info/SkinInformation.java | 12 ++++++------ .../skin/layout/GeneralPurposeSkinComposer.java | 6 ++---- .../emulator/skin/layout/PhoneShapeSkinComposer.java | 4 ++-- 6 files changed, 15 insertions(+), 21 deletions(-) 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 1616c11b98..463f382b66 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 @@ -252,7 +252,7 @@ public class EmulatorSkin { public long initLayout() { imageRegistry = ImageRegistry.getInstance(); - if (skinInfo.isPhoneShape() == true) { /* phone shape skin */ + if (skinInfo.isGeneralPurposeSkin() == false) { skinComposer = new PhoneShapeSkinComposer(config, this, shell, currentState, imageRegistry, communicator); @@ -426,9 +426,7 @@ public class EmulatorSkin { config.saveSkinProperties(); /* close the Key Window */ - if (skinInfo.isPhoneShape() == false) { - closeKeyWindow(); - } + closeKeyWindow(); /* dispose the color */ if (colorVM != null) { diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java index c01f4835ab..d50a289a7f 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java @@ -166,18 +166,18 @@ public class EmulatorSkinMain { logger.info("skin info:" + skinInfoProperties); //TODO: } - boolean skinPhoneShape = true; String skinInfoResolutionW = skinInfoProperties.getProperty(SkinInfoConstants.RESOLUTION_WIDTH); String skinInfoResolutionH = skinInfoProperties.getProperty(SkinInfoConstants.RESOLUTION_HEIGHT); + boolean isGeneralSkin = false; if (skinInfoResolutionW.equalsIgnoreCase("all") || skinInfoResolutionH.equalsIgnoreCase("all")) { - skinPhoneShape = false; + isGeneralSkin = true; } SkinInformation skinInfo = new SkinInformation( - skinInfoProperties.getProperty(SkinInfoConstants.SKIN_NAME), skinPhoneShape); + skinInfoProperties.getProperty(SkinInfoConstants.SKIN_NAME), isGeneralSkin); /* set emulator window skin property */ String skinPropFilePath = vmPath + File.separator + SKIN_PROPERTIES_FILE_NAME; diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java index bc79b17261..17acbf7d0a 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/AboutDialog.java @@ -36,7 +36,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; @@ -45,7 +44,6 @@ import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.program.Program; -import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/info/SkinInformation.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/info/SkinInformation.java index 434ea1526f..09dc1abbdd 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/info/SkinInformation.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/info/SkinInformation.java @@ -1,7 +1,7 @@ /** * * - * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * GiWoong Kim @@ -33,12 +33,12 @@ package org.tizen.emulator.skin.info; */ public class SkinInformation { private String skinName; - private boolean skinPhoneShape; + private boolean isGeneralSkin; private int skinOption; - public SkinInformation(String skinName, boolean skinPhoneShape) { + public SkinInformation(String skinName, boolean isGeneralSkin) { this.skinName = skinName; - this.skinPhoneShape = skinPhoneShape; + this.isGeneralSkin = isGeneralSkin; this.skinOption = 0; } @@ -46,8 +46,8 @@ public class SkinInformation { return skinName; } - public boolean isPhoneShape() { - return skinPhoneShape; + public boolean isGeneralPurposeSkin() { + return isGeneralSkin; } public int getSkinOption() { 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 a932632268..aa4475d26d 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 @@ -48,8 +48,6 @@ import org.eclipse.swt.widgets.Shell; import org.tizen.emulator.skin.EmulatorSkin; import org.tizen.emulator.skin.EmulatorSkinState; import org.tizen.emulator.skin.comm.ICommunicator.RotationInfo; -import org.tizen.emulator.skin.comm.ICommunicator.SendCommand; -import org.tizen.emulator.skin.comm.sock.data.DisplayStateData; import org.tizen.emulator.skin.config.EmulatorConfig; import org.tizen.emulator.skin.config.EmulatorConfig.ArgsConstants; import org.tizen.emulator.skin.config.EmulatorConfig.SkinPropertiesConstants; @@ -231,9 +229,9 @@ public class GeneralPurposeSkinComposer implements ISkinComposer { currentState.getCurrentResolutionHeight(), scale, rotationId); if (displayBounds == null) { - logger.severe("Failed to lcd information for phone shape skin."); + logger.severe("Failed to read display information for skin."); SkinUtil.openMessage(shell, null, - "Failed to read lcd information for phone shape skin.\n" + + "Failed to read display information for skin.\n" + "Check the contents of skin dbi file.", SWT.ICON_ERROR, config); System.exit(-1); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java index 4421063841..b1e85598e8 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java @@ -174,9 +174,9 @@ public class PhoneShapeSkinComposer implements ISkinComposer { currentState.getCurrentResolutionHeight(), scale, rotationId); if (lcdBounds == null) { - logger.severe("Failed to lcd information for phone shape skin."); + logger.severe("Failed to read display information for skin."); SkinUtil.openMessage(shell, null, - "Failed to read lcd information for phone shape skin.\n" + + "Failed to read display information for skin.\n" + "Check the contents of skin dbi file.", SWT.ICON_ERROR, config); System.exit(-1); -- 2.34.1