Re: [Sugar-devel] [ASLO] Release Screencast-8

2012-12-06 Thread Chris Leonard
How about i18n and posting on Pootle?

cjl
Sugar Labs Translation Team Coordinator

On Thu, Dec 6, 2012 at 9:06 PM, Sugar Labs Activities
 wrote:
> Activity Homepage:
> http://activities.sugarlabs.org/addon/4447
>
> Sugar Platform:
> 0.82 - 0.98
>
> Download Now:
> http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo
>
> Release notes:
> Migration from recordmydesktop to gstreamer and performance improvements
>
> Ariel Calzada - ar...@activitycentral.com
> Flavio Danesse - fdane...@activitycentral.com
> Rafael Ortíz - raf...@activitycentral.com
>
>
> Sugar Labs Activities
> http://activities.sugarlabs.org
>
> ___
> 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] [ASLO] Release Screencast-8

2012-12-06 Thread Ariel Calzada
Done :)

2012/12/6 Alan Jhonn Aguiar Schwyn 

> Maybe this it's better..
> The countour it's more visible..
>
> --
> Date: Thu, 6 Dec 2012 22:19:08 -0500
>
> Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
> From: ar...@activitycentral.com
> To: alan...@hotmail.com
> CC: sugar-devel@lists.sugarlabs.org
>
>
> Added thnx
>
> 2012/12/6 Alan Jhonn Aguiar Schwyn 
>
> Good!
>
> One more: the activity icon..
>
> Two possibilities..
>
> Regards!
>
> Alan
>
> --
> Date: Thu, 6 Dec 2012 22:02:42 -0500
>
> Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
> From: ar...@activitycentral.com
> To: alan...@hotmail.com
>
>
> Thanks i included the image. feel free to comment anything
>
> Regards,
> Ariel
>
> 2012/12/6 Alan Jhonn Aguiar Schwyn 
>
> Would be good put a capture of the activity on ASLO..
>
> See the attached.. maybe "screen1.png" it's good...
>
> If you don't have time, I can upload it..
>
> Regards!
>
> Alan
>
> > To: sugar-devel@lists.sugarlabs.org
> > Date: Thu, 6 Dec 2012 21:06:25 -0500
> > From: activit...@sugarlabs.org
> > Subject: [Sugar-devel] [ASLO] Release Screencast-8
>
> >
> > Activity Homepage:
> > http://activities.sugarlabs.org/addon/4447
> >
> > Sugar Platform:
> > 0.82 - 0.98
> >
> > Download Now:
> > http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo
> >
> > Release notes:
> > Migration from recordmydesktop to gstreamer and performance improvements
> >
> > Ariel Calzada - ar...@activitycentral.com
> > Flavio Danesse - fdane...@activitycentral.com
> > Rafael Ortíz - raf...@activitycentral.com
> >
> >
> > Sugar Labs Activities
> > http://activities.sugarlabs.org
> >
> > ___
> > 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
>
>
>
>
> --
> Ariel Calzada
> Activity Central: http://www.activitycentral.com
>
> Facebook: https://activitycentral.com/facebook
> Google+: https://activitycentral.com/googleplus
> Twitter: https://activitycentral.com/twitter
>
>
>
>
> --
> Ariel Calzada
> Activity Central: http://www.activitycentral.com
>
> Facebook: https://activitycentral.com/facebook
> Google+: https://activitycentral.com/googleplus
> Twitter: https://activitycentral.com/twitter
>



-- 
Ariel Calzada
Activity Central: http://www.activitycentral.com

Facebook: https://activitycentral.com/facebook
Google+: https://activitycentral.com/googleplus
Twitter: https://activitycentral.com/twitter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] Release Screencast-8

2012-12-06 Thread Alan Jhonn Aguiar Schwyn
Maybe this it's better..The countour it's more visible..

Date: Thu, 6 Dec 2012 22:19:08 -0500
Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
From: ar...@activitycentral.com
To: alan...@hotmail.com
CC: sugar-devel@lists.sugarlabs.org

Added thnx

2012/12/6 Alan Jhonn Aguiar Schwyn 




Good!
One more: the activity icon..
Two possibilities..
Regards!
Alan
Date: Thu, 6 Dec 2012 22:02:42 -0500

Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
From: ar...@activitycentral.com
To: alan...@hotmail.com


Thanks i included the image. feel free to comment anything
Regards,Ariel

2012/12/6 Alan Jhonn Aguiar Schwyn 





Would be good put a capture of the activity on ASLO..
See the attached.. maybe "screen1.png" it's good...
If you don't have time, I can upload it..


Regards!
Alan

> To: sugar-devel@lists.sugarlabs.org
> Date: Thu, 6 Dec 2012 21:06:25 -0500


> From: activit...@sugarlabs.org
> Subject: [Sugar-devel] [ASLO] Release Screencast-8
> 
> Activity Homepage:
> http://activities.sugarlabs.org/addon/4447


> 
> Sugar Platform:
> 0.82 - 0.98
> 
> Download Now:
> http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo


> 
> Release notes:
> Migration from recordmydesktop to gstreamer and performance improvements 
> 
> Ariel Calzada - ar...@activitycentral.com


> Flavio Danesse - fdane...@activitycentral.com
> Rafael Ortíz - raf...@activitycentral.com


> 
> 
> Sugar Labs Activities
> http://activities.sugarlabs.org
> 
> ___
> 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




-- 
Ariel Calzada
Activity Central: http://www.activitycentral.com

Facebook: https://activitycentral.com/facebook





Google+: https://activitycentral.com/googleplus
Twitter: https://activitycentral.com/twitter



  


-- 
Ariel Calzada
Activity Central: http://www.activitycentral.com

Facebook: https://activitycentral.com/facebook




Google+: https://activitycentral.com/googleplus
Twitter: https://activitycentral.com/twitter
  <>___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] Release Screencast-8

2012-12-06 Thread Ariel Calzada
Added thnx

2012/12/6 Alan Jhonn Aguiar Schwyn 

> Good!
>
> One more: the activity icon..
>
> Two possibilities..
>
> Regards!
>
> Alan
>
> --
> Date: Thu, 6 Dec 2012 22:02:42 -0500
>
> Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
> From: ar...@activitycentral.com
> To: alan...@hotmail.com
>
>
> Thanks i included the image. feel free to comment anything
>
> Regards,
> Ariel
>
> 2012/12/6 Alan Jhonn Aguiar Schwyn 
>
> Would be good put a capture of the activity on ASLO..
>
> See the attached.. maybe "screen1.png" it's good...
>
> If you don't have time, I can upload it..
>
> Regards!
>
> Alan
>
> > To: sugar-devel@lists.sugarlabs.org
> > Date: Thu, 6 Dec 2012 21:06:25 -0500
> > From: activit...@sugarlabs.org
> > Subject: [Sugar-devel] [ASLO] Release Screencast-8
>
> >
> > Activity Homepage:
> > http://activities.sugarlabs.org/addon/4447
> >
> > Sugar Platform:
> > 0.82 - 0.98
> >
> > Download Now:
> > http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo
> >
> > Release notes:
> > Migration from recordmydesktop to gstreamer and performance improvements
> >
> > Ariel Calzada - ar...@activitycentral.com
> > Flavio Danesse - fdane...@activitycentral.com
> > Rafael Ortíz - raf...@activitycentral.com
> >
> >
> > Sugar Labs Activities
> > http://activities.sugarlabs.org
> >
> > ___
> > 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
>
>
>
>
> --
> Ariel Calzada
> Activity Central: http://www.activitycentral.com
>
> Facebook: https://activitycentral.com/facebook
> Google+: https://activitycentral.com/googleplus
> Twitter: https://activitycentral.com/twitter
>



-- 
Ariel Calzada
Activity Central: http://www.activitycentral.com

Facebook: https://activitycentral.com/facebook
Google+: https://activitycentral.com/googleplus
Twitter: https://activitycentral.com/twitter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] Release Screencast-8

2012-12-06 Thread Alan Jhonn Aguiar Schwyn
Good!
One more: the activity icon..
Two possibilities..
Regards!
Alan
Date: Thu, 6 Dec 2012 22:02:42 -0500
Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8
From: ar...@activitycentral.com
To: alan...@hotmail.com

Thanks i included the image. feel free to comment anything
Regards,Ariel

2012/12/6 Alan Jhonn Aguiar Schwyn 




Would be good put a capture of the activity on ASLO..
See the attached.. maybe "screen1.png" it's good...
If you don't have time, I can upload it..

Regards!
Alan

> To: sugar-devel@lists.sugarlabs.org
> Date: Thu, 6 Dec 2012 21:06:25 -0500

> From: activit...@sugarlabs.org
> Subject: [Sugar-devel] [ASLO] Release Screencast-8
> 
> Activity Homepage:
> http://activities.sugarlabs.org/addon/4447

> 
> Sugar Platform:
> 0.82 - 0.98
> 
> Download Now:
> http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo

> 
> Release notes:
> Migration from recordmydesktop to gstreamer and performance improvements 
> 
> Ariel Calzada - ar...@activitycentral.com

> Flavio Danesse - fdane...@activitycentral.com
> Rafael Ortíz - raf...@activitycentral.com

> 
> 
> Sugar Labs Activities
> http://activities.sugarlabs.org
> 
> ___
> 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




-- 
Ariel Calzada
Activity Central: http://www.activitycentral.com

Facebook: https://activitycentral.com/facebook




Google+: https://activitycentral.com/googleplus
Twitter: https://activitycentral.com/twitter


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


Re: [Sugar-devel] Sugar-devel Digest, Vol 50, Issue 16

2012-12-06 Thread Tony Anderson

Hi,

A little off topic. I tried the first version of screencast on an XO-1. 
The show-stopper was the time to render to ogv for a few seconds of 
recording. I gave up after 30min.


Has this changed or should screencast be used with SOAS, for example, on 
a fast system?


Tony



