Re: [Sugar-devel] [PATCH] online account management

2013-02-19 Thread Simon Schampijer

Hi Walter and Raul,

this looks like a Feature scope work to me, I would like to see a 
Feature discussion about this first. If you fill out the form [1] it 
will help to discuss the separate points.


Thanks,
   Simon

[1] http://wiki.sugarlabs.org/go/Features/Policy



On 02/19/2013 04:13 AM, Walter Bender wrote:

Raul and I have the first version of Sugar online account management
ready for review. We've divided the code into 4 patches:

0001 adds support for comments in the Journal detail view. This
extension of the detail view is independent of the other patches and
is used by the Portfolio activity.
0002 adds support to integrate online account management with the
Sugar journal, adding Copy-to and Refresh capabilities.
0003 adds support to the Control Panel to manage accounts.
0004 adds support specific to Facebook, taking advantage of the
framework in #0002 and #0003.

We are working with community members on Twitter and Google Drive
extensions based on the framework in #0002 and #0003 and encourage
other community members to work with us on additional services.

For now, web services implementations are welcome to handle their
retrieval of tokens on their own. In the future we might want to
delegate that to Gnome Online Accounts or a similar auth/token
provider.

regards.

-walter



___
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] Collaboration in Write not working in version-86

2013-02-19 Thread Ajay Garg
Hi all.

I tested collaborating the version-86
http://activities.sugarlabs.org/en-US/sugar/addons/versions/4201#version-86,
in between an  XO-1.75 and XO-4, when both XOs are joined by a
adhoc-network (channel 1).


Following happens ::

a)
Share the activity on XO-1.75.
The activity-icon appears in the Neighborhood-View of XO-4.

b)
Join the shared activity on XO-4.
The activity launches fine.

c)
However, when a text is typed in either of canvas of XO-1.75 or XO-4, no
sharing happens.


The same  happens if the roles of XO-1.75 and XO-4 are reversed.


Is this a known issue?





Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Journal toolbar: add tooltip to favorite filter

2013-02-19 Thread Simon Schampijer
From: Simon Schampijer si...@laptop.org

This patch adds the tooltip 'Favorite entries' to the favorite filter
button in the Journal toolbar. The button is a ToggleToolButton and
with the recent change in the toolkit-gtk3 
63b8e87b1a99a854e9adbb1579b1e05244d2dc4
we do hide the tooltip when the button is clicked or touched.

This adds a new string, therefore this patch is only intended for
master. The addition and string has been discussed with Gary and Manuel.

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

diff --git a/src/jarabe/journal/journaltoolbox.py 
b/src/jarabe/journal/journaltoolbox.py
index c7ee73a..69ff777 100644
--- a/src/jarabe/journal/journaltoolbox.py
+++ b/src/jarabe/journal/journaltoolbox.py
@@ -89,6 +89,7 @@ class MainToolbox(ToolbarBox):
 self._add_widget(self.search_entry, expand=True)
 
 self._favorite_button = ToggleToolButton('emblem-favorite')
+self._favorite_button.set_tooltip(_('Favorite entries'))
 self._favorite_button.connect('toggled',
   self.__favorite_button_toggled_cb)
 self.toolbar.insert(self._favorite_button, -1)
-- 
1.8.1

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


[Sugar-devel] [Feature] Starting an activity in a different locale than the system locale

2013-02-19 Thread Simon Schampijer

Hi,

when talking about the 'grab watch hands' feature [1] in the Clock 
activity I came across the desire to show the written clock information 
(e.g. ten minutes to 10 am) in different languages.


To make that easily manageable without reloading translations on 
run-time I was wondering if there would be a general desire to run 
activities in different locales independent from the system. One 
scenario would be that a teacher in a Spanish speaking country would 
start the Clock activity in the English locale to teach the clock in 
English.


The question is, if starting an activity in a different locale than the 
system locale that would be an interesting feature in general. 
Advantages would be that the locale of the system does not change, 
making experimenting with languages not as disruptive. Would people 
think that would be a pedagogical interesting feature?


Technically, one of doing this would be to set the 'LANG/LANGUAGE' env 
variable in sugar-activity, reading the config from a system file. That 
file could be modified in an activity section (e.g. control panel or the 
activity list view...)


diff --git a/bin/sugar-activity b/bin/sugar-activity
index abaa091..070a196 100644
--- a/bin/sugar-activity
+++ b/bin/sugar-activity
@@ -104,6 +104,8 @@ def main():
 os.environ['SUGAR_BUNDLE_ID'] = bundle.get_bundle_id()
 os.environ['SUGAR_BUNDLE_NAME'] = bundle.get_name()
 os.environ['SUGAR_BUNDLE_VERSION'] = 
str(bundle.get_activity_version())

+os.environ['LANG'] = 'de_DE'
+os.environ['LANGUAGE'] = 'de_DE'

 # must be done early, some activities set translations globally, 
SL #3654

 locale_path = i18n.get_locale_path(bundle.get_bundle_id())


Regards,
   Simon

[1] http://bugs.sugarlabs.org/ticket/1959
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings

2013-02-19 Thread Simon Schampijer

Hi Ajay,

there are some questions open from the last time this feature was 
submitted for review: 
http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038917.html


There are two differences to the GNOME 3 design. There is a check box 
in the 'Manual' option that says 'Use authentication'. And there is an

option 'Ignored Hosts'. Can you give a bit of background on those, why
you did add those, what issue we have on the XO or discovered does it 
solve?


On 02/17/2013 11:28 AM, Ajay Garg wrote:

This patch is to be applied on the master-branch.

Some details of this patch ::

a)
The proxy-settings are stored both in the gconf schema; and dconf
schema.


Can you elaborate why you have chosen to also store into dconf? At one 
point Sugar wants to switch to Gsettings. Would that help for that case?


Regards,
   Simon



b)
The package gnome-vfs2 is a pre-requisite for this patch to work,
since the settings are (also) stored in the dconf schema.

c)
Also, a slightly unrelated change is the persistence of the values in
the Network control-panel.

Earlier, there was a timeout involved (of 3000 milliseconds), which
would trigger the saving of the values (for eg., Collaboration  Server
field was persisted this way).

Now, the values  are persisted SYNCHRONOUSLY, when the tick
toolbar-button is clicked (of course, all the changes are undone, if the
user instead decides to Cancel changes).

d)
All the use-cases  of the proxy, are working, as per the wiki page
http://wiki.sugarlabs.org/go/Features/Proxy_Settings

Signed-off-by: Ajay Garg a...@activitycentral.com
---
  extensions/cpsection/network/view.py   | 695 +++--
  src/jarabe/controlpanel/gui.py |   2 +
  src/jarabe/controlpanel/sectionview.py |   8 +
  src/jarabe/main.py |  36 ++
  4 files changed, 707 insertions(+), 34 deletions(-)

diff --git a/extensions/cpsection/network/view.py 
b/extensions/cpsection/network/view.py
index b360759..99b792b 100644
--- a/extensions/cpsection/network/view.py
+++ b/extensions/cpsection/network/view.py
@@ -16,10 +16,19 @@

  from gi.repository import Gtk
  from gi.repository import Gdk
+from gi.repository import GConf
  from gi.repository import GObject
+from gi.repository import Gio
+from gi.repository import Pango
  from gettext import gettext as _

+import os
+import subprocess
+import logging
+
  from sugar3.graphics import style
+from sugar3.graphics.alert import Alert
+from sugar3.graphics.icon import Icon

  from jarabe.controlpanel.sectionview import SectionView
  from jarabe.controlpanel.inlinealert import InlineAlert
@@ -31,6 +40,471 @@ TITLE = _('Network')

  _APPLY_TIMEOUT = 3000

+# Please refer ::
+# http://developer.gnome.org/ProxyConfiguration/
+
+GSETTINGS_PROXY   = Gio.Settings.new('org.gnome.system.proxy')
+GSETTINGS_PROXY_FTP   = Gio.Settings.new('org.gnome.system.proxy.ftp')
+GSETTINGS_PROXY_HTTP  = Gio.Settings.new('org.gnome.system.proxy.http')
+GSETTINGS_PROXY_HTTPS = Gio.Settings.new('org.gnome.system.proxy.https')
+GSETTINGS_PROXY_SOCKS = Gio.Settings.new('org.gnome.system.proxy.socks')
+
+
+client = GConf.Client.get_default()
+
+
+class GConfMixin(object):
+Mix-in class for GTK widgets backed by GConf
+def __init__(self, gconf_key, gsettings_dconf, dconf_key, widget=None, 
signal='changed'):
+self._gconf_key = gconf_key
+self._gsettings_dconf = gsettings_dconf
+self._dconf_key = dconf_key
+self._notify_id = client.notify_add(gconf_key, self.__gconf_notify_cb, 
None)
+initial_value = self._get_gconf_value()
+self._undo_value = initial_value
+self.set_value_from_gconf(initial_value)
+widget = widget or self
+
+def undo(self):
+Revert to original value if modified
+if not self.changed:
+return
+logging.debug('Reverting %r to %r', self._gconf_key, self._undo_value)
+self._set_gconf_value(self._undo_value)
+
+def get_value_for_gconf(self):
+
+Return the current value of the widget in a format suitable for GConf
+
+MUST be implemented by subclasses.
+
+raise NotImplementedError()
+
+def set_value_from_gconf(self, value):
+
+Set the current value of the widget based on a value from GConf
+MUST be implemented by subclasses.
+
+raise NotImplementedError()
+
+def __gconf_notify_cb(self, client, transaction_id_, entry, user_data_):
+new_value = _gconf_value_to_python(entry.value)
+self.set_value_from_gconf(new_value)
+
+def _commit(self, widget):
+new_value = self.get_value_for_gconf()
+logging.debug('Setting %r to %r', self._gconf_key, new_value)
+
+self._set_gconf_value(new_value)
+
+def _set_gconf_value(self, new_value):
+gconf_type = client.get(self._gconf_key).type
+if gconf_type == GConf.ValueType.STRING:
+client.set_string(self._gconf_key, new_value)
+  

Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings

2013-02-19 Thread Daniel Narvaez
On 19 February 2013 11:30, Simon Schampijer si...@schampijer.de wrote:
 a)
 The proxy-settings are stored both in the gconf schema; and dconf
 schema.


 Can you elaborate why you have chosen to also store into dconf? At one point
 Sugar wants to switch to Gsettings. Would that help for that case?

I guess we need to store them in dconf because that's where webkit
looks. But do we actually need to store also in gconf?
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Journal toolbar: add tooltip to favorite filter

2013-02-19 Thread Simon Schampijer
Pushed to master after review from Manuel. 
158f4384d1f3423a6c2063723434f4f331796f81


Simon

On 02/19/2013 10:16 AM, Simon Schampijer wrote:

From: Simon Schampijer si...@laptop.org

This patch adds the tooltip 'Favorite entries' to the favorite filter
button in the Journal toolbar. The button is a ToggleToolButton and
with the recent change in the toolkit-gtk3 
63b8e87b1a99a854e9adbb1579b1e05244d2dc4
we do hide the tooltip when the button is clicked or touched.

This adds a new string, therefore this patch is only intended for
master. The addition and string has been discussed with Gary and Manuel.

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

diff --git a/src/jarabe/journal/journaltoolbox.py 
b/src/jarabe/journal/journaltoolbox.py
index c7ee73a..69ff777 100644
--- a/src/jarabe/journal/journaltoolbox.py
+++ b/src/jarabe/journal/journaltoolbox.py
@@ -89,6 +89,7 @@ class MainToolbox(ToolbarBox):
  self._add_widget(self.search_entry, expand=True)

  self._favorite_button = ToggleToolButton('emblem-favorite')
+self._favorite_button.set_tooltip(_('Favorite entries'))
  self._favorite_button.connect('toggled',
self.__favorite_button_toggled_cb)
  self.toolbar.insert(self._favorite_button, -1)



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


[Sugar-devel] [FEATURE] Comment box in journal detail view

2013-02-19 Thread Walter Bender
I've written up a feature request to add a comment box to the Journal
detail view (Please see [1]). This feature request corresponds to
patch #1 found in [2]

thanks,

-walter

[1] http://wiki.sugarlabs.org/go/Features/Comment_box_in_journal_detail_view
[2] http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041808.html

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


Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings

2013-02-19 Thread Ajay Garg
On Tue, Feb 19, 2013 at 4:17 PM, Daniel Narvaez dwnarv...@gmail.com wrote:

 On 19 February 2013 11:30, Simon Schampijer si...@schampijer.de wrote:
  a)
  The proxy-settings are stored both in the gconf schema; and dconf
  schema.
 
 
  Can you elaborate why you have chosen to also store into dconf? At one
 point
  Sugar wants to switch to Gsettings. Would that help for that case?

 I guess we need to store them in dconf because that's where webkit
 looks. But do we actually need to store also in gconf?



Another thing to be cleared :: storing in dconf IS THE SAME AS storing in
gsettings .


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




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


Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings

2013-02-19 Thread Daniel Drake
On Tue, Feb 19, 2013 at 8:40 AM, Ajay Garg ajaygargn...@gmail.com wrote:
 Another thing to be cleared :: storing in dconf IS THE SAME AS storing in
 gsettings .

Not exactly. gsettings has a choice of backends, dconf is just one of them.

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


[Sugar-devel] [FEATURE] Web services

2013-02-19 Thread Walter Bender
I've written up a feature request to add web services to Sugar (Please
see [1]). This feature request corresponds to
patches #2-4 found in [2]

thanks,

-walter

[1] http://wiki.sugarlabs.org/go/Features/Web_services
[2] http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041808.html

--
Walter Bender
Sugar Labs
http://www.sugarlabs.org


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


Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings

2013-02-19 Thread Ajay Garg
On Tue, Feb 19, 2013 at 8:15 PM, Daniel Drake d...@laptop.org wrote:

 On Tue, Feb 19, 2013 at 8:40 AM, Ajay Garg ajaygargn...@gmail.com wrote:
  Another thing to be cleared :: storing in dconf IS THE SAME AS storing
 in
  gsettings .

 Not exactly. gsettings has a choice of backends, dconf is just one of them.



Ahh okk.. did not know that :)

So, would using dconf suffice? (it at least works in DX4, for Browse).





 Daniel




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


Re: [Sugar-devel] Fwd: Unable to exit Etoys.

2013-02-19 Thread Rafael Ortiz
Hi Bert

Sorry for the lag.

On Wed, Feb 13, 2013 at 12:35 PM, Bert Freudenberg b...@freudenbergs.dewrote:

 On 2013-02-13, at 18:09, Rafael Ortiz raf...@activitycentral.com wrote:

  On Wed, Feb 13, 2013 at 11:57 AM, Rafael Ortiz 
 raf...@activitycentral.com wrote:
  Ticket created
  http://bugs.sugarlabs.org/ticket/4428
 
  The relevant log is Etoys.txt.

 That log is about Etoys trying to read the Sugar user name.

 What does your .gconf/desktop/sugar/user/%gconf.xml look like?


 ?xml version=1.0?
gconf
entry name=color mtime=1360066952 type=string
stringvalue#D1A3FF,#00A0FF/stringvalue
/entry
entry name=birth_timestamp mtime=1360066952 type=int
value=413986952/
entry name=nick mtime=1360066952 type=string
stringvaluerafael/stringvalue
/entry
/gconf


OTOH, this error should happen at the startup of Etoys, not when quitting.
 Are you sure this log is produced after pressing the exit button, not
 before?

 Also, when Etoys hangs after pressing the exit button (does it?),


It was hanging but not now, cannot reproduce after rebooting the XO from an
upgrade :/.


 try pressing alt-period (alt + .) which is Etoys' user interrupt
 key. That should also dump the stack in the log file, and would show what
 exactly Etoys is doing. Of course, you're welcome to press the debug
 button in the pink interrupt dialog and take a look around ;)


I'll keep following the issue with your debugging tips.

Thanks and cheers!


- Bert -

 ___
 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