From: giwoong.kim Date: Wed, 5 Sep 2012 04:46:20 +0000 (+0900) Subject: [Title] added some log X-Git-Tag: TizenStudio_2.0_p2.3~1342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de8f9a333c42af9d23bf6d975123357277418dec;p=sdk%2Femulator%2Fqemu.git [Title] added some log [Type] enhancement [Module] Emulator / skin [Priority] minor [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- 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 74efdfb..319976c 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 @@ -1662,9 +1662,7 @@ public class EmulatorSkin { final boolean isOnTop = onTopItem.getSelection(); - if ( logger.isLoggable( Level.FINE ) ) { - logger.fine( "Select Always On Top : " + isOnTop ); - } + logger.info( "Select Always On Top : " + isOnTop ); // readyToReopen( EmulatorSkin.this, isOnTop ); @@ -1765,6 +1763,7 @@ public class EmulatorSkin { closeItem.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent e ) { + logger.info("Close Menu is selected"); communicator.sendToQEMU( SendCommand.CLOSE, null ); } } ); @@ -2001,6 +2000,8 @@ public class EmulatorSkin { if ( item.getSelection() ) { boolean on = item.equals( usbOnItem ); isOnUsbKbd = on; + logger.info("USB keyboard " + isOnUsbKbd); + communicator.sendToQEMU( SendCommand.USB_KBD, new BooleanData(on, SendCommand.USB_KBD.toString()) ); } @@ -2052,6 +2053,8 @@ public class EmulatorSkin { public void widgetSelected( SelectionEvent e ) { if ( !isOpen ) { isOpen = true; + + logger.info("Open the about dialog"); AboutDialog dialog = new AboutDialog( shell ); dialog.open(); isOpen = false; 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 5413ec9..e4f9af2 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 @@ -59,6 +59,8 @@ public class AboutDialog extends SkinDialog { public static final String PROP_KEY_BUILD_TIME = "build_time"; public static final String PROP_KEY_GIT_VERSION = "build_git_commit"; + private Image aboutImage; + private Logger logger = SkinLogger.getSkinLogger(AboutDialog.class).getLogger(); public AboutDialog(Shell parent) { @@ -111,7 +113,7 @@ public class AboutDialog extends SkinDialog { compositeLeft.setLayout(getNopaddedGridLayout(1, false)); Label imageLabel = new Label(compositeLeft, SWT.NONE); - Image aboutImage = new Image(shell.getDisplay(), + aboutImage = new Image(shell.getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/about_Tizen_SDK.png")); imageLabel.setImage(aboutImage); @@ -247,4 +249,8 @@ public class AboutDialog extends SkinDialog { shell.setSize(436, shell.getSize().y); } + protected void close() { + logger.info("close the about dialog"); + aboutImage.dispose(); + } } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java index 191a094..0ce1b0c 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java @@ -435,4 +435,7 @@ public class DetailInfoDialog extends SkinDialog { }; + protected void close() { + logger.info("close the detail info dialog"); + } } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/LicenseDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/LicenseDialog.java index 7965e19..ff7b454 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/LicenseDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/LicenseDialog.java @@ -135,4 +135,7 @@ public class LicenseDialog extends SkinDialog { } + protected void close() { + logger.info("close the license dialog"); + } } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/RamdumpDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/RamdumpDialog.java index 03bc4d5..ef04f6e 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/RamdumpDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/RamdumpDialog.java @@ -48,10 +48,10 @@ public class RamdumpDialog extends SkinDialog { RamdumpDialog.this.shell.addListener(SWT.Close, new Listener() { @Override public void handleEvent(Event event) { - // do nothing - logger.info("do nothing"); - if (communicator.getRamdumpFlag() == true) { + // do nothing + logger.info("do nothing"); + event.doit = false; } } @@ -133,6 +133,10 @@ public class RamdumpDialog extends SkinDialog { @Override public void run() { logger.info("close the Ramdump dialog"); + + if (label.getImage() != null) { + label.getImage().dispose(); + } RamdumpDialog.this.shell.close(); } }); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java index 9c4a677..1bb9670 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/SkinDialog.java @@ -117,6 +117,10 @@ public abstract class SkinDialog extends Dialog { } } + close(); + } + + protected void close() { } protected void setShellSize() { diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java index e2e3f48..06a43ae 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java @@ -170,7 +170,7 @@ public class ScreenShotDialog { if ( null != image && !image.isDisposed() ) { //e.gc.drawImage( image, CANVAS_MARGIN, CANVAS_MARGIN ); Rectangle r = image.getBounds(); - logger.info("r.width: " +r.width +", r.height " + r.height); + //logger.info("r.width: " +r.width +", r.height " + r.height); e.gc.drawImage(image, 0, 0, r.width, r.height, CANVAS_MARGIN, CANVAS_MARGIN, (int)(r.width * scaleLevel * 1/100), (int)(r.height * scaleLevel * 1/100)); }