On 12/07/2012 04:55 AM, sugar-devel-requ...@lists.sugarlabs.org wrote:

Message: 6
Date: Thu, 6 Dec 2012 21:06:25 -0500
From: Sugar Labs Activities
To:sugar-devel@lists.sugarlabs.org
Subject: [Sugar-devel] [ASLO] Release Screencast-8
Message-ID:
Content-Type: text/plain; charset="UTF-8"

Activity Homepage:
http://activities.sugarlabs.org/addon/4447

Sugar Platform:
0.82 - 0.98

Download Now:
http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo

Release notes:
Migration from recordmydesktop to gstreamer and performance improvements


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


[Sugar-devel] [ASLO] Release Screencast-8

2012-12-06 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4447

Sugar Platform:
0.82 - 0.98

Download Now:
http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo

Release notes:
Migration from recordmydesktop to gstreamer and performance improvements 

Ariel Calzada - ar...@activitycentral.com
Flavio Danesse - fdane...@activitycentral.com
Rafael Ortíz - raf...@activitycentral.com


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] Fix the activities list palette

2012-12-06 Thread S. Daniel Francis
Thanks.
http://bugs.sugarlabs.org/ticket/4284

Walter,
Can you remove the corresponding GCI task?

2012/12/6 Daniel Narvaez :
> From: Daniel Narvaez 
>
> ActivityPaletter was ported to use the content box. We cannot mix
> content box and menu.
> ---
>  src/jarabe/desktop/activitieslist.py |   18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/jarabe/desktop/activitieslist.py 
> b/src/jarabe/desktop/activitieslist.py
> index 6594ee9..1a680fd 100644
> --- a/src/jarabe/desktop/activitieslist.py
> +++ b/src/jarabe/desktop/activitieslist.py
> @@ -30,8 +30,8 @@ from sugar3 import util
>  from sugar3.graphics import style
>  from sugar3.graphics.icon import Icon, CellRendererIcon
>  from sugar3.graphics.xocolor import XoColor
> -from sugar3.graphics.menuitem import MenuItem
>  from sugar3.graphics.alert import Alert
> +from sugar3.graphics.palettemenu import PaletteMenuItem
>
>  from jarabe.model import bundleregistry
>  from jarabe.view.palettes import ActivityPalette
> @@ -494,13 +494,14 @@ class ActivityListPalette(ActivityPalette):
>  self._favorite = registry.is_bundle_favorite(self._bundle_id,
>   self._version)
>
> -self._favorite_item = MenuItem('')
> +self._favorite_item = PaletteMenuItem()
>  self._favorite_icon = Icon(icon_name='emblem-favorite',
>  icon_size=Gtk.IconSize.MENU)
>  self._favorite_item.set_image(self._favorite_icon)
> +self._favorite_icon.show()
>  self._favorite_item.connect('activate',
>  self.__change_favorite_activate_cb)
> -self.menu.append(self._favorite_item)
> +self.menu_box.append_item(self._favorite_item)
>  self._favorite_item.show()
>
>  if activity_info.is_user_activity():
> @@ -511,12 +512,12 @@ class ActivityListPalette(ActivityPalette):
>  self.__activity_changed_cb)
>  self._update_favorite_item()
>
> -self.menu.connect('destroy', self.__destroy_cb)
> +self.menu_box.connect('destroy', self.__destroy_cb)
>
>  def _add_erase_option(self, registry, activity_info):
> -menu_item = MenuItem(_('Erase'), 'list-remove')
> +menu_item = PaletteMenuItem(_('Erase'), 'list-remove')
>  menu_item.connect('activate', self.__erase_activate_cb)
> -self.menu.append(menu_item)
> +self.menu_box.append_item(menu_item)
>  menu_item.show()
>
>  if not os.access(activity_info.get_path(), os.W_OK) or \
> @@ -528,13 +529,12 @@ class ActivityListPalette(ActivityPalette):
>  registry.disconnect(self._activity_changed_sid)
>
>  def _update_favorite_item(self):
> -label = self._favorite_item.get_child()
>  if self._favorite:
> -label.set_text(_('Remove favorite'))
> +self._favorite_item.set_label(_('Remove favorite'))
>  xo_color = XoColor('%s,%s' % (style.COLOR_WHITE.get_svg(),
>   style.COLOR_TRANSPARENT.get_svg()))
>  else:
> -label.set_text(_('Make favorite'))
> +self._favorite_item.set_label(_('Make favorite'))
>  client = GConf.Client.get_default()
>  xo_color = 
> XoColor(client.get_string('/desktop/sugar/user/color'))
>
> --
> 1.7.10.4
>
> ___
> 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


[Sugar-devel] [PATCH sugar] Fix the activities list palette

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

ActivityPaletter was ported to use the content box. We cannot mix
content box and menu.
---
 src/jarabe/desktop/activitieslist.py |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/jarabe/desktop/activitieslist.py 
b/src/jarabe/desktop/activitieslist.py
index 6594ee9..1a680fd 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -30,8 +30,8 @@ from sugar3 import util
 from sugar3.graphics import style
 from sugar3.graphics.icon import Icon, CellRendererIcon
 from sugar3.graphics.xocolor import XoColor
-from sugar3.graphics.menuitem import MenuItem
 from sugar3.graphics.alert import Alert
+from sugar3.graphics.palettemenu import PaletteMenuItem
 
 from jarabe.model import bundleregistry
 from jarabe.view.palettes import ActivityPalette
@@ -494,13 +494,14 @@ class ActivityListPalette(ActivityPalette):
 self._favorite = registry.is_bundle_favorite(self._bundle_id,
  self._version)
 
-self._favorite_item = MenuItem('')
+self._favorite_item = PaletteMenuItem()
 self._favorite_icon = Icon(icon_name='emblem-favorite',
 icon_size=Gtk.IconSize.MENU)
 self._favorite_item.set_image(self._favorite_icon)
+self._favorite_icon.show()
 self._favorite_item.connect('activate',
 self.__change_favorite_activate_cb)
-self.menu.append(self._favorite_item)
+self.menu_box.append_item(self._favorite_item)
 self._favorite_item.show()
 
 if activity_info.is_user_activity():
@@ -511,12 +512,12 @@ class ActivityListPalette(ActivityPalette):
 self.__activity_changed_cb)
 self._update_favorite_item()
 
-self.menu.connect('destroy', self.__destroy_cb)
+self.menu_box.connect('destroy', self.__destroy_cb)
 
 def _add_erase_option(self, registry, activity_info):
-menu_item = MenuItem(_('Erase'), 'list-remove')
+menu_item = PaletteMenuItem(_('Erase'), 'list-remove')
 menu_item.connect('activate', self.__erase_activate_cb)
-self.menu.append(menu_item)
+self.menu_box.append_item(menu_item)
 menu_item.show()
 
 if not os.access(activity_info.get_path(), os.W_OK) or \
@@ -528,13 +529,12 @@ class ActivityListPalette(ActivityPalette):
 registry.disconnect(self._activity_changed_sid)
 
 def _update_favorite_item(self):
-label = self._favorite_item.get_child()
 if self._favorite:
-label.set_text(_('Remove favorite'))
+self._favorite_item.set_label(_('Remove favorite'))
 xo_color = XoColor('%s,%s' % (style.COLOR_WHITE.get_svg(),
  style.COLOR_TRANSPARENT.get_svg()))
 else:
-label.set_text(_('Make favorite'))
+self._favorite_item.set_label(_('Make favorite'))
 client = GConf.Client.get_default()
 xo_color = XoColor(client.get_string('/desktop/sugar/user/color'))
 
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3 4/4] Add test for dev command

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

---
 tests/test_bundlebuilder.py |   26 ++
 1 file changed, 26 insertions(+)

diff --git a/tests/test_bundlebuilder.py b/tests/test_bundlebuilder.py
index d829281..46a02a1 100644
--- a/tests/test_bundlebuilder.py
+++ b/tests/test_bundlebuilder.py
@@ -124,6 +124,23 @@ class TestGit(unittest.TestCase):
 
 os.chdir(cwd)
 
+def _test_dev(self, source_path, build_path):
+activities_path = tempfile.mkdtemp()
+
+cwd = os.getcwd()
+os.chdir(build_path)
+
+os.environ["SUGAR_ACTIVITIES_PATH"] = activities_path
+
+setup_path = os.path.join(source_path, "setup.py")
+subprocess.call([setup_path, "dev"])
+
+activity_py_path = os.path.join(activities_path, "Sample.activity",
+"activity.py")
+self.assertTrue(os.path.exists(activity_py_path))
+
+os.chdir(cwd)
+ 
 def _test_genpot(self, source_path, build_path):
 cwd = os.getcwd()
 os.chdir(build_path)
@@ -208,6 +225,15 @@ class TestGit(unittest.TestCase):
 build_path = tempfile.mkdtemp()
 self._test_build(repo_path, build_path)
 
+def test_dev_in_source(self):
+repo_path = self._create_repo()
+self._test_genpot(repo_path, repo_path)
+
+def test_dev_out_of_source(self):
+repo_path = self._create_repo()
+build_path = tempfile.mkdtemp()
+self._test_dev(repo_path, build_path)
+
 def test_genpot_in_source(self):
 repo_path = self._create_repo()
 self._test_genpot(repo_path, repo_path)
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3 3/4] Add a SUGAR_ACTIVITIES_PATH environment variable

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

Useful for tests but perhaps for other stuff too.
---
 src/sugar3/env.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sugar3/env.py b/src/sugar3/env.py
index e681f4f..23bb0ab 100644
--- a/src/sugar3/env.py
+++ b/src/sugar3/env.py
@@ -51,8 +51,8 @@ def get_logs_path(path=None):
 
 
 def get_user_activities_path():
