[Sugar-devel] [ASLO] Release Memorize-37

2011-09-19 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4063

Sugar Platform:
0.86 - 0.94

Download Now:
http://activities.sugarlabs.org/downloads/file/27577/memorize-37.xo

Release notes:
New toolbar implemented.
Now, the demo games can de modified to create other games, and is not needed 
save and reload a created game to play it.


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] FileTransfer: handle cancellation cleanly, OLPC #11065

2011-09-19 Thread Sascha Silbe
Excerpts from Simon Schampijer's message of 2011-09-19 20:42:17 +0200:

> When a file transfer has been canceled (the sender quits
> before the receiver transferred it) we show a cancellation
> message and the option to dismiss the transfer status
> palette.
> 
> The behavior for a cancelation by the sender is a bit
 ^ typo: cancellation

> different in telepathy as noted in [1]. You do only
> get the cancellation message and the option to dismiss
> the transfer status palette once you ackepted the
   ^ typo: accepted

> transfer. The same behavior is true in Empathy.
[...]

Acked-By: Sascha Silbe 

Thanks for the patch!

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar v2] Escape all text passed to Palette.primary_text and .secondary_text

2011-09-19 Thread Sascha Silbe
sugar.graphics.palette.Palette passes primary_text and secondary_text through
to GTK without escaping it, so we need to make sure it doesn't contain
anything special in user data (activity title, bundle_id, nick name, etc.) or
translations.

Signed-off-by: Sascha Silbe 
---
v1->v2: Rebased on mainline master, caught a few more occurences

 extensions/deviceicon/battery.py |5 ++-
 extensions/deviceicon/network.py |   35 -
 extensions/deviceicon/speaker.py |4 ++-
 extensions/deviceicon/touchpad.py|4 ++-
 src/jarabe/desktop/favoritesview.py  |4 ++-
 src/jarabe/desktop/networkviews.py   |6 +++-
 src/jarabe/frame/activitiestray.py   |   15 +
 src/jarabe/frame/clipboardmenu.py|6 +++-
 src/jarabe/frame/zoomtoolbar.py  |3 +-
 src/jarabe/journal/expandedentry.py  |4 ++-
 src/jarabe/journal/palettes.py   |5 ++-
 src/jarabe/journal/volumestoolbar.py |6 +++-
 src/jarabe/view/buddymenu.py |7 -
 src/jarabe/view/palettes.py  |   24 +++---
 14 files changed, 84 insertions(+), 44 deletions(-)

diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
index 4c1ef37..260cb12 100644
--- a/extensions/deviceicon/battery.py
+++ b/extensions/deviceicon/battery.py
@@ -19,6 +19,7 @@
 import sys

 import gconf
+import glib
 import gobject
 import gtk
 import dbus
@@ -67,7 +68,7 @@ def __init__(self, battery):
 self.set_palette_invoker(FrameWidgetInvoker(self))

 self._model = DeviceModel(battery)
-self.palette = BatteryPalette(_('My Battery'))
+self.palette = BatteryPalette(glib.markup_escape_text(_('My Battery')))
 self.palette.set_group_id('frame')
 self._model.connect('updated',
 self.__battery_status_changed_cb)
@@ -161,7 +162,7 @@ def _update_secondary(self):

 self.set_content(progress_widget)

-self.props.secondary_text = secondary_text
+self.props.secondary_text = glib.markup_escape_text(secondary_text)
 self._status_label.set_text(status_text)


diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index cf8bd08..789ea13 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -109,11 +109,12 @@ def _padded(child, xalign=0, yalign=0.5):
 self.menu.append(self._disconnect_item)

 def set_connecting(self):
-self.props.secondary_text = _('Connecting...')
+label = glib.markup_escape_text(_('Connecting...'))
+self.props.secondary_text = label

 def _set_connected(self, iaddress):
 self.set_content(self._info)
