[Sugar-devel] [PATCH] Make the child window of the event box insisible

2012-06-21 Thread Simon Schampijer
We do use the EventBox only to receive events, hence the
window that the even box creates should be a GDK_INPUT_ONLY
window, which means that it is invisible and only serves to
receive events [1].

A test program to see this is at [2].

[1] 
http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window
[2] dev.laptop.org/~erikos/shell_port/invisible_window.py

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 970446a..d99af7d 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -561,6 +561,8 @@ class EventIcon(Gtk.EventBox):
 def __init__(self, **kwargs):
 Gtk.EventBox.__init__(self)
 
+self.set_visible_window(False)
+
 self._icon = Icon()
 for key, value in kwargs.iteritems():
 self._icon.set_property(key, value)
-- 
1.7.10.4

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


[Sugar-devel] [PATCH] EventIcon: all the events go directly to the event box

2012-06-21 Thread Simon Schampijer
Position the event box window above the windows of its child, that way
all events inside the event box will go to the event box. If the window is
below, events in windows of child widgets will first got to that widget,
and then to its parents [1].

[1] 
http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-above-child

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index d99af7d..175d235 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -562,6 +562,7 @@ class EventIcon(Gtk.EventBox):
 Gtk.EventBox.__init__(self)
 
 self.set_visible_window(False)
+self.set_above_child(True)
 
 self._icon = Icon()
 for key, value in kwargs.iteritems():
-- 
1.7.10.4

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


[Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Simon Schampijer
The create_palette mechanism allows to create
palettes on demand and not for each icon upfront
whether it will be needed or not.

If you hover over an EventIcon and there is no
palette already associated with the Invoker, the Invoker
will call create_palette to see if it can be created
on demand. With this patch the EventIcon will return None
here (see as well CellRendererIcon or ToggleToolButton which
are having the same default behavior).
When subclassing EventIcon the create_palette method can
be overwritten and a Palette returned (see for example
the ActivityIcon in the HomeView).

Without this patch you can see tracebacks when hovering
over the EventIcon because the Invoker tries to call
create_palette.

Signed-off-by: Simon Schampijer si...@laptop.org
---
 src/sugar3/graphics/icon.py |3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 175d235..0c06bbc 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -594,6 +594,9 @@ class EventIcon(Gtk.EventBox):
 icon = GObject.property(
 type=object, getter=get_icon)
 
+def create_palette(self):
+return None
+
 def get_palette(self):
 return self._palette_invoker.palette
 
-- 
1.7.10.4

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


Re: [Sugar-devel] [PATCH] EventIcon: all the events go directly to the event box

2012-06-21 Thread Benjamin Berg
On Thu, 2012-06-21 at 10:21 +0200, Simon Schampijer wrote:
 Position the event box window above the windows of its child, that way
 all events inside the event box will go to the event box. If the window is
 below, events in windows of child widgets will first got to that widget,
 and then to its parents [1].

Looks good. There is not much of a point in sending events to the icon
itself.

 Signed-off-by: Simon Schampijer si...@laptop.org
Reviewed-by: Benjamin Berg ben...@sugarlabs.org

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


Re: [Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Benjamin Berg
On Thu, 2012-06-21 at 10:52 +0200, Simon Schampijer wrote:
 The create_palette mechanism allows to create
 palettes on demand and not for each icon upfront
 whether it will be needed or not.
 
 If you hover over an EventIcon and there is no
 palette already associated with the Invoker, the Invoker
 will call create_palette to see if it can be created
 on demand. With this patch the EventIcon will return None
 here (see as well CellRendererIcon or ToggleToolButton which
 are having the same default behavior).
 When subclassing EventIcon the create_palette method can
 be overwritten and a Palette returned (see for example
 the ActivityIcon in the HomeView).
 
 Without this patch you can see tracebacks when hovering
 over the EventIcon because the Invoker tries to call
 create_palette.

Duck typing at its best. Of course EventIcon needs to implement the
function.

 Signed-off-by: Simon Schampijer si...@laptop.org
Reviewed-by: Benjamin Berg ben...@sugarlabs.org

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


Re: [Sugar-devel] [PATCH] Make the child window of the event box insisible

2012-06-21 Thread Benjamin Berg
On Thu, 2012-06-21 at 10:10 +0200, Simon Schampijer wrote:
 We do use the EventBox only to receive events, hence the
 window that the even box creates should be a GDK_INPUT_ONLY
 window, which means that it is invisible and only serves to
 receive events [1].

It is always great to have less visible windows! Those are always a pain
in themes at least :-)

 Signed-off-by: Simon Schampijer si...@laptop.org

Reviewed-by: Benjamin Berg ben...@sugarlabs.org


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


Re: [Sugar-devel] [PATCH] Make the child window of the event box insisible

2012-06-21 Thread Manuel Quiñones
2012/6/21 Simon Schampijer si...@schampijer.de:
 We do use the EventBox only to receive events, hence the
 window that the even box creates should be a GDK_INPUT_ONLY
 window, which means that it is invisible and only serves to
 receive events [1].

And that's exactly what we need.

 A test program to see this is at [2].

 [1] 
 http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window
 [2] dev.laptop.org/~erikos/shell_port/invisible_window.py

The test program was very helpful, running it from terminal activity
(was giving warnings like No icon with the name computer-xo was found
in the theme).


 Signed-off-by: Simon Schampijer si...@laptop.org

Reviewed-by: Manuel Quiñones ma...@laptop.org

 ---
  src/sugar3/graphics/icon.py |    2 ++
  1 file changed, 2 insertions(+)

 diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
 index 970446a..d99af7d 100644
 --- a/src/sugar3/graphics/icon.py
 +++ b/src/sugar3/graphics/icon.py
 @@ -561,6 +561,8 @@ class EventIcon(Gtk.EventBox):
     def __init__(self, **kwargs):
         Gtk.EventBox.__init__(self)

 +        self.set_visible_window(False)
 +
         self._icon = Icon()
         for key, value in kwargs.iteritems():
             self._icon.set_property(key, value)
 --
 1.7.10.4

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



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


Re: [Sugar-devel] [PATCH Read] Revert Temporary solution to SL #3403 SL #3561

2012-06-21 Thread Gonzalo Odiard
Thanks. Pushed

Gonzalo

On Wed, Jun 20, 2012 at 12:05 PM, Manuel Quiñones ma...@laptop.org wrote:

 This reverts commit 0c4072cd9667222df883684ae26364c973c90773.  The
 style of the bookmarks screen was fixed in the theme, sugar-artwork
 commit 435294bf412220b8980884078035d6da87c2d1ac.

 Signed-off-by: Manuel Quiñones ma...@laptop.org
 ---
  readdialog.py |6 +-
  1 file changed, 1 insertion(+), 5 deletions(-)

 diff --git a/readdialog.py b/readdialog.py
 index e4081ef..b6366bf 100644
 --- a/readdialog.py
 +++ b/readdialog.py
 @@ -35,8 +35,7 @@ class BaseReadDialog(Gtk.Window):

 self.toolbar = Gtk.Toolbar()
 label = Gtk.Label()
 -label.set_markup('bspan foreground=#ff  %s/span/b' %
 -dialog_title)
 +label.set_markup('b  %s/b' % dialog_title)
 label.set_alignment(0, 0.5)
 tool_item = Gtk.ToolItem()
 tool_item.add(label)
 @@ -82,9 +81,6 @@ class BaseReadDialog(Gtk.Window):

 self.modify_bg(Gtk.StateType.NORMAL,
 style.COLOR_WHITE.get_gdk_color())
 -self.toolbar.modify_bg(Gtk.StateType.NORMAL,
 -style.COLOR_BLACK.get_gdk_color())
 -

 if self._canvas is not None:
 self._canvas.modify_bg(Gtk.StateType.NORMAL,
 --
 1.7.10.2


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


Re: [Sugar-devel] [PATCH] EventIcon: all the events go directly to the event box

2012-06-21 Thread Manuel Quiñones
2012/6/21 Simon Schampijer si...@schampijer.de:
 Position the event box window above the windows of its child, that way
 all events inside the event box will go to the event box. If the window is
 below, events in windows of child widgets will first got to that widget,
 and then to its parents [1].

 [1] 
 http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-above-child

Right, all events inside the event box should go to the event box.

 Signed-off-by: Simon Schampijer si...@laptop.org
Reviewed-by: Manuel Quiñones ma...@laptop.org

 ---
  src/sugar3/graphics/icon.py |    1 +
  1 file changed, 1 insertion(+)

 diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
 index d99af7d..175d235 100644
 --- a/src/sugar3/graphics/icon.py
 +++ b/src/sugar3/graphics/icon.py
 @@ -562,6 +562,7 @@ class EventIcon(Gtk.EventBox):
         Gtk.EventBox.__init__(self)

         self.set_visible_window(False)
 +        self.set_above_child(True)

         self._icon = Icon()
         for key, value in kwargs.iteritems():
 --
 1.7.10.4

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



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


Re: [Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Manuel Quiñones
2012/6/21 Benjamin Berg ben...@sugarlabs.org:
 On Thu, 2012-06-21 at 10:52 +0200, Simon Schampijer wrote:
 The create_palette mechanism allows to create
 palettes on demand and not for each icon upfront
 whether it will be needed or not.

 If you hover over an EventIcon and there is no
 palette already associated with the Invoker, the Invoker
 will call create_palette to see if it can be created
 on demand. With this patch the EventIcon will return None
 here (see as well CellRendererIcon or ToggleToolButton which
 are having the same default behavior).
 When subclassing EventIcon the create_palette method can
 be overwritten and a Palette returned (see for example
 the ActivityIcon in the HomeView).

 Without this patch you can see tracebacks when hovering
 over the EventIcon because the Invoker tries to call
 create_palette.

 Duck typing at its best. Of course EventIcon needs to implement the
 function.

:)

And here the test script from the previous patch is useful again. The
traceback AttributeError: 'EventIcon' object has no attribute
'create_palette' is gone.

 Signed-off-by: Simon Schampijer si...@laptop.org
 Reviewed-by: Benjamin Berg ben...@sugarlabs.org
Reviewed-by: Manuel Quiñones ma...@laptop.org


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



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


Re: [Sugar-devel] [PATCH] EventIcon: Have a default create_palette method

2012-06-21 Thread Simon Schampijer

Great, all three patches pushed, thanks a lot for the quick review.

Regards,
   Simon

On 06/21/2012 02:06 PM, Manuel Quiñones wrote:

2012/6/21 Benjamin Berg ben...@sugarlabs.org:

On Thu, 2012-06-21 at 10:52 +0200, Simon Schampijer wrote:

The create_palette mechanism allows to create
palettes on demand and not for each icon upfront
whether it will be needed or not.

If you hover over an EventIcon and there is no
palette already associated with the Invoker, the Invoker
will call create_palette to see if it can be created
on demand. With this patch the EventIcon will return None
here (see as well CellRendererIcon or ToggleToolButton which
are having the same default behavior).
When subclassing EventIcon the create_palette method can
be overwritten and a Palette returned (see for example
the ActivityIcon in the HomeView).

Without this patch you can see tracebacks when hovering
over the EventIcon because the Invoker tries to call
create_palette.


Duck typing at its best. Of course EventIcon needs to implement the
function.


:)

And here the test script from the previous patch is useful again. The
traceback AttributeError: 'EventIcon' object has no attribute
'create_palette' is gone.


Signed-off-by: Simon Schampijer si...@laptop.org

Reviewed-by: Benjamin Berg ben...@sugarlabs.org

Reviewed-by: Manuel Quiñones ma...@laptop.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] [DESIGN] Terminal activity, become root functionality issues

2012-06-21 Thread Manuel Kaufmann
On Wed, Jun 20, 2012 at 5:33 PM, Agustin Zubiaga Sanchez
a...@sugarlabs.org wrote:
 I would like to describe the most used and basic Linux commands (such as cd,
 ls, cp, rm, etc)  :-)

Would you mind opening a ticket for this explaining the situation and
filling it with those command descriptions? :)

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] How to disable Authentication Required By Wireless Network popup in Fedora 17

2012-06-21 Thread Ajay Garg
On Thu, Jun 21, 2012 at 9:23 AM, James Cameron qu...@laptop.org wrote:

 On Wed, Jun 20, 2012 at 11:29:37PM -0400, Paul Fox wrote:
 
  ajay wrote:
Hi Paul.
   
Well, I am doing development on sugar-jhbuild F17.
   
So, after I launch sugar-emulator, I wish to have the sugar
network-authentication popup pop up (if at all), and not the gnome
 one.
 
  ah.  sugar vs.  gnome.  now that i understand your problem, i find i
  can be of no help whatsoever.  sorry!

 Indeed, I have no idea either.  Running GNOME at the same time as
 Sugar means NetworkManager might behave differently, as it has
 multiple clients.  So I never wanted to try that.  Because it would
 not be representative of the typical usage.


