int lcdHeight = Integer.parseInt( config.getArg( ArgsConstants.RESOLUTION_HEIGHT ) );
int scale = SkinUtil.getValidScale( config );
- short rotationId = config.getPropertyShort( PropertiesConstants.WINDOW_DIRECTION, (short) 0 );
-
- arrangeSkin( lcdWidth, lcdHeight, scale, (short) rotationId );
+
+// short rotationId = config.getPropertyShort( PropertiesConstants.WINDOW_DIRECTION, (short) 0 );
+ // has to be portrait mode at first booting time
+ arrangeSkin( lcdWidth, lcdHeight, scale, RotationInfo.PORTRAIT.id() );
+
decideHoverColor();
Menu menu = new Menu( shell );
}
} );
+ deviceInfoItem.addListener( SWT.PaintItem, new Listener() {
+ @Override
+ public void handleEvent( Event event ) {
+ event.gc.drawImage( imageRegistry.getIcon( IconName.DEVICE_INFO ), 0, 0 );
+ }
+ } );
+
new MenuItem( menu, SWT.SEPARATOR );
final MenuItem aotItem = new MenuItem( menu, SWT.CHECK );
public void widgetSelected( SelectionEvent e ) {
if( !isOpen ) {
isOpen = true;
- ScreenShotDialog dialog = new ScreenShotDialog( shell, lcdCanvas );
+ ScreenShotDialog dialog = new ScreenShotDialog( shell, lcdCanvas, config );
dialog.open();
isOpen = false;
}
package org.tizen.emulator.skin.config;
+import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Map;
public void saveProperties() {
+ File file = new File( propertiesFilePath );
+
+ if( !file.exists() ) {
+
+ try {
+ if( !file.createNewFile() ) {
+ return;
+ }
+ } catch ( IOException e ) {
+ logger.log( Level.SEVERE, "Fail to create skin properties file.", e );
+ return;
+ }
+
+ }
+
FileOutputStream fos = null;
try {
- fos = new FileOutputStream( propertiesFilePath );
- properties.store( fos, "Generated automatically by emulator." );
+ fos = new FileOutputStream( file );
+ properties.store( fos, "Automatically generated by emulator skin." );
} catch ( IOException e ) {
logger.log( Level.SEVERE, e.getMessage(), e );