-self.props.secondary_text = _('Connected')
+self.props.secondary_text = glib.markup_escape_text(_('Connected'))
 self._set_ip_address(iaddress)
 self._disconnect_item.show()

@@ -155,7 +156,8 @@ class WiredPalette(Palette):
 __gtype_name__ = 'SugarWiredPalette'

 def __init__(self):
-Palette.__init__(self, label=_('Wired Network'))
+label = glib.markup_escape_text(_('Wired Network'))
+Palette.__init__(self, primary_text=label)

 self._speed_label = gtk.Label()
 self._speed_label.props.xalign = 0.0
@@ -180,7 +182,7 @@ def _padded(child, xalign=0, yalign=0.5):
 self._info.show_all()

 self.set_content(self._info)
-self.props.secondary_text = _('Connected')
+self.props.secondary_text = glib.markup_escape_text(_('Connected'))

 def set_connected(self, speed, iaddress):
 self._speed_label.set_text('%s: %d Mb/s' % (_('Speed'), speed))
@@ -208,8 +210,8 @@ class GsmPalette(Palette):
 }

 def __init__(self):
-
-Palette.__init__(self, label=_('Wireless modem'))
+label = glib.markup_escape_text(_('Wireless modem'))
+Palette.__init__(self, primary_text=label)

 self._current_state = None
 self._failed_connection = False
@@ -276,19 +278,22 @@ def update_state(self, state, reason=0):
 def _update_label_and_text(self, reason=0):
 if self._current_state == _GSM_STATE_NOT_READY:
 self._toggle_state_item.get_child().set_label('...')
-self.props.secondary_text = _('Please wait...')
+label = glib.markup_escape_text(_('Please wait...'))
+self.props.secondary_text = label

 elif self._current_state == _GSM_STATE_DISCONNECTED:
 if not self._failed_connection:
 self._toggle_state_item.get_child().set_label(_('Connect'))
-self.props.secondary_text = _('Disconnected')
+label = glib.markup_escape_text(_('Disconnected'))
+self.props.secondary_text = label
 icon = Icon(icon_name='dialog-ok', \
 icon_size=gtk.ICON_SIZE_MENU)
 self._toggle_state_item.set_image(icon)

 elif self._current_state == _GSM_STATE_CONNECTI

Re: [Sugar-devel] [PATCH sugar] FileTransfer: handle cancellation cleanly, OLPC #11065

2011-09-19 Thread Simon Schampijer

On 09/14/2011 12:50 PM, Simon Schampijer wrote:

On 09/14/2011 12:04 PM, Simon Schampijer wrote:

When a file transfer has been canceled (the sender quits
before the receiver transferred it) show a cancellation
message and the option to dismiss the notification.

Signed-off-by: Simon Schampijer


The patch does introduce a new string. I discussed this with Gary the
other day. There is a difference if the sender actively cancels a
transfer (click on cancel in the palette) or quits the network. AFAIK,
the Sugar filetransfer code sees no difference here. That is why I went
for displaying one string that is 'ok' for both cases.

Attached is a screenshot how it looks like.

Regards,
Simon


The patch has been superseded by: 
http://lists.sugarlabs.org/archive/sugar-devel/2011-September/033424.html


I did use the same string than Empathy is using: 'The other participant 
canceled the file transfer'


Regards,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Invitations: remove item from tray after using the join/decline palette options, SL #3089

2011-09-19 Thread Simon Schampijer

On 09/14/2011 03:40 PM, Simon Schampijer wrote:

The old code did only handle the case cleanly when you
clicked on the icon in the tray. When using the palette options
several errors occured.

This patch does add a change in behavior: it reveals the
palette when you click on the button. This is to ensure
that a user is aware of the available options (discussed with
Gary).

This patch depends on: 
http://lists.sugarlabs.org/archive/sugar-devel/2011-September/033322.html

Signed-off-by: Simon Schampijer