-return os.path.expanduser('~/Activities')
-
+return os.environ.get("SUGAR_ACTIVITIES_PATH",
+  os.path.expanduser('~/Activities'))
 
 def get_user_library_path():
 return os.path.expanduser('~/Library')
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3 2/4] Add test for the genpot command

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

---
 tests/test_bundlebuilder.py |   23 +++
 1 file changed, 23 insertions(+)

diff --git a/tests/test_bundlebuilder.py b/tests/test_bundlebuilder.py
index fc99fda..d829281 100644
--- a/tests/test_bundlebuilder.py
+++ b/tests/test_bundlebuilder.py
@@ -123,6 +123,20 @@ class TestGit(unittest.TestCase):
 self.assertItemsEqual(filenames, self._get_all_locale_files())
 
 os.chdir(cwd)
+
+def _test_genpot(self, source_path, build_path):
+cwd = os.getcwd()
+os.chdir(build_path)
+
+pot_path = os.path.join(source_path, "po", "Sample.pot")
+os.unlink(pot_path)
+
+setup_path = os.path.join(source_path, "setup.py")
+subprocess.call([setup_path, "genpot"])
+
+self.assertTrue(os.path.exists(pot_path))
+
+os.chdir(cwd)
  
 def _test_install(self, source_path, build_path):
 install_path = tempfile.mkdtemp()
@@ -193,3 +207,12 @@ class TestGit(unittest.TestCase):
 repo_path = self._create_repo()
 build_path = tempfile.mkdtemp()
 self._test_build(repo_path, build_path)
+
+def test_genpot_in_source(self):
+repo_path = self._create_repo()
+self._test_genpot(repo_path, repo_path)
+
+def test_genpot_out_of_source(self):
+repo_path = self._create_repo()
+build_path = tempfile.mkdtemp()
+self._test_genpot(repo_path, build_path)
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3 1/4] Add test for the build command

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

---
 tests/test_bundlebuilder.py |   35 +--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/tests/test_bundlebuilder.py b/tests/test_bundlebuilder.py
index 687b8c6..fc99fda 100644
--- a/tests/test_bundlebuilder.py
+++ b/tests/test_bundlebuilder.py
@@ -37,6 +37,11 @@ class TestGit(unittest.TestCase):
 
 _share_locale_files = ["locale/es/LC_MESSAGES/org.sugarlabs.Sample.mo"]
 
+def _get_all_locale_files(self):
+expected = self._share_locale_files[:]
+expected.extend(self._activity_locale_files)
+return expected
+ 
 def _create_repo(self):
 cwd = os.getcwd()
 path = tempfile.mkdtemp()
@@ -81,8 +86,7 @@ class TestGit(unittest.TestCase):
 
 stripped_filenames = self._strip_root_dir(filenames)
 expected = self._source_files[:]
-expected.extend(self._share_locale_files)
-expected.extend(self._activity_locale_files)
+expected.extend(self._get_all_locale_files())
 self.assertItemsEqual(stripped_filenames, expected)
 
 os.chdir(cwd)
@@ -102,6 +106,24 @@ class TestGit(unittest.TestCase):
 
 os.chdir(cwd)
 
+def _test_build(self, source_path, build_path):
+cwd = os.getcwd()
+os.chdir(build_path)
+
+setup_path = os.path.join(source_path, "setup.py")
+subprocess.call([setup_path, "build"])
+
+locale_path = os.path.join(build_path, "locale")
+
+filenames = []
+for root, dirs, files in os.walk(locale_path):
+rel_root = root[len(build_path) + 1:]
+filenames.extend([os.path.join(rel_root, name) for name in files])
+
+self.assertItemsEqual(filenames, self._get_all_locale_files())
+
+os.chdir(cwd)
+ 
 def _test_install(self, source_path, build_path):
 install_path = tempfile.mkdtemp()
 
@@ -162,3 +184,12 @@ class TestGit(unittest.TestCase):
 repo_path = self._create_repo()
 build_path = tempfile.mkdtemp()
 self._test_install(repo_path, build_path)
+
+def test_build_in_source(self):
+repo_path = self._create_repo()
+self._test_build(repo_path, repo_path)
+
+def test_build_out_of_source(self):
+repo_path = self._create_repo()
+build_path = tempfile.mkdtemp()
+self._test_build(repo_path, build_path)
-- 
1.7.10.4

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


Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 2/3] Rework the install to use git files

2012-12-06 Thread Daniel Narvaez
I found a bug with thise one after writing unit tests, so I just sent
a fixed patch.

