From 6f58827b7f4534916fbfe818a6e0c5a64aae26b3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 15 Jan 2007 21:55:39 +0100 Subject: [PATCH 1/7] Add a pylint script. No fixes for now, see TODO in the script. --- pylint.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 pylint.sh diff --git a/pylint.sh b/pylint.sh new file mode 100755 index 00000000..cd4b4073 --- /dev/null +++ b/pylint.sh @@ -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,W0221,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 From cbc8abbb0809a7f9db7c86aed34764f4eb163bf2 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 15 Jan 2007 23:31:07 +0100 Subject: [PATCH 2/7] Revert "On edges show the frame after 1.5 seconds" This reverts commit 5e08830feb376ad6cd12a412689d7d237375fb72. --- shell/view/frame/Frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/view/frame/Frame.py b/shell/view/frame/Frame.py index 92437fef..f41477cb 100644 --- a/shell/view/frame/Frame.py +++ b/shell/view/frame/Frame.py @@ -163,9 +163,9 @@ class Frame: self._mode = Frame.INACTIVE self._timeline = Timeline(self) - self._timeline.add_tag('slide_in', 18, 24) - self._timeline.add_tag('before_slide_out', 48, 48) - self._timeline.add_tag('slide_out', 49, 54) + self._timeline.add_tag('slide_in', 6, 12) + self._timeline.add_tag('before_slide_out', 36, 36) + self._timeline.add_tag('slide_out', 37, 42) self._event_frame = EventFrame() self._event_frame.connect('enter-edge', self._enter_edge_cb) From 8c13f20d3ceeec648b56595f5c4366aa3aa2dd5f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 15 Jan 2007 23:42:03 +0100 Subject: [PATCH 3/7] Release snapshot --- tools/build-snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-snapshot.sh b/tools/build-snapshot.sh index 786b8870..3bb4cd21 100755 --- a/tools/build-snapshot.sh +++ b/tools/build-snapshot.sh @@ -1,6 +1,6 @@ VERSION=0.63 DATE=`date +%Y%m%d` -RELEASE=2.11 +RELEASE=2.12 TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2 rm sugar-$VERSION.tar.bz2 From 8ff9d66f649cc3f09bfe92c3b339c39dbc791770 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Jan 2007 00:33:04 +0100 Subject: [PATCH 4/7] Fix wrong method signatures --- pylint.sh | 2 +- sugar/emulator.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pylint.sh b/pylint.sh index cd4b4073..07917423 100755 --- a/pylint.sh +++ b/pylint.sh @@ -1,6 +1,6 @@ #!/bin/sh -TODO="C0111,C0301,C0322,W0311,C0324,W0331,W0212,W0611,W0613,W0201,W0106,W0622,W0403,W0612,W0102,W0404,W0704,W0402,W0702,W0401,E0602,W0221,E1111,W0101,W0105,W0601,W0602,W0703,W0701,W0312,W0231,W0233" +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" diff --git a/sugar/emulator.py b/sugar/emulator.py index b37dae6b..36986726 100644 --- a/sugar/emulator.py +++ b/sugar/emulator.py @@ -90,7 +90,7 @@ class XephyrProcess(Process): def get_name(self): return 'Xephyr' - def start(self): + def start(self, standard_output=False): Process.start(self) os.environ['DISPLAY'] = ":%d" % (self._display) os.environ['SUGAR_XEPHYR_PID'] = '%d' % self.pid @@ -105,7 +105,7 @@ class XnestProcess(Process): def get_name(self): return 'Xnest' - def start(self): + def start(self, standard_output=False): Process.start(self) os.environ['DISPLAY'] = ":%d" % (self._display) From 31ce0dbf69fff0cb58e8a3b59791938cd28de197 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Jan 2007 00:49:04 +0100 Subject: [PATCH 5/7] Remove some unused imports --- shell/view/clipboardmenu.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/shell/view/clipboardmenu.py b/shell/view/clipboardmenu.py index 5472e4ba..607b1128 100644 --- a/shell/view/clipboardmenu.py +++ b/shell/view/clipboardmenu.py @@ -1,6 +1,3 @@ -import logging -import gtk -import gobject import hippo from sugar.graphics.menu import Menu From 0584ac7529197e5a9fe34175ebf3d3af80e9f54f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Jan 2007 01:21:15 +0100 Subject: [PATCH 6/7] Use fullscreen if the screen is not big enough to do a 1200x900 window. The logic might need tweaking. --- README | 3 ++- sugar-emulator | 18 +++++++++--------- sugar/emulator.py | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README b/README index 1a709f0a..9cdd6a9f 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 5fd9268c..56ee7966 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 +if len(sys.argv) == 1: + program = 'sugar-shell' +else: + program = sys.argv[1] -program = 'sugar-shell' - -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 36986726..664e3795 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): From eef96e70764a3ebff71ecab7e47ad5aeceb51218 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Jan 2007 14:38:51 +0100 Subject: [PATCH 7/7] Accidentally reverted... Revert "Revert "On edges show the frame after 1.5 seconds"" This reverts commit cbc8abbb0809a7f9db7c86aed34764f4eb163bf2. --- shell/view/frame/Frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/view/frame/Frame.py b/shell/view/frame/Frame.py index f41477cb..92437fef 100644 --- a/shell/view/frame/Frame.py +++ b/shell/view/frame/Frame.py @@ -163,9 +163,9 @@ class Frame: self._mode = Frame.INACTIVE self._timeline = Timeline(self) - self._timeline.add_tag('slide_in', 6, 12) - self._timeline.add_tag('before_slide_out', 36, 36) - self._timeline.add_tag('slide_out', 37, 42) + self._timeline.add_tag('slide_in', 18, 24) + self._timeline.add_tag('before_slide_out', 48, 48) + self._timeline.add_tag('slide_out', 49, 54) self._event_frame = EventFrame() self._event_frame.connect('enter-edge', self._enter_edge_cb)