Acked today by Sascha on irc. Pushed as: 
2433c89d52306e102903327e1ebabefc6e7527ce


Regards,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Wireless key dialog: handle delete_event correctly

2011-09-19 Thread Simon Schampijer

On 09/15/2011 11:43 AM, Daniel Drake wrote:

When clicking 'OK' in the key dialog, the response callback correctly
destroys the dialog after processing the response. However, this
causes _key_dialog_destroy_cb to attempt to process a cancel response,
causing an invalid message to be sent over dbus (which dbus rejects).

Handle delete_event correctly by catching gtk.RESPONSE_DELETE_EVENT,
no need for any special event handling.


Thanks for the patch, pushed as: 8d0daf168840ac201c35d984d7e1246d3bf4c9ca

Regards,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar] FileTransfer: handle cancellation cleanly, OLPC #11065

2011-09-19 Thread Simon Schampijer
When a file transfer has been canceled (the sender quits
before the receiver transferred it) we show a cancellation
message and the option to dismiss the transfer status
palette.

The behavior for a cancelation by the sender is a bit
different in telepathy as noted in [1]. You do only
get the cancellation message and the option to dismiss
the transfer status palette once you ackepted the
transfer. The same behavior is true in Empathy.

The cancellation message is the same as in Empathy.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=20621

Signed-off-by: Simon Schampijer 
---
 src/jarabe/frame/activitiestray.py |   19 ++-
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/jarabe/frame/activitiestray.py 
b/src/jarabe/frame/activitiestray.py
index 1c1205a..a1d13c9 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -630,12 +630,16 @@ class IncomingTransferPalette(BaseTransferPalette):
 for item in self.menu.get_children():
 self.menu.remove(item)
 