On 6 December 2012 01:32, Daniel Narvaez  wrote:
> From: Daniel Narvaez 
>
> Instead of installing everything except a few ignored files. This
> is consistent with the other packagers.
> ---
>  src/sugar3/activity/bundlebuilder.py |   45 
> ++
>  1 file changed, 19 insertions(+), 26 deletions(-)
>
> diff --git a/src/sugar3/activity/bundlebuilder.py 
> b/src/sugar3/activity/bundlebuilder.py
> index 7e54152..aaa2887 100644
> --- a/src/sugar3/activity/bundlebuilder.py
> +++ b/src/sugar3/activity/bundlebuilder.py
> @@ -97,6 +97,7 @@ class Builder(object):
>
>  def __init__(self, config):
>  self.config = config
> +self.locale_dir = os.path.join(self.config.source_dir, 'locale')
>
>  def build(self):
>  self.build_locale()
> @@ -110,8 +111,8 @@ class Builder(object):
>
>  locale_dir = os.path.join(self.config.source_dir, 'locale')
>
> -if os.path.exists(locale_dir):
> -shutil.rmtree(locale_dir)
> +if os.path.exists(self.locale_dir):
> +shutil.rmtree(self.locale_dir)
>
>  for f in os.listdir(po_dir):
>  if not f.endswith('.po') or f == 'pseudo.po':
> @@ -140,10 +141,8 @@ class Builder(object):
>  f.write('summary = %s\n' % translated_summary)
>  f.close()
>
> -def get_files(self):
> -allfiles = list_files(self.config.source_dir,
> -  IGNORE_DIRS, IGNORE_FILES)
> -return allfiles
> +def get_locale_files(self):
> +return list_files(self.locale_dir, IGNORE_DIRS, IGNORE_FILES)
>
>
>  class Packager(object):
> @@ -195,10 +194,9 @@ class XOPackager(Packager):
>  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')
> -locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)
> -for f in locale_files:
> -bundle_zip.write(os.path.join(locale_dir, f),
> +
> +for f in self.builder.get_locale_files():
> +bundle_zip.write(os.path.join(self.builder.locale_dir, f),
>   os.path.join(self.config.bundle_root_dir,
>'locale', f))
>
> @@ -220,19 +218,11 @@ class SourcePackager(Packager):
>  tar.close()
>
>
> -class Installer(object):
> -IGNORES = ['po/*', 'MANIFEST', 'AUTHORS']
> -
> +class Installer(Packager):
>  def __init__(self, builder):
>  self.config = builder.config
>  self.builder = builder
>
> -def should_ignore(self, f):
> -for pattern in self.IGNORES:
> -if fnmatch(f, pattern):
> -return True
> -return False
> -
>  def install(self, prefix):
>  self.builder.build()
>
> @@ -240,13 +230,16 @@ class Installer(object):
>   self.config.bundle_root_dir)
>
>  source_to_dest = {}
> -for f in self.builder.get_files():
> -if self.should_ignore(f):
> -pass
> -elif f.startswith('locale/') and f.endswith('.mo'):
> -source_to_dest[f] = os.path.join(prefix, 'share', f)
> -else:
> -source_to_dest[f] = os.path.join(activity_path, f)
> +
> +for f in self.get_files_in_git():
> +source_path = os.path.join(self.config.source_dir, f)
> +dest_path = os.path.join(activity_path, f)
> +source_to_dest[source_path] = dest_path
> +
> +for f in self.builder.get_locale_files():
> +source_path = os.path.join(self.builder.locale_dir, f)
> +dest_path = os.path.join(prefix, 'share', 'locale', f)
> +source_to_dest[source_path] = dest_path
>
>  for source, dest in source_to_dest.items():
>  print 'Install %s to %s.' % (source, dest)
> --
> 1.7.10.4
>



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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Rework the install to use git files

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

Instead of installing everything except a few ignored files. This
is consistent with the other packagers.
---
 src/sugar3/activity/bundlebuilder.py |   48 --
 1 file changed, 23 insertions(+), 25 deletions(-)

diff --git a/src/sugar3/activity/bundlebuilder.py 
b/src/sugar3/activity/bundlebuilder.py
index 7e54152..6799467 100644
--- a/src/sugar3/activity/bundlebuilder.py
+++ b/src/sugar3/activity/bundlebuilder.py
@@ -97,6 +97,7 @@ class Builder(object):
 
 def __init__(self, config):
 self.config = config
+self.locale_dir = os.path.join(self.config.source_dir, 'locale')
 
 def build(self):
 self.build_locale()
@@ -110,8 +111,8 @@ class Builder(object):
 
 locale_dir = os.path.join(self.config.source_dir, 'locale')
 
-if os.path.exists(locale_dir):
-shutil.rmtree(locale_dir)
+if os.path.exists(self.locale_dir):
+shutil.rmtree(self.locale_dir)
 
 for f in os.listdir(po_dir):
 if not f.endswith('.po') or f == 'pseudo.po':
@@ -140,10 +141,8 @@ class Builder(object):
 f.write('summary = %s\n' % translated_summary)
 f.close()
 
-def get_files(self):
-allfiles = list_files(self.config.source_dir,
-  IGNORE_DIRS, IGNORE_FILES)
-return allfiles
+def get_locale_files(self):
+return list_files(self.locale_dir, IGNORE_DIRS, IGNORE_FILES)
 
 
 class Packager(object):
@@ -195,10 +194,9 @@ class XOPackager(Packager):
 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')
-locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)
-for f in locale_files:
-bundle_zip.write(os.path.join(locale_dir, f),
+
+for f in self.builder.get_locale_files():
+bundle_zip.write(os.path.join(self.builder.locale_dir, f),
  os.path.join(self.config.bundle_root_dir,
   'locale', f))
 
@@ -220,19 +218,11 @@ class SourcePackager(Packager):
 tar.close()
 
 
-class Installer(object):
-IGNORES = ['po/*', 'MANIFEST', 'AUTHORS']
-
+class Installer(Packager):
 def __init__(self, builder):
 self.config = builder.config
 self.builder = builder
 
-def should_ignore(self, f):
-for pattern in self.IGNORES:
-if fnmatch(f, pattern):
-return True
-return False
-
 def install(self, prefix):
 self.builder.build()
 
@@ -240,13 +230,21 @@ class Installer(object):
  self.config.bundle_root_dir)
 
 source_to_dest = {}
-for f in self.builder.get_files():
-if self.should_ignore(f):
-pass
-elif f.startswith('locale/') and f.endswith('.mo'):
-source_to_dest[f] = os.path.join(prefix, 'share', f)
+
+for f in self.get_files_in_git():
+source_path = os.path.join(self.config.source_dir, f)
+dest_path = os.path.join(activity_path, f)
+source_to_dest[source_path] = dest_path
+
+for f in self.builder.get_locale_files():
+source_path = os.path.join(self.builder.locale_dir, f)
+
+if source_path.endswith(".mo"):
+dest_path = os.path.join(prefix, 'share', 'locale', f)
 else:
-source_to_dest[f] = os.path.join(activity_path, f)
+dest_path = os.path.join(activity_path, 'locale', f)
+
+source_to_dest[source_path] = dest_path
 
 for source, dest in source_to_dest.items():
 print 'Install %s to %s.' % (source, dest)
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar-toolkit-gtk3] Add tests for bundlebuilder

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

---
 Makefile.am|8 +-
 tests/data/sample.activity/activity.py |8 +
 .../sample.activity/activity/activity-sample.svg   |   26 
 tests/data/sample.activity/activity/activity.info  |7 +
 tests/data/sample.activity/po/Sample.pot   |   26 
 tests/data/sample.activity/po/es.po|   26 
 tests/data/sample.activity/setup.py|5 +
 tests/test_bundlebuilder.py|  164 
 8 files changed, 269 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/sample.activity/activity.py
 create mode 100644 tests/data/sample.activity/activity/activity-sample.svg
 create mode 100644 tests/data/sample.activity/activity/activity.info
 create mode 100644 tests/data/sample.activity/po/Sample.pot
 create mode 100644 tests/data/sample.activity/po/es.po
 create mode 100755 tests/data/sample.activity/setup.py
 create mode 100644 tests/test_bundlebuilder.py

diff --git a/Makefile.am b/Makefile.am
index f0366b4..b5693da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
 ACLOCAL_AMFLAGS = -I m4
 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
 
+TESTS_TMPDIR=$(abs_builddir)/tests-tmp
+TESTS_PYTHONPATH=$(abs_srcdir)/src:$(PYTHONPATH)
+
 DISTCLEANFILES =   \
intltool-extract\
intltool-merge  \
@@ -15,4 +18,7 @@ SUBDIRS = bin src po
 
 test:
cd $(top_srcdir)/tests && \
-   python -m unittest discover
+mkdir -p $(TESTS_TMPDIR) && \
+TMPDIR=$(TESTS_TMPDIR) PYTHONPATH=$(TESTS_PYTHONPATH) \
+python -m unittest discover && \
+rm -rf $(TESTS_TMPDIR)
diff --git a/tests/data/sample.activity/activity.py 
b/tests/data/sample.activity/activity.py
new file mode 100644
index 000..97d3c98
--- /dev/null
+++ b/tests/data/sample.activity/activity.py
@@ -0,0 +1,8 @@
+from gettext import gettext as _
+
+from sugar3.activity import activity
+
+class SampleActivity(activity.Activity):
+def __init__(self, handle):
+activity.Activity.__init__(self, handle)
+self._text = _("Text string")
diff --git a/tests/data/sample.activity/activity/activity-sample.svg 
b/tests/data/sample.activity/activity/activity-sample.svg
new file mode 100644
index 000..8da7c63
--- /dev/null
+++ b/tests/data/sample.activity/activity/activity-sample.svg
@@ -0,0 +1,26 @@
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+   
+   
+]>
+http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; 
y="0px">
+  
+
+  
+  
+  
+
+
+
+
+
+
+  
+
diff --git a/tests/data/sample.activity/activity/activity.info 
b/tests/data/sample.activity/activity/activity.info
new file mode 100644
index 000..4cf7f75
--- /dev/null
+++ b/tests/data/sample.activity/activity/activity.info
@@ -0,0 +1,7 @@
+[Activity]
+name = Sample
+activity_version = 1
+bundle_id = org.sugarlabs.Sample
+exec = sugar-activity activity.SampleActivity
+icon = activity-sample
+license = GPLv2+
diff --git a/tests/data/sample.activity/po/Sample.pot 
b/tests/data/sample.activity/po/Sample.pot
new file mode 100644
index 000..0cee357
--- /dev/null
+++ b/tests/data/sample.activity/po/Sample.pot
@@ -0,0 +1,26 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-12-06 20:10+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: activity/activity.info:2
+msgid "Sample"
+msgstr ""
+
+#: activity.py:8
+msgid "Text string"
+msgstr ""
diff --git a/tests/data/sample.activity/po/es.po 
b/tests/data/sample.activity/po/es.po
new file mode 100644
index 000..a1a6adb
--- /dev/null
+++ b/tests/data/sample.activity/po/es.po
@@ -0,0 +1,26 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-12-06 20:10+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: activity/activity.info:2
+msgid "Sample"
+msgstr ""
+
+#: activity.py:8
+msgid "Text string"
+msgstr ""
diff --git a/tests/data/sample.activity/setup.py 
b/tests/data/sample.activity/setup.py
new file mode 100755
index 000..ad218b2
--- /dev/null
+++ b/tests/data/sample.activity/se

Re: [Sugar-devel] Infoslicer enhancement: journal images, preparing to code.

2012-12-06 Thread Gonzalo Odiard
You can see examples of how get images from the journal in Paint or Write
activity.

Gonzalo

On Thu, Dec 6, 2012 at 11:40 AM, John Kim  wrote:

> Hello,
>
> My name is John Kim, and I'm participating in Google Code-In 2012. I need
> some help in doing a code task called "Infoslicer enhancement: journal
> images."
>
> http://www.google-melange.com/gci/task/view/google/gci2012/7972208
>
> I already have sugar-build in my computer. I am currently reading the
> Sugar HIG to get a good sense of design expectations.
>
> Since I don't have coding experience, I could use some guidance into
> getting started the right way. For instance, how do I identify what src
> code implements this feature? What other wikis are imperative to understand
> before writing some code? What are some recommended practices to coding?
>
> These questions, when addressed, can help me set good footing in open
> source development. Thanks.
>
> Sincerely,
>
> John Kim
>
> ___
> 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


[Sugar-devel] Infoslicer enhancement: journal images, preparing to code.

2012-12-06 Thread John Kim
Hello,

My name is John Kim, and I'm participating in Google Code-In 2012. I need
some help in doing a code task called "Infoslicer enhancement: journal
images."

http://www.google-melange.com/gci/task/view/google/gci2012/7972208

I already have sugar-build in my computer. I am currently reading the Sugar
HIG to get a good sense of design expectations.

Since I don't have coding experience, I could use some guidance into
getting started the right way. For instance, how do I identify what src
code implements this feature? What other wikis are imperative to understand
before writing some code? What are some recommended practices to coding?

These questions, when addressed, can help me set good footing in open
source development. Thanks.

Sincerely,

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


Re: [Sugar-devel] How to detect touch of ebook mode?

2012-12-06 Thread Bert Freudenberg
For an activity example using multitouch see this:

http://activities.sugarlabs.org/sugar/addon/4611/

- Bert -

On 2012-12-06, at 12:17, Gonzalo Odiard  wrote:

> For a example about how to catch touch events:
> 
> http://git.sugarlabs.org/many-tests/mainline/blobs/master/touch_test.py
> 
> In this case, touch events and mouse events are managed in the same way
> 
> Gonzalo
> 
> On Thu, Dec 6, 2012 at 12:23 AM, Ariel Calzada  
> wrote:
>> Hi!
>> 
>> I'm sorry if this has been asked before but I woud like to know how to catch 
>> touch events or e-book mode programmatically?
>> 
>> Regards,
>> 
>> -- 
>> Ariel Calzada
>> Activity Central: http://www.activitycentral.com
> 
> 


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


Re: [Sugar-devel] How to detect touch of ebook mode?

2012-12-06 Thread Gonzalo Odiard
For a example about how to catch touch events:

http://git.sugarlabs.org/many-tests/mainline/blobs/master/touch_test.py

In this case, touch events and mouse events are managed in the same way

Gonzalo

On Thu, Dec 6, 2012 at 12:23 AM, Ariel Calzada wrote:

> Hi!
>
> I'm sorry if this has been asked before but I woud like to know how to
> catch touch events or e-book mode programmatically?
>
> Regards,
>
> --
> Ariel Calzada
> Activity Central: http://www.activitycentral.com
>
> Facebook: https://activitycentral.com/facebook
> Google+: https://activitycentral.com/googleplus
> Twitter: https://activitycentral.com/twitter
>
> ___
> 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


[Sugar-devel] [PATCH sugar-datastore] Drop test target

2012-12-06 Thread Daniel Narvaez
From: Daniel Narvaez 

The tests was removed in f3f36629db33c15030c84fd9228c50b1d7fbab71
---
 Makefile.am |4 
 1 file changed, 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index bfebefe..5d03cee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,3 @@
 ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = bin etc src
-
-test:
-   @cd tests
-   $(MAKE) -C tests test
-- 
1.7.10.4

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