Exactly 








 When I was last testing Sugar and NetworkManager interaction, I did it
 on a system, such as an XO, without GNOME running.  I edited the
 source files live and restarted Sugar to see the changes.  When I had
 finished, I copied my changes out of the target and into git using ssh.


Well, that would indeed work. Thanks for the idea .. :D :D



Regards,
Ajay





 Still, I think it sucks that I had to restart Sugar to see the
 changes.  Waste of time.

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

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


Re: [Sugar-devel] Automating patch submission process - Was: [PATCH v2 Terminal]

2012-06-21 Thread Manuel Kaufmann
On Wed, Jun 13, 2012 at 2:04 PM, Manuel Quiñones ma...@laptop.org wrote:
 I'm reviving the topic because I've read about git-bz [1] which looks
 fantastic.  It automates a lot of manual tasks, like adding the ticket
 number to the patch.  I wish something like that is available for
 Trac.

This would be really great! I will do a research on this when I have a
free hour :)

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] How to disable Authentication Required By Wireless Network popup in Fedora 17

2012-06-21 Thread Ajay Garg
On Thu, Jun 21, 2012 at 8:37 PM, Jon Nettleton jon.nettle...@gmail.comwrote:

 On Thu, Jun 21, 2012 at 3:52 PM, Ajay Garg ajaygargn...@gmail.com wrote:
 
 
  On Thu, Jun 21, 2012 at 9:23 AM, James Cameron qu...@laptop.org wrote:
 
  On Wed, Jun 20, 2012 at 11:29:37PM -0400, Paul Fox wrote:
  
   ajay wrote:
 Hi Paul.

 Well, I am doing development on sugar-jhbuild F17.

 So, after I launch sugar-emulator, I wish to have the sugar
 network-authentication popup pop up (if at all), and not the gnome
   one.
  
   ah.  sugar vs.  gnome.  now that i understand your problem, i find i
   can be of no help whatsoever.  sorry!
 
  Indeed, I have no idea either.  Running GNOME at the same time as
  Sugar means NetworkManager might behave differently, as it has
  multiple clients.  So I never wanted to try that.  Because it would
  not be representative of the typical usage.
 
 
  Exactly 

 This functionality was just introduced in F17, NetworkManager 0.9.x.
 Previously you could only have one client connected to the
 NetworkManager daemon at a time.  Now the behavior has changed
 to make it work better with fast-user-switching.

 This new connection sharing also causes secrets to be handled
 differently.  Previously everything was stored in your gnome-keyring,
 now by default secrets are stored at the system level.  A client
 can register to be a secrets provider however I don't know if this has
 been implemented in sugar yet.


 
 
  When I was last testing Sugar and NetworkManager interaction, I did it
  on a system, such as an XO, without GNOME running.  I edited the
  source files live and restarted Sugar to see the changes.  When I had
  finished, I copied my changes out of the target and into git using ssh.
 
 
  Well, that would indeed work. Thanks for the idea .. :D :D

 I may have more information about this this weekend.  I currently
 have an unstable network connection and the NetworkManager
 password popups are annoying me.  If I find anything interesting
 I will update everyone.



Waiting for anything interesting, whole heartedly !! :)


Regards,
Ajay



 -Jon

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


[Sugar-devel] [ASLO] Release Kandid-10

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

Sugar Platform:
0.82 - 0.96

Download Now:
http://activities.sugarlabs.org/downloads/file/28126/kandid-10.xo

Release notes:
Fixing activity.info to be conform with Sugar 0.96. Now the tags 'bundle_id' 
and 'exec' are used.



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] [ASLO] Release Kandid-10

2012-06-21 Thread Chris Leonard
Please consider also making some i18n improvements in Kandid by using
better variable substitution syntax in the UI strings.

bugs.sugarlabs.org/ticket/3122

This should not be too hard to address.

cjl


On Thu, Jun 21, 2012 at 3:11 PM, Sugar Labs Activities
activit...@sugarlabs.org wrote:
 Activity Homepage:
 http://activities.sugarlabs.org/addon/4254

 Sugar Platform:
 0.82 - 0.96

 Download Now:
 http://activities.sugarlabs.org/downloads/file/28126/kandid-10.xo

 Release notes:
 Fixing activity.info to be conform with Sugar 0.96. Now the tags 'bundle_id' 
 and 'exec' are used.



 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


[Sugar-devel] Activity fails during start, but no way to get an errors message

2012-06-21 Thread Behavior Vehikel

Hi,

I updated the activity.info file of my Kandid activity and did an upload 
of kandid-10.xo to ASLO.

But when I tried to start the downloaded version it will not start.
There is no error messages during start and the 
net.sourceforge.kandid-*.log file is completely empty.

Same awful behavior on SoaS 0.96.1 and on a XO 1.5 with Sugar 0.84.

Some hint how to find the error?


Now I removed version 10 from the Activities download page.
The source can bee fond here: http://git.sugarlabs.org/kandid/mainline

Version 9 did not start on 0.96.1 because its activity.info is deprecated.
But works (with some errors) on a XO 1.5 with Sugar 0.84

kind regards
Thomas


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


Re: [Sugar-devel] Activity fails during start, but no way to get an errors message

2012-06-21 Thread Alan Jhonn Aguiar Schwyn


Hi,
This patch fix the problem with new sugar (problems with the activity.info)
I try the another issue..
Regards!
Alan

 Date: Thu, 21 Jun 2012 22:30:44 +0200
 From: b.vehi...@googlemail.com
 To: sugar-devel@lists.sugarlabs.org
 Subject: [Sugar-devel] Activity fails during start,   but no way to get an 
 errors message
 
 Hi,
 
 I updated the activity.info file of my Kandid activity and did an upload 
 of kandid-10.xo to ASLO.
 But when I tried to start the downloaded version it will not start.
 There is no error messages during start and the 
 net.sourceforge.kandid-*.log file is completely empty.
 Same awful behavior on SoaS 0.96.1 and on a XO 1.5 with Sugar 0.84.
 
 Some hint how to find the error?
 
 
 Now I removed version 10 from the Activities download page.
 The source can bee fond here: http://git.sugarlabs.org/kandid/mainline
 
 Version 9 did not start on 0.96.1 because its activity.info is deprecated.
 But works (with some errors) on a XO 1.5 with Sugar 0.84
 
 kind regards
 Thomas
 
 
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

  From c9da585164a1f36fcb641c3104e35d6aabbb7f9d Mon Sep 17 00:00:00 2001