-menu_item = MenuItem(_('Resume'), icon_name='dialog-cancel')
-menu_item.connect('activate', self.__resume_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
-
-self.update_progress()
+if self.file_transfer.reason_last_change == \
+filetransfer.FT_REASON_REMOTE_STOPPED:
+menu_item = MenuItem(_('Dismiss'), icon_name='dialog-cancel')
+menu_item.connect('activate', self.__dismiss_activate_cb)
+self.menu.append(menu_item)
+menu_item.show()
+text = _('The other participant canceled the file transfer')
+label = gtk.Label(text)
+self.set_content(label)
+label.show()
 
 def __accept_activate_cb(self, menu_item):
 #TODO: figure out the best place to get rid of that temp file
@@ -662,9 +666,6 @@ class IncomingTransferPalette(BaseTransferPalette):
 def __cancel_activate_cb(self, menu_item):
 self.file_transfer.cancel()
 
-def __resume_activate_cb(self, menu_item):
-self.file_transfer.resume()
-
 def __dismiss_activate_cb(self, menu_item):
 self.emit('dismiss-clicked')
 
-- 
1.7.4.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memorize testing version

2011-09-19 Thread Gonzalo Odiard
I think the box does not "look distorted" by the projection, just IS
distorted.
We did a few tests, may be this box is from a fast test we did.

Gonzalo


> A comment on the box figure..
> The projection view "looks distorted", especially when enlarged.
> It is a bit hard to recognize as an open box when small as the interior
> corner hint is so small relative to all the other lines.
>
> Consider a version of the Etoys supplies box as a substitute (perhaps a
> mirror image).
>
>--Fred
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memorize testing version

2011-09-19 Thread Frederick Grose
2011/9/19 Gary Martin 

> On 18 Sep 2011, at 03:29, manuel quiñones wrote:
>
> > 2011/9/17 Gary Martin :
> {...}
> As discussed in todays design meeting, here is the collection style icon
> for a menu palette to replace the current memorize combo box for access to
> demo games (the resolves the issue with translated text overflowing the
> toolbar):
>
> Regards,
> --Gary


A comment on the box figure..
The projection view "looks distorted", especially when enlarged.
It is a bit hard to recognize as an open box when small as the interior
corner hint is so small relative to all the other lines.

Consider a version of the Etoys supplies box as a substitute (perhaps a
mirror image).

   --Fred
<>___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memorize testing version

2011-09-19 Thread Gonzalo Odiard
Thanks, Gary

Gonzalo

2011/9/19 Gary Martin 

> On 18 Sep 2011, at 03:29, manuel quiñones wrote:
>
> > 2011/9/17 Gary Martin :
> >> On 17 Sep 2011, at 06:21, Gonzalo Odiard wrote:
> >>
> >>>
> >>> On Fri, Sep 16, 2011 at 11:42 PM, Gary Martin <
> garycmar...@googlemail.com> wrote:
> >>> Hi Gonzalo,
> >>>
> >>> On 16 Sep 2011, at 02:14, Gonzalo Odiard wrote:
> >>>
>  I have uploaded a new version of Memorize [1],
>  with the changes we discussed in irc today, and a few more fixes.
>  * Auto save of modified games (but no demos)
>  * Alerts with new texts.
>  * Change to equal tiles mode fixes.
>  * Remove hippo dependency.
>  Any feedback is welcomed
> >>>
> >>> Just managed to take a quick look tonight. On an XO the Stop button
> falls off the toolbar into the overflow menu. Couple of suggestions to
> rectify it:
> >>>
> >>> - Use separator.set_size_request(0, -1) on the invisible separator that
> is used to push the Stop button to the right, otherwise it takes up some
> space and can trigger an overflow.
> >>>
> >>> - We can drop the separator between 'Restart Game' and the 'Equal
> Pairs' icon
> >>>
> >>> Thanks! Just in time to the release :)
> >>> I needed remove the intermediate separator and do the set_size_request,
> but we will have problems with other languages.
> >>> The spanish translation of 'Load demo games' is 'Cargar juegos de
> demostracion' and two buttons are out :(
> >>
> >> Damn :-( :-( Keep getting caught out by toolbar text translations.
> >>
> >> Manuel: Pester/remind me about adding a new HIG recommendation to avoid
> using text in the toolbars unless there is plenty of free space available,
> this one has caught us several times already.
> >
> > Yes Gary, I was also thinking that we should add this advice in Sugar's
> HIG
> >
> >>
> >>> May be we can use a collection button (with a box, like in abacus or
> turtle art?
> >>
> >> Yes, I guess is the option we now have. We will need an icon, or icons
> for the current 3 demo games. We could use a single icon like TamTam Synth's
> sound presets (a memorise like document would do), or try for a custom icon
> for each game like Walter tried for Abacus – if there are good candidates
> (addition, letters, sounds).
> >
> > As we are already late, I can try to do this change before monday
> > meeting.  Gonzalo, if you updated the patches, please send them to me.
>
> As discussed in todays design meeting, here is the collection style icon
> for a menu palette to replace the current memorize combo box for access to
> demo games (the resolves the issue with translated text overflowing the
> toolbar):
>
>
>
>
>
>
>
> Regards,
> --Gary
>
> >> Raises an interesting issue regarding disabling of a primary toolbar
> icon with a secondary palette, or do we just disable the demo game buttons
> on the secondary palette. Need to watch for corner cases, e.g if the demo
> game secondary toolbar is already open when a user clicks customize. Perhaps
> we do not need to disable the demo game selection now that we have the
> warning message (i.e. allow users to load in different demo games so they
> can see/edit the cards directly in customise mode)?
> >>
> >>>  Some suggested string changes:
> >>>
> >>> - 'Click for non equal pairs' should be 'Set non equal pairs'
> >>>
> >>> - 'Click for equal pairs' should be 'Set equal pairs'
> >>>
> >>> - 'Click for ungrouped game' should be 'Set ungrouped game'
> >>>
> >>> - 'Click for grouped game' should be 'Set grouped game'
> >>>
> >>>
> >>> Perfect, applied.
> >>>
> >>> Other than that it's looking good! :)
> >>>
> >>> I will try to publish one new version tomorrow.
> >>> May be the Monday we can discuss the demos combo substitution in the
> Design chat.
> >>
> >> Sure. Do we still have time before we need to make an official release?
> >>
> >> Regards,
> >> --Gary
> >>
> >>>
> >>> Gonzalo
> >>>
> >>
> >
> > --
> > .. manuq ..
>
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memorize testing version

2011-09-19 Thread Gary Martin
On 18 Sep 2011, at 03:29, manuel quiñones wrote:

> 2011/9/17 Gary Martin :
>> On 17 Sep 2011, at 06:21, Gonzalo Odiard wrote:
>> 
>>> 
>>> On Fri, Sep 16, 2011 at 11:42 PM, Gary Martin  
>>> wrote:
>>> Hi Gonzalo,
>>> 
>>> On 16 Sep 2011, at 02:14, Gonzalo Odiard wrote:
>>> 
 I have uploaded a new version of Memorize [1],
 with the changes we discussed in irc today, and a few more fixes.
 * Auto save of modified games (but no demos)
 * Alerts with new texts.
 * Change to equal tiles mode fixes.
 * Remove hippo dependency.
 Any feedback is welcomed
>>> 
>>> Just managed to take a quick look tonight. On an XO the Stop button falls 
>>> off the toolbar into the overflow menu. Couple of suggestions to rectify it:
>>> 
>>> - Use separator.set_size_request(0, -1) on the invisible separator that is 
>>> used to push the Stop button to the right, otherwise it takes up some space 
>>> and can trigger an overflow.
>>> 
>>> - We can drop the separator between 'Restart Game' and the 'Equal Pairs' 
>>> icon
>>> 
>>> Thanks! Just in time to the release :)
>>> I needed remove the intermediate separator and do the set_size_request, but 
>>> we will have problems with other languages.
>>> The spanish translation of 'Load demo games' is 'Cargar juegos de 
>>> demostracion' and two buttons are out :(
>> 
>> Damn :-( :-( Keep getting caught out by toolbar text translations.
>> 
>> Manuel: Pester/remind me about adding a new HIG recommendation to avoid 
>> using text in the toolbars unless there is plenty of free space available, 
>> this one has caught us several times already.
> 
> Yes Gary, I was also thinking that we should add this advice in Sugar's HIG
> 
>> 
>>> May be we can use a collection button (with a box, like in abacus or turtle 
>>> art?
>> 
>> Yes, I guess is the option we now have. We will need an icon, or icons for 
>> the current 3 demo games. We could use a single icon like TamTam Synth's 
>> sound presets (a memorise like document would do), or try for a custom icon 
>> for each game like Walter tried for Abacus – if there are good candidates 
>> (addition, letters, sounds).
> 
> As we are already late, I can try to do this change before monday
> meeting.  Gonzalo, if you updated the patches, please send them to me.

As discussed in todays design meeting, here is the collection style icon for a 
menu palette to replace the current memorize combo box for access to demo games 
(the resolves the issue with translated text overflowing the toolbar):

<>

<>

Regards,
--Gary

>> Raises an interesting issue regarding disabling of a primary toolbar icon 
>> with a secondary palette, or do we just disable the demo game buttons on the 
>> secondary palette. Need to watch for corner cases, e.g if the demo game 
>> secondary toolbar is already open when a user clicks customize. Perhaps we 
>> do not need to disable the demo game selection now that we have the warning 
>> message (i.e. allow users to load in different demo games so they can 
>> see/edit the cards directly in customise mode)?
>> 
>>>  Some suggested string changes:
>>> 
>>> - 'Click for non equal pairs' should be 'Set non equal pairs'
>>> 
>>> - 'Click for equal pairs' should be 'Set equal pairs'
>>> 
>>> - 'Click for ungrouped game' should be 'Set ungrouped game'
>>> 
>>> - 'Click for grouped game' should be 'Set grouped game'
>>> 
>>> 
>>> Perfect, applied.
>>> 
>>> Other than that it's looking good! :)
>>> 
>>> I will try to publish one new version tomorrow.
>>> May be the Monday we can discuss the demos combo substitution in the Design 
>>> chat.
>> 
>> Sure. Do we still have time before we need to make an official release?
>> 
>> Regards,
>> --Gary
>> 
>>> 
>>> Gonzalo
>>> 
>> 
> 
> -- 
> .. manuq ..

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-toolkit] bundlebuilder: refactor get_files_git to Packager to avoid code duplication

2011-09-19 Thread Daniel Drake
On Mon, Sep 19, 2011 at 6:12 PM, Simon Schampijer  wrote:
> Follow up patch for b582736375218e8944b3ce3daac667c7910a7e73
>
> Signed-off-by: Simon Schampijer 

Reviewed, looks good to me - exactly what I was thinking.

Thanks
Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar-toolkit] bundlebuilder: refactor get_files_git to Packager to avoid code duplication

2011-09-19 Thread Simon Schampijer
Follow up patch for b582736375218e8944b3ce3daac667c7910a7e73

Signed-off-by: Simon Schampijer 
---
 src/sugar/activity/bundlebuilder.py |   40 --
 1 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/src/sugar/activity/bundlebuilder.py 
b/src/sugar/activity/bundlebuilder.py
index 8263239..2cb81d7 100644
--- a/src/sugar/activity/bundlebuilder.py
+++ b/src/sugar/activity/bundlebuilder.py
@@ -156,6 +156,18 @@ class Packager(object):
 if not os.path.exists(self.config.dist_dir):
 os.mkdir(self.config.dist_dir)
 
+def get_files_in_git(self):
+git_ls = subprocess.Popen(['git', 'ls-files'], stdout=subprocess.PIPE,
+  cwd=self.config.source_dir)
+stdout, _ = git_ls.communicate()
+if git_ls.returncode:
+# Fall back to filtered list
+return list_files(self.config.source_dir,
+  IGNORE_DIRS, IGNORE_FILES)
+
+# pylint: disable=E1103
+return [path.strip() for path in stdout.strip('\n').split('\n')]
+
 
 class XOPackager(Packager):
 
@@ -170,7 +182,7 @@ class XOPackager(Packager):
 bundle_zip = zipfile.ZipFile(self.package_path, 'w',
  zipfile.ZIP_DEFLATED)
 
-for f in self._get_files_in_git():
+for f in self.get_files_in_git():
 bundle_zip.write(os.path.join(self.config.source_dir, f),
  os.path.join(self.config.bundle_root_dir, f))
 locale_dir = os.path.join(self.config.source_dir, 'locale')
@@ -182,18 +194,6 @@ class XOPackager(Packager):
 
 bundle_zip.close()
 
-def _get_files_in_git(self):
-git_ls = subprocess.Popen(['git', 'ls-files'], stdout=subprocess.PIPE,
-  cwd=self.config.source_dir)
-stdout, _ = git_ls.communicate()
-if git_ls.returncode:
-# Fall back to filtered list
-return list_files(self.config.source_dir,
-  IGNORE_DIRS, IGNORE_FILES)
-
-# pylint: disable=E1103
-return [path.strip() for path in stdout.strip('\n').split('\n')]
-
 
 class SourcePackager(Packager):
 
@@ -202,21 +202,9 @@ class SourcePackager(Packager):
 self.package_path = os.path.join(self.config.dist_dir,
  self.config.tar_name)
 
-def get_files(self):
-git_ls = subprocess.Popen(['git', 'ls-files'], stdout=subprocess.PIPE,
-  cwd=self.config.source_dir)
-stdout, _ = git_ls.communicate()
-if git_ls.returncode:
-# Fall back to filtered list
-return list_files(self.config.source_dir,
-  IGNORE_DIRS, IGNORE_FILES)
-
-# pylint: disable=E1103
-return [path.strip() for path in stdout.strip('\n').split('\n')]
-
 def package(self):
 tar = tarfile.open(self.package_path, 'w:bz2')
-for f in self.get_files():
+for f in self.get_files_in_git():
 tar.add(os.path.join(self.config.source_dir, f),
 os.path.join(self.config.tar_root_dir, f))
 tar.close()
-- 
1.7.4.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] XO_Packager: package files in git and the locale folder

2011-09-19 Thread Simon Schampijer

On 09/19/2011 06:17 PM, Daniel Drake wrote:

On Tue, Sep 13, 2011 at 11:13 AM, Simon Schampijer  wrote:

I just tested this patch while doing the Browse release (you have to be in a
jhbuild environment to not use the system-wide bundle builder). Works for me
as expected. Comments/Review on the patch?


Reviewed.

Looks fine for API-frozen 0.94, but should be accompanied with a
master-ready patch which implements Packager.get_files_git(), shared
between XOPackager and SourcePackager.

Daniel


Thanks Daniel for the review. I have pushed the patch with a verbose 
description as: b582736375218e8944b3ce3daac667c7910a7e73


The master patch will follow.

Regards,
   Simon

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Maze-13

2011-09-19 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4071

Sugar Platform:
0.82 - 0.94

Download Now:
http://activities.sugarlabs.org/downloads/file/27576/maze-13.xo

Release notes:
 *fix for olpc #11231 (wrong dimensions in pygame activities) by james cameron



Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] XO_Packager: package files in git and the locale folder

2011-09-19 Thread Daniel Drake
On Tue, Sep 13, 2011 at 11:13 AM, Simon Schampijer  wrote:
> I just tested this patch while doing the Browse release (you have to be in a
> jhbuild environment to not use the system-wide bundle builder). Works for me
> as expected. Comments/Review on the patch?

Reviewed.

Looks fine for API-frozen 0.94, but should be accompanied with a
master-ready patch which implements Packager.get_files_git(), shared
between XOPackager and SourcePackager.

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Browse (color tabs)

2011-09-19 Thread Simon Schampijer

On 09/13/2011 12:47 PM, Benjamin Berg wrote:

On Tue, 2011-09-13 at 11:12 +0200, Simon Schampijer wrote:

I would like to push those patches. Manuel has tested them as working,
any other comments?


Sorry, for not replying earlier. The patches look good to me.

Benjamin




Thanks for the review, pushed as:

http://git.sugarlabs.org/sugar-artwork/mainline/commit/8c8abc18646434e4eceef3d8dedad606482bf839

Regards,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] PyGame in xo-1.75, Maze and Physics activity

2011-09-19 Thread Rafael Ortiz
On Fri, Sep 16, 2011 at 6:40 PM, James Cameron  wrote:

> On Fri, Sep 16, 2011 at 01:48:04PM -0300, Gonzalo Odiard wrote:
> > There are a difference in initialization of PyGame needed in xo-1.75
> > because the actual driver support many modes.
>
> I'm not sure that the X driver will continue to support many modes.  I
> think it might be more correct for the driver to be fixed, which is why
> the ticket remains assigned to jnettlet.
>
> I'm surprised this hasn't happened before, such as with SoaS on random
> hardware, but I guess it does depend on the ordering of the mode list.
>
> Still, I agree, it would be better if the activities did not try to use
> a resolution that does not match the screen.
>
> So make sure you test with os4 on XO-1.75, because a later X driver may
> hide the problem from you.  ;-}
>
>
btw, Patch tested and applied to maze.


http://git.sugarlabs.org/maze/mainline/commit/cd35f35ab15775e9b15fdd6793a74a842171b3e5

> --
> James Cameron
> http://quozl.linux.org.au/
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar-toolkit] Joining shared activity: set title for activity palette in frame, SL #3109

2011-09-19 Thread Simon Schampijer
This one needs careful testing as this area has regressed already several
times. We need to set the title when we join a shared session when we
run a private session.

Signed-off-by: Simon Schampijer 
---
 src/sugar/activity/activity.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 4ea7570..6548b61 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -344,9 +344,9 @@ class Activity(Window, gtk.Container):
 self._jobject.metadata['icon-color'] = \
 self.shared_activity.props.color
 else:
-self.set_title(self._jobject.metadata['title'])
 self._jobject.metadata.connect('updated',
self.__jobject_updated_cb)
+self.set_title(self._jobject.metadata['title'])
 
 def _initialize_journal_object(self):
 title = _('%s Activity') % get_bundle_name()
-- 
1.7.4.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Do not cache the buddy palette in friends tray, SL #3108

2011-09-19 Thread Simon Schampijer

On 09/19/2011 02:17 PM, Marco Pesenti Gritti wrote:

On 19 September 2011 12:59, Simon Schampijer  wrote:

+#self.palette_invoker.cache_palette = False


Leftover?

Looks good to me otherwise.

Marco


Outch, was a leftover from testing. We need to set the non-caching 
property of course. Send a new patch.


Thanks for the review,
   Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar] Do not cache the buddy palette in friends tray, SL #3108

2011-09-19 Thread Simon Schampijer
Make the palette on demand as well

Signed-off-by: Simon Schampijer 
---
 src/jarabe/frame/friendstray.py |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/jarabe/frame/friendstray.py b/src/jarabe/frame/friendstray.py
