[Title] emulator-manager : make disable file sharing to the mac and change checking...
authorjihye kim <jihye1128.kim@samsung.com>
Mon, 5 Nov 2012 08:17:02 +0000 (17:17 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Mon, 5 Nov 2012 08:17:02 +0000 (17:17 +0900)
[Desc.] make disable file sharing to the mac and change checking running emulator routine in the modify function.
[Issue] N_SE-13129

package/changelog
package/pkginfo.manifest
src/org/tizen/emulator/manager/EmulatorManager.java
src/org/tizen/emulator/manager/tool/StringResource.java
src/org/tizen/emulator/manager/ui/MainDialog.java
src/org/tizen/emulator/manager/ui/detail/TableWidget.java
src/org/tizen/emulator/manager/vms/Launcher.java
src/org/tizen/emulator/manager/vms/VMPropertyValue.java

index cd9547e..72b4f95 100644 (file)
@@ -1,3 +1,9 @@
+*1.3.52
+- make disable file sharing to the mac os.
+- change checking running emulator in the modify function.(N_SE-13129)
+- change running parameter when start emulator for the arm image.
+== 김지혜 <jihye1128.kim@samsung.com> 2012-11-05
+
 *1.3.51
 - modify select skin routine.
 - add resolution : 320x480, 1280x800, 1920x1080, 2560x1600
index 9d220c7..dfa9a21 100644 (file)
@@ -1,5 +1,5 @@
 Source: emulator-manager
-Version: 1.3.51
+Version: 1.3.52
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 
 Package: emulator-manager
index 3614b60..730db7a 100755 (executable)
@@ -65,6 +65,12 @@ public class EmulatorManager {
        private static boolean isInhoseMode  = true;
 
        private static RandomAccessFile randomAccessFile;
+       private static boolean isMac = false;
+       {
+                if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) {
+                        isMac = true;
+                }
+       }
 
        public static EmulatorManager getInstance() {
                return instance;
@@ -284,6 +290,10 @@ public class EmulatorManager {
                }
        }
 
+       public static boolean isMac() {
+               return isMac;
+       }
+
        public enum ManagerModeType {
                PUBLIC_MODE("public"),
                INHOUSE_MODE("inhouse");
index ef9d928..8d1d34c 100644 (file)
@@ -34,6 +34,8 @@ public class StringResource {
        // VMsProperty View
        public final static String SUPPORTED = "Supported";
        public final static String NOT_SUPPORTED = "Not supported";
+
+       public final static String None = "( None )";
        // key type
        public final static String ONE_KEY  = "1key";
        public final static String THREE_KEYS = "3keys";
index 039bd21..fe408f5 100644 (file)
@@ -190,12 +190,7 @@ public class MainDialog {
                                        public void widgetSelected(SelectionEvent e) {
                                                String type = leftButton.getText();
                                                if (type.equals(StringResource.MODIFY)) {
-                                                       MessageDialog msg = new MessageDialog();
                                                        VMsProperty property = detailView.getCurrentPoperty();
-                                                       if(property.getWorker().isRunningNow()) {
-                                                               msg.openInfoDialog("Not allowed to modify active VMs\n" + "[" + property.getName() + "] is running now...");
-                                                               return;
-                                                       }
                                                        openModifyView(property);
                                                } else if (type.equals(StringResource.CREATE)) {
                                                        openCreateView();
@@ -329,6 +324,12 @@ public class MainDialog {
        }
 
        public void openModifyView(VMsProperty property) {
+               MessageDialog msg = new MessageDialog();
+               if(property.getWorker().isRunningNow()) {
+                       msg.openInfoDialog("Not allowed to modify active VMs\n" + "[" + property.getName() + "] is running now...");
+                       return;
+               }
+
                setToolBarState(State.FALSE);
 
                leftButton.setText(StringResource.CANCEL);
index 2134121..b9e91bb 100644 (file)
@@ -659,7 +659,7 @@ class FileShareTypeCombo extends TableWidget {
        }
 
        public String getValue(VMPropertyValue value) {
-               return value.isFileShareSupport
+               return value.isFileShareSupport && !EmulatorManager.isMac()
                                ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED;
        }
 
@@ -673,7 +673,12 @@ class FileShareTypeCombo extends TableWidget {
                VMCreateHelper helper = new VMCreateHelper();
                shareTypeCombo = helper.makeCombo(table);
                helper.addComboItem(shareTypeCombo, SupportType.getInstance().getList());
-               shareTypeCombo.select(oldIsSupport == true ? 0 : 1);
+               shareTypeCombo.select(oldIsSupport == true && !EmulatorManager.isMac() ? 0 : 1);
+
+               if (EmulatorManager.isMac()) {
+                       shareTypeCombo.setEnabled(false);
+               }
+
                return true;
        }
 
@@ -723,7 +728,11 @@ class FileShareFolderButton extends TableWidget {
        }
 
        public String getValue(VMPropertyValue value) {
-               return  value.fileSharePathName;
+               if (EmulatorManager.isMac()) {
+                       return StringResource.None;
+               } else {
+                       return  value.fileSharePathName;
+               }
        }
 
        public void setValue(VMPropertyValue value) {
@@ -737,8 +746,15 @@ class FileShareFolderButton extends TableWidget {
 
                shareFolderButton = new Button(table, SWT.PUSH);
                shareFolderButton.setImage(image);
-               shareFolderButton.setText(oldPathName);
-               shareFolderButton.setEnabled(value.isFileShareSupport);
+
+               if (EmulatorManager.isMac()) {
+                       shareFolderButton.setText(StringResource.None);
+                       shareFolderButton.setEnabled(false);
+               } else {
+                       shareFolderButton.setText(oldPathName);
+                       shareFolderButton.setEnabled(value.isFileShareSupport);
+
+               }
 
                return true;
        }
index 3862703..33bc77f 100644 (file)
@@ -300,7 +300,7 @@ public class Launcher {
                        cmd.add("-device");
                        cmd.add("virtio-net,netdev=virtio-net,transport=virtio-mmio.1");
                        cmd.add("-append");
-                       cmd.add("yagl= 0 console=ttySAC2,115200 video=s3cfb:"
+                       cmd.add("yagl= 1 console=ttySAC2,115200 video=s3cfb:"
                                        + width
                                        + "x"
                                        + height
index 643f013..21528ec 100644 (file)
@@ -38,6 +38,7 @@ import org.tizen.emulator.manager.image.SkinList;
 import org.tizen.emulator.manager.image.Skin;
 import org.tizen.emulator.manager.logging.EMLogger;
 import org.tizen.emulator.manager.tool.CheckVirtualization;
+import org.tizen.emulator.manager.tool.StringResource;
 import org.tizen.emulator.manager.vms.xml.DisplayType.Resolution;
 import org.tizen.emulator.manager.vms.xml.TouchType;
 
@@ -264,7 +265,7 @@ public class VMPropertyValue implements Cloneable {
                                        (fileSharePath.lastIndexOf(File.separator) + 1, fileSharePath.length());
                } else {
                        fileSharePath = "";
-                       fileSharePathName = "( None )";
+                       fileSharePathName = StringResource.None;
                }
 
                ramSize = property.getConfiguration().getDevice().getRAM().getSize().getValue();
@@ -305,7 +306,7 @@ public class VMPropertyValue implements Cloneable {
 
                isFileShareSupport      = false; 
                fileSharePath           = "";
-               fileSharePathName   = "( None )";
+               fileSharePathName   = StringResource.None;
 
                isHWVirtualization = CheckVirtualization.getInstance().isSupportVirtualization();
                isGLAcceleration = true;
@@ -320,7 +321,7 @@ public class VMPropertyValue implements Cloneable {
                archType = isStandard ? template.getArch().toString() : "x86";
 
                baseImagePath           = "";
-               baseImagePathName   = isStandard ? (archType.equals("x86") ? "( emulimg-2.0.x86 )" : "( emulimg-2.0.arm )") : " ( None )";
+               baseImagePathName   = isStandard ? (archType.equals("x86") ? "( emulimg-2.0.x86 )" : "( emulimg-2.0.arm )") : StringResource.None;
 
                settingConfigure(template);
        }