From: Alan Aguiar alan...@hotmail.com
Date: Thu, 21 Jun 2012 17:46:19 -0300
Subject: [PATCH] update activity.info

---
 activity/activity.info |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/activity/activity.info b/activity/activity.info
index 9823b77..be5bf6b 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,8 +1,7 @@
 [Activity]
 name = Kandid
-service_name = net.sourceforge.kandid
 bundle_id = net.sourceforge.kandid
-exec = activity.KandidActivity
+exec = sugar-activity activity.KandidActivity
 icon = activity-kandid
 activity_version = 10
 show_launcher = yes
-- 
1.7.9.5

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


[Sugar-devel] Buildbot

2012-06-21 Thread Daniel Narvaez
Hello,

the buildbot is up and running.

http://buildbot.sugarlabs.org

We have slaves for all the distributions sugar-build supports. We trigger
builds every time someone commits to the sugar modules. And we do one
nightly build.

Next steps:

* Tweak the config. Stuff like send mail to committers when stuff breaks
and send messages to #sugar (currently testing in #sugar-buildbot).
* Add basic integration testing. Something like downloading a bunch of
activities and make sure they at least startup properly. It will probably
have to wait the shell gtk3 port though.

Thanks for Bernie for setting me up with the sugarlabs infrastructure.

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


[Sugar-devel] [PATCH] Help Button with useful commands

2012-06-21 Thread Agustin Zubiaga
Gonzalo's button ported to GTK3
Bugs:
Wrap mode doesn't work
Grey background

Signed-off-by: Agustin Zubiaga a...@sugarlabs.org
---
 helpbutton.py   |   85 +++
 icons/help-icon.svg |   14 +
 terminal.py |   33 
 3 files changed, 132 insertions(+)
 create mode 100644 helpbutton.py
 create mode 100644 icons/help-icon.svg

diff --git a/helpbutton.py b/helpbutton.py
new file mode 100644
index 000..1f01851
--- /dev/null
+++ b/helpbutton.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2012, Gonzalo Odiard godi...@gmail.com
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+# HelpButton widget
+
+from gettext import gettext as _
+
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import GObject
+
+from sugar3.graphics.toolbutton import ToolButton
+from sugar3.graphics.icon import Icon
+from sugar3.graphics import style
+
+
+class HelpButton(Gtk.ToolItem):
+
+def __init__(self, **kwargs):
+GObject.GObject.__init__(self)
+
+help_button = ToolButton('help-icon')
+help_button.set_tooltip(_('Help'))
+self.add(help_button)
+
+self._palette = help_button.get_palette()
+
+sw = Gtk.ScrolledWindow()
+sw.set_size_request(int(Gdk.Screen.width() / 2.8),
+Gdk.Screen.height() - style.GRID_CELL_SIZE * 3)
+sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
+
+self._max_text_width = int(Gdk.Screen.width() / 3) - 600
+self._vbox = Gtk.VBox()
+self._vbox.set_homogeneous(False)
+
+hbox = Gtk.HBox()
+hbox.pack_start(self._vbox, False, True, 0)
+
+sw.add_with_viewport(hbox)
+
+self._palette.set_content(sw)
+sw.show_all()
+
+help_button.connect('clicked', self.__help_button_clicked_cb)
+
+def __help_button_clicked_cb(self, button):
+self._palette.popup(immediate=True, state=1)
+
+def add_section(self, section_text):
+hbox = Gtk.HBox()
+label = Gtk.Label()
+label.set_use_markup(True)
+label.set_markup('b%s/b' % section_text)
+label.set_line_wrap(True)
+hbox.pack_start(label, False, False, 0)
+hbox.show_all()
+self._vbox.pack_start(hbox, False, False, padding=5)
+
+def add_paragraph(self, text, icon=None):
+hbox = Gtk.HBox()
+label = Gtk.Label(label=text)
+label.set_justify(Gtk.Justification.LEFT)
+label.set_line_wrap(True)
+hbox.pack_start(label, False, False, 0)
+if icon is not None:
+_icon = Icon(icon_name=icon)
+hbox.add(_icon)
+hbox.show_all()
+self._vbox.pack_start(hbox, False, False, padding=5)
diff --git a/icons/help-icon.svg b/icons/help-icon.svg
new file mode 100644
index 000..f6c92bf
--- /dev/null
+++ b/icons/help-icon.svg
@@ -0,0 +1,14 @@
+?xml version=1.0 encoding=UTF-8?
+svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=55px 
height=55px
+  path
+ style=fill:none;stroke:#ff;stroke-width:3;stroke-linejoin:round
+ d=M 48,28 A 20,20 0 1 1 8,28 A 20,20 0 1 1 48,28 z/
+  path
+ 
style=fill:none;stroke:#ff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round
+ d=M 22,20 C 22,20 25,17 29,17 C 33,17 36,19 36,23 C 36,27 31,29 28,29 L 
28,32 /
+  path
+ style=fill:#ff
+ d=M 25,40
+a 3,3 0 1 1 6,0
+a 3,3 0 1 1 -6,0 z /
+/svg
diff --git a/terminal.py b/terminal.py
index a37e2ac..803fed9 100644
--- a/terminal.py
+++ b/terminal.py
@@ -42,6 +42,9 @@ from sugar3 import env
 from widgets import BrowserNotebook
 from widgets import TabLabel
 
+from helpbutton import HelpButton
+
+
 MASKED_ENVIRONMENT = [
 'DBUS_SESSION_BUS_ADDRESS',
 'PPID']
@@ -104,6 +107,10 @@ class TerminalActivity(activity.Activity):
 toolbar_box.toolbar.insert(separator, -1)
 separator.show()
 
+helpbutton = self._create_help_button()
+toolbar_box.toolbar.insert(helpbutton, -1)
+helpbutton.show_all()
+
 stop_button = StopButton(self)
 stop_button.props.accelerator = 'CtrlShiftQ'
 toolbar_box.toolbar.insert(stop_button, -1)
@@ -183,6 +190,32 @@ class 

Re: [Sugar-devel] [PATCH] Help Button with useful commands

2012-06-21 Thread S. Daniel Francis
Great!

I think the help must be only the utility and the description. In the
start/end (I'm not sure), a paragraph describing something like 'Type:
{command} --help to see it's usage'

Regards,
DanielF.

2012/6/21 Agustin Zubiaga a...@sugarlabs.org:
 Gonzalo's button ported to GTK3
 Bugs:
    Wrap mode doesn't work
    Grey background

 Signed-off-by: Agustin Zubiaga a...@sugarlabs.org
 ---
  helpbutton.py       |   85 
 +++
  icons/help-icon.svg |   14 +
  terminal.py         |   33 
  3 files changed, 132 insertions(+)
  create mode 100644 helpbutton.py
  create mode 100644 icons/help-icon.svg

 diff --git a/helpbutton.py b/helpbutton.py
 new file mode 100644
 index 000..1f01851
 --- /dev/null
 +++ b/helpbutton.py
 @@ -0,0 +1,85 @@
 +#!/usr/bin/env python
 +# -*- coding: utf-8 -*-
 +# Copyright (C) 2012, Gonzalo Odiard godi...@gmail.com
 +
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
 +# the Free Software Foundation; either version 3 of the License, or
 +# (at your option) any later version.
 +#
 +# This program 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 General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 +
 +# HelpButton widget
 +
 +from gettext import gettext as _
 +
 +from gi.repository import Gtk
 +from gi.repository import Gdk
 +from gi.repository import GObject
 +
 +from sugar3.graphics.toolbutton import ToolButton
 +from sugar3.graphics.icon import Icon
 +from sugar3.graphics import style
 +
 +
 +class HelpButton(Gtk.ToolItem):
 +
 +    def __init__(self, **kwargs):
 +        GObject.GObject.__init__(self)
 +
 +        help_button = ToolButton('help-icon')
 +        help_button.set_tooltip(_('Help'))
 +        self.add(help_button)
 +
 +        self._palette = help_button.get_palette()
 +
 +        sw = Gtk.ScrolledWindow()
 +        sw.set_size_request(int(Gdk.Screen.width() / 2.8),
 +            Gdk.Screen.height() - style.GRID_CELL_SIZE * 3)
 +        sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
 +
 +        self._max_text_width = int(Gdk.Screen.width() / 3) - 600
 +        self._vbox = Gtk.VBox()
 +        self._vbox.set_homogeneous(False)
 +
 +        hbox = Gtk.HBox()
 +        hbox.pack_start(self._vbox, False, True, 0)
 +
 +        sw.add_with_viewport(hbox)
 +
 +        self._palette.set_content(sw)
 +        sw.show_all()
 +
 +        help_button.connect('clicked', self.__help_button_clicked_cb)
 +
 +    def __help_button_clicked_cb(self, button):
 +        self._palette.popup(immediate=True, state=1)
 +
 +    def add_section(self, section_text):
 +        hbox = Gtk.HBox()
 +        label = Gtk.Label()
 +        label.set_use_markup(True)
 +        label.set_markup('b%s/b' % section_text)
 +        label.set_line_wrap(True)
 +        hbox.pack_start(label, False, False, 0)
 +        hbox.show_all()
 +        self._vbox.pack_start(hbox, False, False, padding=5)
 +
 +    def add_paragraph(self, text, icon=None):
 +        hbox = Gtk.HBox()
 +        label = Gtk.Label(label=text)
 +        label.set_justify(Gtk.Justification.LEFT)
 +        label.set_line_wrap(True)
 +        hbox.pack_start(label, False, False, 0)
 +        if icon is not None:
 +            _icon = Icon(icon_name=icon)
 +            hbox.add(_icon)
 +        hbox.show_all()
 +        self._vbox.pack_start(hbox, False, False, padding=5)
 diff --git a/icons/help-icon.svg b/icons/help-icon.svg
 new file mode 100644
 index 000..f6c92bf
 --- /dev/null
 +++ b/icons/help-icon.svg
 @@ -0,0 +1,14 @@
 +?xml version=1.0 encoding=UTF-8?
 +svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=55px 
 height=55px
 +  path
 +     style=fill:none;stroke:#ff;stroke-width:3;stroke-linejoin:round
 +     d=M 48,28 A 20,20 0 1 1 8,28 A 20,20 0 1 1 48,28 z/
 +  path
 +     
 style=fill:none;stroke:#ff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round
 +     d=M 22,20 C 22,20 25,17 29,17 C 33,17 36,19 36,23 C 36,27 31,29 28,29 
 L 28,32 /
 +  path
 +     style=fill:#ff
 +     d=M 25,40
 +        a 3,3 0 1 1 6,0
 +        a 3,3 0 1 1 -6,0 z /
 +/svg
 diff --git a/terminal.py b/terminal.py
 index a37e2ac..803fed9 100644
 --- a/terminal.py
 +++ b/terminal.py
 @@ -42,6 +42,9 @@ from sugar3 import env
  from widgets import BrowserNotebook
  from widgets import TabLabel

 +from helpbutton import HelpButton
 +
 +
  MASKED_ENVIRONMENT = [
     'DBUS_SESSION_BUS_ADDRESS',
     'PPID']
 @@ -104,6 +107,10 @@ class TerminalActivity(activity.Activity):
         

Re: [Sugar-devel] [PATCH] Help Button with useful commands

2012-06-21 Thread Paul Fox

s. daniel francis wrote:
  Great!
  
  I think the help must be only the utility and the description. In the
  start/end (I'm not sure), a paragraph describing something like 'Type:
  {command} --help to see it's usage'

isn't there a shell tutorial in the wikipedia content bundle you could
just point to?  :-)  it's a pretty big subject.

paul

  
  Regards,
  DanielF.
  
  2012/6/21 Agustin Zubiaga a...@sugarlabs.org:
   Gonzalo's button ported to GTK3
   Bugs:
      Wrap mode doesn't work
      Grey background
  
   Signed-off-by: Agustin Zubiaga a...@sugarlabs.org
   ---
    helpbutton.py       |   85 
   +++
    icons/help-icon.svg |   14 +
    terminal.py         |   33 
    3 files changed, 132 insertions(+)
    create mode 100644 helpbutton.py
    create mode 100644 icons/help-icon.svg
  
   diff --git a/helpbutton.py b/helpbutton.py
   new file mode 100644
   index 000..1f01851
   --- /dev/null
   +++ b/helpbutton.py
   @@ -0,0 +1,85 @@
   +#!/usr/bin/env python
   +# -*- coding: utf-8 -*-
   +# Copyright (C) 2012, Gonzalo Odiard godi...@gmail.com
   +
   +# This program is free software; you can redistribute it and/or modify
   +# it under the terms of the GNU General Public License as published by
   +# the Free Software Foundation; either version 3 of the License, or
   +# (at your option) any later version.
   +#
   +# This program 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 General Public License for more details.
   +#
   +# You should have received a copy of the GNU General Public License
   +# along with this program; if not, write to the Free Software
   +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
    USA
   +
   +# HelpButton widget
   +
   +from gettext import gettext as _
   +
   +from gi.repository import Gtk
   +from gi.repository import Gdk
   +from gi.repository import GObject
   +
   +from sugar3.graphics.toolbutton import ToolButton
   +from sugar3.graphics.icon import Icon
   +from sugar3.graphics import style
   +
   +
   +class HelpButton(Gtk.ToolItem):
   +
   +    def __init__(self, **kwargs):
   +        GObject.GObject.__init__(self)
   +
   +        help_button = ToolButton('help-icon')
   +        help_button.set_tooltip(_('Help'))
   +        self.add(help_button)
   +
   +        self._palette = help_button.get_palette()
   +
   +        sw = Gtk.ScrolledWindow()
   +        sw.set_size_request(int(Gdk.Screen.width() / 2.8),
   +            Gdk.Screen.height() - style.GRID_CELL_SIZE * 3)
   +        sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
   +
   +        self._max_text_width = int(Gdk.Screen.width() / 3) - 600
   +        self._vbox = Gtk.VBox()
   +        self._vbox.set_homogeneous(False)
   +
   +        hbox = Gtk.HBox()
   +        hbox.pack_start(self._vbox, False, True, 0)
   +
   +        sw.add_with_viewport(hbox)
   +
   +        self._palette.set_content(sw)
   +        sw.show_all()
   +
   +        help_button.connect('clicked', self.__help_button_clicked_cb)
   +
   +    def __help_button_clicked_cb(self, button):
   +        self._palette.popup(immediate=True, state=1)
   +
   +    def add_section(self, section_text):
   +        hbox = Gtk.HBox()
   +        label = Gtk.Label()
   +        label.set_use_markup(True)
   +        label.set_markup('b%s/b' % section_text)
   +        label.set_line_wrap(True)
   +        hbox.pack_start(label, False, False, 0)
   +        hbox.show_all()
   +        self._vbox.pack_start(hbox, False, False, padding=5)
   +
   +    def add_paragraph(self, text, icon=None):
   +        hbox = Gtk.HBox()
   +        label = Gtk.Label(label=text)
   +        label.set_justify(Gtk.Justification.LEFT)
   +        label.set_line_wrap(True)
   +        hbox.pack_start(label, False, False, 0)
   +        if icon is not None:
   +            _icon = Icon(icon_name=icon)
   +            hbox.add(_icon)
   +        hbox.show_all()
   +        self._vbox.pack_start(hbox, False, False, padding=5)
   diff --git a/icons/help-icon.svg b/icons/help-icon.svg
   new file mode 100644
   index 000..f6c92bf
   --- /dev/null
   +++ b/icons/help-icon.svg
   @@ -0,0 +1,14 @@
   +?xml version=1.0 encoding=UTF-8?
   +svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=55px 
   height=55px
   +  path
   +     
   style=fill:none;stroke:#ff;stroke-width:3;stroke-linejoin:round
   +     d=M 48,28 A 20,20 0 1 1 8,28 A 20,20 0 1 1 48,28 z/
   +  path
   +     
   style=fill:none;stroke:#ff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round
   +     d=M 22,20 C 

Re: [Sugar-devel] [PATCH] Help Button with useful commands

2012-06-21 Thread Rafael Ortiz
Hi Agus.

On 6/21/12, Agustin Zubiaga a...@sugarlabs.org wrote:
 Gonzalo's button ported to GTK3
 Bugs:
 Wrap mode doesn't work
 Grey background

 Signed-off-by: Agustin Zubiaga a...@sugarlabs.org
 ---
  helpbutton.py   |   85
 +++
  icons/help-icon.svg |   14 +
  terminal.py |   33 
  3 files changed, 132 insertions(+)
  create mode 100644 helpbutton.py
  create mode 100644 icons/help-icon.svg

 diff --git a/helpbutton.py b/helpbutton.py
 new file mode 100644
 index 000..1f01851
 --- /dev/null
 +++ b/helpbutton.py
 @@ -0,0 +1,85 @@
 +#!/usr/bin/env python
 +# -*- coding: utf-8 -*-
 +# Copyright (C) 2012, Gonzalo Odiard godi...@gmail.com
 +
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
 +# the Free Software Foundation; either version 3 of the License, or
 +# (at your option) any later version.
 +#
 +# This program 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 General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 USA
 +
 +# HelpButton widget
 +
 +from gettext import gettext as _
 +
 +from gi.repository import Gtk
 +from gi.repository import Gdk
 +from gi.repository import GObject
 +
 +from sugar3.graphics.toolbutton import ToolButton
 +from sugar3.graphics.icon import Icon
 +from sugar3.graphics import style
 +
 +
 +class HelpButton(Gtk.ToolItem):
 +
 +def __init__(self, **kwargs):
 +GObject.GObject.__init__(self)
 +
 +help_button = ToolButton('help-icon')
 +help_button.set_tooltip(_('Help'))
 +self.add(help_button)
 +
 +self._palette = help_button.get_palette()
 +
 +sw = Gtk.ScrolledWindow()
 +sw.set_size_request(int(Gdk.Screen.width() / 2.8),
 +Gdk.Screen.height() - style.GRID_CELL_SIZE * 3)
 +sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
 +
 +self._max_text_width = int(Gdk.Screen.width() / 3) - 600
 +self._vbox = Gtk.VBox()
 +self._vbox.set_homogeneous(False)
 +
 +hbox = Gtk.HBox()
 +hbox.pack_start(self._vbox, False, True, 0)
 +
 +sw.add_with_viewport(hbox)
 +
 +self._palette.set_content(sw)
 +sw.show_all()
 +
 +help_button.connect('clicked', self.__help_button_clicked_cb)
 +
 +def __help_button_clicked_cb(self, button):
 +self._palette.popup(immediate=True, state=1)
 +
 +def add_section(self, section_text):
 +hbox = Gtk.HBox()
 +label = Gtk.Label()
 +label.set_use_markup(True)
 +label.set_markup('b%s/b' % section_text)
 +label.set_line_wrap(True)
 +hbox.pack_start(label, False, False, 0)
 +hbox.show_all()
 +self._vbox.pack_start(hbox, False, False, padding=5)
 +
 +def add_paragraph(self, text, icon=None):
 +hbox = Gtk.HBox()
 +label = Gtk.Label(label=text)
 +label.set_justify(Gtk.Justification.LEFT)
 +label.set_line_wrap(True)
 +hbox.pack_start(label, False, False, 0)
 +if icon is not None:
 +_icon = Icon(icon_name=icon)
 +hbox.add(_icon)
 +hbox.show_all()
 +self._vbox.pack_start(hbox, False, False, padding=5)
 diff --git a/icons/help-icon.svg b/icons/help-icon.svg
 new file mode 100644
 index 000..f6c92bf
 --- /dev/null
 +++ b/icons/help-icon.svg
 @@ -0,0 +1,14 @@
 +?xml version=1.0 encoding=UTF-8?
 +svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=55px
 height=55px
 +  path
 + style=fill:none;stroke:#ff;stroke-width:3;stroke-linejoin:round
 + d=M 48,28 A 20,20 0 1 1 8,28 A 20,20 0 1 1 48,28 z/
 +  path
 +
 style=fill:none;stroke:#ff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round
 + d=M 22,20 C 22,20 25,17 29,17 C 33,17 36,19 36,23 C 36,27 31,29 28,29
 L 28,32 /
 +  path
 + style=fill:#ff
 + d=M 25,40
 +a 3,3 0 1 1 6,0
 +a 3,3 0 1 1 -6,0 z /
 +/svg
 diff --git a/terminal.py b/terminal.py
 index a37e2ac..803fed9 100644
 --- a/terminal.py
 +++ b/terminal.py
 @@ -42,6 +42,9 @@ from sugar3 import env
  from widgets import BrowserNotebook
  from widgets import TabLabel

 +from helpbutton import HelpButton
 +
 +
  MASKED_ENVIRONMENT = [
  'DBUS_SESSION_BUS_ADDRESS',
  'PPID']
 @@ -104,6 +107,10 @@ class TerminalActivity(activity.Activity):
  toolbar_box.toolbar.insert(separator, -1)
  separator.show()

 +helpbutton = self._create_help_button()
 +toolbar_box.toolbar.insert(helpbutton, -1)
 +helpbutton.show_all()
 +

Re: [Sugar-devel] How to disable Authentication Required By Wireless Network popup in Fedora 17

2012-06-21 Thread Ajay Garg
Hi all.

(Sorry if I am asking a very stupid question)

Is there a link of an image (in .img + .crc format, for XO-1), that is
based on F17, and contains sugar with NM 0.9?
I tried at http://download.sugarlabs.org/images/, but apparently could not
find anything useful.

Alternatively, a OS builder for the same end-results would also be good.

Thanks and Regards,
Ajay

On Thu, Jun 21, 2012 at 11:22 PM, Ajay Garg ajaygargn...@gmail.com wrote:



 On Thu, Jun 21, 2012 at 8:37 PM, Jon Nettleton jon.nettle...@gmail.comwrote:

 On Thu, Jun 21, 2012 at 3:52 PM, Ajay Garg ajaygargn...@gmail.com
 wrote:
 
 
  On Thu, Jun 21, 2012 at 9:23 AM, James Cameron qu...@laptop.org
 wrote:
 
  On Wed, Jun 20, 2012 at 11:29:37PM -0400, Paul Fox wrote:
  
   ajay wrote:
 Hi Paul.

 Well, I am doing development on sugar-jhbuild F17.

 So, after I launch sugar-emulator, I wish to have the sugar
 network-authentication popup pop up (if at all), and not the gnome
   one.
  
   ah.  sugar vs.  gnome.  now that i understand your problem, i find i
   can be of no help whatsoever.  sorry!
 
  Indeed, I have no idea either.  Running GNOME at the same time as
  Sugar means NetworkManager might behave differently, as it has
  multiple clients.  So I never wanted to try that.  Because it would
  not be representative of the typical usage.
 
 
  Exactly 

 This functionality was just introduced in F17, NetworkManager 0.9.x.
 Previously you could only have one client connected to the
 NetworkManager daemon at a time.  Now the behavior has changed
 to make it work better with fast-user-switching.

 This new connection sharing also causes secrets to be handled
 differently.  Previously everything was stored in your gnome-keyring,
 now by default secrets are stored at the system level.  A client
 can register to be a secrets provider however I don't know if this has
 been implemented in sugar yet.


 
 
  When I was last testing Sugar and NetworkManager interaction, I did it
  on a system, such as an XO, without GNOME running.  I edited the
  source files live and restarted Sugar to see the changes.  When I had
  finished, I copied my changes out of the target and into git using ssh.
 
 
  Well, that would indeed work. Thanks for the idea .. :D :D

 I may have more information about this this weekend.  I currently
 have an unstable network connection and the NetworkManager
 password popups are annoying me.  If I find anything interesting
 I will update everyone.



 Waiting for anything interesting, whole heartedly !! :)


 Regards,
 Ajay



 -Jon



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


Re: [Sugar-devel] How to disable Authentication Required By Wireless Network popup in Fedora 17

2012-06-21 Thread Anish Mangal
OLPC regularly releases (and announces on the olpc-devel mailing list)
development images on download.laptop.org

I think the release candidate version of their f17/0.96 builds is
available here:
http://download.laptop.org/xo-1/os/candidate/

Hope this helps.

On Fri, Jun 22, 2012 at 10:56 AM, Ajay Garg ajaygargn...@gmail.com wrote:
 Hi all.

 (Sorry if I am asking a very stupid question)

 Is there a link of an image (in .img + .crc format, for XO-1), that is
 based on F17, and contains sugar with NM 0.9?
 I tried at http://download.sugarlabs.org/images/, but apparently could not
 find anything useful.

 Alternatively, a OS builder for the same end-results would also be good.

 Thanks and Regards,
 Ajay


 On Thu, Jun 21, 2012 at 11:22 PM, Ajay Garg ajaygargn...@gmail.com wrote:



 On Thu, Jun 21, 2012 at 8:37 PM, Jon Nettleton jon.nettle...@gmail.com
 wrote:

 On Thu, Jun 21, 2012 at 3:52 PM, Ajay Garg ajaygargn...@gmail.com
 wrote:
 
 
  On Thu, Jun 21, 2012 at 9:23 AM, James Cameron qu...@laptop.org
  wrote:
 
  On Wed, Jun 20, 2012 at 11:29:37PM -0400, Paul Fox wrote:
  
   ajay wrote:
     Hi Paul.
    
     Well, I am doing development on sugar-jhbuild F17.
    
     So, after I launch sugar-emulator, I wish to have the sugar
     network-authentication popup pop up (if at all), and not the
   gnome
   one.
  
   ah.  sugar vs.  gnome.  now that i understand your problem, i find i
   can be of no help whatsoever.  sorry!
 
  Indeed, I have no idea either.  Running GNOME at the same time as
  Sugar means NetworkManager might behave differently, as it has
  multiple clients.  So I never wanted to try that.  Because it would
  not be representative of the typical usage.
 
 
  Exactly 

 This functionality was just introduced in F17, NetworkManager 0.9.x.
 Previously you could only have one client connected to the
 NetworkManager daemon at a time.  Now the behavior has changed
 to make it work better with fast-user-switching.

 This new connection sharing also causes secrets to be handled
 differently.  Previously everything was stored in your gnome-keyring,
 now by default secrets are stored at the system level.  A client
 can register to be a secrets provider however I don't know if this has
 been implemented in sugar yet.


 
 
  When I was last testing Sugar and NetworkManager interaction, I did it
  on a system, such as an XO, without GNOME running.  I edited the
  source files live and restarted Sugar to see the changes.  When I had
  finished, I copied my changes out of the target and into git using
  ssh.
 
 
  Well, that would indeed work. Thanks for the idea .. :D :D

 I may have more information about this this weekend.  I currently
 have an unstable network connection and the NetworkManager
 password popups are annoying me.  If I find anything interesting
 I will update everyone.



 Waiting for anything interesting, whole heartedly !! :)


 Regards,
 Ajay



 -Jon




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




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


Re: [Sugar-devel] [PATCH] Help Button with useful commands

2012-06-21 Thread Agustin Zubiaga Sanchez
Ok,
I uploaded this patch to the remote repository [1]
I commited the deprecation corrections [2]
And I uploaded some help corrections [3]

I think the help must be only the utility and the description. In the
start/end (I'm not sure), a paragraph describing something like 'Type:
{command} --help to see it's usage'

I like your idea, it's simple and more friendly for the children.
Let's go!

[1] git.sugarlabs.org/terminal/mainline/commit/e44a2997
[2] git.sugarlabs.org/terminal/mainline/commit/6f706a0c
[3] git.sugarlabs.org/terminal/mainline/commit/1f3c5148

Regards,
aguz

2012/6/22 Rafael Ortiz raf...@activitycentral.com

 Hi Agus.

 On 6/21/12, Agustin Zubiaga a...@sugarlabs.org wrote:
  Gonzalo's button ported to GTK3
  Bugs:
  Wrap mode doesn't work
  Grey background
 
  Signed-off-by: Agustin Zubiaga a...@sugarlabs.org
  ---
   helpbutton.py   |   85
  +++
   icons/help-icon.svg |   14 +
   terminal.py |   33 
   3 files changed, 132 insertions(+)
   create mode 100644 helpbutton.py
   create mode 100644 icons/help-icon.svg
 
  diff --git a/helpbutton.py b/helpbutton.py
  new file mode 100644
  index 000..1f01851
  --- /dev/null
  +++ b/helpbutton.py
  @@ -0,0 +1,85 @@
  +#!/usr/bin/env python
  +# -*- coding: utf-8 -*-
  +# Copyright (C) 2012, Gonzalo Odiard godi...@gmail.com
  +
  +# This program is free software; you can redistribute it and/or modify
  +# it under the terms of the GNU General Public License as published by
  +# the Free Software Foundation; either version 3 of the License, or
  +# (at your option) any later version.
  +#
  +# This program 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 General Public License for more details.
  +#
  +# You should have received a copy of the GNU General Public License
  +# along with this program; if not, write to the Free Software
  +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
  USA
  +
  +# HelpButton widget
  +
  +from gettext import gettext as _
  +
  +from gi.repository import Gtk
  +from gi.repository import Gdk
  +from gi.repository import GObject
  +
  +from sugar3.graphics.toolbutton import ToolButton
  +from sugar3.graphics.icon import Icon
  +from sugar3.graphics import style
  +
  +
  +class HelpButton(Gtk.ToolItem):
  +
  +def __init__(self, **kwargs):
  +GObject.GObject.__init__(self)
  +
  +help_button = ToolButton('help-icon')
  +help_button.set_tooltip(_('Help'))
  +self.add(help_button)
  +
  +self._palette = help_button.get_palette()
  +
  +sw = Gtk.ScrolledWindow()
  +sw.set_size_request(int(Gdk.Screen.width() / 2.8),
  +Gdk.Screen.height() - style.GRID_CELL_SIZE * 3)
  +sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
  +
  +self._max_text_width = int(Gdk.Screen.width() / 3) - 600
  +self._vbox = Gtk.VBox()
  +self._vbox.set_homogeneous(False)
  +
  +hbox = Gtk.HBox()
  +hbox.pack_start(self._vbox, False, True, 0)
  +
  +sw.add_with_viewport(hbox)
  +
  +self._palette.set_content(sw)
  +sw.show_all()
  +
  +help_button.connect('clicked', self.__help_button_clicked_cb)
  +
  +def __help_button_clicked_cb(self, button):
  +self._palette.popup(immediate=True, state=1)
  +
  +def add_section(self, section_text):
  +hbox = Gtk.HBox()
  +label = Gtk.Label()
  +label.set_use_markup(True)
  +label.set_markup('b%s/b' % section_text)
  +label.set_line_wrap(True)
  +hbox.pack_start(label, False, False, 0)
  +hbox.show_all()
  +self._vbox.pack_start(hbox, False, False, padding=5)
  +
  +def add_paragraph(self, text, icon=None):
  +hbox = Gtk.HBox()
  +label = Gtk.Label(label=text)
  +label.set_justify(Gtk.Justification.LEFT)
  +label.set_line_wrap(True)
  +hbox.pack_start(label, False, False, 0)
  +if icon is not None:
  +_icon = Icon(icon_name=icon)
  +hbox.add(_icon)
  +hbox.show_all()
  +self._vbox.pack_start(hbox, False, False, padding=5)
  diff --git a/icons/help-icon.svg b/icons/help-icon.svg
  new file mode 100644
  index 000..f6c92bf
  --- /dev/null
  +++ b/icons/help-icon.svg
  @@ -0,0 +1,14 @@
  +?xml version=1.0 encoding=UTF-8?
  +svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=55px
  height=55px
  +  path
  +
 style=fill:none;stroke:#ff;stroke-width:3;stroke-linejoin:round
  + d=M 48,28 A 20,20 0 1 1 8,28 A 20,20 0 1 1 48,28 z/
  +  path
  +
 
 style=fill:none;stroke:#ff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round
  + d=M 22,20 C 22,20 25,17 29,17 C 33,17 36,19 36,23 C 36,27 31,29
 28,29