Re: Clipboard Notification

2008-04-14 Thread Tomeu Vizoso
Hi Eric,

2008/4/14 Eric Burns [EMAIL PROTECTED]:
 When an activity launches it brings up an instance of the notification icon
 in the activity tray. I'm trying to make it so when someone copies something
 instead of it popping up the frame for a second it shows a pulsing
 notification icon in the top left hand corner.
  I have disabled the frame popping up in frame.py.
 I am wondering, is it best to implement the notification icon in the
 clipboardservice.py? Is there any documentation on the NotificationIcon?

We have two modules called clipboardservice.py, one inside the shell
D-Bus service, and another inside the sugar library (this one wraps
the service).

None of these modules are a good place to place code that belongs to
the shell UI, as conceptually belong to the model (see
http://en.wikipedia.org/wiki/Model-view-controller).

I recommend first to do something similar to what is done in
activitiestray.py, just create a NotificationIcon when a
ClipboardButton is created. The frame will remove it after some time
has passed.

NotificationIcon is just a very basic implementation right now. Don't
worry if you cannot do everything you'd like yet. And a patch that
added some pydocs to that class would be most welcome!

If the existing code that uses NotificationIcon is not clear to you, I
recommend you to go through the pygtk tutorial first:
http://www.pygtk.org/pygtk2tutorial/index.html

 Any help would be appreciated, thanks

Hope this was of some use. Please keep asking.

Thanks,

Tomeu
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Clipboard Notification

2008-04-14 Thread Eben Eliason
 in the activity tray. I'm trying to make it so when someone copies something
 instead of it popping up the frame for a second it shows a pulsing
 notification icon in the top left hand corner.

Just a notethe notification for a clipping is supposed to appear
in the lower left corner, not the upper left.  Each edge of the Frame
is associated with a different corner.

- Eben
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Collaborative Activity Development

2008-04-14 Thread Morgan Collett
(Excuse the cross-post, but I don't know whether activity authors are
on the sugar list, which I presume is the more appropriate list for
this topic in future...)

I'm now working for OLPC, on improving activity collaboration. If you
are developing an activity and have/intend to implement collaboration,
my mission is to make that easier through documentation, examples,
improved API and general assistance.

Please take a look at http://wiki.laptop.org/go/Collaboration_Central
- a work in progress but it's intended to be a one-stop shop for
information on implementing and improving collaboration.

This week's Sugar development meeting on IRC
(http://wiki.laptop.org/go/Sugar_dev_meeting#Thursday_April_17_2008_-_17.00_.28UTC.29)
will focus on activity collaboration. If you have questions or
comments I'd love to discuss them then.

Otherwise, catch me on #sugar, or if you have issues that would
benefit other activity authors, please send them to the sugar list and
we can discuss them there.

Regards
Morgan
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Clipboard Notification

2008-04-14 Thread Eben Eliason
  I am a believer in show notifications where the user is looking,
  not off in a corner somewhere:

  When an asynchronous notification occurs, the user should NOT be
  taken away from what he is doing.  Absent a bell, the simplest
  alert I can think of is to flash the screen once (change its
  brightness for half a second, then go back to the way it was). That
  tells the user: a notification has occurred.  [It is up to the
  user, at his convenience, to look for the actual notification.]

This is a reasonable idea.  I'm happy to investigate it.


  When a _synchronous_ notification occurs (i.e., 'feedback' to
  confirm the user's action), such as when an activity is launched, I
  would like that feedback (unless it takes more than five seconds)
  to occur right where the user performed the action (e.g., where the
  cursor was).

Indeed so.  The launching feedback (probably the thing requiring the
most feedback of any action within the UI) hasn't yet been implemented
they way we'd like in the new design.  We definitely intend to provide
strong visual feedback, emphasizing the activity as the closest zoom
level by zooming into a large pulsing icon in the center of the
screen, on a white background, while the launch progresses.

  [If there is a notification associated with *putting* something
  where the Frame would show it, pulse (or temporarily distinguish)
  whatever is being put.  If the user wants to *verify* that the thing
  is sitting where it was put, *then* let him call up the Frame.]

I believe this is actually what we're doing now, right?  Every
notification icon pulses when it appears and (eventually) will slide
in or out of the Frame to strengthen the visual association with a
given edge.

Thanks for the feedback!

- Eben
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Clipboard Notification

2008-04-14 Thread Gary C Martin
On 14 Apr 2008, at 15:04, Mikus Grinbergs wrote:

 Personal note:  Been running the new look Sugar/Joyride for a
 while.  [It does what you describe when an Activity is launched.]

 I've now trained myself to notice the pulsing icon in the top left
 hand corner -- but I think that is an easily-overlooked location
 (particularly since current notification icons have the same
 background color as the border in which they sit).

I also find the new 'activity launch notification' less than  
satisfying. Launching an activity is a very distinct action  taken by  
a user, and the current pulsing notification is not enough of an  
indication of the result. It's also odd if you do happen to have the  
frame open as you see 2 pulsing icons for the launching activity (one  
the notification and one in the actual frame).

I'd like to suggest, again, that the activity launching metaphor be  
one where:

1) Kid clicks on activity icon to launch
2) Sugar immediately opens a fullscreen canvas with just the large  
pulsing icon (i.e a activity zoom view)
3) Canvas is occupied by the activity once it has loaded

This provides:

- immediate and clear feedback to the kid that an activity is indeed  
launching
- prevents casual/impatient clicks on other activity icons while the  
first loads
- allows access to the frame, and for the kid to switch back to  
neighbourhood/group/home if needed
- if the kid does intentionally switch away, the background activity  
launch does not suddenly drag them back once complete
- the slide out launch notification is not needed, but the pulsing  
frame activity icon would stay

If at some future point we get usable Sugar compositing, a nice zoom  
animation could be added to the launched activity so that from where  
ever it was clicked, it scales up and into the centre of the screen  
and starts to pulse, while the rest of the screen content fades out.

Gary

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [sugar] Clipboard Notification

2008-04-14 Thread Eben Eliason
On Mon, Apr 14, 2008 at 12:39 PM, Gary C Martin [EMAIL PROTECTED] wrote:
 On 14 Apr 2008, at 15:04, Mikus Grinbergs wrote:

   Personal note:  Been running the new look Sugar/Joyride for a
   while.  [It does what you describe when an Activity is launched.]
  
   I've now trained myself to notice the pulsing icon in the top left
   hand corner -- but I think that is an easily-overlooked location
   (particularly since current notification icons have the same
   background color as the border in which they sit).

  I also find the new 'activity launch notification' less than
  satisfying. Launching an activity is a very distinct action  taken by
  a user, and the current pulsing notification is not enough of an
  indication of the result. It's also odd if you do happen to have the
  frame open as you see 2 pulsing icons for the launching activity (one
  the notification and one in the actual frame).

  I'd like to suggest, again, that the activity launching metaphor be
  one where:

  1) Kid clicks on activity icon to launch
  2) Sugar immediately opens a fullscreen canvas with just the large
  pulsing icon (i.e a activity zoom view)
  3) Canvas is occupied by the activity once it has loaded

This is in fact the very approach we aim to implement, hopefully in
the near future.  I'm in agreement with all of the interactions you
mention below.  The one which may not be trivial to add (though again,
I would strongly prefer) is the ability to prevent the launched
activity from stealing focus if the user has since switched away, but
we'll take things one step at a time.

- Eben

  This provides:

  - immediate and clear feedback to the kid that an activity is indeed
  launching
  - prevents casual/impatient clicks on other activity icons while the
  first loads
  - allows access to the frame, and for the kid to switch back to
  neighbourhood/group/home if needed
  - if the kid does intentionally switch away, the background activity
  launch does not suddenly drag them back once complete
  - the slide out launch notification is not needed, but the pulsing
  frame activity icon would stay

  If at some future point we get usable Sugar compositing, a nice zoom
  animation could be added to the launched activity so that from where
  ever it was clicked, it scales up and into the centre of the screen
  and starts to pulse, while the rest of the screen content fades out.

  Gary

  ___
  Sugar mailing list
  [EMAIL PROTECTED]
  http://lists.laptop.org/listinfo/sugar

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Devel Digest, Vol 26, Issue 65

2008-04-14 Thread James Simmons
Morgan,

I am one of those people developing activities that make use of 
collaboration.  I'm pleased to see that someone has been charged to make 
that easier, especially through better documentation.  My Activities are 
Read Etexts and View Slides.  Both make use of code adapted from the 
Read activity, although only Read Etexts has sharing implemented in a 
released package.  It does seem to work.  View Slides has sharing code 
in git, but not released as that code does NOT work at this time.

