[Sugar-devel] [PATCH gst-plugins-espeak] Pass autogen.sh args to configure

2012-08-18 Thread Daniel Narvaez
From: Daniel Narvaez 

This is customary in autogen.sh scripts and allows to build
the plugin with jhbuild.
---
 autogen.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index e85bfec..dacf40e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,4 +6,4 @@ autoheader || exit 1
 autoconf || exit 1
 automake -a -c || exit 1
 
-[ "$NOCONFIGURE" ] || ./configure CFLAGS="$CFLAGS -Wall" 
--enable-maintainer-mode
+[ "$NOCONFIGURE" ] || ./configure CFLAGS="$CFLAGS -Wall" 
--enable-maintainer-mode "$@"
-- 
1.7.10.4

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


[Sugar-devel] [PATCH sugar] Port the gstreamer code to pygi

2012-08-18 Thread Daniel Narvaez
From: Daniel Narvaez 

---
 bin/sugar-session  |4 
 src/jarabe/model/speech.py |   20 ++--
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/bin/sugar-session b/bin/sugar-session
index 0acbc0b..ec8250d 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -28,11 +28,13 @@ if os.environ.get('SUGAR_LOGGER_LEVEL', '') == 'debug':
 
 import gettext
 import logging
+import sys
 
 from gi.repository import GConf
 from gi.repository import Gtk
 from gi.repository import Gdk
 from gi.repository import GObject
+from gi.repository import Gst
 import dbus.glib
 from gi.repository import Wnck
 
@@ -48,6 +50,8 @@ except ImportError:
 Gdk.threads_init()
 dbus.glib.threads_init()
 
+Gst.init(sys.argv)
+
 def cleanup_logs(logs_dir):
 """Clean up the log directory, moving old logs into a numbered backup
 directory.  We only keep `_MAX_BACKUP_DIRS` of these backup directories
diff --git a/src/jarabe/model/speech.py b/src/jarabe/model/speech.py
index 86a30d9..864f639 100644
--- a/src/jarabe/model/speech.py
+++ b/src/jarabe/model/speech.py
@@ -18,7 +18,7 @@ import os
 import logging
 
 from gi.repository import GConf
-import gst
+from gi.repository import Gst
 from gi.repository import Gtk
 from gi.repository import GObject
 
@@ -143,21 +143,21 @@ class _GstSpeechPlayer(GObject.GObject):
 logging.debug('Trying to restart not initialized sound device')
 return
 
-self._pipeline.set_state(gst.STATE_PLAYING)
+self._pipeline.set_state(Gst.State.PLAYING)
 self.emit('play')
 
 def pause_sound_device(self):
 if self._pipeline is None:
 return
 
-self._pipeline.set_state(gst.STATE_PAUSED)
+self._pipeline.set_state(Gst.State.PAUSED)
 self.emit('pause')
 
 def stop_sound_device(self):
 if self._pipeline is None:
 return
 
-self._pipeline.set_state(gst.STATE_NULL)
+self._pipeline.set_state(Gst.State.NULL)
 self.emit('stop')
 
 def make_pipeline(self, command):
@@ -165,18 +165,18 @@ class _GstSpeechPlayer(GObject.GObject):
 self.stop_sound_device()
 del self._pipeline
 
-self._pipeline = gst.parse_launch(command)
+self._pipeline = Gst.parse_launch(command)
 
 bus = self._pipeline.get_bus()
 bus.add_signal_watch()
 bus.connect('message', self.__pipe_message_cb)
 
 def __pipe_message_cb(self, bus, message):
-if message.type == gst.MESSAGE_EOS:
-self._pipeline.set_state(gst.STATE_NULL)
+if message.type == Gst.MessageType.EOS:
+self._pipeline.set_state(Gst.State.NULL)
 self.emit('stop')
-elif message.type == gst.MESSAGE_ERROR:
-self._pipeline.set_state(gst.STATE_NULL)
+elif message.type == Gst.MessageType.ERROR:
+self._pipeline.set_state(Gst.State.NULL)
 self.emit('stop')
 
 def speak(self, pitch, rate, voice_name, text):
@@ -197,7 +197,7 @@ class _GstSpeechPlayer(GObject.GObject):
 
 def get_all_voices(self):
 all_voices = {}
-for voice in gst.element_factory_make('espeak').props.voices:
+for voice in Gst.ElementFactory.make('espeak', None).props.voices:
 name, language, dialect = voice
 if dialect != 'none':
 all_voices[language + '_' + dialect] = name
-- 
1.7.10.4

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


[Sugar-devel] Gio.VolumeMonitor.get() crash

2012-08-18 Thread Daniel Narvaez
As mentioned on the wiki shell port page, calling
Gio.VolumeMonitor.get() inside sugar was causing  a segfault.

I found this was due to the fact that we was mixing statinc and
dynamic bindings by importing gst. Now I added the gstreamer 1.0 port
of gst-plugins-espeak to sugar-build and posted a patch to port sugar
to use pygi for gstreamer. With these changes journal_gtk3-2.patch
doesn't crash anymore.

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


Re: [Sugar-devel] [PATCH sugar] Port the gstreamer code to pygi

2012-08-18 Thread Daniel Narvaez
Feel free to ignore this, I pushed it on the manuqs-erikos-shell-port
branch. I think the idea everything will be posted for review here as
soon as the port is in good shape.

On 18 August 2012 11:38, Daniel Narvaez  wrote:
> From: Daniel Narvaez 
>
> ---
>  bin/sugar-session  |4 
>  src/jarabe/model/speech.py |   20 ++--
>  2 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/bin/sugar-session b/bin/sugar-session
> index 0acbc0b..ec8250d 100755
> --- a/bin/sugar-session
> +++ b/bin/sugar-session
> @@ -28,11 +28,13 @@ if os.environ.get('SUGAR_LOGGER_LEVEL', '') == 'debug':
>
>  import gettext
>  import logging
> +import sys
>
>  from gi.repository import GConf
>  from gi.repository import Gtk
>  from gi.repository import Gdk
>  from gi.repository import GObject
> +from gi.repository import Gst
>  import dbus.glib
>  from gi.repository import Wnck
>
> @@ -48,6 +50,8 @@ except ImportError:
>  Gdk.threads_init()
>  dbus.glib.threads_init()
>
> +Gst.init(sys.argv)
> +
>  def cleanup_logs(logs_dir):
>  """Clean up the log directory, moving old logs into a numbered backup
>  directory.  We only keep `_MAX_BACKUP_DIRS` of these backup directories
> diff --git a/src/jarabe/model/speech.py b/src/jarabe/model/speech.py
> index 86a30d9..864f639 100644
> --- a/src/jarabe/model/speech.py
> +++ b/src/jarabe/model/speech.py
> @@ -18,7 +18,7 @@ import os
>  import logging
>
>  from gi.repository import GConf
> -import gst
> +from gi.repository import Gst
>  from gi.repository import Gtk
>  from gi.repository import GObject
>
> @@ -143,21 +143,21 @@ class _GstSpeechPlayer(GObject.GObject):
>  logging.debug('Trying to restart not initialized sound device')
>  return
>
> -self._pipeline.set_state(gst.STATE_PLAYING)
> +self._pipeline.set_state(Gst.State.PLAYING)
>  self.emit('play')
>
>  def pause_sound_device(self):
>  if self._pipeline is None:
>  return
>
> -self._pipeline.set_state(gst.STATE_PAUSED)
> +self._pipeline.set_state(Gst.State.PAUSED)
>  self.emit('pause')
>
>  def stop_sound_device(self):
>  if self._pipeline is None:
>  return
>
> -self._pipeline.set_state(gst.STATE_NULL)
> +self._pipeline.set_state(Gst.State.NULL)
>  self.emit('stop')
>
>  def make_pipeline(self, command):
> @@ -165,18 +165,18 @@ class _GstSpeechPlayer(GObject.GObject):
>  self.stop_sound_device()
>  del self._pipeline
>
> -self._pipeline = gst.parse_launch(command)
> +self._pipeline = Gst.parse_launch(command)
>
>  bus = self._pipeline.get_bus()
>  bus.add_signal_watch()
>  bus.connect('message', self.__pipe_message_cb)
>
>  def __pipe_message_cb(self, bus, message):
> -if message.type == gst.MESSAGE_EOS:
> -self._pipeline.set_state(gst.STATE_NULL)
> +if message.type == Gst.MessageType.EOS:
> +self._pipeline.set_state(Gst.State.NULL)
>  self.emit('stop')
> -elif message.type == gst.MESSAGE_ERROR:
> -self._pipeline.set_state(gst.STATE_NULL)
> +elif message.type == Gst.MessageType.ERROR:
> +self._pipeline.set_state(Gst.State.NULL)
>  self.emit('stop')
>
>  def speak(self, pitch, rate, voice_name, text):
> @@ -197,7 +197,7 @@ class _GstSpeechPlayer(GObject.GObject):
>
>  def get_all_voices(self):
>  all_voices = {}
> -for voice in gst.element_factory_make('espeak').props.voices:
> +for voice in Gst.ElementFactory.make('espeak', None).props.voices:
>  name, language, dialect = voice
>  if dialect != 'none':
>  all_voices[language + '_' + dialect] = name
> --
> 1.7.10.4
>



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


[Sugar-devel] Key accelerators on the XO

2012-08-18 Thread S. Daniel Francis
Hi,
I'm developing a Sugar Activity and it has ToolButtons "gtk-add" and
"gtk-remove", those buttons append and remove elements at a
GtkTreeView and at the time to choice a key accelerator for the remove
button, I selected the "Delete" key; but that key isn't at the XO-1.75
keyboard.
I already saw the Fullscreen button has by convention the key
accelerator return on Sugar instead of F11, the typical desktop
accelerator.
Is there any convention for replace the 'Delete' key on Sugar?

Thanks and regards.
~danielf
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Key accelerators on the XO

2012-08-18 Thread Walter Bender
On Sat, Aug 18, 2012 at 12:05 PM, S. Daniel Francis
 wrote:
> Hi,
> I'm developing a Sugar Activity and it has ToolButtons "gtk-add" and
> "gtk-remove", those buttons append and remove elements at a
> GtkTreeView and at the time to choice a key accelerator for the remove
> button, I selected the "Delete" key; but that key isn't at the XO-1.75
> keyboard.

There is no delete key on any of the membrane keyboards. There is a
delete key on the mechanical ("high school") keyboards available for
both 1.5 and 1.75.

> I already saw the Fullscreen button has by convention the key
> accelerator return on Sugar instead of F11, the typical desktop
> accelerator.

> Is there any convention for replace the 'Delete' key on Sugar?

Delete doesn't typically have a F key associated with it (or any
accelerator that I am aware of).

-walter
>
> Thanks and regards.
> ~danielf
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



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


[Sugar-devel] Git Repo for "Software Update"

2012-08-18 Thread Ajay Garg
Hi all.

Kindly let know the location of the git repo, for the code that is used in
"Software Update" section.

I will be grateful.



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


[Sugar-devel] [HARMONIC] Harmonic Distribution 0.5 development release

2012-08-18 Thread Aleksey Lim
New development release of projects that conform Harmonic
Distribution[1] effort, Sweets Distribution[2] (packages with
base software) and Sugar Network[3] (content delivering/sharing
system).


== Sugar Network ==


* Improved Sugar Network integration in Sugar Shell.
  It is possible to remove activities from local storage in
  Home view and install .xo bundles from the Journal.

* After making Sugar Network activities local, related
  MIME data will be properly installed.


== Sweets Distribution ==


* Canonical stopped supporting 10.10 release. Thus, Ubuntu-10.10
  packages in Sweets Distribution repositories are also frozen and
  won't be rebuilt on updates.

* Sugar upstream issue that prevents connecting to secured APs
  Factory repository contains Sugar-0.94 which is highly depends
  on Network Manager DBus API. On recent systems, there is no way
  to connect to wireless Access Points that require authentication.

* Sweets Distribution wiki doesn't suggest installing "sweets-sugar"
  package, "sweets-desktop" package should be installed in all cases.
  But, it doesn't depend on Sugar Activities any more. All activities
  are assumed to be used from Sugar Network or prefetched by
  deployments.

* To Sugar Shell, that is being frovided from Sweets Distribution, were
  added Shell plugins functionality:


http://wiki.sugarlabs.org/go/Platform_Team/Sweets_Distribution/Features/Plugins

http://wiki.sugarlabs.org/go/Platform_Team/Sweets_Distribution/Factory/Features#Deployment_oriented
http://git.sugarlabs.org/desktop/sugar-example-plugin

  it is useful way to distribute downstream code. For example, it is
  possible to distribute another sugar-datastore implementation and
  provide a handle to switch between implementations from CP.

* Added Internet proxy plugin to setup connection behind HTTP proxy.
  This is 0.94 only solution. Newer sugar shells might have another
  implementation.


== Deployment Platform ==


* Deployment wiki page was tuned to make it more clear what is the
  purpose for Deployment oriented featreus, i.e., creating handy
  platform for downstream usage:

http://wiki.sugarlabs.org/go/Harmonic_Distribution/Deployment

* Was create Harmonic Distribution based reference XO distribution
  to make it easy to create downstream implementation.

http://wiki.sugarlabs.org/go/Harmonic_Distribution/XO_reference_distribution

  it is fully workable distribution with prebuilt XO images

http://download.sugarlabs.org/platform/reference-xo/


== Try the release ==


Follow regular Sweets Distribution instructions to setup Factory
repository and start using it on supported platforms[4]:

http://wiki.sugarlabs.org/go/Sweets_Distribution#Installation
http://wiki.sugarlabs.org/go/Sweets_Distribution#Usage

Right after installation, Sugar Network integration will be disabled, to
enable it:


http://wiki.sugarlabs.org/go/Platform_Team/Sweets_Distribution/Factory/Features#Sugar_Network_integration

In addition, there are prebuilt XO images.


http://wiki.sugarlabs.org/go/Harmonic_Distribution/XO_reference_distribution#Try_reference_implementation

See Sugar Network usage tutorial created by Thomas C Gilliard:

http://wiki.sugarlabs.org/go/Sugar_Network/Tutorial

For features and possible issues, consult Sweets Distribution Factory pages:


http://wiki.sugarlabs.org/go/Platform_Team/Sweets_Distribution/Factory/Issues

http://wiki.sugarlabs.org/go/Platform_Team/Sweets_Distribution/Factory/Features


== Credits ==


* Peruvian community that supports this work. Especially by exposing the real 
need
  in such kind projects and help with making deployment (of Harmonic 
Distribution
  based project[2]) possible.

* World wide community members who donated funds to make full time
  working possible.

* People from mailing lists and IRC channels who are helping in
  development process.


[1] http://wiki.sugarlabs.org/go/Platform_Team/Harmonic_Distribution
[2] http://wiki.sugarlabs.org/go/Sweets_Distribution
[3] http://wiki.sugarlabs.org/go/Sugar_Network
[4] 
http://wiki.sugarlabs.org/go/Platform_Team/Harmonic_Distribution/Supported_platforms#Map
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Key accelerators on the XO

2012-08-18 Thread Frederick Grose
On Sat, Aug 18, 2012 at 12:14 PM, Walter Bender wrote:

> On Sat, Aug 18, 2012 at 12:05 PM, S. Daniel Francis
>  wrote:
> > Hi,
> > I'm developing a Sugar Activity and it has ToolButtons "gtk-add" and
> > "gtk-remove", those buttons append and remove elements at a
> > GtkTreeView and at the time to choice a key accelerator for the remove
> > button, I selected the "Delete" key; but that key isn't at the XO-1.75
> > keyboard.
>
> There is no delete key on any of the membrane keyboards. There is a
> delete key on the mechanical ("high school") keyboards available for
> both 1.5 and 1.75.
>
> > I already saw the Fullscreen button has by convention the key
> > accelerator return on Sugar instead of F11, the typical desktop
> > accelerator.
>
> > Is there any convention for replace the 'Delete' key on Sugar?
>
> Delete doesn't typically have a F key associated with it (or any
> accelerator that I am aware of).
>
> -walter
> >
> > Thanks and regards.
> > ~danielf
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>

fn Erase seems to be Delete.
http://wiki.laptop.org/go/Keyboard#Missing_Keys

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


Re: [Sugar-devel] Key accelerators on the XO

2012-08-18 Thread S. Daniel Francis
2012/8/18 Frederick Grose :
>
> On Sat, Aug 18, 2012 at 12:14 PM, Walter Bender 
> wrote:
>>
>> Delete doesn't typically have a F key associated with it (or any
>> accelerator that I am aware of).
>>
>
> fn Erase seems to be Delete.
> http://wiki.laptop.org/go/Keyboard#Missing_Keys

Thank you.
I think the 'erase' key will be the must appropriated accelerator for
my activity, it's as quick as the 'delete' key, but I'll check if it
doesn't generate a conflict with the text entries. If any conflict
appears, fn erase will be ok.

Cheers,
~danielf

P.S: Looking well at the membrane keyboards, they aren't already as
comfortable as the mechanical keyboards because when I press some big
keys like the space bar, they only move down the part of the key where
my finger is, unlike the mechanical keyboards. The  key is
for quick actions, and that key is usually at the left bottom corner,
when that key isn't there (case of the XO keyboard), it's still more
uncomfortable.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Git Repo for "Software Update"

2012-08-18 Thread Chris Leonard
On Sat, Aug 18, 2012 at 12:25 PM, Ajay Garg  wrote:
> Hi all.
>
> Kindly let know the location of the git repo, for the code that is used in
> "Software Update" section.
>
> I will be grateful.

Are you talking about:

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