Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar

This commit is contained in:
Dan Williams 2007-01-16 09:59:44 -05:00
commit a409c4ceec
6 changed files with 28 additions and 17 deletions

3
README
View File

@ -28,5 +28,6 @@ Alt+r Rotate the screen
Alt+o Toggle overlay visibility Alt+o Toggle overlay visibility
Alt+= Open the developer console Alt+= Open the developer console
Alt+0 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

13
pylint.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
TODO="C0111,C0301,C0322,W0311,C0324,W0331,W0212,W0611,W0613,W0201,W0106,W0622,W0403,W0612,W0102,W0404,W0704,W0402,W0702,W0401,E0602,E1111,W0101,W0105,W0601,W0602,W0703,W0701,W0312,W0231,W0233"
BROKEN="C0103,E1101"
DISABLE="W0142,R0913,W0621,R0903,R0201,R0904,W0511,W0232,R0902,W0603,R0914,C0302,C0102,I0011,R0911,R0912,R0901,R0801,R0923,R0915"
PYTHONPATH=.:./shell:$SUGAR_PREFIX/lib/python2.4/site-packages/gtk-2.0:$PYTHONPATH \
pylint \
--include-ids=y \
--disable-msg=$TODO,$BROKEN,$DISABLE \
shell sugar

View File

@ -1,6 +1,3 @@
import logging
import gtk
import gobject
import hippo import hippo
from sugar.graphics.menu import Menu from sugar.graphics.menu import Menu

View File

@ -19,6 +19,8 @@
import os import os
import sys import sys
import gtk
os.environ['SUGAR_EMULATOR'] = 'yes' os.environ['SUGAR_EMULATOR'] = 'yes'
sourcedir = os.path.abspath(os.path.dirname(__file__)) sourcedir = os.path.abspath(os.path.dirname(__file__))
@ -31,6 +33,7 @@ else:
from sugar import env from sugar import env
from sugar import util from sugar import util
from sugar.emulator import Emulator
if sourcedir: if sourcedir:
if os.environ.has_key('PYTHONPATH'): if os.environ.has_key('PYTHONPATH'):
@ -70,16 +73,13 @@ if sourcedir:
util.write_service('org.laptop.sugar.Console', bin, util.write_service('org.laptop.sugar.Console', bin,
env.get_user_service_dir()) env.get_user_service_dir())
from sugar.emulator import Emulator if len(sys.argv) == 1:
program = 'sugar-shell' program = 'sugar-shell'
fullscreen = False
for i in range(1, len(sys.argv)):
if sys.argv[i] == '-fullscreen':
fullscreen = True
else: else:
program = sys.argv[i] program = sys.argv[1]
fullscreen = (gtk.gdk.screen_width() <= 1200 and
gtk.gdk.screen_height() <= 900)
emulator = Emulator(fullscreen) emulator = Emulator(fullscreen)
emulator.start() emulator.start()

View File

@ -84,13 +84,13 @@ class XephyrProcess(Process):
if fullscreen: if fullscreen:
cmd += '-fullscreen ' cmd += '-fullscreen '
else: else:
cmd += '-screen 800x600 ' cmd += '-screen 1200x900'
Process.__init__(self, cmd) Process.__init__(self, cmd)
def get_name(self): def get_name(self):
return 'Xephyr' return 'Xephyr'
def start(self): def start(self, standard_output=False):
Process.start(self) Process.start(self)
os.environ['DISPLAY'] = ":%d" % (self._display) os.environ['DISPLAY'] = ":%d" % (self._display)
os.environ['SUGAR_XEPHYR_PID'] = '%d' % self.pid os.environ['SUGAR_XEPHYR_PID'] = '%d' % self.pid
@ -105,7 +105,7 @@ class XnestProcess(Process):
def get_name(self): def get_name(self):
return 'Xnest' return 'Xnest'
def start(self): def start(self, standard_output=False):
Process.start(self) Process.start(self)
os.environ['DISPLAY'] = ":%d" % (self._display) os.environ['DISPLAY'] = ":%d" % (self._display)

View File

@ -1,6 +1,6 @@
VERSION=0.63 VERSION=0.63
DATE=`date +%Y%m%d` DATE=`date +%Y%m%d`
RELEASE=2.11 RELEASE=2.12
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2 TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
rm sugar-$VERSION.tar.bz2 rm sugar-$VERSION.tar.bz2