One thing I hope you'll address is the question of setting up a sharing 
test environment as simply as possible.  I have been using Xubuntu with 
Sugar RPMs on one machine and Sugar-jhbuild on openSUSE 10.2 on 
another.  Both use the Collabora server, and I have a G1G1 laptop 
pointing to that server as well.  The thing is, I don't know if I have 
Collabora's blessing to use their server for my testing, and even if I 
did, it is frequently out of service.  Ideally I could set up my own 
server.  I do know that just having ejabberd installed from RPMs is not 
enough.  (I tried that and it didn't work).  So what is the simplest way 
for me to have my own sharing environment?

Another point I hope you'll address is the code in the Read activity for 
sharing.  It is full of FIXME comments, yet the Wiki recommends its use 
as sample code.  I'm stuck adapting that code for my own Activities as 
they are variations on the Read activity.

Thanks,

James Simmons

Date: Mon, 14 Apr 2008 17:05:38 +0200
From: Morgan Collett [EMAIL PROTECTED]
Subject: Collaborative Activity Development
To: [EMAIL PROTECTED], devel-list Devel@lists.laptop.org
Message-ID:
   [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

(Excuse the cross-post, but I don't know whether activity authors are
on the sugar list, which I presume is the more appropriate list for
this topic in future...)

I'm now working for OLPC, on improving activity collaboration. If you
are developing an activity and have/intend to implement collaboration,
my mission is to make that easier through documentation, examples,
improved API and general assistance.

Please take a look at http://wiki.laptop.org/go/Collaboration_Central
- a work in progress but it's intended to be a one-stop shop for
information on implementing and improving collaboration.

This week's Sugar development meeting on IRC
(http://wiki.laptop.org/go/Sugar_dev_meeting#Thursday_April_17_2008_-_17.00_.28UTC.29)
will focus on activity collaboration. If you have questions or
comments I'd love to discuss them then.

Otherwise, catch me on #sugar, or if you have issues that would
benefit other activity authors, please send them to the sugar list and
we can discuss them there.

Regards
Morgan
  



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Devel Digest, Vol 26, Issue 65

2008-04-14 Thread Tomeu Vizoso
On Mon, Apr 14, 2008 at 8:30 PM, James Simmons
[EMAIL PROTECTED] wrote:
 Morgan,

  I am one of those people developing activities that make use of
  collaboration.  I'm pleased to see that someone has been charged to make
  that easier, especially through better documentation.  My Activities are
  Read Etexts and View Slides.  Both make use of code adapted from the
  Read activity, although only Read Etexts has sharing implemented in a
  released package.  It does seem to work.  View Slides has sharing code
  in git, but not released as that code does NOT work at this time.

  One thing I hope you'll address is the question of setting up a sharing
  test environment as simply as possible.  I have been using Xubuntu with
  Sugar RPMs on one machine and Sugar-jhbuild on openSUSE 10.2 on
  another.  Both use the Collabora server, and I have a G1G1 laptop
  pointing to that server as well.  The thing is, I don't know if I have
  Collabora's blessing to use their server for my testing, and even if I
  did, it is frequently out of service.  Ideally I could set up my own
  server.  I do know that just having ejabberd installed from RPMs is not
  enough.  (I tried that and it didn't work).  So what is the simplest way
  for me to have my own sharing environment?

You can easily use salut-based collaboration by running several
instances of the xephyr-based emulator like this:

http://wiki.laptop.org/go/Sugar_with_sugar-jhbuild#Running_multiple_instances

Hope it helps,

Tomeu
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Devel Digest, Vol 26, Issue 65

2008-04-14 Thread Polychronis Ypodimatopoulos
Interesting. Does the presence information from each instance ever leave 
the machine's network card?

Pol

Tomeu Vizoso wrote:
 On Mon, Apr 14, 2008 at 8:30 PM, James Simmons
 [EMAIL PROTECTED] wrote:
   
 Morgan,

  I am one of those people developing activities that make use of
  collaboration.  I'm pleased to see that someone has been charged to make
  that easier, especially through better documentation.  My Activities are
  Read Etexts and View Slides.  Both make use of code adapted from the
  Read activity, although only Read Etexts has sharing implemented in a
  released package.  It does seem to work.  View Slides has sharing code
  in git, but not released as that code does NOT work at this time.

  One thing I hope you'll address is the question of setting up a sharing
  test environment as simply as possible.  I have been using Xubuntu with
  Sugar RPMs on one machine and Sugar-jhbuild on openSUSE 10.2 on
  another.  Both use the Collabora server, and I have a G1G1 laptop
  pointing to that server as well.  The thing is, I don't know if I have
  Collabora's blessing to use their server for my testing, and even if I
  did, it is frequently out of service.  Ideally I could set up my own
  server.  I do know that just having ejabberd installed from RPMs is not
  enough.  (I tried that and it didn't work).  So what is the simplest way
  for me to have my own sharing environment?
 

 You can easily use salut-based collaboration by running several
 instances of the xephyr-based emulator like this:

 http://wiki.laptop.org/go/Sugar_with_sugar-jhbuild#Running_multiple_instances

 Hope it helps,

 Tomeu
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel
   

-- 
Polychronis Ypodimatopoulos
Graduate student
Viral Communications
MIT Media Lab
Tel: +1 (617) 459-6058
http://www.mit.edu/~ypod/

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Salut based collaboration?

2008-04-14 Thread James Simmons

Tomeu,

In fact I *have* been running multiple instances of Sugar-jhbuild on the 
same box for test purposes.  This is much more convenient than using two 
machines, especially since the Xubuntu machine's RPM's are out of date 
so Read sharing doesn't work at all.


I have the two instances as separate menu options in WindowMaker, one 
called astroboy and the other astrogirl.  Sometimes this works just 
fine.  In the neighborhood view they can see each other, as well as 
several other icons and activities, which I always assumed were 
developers on the collabora server.  Lately the Neighborhood view has 
been empty; the two instances can only see themselves.  Since I have not 
updated sugar-jhbuild at all since the last time this was working I 
assumed it was because the server was down.


My first instance I launch the normal way, and the second as shown in 
the document:


SUGAR_PROFILE=2 ./sugar-jhbuild run

In any case, if I could get the Salut thing working that would be 
*exactly* the kind of thing that I hope that Morgan would document better.


Thanks,

James Simmons


Tomeu Vizoso wrote:


On Mon, Apr 14, 2008 at 8:30 PM, James Simmons
[EMAIL PROTECTED] wrote:
 


Morgan,

I am one of those people developing activities that make use of
collaboration.  I'm pleased to see that someone has been charged to make
that easier, especially through better documentation.  My Activities are
Read Etexts and View Slides.  Both make use of code adapted from the
Read activity, although only Read Etexts has sharing implemented in a
released package.  It does seem to work.  View Slides has sharing code
in git, but not released as that code does NOT work at this time.

One thing I hope you'll address is the question of setting up a sharing
test environment as simply as possible.  I have been using Xubuntu with
Sugar RPMs on one machine and Sugar-jhbuild on openSUSE 10.2 on
another.  Both use the Collabora server, and I have a G1G1 laptop
pointing to that server as well.  The thing is, I don't know if I have
Collabora's blessing to use their server for my testing, and even if I
did, it is frequently out of service.  Ideally I could set up my own
server.  I do know that just having ejabberd installed from RPMs is not
enough.  (I tried that and it didn't work).  So what is the simplest way
for me to have my own sharing environment?
   



You can easily use salut-based collaboration by running several
instances of the xephyr-based emulator like this:

http://wiki.laptop.org/go/Sugar_with_sugar-jhbuild#Running_multiple_instances

Hope it helps,

Tomeu
 



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Collaborative Activity Development

2008-04-14 Thread John Gilmore
Morgan Collett [EMAIL PROTECTED] wrote:
 I'm now working for OLPC, on improving activity collaboration.

This is great!

The best thing OLPC could do to improve activity collaboration is to
get it working for ordinary programs -- running on the X Window
System, or on MacOSX, or Windows.  Why doesn't AbiWord already
collaborate with Write?  Why doesn't Firefox collaborate with Browse?
It's the same code base.

Tying collaboration to Sugar is a losing strategy.  Once the rest of
the world figures out that *their* programs should be trivial to
collaborate in too, they'll reimplement collaboration (likely in an
incompatible way).  Then Sugar's collaboration will be an orphan
rather than the mainstream.  Instead, if OLPC's collaboration code
supported cross-platform collaboration, OLPC's model and its
implementing code would spread throughout the whole computing
infrastructure.  And that would bring in a new pile of contributors,
enhancing, debugging, and porting it everywhere.

Easy collaboration is one of OLPC's key advantages over its
competition.  Making that a reality for all the kids (and adults) in
the world requires a broader vision.  Merely debugging what makes
Sugar apps fail to collaborate under load, or getting a few more Sugar
authors to add collaboration, won't suffice.

John

PS:  If there is a simple way to install a couple of RPM's or DEB's, add
a paragraph of code and a few automake macros, and add collaboration
to any program written in C or C++, then please document it!  (If on
the other hand it only works in Python and requires sugar-jhbuild
then there's some work to be done.)

PPS:  This review of AbiWord says:

  http://www.linux.com/feature/131852

  The new AbiWord supposedly offers real-time document collaboration
  developed for the OLPC project and implemented by means of an
  experimental plugin. As per the AbiWord-2.6 release notes, there are
  three implementations of the plugin, one for the OLPC, and two (an
  XMPP-based one and a pure TCP/IP one) for Linux. The Linux plugins
  compiled without any issues, but AbiWord couldn't activate them. The
  plugin isn't currently available for Windows.

  [abiword.com says the Windows plugin is available on 2.6.2 now.  But
  I never did find the collab plugin, nor any documentation for it.  The
  2.6.0 release notes imply that the three available collab plugins can't
  actually interoperate with each other!]

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Collaborative Activity Development

2008-04-14 Thread Bobby Powers
yes, this looks like a great start!  I'm just getting my feet wet with
development (got sugar-jhbuild working today! ;), and was wondering if
anyone has had experience, or examples, of software on regular laptop
collaborating with an XO?  Is this even possible, and if it isn't then is
there a way I can help make it happen?  It would be great for me (and
others!) if I could develop a mac or linux version of an activity and have
them talk to its sister app on some XOs
Bobby

On Mon, Apr 14, 2008 at 10:02 PM, John Gilmore [EMAIL PROTECTED] wrote:

 Morgan Collett [EMAIL PROTECTED] wrote:
  I'm now working for OLPC, on improving activity collaboration.

 This is great!

 The best thing OLPC could do to improve activity collaboration is to
 get it working for ordinary programs -- running on the X Window
 System, or on MacOSX, or Windows.  Why doesn't AbiWord already
 collaborate with Write?  Why doesn't Firefox collaborate with Browse?
 It's the same code base.

 Tying collaboration to Sugar is a losing strategy.  Once the rest of
 the world figures out that *their* programs should be trivial to
 collaborate in too, they'll reimplement collaboration (likely in an
 incompatible way).  Then Sugar's collaboration will be an orphan
 rather than the mainstream.  Instead, if OLPC's collaboration code
 supported cross-platform collaboration, OLPC's model and its
 implementing code would spread throughout the whole computing
 infrastructure.  And that would bring in a new pile of contributors,
 enhancing, debugging, and porting it everywhere.

 Easy collaboration is one of OLPC's key advantages over its
 competition.  Making that a reality for all the kids (and adults) in
 the world requires a broader vision.  Merely debugging what makes
 Sugar apps fail to collaborate under load, or getting a few more Sugar
 authors to add collaboration, won't suffice.

John

 PS:  If there is a simple way to install a couple of RPM's or DEB's, add
 a paragraph of code and a few automake macros, and add collaboration
 to any program written in C or C++, then please document it!  (If on
 the other hand it only works in Python and requires sugar-jhbuild
 then there's some work to be done.)

 PPS:  This review of AbiWord says:

  http://www.linux.com/feature/131852

  The new AbiWord supposedly offers real-time document collaboration
  developed for the OLPC project and implemented by means of an
  experimental plugin. As per the AbiWord-2.6 release notes, there are
  three implementations of the plugin, one for the OLPC, and two (an
  XMPP-based one and a pure TCP/IP one) for Linux. The Linux plugins
  compiled without any issues, but AbiWord couldn't activate them. The
  plugin isn't currently available for Windows.

  [abiword.com says the Windows plugin is available on 2.6.2 now.  But
  I never did find the collab plugin, nor any documentation for it.  The
  2.6.0 release notes imply that the three available collab plugins can't
  actually interoperate with each other!]

 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Collaborative Activity Development

2008-04-14 Thread Jim Gettys
John,

We really would like to get the Sugar UI components running on vanilla
Linux desktops, and the apps all interoperating

Help greatfully appreciated...
  - Jim

On Mon, 2008-04-14 at 13:02 -0700, John Gilmore wrote:
 Morgan Collett [EMAIL PROTECTED] wrote:
  I'm now working for OLPC, on improving activity collaboration.
 
 This is great!
 
 The best thing OLPC could do to improve activity collaboration is to
 get it working for ordinary programs -- running on the X Window
 System, or on MacOSX, or Windows.  Why doesn't AbiWord already
 collaborate with Write?  Why doesn't Firefox collaborate with Browse?
 It's the same code base.
 
 Tying collaboration to Sugar is a losing strategy.  Once the rest of
 the world figures out that *their* programs should be trivial to
 collaborate in too, they'll reimplement collaboration (likely in an
 incompatible way).  Then Sugar's collaboration will be an orphan
 rather than the mainstream.  Instead, if OLPC's collaboration code
 supported cross-platform collaboration, OLPC's model and its
 implementing code would spread throughout the whole computing
 infrastructure.  And that would bring in a new pile of contributors,
 enhancing, debugging, and porting it everywhere.
 
 Easy collaboration is one of OLPC's key advantages over its
 competition.  Making that a reality for all the kids (and adults) in
 the world requires a broader vision.  Merely debugging what makes
 Sugar apps fail to collaborate under load, or getting a few more Sugar
 authors to add collaboration, won't suffice.
 
   John
 
 PS:  If there is a simple way to install a couple of RPM's or DEB's, add
 a paragraph of code and a few automake macros, and add collaboration
 to any program written in C or C++, then please document it!  (If on
 the other hand it only works in Python and requires sugar-jhbuild
 then there's some work to be done.)
 
 PPS:  This review of AbiWord says:
 
   http://www.linux.com/feature/131852
 
   The new AbiWord supposedly offers real-time document collaboration
   developed for the OLPC project and implemented by means of an
   experimental plugin. As per the AbiWord-2.6 release notes, there are
   three implementations of the plugin, one for the OLPC, and two (an
   XMPP-based one and a pure TCP/IP one) for Linux. The Linux plugins
   compiled without any issues, but AbiWord couldn't activate them. The
   plugin isn't currently available for Windows.
 
   [abiword.com says the Windows plugin is available on 2.6.2 now.  But
   I never did find the collab plugin, nor any documentation for it.  The
   2.6.0 release notes imply that the three available collab plugins can't
   actually interoperate with each other!]
 
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel
-- 
Jim Gettys
One Laptop Per Child


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Collaborative Activity Development

2008-04-14 Thread Dafydd Harries
Ar 14/04/2008 am 13:02, ysgrifennodd John Gilmore:
 Morgan Collett [EMAIL PROTECTED] wrote:
  I'm now working for OLPC, on improving activity collaboration.
 
 Tying collaboration to Sugar is a losing strategy.  Once the rest of
 the world figures out that *their* programs should be trivial to
 collaborate in too, they'll reimplement collaboration (likely in an
 incompatible way).  Then Sugar's collaboration will be an orphan
 rather than the mainstream.  Instead, if OLPC's collaboration code
 supported cross-platform collaboration, OLPC's model and its
 implementing code would spread throughout the whole computing
 infrastructure.  And that would bring in a new pile of contributors,
 enhancing, debugging, and porting it everywhere.

I absolutely agree. While most of the OLPC collaboration code will happily
work outside Sugar, there are interoperability problems, and I'm not sure what
we should do about some of them. I think perhaps we made a mistake in focusing
on designing a good API rather than protocols that would be general and easy
to reimplement (specifically, I think the discovery protocols are maybe not
general enough, and the data transport protocols are maybe too hard to
reimplement).

That said, I and a number of other people are working on popularising the
collaboration software that Collabora developed for Sugar outside Sugar.

 PS:  If there is a simple way to install a couple of RPM's or DEB's, add
 a paragraph of code and a few automake macros, and add collaboration
 to any program written in C or C++, then please document it!  (If on
 the other hand it only works in Python and requires sugar-jhbuild
 then there's some work to be done.)

It's not limited to Python, and doesn't require sugar-jhbuild, but our APIs
are too complicated. I'm hoping that we can adopt things in the vein of Ben
Schwartz's work to provide nice ways for developers to make their applications
collaborative.

Ideas about how to make our collaboration technology more general and
accessible are welcome.

 
 PPS:  This review of AbiWord says:
 
   http://www.linux.com/feature/131852
 
   The new AbiWord supposedly offers real-time document collaboration
   developed for the OLPC project and implemented by means of an
   experimental plugin. As per the AbiWord-2.6 release notes, there are
   three implementations of the plugin, one for the OLPC, and two (an
   XMPP-based one and a pure TCP/IP one) for Linux. The Linux plugins
   compiled without any issues, but AbiWord couldn't activate them. The
   plugin isn't currently available for Windows.
 
   [abiword.com says the Windows plugin is available on 2.6.2 now.  But
   I never did find the collab plugin, nor any documentation for it.  The
   2.6.0 release notes imply that the three available collab plugins can't
   actually interoperate with each other!]

I don't know of any reason why the OLPC plugin shouldn't work on a Linux
system, barring perhaps some dependency problems (e.g. new enough version of
libdbus).

-- 
Dafydd
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: cat-leases script to join leases files

2008-04-14 Thread Martin Langhoff
On Thu, Apr 10, 2008 at 3:57 PM, Martin Langhoff
[EMAIL PROTECTED] wrote:
 Attached you'll find a trivial script to concat-and-sort various lease
  files. This makes life easier for regional teams that deal with
  various shipments.

  Usage:

 cat-leases.pl */lease.sig   all_leases.sig

Ok, the script I posted initially didn't work because the leases file
is in Canonical JSON, not any plain old JSON thing. So here's a python
version using the Canonical JSON libs. I have also attached the
json.py file, which I stole from bitfrost. If you have bitfrost
anywhere in your python path, you won't need this additional json.py .

The usage is the same as above, except that a significant l changes to a y.

cheers,




m
-- 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED] -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
#!/usr/bin/python 
#
# Usage:
#
#   cat-leases.pl */lease.sig   all_leases.sig
#
# cat-leases will concatenate and sort the JSON-encoded
# activation leases (for OLPC XOs of the XO-1 series).
#
#
# NOTE: the json we import here is actually
# Canonical JSON reader/writer from the
# bitfrost/util directory.
#
# 
# Blame: Martin Langhoff [EMAIL PROTECTED]
# License: GPL v2
#

# if Bitfrost's json.py is in the PYTHONPATH
import json
# if Bitfrost is in the PYTHONPATH
#import bitfrost.util.json as json

import sys

data = {}

# note - we skip the zeroth position
# of argv which has $0
for  n in range(1,len(sys.argv)):
fn = sys.argv[n]
file = open(fn, 'r')
fcontent = file.read()
file.close()

# read the data and pull the dict out of the nested
# structure
newdata = json.read(fcontent)
newdata = newdata.pop()
data.update(newdata)

ordereddata = {}
for k in sorted(newdata.keys()):
ordereddata[k] = newdata[k]

json.write_to_file(sys.stdout, [1, ordereddata])
#!/usr/bin/python2.5
Canonical JSON reader/writer.

See http://wiki.laptop.org/go/Canonical_JSON for specification.

 _selfTest()
All tests passed.

import re, types

##json.py implements a JSON (http://json.org) reader and writer.
##Copyright (C) 2005  Patrick D. Logan
##Contact mailto:[EMAIL PROTECTED]
##
##This library is free software; you can redistribute it and/or
##modify it under the terms of the GNU Lesser General Public
##License as published by the Free Software Foundation; either
##version 2.1 of the License, or (at your option) any later version.
##
##This library is distributed in the hope that it will be useful,
##but WITHOUT ANY WARRANTY; without even the implied warranty of
##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
##Lesser General Public License for more details.
##
##You should have received a copy of the GNU Lesser General Public
##License along with this library; if not, write to the Free Software
##Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

##HACKED TO PIECES by C. Scott Ananian, 2007.
##to support canonical JSON format (and only that!)



class _StringGenerator(object):
def __init__(self, string):
self.string = string
self.index = 0 # first unread character
def peek(self):
i = self.index
if i  len(self.string):
return self.string[i]
else:
return None
def next(self):
if self.index  len(self.string):
c = self.string[self.index]
self.index += 1
return c
else:
raise StopIteration
def read_re(self, regex, group=0):
m = regex.match(self.string, self.index)
if m is None:
raise ReadException(Trying to read %s: '%s' % (regex, self.string[self.index:]))
self.index = m.end()
return m.group(group)
def all(self):
return self.string

class WriteException(Exception):
pass

class ReadException(Exception):
pass

class CJsonReader(object):
hex_digits = {'a': 10,'b': 11,'c': 12,'d': 13,'e': 14,'f':15}

def read(self, s):
self._generator = _StringGenerator(s)
result = self._read()
if self._generator.peek() is not None:
raise ReadException(String incompletely read.)
return result

def _read(self):
peek = self._generator.peek()
if peek is None:
raise ReadException(Nothing to read: '%s' % self._generator.all())
if peek == '{':
return self._readObject()
elif peek == '[':
return self._readArray()
elif peek == '':
return self._readString()
elif peek == '-' or peek.isdigit():
return self._readNumber()
elif peek == 't':
return self._readTrue()
elif peek == 'f':
return self._readFalse()
elif peek == 'n':
return self._readNull()
else:
   

Re: PEAP Configuration on OLPC

2008-04-14 Thread John Watlington

Is this really the best answer we can come up with ?
I was serious about having to do this to 1500 machines
next week, and hopefully millions in the future...

wad

On Apr 8, 2008, at 11:08 AM, Simon Schampijer wrote:

 You can use about:config in recent builds:
 http://wiki.laptop.org/go/Wifi_Connectivity#Proxy_Settings

 Best,
Simon

 John Watlington wrote:
 Does anybody know the answer to Where
 does gecko keep its configuration files ?
 Thanks,
 wad
 Begin forwarded message:
 From: Motaib Abdel
 Sent: Tuesday, April 01, 2008 11:34 AM
 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Cc: Bentahar Latif; Kerner Marty
 Subject: RE: PEAP Configuration on OLPC

 John,

 With build 650 I was able to configure proxy settings in the   
 user.js file located in /home/olpc/.sugar/default/gecko.
 I no longer see the gecko directory in the new build.  We’d like  
 to  automate the proxy configuration and need to know the file  
 where  these browser preferences are saved.
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: PEAP Configuration on OLPC

2008-04-14 Thread Marco Pesenti Gritti
In Update.1 the user.js is inside rainbow managed directories and
afaik he path is not predictable.

You could add the proxy prefs to /usr/share/hulahop/prefs.js (note the
use of pref there instead of user_pref).

Marco

On Tue, Apr 15, 2008 at 2:55 AM, John Watlington [EMAIL PROTECTED] wrote:

  Is this really the best answer we can come up with ?
  I was serious about having to do this to 1500 machines
  next week, and hopefully millions in the future...


  wad

  On Apr 8, 2008, at 11:08 AM, Simon Schampijer wrote:



  You can use about:config in recent builds:
   http://wiki.laptop.org/go/Wifi_Connectivity#Proxy_Settings
  
   Best,
  Simon
  
   John Watlington wrote:
   Does anybody know the answer to Where
   does gecko keep its configuration files ?
   Thanks,
   wad
   Begin forwarded message:
   From: Motaib Abdel
   Sent: Tuesday, April 01, 2008 11:34 AM
   To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
   Cc: Bentahar Latif; Kerner Marty
   Subject: RE: PEAP Configuration on OLPC
  
   John,
  
   With build 650 I was able to configure proxy settings in the
   user.js file located in /home/olpc/.sugar/default/gecko.
   I no longer see the gecko directory in the new build.  We'd like
   to  automate the proxy configuration and need to know the file
   where  these browser preferences are saved.
   ___
   Devel mailing list
   Devel@lists.laptop.org
   http://lists.laptop.org/listinfo/devel
  

  ___
  Devel mailing list
  Devel@lists.laptop.org
  http://lists.laptop.org/listinfo/devel

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Battery life estimation considered impossible?

2008-04-14 Thread Martin Dengler
In the course of updating[1] sugar/view/devices/battery.py to look like
Eben's new design[2], I wasn't able to come up with a satisfactory way
to calculate remaining battery life.

Can anyone opine as to whether it's possible/feasible right now to
estimate number of minutes of battery power remaining?

Can anyone do better than my naive algorithm[3]?

Martin

1. http://pastebin.be/10499

2. http://wiki.laptop.org/go/Designs/Frame#06

3. minutes_left = battery_capacity_pct / 0.59. From [1]. The magic
constant is about 1.2 pct of battery capacity = 2 minutes of power;
this is what I've observed and consistent with other reported
capacities I've seen; but of course the approach is fatally flawed.


pgpXThNCvwlp6.pgp
Description: PGP signature
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Battery life estimation considered impossible?

2008-04-14 Thread Chris Ball
Hi,

Can anyone opine as to whether it's possible/feasible right now to
estimate number of minutes of battery power remaining?

You could look at gnome-power-manager, which performs a principled
estimation -- a matrix of previous discharge rate intervals indexed by
the charge at the time and the actual average discharge rate during that
interval.  OHM/suspend complicates everything, though.

A neat idea was suggested at the mini-conference:  we had the pie
view for seeing how much memory each activity was using, and it might
be possible to build up (over a long period of time) a view of how much
power each activity uses as well.  :)

- Chris.
-- 
Chris Ball   [EMAIL PROTECTED]
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [sugar] Clipboard Notification

2008-04-14 Thread Eric Burns
While trying to create an instance of NotificationIcon() in the
_object_added_cb function in clipboardtray.py I couldn't get the path to the
icon from the ClipboardIcon() instance because it isn't set until
_object_state_changed_cb is called.

Is there a way I can get the path to the icon?

On Mon, Apr 14, 2008 at 11:44 AM, Eben Eliason [EMAIL PROTECTED]
wrote:

 On Mon, Apr 14, 2008 at 12:39 PM, Gary C Martin [EMAIL PROTECTED]
 wrote:
  On 14 Apr 2008, at 15:04, Mikus Grinbergs wrote:
 
Personal note:  Been running the new look Sugar/Joyride for a
while.  [It does what you describe when an Activity is launched.]
   
I've now trained myself to notice the pulsing icon in the top left
hand corner -- but I think that is an easily-overlooked location
(particularly since current notification icons have the same
background color as the border in which they sit).
 
   I also find the new 'activity launch notification' less than
   satisfying. Launching an activity is a very distinct action  taken by
   a user, and the current pulsing notification is not enough of an
   indication of the result. It's also odd if you do happen to have the
   frame open as you see 2 pulsing icons for the launching activity (one
   the notification and one in the actual frame).
 
   I'd like to suggest, again, that the activity launching metaphor be
   one where:
 
   1) Kid clicks on activity icon to launch
   2) Sugar immediately opens a fullscreen canvas with just the large
   pulsing icon (i.e a activity zoom view)
   3) Canvas is occupied by the activity once it has loaded

 This is in fact the very approach we aim to implement, hopefully in
 the near future.  I'm in agreement with all of the interactions you
 mention below.  The one which may not be trivial to add (though again,
 I would strongly prefer) is the ability to prevent the launched
 activity from stealing focus if the user has since switched away, but
 we'll take things one step at a time.

 - Eben

   This provides:
 
   - immediate and clear feedback to the kid that an activity is indeed
   launching
   - prevents casual/impatient clicks on other activity icons while the
   first loads
   - allows access to the frame, and for the kid to switch back to
   neighbourhood/group/home if needed
   - if the kid does intentionally switch away, the background activity
   launch does not suddenly drag them back once complete
   - the slide out launch notification is not needed, but the pulsing
   frame activity icon would stay
 
   If at some future point we get usable Sugar compositing, a nice zoom
   animation could be added to the launched activity so that from where
   ever it was clicked, it scales up and into the centre of the screen
   and starts to pulse, while the rest of the screen content fades out.
 
   Gary
 
   ___
   Sugar mailing list
   [EMAIL PROTECTED]
   http://lists.laptop.org/listinfo/sugar
 
 ___
 Sugar mailing list
 [EMAIL PROTECTED]
 http://lists.laptop.org/listinfo/sugar

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: PEAP Configuration on OLPC

2008-04-14 Thread John Watlington

Thanks, Marco!

Abdel, let us know if this works for you.

wad

On Apr 14, 2008, at 9:30 PM, Marco Pesenti Gritti wrote:

 In Update.1 the user.js is inside rainbow managed directories and
 afaik he path is not predictable.

 You could add the proxy prefs to /usr/share/hulahop/prefs.js (note the
 use of pref there instead of user_pref).

 Marco

 On Tue, Apr 15, 2008 at 2:55 AM, John Watlington [EMAIL PROTECTED]  
 wrote:

  Is this really the best answer we can come up with ?
  I was serious about having to do this to 1500 machines
  next week, and hopefully millions in the future...

  wad

  On Apr 8, 2008, at 11:08 AM, Simon Schampijer wrote:



 You can use about:config in recent builds:
 http://wiki.laptop.org/go/Wifi_Connectivity#Proxy_Settings

 Best,
Simon

 John Watlington wrote:
 Does anybody know the answer to Where
 does gecko keep its configuration files ?
 Thanks,
 wad
 Begin forwarded message:
 From: Motaib Abdel
 Sent: Tuesday, April 01, 2008 11:34 AM
 To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Cc: Bentahar Latif; Kerner Marty
 Subject: RE: PEAP Configuration on OLPC

 John,

 With build 650 I was able to configure proxy settings in the
 user.js file located in /home/olpc/.sugar/default/gecko.
 I no longer see the gecko directory in the new build.  We'd like
 to  automate the proxy configuration and need to know the file
 where  these browser preferences are saved.
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel


  ___
  Devel mailing list
  Devel@lists.laptop.org
  http://lists.laptop.org/listinfo/devel


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


fun and games with trying to un-suspend

2008-04-14 Thread Mikus Grinbergs
G1G1, approximately Joyride 1858.  No wireless.
Have done 'touch /etc/ohm/inhibit-idle-suspend'

When I pushed the power button briefly, the XO suspended.

Wanted to un-suspend the XO.  But no matter what I pushed on the 
keyboard (or front), the power LED lighted up briefly (about three 
seconds), then went back to indicating 'suspended' (i.e., blinking 
slowly).  The display stayed dark.

Finally was able to get the display to light up (and the XO to come 
back to life) by judicious pressing of the power button.  It was 
hit or miss (with more than 95% miss).  Press it too short - back 
to suspended;  press it too long - back to suspended;  press it at 
the wrong instant - back to suspended.

Took what seemed a minute (from awakening) for the XO to recognize 
my (external) USB keyboard again.

The whole experience was a bummer.

mikus

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] [sugar] sugar roadmap

