[Sugar-devel] [PATCH v3] Downgrading activities not allowed. (SL#2164)

2010-10-16 Thread shanjit
Downgrading an activity is now made possible. When a .xo file of a version older than the currently installed version is clicked, a downgrading option is made available, by popping up of a confirmation alert. Depending upton the choice selected you can downgrade the activity. v1 - v2. Named

Re: [Sugar-devel] [Dextrose] [PATCH] Downgrading activities not allowed. (#2164)

2010-10-16 Thread Bernie Innocenti
On Sat, 2010-10-16 at 03:07 +0530, shan...@seeta.in wrote: + +# Copyright (C) 2008 One Laptop Per Child Why assign copyright to OLPC two years ago? This new file should be copyrighted in 2010 by Seeta (or maybe Activity Central). -- // Bernie Innocenti - http://codewiz.org/ \X/ Sugar

[Sugar-devel] [PATCH sugar-base 10/17] style cleanup: prefer ' for strings

2010-10-16 Thread Sascha Silbe
Tomeu prefers ' for strings, so let's use it wherever we don't have a good reason to use . Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/dispatch/saferef.py b/src/sugar/dispatch/saferef.py index 709d292..1632b34 100644 --- a/src/sugar/dispatch/saferef.py +++

[Sugar-devel] [PATCH sugar-base 05/17] PEP8 cleanup: fix spaces around operators and parentheses

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index 8496f06..b963e7f 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -22,7 +22,7 @@ import re import datetime import subprocess -source_exts = [ '.py', '.c', '.h', '.cpp' ] +source_exts =

[Sugar-devel] [PATCH sugar-base 01/17] fix EOL spaces

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index 50f7d07..fea9b3c 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth

[Sugar-devel] [PATCH sugar-base 04/17] sugar.dispatch.saferef: don't use assert for critical code paths

2010-10-16 Thread Sascha Silbe
assert a debugging tool, not meant to guard critical code paths. See e.g. Language Reference section 6.3, first paragraph: Assert statements are a convenient way to insert debugging assertions into a program: The same section also explains that enabling optimization will cause assert

[Sugar-devel] [PATCH sugar-base 03/17] PEP8 cleanup: fix number of blank lines

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index d7c5d5b..8496f06 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -23,12 +23,15 @@ import datetime import subprocess source_exts = [ '.py', '.c', '.h', '.cpp' ] +COPYRIGHT = 'Copyright

[Sugar-devel] [PATCH sugar-base 11/17] pylint cleanup: replace disable-msg with disable

2010-10-16 Thread Sascha Silbe
Adapt to upstream format change. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/logger.py b/src/sugar/logger.py index ebb766d..b4cba6c 100644 --- a/src/sugar/logger.py +++ b/src/sugar/logger.py @@ -65,7 +65,7 @@ def set_level(level): logging.warning('Invalid log

[Sugar-devel] [PATCH sugar-base 09/17] PEP8 cleanup: import only one module per import statement

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/dispatch/saferef.py b/src/sugar/dispatch/saferef.py index 6eb0d9e..709d292 100644 --- a/src/sugar/dispatch/saferef.py +++ b/src/sugar/dispatch/saferef.py @@ -5,7 +5,8 @@ Provides a way to safely weakref any function,

[Sugar-devel] [PATCH sugar-base 16/17] pylint cleanup: Signal._live_receivers: mark receiverkey as unused

2010-10-16 Thread Sascha Silbe
Follow the convention of marking known-unused (but required for de-marshalling purposes) variables by postfixing them with an underscore. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/dispatch/dispatcher.py b/src/sugar/dispatch/dispatcher.py index eb2dd7e..dd6230b

[Sugar-devel] [PATCH sugar-base 07/17] PEP8 cleanup: ensure lines are shorter than 80 characters

2010-10-16 Thread Sascha Silbe
This is important for Sugar because the XO has a small screen where long lines would make the code hard to understand (because you need to constantly scroll horizontally). Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/dispatch/__init__.py

[Sugar-devel] Patch review: adding the module name to the subject (was: Re: [PATCH] Change the logic used to determine the format used to save files.)

2010-10-16 Thread Sascha Silbe
Excerpts from Sascha Silbe's message of Fri Oct 15 23:46:25 +0200 2010: Check out the --subject-prefix option of git format-patch. git send-email delegates the actual patch preparation to git format-patch (unless you pass it a pre-formatted patch as a file). Forgot to mention: Because it's

[Sugar-devel] [PATCH sugar-base 13/17] maint-helper: rename parameter to avoid name clash with built-in function

2010-10-16 Thread Sascha Silbe
Renaming license to license_name even makes the code slightly easier to understand. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index 4f8a0be..8bd35ce 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -129,21 +129,21 @@ def

[Sugar-devel] [PATCH v3 sugar] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-16 Thread Mukul Gupta
The patch disables the Start and Start With menu items for files which can't be opened by any installed activity and instead replace it with a hover dropdown with a menu item 'No activity installed to start entry' --- src/jarabe/journal/palettes.py | 42 +++

[Sugar-devel] [PATCH sugar-base 08/17] PEP8 cleanup: don't use has_key()

2010-10-16 Thread Sascha Silbe
has_key() has been deprecated for quite some time now. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index b963e7f..4f8a0be 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -79,7 +79,7 @@ def cmd_build_snapshot(): print 'Update

[Sugar-devel] [PATCH sugar-base 02/17] maint-helper.py: remove outdated URL

2010-10-16 Thread Sascha Silbe
The git repository of Sugar should be easy enough to discover these days. If we want to make it easier, a README would be a better place. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/maint-helper.py b/maint-helper.py index fea9b3c..d7c5d5b 100755 --- a/maint-helper.py +++

[Sugar-devel] [PATCH sugar-base 15/17] pylint cleanup: sugar.dispatch.saferef: remove unused variable

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/dispatch/saferef.py b/src/sugar/dispatch/saferef.py index 56166d9..bb73b5d 100644 --- a/src/sugar/dispatch/saferef.py +++ b/src/sugar/dispatch/saferef.py @@ -126,7 +126,7 @@ class BoundMethodWeakref(object):

[Sugar-devel] [PATCH sugar-base 17/17] sugar.mime: ignore incorrect pylint warning

2010-10-16 Thread Sascha Silbe
pylint isn't smart enough to analyse the contents of gio, so squelch the warning. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/mime.py b/src/sugar/mime.py index 7f3f5ff..c4b847b 100644 --- a/src/sugar/mime.py +++ b/src/sugar/mime.py @@ -134,6 +134,7 @@ def

[Sugar-devel] [PATCH sugar-base 12/17] pylint: sugar.logger: allow overriding module name

2010-10-16 Thread Sascha Silbe
traceback is the name of a parameter of the function we are wrapping, so we shouldn't change it. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/sugar/logger.py b/src/sugar/logger.py index b4cba6c..c242194 100644 --- a/src/sugar/logger.py +++ b/src/sugar/logger.py @@ -65,7

Re: [Sugar-devel] [PATCH v2 sugar] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-16 Thread Mukul Gupta
Team, Thank you. Appreciate your feedback. I have revised the patch which restores its existing behavior for bundles and have incorporated Frederick's idea of having a common and an understandable English wording. http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027925.html Looking

Re: [Sugar-devel] [PATCH v2 sugar] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-16 Thread Aleksey Lim
On Sat, Oct 16, 2010 at 05:29:35PM +0530, Mukul Gupta wrote: Team, Thank you. Appreciate your feedback. I have revised the patch which restores its existing behavior for bundles and have incorporated Frederick's idea of having a common and an understandable English wording.

[Sugar-devel] [PATCH v3 sugar] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-16 Thread Mukul Gupta
The patch disables the Start and Start With menu items for files which can't be opened by any installed activity and instead replace it with a hover dropdown with a menu item 'No activity installed to start entry' --- src/jarabe/journal/palettes.py | 42 +++

Re: [Sugar-devel] [PATCH v3 sugar] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-16 Thread Aleksey Lim
On Sat, Oct 16, 2010 at 05:16:31PM +0530, Mukul Gupta wrote: The patch disables the Start and Start With menu items for files which can't be opened by any installed activity and instead replace it with a hover dropdown with a menu item 'No activity installed to start entry' ---

[Sugar-devel] [PATCH Paint] Changes made to save the last added text item. (OLPC #5917)

2010-10-16 Thread Ishan Bansal
New variable text_status defined which could keep the track of the status of text being entered and save it when activity is stopped. Signed-off-by: ishan bansal is...@seeta.in,anubhav aggarwal anub...@seeta.in --- Area.py | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-)

[Sugar-devel] [DESIGN] Downgrading activities not allowed. (SL#2164)

2010-10-16 Thread Aleksey Lim
On Sat, Oct 16, 2010 at 01:31:02PM +0530, shan...@seeta.in wrote: Downgrading an activity is now made possible. When a .xo file of a version older than the currently installed version is clicked, a downgrading option is made available, by popping up of a confirmation alert. Depending upton

Re: [Sugar-devel] [PATCH 0/3 sugar-datastore] PEP8 / pylint cleanups

2010-10-16 Thread Aleksey Lim
On Fri, Oct 15, 2010 at 05:36:09PM +, Sascha Silbe wrote: Make sugar-datastore as PEP8 / pylint clean as possible (again). All remaining complaints are pylint bugs (doesn't recognise keyword arguments in decorators) resp. shortcomings in pep8 (cannot selectively disable a warning for a

Re: [Sugar-devel] [DESIGN] Downgrading activities not allowed. (SL#2164)

2010-10-16 Thread Gary Martin
On 16 Oct 2010, at 14:14, Aleksey Lim alsr...@member.fsf.org wrote: On Sat, Oct 16, 2010 at 01:31:02PM +0530, shan...@seeta.in wrote: Downgrading an activity is now made possible. When a .xo file of a version older than the currently installed version is clicked, a downgrading option is

Re: [Sugar-devel] ticket 2170 Specify bundle id for read activity

2010-10-16 Thread Ishan Bansal
Hi Sacha I had submitted the patch for the http://bugs.sugarlabs.org/ticket/2170 You can check the patch at http://lists.sugarlabs.org/archive/sugar-devel/2010-September/026963.html Wish if you could review it and provide me feedback on any improvement required. Regards ishan

Re: [Sugar-devel] ticket #2318 display free journal space in volume toolbar

2010-10-16 Thread Aleksey Lim
On Sun, Oct 17, 2010 at 12:58:27AM +0530, Ishan Bansal wrote: Hi Aleksey I had submitted the patch for the http://bugs.sugarlabs.org/ticket/2318 You can check the patch at http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg16721.html Wish if you could review it and provide

Re: [Sugar-devel] [Dextrose] ticket 2170 Specify bundle id for read activity

2010-10-16 Thread Bernie Innocenti
On Sun, 2010-10-17 at 01:06 +0530, Ishan Bansal wrote: Hi Sacha I had submitted the patch for the http://bugs.sugarlabs.org/ticket/2170 You can check the patch at http://lists.sugarlabs.org/archive/sugar-devel/2010-September/026963.html Wish if you could review it and provide me

Re: [Sugar-devel] ticket #2318 display free journal space in volume toolbar

2010-10-16 Thread Ishan Bansal
Hi Aleksey I had submitted the patch for the http://bugs.sugarlabs.org/ticket/2318 You can check the patch at http://www.mail-archive.com/sugar-devel@lists.sugarlabs.org/msg16721.html Wish if you could review it and provide me feedback on any improvement required. Regards Ishan

Re: [Sugar-devel] [PATCH v4 sugar] Downgrading activities not allowed. (#2164)

2010-10-16 Thread Sascha Silbe
Excerpts from anubhav's message of Sat Oct 16 22:25:00 +0200 2010: [src/jarabe/journal/versionalert.py: 147 lines skipped] If we really need that much code just for asking the user for confirmation then we're doing something wrong. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/

Re: [Sugar-devel] [Dextrose] [PATCH v4 sugar] Downgrading activities not allowed. (#2164)

2010-10-16 Thread Bernie Innocenti
On Sun, 2010-10-17 at 01:55 +0530, anub...@seeta.in wrote: +def __install_cancel_cb(self, button): +'''The opener will listen on the destroy signal +''' +logging.debug('1') This... +self.destroy() + +def __install_ok_cb(self, button): +

Re: [Sugar-devel] ticket 2170 Specify bundle id for read activity

2010-10-16 Thread Sascha Silbe
Excerpts from Ishan Bansal's message of Sat Oct 16 21:36:56 +0200 2010: You can check the patch at http://lists.sugarlabs.org/archive/sugar-devel/2010-September/026963.html Wish if you could review it and provide me feedback on any improvement required. If you'd like to remind everyone (or

[Sugar-devel] [PATCH Paint Activity] Added Invert Color Effect to Paint Activity (OLPC #2495)

2010-10-16 Thread Ayush Goyal
Signed-off-by: Ayush Goyal ay...@seeta.in --- Area.py | 40 + icons/invert-colors.svg | 387 +++ toolbox.py | 22 ++- 3 files changed, 441 insertions(+), 8 deletions(-) create mode 100644 icons/invert-colors.svg

[Sugar-devel] [PATCH sugar 05/21] PEP8 cleanup: fix inline comment spacing

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/cpsection/keyboard/model.py b/extensions/cpsection/keyboard/model.py index b7186e2..82456d3 100644 --- a/extensions/cpsection/keyboard/model.py +++ b/extensions/cpsection/keyboard/model.py @@ -20,7 +20,7 @@ import xklavier

[Sugar-devel] [PATCH sugar 00/21] style cleanup series

2010-10-16 Thread Sascha Silbe
This is the sugar part of the style cleanups I've wanted to land at least two releases ago, but kept missing the window. I have done some basic testing, but naturally cannot test all code paths I've touched (some even appear to be unused). This is why I'd like to land this right after we branched

[Sugar-devel] [PATCH sugar 14/21] pylint cleanup: pass format parameters to log functions instead of using %

2010-10-16 Thread Sascha Silbe
This avoids the overhead from the string formatting on production systems. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py index b06f672..e6c2c44 100644 --- a/src/jarabe/desktop/favoritesview.py +++

[Sugar-devel] [PATCH sugar 02/21] style cleanup: move globals before class and method definitions

2010-10-16 Thread Sascha Silbe
This only touches the globals that were flagged by pep8 due to white space issues. I've also left the sunflower layout variables alone. AFAICT this layout is currently unused and should be removed instead (or factored out like the snow flake layout and reenabled). Signed-off-by: Sascha Silbe

[Sugar-devel] [PATCH sugar 01/21] fix EOL spaces

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py index 898d79c..77d3b86 100644 --- a/extensions/cpsection/aboutcomputer/model.py +++ b/extensions/cpsection/aboutcomputer/model.py @@ -40,7 +40,7

[Sugar-devel] [PATCH sugar 20/21] pylint cleanup: don't override variables from outer scope

2010-10-16 Thread Sascha Silbe
If two different entities have the same name, things get messy. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py index 720fc40..aea2357 100644 --- a/src/jarabe/desktop/schoolserver.py +++

[Sugar-devel] [PATCH sugar 21/21] pylint cleanup: disable warnings for reasonable catch-all exception handlers

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py index 1edee8f..931c59b 100644 --- a/src/jarabe/model/bundleregistry.py +++ b/src/jarabe/model/bundleregistry.py @@ -216,6 +216,7 @@ class

[Sugar-devel] [PATCH sugar 06/21] PEP8 cleanup: ensure lines are shorter than 80 characters

2010-10-16 Thread Sascha Silbe
This is important for Sugar because the XO has a small screen where long lines would make the code hard to understand (because you need to constantly scroll horizontally). Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/cpsection/datetime/view.py

[Sugar-devel] [PATCH sugar 18/21] pylint cleanup: fix indentation

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index e97d5b0..6c9c764 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -420,8 +420,8 @@ class

[Sugar-devel] [PATCH sugar 12/21] use logging.exception() instead of logging.error(traceback.format_exc())

2010-10-16 Thread Sascha Silbe
logging.exception() handles exceptions nicely for us, no need to explicitly use traceback. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/cpsection/updater/backends/aslo.py b/extensions/cpsection/updater/backends/aslo.py index 016e5e8..eec54b0 100644 ---

[Sugar-devel] [PATCH sugar 19/21] jarabe.desktop.schoolserver: mark helper functions and classes as private

2010-10-16 Thread Sascha Silbe
Only register_laptop and RegisterError are meant to be public API. Proper marking of private / public makes it easier to see which code changes break API (or not). Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/schoolserver.py

[Sugar-devel] [PATCH sugar 07/21] PEP8 cleanup: don't use has_key()

2010-10-16 Thread Sascha Silbe
has_key() has been deprecated for quite some time now. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py index 99734a2..1b3ccda 100644 --- a/src/jarabe/desktop/meshbox.py +++ b/src/jarabe/desktop/meshbox.py @@ -119,7

[Sugar-devel] [PATCH sugar 10/21] pylint cleanup: replace disable-msg with disable

2010-10-16 Thread Sascha Silbe
Adapt to upstream format change. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/config.py.in b/src/jarabe/config.py.in index 6c418e9..d22ee9a 100644 --- a/src/jarabe/config.py.in +++ b/src/jarabe/config.py.in @@ -14,7 +14,7 @@ # along with this program; if not, write

[Sugar-devel] [PATCH sugar 17/21] pylint cleanup: don't override built-in objects

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index a3a003f..ffec677 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -697,8 +697,8 @@ class OlpcMeshDeviceView(ToolButton):

[Sugar-devel] [PATCH sugar 15/21] CurrentActivityPalette: remove dead code

2010-10-16 Thread Sascha Silbe
__active_window_changed_cb() is not referenced anywhere and contains broken code. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/view/palettes.py b/src/jarabe/view/palettes.py index cb30ed8..d9c1f6b 100644 --- a/src/jarabe/view/palettes.py +++

[Sugar-devel] [PATCH sugar 11/21] pylint cleanup: remove unused imports

2010-10-16 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index 8c86fca..a3a003f 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -23,7 +23,6 @@ import logging import hashlib import

[Sugar-devel] [PATCH sugar 16/21] ignore incorrect pylint error E1101

2010-10-16 Thread Sascha Silbe
pylint isn't smart enough to figure out the contents of ParseResult and gtk.Invisible, so squelch the warning. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/frame/clipboard.py b/src/jarabe/frame/clipboard.py index 65872ef..be2b902 100644 ---

[Sugar-devel] [PATCH sugar 08/21] style cleanup: use everywhere

2010-10-16 Thread Sascha Silbe
Most of the code uses , so adjust the few deviations. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/docs/release_howto.txt b/docs/release_howto.txt index db877e0..841809a 100644 --- a/docs/release_howto.txt +++ b/docs/release_howto.txt @@ -1,7 +1,7 @@ -''' This is the release

[Sugar-devel] [PATCH sugar 13/21] pylint cleanup: mark some variables as unused

2010-10-16 Thread Sascha Silbe
Follow the convention of marking known-unused (but required for de-marshalling purposes) variables by postfixing them with an underscore. Signed-off-by: Sascha Silbe sascha-...@silbe.org diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py index

Re: [Sugar-devel] Weekly test request reminders? (was Re: Priorities for testing)

2010-10-16 Thread Tom Parker
On Wed, 2010-10-13 at 16:10 +0200, Simon Schampijer wrote: I am doing XO builds containing the latest Sugar (0.90) for the XO [2]. So given from your information, that should be a good way for you to test 0.90. Indeed, we are testing these builds. Thanks for preparing them.