Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README3
-rwxr-xr-xsugar-emulator18
-rw-r--r--sugar/emulator.py2
3 files changed, 12 insertions, 11 deletions
diff --git a/README b/README
index 1a709f0..9cdd6a9 100644
--- a/README
+++ b/README
@@ -28,5 +28,6 @@ Alt+r Rotate the screen
Alt+o Toggle overlay visibility
Alt+= Open the developer console
Alt+0 Open the developer console
+Alt+q Quit the emulator
-Ctrl+S Activate sketch mode in chat
+Ctrl+s Activate sketch mode in chat
diff --git a/sugar-emulator b/sugar-emulator
index 5fd9268..56ee796 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -19,6 +19,8 @@
import os
import sys
+import gtk
+
os.environ['SUGAR_EMULATOR'] = 'yes'
sourcedir = os.path.abspath(os.path.dirname(__file__))
@@ -31,6 +33,7 @@ else:
from sugar import env
from sugar import util
+from sugar.emulator import Emulator
if sourcedir:
if os.environ.has_key('PYTHONPATH'):
@@ -70,16 +73,13 @@ if sourcedir:
util.write_service('org.laptop.sugar.Console', bin,
env.get_user_service_dir())
-from sugar.emulator import Emulator
-
-program = 'sugar-shell'
+if len(sys.argv) == 1:
+ program = 'sugar-shell'
+else:
+ program = sys.argv[1]
-fullscreen = False
-for i in range(1, len(sys.argv)):
- if sys.argv[i] == '-fullscreen':
- fullscreen = True
- else:
- program = sys.argv[i]
+fullscreen = (gtk.gdk.screen_width() <= 1200 and
+ gtk.gdk.screen_height() <= 900)
emulator = Emulator(fullscreen)
emulator.start()
diff --git a/sugar/emulator.py b/sugar/emulator.py
index 3698672..664e379 100644
--- a/sugar/emulator.py
+++ b/sugar/emulator.py
@@ -84,7 +84,7 @@ class XephyrProcess(Process):
if fullscreen:
cmd += '-fullscreen '
else:
- cmd += '-screen 800x600 '
+ cmd += '-screen 1200x900'
Process.__init__(self, cmd)
def get_name(self):