index 4055340..26a279b 100644
--- a/src/jarabe/frame/friendstray.py
+++ b/src/jarabe/frame/friendstray.py
@@ -30,10 +30,15 @@ class FriendIcon(TrayIcon):
 TrayIcon.__init__(self, icon_name='computer-xo',
   xo_color=buddy.get_color())
 
+self._buddy = buddy
 self.set_palette_invoker(FrameWidgetInvoker(self))
-self.palette = BuddyMenu(buddy)
-self.palette.props.icon_visible = False
-self.palette.set_group_id('frame')
+self.palette_invoker.cache_palette = False
+
+def create_palette(self):
+palette = BuddyMenu(self._buddy)
+palette.props.icon_visible = False
+palette.set_group_id('frame')
+return palette
 
 
 class FriendsTray(VTray):
-- 
1.7.4.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Do not cache the buddy palette in friends tray, SL #3108

2011-09-19 Thread Marco Pesenti Gritti
On 19 September 2011 12:59, Simon Schampijer  wrote:
> +        #self.palette_invoker.cache_palette = False

Leftover?

Looks good to me otherwise.

Marco
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar] Do not cache the buddy palette in friends tray, SL #3108

2011-09-19 Thread Simon Schampijer
Make the palette on demand as well

Signed-off-by: Simon Schampijer 
---
 src/jarabe/frame/friendstray.py |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/jarabe/frame/friendstray.py b/src/jarabe/frame/friendstray.py
index 4055340..ee5f815 100644
--- a/src/jarabe/frame/friendstray.py
+++ b/src/jarabe/frame/friendstray.py
@@ -30,10 +30,15 @@ class FriendIcon(TrayIcon):
 TrayIcon.__init__(self, icon_name='computer-xo',
   xo_color=buddy.get_color())
 
+self._buddy = buddy
 self.set_palette_invoker(FrameWidgetInvoker(self))
-self.palette = BuddyMenu(buddy)
-self.palette.props.icon_visible = False
-self.palette.set_group_id('frame')
+#self.palette_invoker.cache_palette = False
+
+def create_palette(self):
+palette = BuddyMenu(self._buddy)
+palette.props.icon_visible = False
+palette.set_group_id('frame')
+return palette
 
 
 class FriendsTray(VTray):
-- 
1.7.4.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel