[Sugar-devel] [PATCH sugar] Limit the nick name to be only 8 characters maximum #10737
The avahi service name has a 64 character limit. It consists of the room name the published-name and the host name. Signed-off-by: Simon Schampijer si...@laptop.org --- src/jarabe/model/neighborhood.py | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py index ca4c5bf..f0b3923 100644 --- a/src/jarabe/model/neighborhood.py +++ b/src/jarabe/model/neighborhood.py @@ -695,6 +695,15 @@ class Neighborhood(gobject.GObject): if account == self._server_account: self._link_local_account.enable() +def _limit_published_name(self, nick): + Limit the nick name to be only 8 characters maximum + +The avahi service name has a 64 character limit. It consists of +the room name the published-name and the host name. + + +return nick[:8] + def _ensure_link_local_account(self, account_paths): for account_path in account_paths: if 'salut' in account_path: @@ -713,7 +722,7 @@ class Neighborhood(gobject.GObject): 'first-name': '', 'last-name': '', 'jid': self._get_jabber_account_id(), -'published-name': nick, +'published-name': self._limit_published_name(nick), } properties = { -- 1.7.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar] Fully update the salut account information when the nick name changes #10749
When we update the nick name we need to update the information saved by the telepathy account manager. This does fix the complete update of the salut account information. Signed-off-by: Simon Schampijer si...@laptop.org --- src/jarabe/model/neighborhood.py | 41 +- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py index f0b3923..91fedd3 100644 --- a/src/jarabe/model/neighborhood.py +++ b/src/jarabe/model/neighborhood.py @@ -798,12 +798,12 @@ class Neighborhood(gobject.GObject): server = client.get_string( '/desktop/sugar/collaboration/jabber_server') account_id = self._get_jabber_account_id() -needs_reconnect = account.UpdateParameters({'server': server, -'account': account_id, -'register': True}, -dbus.Array([], 's'), -dbus_interface=ACCOUNT) -if needs_reconnect: +params_needing_reconnect = account.UpdateParameters( +{'server': server, + 'account': account_id, + 'register': True}, +dbus.Array([], 's'), dbus_interface=ACCOUNT) +if params_needing_reconnect: account.Reconnect() self._update_jid() @@ -812,10 +812,23 @@ class Neighborhood(gobject.GObject): logging.debug('__nick_changed_cb') nick = client.get_string('/desktop/sugar/user/nick') -for account in self._server_account, self._link_local_account: -bus = dbus.Bus() -obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, account.object_path) -obj.Set(ACCOUNT, 'Nickname', nick, dbus_interface=PROPERTIES_IFACE) + +bus = dbus.Bus() +server_obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, +self._server_account.object_path) +server_obj.Set(ACCOUNT, 'Nickname', nick, + dbus_interface=PROPERTIES_IFACE) + +link_local_obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, +self._link_local_account.object_path) +link_local_obj.Set(ACCOUNT, 'Nickname', nick, + dbus_interface=PROPERTIES_IFACE) +params_needing_reconnect = link_local_obj.UpdateParameters( +{'nickname': nick, + 'published-name': self._limit_published_name(nick)}, +dbus.Array([], 's'), dbus_interface=ACCOUNT) +if params_needing_reconnect: +link_local_obj.Reconnect() self._update_jid() @@ -825,10 +838,10 @@ class Neighborhood(gobject.GObject): self._link_local_account.object_path) account_id = self._get_jabber_account_id() -needs_reconnect = account.UpdateParameters({'jid': account_id}, - dbus.Array([], 's'), - dbus_interface=ACCOUNT) -if needs_reconnect: +params_needing_reconnect = account.UpdateParameters( +{'jid': account_id}, +dbus.Array([], 's'), dbus_interface=ACCOUNT) +if params_needing_reconnect: account.Reconnect() def __buddy_added_cb(self, account, contact_id, nick, handle): -- 1.7.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Fully update the salut account information when the nick name changes #10749
On 03/22/2011 03:45 PM, Sascha Silbe wrote: Excerpts from Simon Schampijer's message of Wed Mar 16 18:57:17 +0100 2011: Signed-off-by: Simon Schampijersi...@laptop.org As usual I'm missing some kind of explanation on the background (why UpdateParameters is needed etc.). :) I did put a bit more info in the secondary patch description. [src/jarabe/model/neighborhood.py] @@ -812,10 +812,22 @@ class Neighborhood(gobject.GObject): logging.debug('__nick_changed_cb') nick = client.get_string('/desktop/sugar/user/nick') -for account in self._server_account, self._link_local_account: -bus = dbus.Bus() -obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, account.object_path) -obj.Set(ACCOUNT, 'Nickname', nick, dbus_interface=PROPERTIES_IFACE) + +bus = dbus.Bus() +account = bus.get_object(ACCOUNT_MANAGER_SERVICE, + self._server_account.object_path) +account.Set(ACCOUNT, 'Nickname', nick, dbus_interface=PROPERTIES_IFACE) + +account = bus.get_object(ACCOUNT_MANAGER_SERVICE, + self._link_local_account.object_path) +account.Set(ACCOUNT, 'Nickname', nick, dbus_interface=PROPERTIES_IFACE) I guess you unrolled the loop so you can call UpdateParameters on just the Salut account? If so, please name the two variables differently. Done. +needs_reconnect = account.UpdateParameters( \ +{'nickname': nick, + 'published-name': self._limit_published_name(nick)}, +dbus.Array([], 's'), +dbus_interface=ACCOUNT) +if needs_reconnect: +account.Reconnect() The backslash isn't necessary [1]. Done. The return value of UpdateParameters seems to be a list [2] rather than a boolean. How about renaming it to something like params_needing_reconnect? Done. Renamed the name and renamed as well the other occasions. I see neither nickname nor published-name in the list of well-known connection parameters [3]. Are they specific to Salut? Is there any documentation explaining what they are and how they're used? No, not that I am aware of - the only way I found out was by reading the code, the account information (~/.mission-control) and testing. Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] ActivityListPalette: fix bundle_changed disconnection
On 03/03/2011 09:58 AM, Sascha Silbe wrote: Fixing the regressions from SL#1742 uncovered another bug: ActivityListPalette listens to the bundle_changed signal from the bundle registry and tries to disconnect it from itself instead of from the registry. Fixes the following warning: [...]/jarabe/desktop/activitieslist.py:428: Warning: /scratch/build-area/glib2.0-2.24.2/gobject/gsignal.c:2390: instance `0x35022b0' has no handler with id `2278' self.disconnect(self._activity_changed_sid) Signed-off-by: Sascha Silbesi...@activitycentral.com Acked-by: Simon Schampijer si...@laptop.org This can be easily tested by 'favorite' and 'unfavorite' an activity in the list view or by trying to remove an activity. Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-toolkit] fix regressions introduced by 29582de67f3189d232e170b1e07e9bf34233fb51
Hi Sascha, thanks for looking into this! On 03/03/2011 08:42 AM, Sascha Silbe wrote: GTK pops down the palette before it invokes the actions on the menu item. We need to postpone destruction of the palette until after all signals have propagated from the menu item to the palette owner. Signed-off-by: Sascha Silbesi...@activitycentral.com Acked-by: Simon Schampijer si...@laptop.org --- I don't really consider this a good solution (we now potentially race with other idle tasks), but cannot come up with anything better. Of the few existing idle_add calls that are related to palettes in some way none accesses the palette in the idle task, so we should be safe for now. Yeah I poked a bit more around today (check if we could force that the gobject signalling had happened before we destroy the palette) but could not come up with anything better than the idle_add. One thing we could consider is setting the priority to gobject.PRIORITY_LOW [1]. And maybe we should add the ticket id in your comment for further reference (or at least in the secondary commit message). Regards, Simon [1] http://www.pygtk.org/pygtk2reference/gobject-constants.html#gobject-priority-constants ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] TA NXT plugin - cleanup and faster startup
Hi Emiliano, Walter, list, At http://dev.laptop.org/git/users/martin/turtleart/ you'll find current TA master plus 2 patches. One is Emiliano's work, presented as a single patch that only touches the relevant files. I think this is good to merge. Author: Emiliano Pastorino epastor...@plan.ceibal.edu.uy Date: Wed Mar 23 11:49:02 2011 -0400 Add LEGO Mindstorms NXT2.0 plugin based on nxt_python 2.1.0 icons/nxtoff.svg | 84 icons/nxton.svg | 83 plugins/nxt_plugin.py | 339 + po/es.po | 168 4 files changed, 674 insertions(+), 0 deletions(-) The other one is Author: Martin Langhoff mar...@laptop.org Date: Wed Mar 23 12:33:08 2011 -0400 nxt: delay finding the NXT brick, offer NXT block everytime - Startup delays --due to searching for NXT bricks -- are gone these delays affected all users with the libs installed. - All users that have nxt libraries installed see NXT blocks, and can load/edit files w them. - NXT detection is delayed until we hit an NXT-related action block - We only try to stop NXT motors if we have seen an nxt brick plugins/nxt_plugin.py | 52 To use/test my rework of Emiliano's patches, you'll want to have the following rpms installed. They are built for Python 2.7 so F14 onwards -- will prep F9 and F11 packages soon. http://dev.laptop.org/~martin/public_rpms/nxt_python-2.1.0-1.fc16.noarch.rpm http://dev.laptop.org/~martin/public_rpms/lego-udevrules-1.0-1.fc14.noarch.rpm With Emiliano's patch there is a very visible delay on startup, due to the attempts to find an NXT brick. In fact I got worried for a moment that the plugins model was to blame. My patch waits until we actually need to talk to the brick to search for it, and displays a nice error msg if we can't find it. One situation that is not handled well is unplugging/replugging of the usb cable -- which may well happen between runs in a busy classroom. We could address that by wrapping every call to the NXT libs with a try/except that retries the _find_brick() and retries the command. cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] TA NXT plugin - cleanup and faster startup
On Wed, Mar 23, 2011 at 12:54 PM, Martin Langhoff martin.langh...@gmail.com wrote: One situation that is not handled well is unplugging/replugging of the usb cable -- which may well happen between runs in a busy classroom. We could address that by wrapping every call to the NXT libs with a try/except that retries the _find_brick() and retries the command. I've actually updated my patch to use a small command dispatcher, so all calls to the nxt library look like self._nxt_cmd(lambda: Motor(self.nxtbrick, port).turn(power, int(turns*360))) which means we can easily wrap them to try and retry. With this, I can unplug and replug my robot between executions, and it all works perfectly well. The lamba+dispatcher trick adds a layer of indirection, but the stacktraces still make sense. And it's a lot more usable! Remaining issues: - Sometimes TA gets stuck, probably in the finding nxt brick stage. Is there a way to get a timeout on this? Is there a way to display a message (like logoerror does) and then remove the msg once we found our brick? - One of the blocks isn't readable (in English at least) -- I can't figure out how to make meaningful customizations of the basic-style-3arg. It's generally looking really neat. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] TA NXT plugin - cleanup and faster startup
One situation that is not handled well is unplugging/replugging of the usb cable -- which may well happen between runs in a busy classroom. I was thinking just a moment ago on listening for deviceadded and deviceremoved signals from hal, hidding/unhidding nxt palette and calling find_one_brick only when necessary. Do you think this is a good approach? Is it possible to add and remove a palette on the fly? On Wed, Mar 23, 2011 at 1:54 PM, Martin Langhoff martin.langh...@gmail.comwrote: Hi Emiliano, Walter, list, At http://dev.laptop.org/git/users/martin/turtleart/ you'll find current TA master plus 2 patches. One is Emiliano's work, presented as a single patch that only touches the relevant files. I think this is good to merge. Author: Emiliano Pastorino epastor...@plan.ceibal.edu.uy Date: Wed Mar 23 11:49:02 2011 -0400 Add LEGO Mindstorms NXT2.0 plugin based on nxt_python 2.1.0 icons/nxtoff.svg | 84 icons/nxton.svg | 83 plugins/nxt_plugin.py | 339 + po/es.po | 168 4 files changed, 674 insertions(+), 0 deletions(-) The other one is Author: Martin Langhoff mar...@laptop.org Date: Wed Mar 23 12:33:08 2011 -0400 nxt: delay finding the NXT brick, offer NXT block everytime - Startup delays --due to searching for NXT bricks -- are gone these delays affected all users with the libs installed. - All users that have nxt libraries installed see NXT blocks, and can load/edit files w them. - NXT detection is delayed until we hit an NXT-related action block - We only try to stop NXT motors if we have seen an nxt brick plugins/nxt_plugin.py | 52 To use/test my rework of Emiliano's patches, you'll want to have the following rpms installed. They are built for Python 2.7 so F14 onwards -- will prep F9 and F11 packages soon. http://dev.laptop.org/~martin/public_rpms/nxt_python-2.1.0-1.fc16.noarch.rpm http://dev.laptop.org/~martin/public_rpms/lego-udevrules-1.0-1.fc14.noarch.rpm With Emiliano's patch there is a very visible delay on startup, due to the attempts to find an NXT brick. In fact I got worried for a moment that the plugins model was to blame. My patch waits until we actually need to talk to the brick to search for it, and displays a nice error msg if we can't find it. One situation that is not handled well is unplugging/replugging of the usb cable -- which may well happen between runs in a busy classroom. We could address that by wrapping every call to the NXT libs with a try/except that retries the _find_brick() and retries the command. cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff -- Ing. Emiliano Pastorino Centro Ceibal Av. Italia 6201 Ed. Los Ceibos Montevideo, Uruguay Tel: (598) 2601 5773 int.: 2232 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] TA NXT plugin - cleanup and faster startup
On Wed, Mar 23, 2011 at 1:48 PM, Emiliano Pastorino epastor...@plan.ceibal.edu.uy wrote: One situation that is not handled well is unplugging/replugging of the usb cable -- which may well happen between runs in a busy classroom. I was thinking just a moment ago on listening for deviceadded and deviceremoved signals from hal, hidding/unhidding nxt palette and calling find_one_brick only when necessary. Do you think this is a good approach? I've revised my patch and now it handles disconnect-reconnect. I think we want to always show the palette so kids can work on their program disconnected. They can take turns to run it. This means a group of kids can share a robot nicely. cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Hello World-2
Activity Homepage: http://activities.sugarlabs.org/addon/4418 Sugar Platform: 0.86 - 0.92 Download Now: http://activities.sugarlabs.org/downloads/file/27293/helloworld-2.xo Release notes: Version 2 does work with the new toolbar. Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Add alpha and scale functionality to the icon, can be used in the launcher to do the animation - v2
From: Gonzalo Odiard godi...@gmail.com Signed-off-by: Gonzalo Odiard gonz...@laptop.org Acked-By: Simon Schampijer si...@laptop.org --- src/sugar/graphics/icon.py | 50 --- 1 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py index 870c49e..7d84f2b 100644 --- a/src/sugar/graphics/icon.py +++ b/src/sugar/graphics/icon.py @@ -332,6 +332,8 @@ class Icon(gtk.Image): # collected while it's still used if it's a sugar.util.TempFilePath. # See #1175 self._file = None +self._alpha = 1.0 +self._scale = 1.0 gobject.GObject.__init__(self, **kwargs) @@ -420,8 +422,22 @@ class Icon(gtk.Image): (allocation.height - requisition[1]) * yalign) cr = self.window.cairo_create() + +if self._scale != 1.0: +cr.scale(self._scale, self._scale) + +margin = self._buffer.width * (1 - self._scale) / 2 +x, y = x + margin, y + margin + +x = x / self._scale +y = y / self._scale + cr.set_source_surface(surface, x, y) -cr.paint() + +if self._alpha == 1.0: +cr.paint() +else: +cr.paint_with_alpha(self._alpha) def set_xo_color(self, value): @@ -524,6 +540,22 @@ class Icon(gtk.Image): badge_name = gobject.property( type=str, getter=get_badge_name, setter=set_badge_name) +def set_alpha(self, value): +if self._alpha != value: +self._alpha = value +self.queue_draw() + +alpha = gobject.property( +type=float, setter=set_alpha) + +def set_scale(self, value): +if self._scale != value: +self._scale = value +self.queue_draw() + +scale = gobject.property( +type=float, setter=set_scale) + class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): @@ -534,6 +566,7 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): self._buffer = _IconBuffer() self._palette_invoker = CanvasInvoker() +self._alpha = 1.0 hippo.CanvasBox.__init__(self, **kwargs) @@ -775,8 +808,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): None -logging.warning( -'CanvasIcon: the scale parameter is currently unsupported') if self._buffer.scale != value: self._buffer.scale = value self.emit_request_changed() @@ -797,6 +828,14 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): scale = gobject.property( type=float, getter=get_scale, setter=set_scale) +def set_alpha(self, alpha): +if self._alpha != alpha: +self._alpha = alpha +self.emit_paint_needed(0, 0, -1, -1) + +alpha = gobject.property( +type=float, setter=set_alpha) + def set_cache(self, value): Parameters @@ -878,7 +917,10 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem): y = (height - surface.get_height()) / 2 cr.set_source_surface(surface, x, y) -cr.paint() +if self._alpha == 1.0: +cr.paint() +else: +cr.paint_with_alpha(self._alpha) def do_get_content_width_request(self): -- 1.7.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Do startup animation of the activity icon using scaling and alpha - v2
From: Gonzalo Odiard godi...@gmail.com This render the SVG image only one time, and then use alpha and scaling of the rendered icon and will speed up the overall activity startup. Another side effect is that the ticket #2080 effects are reduced greatly. Signed-off-by: Gonzalo Odiard gonz...@laptop.org Acked-By: Simon Schampijer si...@laptop.org --- src/jarabe/view/launcher.py| 83 +-- src/jarabe/view/pulsingicon.py | 82 ++- 2 files changed, 65 insertions(+), 100 deletions(-) diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py index 89251e5..7437d21 100644 --- a/src/jarabe/view/launcher.py +++ b/src/jarabe/view/launcher.py @@ -18,16 +18,13 @@ import logging from gettext import gettext as _ import gtk -import hippo import gobject from sugar import wm from sugar.graphics import style -from sugar.graphics import animator -from sugar.graphics.xocolor import XoColor from jarabe.model import shell -from jarabe.view.pulsingicon import CanvasPulsingIcon +from jarabe.view.pulsingicon import PulsingIcon class LaunchWindow(gtk.Window): @@ -51,12 +48,15 @@ class LaunchWindow(gtk.Window): canvas.pack_start(header, expand=False) self._activity_id = activity_id -self._box = LaunchBox(activity_id, icon_path, icon_color) -box = hippo.Canvas() -box.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) -box.set_root(self._box) -box.show() -canvas.pack_start(box) + +self._activity_icon = PulsingIcon(file=icon_path, + pixel_size=style.XLARGE_ICON_SIZE) +self._activity_icon.set_base_color(icon_color) +self._activity_icon.set_zooming_properties(style.SMALL_ICON_SIZE, + style.XLARGE_ICON_SIZE, 10) +self._activity_icon.set_pulsing(True) +self._activity_icon.show() +canvas.pack_start(self._activity_icon) footer = gtk.VBox(spacing=style.DEFAULT_SPACING) footer.set_size_request(-1, bar_size) @@ -78,11 +78,16 @@ class LaunchWindow(gtk.Window): screen = gtk.gdk.screen_get_default() screen.connect('size-changed', self.__size_changed_cb) +self._home = shell.get_model() +self._home.connect('active-activity-changed', + self.__active_activity_changed_cb) + +self.connect('destroy', self.__destroy_cb) + self._update_size() def show(self): self.present() -self._box.zoom_in() def _update_size(self): self.resize(gtk.gdk.screen_width(), gtk.gdk.screen_height()) @@ -95,65 +100,15 @@ class LaunchWindow(gtk.Window): def __size_changed_cb(self, screen): self._update_size() - -class LaunchBox(hippo.CanvasBox): - -def __init__(self, activity_id, icon_path, icon_color): -gobject.GObject.__init__(self, orientation=hippo.ORIENTATION_VERTICAL) - -self._activity_id = activity_id -self._activity_icon = CanvasPulsingIcon( -file_name=icon_path, -pulse_color=icon_color, -background_color=style.COLOR_WHITE.get_gdk_color()) -self.append(self._activity_icon, hippo.PACK_EXPAND) - -# FIXME support non-xo colors in CanvasPulsingIcon -self._activity_icon.props.base_color = \ -XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(), - style.COLOR_TRANSPARENT.get_svg())) - -self._animator = animator.Animator(1.0) - -self._home = shell.get_model() -self._home.connect('active-activity-changed', - self.__active_activity_changed_cb) - -self.connect('destroy', self.__destroy_cb) - -def __destroy_cb(self, box): -self._activity_icon.props.pulsing = False -self._home.disconnect_by_func(self.__active_activity_changed_cb) - -def zoom_in(self): -self._activity_icon.props.size = style.STANDARD_ICON_SIZE - -self._animator.remove_all() -self._animator.add(_Animation(self._activity_icon, - style.STANDARD_ICON_SIZE, - style.XLARGE_ICON_SIZE)) -self._animator.start() -self._activity_icon.props.pulsing = True - def __active_activity_changed_cb(self, model, activity): if activity.get_activity_id() == self._activity_id: self._activity_icon.props.paused = False else: self._activity_icon.props.paused = True - -class _Animation(animator.Animation): - -def __init__(self, icon, start_size, end_size): -animator.Animation.__init__(self, 0.0, 1.0) - -self._icon = icon -self.start_size = start_size -self.end_size = end_size - -def next_frame(self, current): -d = (self.end_size -
Re: [Sugar-devel] [PATCH v4 sugar] Time out on registration process to prevent indefinite UI hang (SL#2289)
On 09/20/2010 10:45 AM, Dipankar Patro wrote: Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- Hi Dipankar, I lately see this error [1] when trying to connect to a schoolserver. Maybe you (or someone else) have an idea what the issue is. If I do construct the ServerProxy without the _TimeoutTransport the registration will continue. Regards, Simon [1] http://dev.laptop.org/ticket/10776 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Hablar Con Sara-23
Activity Homepage: http://activities.sugarlabs.org/addon/4038 Sugar Platform: 0.82 - 0.92 Download Now: http://activities.sugarlabs.org/downloads/file/27294/speak-23.xo Release notes: installing as speak.activity not as hablarconsara.activity as default Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH v4 sugar] Time out on registration process to prevent indefinite UI hang (SL#2289)
Hi Simon, When I was working on the issue, I was using an emulator on Ubuntu to run Sugar (USR). Is the problem occurring on a XO? The only reason to use the TimeoutTransport here is to add a timeout with registration server connection process, which was not there before. The problem seems to be related to library 'httplib'. Let me check out on that. Regards, Dipankar On Thu, Mar 24, 2011 at 1:35 AM, Simon Schampijer si...@schampijer.dewrote: On 09/20/2010 10:45 AM, Dipankar Patro wrote: Registration with the school server is currently done synchronously. To prevent the UI from hanging indefinitely, if the school server is reachable but unresponsive, we add an explicit timeout. --- Hi Dipankar, I lately see this error [1] when trying to connect to a schoolserver. Maybe you (or someone else) have an idea what the issue is. If I do construct the ServerProxy without the _TimeoutTransport the registration will continue. Regards, Simon [1] http://dev.laptop.org/ticket/10776 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel