Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Sascha Silbe
Excerpts from Erik Blankinship's message of Wed Jan 19 04:21:26 +0100 2011:

 Do all activity and application developers have write access to any part of
 the system where they can add the libraries that they need to the system
 from either gnome or sugar side and then access if from either side?

No, they don't. In the current design, activities are meant to be
self-contained. We also explicitly encourage trying out potentially
untrusted activities, so measures are taken to prevent them from
interfering with the system and each other. I highly recommend adhering
to the restrictions even though they are only enforced on systems using
Rainbow. You can check the low-level activity API description [1] in the
wiki for a list of directories you can rely on being writeable.

As for native packages (rpms, debs, etc.), AFAICT no work has been done
to sandbox them in any way, so users need to be very careful about what
packages they install.

I you want to ship your product to schools in the near future and it
needs to be available from the Gnome menu, your best option is to set up
a package repository and let schools add that repository to their package
manager configuration. This has the additional advantage of letting you
ship binaries matching the system (by setting up one repository per
distro version).

In the long run, I'd like to convert the activity.info file into a
regular .desktop file that gets installed to the standard location
[2-4]. Activity mode invocation (via Sugar) would use a Sugar-specific
key, application mode invocation (e.g. from within Gnome) would use
the standard Exec key. So a single additional line in activity.info
would suffice to make your activity available from within Gnome.

Sascha

[1] https://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API
[2] https://bugs.sugarlabs.org/ticket/2435
[3] https://patchwork.sugarlabs.org/patch/303/
[4] http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Sascha Silbe
Excerpts from Erik Blankinship's message of Wed Jan 19 14:48:58 +0100 2011:

 The best practice I am concocting is that a developer put all assets
 into ~/Actitivities/MyCoolActivity/
 
 The xo bundle will obviously install and point there. Gnome .rpm
 installations should point there too.

rpms are installed as root, so they cannot install to the home directory
of the user installing the rpm (except by using rather crude hacks or
relying on a fixed user name). They can also only be installed once, so
on a multi-user system only a single user could ever use your activity.

The system location for activities is /usr/share/sugar/activities.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Sascha Silbe
Excerpts from Erik Blankinship's message of Fri Jan 21 02:58:58 +0100 2011:

 1. On a dual boot machine, probably an xo, where activities are installed
 into /home/user/Activities/ where useris probably *always *olpc

No, it isn't. XOs aren't the only machines running Sugar. And, FWIW,
there's no dual-boot on the XO: Sugar and Gnome are desktop environments,
not operating systems. You can switch between them at run time.

The last time I tried it, SoaS used liveuser as user name. On my own XO
(running Debian Squeeze instead of an OLPC build), the user name is
sascha.silbe. On multi-user systems (e.g. LTSP) you'll have several
different users with different user names. And these are just the most
common configurations...

 2. Sugar as an application in gnome (within a Xephyr window) where
 activities can be installed a few places, including
 /home/user/Activities/

sugar-emulator is meant for development, not regular usage. It doesn't
affect locations (for executables, data, activities, etc.) in any way,
however.

[...]

Your remaining questions have probably already been addressed in my
previous message. If not, please ask again.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Sascha Silbe
Excerpts from Erik Blankinship's message of Tue Jan 18 18:41:38 +0100 2011:

 On a dual-boot XO, does it make sense to use the same binary code for sugar
 activities also in gnome applications?  If so, are there guidelines or
 example acti-plications?

In addition to the examples mentioned by others already, I'd like to
point out that Turtle Blocks can run outside of Sugar (in Gnome), too.
I haven't tried it myself, so I don't know how well it's integrated with
Gnome, but people (non-Sugar users AFAIK) seem to like it.

You can examine the Turtle Blocks source code by opening the activity
and choosing View Source from the activity palette in the Frame
(shortcut key Alt+Shift+V, or Fn-Space on an XO).

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Thomas C Gilliard



Sascha Silbe wrote:

Excerpts from Erik Blankinship's message of Fri Jan 21 02:58:58 +0100 2011:

  

1. On a dual boot machine, probably an xo, where activities are installed
into /home/user/Activities/ where useris probably *always *olpc



No, it isn't. XOs aren't the only machines running Sugar. And, FWIW,
there's no dual-boot on the XO: Sugar and Gnome are desktop environments,
not operating systems. You can switch between them at run time.

The last time I tried it, SoaS used liveuser as user name. On my own XO
(running Debian Squeeze instead of an OLPC build), the user name is
sascha.silbe. On multi-user systems (e.g. LTSP) you'll have several
different users with different user names. And these are just the most
common configurations...

  

2. Sugar as an application in gnome (within a Xephyr window) where
activities can be installed a few places, including
/home/user/Activities/



sugar-emulator is meant for development, not regular usage. It doesn't
affect locations (for executables, data, activities, etc.) in any way,
however.

  

In Gnome-sugar-desktop Installs, and my Virtualbox4 Virtual Machines (1)

Activities seem to be located in 2 places:
1-)original (and .rpm?) Activities are in /usr/share/sugar/activities/xxx

2-) They seem to be ignored once an (xxx).xo file is downloaded from ASLO
 these are in /home/(user)/Activities/xxx

I set them up with a sugar icon (Add to Desktop) on the Gnome Desktop 
with properties sugar-emulator -f (Full screen)

This is the main way the sugar-desktop is accessed.
Or from the Menu Item: Education/Sugar where it is windowed.

(Though the user can use gdm switcher to open sugar alone at login)

(1) http://wiki.sugarlabs.org/go/Emulator_image_files#Other_virtual_machines

Tom Gilliard
satellit

[...]

Your remaining questions have probably already been addressed in my
previous message. If not, please ask again.

Sascha

  



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


[Sugar-devel] [PATCH sugar] fix stylistic mistake introduced by 79c85ed2

2011-01-21 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org
---
 src/jarabe/journal/listmodel.py |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/journal/listmodel.py b/src/jarabe/journal/listmodel.py
index cef636e..3902eba 100644
--- a/src/jarabe/journal/listmodel.py
+++ b/src/jarabe/journal/listmodel.py
@@ -147,9 +147,10 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource):
 try:
 timestamp = float(metadata.get('timestamp', 0))
 except (TypeError, ValueError):
-self._cached_row.append(_('Unknown'))
+timestamp_content = _('Unknown')
 else:
-
self._cached_row.append(util.timestamp_to_elapsed_string(timestamp))
+timestamp_content = util.timestamp_to_elapsed_string(timestamp)
+self._cached_row.append(timestamp_content)
 
 try:
 creation_time = float(metadata.get('creation_time'))
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar] remove unused import left over by c63b43c

2011-01-21 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org
---
 src/jarabe/journal/journalwindow.py |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/journal/journalwindow.py 
b/src/jarabe/journal/journalwindow.py
index 3c718c2..31bc790 100644
--- a/src/jarabe/journal/journalwindow.py
+++ b/src/jarabe/journal/journalwindow.py
@@ -15,7 +15,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-import gtk
 from sugar.graphics.window import Window
 
 _journal_window = None
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar 0/4] Fix network disconnect and discard history

2011-01-21 Thread Sascha Silbe
Rebase and split-up of James' fix network disconnect and discard history patch

James Cameron (3):
  use dbus.PROPERTIES_IFACE instead of literal value
  jarabe.desktop.networkviews: update icon badges on AP settings change
  implement discarding network history (SL#1673)

Sascha Silbe (1):
  fix network disconnect (SL#1608, SL#1802)

 extensions/cpsection/network/model.py |   15 --
 extensions/cpsection/network/view.py  |8 +++
 extensions/deviceicon/network.py  |   49 ++---
 src/jarabe/desktop/meshbox.py |7 +--
 src/jarabe/desktop/networkviews.py|   48 +---
 src/jarabe/model/adhoc.py |2 +-
 src/jarabe/model/neighborhood.py  |2 +-
 src/jarabe/model/network.py   |   96 
 src/jarabe/model/olpcmesh.py  |9 +--
 9 files changed, 156 insertions(+), 80 deletions(-)

-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar 1/4] use dbus.PROPERTIES_IFACE instead of literal value

2011-01-21 Thread Sascha Silbe
From: James Cameron qu...@laptop.org

[split out from larger fix network disconnect and discard history patch;
fixed up all remaining occurences as well]
Signed-Off-By: Sascha Silbe sascha-...@silbe.org
Reviewed-By: Sascha Silbe sascha-...@silbe.org

diff --git a/extensions/cpsection/network/model.py 
b/extensions/cpsection/network/model.py
index 667e476..8426b7f 100644
--- a/extensions/cpsection/network/model.py
+++ b/extensions/cpsection/network/model.py
@@ -57,7 +57,7 @@ def get_radio():
 try:
 bus = dbus.SystemBus()
 obj = bus.get_object(_NM_SERVICE, _NM_PATH)
-nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+nm_props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
 except dbus.DBusException:
 raise ReadError('%s service not available' % _NM_SERVICE)
 
@@ -80,7 +80,7 @@ def set_radio(state):
 try:
 bus = dbus.SystemBus()
 obj = bus.get_object(_NM_SERVICE, _NM_PATH)
-nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+nm_props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
 except dbus.DBusException:
 raise ReadError('%s service not available' % _NM_SERVICE)
 nm_props.Set(_NM_IFACE, 'WirelessEnabled', True)
@@ -88,7 +88,7 @@ def set_radio(state):
 try:
 bus = dbus.SystemBus()
 obj = bus.get_object(_NM_SERVICE, _NM_PATH)
-nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+nm_props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
 except dbus.DBusException:
 raise ReadError('%s service not available' % _NM_SERVICE)
 nm_props.Set(_NM_IFACE, 'WirelessEnabled', False)
diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index 887c1c2..bc2492d 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -405,7 +405,7 @@ class WirelessDeviceView(ToolButton):
 self._palette.set_group_id('frame')
 
 self._device_props = dbus.Interface(self._device,
-'org.freedesktop.DBus.Properties')
+dbus.PROPERTIES_IFACE)
 self._device_props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
   reply_handler=self.__get_device_props_reply_cb,
   error_handler=self.__get_device_props_error_cb)
@@ -446,8 +446,7 @@ class WirelessDeviceView(ToolButton):
 return
 self._active_ap_op = active_ap_op
 active_ap = self._bus.get_object(_NM_SERVICE, active_ap_op)
-props = dbus.Interface(active_ap,
-   'org.freedesktop.DBus.Properties')
+props = dbus.Interface(active_ap, dbus.PROPERTIES_IFACE)
 
 props.GetAll(_NM_ACCESSPOINT_IFACE, byte_arrays=True,
  reply_handler=self.__get_all_ap_props_reply_cb,
@@ -568,14 +567,13 @@ class WirelessDeviceView(ToolButton):
 if self._active_ap_op is not None:
 obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
 netmgr = dbus.Interface(obj, _NM_IFACE)
-netmgr_props = dbus.Interface(
-netmgr, 'org.freedesktop.DBus.Properties')
+netmgr_props = dbus.Interface(netmgr, dbus.PROPERTIES_IFACE)
 active_connections_o = netmgr_props.Get(_NM_IFACE,
 'ActiveConnections')
 
 for conn_o in active_connections_o:
 obj = self._bus.get_object(_NM_IFACE, conn_o)
-props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
 ap_op = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
 if ap_op == self._active_ap_op:
 netmgr.DeactivateConnection(conn_o)
@@ -621,7 +619,7 @@ class OlpcMeshDeviceView(ToolButton):
 self.update_state(state)
 
 self._device_props = dbus.Interface(self._device,
-'org.freedesktop.DBus.Properties')
+dbus.PROPERTIES_IFACE)
 self._device_props.Get(_NM_OLPC_MESH_IFACE, 'ActiveChannel',
 reply_handler=self.__get_active_channel_reply_cb,
 error_handler=self.__get_active_channel_error_cb)
@@ -683,20 +681,19 @@ class OlpcMeshDeviceView(ToolButton):
 def __deactivate_connection(self, palette, data=None):
 obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
 netmgr = dbus.Interface(obj, _NM_IFACE)
-netmgr_props = dbus.Interface(netmgr,
-  'org.freedesktop.DBus.Properties')
+netmgr_props = dbus.Interface(netmgr, dbus.PROPERTIES_IFACE)
 active_connections_o = netmgr_props.Get(_NM_IFACE,
 

[Sugar-devel] [PATCH sugar 2/4] jarabe.desktop.networkviews: update icon badges on AP settings change

2011-01-21 Thread Sascha Silbe
From: James Cameron qu...@laptop.org

[split out from larger fix network disconnect and discard history patch
and rebased on mainline; no changes in behaviour noticed during tests]
Signed-Off-By: Sascha Silbe sascha-...@silbe.org
Reviewed-By: Sascha Silbe sascha-...@silbe.org

diff --git a/src/jarabe/desktop/networkviews.py 
b/src/jarabe/desktop/networkviews.py
index 23eb4a8..4282a75 100644
--- a/src/jarabe/desktop/networkviews.py
+++ b/src/jarabe/desktop/networkviews.py
@@ -75,7 +75,6 @@ class WirelessNetworkView(CanvasPulsingIcon):
 self._rsn_flags = initial_ap.rsn_flags
 self._device_caps = 0
 self._device_state = None
-self._connection = None
 self._color = None
 
 if self._mode == network.NM_802_11_MODE_ADHOC and \
@@ -101,20 +100,7 @@ class WirelessNetworkView(CanvasPulsingIcon):
 self._palette = self._create_palette()
 self.set_palette(self._palette)
 self._palette_icon.props.xo_color = self._color
-
-if self._mode != network.NM_802_11_MODE_ADHOC:
-if network.find_connection_by_ssid(self._name) is not None:
-self.props.badge_name = 'emblem-favorite'
-self._palette_icon.props.badge_name = 'emblem-favorite'
-elif self._flags == network.NM_802_11_AP_FLAGS_PRIVACY:
-self.props.badge_name = 'emblem-locked'
-self._palette_icon.props.badge_name = 'emblem-locked'
-else:
-self.props.badge_name = None
-self._palette_icon.props.badge_name = None
-else:
-self.props.badge_name = None
-self._palette_icon.props.badge_name = None
+self._update_badge()
 
 interface_props = dbus.Interface(self._device, dbus.PROPERTIES_IFACE)
 interface_props.Get(_NM_DEVICE_IFACE, 'State',
@@ -160,6 +146,7 @@ class WirelessNetworkView(CanvasPulsingIcon):
 self._device_state = new_state
 self._update_state()
 self._update_icon()
+self._update_badge()
 
 def __update_active_ap(self, ap_path):
 if ap_path in self._access_points:
@@ -192,6 +179,7 @@ class WirelessNetworkView(CanvasPulsingIcon):
 self._device_state = state
 self._update_state()
 self._update_color()
+self._update_badge()
 
 def __get_device_state_error_cb(self, err):
 logging.error('Error getting the device state: %s', err)
@@ -222,6 +210,21 @@ class WirelessNetworkView(CanvasPulsingIcon):
 icon = self._palette.props.icon
 icon.props.icon_name = icon_name
 
+def _update_badge(self):
+if self._mode != network.NM_802_11_MODE_ADHOC:
+if network.find_connection_by_ssid(self._name) is not None:
+self.props.badge_name = 'emblem-favorite'
+self._palette_icon.props.badge_name = 'emblem-favorite'
+elif self._flags == network.NM_802_11_AP_FLAGS_PRIVACY:
+self.props.badge_name = 'emblem-locked'
+self._palette_icon.props.badge_name = 'emblem-locked'
+else:
+self.props.badge_name = None
+self._palette_icon.props.badge_name = None
+else:
+self.props.badge_name = None
+self._palette_icon.props.badge_name = None
+
 def _update_state(self):
 if self._active_ap is not None:
 state = self._device_state
@@ -586,7 +589,6 @@ class OlpcMeshView(CanvasPulsingIcon):
 self._greyed_out = False
 self._name = ''
 self._device_state = None
-self._connection = None
 self._active = False
 device = mesh_mgr.mesh_device
 
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar 3/4] implement discarding network history (SL#1673)

2011-01-21 Thread Sascha Silbe
From: James Cameron qu...@laptop.org

User interface changes:

- enable the discard network history button in the network control
  panel, which also now forces a disconnect, and will be insensitive
  if there are no networks to be discarded, (rather than the button
  doing nothing),

[split out from larger fix network disconnect and discard history patch;
replaced count_*() with have_*(); added FIXME]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org

diff --git a/extensions/cpsection/network/model.py 
b/extensions/cpsection/network/model.py
index 8426b7f..916ce8c 100644
--- a/extensions/cpsection/network/model.py
+++ b/extensions/cpsection/network/model.py
@@ -19,6 +19,9 @@ import dbus
 from gettext import gettext as _
 import gconf
 
+from jarabe.model import network
+
+
 _NM_SERVICE = 'org.freedesktop.NetworkManager'
 _NM_PATH = '/org/freedesktop/NetworkManager'
 _NM_IFACE = 'org.freedesktop.NetworkManager'
@@ -109,7 +112,11 @@ def clear_registration():
 def clear_networks():
 Clear saved passwords and network configurations.
 
-pass
+network.clear_wifi_connections()
+
+
+def have_networks():
+return network.have_wifi_connections()
 
 
 def get_publish_information():
diff --git a/extensions/cpsection/network/view.py 
b/extensions/cpsection/network/view.py
index 9ecc8fd..381dcb6 100644
--- a/extensions/cpsection/network/view.py
+++ b/extensions/cpsection/network/view.py
@@ -106,6 +106,8 @@ class Network(SectionView):
 self._clear_history_button = gtk.Button()
 self._clear_history_button.set_label(_('Discard network history'))
 box_clear_history.pack_start(self._clear_history_button, expand=False)
+if not self._model.have_networks():
+self._clear_history_button.set_sensitive(False)
 self._clear_history_button.show()
 box_wireless.pack_start(box_clear_history, expand=False)
 box_clear_history.show()
@@ -220,6 +222,8 @@ class Network(SectionView):
 self._radio_valid = False
 else:
 self._radio_valid = True
+if self._model.have_networks():
+self._clear_history_button.set_sensitive(True)
 
 self._validate()
 return False
@@ -250,4 +254,8 @@ class Network(SectionView):
 return False
 
 def __network_configuration_reset_cb(self, widget):
+# FIXME: takes effect immediately, not after CP is closed with
+# confirmation button
 self._model.clear_networks()
+if not self._model.have_networks():
+self._clear_history_button.set_sensitive(False)
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 1eb34ab..037f90f 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -521,6 +521,14 @@ class NMSettings(dbus.service.Object):
 self.secrets_request.send(self, connection=sender,
   response=kwargs['response'])
 
+def clear_wifi_connections(self):
+for uuid in self.connections.keys():
+conn = self.connections[uuid]
+if conn._settings.connection.type == \
+   NM_CONNECTION_TYPE_802_11_WIRELESS:
+conn.Removed()
+self.connections.pop(uuid)
+
 
 class SecretsResponse(object):
 Intermediate object to report the secrets from the dialog
@@ -551,6 +559,16 @@ class NMSettingsConnection(dbus.service.Object):
 self._settings = settings
 self._secrets = secrets
 
+@dbus.service.signal(dbus_interface=NM_CONNECTION_IFACE,
+ signature='')
+def Removed(self):
+pass
+
+@dbus.service.signal(dbus_interface=NM_CONNECTION_IFACE,
+ signature='a{sa{sv}}')
+def Updated(self, settings):
+pass
+
 def set_connected(self):
 if self._settings.connection.type == NM_CONNECTION_TYPE_GSM:
 self._settings.connection.timestamp = int(time.time())
@@ -559,6 +577,7 @@ class NMSettingsConnection(dbus.service.Object):
 self._settings.connection.timestamp = int(time.time())
 if (self._settings.connection.type ==
 NM_CONNECTION_TYPE_802_11_WIRELESS):
+self.Updated(self._settings.get_dict())
 self.save()
 
 try:
@@ -582,8 +601,7 @@ class NMSettingsConnection(dbus.service.Object):
 return self._settings
 
 def save(self):
-profile_path = env.get_profile_path()
-config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
+config_path = _get_wifi_connections_path()
 
 config = ConfigParser.ConfigParser()
 try:
@@ -812,19 +830,25 @@ def add_connection(uuid, settings, secrets=None):
 return conn
 
 
-def load_wifi_connections():
+def _get_wifi_connections_path():
 profile_path = env.get_profile_path()
-config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
+

[Sugar-devel] [PATCH sugar 4/4] fix network disconnect (SL#1608, SL#1802)

2011-01-21 Thread Sascha Silbe
User interface changes:

- enable the disconnect button on the access point menu in the
  neighbourhood view, (rather than the button doing nothing),

- fix the disconnect button on the wireless device icon in the frame
  so that the disconnection remains effective [1], (rather than
  disconnecting and then reconnecting automatically),

Based on a patch by James Cameron qu...@laptop.org.

[1] 
http://mail.gnome.org/archives/networkmanager-list/2011-January/msg7.html

Signed-off-by: Sascha Silbe sascha-...@silbe.org

diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index bc2492d..4c4f339 100644
--- a/extensions/deviceicon/network.py
+++ b/extensions/deviceicon/network.py
@@ -564,20 +564,12 @@ class WirelessDeviceView(ToolButton):
 self._icon.props.base_color = self._color
 
 def __deactivate_connection_cb(self, palette, data=None):
-if self._active_ap_op is not None:
-obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
-netmgr = dbus.Interface(obj, _NM_IFACE)
-netmgr_props = dbus.Interface(netmgr, dbus.PROPERTIES_IFACE)
-active_connections_o = netmgr_props.Get(_NM_IFACE,
-'ActiveConnections')
+if self._mode == network.NM_802_11_MODE_INFRA:
+connection = network.find_connection_by_ssid(self._name)
+if connection:
+connection.disable_autoconnect()
 
-for conn_o in active_connections_o:
-obj = self._bus.get_object(_NM_IFACE, conn_o)
-props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
-ap_op = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
-if ap_op == self._active_ap_op:
-netmgr.DeactivateConnection(conn_o)
-break
+network.disconnect_access_points([self._active_ap_op])
 
 def __activate_reply_cb(self, connection):
 logging.debug('Network created: %s', connection)
diff --git a/src/jarabe/desktop/networkviews.py 
b/src/jarabe/desktop/networkviews.py
index 4282a75..5e0a809 100644
--- a/src/jarabe/desktop/networkviews.py
+++ b/src/jarabe/desktop/networkviews.py
@@ -265,7 +265,13 @@ class WirelessNetworkView(CanvasPulsingIcon):
 self.props.base_color = self._color
 
 def _disconnect_activate_cb(self, item):
-pass
+if self._mode == network.NM_802_11_MODE_INFRA:
+connection = network.find_connection_by_ssid(self._name)
+if connection:
+connection.disable_autoconnect()
+
+ap_paths = self._access_points.keys()
+network.disconnect_access_points(ap_paths)
 
 def _add_ciphers_from_flags(self, flags, pairwise):
 ciphers = []
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 037f90f..847fa80 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -130,11 +130,16 @@ NM_802_11_DEVICE_CAP_RSN = 0x0020
 
 SETTINGS_SERVICE = 'org.freedesktop.NetworkManagerUserSettings'
 
+NM_SERVICE = 'org.freedesktop.NetworkManager'
+NM_IFACE = 'org.freedesktop.NetworkManager'
+NM_PATH = '/org/freedesktop/NetworkManager'
+NM_DEVICE_IFACE = 'org.freedesktop.NetworkManager.Device'
 NM_SETTINGS_PATH = '/org/freedesktop/NetworkManagerSettings'
 NM_SETTINGS_IFACE = 'org.freedesktop.NetworkManagerSettings'
 NM_CONNECTION_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection'
 NM_SECRETS_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection.Secrets'
 NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
+NM_ACTIVE_CONN_IFACE = 'org.freedesktop.NetworkManager.Connection.Active'
 
 GSM_USERNAME_PATH = '/desktop/sugar/network/gsm/username'
 GSM_PASSWORD_PATH = '/desktop/sugar/network/gsm/password'
@@ -591,6 +596,14 @@ class NMSettingsConnection(dbus.service.Object):
 # pylint: disable=W0702
 logging.exception('Error calling libc.__res_init')
 
+def disable_autoconnect(self):
+if self._settings.connection.type != NM_CONNECTION_TYPE_GSM and \
+   self._settings.connection.autoconnect:
+self._settings.connection.autoconnect = False
+self._settings.connection.timestamp = None
+self.Updated(self._settings.get_dict())
+self.save()
+
 def set_secrets(self, secrets):
 self._secrets = secrets
 if self._settings.connection.type == \
@@ -968,3 +981,27 @@ def clear_wifi_connections():
 
 config_path = _get_wifi_connections_path()
 _create_wifi_connections(config_path)
+
+
+def disconnect_access_points(ap_paths):
+
+Disconnect all devices connected to any of the given access points.
+
+bus = dbus.SystemBus()
+netmgr_obj = bus.get_object(NM_SERVICE, NM_PATH)
+netmgr = dbus.Interface(netmgr_obj, NM_IFACE)
+netmgr_props = dbus.Interface(netmgr, dbus.PROPERTIES_IFACE)
+active_connection_paths = 

Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-21 Thread Rafael Ortiz
On Fri, Jan 21, 2011 at 5:53 AM, Sascha Silbe 
sascha-ml-reply-to-201...@silbe.org wrote:

 Excerpts from Erik Blankinship's message of Tue Jan 18 18:41:38 +0100 2011:

  On a dual-boot XO, does it make sense to use the same binary code for
 sugar
  activities also in gnome applications?  If so, are there guidelines or
  example acti-plications?

 In addition to the examples mentioned by others already, I'd like to
 point out that Turtle Blocks can run outside of Sugar (in Gnome), too.
 I haven't tried it myself, so I don't know how well it's integrated with
 Gnome, but people (non-Sugar users AFAIK) seem to like it.


I ran TB once in a nokia cellphone (iirc) as a python script, it ran very
well besides some minor issues like closing not working.



 You can examine the Turtle Blocks source code by opening the activity
 and choosing View Source from the activity palette in the Frame
 (shortcut key Alt+Shift+V, or Fn-Space on an XO).

 Sascha

 --
 http://sascha.silbe.org/
 http://www.infra-silbe.de/

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


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


[Sugar-devel] [PATCH sugar] Dynamically set number of control panel columns (SL#2280)

2011-01-21 Thread Sascha Silbe
From: anishmangal2002 anishmangal2...@gmail.com

This patch sets the number of icon-columns in the control
panel based on the screen resolution. This patch also sets
the table row spacing to GRID_CELL_SIZE.

How the number of columns are calculated:
Let 'W' be the screen width, 's' be the GRID_CELL_SIZE and
'n' be the number of icon columns that can be comfortably
accomodated. Further, lets assume that the width an icon
and its text-label occupies a horizontal space equivalent to
(2.5 * s). We may represent 'W', 'n' and 's' by the following
expression:

 W - (2 * s) =  (n * s + s) + (2.5 * n * s)

where 'W - (2 * s)' is the width of the control panel menu,
'(n * s + s)' is the cumulative column spacing of 'n' icons,
and '(2.5 * n * s)' is the width occupied by 'n' icons and
their text-labels. From the above, 'n' may be computed as

 n = (1/3.5) * ( W/s - 3 )

Signed-off-by: anishmangal2002 anishmangal2...@gmail.com
[style fixup; added comments]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org
---

I couldn't quite reproduce Michaels results. At scaling 72 (default on
most systems) there are four rows at 1024x768. At 100 (default on most
XO builds), the cut-over point between two and three rows is at
1014/1015x768. While it looks odd to have so much space at 1014x768,
you can see at 1015x768 that it fits exactly - so if we wanted to use
more columns below 1015x768, we'd have to reduce the spacing. That is
out of scope for this patch, however.

The fix for wrapping the labels is needed both with and without this
patch; it only changes the text length that triggers the bug.

 src/jarabe/controlpanel/gui.py |   20 
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 9ce8cfd..91792c9 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -32,7 +32,6 @@ from jarabe import config
 
 
 _logger = logging.getLogger('ControlPanel')
-_MAX_COLUMNS = 5
 
 
 class ControlPanel(gtk.Window):
@@ -41,6 +40,9 @@ class ControlPanel(gtk.Window):
 def __init__(self):
 gtk.Window.__init__(self)
 
+self._max_columns = int(0.285 * (float(gtk.gdk.screen_width()) /
+style.GRID_CELL_SIZE - 3))
+
 self.set_border_width(style.LINE_WIDTH)
 offset = style.GRID_CELL_SIZE
 width = gtk.gdk.screen_width() - offset * 2
@@ -110,6 +112,7 @@ class ControlPanel(gtk.Window):
 
 self._table = gtk.Table()
 self._table.set_col_spacings(style.GRID_CELL_SIZE)
+self._table.set_row_spacings(style.GRID_CELL_SIZE)
 self._table.set_border_width(style.GRID_CELL_SIZE)
 
 self._scrolledwindow = gtk.ScrolledWindow()
@@ -134,8 +137,17 @@ class ControlPanel(gtk.Window):
 except ImportError:
 del self._options['keyboard']
 
-row = 0
-column = 2
+# If the screen width only supports two columns, start
+# placing from the second row.
+if self._max_columns == 2:
+row = 1
+column = 0
+else:
+# About Me and About my computer are hardcoded below to use the
+# first two slots so we need to leave them free.
+row = 0
+column = 2
+
 options = self._options.keys()
 options.sort()
 
@@ -157,7 +169,7 @@ class ControlPanel(gtk.Window):
column, column + 1,
row, row + 1)
 column += 1
-if column == _MAX_COLUMNS:
+if column == self._max_columns:
 column = 0
 row += 1
 
-- 
1.7.2.3

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


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Kevin Mauricio Benavides Castro
hello like this


I downloaded the file

http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf


and I've seen that there are problems with the PDF on your content and that
some words appear in the form of symbols


I have not looked the other file you've uploaded, but if there is no way I
can give you relief aid






2011/1/20 Thomas C Gilliard satel...@bendbroadband.com

  I have uploaded 16.pdf files to:

 http://people.sugarlabs.org/Tgillard/floss_manuals/

 Links have been added to:

 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 I hope that this is an appropriate thing to do.
 Having a local copy of the latest Manuals seemed like a good thing to do.

 (I am in the process of updating the Sugar Creation Kit.DVD and needed to
 include them in it.)

 Tom Gilliard
 satellit

 Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

 01/19/2011 03:18 PM

  On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:


   Unfortunately, the FLOSS Manuals website seems to be having issues this 
 morning, but when it comes back up you should be able to find the chapter 
 and link to it.


  Perhaps a copy of this book could be held on Sugar Labs infrastructure?

 --



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




-- 
*Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM http://www.amcham.org.ni/
Nicaragua.**
===

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


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread James Simmons
Kevin,

This is a known problem with the Spanish version of MYOSA.  The table
of contents has an odd encoding.  It will take someone who knows
Spanish and about character encodings to fix this.  The actual pages
in the manual seem to be OK.

James Simmons


On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides Castro
kmbc141...@gmail.com wrote:
 hello like this


 I downloaded the file

 http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf


 and I've seen that there are problems with the PDF on your content and that
 some words appear in the form of symbols


 I have not looked the other file you've uploaded, but if there is no way I
 can give you relief aid






 2011/1/20 Thomas C Gilliard satel...@bendbroadband.com

 I have uploaded 16.pdf files to:

 http://people.sugarlabs.org/Tgillard/floss_manuals/

 Links have been added to:

 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 I hope that this is an appropriate thing to do.
 Having a local copy of the latest Manuals seemed like a good thing to do.

 (I am in the process of updating the Sugar Creation Kit.DVD and needed to
 include them in it.)

 Tom Gilliard
 satellit

 Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

 01/19/2011 03:18 PM

 On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:


  Unfortunately, the FLOSS Manuals website seems to be having issues
  this morning, but when it comes back up you should be able to find the
  chapter and link to it.


 Perhaps a copy of this book could be held on Sugar Labs infrastructure?

 --

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




 --
 Ing. Kevin Mauricio Benavides Castro
 Soporte Técnico | Proyecto XO | AMCHAM
 Nicaragua.
 ===







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


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


[Sugar-devel] [PATCH sugar] don't choke on out-of-range times on FAT32 formatted media

2011-01-21 Thread Sascha Silbe
From: Kenny Meyer knny.m...@gmail.com

Files on a FAT32 formatted USB stick apparently can have times that get
represented as negative Unix timestamps large enough to overflow the (32-bit)
int. Python will automatically cast the subtraction result to long, but only
accepts int from the comparison function (list.sort()). The resulting
exception messes up the Journal.

Using cmp instead of subtraction avoids this issue.

Reported-By: Bernie Innocenti ber...@sugarlabs.org
[changed description]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org
---
 src/jarabe/journal/model.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 9ab8c5e..320e577 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -274,7 +274,7 @@ class InplaceResultSet(BaseResultSet):
 else:
 # timestamp
 keygetter = itemgetter(2)
-self._file_list.sort(lambda a, b: b - a,
+self._file_list.sort(lambda a, b: cmp(b, a),
  key=keygetter,
  reverse=(self._sort[0] == '-'))
 self.ready.send(self)
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar] Add cpu and memory resource indicator to frame

2011-01-21 Thread Sascha Silbe
From: anishmangal2002 anishmangal2...@gmail.com

This patch adds an icon to the frame, whose palette
menu displays the memory and cpu resources. For computing
free memory, the code reads the /proc/meminfo file (thanks
quozl) and for computing cpu usage, the code reads the
/proc/stat file.

The frame icon is updated after every 5 seconds if required.
Similarly, the palette menu entries are updated after every
5 seconds as well.

Signed-off-by: anishmangal2002 anishmangal2...@gmail.com
[style fixes, increase weight of memory utilisation for system mood so
bursts of CPU activity don't take us from happy directly to sad]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org
---
 extensions/deviceicon/Makefile.am  |1 +
 extensions/deviceicon/resources.py |  212 
 po/POTFILES.in |1 +
 3 files changed, 214 insertions(+), 0 deletions(-)

diff --git a/extensions/deviceicon/Makefile.am 
b/extensions/deviceicon/Makefile.am
index d46ddde..44f3e54 100644
--- a/extensions/deviceicon/Makefile.am
+++ b/extensions/deviceicon/Makefile.am
@@ -4,6 +4,7 @@ sugar_PYTHON =  \
__init__.py \
battery.py  \
network.py  \
+   resources.py\
speaker.py  \
touchpad.py \
volume.py
diff --git a/extensions/deviceicon/resources.py 
b/extensions/deviceicon/resources.py
new file mode 100644
index 000..c1e6d23
--- /dev/null
+++ b/extensions/deviceicon/resources.py
@@ -0,0 +1,212 @@
+# Copyright (C) Anish Mangal anishmangal2...@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 2 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
+
+from gettext import gettext as _
+import logging
+import os
+
+import gobject
+import gtk
+import gconf
+
+from sugar.graphics.tray import TrayIcon
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics.palette import Palette
+from sugar.graphics import style
+
+
+_SYSTEM_MOODS = ['-sad', '-normal', '-happy']
+_ICON_NAME = 'computer'
+_UPDATE_INTERVAL = 5*1000
+
+
+class DeviceView(TrayIcon):
+
+FRAME_POSITION_RELATIVE = 500
+
+def __init__(self):
+client = gconf.client_get_default()
+self._color = XoColor(client.get_string('/desktop/sugar/user/color'))
+TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color)
+self.create_palette()
+
+def create_palette(self):
+logging.debug('palette created')
+self.palette = ResourcePalette(_('System resources'))
+self.palette.set_group_id('frame')
+self.palette.add_timer()
+self.palette.connect('system-mood-changed',
+self._system_mood_changed_cb)
+return self.palette
+
+def _system_mood_changed_cb(self, palette_, mood):
+self.icon.props.icon_name = _ICON_NAME + mood
+
+
+class ResourcePalette(Palette):
+__gsignals__ = {
+'system-mood-changed': (gobject.SIGNAL_RUN_FIRST,
+   gobject.TYPE_NONE,
+   ([str])),
+}
+
+def __init__(self, primary_text):
+Palette.__init__(self, label=primary_text)
+
+self.vbox = gtk.VBox()
+self.set_content(self.vbox)
+
+self._cpu_text = gtk.Label()
+self.vbox.pack_start(self._cpu_text, padding=style.DEFAULT_PADDING)
+self._cpu_bar = gtk.ProgressBar()
+self._cpu_bar.set_size_request(
+style.zoom(style.GRID_CELL_SIZE * 4), -1)
+self.vbox.pack_start(self._cpu_bar, padding=style.DEFAULT_PADDING)
+
+self._memory_text = gtk.Label()
+self.vbox.pack_start(self._memory_text, padding=style.DEFAULT_PADDING)
+self._memory_bar = gtk.ProgressBar()
+self._memory_bar.set_size_request(
+style.zoom(style.GRID_CELL_SIZE * 4), -1)
+self.vbox.pack_start(self._memory_bar, padding=style.DEFAULT_PADDING)
+
+self._system_mood = None
+try:
+self._cpu_times = self._get_cpu_times_list()
+except IOError:
+logging.exception('An error ocurred while attempting to '
+'read /proc/stat')
+self._stop_computing_statistics()
+
+self.vbox.show()
+self._cpu_text.show()
+self._cpu_bar.show()
+self._memory_text.show()
+self._memory_bar.show()
+
+   

Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Kevin Mauricio Benavides Castro
Hello James

good thanks hope you can correct anything available to help me :-)



2011/1/21 James Simmons nices...@gmail.com

 Kevin,

 This is a known problem with the Spanish version of MYOSA.  The table
 of contents has an odd encoding.  It will take someone who knows
 Spanish and about character encodings to fix this.  The actual pages
 in the manual seem to be OK.

 James Simmons


 On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides Castro
 kmbc141...@gmail.com wrote:
  hello like this
 
 
  I downloaded the file
 
 
 http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf
 
 
  and I've seen that there are problems with the PDF on your content and
 that
  some words appear in the form of symbols
 
 
  I have not looked the other file you've uploaded, but if there is no way
 I
  can give you relief aid
 
 
 
 
 
 
  2011/1/20 Thomas C Gilliard satel...@bendbroadband.com
 
  I have uploaded 16.pdf files to:
 
  http://people.sugarlabs.org/Tgillard/floss_manuals/
 
  Links have been added to:
 
  http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
 
  I hope that this is an appropriate thing to do.
  Having a local copy of the latest Manuals seemed like a good thing to
 do.
 
  (I am in the process of updating the Sugar Creation Kit.DVD and needed
 to
  include them in it.)
 
  Tom Gilliard
  satellit
 
  Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)
 
  01/19/2011 03:18 PM
 
  On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:
 
 
   Unfortunately, the FLOSS Manuals website seems to be having issues
   this morning, but when it comes back up you should be able to find the
   chapter and link to it.
 
 
  Perhaps a copy of this book could be held on Sugar Labs infrastructure?
 
  --
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 
 
 
  --
  Ing. Kevin Mauricio Benavides Castro
  Soporte Técnico | Proyecto XO | AMCHAM
  Nicaragua.
  ===
 
 
 
 
 
 
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 




-- 
*Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM http://www.amcham.org.ni/
Nicaragua.**
===

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


[Sugar-devel] [PATCH sugar] Don't hide Register menu item upon successful registration

2011-01-21 Thread Sascha Silbe
From: Jorge Saldivar jorgesaldi...@gmail.com

Rename the Register menu item in the XO palette to Register again instead
of hiding it.

Use case: Reregistering XOs after XS reinstallation due to HD crash.

[changed description; rebased on mainline; style fixes]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org
---
 src/jarabe/desktop/favoritesview.py |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/jarabe/desktop/favoritesview.py 
b/src/jarabe/desktop/favoritesview.py
index ac058de..b4a4e75 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -330,7 +330,7 @@ class FavoritesView(hippo.Canvas):
 alert.props.title = _('Registration Successful')
 alert.props.msg = _('You are now registered ' \
 'with your school server.')
-self._my_icon.remove_register_menu()
+self._my_icon.set_registered()
 
 ok_icon = Icon(icon_name='dialog-ok')
 alert.add_button(gtk.RESPONSE_OK, _('Ok'), ok_icon)
@@ -622,12 +622,16 @@ class OwnerIcon(BuddyIcon):
 
 client = gconf.client_get_default()
 backup_url = client.get_string('/desktop/sugar/backup_url')
+
 if not backup_url:
 self._register_menu = MenuItem(_('Register'), 'media-record')
-self._register_menu.connect('activate',
-self.__register_activate_cb)
-palette.menu.append(self._register_menu)
-self._register_menu.show()
+else:
+self._register_menu = MenuItem(_('Register again'),
+   'media-record')
+
+self._register_menu.connect('activate', self.__register_activate_cb)
+palette.menu.append(self._register_menu)
+self._register_menu.show()
 
 return palette
 
@@ -637,8 +641,12 @@ class OwnerIcon(BuddyIcon):
 def __register_activate_cb(self, menuitem):
 self.emit('register-activate')
 
-def remove_register_menu(self):
+def set_registered(self):
 self.palette.menu.remove(self._register_menu)
+self._register_menu = MenuItem(_('Register again'), 'media-record')
+self._register_menu.connect('activate', self.__register_activate_cb)
+self.palette.menu.append(self._register_menu)
+self._register_menu.show()
 
 
 class FavoritesSetting(object):
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar] Avoid popping an empty list in the software updater.

2011-01-21 Thread Sascha Silbe
From: Michael Stone mich...@laptop.org

When you run Sugar with no activities installed, UpdateModel._bundles_to_check
is empty. Attempting to unconditionally pop this list results in an IndexError.
Instead, the updater should stop trying to update bundles when it determines
that it has no more bundles to check.

Signed-off-by: Michael Stone mich...@laptop.org
[style fix]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-by: Sascha Silbe sascha-...@silbe.org
---
 extensions/cpsection/updater/model.py |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/extensions/cpsection/updater/model.py 
b/extensions/cpsection/updater/model.py
index 77cc873..896c17f 100755
--- a/extensions/cpsection/updater/model.py
+++ b/extensions/cpsection/updater/model.py
@@ -73,6 +73,9 @@ class UpdateModel(gobject.GObject):
 total = len(bundleregistry.get_registry())
 current = total - len(self._bundles_to_check)
 
+if not self._bundles_to_check:
+return False
+
 bundle = self._bundles_to_check.pop()
 self.emit('progress', UpdateModel.ACTION_CHECKING, bundle.get_name(),
   current, total)
-- 
1.7.2.3

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


[Sugar-devel] [PATCH sugar] Simplify the definition of UpdateModel._bundles_to_check().

2011-01-21 Thread Sascha Silbe
From: Michael Stone mich...@laptop.org

The only purposes of the list comprehension in UpdateModel.check_updates() is
to set self._bundles_to_check to a list containing the elements returned by
bundleregistry.get_registry(). This purpose can be more succinctly achieved by
means of the list() constructor.

Signed-off-by: Michael Stone mich...@laptop.org
[rebased on mainline/master]
Signed-off-by: Sascha Silbe sascha-...@silbe.org
Reviewed-By: Sascha Silbe sascha-...@silbe.org
---
 extensions/cpsection/updater/model.py |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/extensions/cpsection/updater/model.py 
b/extensions/cpsection/updater/model.py
index 896c17f..7ea445f 100755
--- a/extensions/cpsection/updater/model.py
+++ b/extensions/cpsection/updater/model.py
@@ -65,8 +65,7 @@ class UpdateModel(gobject.GObject):
 
 def check_updates(self):
 self.updates = []
-self._bundles_to_check = \
-[bundle for bundle in bundleregistry.get_registry()]
+self._bundles_to_check = list(bundleregistry.get_registry())
 self._check_next_update()
 
 def _check_next_update(self):
-- 
1.7.2.3

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


Re: [Sugar-devel] [IAEP] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Thomas C Gilliard



James Simmons wrote:

Kevin,

This is a known problem with the Spanish version of MYOSA.  The table
of contents has an odd encoding.  It will take someone who knows
Spanish and about character encodings to fix this.  The actual pages
in the manual seem to be OK.

James Simmons

  
I just did a direct download of the pdf and it shows the same strange 
characters in the index. (the same ones as on the sugarlabs.pdf)

Seems to be due to accented characters on the web page index.

On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides Castro
kmbc141...@gmail.com wrote:
  

hello like this


I downloaded the file

http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf


and I've seen that there are problems with the PDF on your content and that
some words appear in the form of symbols


I have not looked the other file you've uploaded, but if there is no way I
can give you relief aid






2011/1/20 Thomas C Gilliard satel...@bendbroadband.com


I have uploaded 16.pdf files to:

http://people.sugarlabs.org/Tgillard/floss_manuals/

Links have been added to:

http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

I hope that this is an appropriate thing to do.
Having a local copy of the latest Manuals seemed like a good thing to do.

(I am in the process of updating the Sugar Creation Kit.DVD and needed to
include them in it.)

Tom Gilliard
satellit

Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

01/19/2011 03:18 PM

On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:


  

Unfortunately, the FLOSS Manuals website seems to be having issues
this morning, but when it comes back up you should be able to find the
chapter and link to it.


Perhaps a copy of this book could be held on Sugar Labs infrastructure?

--

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

  


--
Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM
Nicaragua.
===







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




___
IAEP -- It's An Education Project (not a laptop project!)
i...@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep

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


[Sugar-devel] [PATCH sugar v2] battery frame device: replace HAL with UPower

2011-01-21 Thread Sascha Silbe
HAL is deprecated, UPower is the designated replacement w.r.t. power
supplies. As a bonus the time displayed is now correct (calculated at
run-time by UPower, self-adjusting to changes in power consumption).

Tested on XO-1.5 running Debian Squeeze with stock UPower (0.9.5-5) and a
2.6.35 OLPC kernel.

Signed-off-by: Sascha Silbe sascha-...@silbe.org
---
v1-v2: Rebased on mainline/master

 extensions/deviceicon/battery.py |  194 +++---
 1 files changed, 98 insertions(+), 96 deletions(-)

diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
index 4028878..0d7381e 100644
--- a/extensions/deviceicon/battery.py
+++ b/extensions/deviceicon/battery.py
@@ -16,8 +16,9 @@
 
 import logging
 from gettext import gettext as _
-import gconf
+import sys
 
+import gconf
 import gobject
 import gtk
 import dbus
@@ -38,17 +39,24 @@ _STATUS_DISCHARGING = 1
 _STATUS_FULLY_CHARGED = 2
 _STATUS_NOT_PRESENT = 3
 
-_LEVEL_PROP = 'battery.charge_level.percentage'
-_CHARGING_PROP = 'battery.rechargeable.is_charging'
-_DISCHARGING_PROP = 'battery.rechargeable.is_discharging'
-_PRESENT_PROP = 'battery.present'
+_UP_TYPE_BATTERY = 2
+
+_UP_STATE_UNKNOWN = 0
+_UP_STATE_CHARGING = 1
+_UP_STATE_DISCHARGING = 2
+_UP_STATE_EMPTY = 3
+_UP_STATE_FULL = 4
+_UP_STATE_CHARGE_PENDING = 5
+_UP_STATE_DISCHARGE_PENDING = 6
+
+_WARN_MIN_PERCENTAGE = 15
 
 
 class DeviceView(TrayIcon):
 
 FRAME_POSITION_RELATIVE = 102
 
-def __init__(self, udi):
+def __init__(self, battery):
 client = gconf.client_get_default()
 self._color = XoColor(client.get_string('/desktop/sugar/user/color'))
 
@@ -56,17 +64,10 @@ class DeviceView(TrayIcon):
 
 self.set_palette_invoker(FrameWidgetInvoker(self))
 
-self._model = DeviceModel(udi)
+self._model = DeviceModel(battery)
 self.palette = BatteryPalette(_('My Battery'))
 self.palette.set_group_id('frame')
-
-self._model.connect('notify::level',
-self._battery_status_changed_cb)
-self._model.connect('notify::charging',
-self._battery_status_changed_cb)
-self._model.connect('notify::discharging',
-self._battery_status_changed_cb)
-self._model.connect('notify::present',
+self._model.connect('updated',
 self._battery_status_changed_cb)
 self._update_info()
 
@@ -88,7 +89,7 @@ class DeviceView(TrayIcon):
   style.COLOR_WHITE.get_svg()))
 elif self._model.props.discharging:
 status = _STATUS_DISCHARGING
-if current_level = 15:
+if current_level = _WARN_MIN_PERCENTAGE:
 badge_name = 'emblem-warning'
 else:
 status = _STATUS_FULLY_CHARGED
@@ -98,10 +99,10 @@ class DeviceView(TrayIcon):
 self.icon.props.xo_color = xo_color
 self.icon.props.badge_name = badge_name
 
-self.palette.set_level(current_level)
-self.palette.set_status(status)
+self.palette.set_info(current_level, self._model.props.time_remaining,
+status)
 
-def _battery_status_changed_cb(self, pspec, param):
+def _battery_status_changed_cb(self, *args):
 self._update_info()
 
 
@@ -109,8 +110,9 @@ class BatteryPalette(Palette):
 
 def __init__(self, primary_text):
 Palette.__init__(self, primary_text)
-
 self._level = 0
+self._time = 0
+self._status = _STATUS_NOT_PRESENT
 self._progress_bar = gtk.ProgressBar()
 self._progress_bar.set_size_request(
 style.zoom(style.GRID_CELL_SIZE * 4), -1)
@@ -126,29 +128,29 @@ class BatteryPalette(Palette):
 self._progress_widget = vbox
 self.set_content(self._progress_widget)
 
-def set_level(self, percent):
+def set_info(self, percent, seconds, status):
 self._level = percent
-fraction = percent / 100.0
-self._progress_bar.set_fraction(fraction)
+self._time = seconds
+self._status = status
+self._progress_bar.set_fraction(percent / 100.0)
+self._update_secondary()
 
-def set_status(self, status):
-current_level = self._level
+def _update_secondary(self):
 secondary_text = ''
-status_text = '%s%%' % current_level
+status_text = '%s%%' % self._level
 
 progress_widget = self._progress_widget
-if status == _STATUS_NOT_PRESENT:
+if self._status == _STATUS_NOT_PRESENT:
 secondary_text = _('Removed')
 progress_widget = None
-elif status == _STATUS_CHARGING:
+elif self._status == _STATUS_CHARGING:
 secondary_text = _('Charging')
-elif status == _STATUS_DISCHARGING:
-if current_level = 15:
+elif self._status == _STATUS_DISCHARGING:
+if self._level = _WARN_MIN_PERCENTAGE:

[Sugar-devel] [PATCH sugar] Fix typo in GConf schema file

2011-01-21 Thread Sascha Silbe
Signed-off-by: Sascha Silbe sascha-...@silbe.org
---
 data/sugar.schemas.in |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in
index 474753b..f38b42e 100644
--- a/data/sugar.schemas.in
+++ b/data/sugar.schemas.in
@@ -31,9 +31,9 @@
   default/default
   locale name=C
 shortUser Color/short
-longColor for the XO icon that is used throughout the 
- desktop. The string is composed of the stroke color and fill 
- color, format is that of rbg colors. Example: #AC32FF,#9A5200 
+longColor for the XO icon that is used throughout the
+ desktop. The string is composed of the stroke color and fill
+ color, format is that of rgb colors. Example: #AC32FF,#9A5200
/long
   /locale
 /schema
-- 
1.7.2.3

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


Re: [Sugar-devel] [IAEP] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Kevin Mauricio Benavides Castro
2011/1/21 Thomas C Gilliard satel...@bendbroadband.com



 James Simmons wrote:

 Kevin,

 This is a known problem with the Spanish version of MYOSA.  The table
 of contents has an odd encoding.  It will take someone who knows
 Spanish and about character encodings to fix this.  The actual pages
 in the manual seem to be OK.

 James Simmons



  I just did a direct download of the pdf and it shows the same strange
 characters in the index. (the same ones as on the sugarlabs.pdf)
 Seems to be due to accented characters on the web page index.





optimal solution ideas? :-)




  On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides 
 Castrokmbc141...@gmail.com kmbc141...@gmail.com wrote:


  hello like this


 I downloaded the file
 http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf


 and I've seen that there are problems with the PDF on your content and that
 some words appear in the form of symbols


 I have not looked the other file you've uploaded, but if there is no way I
 can give you relief aid






 2011/1/20 Thomas C Gilliard satel...@bendbroadband.com 
 satel...@bendbroadband.com

  I have uploaded 16.pdf files to:
 http://people.sugarlabs.org/Tgillard/floss_manuals/

 Links have been added to:
 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 I hope that this is an appropriate thing to do.
 Having a local copy of the latest Manuals seemed like a good thing to do.

 (I am in the process of updating the Sugar Creation Kit.DVD and needed to
 include them in it.)

 Tom Gilliard
 satellit

 Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

 01/19/2011 03:18 PM

 On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:




  Unfortunately, the FLOSS Manuals website seems to be having issues
 this morning, but when it comes back up you should be able to find the
 chapter and link to it.


  Perhaps a copy of this book could be held on Sugar Labs infrastructure?

 --

 ___
 Sugar-devel mailing 
 listSugar-devel@lists.sugarlabs.orghttp://lists.sugarlabs.org/listinfo/sugar-devel

--
 Ing. Kevin Mauricio Benavides Castro
 Soporte Técnico | Proyecto XO | AMCHAM
 Nicaragua.
 ===







 ___
 Sugar-devel mailing 
 listSugar-devel@lists.sugarlabs.orghttp://lists.sugarlabs.org/listinfo/sugar-devel


  ___
 IAEP -- It's An Education Project (not a laptop 
 project!)IAEP@lists.sugarlabs.orghttp://lists.sugarlabs.org/listinfo/iaep




-- 
*Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM http://www.amcham.org.ni/
Nicaragua.**
===

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


Re: [Sugar-devel] [IAEP] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread James Simmons
Kevin,

I have attempted to fix the odd characters in the Spanish version of
MYOSA, with no success.  The problem has been reported, many times, to
the people at FLOSS Manuals.  Fixing this will take knowledge I do not
have.

James Simmons


On Fri, Jan 21, 2011 at 9:44 AM, Kevin Mauricio Benavides Castro
kmbc141...@gmail.com wrote:


 2011/1/21 Thomas C Gilliard satel...@bendbroadband.com


 James Simmons wrote:

 Kevin,

 This is a known problem with the Spanish version of MYOSA.  The table
 of contents has an odd encoding.  It will take someone who knows
 Spanish and about character encodings to fix this.  The actual pages
 in the manual seem to be OK.

 James Simmons



 I just did a direct download of the pdf and it shows the same strange
 characters in the index. (the same ones as on the sugarlabs.pdf)
 Seems to be due to accented characters on the web page index.




 optimal solution ideas? :-)




 On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides Castro
 kmbc141...@gmail.com wrote:


 hello like this


 I downloaded the file


 http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf


 and I've seen that there are problems with the PDF on your content and
 that
 some words appear in the form of symbols


 I have not looked the other file you've uploaded, but if there is no way I
 can give you relief aid






 2011/1/20 Thomas C Gilliard satel...@bendbroadband.com


 I have uploaded 16.pdf files to:

 http://people.sugarlabs.org/Tgillard/floss_manuals/

 Links have been added to:

 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 I hope that this is an appropriate thing to do.
 Having a local copy of the latest Manuals seemed like a good thing to do.

 (I am in the process of updating the Sugar Creation Kit.DVD and needed to
 include them in it.)

 Tom Gilliard
 satellit

 Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

 01/19/2011 03:18 PM

 On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:




 Unfortunately, the FLOSS Manuals website seems to be having issues
 this morning, but when it comes back up you should be able to find the
 chapter and link to it.


 Perhaps a copy of this book could be held on Sugar Labs infrastructure?

 --

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



 --
 Ing. Kevin Mauricio Benavides Castro
 Soporte Técnico | Proyecto XO | AMCHAM
 Nicaragua.
 ===







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




 ___
 IAEP -- It's An Education Project (not a laptop project!)
 i...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep




 --
 Ing. Kevin Mauricio Benavides Castro
 Soporte Técnico | Proyecto XO | AMCHAM
 Nicaragua.
 ===







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


Re: [Sugar-devel] [PATCH sugar] Add cpu and memory resource indicator to frame

2011-01-21 Thread Gonzalo Odiard
Is this patch proposed to include in sugar?
The last time, I think we did not have consensus about the face sad/happy.

Gonzalo


On Fri, Jan 21, 2011 at 12:18 PM, Sascha Silbe sascha-...@silbe.org wrote:

 From: anishmangal2002 anishmangal2...@gmail.com

 This patch adds an icon to the frame, whose palette
 menu displays the memory and cpu resources. For computing
 free memory, the code reads the /proc/meminfo file (thanks
 quozl) and for computing cpu usage, the code reads the
 /proc/stat file.

 The frame icon is updated after every 5 seconds if required.
 Similarly, the palette menu entries are updated after every
 5 seconds as well.

 Signed-off-by: anishmangal2002 anishmangal2...@gmail.com
 [style fixes, increase weight of memory utilisation for system mood so
 bursts of CPU activity don't take us from happy directly to sad]
 Signed-off-by: Sascha Silbe sascha-...@silbe.org
 Reviewed-by: Sascha Silbe sascha-...@silbe.org
 ---
  extensions/deviceicon/Makefile.am  |1 +
  extensions/deviceicon/resources.py |  212
 
  po/POTFILES.in |1 +
  3 files changed, 214 insertions(+), 0 deletions(-)

 diff --git a/extensions/deviceicon/Makefile.am
 b/extensions/deviceicon/Makefile.am
 index d46ddde..44f3e54 100644
 --- a/extensions/deviceicon/Makefile.am
 +++ b/extensions/deviceicon/Makefile.am
 @@ -4,6 +4,7 @@ sugar_PYTHON =  \
__init__.py \
battery.py  \
network.py  \
 +   resources.py\
speaker.py  \
touchpad.py \
volume.py
 diff --git a/extensions/deviceicon/resources.py
 b/extensions/deviceicon/resources.py
 new file mode 100644
 index 000..c1e6d23
 --- /dev/null
 +++ b/extensions/deviceicon/resources.py
 @@ -0,0 +1,212 @@
 +# Copyright (C) Anish Mangal anishmangal2...@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 2 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
 +
 +from gettext import gettext as _
 +import logging
 +import os
 +
 +import gobject
 +import gtk
 +import gconf
 +
 +from sugar.graphics.tray import TrayIcon
 +from sugar.graphics.xocolor import XoColor
 +from sugar.graphics.palette import Palette
 +from sugar.graphics import style
 +
 +
 +_SYSTEM_MOODS = ['-sad', '-normal', '-happy']
 +_ICON_NAME = 'computer'
 +_UPDATE_INTERVAL = 5*1000
 +
 +
 +class DeviceView(TrayIcon):
 +
 +FRAME_POSITION_RELATIVE = 500
 +
 +def __init__(self):
 +client = gconf.client_get_default()
 +self._color =
 XoColor(client.get_string('/desktop/sugar/user/color'))
 +TrayIcon.__init__(self, icon_name=_ICON_NAME,
 xo_color=self._color)
 +self.create_palette()
 +
 +def create_palette(self):
 +logging.debug('palette created')
 +self.palette = ResourcePalette(_('System resources'))
 +self.palette.set_group_id('frame')
 +self.palette.add_timer()
 +self.palette.connect('system-mood-changed',
 +self._system_mood_changed_cb)
 +return self.palette
 +
 +def _system_mood_changed_cb(self, palette_, mood):
 +self.icon.props.icon_name = _ICON_NAME + mood
 +
 +
 +class ResourcePalette(Palette):
 +__gsignals__ = {
 +'system-mood-changed': (gobject.SIGNAL_RUN_FIRST,
 +   gobject.TYPE_NONE,
 +   ([str])),
 +}
 +
 +def __init__(self, primary_text):
 +Palette.__init__(self, label=primary_text)
 +
 +self.vbox = gtk.VBox()
 +self.set_content(self.vbox)
 +
 +self._cpu_text = gtk.Label()
 +self.vbox.pack_start(self._cpu_text,
 padding=style.DEFAULT_PADDING)
 +self._cpu_bar = gtk.ProgressBar()
 +self._cpu_bar.set_size_request(
 +style.zoom(style.GRID_CELL_SIZE * 4), -1)
 +self.vbox.pack_start(self._cpu_bar, padding=style.DEFAULT_PADDING)
 +
 +self._memory_text = gtk.Label()
 +self.vbox.pack_start(self._memory_text,
 padding=style.DEFAULT_PADDING)
 +self._memory_bar = gtk.ProgressBar()
 +self._memory_bar.set_size_request(
 +style.zoom(style.GRID_CELL_SIZE * 4), -1)
 +self.vbox.pack_start(self._memory_bar,
 padding=style.DEFAULT_PADDING)
 +
 +self._system_mood = None
 +try:
 +self._cpu_times = self._get_cpu_times_list()
 +   

[Sugar-devel] [PATCH sugar-toolkit] fix sugar-emulator detection logic broken by 814ab2d (has_key() cleanup)

2011-01-21 Thread Sascha Silbe
This broke Shutdown and Restart (buddy menu).

Signed-off-by: Sascha Silbe sascha-...@silbe.org
---
 src/sugar/env.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sugar/env.py b/src/sugar/env.py
index 1ef8f34..e681f4f 100644
--- a/src/sugar/env.py
+++ b/src/sugar/env.py
@@ -24,7 +24,7 @@ import os
 
 
 def is_emulator():
-return os.environ.get('SUGAR_EMULATOR', 'yes') == 'yes'
+return os.environ.get('SUGAR_EMULATOR', 'no') == 'yes'
 
 
 def get_profile_path(path=None):
-- 
1.7.2.3

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


Re: [Sugar-devel] [PATCH] Remove unused MANIFEST support

2011-01-21 Thread Sascha Silbe
Excerpts from James Cameron's message of Fri May 21 02:37:01 +0200 2010:

 (On the other hand, the same change on 0.82 has had a dramatic effect in
 the past, because 0.82 generated errors in shell logs for every MANIFEST
 inconsistency.  Therefore the change might be considered for backport to
 0.82 deployments.)

Have you tried using a bundle generated with this patch applied (i.e.
without MANIFEST inside the bundle) on Sugar 0.82? (If not, I'll try
it out).

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] [PATCH sugar] Add cpu and memory resource indicator to frame

2011-01-21 Thread Sascha Silbe
Excerpts from Gonzalo Odiard's message of Fri Jan 21 17:01:10 +0100 2011:

 Is this patch proposed to include in sugar?

Yes, it is.

 The last time, I think we did not have consensus about the face sad/happy.

Gary was kind enough to clean up the icons a bit. We'd still like to
turn the sad face into a sweaty one, but nobody has done the work
yet. I'm holding off on posting the sugar-artwork patch for exactly that
reason. Help with this task would be quite welcome.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


Re: [Sugar-devel] [FM Discuss] [IAEP] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Kevin Mauricio Benavides Castro
2011/1/21 adam a...@xs4all.nl

 i think this will be fixed with the localisation of booki james...

 can u wait a few weeks? :)


We expect to play but I think it is so difficult to correct this? I think
only





 adam



 On Fri, 2011-01-21 at 10:00 -0600, James Simmons wrote:
  Kevin,
 
  I have attempted to fix the odd characters in the Spanish version of
  MYOSA, with no success.  The problem has been reported, many times, to
  the people at FLOSS Manuals.  Fixing this will take knowledge I do not
  have.
 
  James Simmons
 
 
  On Fri, Jan 21, 2011 at 9:44 AM, Kevin Mauricio Benavides Castro
  kmbc141...@gmail.com wrote:
  
  
   2011/1/21 Thomas C Gilliard satel...@bendbroadband.com
  
  
   James Simmons wrote:
  
   Kevin,
  
   This is a known problem with the Spanish version of MYOSA.  The table
   of contents has an odd encoding.  It will take someone who knows
   Spanish and about character encodings to fix this.  The actual pages
   in the manual seem to be OK.
  
   James Simmons
  
  
  
   I just did a direct download of the pdf and it shows the same strange
   characters in the index. (the same ones as on the sugarlabs.pdf)
   Seems to be due to accented characters on the web page index.
  
  
  
  
   optimal solution ideas? :-)
  
  
  
  
   On Fri, Jan 21, 2011 at 9:06 AM, Kevin Mauricio Benavides Castro
   kmbc141...@gmail.com wrote:
  
  
   hello like this
  
  
   I downloaded the file
  
  
  
 http://people.sugarlabs.org/Tgillard/floss_manuals/Activitys_Guide-sugar_sp_09Nov10.pdf
  
  
   and I've seen that there are problems with the PDF on your content and
   that
   some words appear in the form of symbols
  
  
   I have not looked the other file you've uploaded, but if there is no
 way I
   can give you relief aid
  
  
  
  
  
  
   2011/1/20 Thomas C Gilliard satel...@bendbroadband.com
  
  
   I have uploaded 16.pdf files to:
  
   http://people.sugarlabs.org/Tgillard/floss_manuals/
  
   Links have been added to:
  
   http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
  
   I hope that this is an appropriate thing to do.
   Having a local copy of the latest Manuals seemed like a good thing to
 do.
  
   (I am in the process of updating the Sugar Creation Kit.DVD and needed
 to
   include them in it.)
  
   Tom Gilliard
   satellit
  
   Re: [Sugar-devel] Git introductory material (Fwd: git top links:
 2011-1)
  
   01/19/2011 03:18 PM
  
   On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:
  
  
  
  
   Unfortunately, the FLOSS Manuals website seems to be having issues
   this morning, but when it comes back up you should be able to find the
   chapter and link to it.
  
  
   Perhaps a copy of this book could be held on Sugar Labs
 infrastructure?
  
   --
  
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
  
  
  
   --
   Ing. Kevin Mauricio Benavides Castro
   Soporte Técnico | Proyecto XO | AMCHAM
   Nicaragua.
   ===
  
  
  
  
  
  
  
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
  
  
  
  
   ___
   IAEP -- It's An Education Project (not a laptop project!)
   i...@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/iaep
  
  
  
  
   --
   Ing. Kevin Mauricio Benavides Castro
   Soporte Técnico | Proyecto XO | AMCHAM
   Nicaragua.
   ===
  
  
  
  
  
  
  
  ___
  Discuss mailing list
  disc...@lists.flossmanuals.net
  http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
 





-- 
*Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM http://www.amcham.org.ni/
Nicaragua.**
===

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


Re: [Sugar-devel] [PATCH Sugar] Extend sugar-launch with more options

2011-01-21 Thread Gary Martin
On 20 Jan 2011, at 10:24, Sascha Silbe wrote:

 Excerpts from Martin Abente's message of Thu Jan 20 02:51:19 +0100 2011:
 
 Anyways this patch does not change what sugar-launch already does (right?),
 just gives it more options that can be useful even though we don't use it
 for what i need in upstream (whenever rainbow is back).
 
 Any good reason to not include it? :)
 
 Yes, there is: It encourages activity authors to start other activities
 from within their own activities, exactly like you're going to do. We
 shouldn't give them easy access to functionality that we already know
 will stop working in the future.
 
 I'm also not convinced that this is good UI design, so I'm CC'ing Gary
 for advice. To recollect:
 
 Martin would like to add an option to sugar-launch that allows
 activities to invoke other activities (already possible) with a given
 URI (new). Launching activities from within another activity won't work
 on Rainbow-enabled systems (by design). The stated use case is starting
 Browse for URLs in the activity UI.

Well, it is a common UI in other operating systems, so I would not specifically 
call this out as poor from a UI stand point. There have been many long threads 
about this in the past, with folks wanting to launch activities from each other 
(common case cited is having lesson plan documents of some kind, that can 
launch the related activities as you work through them). However, in the 
discussions I remember, all of them hit the issue of breaching Rainbow and its 
desired security model. I would also be keen to see Rainbow back in Sugar.

 My suggestion was to offer a very simple HTML widget in sugar-toolkit
 that could be used by the activity to display the document inside the
 running activity.

Whatever the outcome of this thread, I'd love to see a sugar-toolkit HTML 
widget that activities could easily embed. The issue for activity authors for a 
longtime is that it may be easy to fork Browse and add in your own html 
content, but it is very solution brittle and your activity will almost 
certainly break on each new Sugar release.

 This is another iteration of the online (i.e. runtime) activity
 documentation topic.
 
 Gary, what's your take on this?

Yes, though I think Martin may be after this as part of his Notification work? 
I've seen one screen shot where some part of the notification text message was 
a URL link, kind'a worried me at the time (given the above reasons).

Regards,
--Gary

 Sascha
 
 -- 
 http://sascha.silbe.org/
 http://www.infra-silbe.de/

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


Re: [Sugar-devel] [PATCH] Remove unused MANIFEST support

2011-01-21 Thread Bernie Innocenti
On Fri, 2011-01-21 at 17:14 +0100, Sascha Silbe wrote: 
 Excerpts from James Cameron's message of Fri May 21 02:37:01 +0200 2010:
 
  (On the other hand, the same change on 0.82 has had a dramatic effect in
  the past, because 0.82 generated errors in shell logs for every MANIFEST
  inconsistency.  Therefore the change might be considered for backport to
  0.82 deployments.)
 
 Have you tried using a bundle generated with this patch applied (i.e.
 without MANIFEST inside the bundle) on Sugar 0.82? (If not, I'll try
 it out).

IIRC, Sugar 0.82 would emit plenty of warning at installation time, one
for each file missing in the MANIFEST. It would otherwise work fine.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

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


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread James Simmons
Thomas,

I have generated a PDF for the Spanish version of MYOSA which does NOT
have the funny characters in it.  I used the method used for creating
a PDF for a printed book (OBJAVI II).  I did not do the work required
to actually make a PDF good enough for a printed book.  All I did was
take the defaults, and the title page is still in English because I
don't know Spanish.  However, this PDF may suit your purposes better
than what you have now.

http://objavi.flossmanuals.net/books/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf

Be sure and copy this somewhere, as I don't think this link will work forever.

James Simmons


On Fri, Jan 21, 2011 at 10:05 AM, Thomas C Gilliard
satel...@bendbroadband.com wrote:
 James;

 Thanks. It does look much better. I like the multiple formats to download.
 You should announce this on the lists. Maybe you did and I missed it.

 These Manuals are an invaluable addition to sugar.

 I added a link to it here:

 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 Regards;
 Tom Gilliard
 satellit

 James Simmons wrote:

 Thomas,

 There is more than one kind of PDF from FLOSS Manuals.  The ones
 available from the link on the website are good for reading online.
 The other PDF is the one submitted to Lulu to create bound and printed
 books.  This one might be better for reading on the XO with the Read
 Activity too.

 If you want to compare the two kinds of PDF you can check out the PDF
 at the Internet Archive for Make Your Own Sugar Activities!:

 http://www.archive.org/details/MakeYourOwnSugarActivities

 The PDF you have included should be OK for your purposes, but I
 thought you might benefit from knowing about the other kind.  The
 second kind of PDF needs a custom style sheet and a fair amount of
 manual effort to create, because it will be the basis for a printed
 book.

 The Internet Archive is a good second home for any publications we
 create.  For MYOSA I not only posted the PDF, I also generated EPUB
 and MOBI (Kindle) formats and uploaded them.  One of the benefits of
 the FM software is that it will generate an EPUB, which is easily
 converted to MOBI using calibre.  This means you can have a nice ebook
 for the Read Activity plus iPad and Kindle.

 James Simmons


 On Thu, Jan 20, 2011 at 9:25 PM, Thomas C Gilliard
 satel...@bendbroadband.com wrote:


 I have uploaded 16.pdf files to:

 http://people.sugarlabs.org/Tgillard/floss_manuals/

 Links have been added to:

 http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

 I hope that this is an appropriate thing to do.
 Having a local copy of the latest Manuals seemed like a good thing to do.

 (I am in the process of updating the Sugar Creation Kit.DVD and needed to
 include them in it.)

 Tom Gilliard
 satellit

 Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

 01/19/2011 03:18 PM

 On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:




 Unfortunately, the FLOSS Manuals website seems to be having issues
 this morning, but when it comes back up you should be able to find the
 chapter and link to it.


 Perhaps a copy of this book could be held on Sugar Labs infrastructure?

 --

 ___
 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] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Kevin Mauricio Benavides Castro
I've downloaded and I've seen and is much better

but you should host this file elsewhere if it does not work in the future? this
is an idea



2011/1/21 James Simmons nices...@gmail.com

 Thomas,

 I have generated a PDF for the Spanish version of MYOSA which does NOT
 have the funny characters in it.  I used the method used for creating
 a PDF for a printed book (OBJAVI II).  I did not do the work required
 to actually make a PDF good enough for a printed book.  All I did was
 take the defaults, and the title page is still in English because I
 don't know Spanish.  However, this PDF may suit your purposes better
 than what you have now.


 http://objavi.flossmanuals.net/books/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf

 Be sure and copy this somewhere, as I don't think this link will work
 forever.

 James Simmons


 On Fri, Jan 21, 2011 at 10:05 AM, Thomas C Gilliard
 satel...@bendbroadband.com wrote:
  James;
 
  Thanks. It does look much better. I like the multiple formats to
 download.
  You should announce this on the lists. Maybe you did and I missed it.
 
  These Manuals are an invaluable addition to sugar.
 
  I added a link to it here:
 
  http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
 
  Regards;
  Tom Gilliard
  satellit
 
  James Simmons wrote:
 
  Thomas,
 
  There is more than one kind of PDF from FLOSS Manuals.  The ones
  available from the link on the website are good for reading online.
  The other PDF is the one submitted to Lulu to create bound and printed
  books.  This one might be better for reading on the XO with the Read
  Activity too.
 
  If you want to compare the two kinds of PDF you can check out the PDF
  at the Internet Archive for Make Your Own Sugar Activities!:
 
  http://www.archive.org/details/MakeYourOwnSugarActivities
 
  The PDF you have included should be OK for your purposes, but I
  thought you might benefit from knowing about the other kind.  The
  second kind of PDF needs a custom style sheet and a fair amount of
  manual effort to create, because it will be the basis for a printed
  book.
 
  The Internet Archive is a good second home for any publications we
  create.  For MYOSA I not only posted the PDF, I also generated EPUB
  and MOBI (Kindle) formats and uploaded them.  One of the benefits of
  the FM software is that it will generate an EPUB, which is easily
  converted to MOBI using calibre.  This means you can have a nice ebook
  for the Read Activity plus iPad and Kindle.
 
  James Simmons
 
 
  On Thu, Jan 20, 2011 at 9:25 PM, Thomas C Gilliard
  satel...@bendbroadband.com wrote:
 
 
  I have uploaded 16.pdf files to:
 
  http://people.sugarlabs.org/Tgillard/floss_manuals/
 
  Links have been added to:
 
  http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
 
  I hope that this is an appropriate thing to do.
  Having a local copy of the latest Manuals seemed like a good thing to do.
 
  (I am in the process of updating the Sugar Creation Kit.DVD and needed to
  include them in it.)
 
  Tom Gilliard
  satellit
 
  Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)
 
  01/19/2011 03:18 PM
 
  On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:
 
 
 
 
  Unfortunately, the FLOSS Manuals website seems to be having issues
  this morning, but when it comes back up you should be able to find the
  chapter and link to it.
 
 
  Perhaps a copy of this book could be held on Sugar Labs infrastructure?
 
  --
 
  ___
  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




-- 
*Ing. Kevin Mauricio Benavides Castro
Soporte Técnico | Proyecto XO | AMCHAM http://www.amcham.org.ni/
Nicaragua.**
===

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


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread James Simmons
Kevin,

That's why I told Thomas that he should copy it somewhere, as he
apparently has done with the other PDF's.

I'm not going to put this in the Internet Archive because it is not up
to the quality that I want to post there.  For one thing, the title is
still in English.

The reason we can't fix this properly on the website is that FLOSS
Manuals is introducing new software called Booki and translated books
still use the old software.  When translated books are migrated to the
new software this can be fixed.  The work is being done by volunteers,
so it will happen when it happens.

James Simmons


On Fri, Jan 21, 2011 at 11:43 AM, Kevin Mauricio Benavides Castro
kmbc141...@gmail.com wrote:
 I've downloaded and I've seen and is much better

 but you should host this file elsewhere if it does not work in the future?
 this is an idea



 2011/1/21 James Simmons nices...@gmail.com

 Thomas,

 I have generated a PDF for the Spanish version of MYOSA which does NOT
 have the funny characters in it.  I used the method used for creating
 a PDF for a printed book (OBJAVI II).  I did not do the work required
 to actually make a PDF good enough for a printed book.  All I did was
 take the defaults, and the title page is still in English because I
 don't know Spanish.  However, this PDF may suit your purposes better
 than what you have now.


 http://objavi.flossmanuals.net/books/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf

 Be sure and copy this somewhere, as I don't think this link will work
 forever.

 James Simmons


 On Fri, Jan 21, 2011 at 10:05 AM, Thomas C Gilliard
 satel...@bendbroadband.com wrote:
  James;
 
  Thanks. It does look much better. I like the multiple formats to
  download.
  You should announce this on the lists. Maybe you did and I missed it.
 
  These Manuals are an invaluable addition to sugar.
 
  I added a link to it here:
 
  http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
 
  Regards;
  Tom Gilliard
  satellit
 
  James Simmons wrote:
 
  Thomas,
 
  There is more than one kind of PDF from FLOSS Manuals.  The ones
  available from the link on the website are good for reading online.
  The other PDF is the one submitted to Lulu to create bound and printed
  books.  This one might be better for reading on the XO with the Read
  Activity too.
 
  If you want to compare the two kinds of PDF you can check out the PDF
  at the Internet Archive for Make Your Own Sugar Activities!:
 
  http://www.archive.org/details/MakeYourOwnSugarActivities
 
  The PDF you have included should be OK for your purposes, but I
  thought you might benefit from knowing about the other kind.  The
  second kind of PDF needs a custom style sheet and a fair amount of
  manual effort to create, because it will be the basis for a printed
  book.
 
  The Internet Archive is a good second home for any publications we
  create.  For MYOSA I not only posted the PDF, I also generated EPUB
  and MOBI (Kindle) formats and uploaded them.  One of the benefits of
  the FM software is that it will generate an EPUB, which is easily
  converted to MOBI using calibre.  This means you can have a nice ebook
  for the Read Activity plus iPad and Kindle.
 
  James Simmons
 
 
  On Thu, Jan 20, 2011 at 9:25 PM, Thomas C Gilliard
  satel...@bendbroadband.com wrote:
 
 
  I have uploaded 16.pdf files to:
 
  http://people.sugarlabs.org/Tgillard/floss_manuals/
 
  Links have been added to:
 
  http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals
 
  I hope that this is an appropriate thing to do.
  Having a local copy of the latest Manuals seemed like a good thing to
  do.
 
  (I am in the process of updating the Sugar Creation Kit.DVD and needed
  to
  include them in it.)
 
  Tom Gilliard
  satellit
 
  Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)
 
  01/19/2011 03:18 PM
 
  On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:
 
 
 
 
  Unfortunately, the FLOSS Manuals website seems to be having issues
  this morning, but when it comes back up you should be able to find the
  chapter and link to it.
 
 
  Perhaps a copy of this book could be held on Sugar Labs infrastructure?
 
  --
 
  ___
  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



 --
 Ing. Kevin Mauricio Benavides Castro
 Soporte Técnico | Proyecto XO | AMCHAM
 Nicaragua.
 ===







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


Re: [Sugar-devel] [PATCH Sugar] Extend sugar-launch with more options

2011-01-21 Thread Martin Abente
Guess i need to clarify (again) that this patch only add new arguments to
sugar-launch (in order to pass an uri to browse). But sugar-launch can
already open activities, and activities can already use it to open any other
activity today.

On Fri, Jan 21, 2011 at 2:13 PM, Gary Martin garycmar...@googlemail.comwrote:

 On 20 Jan 2011, at 10:24, Sascha Silbe wrote:

  Excerpts from Martin Abente's message of Thu Jan 20 02:51:19 +0100 2011:
 
  Anyways this patch does not change what sugar-launch already does
 (right?),
  just gives it more options that can be useful even though we don't use
 it
  for what i need in upstream (whenever rainbow is back).
 
  Any good reason to not include it? :)
 
  Yes, there is: It encourages activity authors to start other activities
  from within their own activities, exactly like you're going to do. We
  shouldn't give them easy access to functionality that we already know
  will stop working in the future.
 
  I'm also not convinced that this is good UI design, so I'm CC'ing Gary
  for advice. To recollect:
 
  Martin would like to add an option to sugar-launch that allows
  activities to invoke other activities (already possible) with a given
  URI (new). Launching activities from within another activity won't work
  on Rainbow-enabled systems (by design). The stated use case is starting
  Browse for URLs in the activity UI.

 Well, it is a common UI in other operating systems, so I would not
 specifically call this out as poor from a UI stand point. There have been
 many long threads about this in the past, with folks wanting to launch
 activities from each other (common case cited is having lesson plan
 documents of some kind, that can launch the related activities as you work
 through them). However, in the discussions I remember, all of them hit the
 issue of breaching Rainbow and its desired security model. I would also be
 keen to see Rainbow back in Sugar.

  My suggestion was to offer a very simple HTML widget in sugar-toolkit
  that could be used by the activity to display the document inside the
  running activity.

 Whatever the outcome of this thread, I'd love to see a sugar-toolkit HTML
 widget that activities could easily embed. The issue for activity authors
 for a longtime is that it may be easy to fork Browse and add in your own
 html content, but it is very solution brittle and your activity will almost
 certainly break on each new Sugar release.


Why we would go for embedding limited html renderers on activities when you
already have a powerful browser.


  This is another iteration of the online (i.e. runtime) activity
  documentation topic.
 
  Gary, what's your take on this?

 Yes, though I think Martin may be after this as part of his Notification
 work? I've seen one screen shot where some part of the notification text
 message was a URL link, kind'a worried me at the time (given the above
 reasons).


Yes, that is certainly a use case, and since the notification system is part
of sugar itself there should not be security concerns (the invoker is
trustworthy). Then, if the content is your concern, why would you be
concern? browse will be protected by rainbow any ways (the content is sand
boxed).

For the activities scenario, it might be possible to set the default browser
as the only available activity to be launched by another, and even add more
constraints like: once browse instance per activity at once.

Regards,
 --Gary

  Sascha
 
  --
  http://sascha.silbe.org/
  http://www.infra-silbe.de/


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


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Thomas C Gilliard

Downloaded.

I will post it to sugarlabs link tonight.

Thanks
Tom Gilliard
satellit

James Simmons wrote:

Thomas,

I have generated a PDF for the Spanish version of MYOSA which does NOT
have the funny characters in it.  I used the method used for creating
a PDF for a printed book (OBJAVI II).  I did not do the work required
to actually make a PDF good enough for a printed book.  All I did was
take the defaults, and the title page is still in English because I
don't know Spanish.  However, this PDF may suit your purposes better
than what you have now.

http://objavi.flossmanuals.net/books/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf

Be sure and copy this somewhere, as I don't think this link will work forever.

James Simmons


On Fri, Jan 21, 2011 at 10:05 AM, Thomas C Gilliard
satel...@bendbroadband.com wrote:
  

James;

Thanks. It does look much better. I like the multiple formats to download.
You should announce this on the lists. Maybe you did and I missed it.

These Manuals are an invaluable addition to sugar.

I added a link to it here:

http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

Regards;
Tom Gilliard
satellit

James Simmons wrote:

Thomas,

There is more than one kind of PDF from FLOSS Manuals.  The ones
available from the link on the website are good for reading online.
The other PDF is the one submitted to Lulu to create bound and printed
books.  This one might be better for reading on the XO with the Read
Activity too.

If you want to compare the two kinds of PDF you can check out the PDF
at the Internet Archive for Make Your Own Sugar Activities!:

http://www.archive.org/details/MakeYourOwnSugarActivities

The PDF you have included should be OK for your purposes, but I
thought you might benefit from knowing about the other kind.  The
second kind of PDF needs a custom style sheet and a fair amount of
manual effort to create, because it will be the basis for a printed
book.

The Internet Archive is a good second home for any publications we
create.  For MYOSA I not only posted the PDF, I also generated EPUB
and MOBI (Kindle) formats and uploaded them.  One of the benefits of
the FM software is that it will generate an EPUB, which is easily
converted to MOBI using calibre.  This means you can have a nice ebook
for the Read Activity plus iPad and Kindle.

James Simmons


On Thu, Jan 20, 2011 at 9:25 PM, Thomas C Gilliard
satel...@bendbroadband.com wrote:


I have uploaded 16.pdf files to:

http://people.sugarlabs.org/Tgillard/floss_manuals/

Links have been added to:

http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

I hope that this is an appropriate thing to do.
Having a local copy of the latest Manuals seemed like a good thing to do.

(I am in the process of updating the Sugar Creation Kit.DVD and needed to
include them in it.)

Tom Gilliard
satellit

Re: [Sugar-devel] Git introductory material (Fwd: git top links: 2011-1)

01/19/2011 03:18 PM

On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:




Unfortunately, the FLOSS Manuals website seems to be having issues
this morning, but when it comes back up you should be able to find the
chapter and link to it.


Perhaps a copy of this book could be held on Sugar Labs infrastructure?

--

___
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 mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Local download page for 16 Sugar Related Floss Manual .pdf files

2011-01-21 Thread Thomas C Gilliard



Thomas C Gilliard wrote:

Downloaded.

I will post it to sugarlabs link tonight.

Done:
http://people.sugarlabs.org/Tgillard/floss_manuals/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf


Thanks
Tom Gilliard
satellit

James Simmons wrote:

Thomas,

I have generated a PDF for the Spanish version of MYOSA which does NOT
have the funny characters in it.  I used the method used for creating
a PDF for a printed book (OBJAVI II).  I did not do the work required
to actually make a PDF good enough for a printed book.  All I did was
take the defaults, and the title page is still in English because I
don't know Spanish.  However, this PDF may suit your purposes better
than what you have now.

http://objavi.flossmanuals.net/books/ActivitiesGuideSugares-es-2011.01.21-18.28.05.pdf 



Be sure and copy this somewhere, as I don't think this link will work 
forever.


James Simmons


On Fri, Jan 21, 2011 at 10:05 AM, Thomas C Gilliard
satel...@bendbroadband.com wrote:
 

James;

Thanks. It does look much better. I like the multiple formats to 
download.

You should announce this on the lists. Maybe you did and I missed it.

These Manuals are an invaluable addition to sugar.

I added a link to it here:

http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

Regards;
Tom Gilliard
satellit

James Simmons wrote:

Thomas,

There is more than one kind of PDF from FLOSS Manuals.  The ones
available from the link on the website are good for reading online.
The other PDF is the one submitted to Lulu to create bound and printed
books.  This one might be better for reading on the XO with the Read
Activity too.

If you want to compare the two kinds of PDF you can check out the PDF
at the Internet Archive for Make Your Own Sugar Activities!:

http://www.archive.org/details/MakeYourOwnSugarActivities

The PDF you have included should be OK for your purposes, but I
thought you might benefit from knowing about the other kind.  The
second kind of PDF needs a custom style sheet and a fair amount of
manual effort to create, because it will be the basis for a printed
book.

The Internet Archive is a good second home for any publications we
create.  For MYOSA I not only posted the PDF, I also generated EPUB
and MOBI (Kindle) formats and uploaded them.  One of the benefits of
the FM software is that it will generate an EPUB, which is easily
converted to MOBI using calibre.  This means you can have a nice ebook
for the Read Activity plus iPad and Kindle.

James Simmons


On Thu, Jan 20, 2011 at 9:25 PM, Thomas C Gilliard
satel...@bendbroadband.com wrote:


I have uploaded 16.pdf files to:

http://people.sugarlabs.org/Tgillard/floss_manuals/

Links have been added to:

http://wiki.sugarlabs.org/go/Sugar_Creation_Kit#Floss_Manuals

I hope that this is an appropriate thing to do.
Having a local copy of the latest Manuals seemed like a good thing 
to do.


(I am in the process of updating the Sugar Creation Kit.DVD and 
needed to

include them in it.)

Tom Gilliard
satellit

Re: [Sugar-devel] Git introductory material (Fwd: git top links: 
2011-1)


01/19/2011 03:18 PM

On Wed, Jan 19, 2011 at 09:11:26AM -0600, James Simmons wrote:




Unfortunately, the FLOSS Manuals website seems to be having issues
this morning, but when it comes back up you should be able to find the
chapter and link to it.


Perhaps a copy of this book could be held on Sugar Labs infrastructure?

--

___
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 mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Magalhaes VM image: What is the root password of the VM?

2011-01-21 Thread Thomas C Gilliard
I have downloaded the Magalhaes VM image 
(http://wiki.sugarlabs.org/go/Community/Distributions/Magalh%C3%A3es)

extracted the .vmdk files
Started it in VMPlayer
but do not know the root password so I cannot execute: 


sudo urpmi task-sugar

To load Sugar

DO you know the password? 
(It should added to the wiki Community/Distributions/Magalhaes  page instructions)


Tom Gilliard
satellit


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