2008-04-14 Thread Tomeu Vizoso
On Mon, Apr 14, 2008 at 3:10 AM, Benjamin M. Schwartz
[EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1

  Patrick Dubroy wrote:
  | On Sun, Apr 13, 2008 at 2:44 PM, Tomeu Vizoso [EMAIL PROTECTED]
 wrote:
  |Another option would be to create a version of Sugar that appeals to
  |programmers. But I can't imagine creating such a version that
 wouldn't
  |require a lot of programming resources.
  |
  | So here's another question: are any of the Sugar developers using it
  | as their desktop shell? I was thinking of giving that try. If all the
  | Sugar developer were eating their own dogfood, I'll bet you'd get a
  | programmer-friendly system in a hurry. In fact, I don't see why it
  | would be considered to be programmer-friendly already -- it's got
  | terminal and a text editor, what more do you need? ;-)

  Yes: I take my XO with me to class and take notes in Write.  I used to
  take my Thinkpad with me everywhere; now it never leaves my desk.  I run
  unmodified Joyride builds on my XO, and I find the interface to be both
  superb and useful.  I recently developed the DOSConsole activity solely on
  the XO itself, not because I was trying to prove any point but because it
  was the most convenient way.

I'm curious to know what your list of missing features and bugs looks like.

  No: On my desktop I run in Xinerama with two different-sized LCDs.
  Together, they have about 8 times the area of an XO screen.  Sugar will
  never make sense for that hardware without a serious redesign.  On the
  other hand, running individual activities in windows managed by Metacity
  would probably work fine.

Agreed.

  | Anyhow, speaking as someone who has only very recently gotten involved
  | with the project, I can say that the Sugar interface was one of the
  | most appealing things to me. I'm sure there are other  potential
  | contributors out there who would be attracted for the same reasons.

  Me too.  The project was vaguely interesting until I ran Sugar in Qemu, at
  which point it became compelling.

Nice to hear that, please keep giving your feedback and suggestions.

Thanks,

Tomeu
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel