[Sugar-devel] [ASLO] Release TurtleBots-14
Activity Homepage: http://activities.sugarlabs.org/addon/4434 Sugar Platform: 0.84 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/28172/turtlebots-14.xo Release notes: - Fix two equal sensors in contigous port - Refresh the palette when battery changes too - Update translation - Fix chotox code - Simplify battery colors: grey, orange and red - Fix locale problem when use in Gnome - Fix colored blocks at start 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] [ASLO] Release Graph Plotter-3
Activity Homepage: http://activities.sugarlabs.org/addon/4591 Sugar Platform: 0.86 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/28171/graph_plotter-3.xo Release notes: Fix mouse drag-scroll bug into the graph area. Add key accelerators. Update ES translated name. 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] [sugar PATCH] sl#3326: Do not attach any signals to the dangling-connection-object after it has called the "__connection_ready_cb" callback.
On Wed, Jul 25, 2012 at 2:52 PM, Ajay Garg wrote: > Thanks to Jerry Vonau, for inspiring and guiding me to solve this :-) Thanks for working on this! > src/jarabe/model/neighborhood.py | 19 +++ > 1 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/src/jarabe/model/neighborhood.py > b/src/jarabe/model/neighborhood.py > index 39f648e..5692ca9 100644 > --- a/src/jarabe/model/neighborhood.py > +++ b/src/jarabe/model/neighborhood.py > @@ -260,6 +260,25 @@ class _Account(gobject.GObject): > > ready_handler=self.__connection_ready_cb) > > def __connection_ready_cb(self, connection): > +# http://bugs.sugarlabs.org/ticket/3326 > +# > +# Daniel Drake has given a comprehensive description of the > +# issue. So the fix is that, when the > +# dangling-connection-object calls the "__connection_ready_cb", > +# check to see if it is the same as the referenced > +# "self._connection" object. If not, simply return; this would > +# have the following consequences :: > +# > +# (i) > +# not connect any more signals to the > +# dangling-connection-object. > +# > +# (ii) > +# the dangling-connection-object would finally be > +# garbage-collected. > +if connection != self._connection: > +return > + This probably works, but its a workaround rather than a fix. (Also, I'm doubtful that it would be garbage collected at this point. Have you verified this?) The core of the problem is that two Connection objects are created to track a single telepathy connection. A patch that addresses this would correctly solve the problem. Have you considered the approach I suggested on the ticket? Thanks Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar PATCH] sl#3326: Do not attach any signals to the dangling-connection-object after it has called the "__connection_ready_cb" callback.
Thanks to Jerry Vonau, for inspiring and guiding me to solve this :-) src/jarabe/model/neighborhood.py | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py index 39f648e..5692ca9 100644 --- a/src/jarabe/model/neighborhood.py +++ b/src/jarabe/model/neighborhood.py @@ -260,6 +260,25 @@ class _Account(gobject.GObject): ready_handler=self.__connection_ready_cb) def __connection_ready_cb(self, connection): +# http://bugs.sugarlabs.org/ticket/3326 +# +# Daniel Drake has given a comprehensive description of the +# issue. So the fix is that, when the +# dangling-connection-object calls the "__connection_ready_cb", +# check to see if it is the same as the referenced +# "self._connection" object. If not, simply return; this would +# have the following consequences :: +# +# (i) +# not connect any more signals to the +# dangling-connection-object. +# +# (ii) +# the dangling-connection-object would finally be +# garbage-collected. +if connection != self._connection: +return + logging.debug('_Account.__connection_ready_cb %r', connection.object_path) connection.connect_to_signal('StatusChanged', -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] What is the difference between 'buddy-joined' and 'buddy-joined-activity' signals, with-respect-to activity-collaboration ?
On Wed, 2012-07-25 at 23:39 +0530, Ajay Garg wrote: > I would actually want to add the 'joined' signal too, in my list of > queries. > So, I am now confused, as to what is the difference between :: > > I'm getting into the telepathy code also. > "buddy-joined" I believe that to mean other XO's joining the channel for the NV (Neighbourhood View) > "buddy-joined-activity" I believe that to be a shared activities has been added to NV by another XO > "joined" > That would be the XO that the log is on. ping me on irc, Jerry > > Regards, > Ajay > > > On Wed, Jul 25, 2012 at 4:05 PM, Ajay Garg > wrote: > Hi all. > > Under what circumstances, is the "buddy-joined" signal used; > and in what circumstances is the "buddy-joined-activity" > signal used? > I ask this, because a simple "grep" on the > activities-code-directories, lists these two signals, which > hint at the processing required for > buddies-joining-activities. > > Just a simple explanation of the difference between the two > signals will do; comprehending code will then be a lot > easier :P > > > Thanks and Regards, > Ajay > > ___ > Devel mailing list > de...@lists.laptop.org > http://lists.laptop.org/listinfo/devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] What is the difference between 'buddy-joined' and 'buddy-joined-activity' signals, with-respect-to activity-collaboration ?
I would actually want to add the 'joined' signal too, in my list of queries. So, I am now confused, as to what is the difference between :: "buddy-joined" "buddy-joined-activity" "joined" Regards, Ajay On Wed, Jul 25, 2012 at 4:05 PM, Ajay Garg wrote: > Hi all. > > Under what circumstances, is the "buddy-joined" signal used; and in what > circumstances is the "buddy-joined-activity" signal used? > I ask this, because a simple "grep" on the activities-code-directories, > lists these two signals, which hint at the processing required for > buddies-joining-activities. > > Just a simple explanation of the difference between the two signals will > do; comprehending code will then be a lot easier :P > > > Thanks and Regards, > Ajay > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [DESIGN] Proposal: Lease expiry information display in My Settings -> About My Computer
On Wed, Jul 18, 2012 at 12:07 PM, Anish Mangal wrote: > I would like to propose a feature for discussion and inclusion in the > 0.98 cycle. > > http://wiki.sugarlabs.org/go/Features/Lease_Information_Display > > This feature is valuable for support staff in deployments which use > OLPC's security system built on the XO laptops, and was specifically > requested by the OLPC deployment in Paraguay. I read the feature page, and I don't really understand the use case or problem that needs to be solved. I'm not convinced that changing sugar is the right answer, especially when this only affects support staff, not regular users. The feature page discusses the case when the lease has expired, but this seems like quite the corner case to me. Assuming that XO laptops are booted and shutdown on a daily basis, this bit of information would only be shown when the following happens: - The XO is booted in the morning - The lease expires shortly after boot - A support staff member happens to pick up that laptop that same day, before the laptop gets shut down, and opens "About my computer" Any member of support staff that deals with leases is going to need to be a little bit familiar with the lease.sig format and location. So running "cat /security/lease.sig" at the terminal can show the same information - its a little bit technical, but again, familiarity is required for this role anyway. For the rare occasions when leases need to be checked, running this command at a terminal suffices here in Nicaragua at least. It is harder to read the expiry of a sig02 lease from catting the file, but as far as I know those aren't used in Paraguay. If the format is too difficult then perhaps a command line tool in bitfrost would be a better solution. >From a technical perspective, the implementation would need to either be quite hacky (parsing lease.sig directly) or use bitfrost. Using bitfrost libraries would be OK but the feature page should note that this now becomes a dependency of sugar. Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v2 Log] Port to Gtk3 SL #3761
Convert all the gtk2 and sugar-toolkit code to launch this Activity using Gtk3. * Searching on the log file is not working due to this bug: https://bugzilla.gnome.org/show_bug.cgi?id=680597 All these steps are documented here: * http://wiki.sugarlabs.org/go/Features/GTK3/Porting/Log Signed-off-by: Manuel Kaufmann --- logviewer.py | 163 -- setup.py |2 +- 2 files changed, 92 insertions(+), 73 deletions(-) diff --git a/logviewer.py b/logviewer.py index 71ab5c1..02cf25b 100644 --- a/logviewer.py +++ b/logviewer.py @@ -22,23 +22,24 @@ from gettext import gettext as _ import re -import gtk -import pango -import gobject -import gio - -from sugar.activity import activity -from sugar.activity.widgets import ActivityToolbarButton -from sugar import env -from sugar.graphics import iconentry -from sugar.graphics.toolbutton import ToolButton -from sugar.graphics.toggletoolbutton import ToggleToolButton -from sugar.graphics.palette import Palette -from sugar.graphics.alert import NotifyAlert +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import Pango +from gi.repository import GObject +from gi.repository import Gio + +from sugar3.activity import activity +from sugar3.activity.widgets import ActivityToolbarButton +from sugar3 import env +from sugar3.graphics import iconentry +from sugar3.graphics.toolbutton import ToolButton +from sugar3.graphics.toggletoolbutton import ToggleToolButton +from sugar3.graphics.palette import Palette +from sugar3.graphics.alert import NotifyAlert from logcollect import LogCollect -from sugar.graphics.toolbarbox import ToolbarBox -from sugar.activity.widgets import CopyButton, StopButton -from sugar.datastore import datastore +from sugar3.graphics.toolbarbox import ToolbarBox +from sugar3.activity.widgets import CopyButton, StopButton +from sugar3.datastore import datastore _AUTOSEARCH_TIMEOUT = 1000 @@ -49,10 +50,10 @@ def _notify_response_cb(notify, response, activity): activity.remove_alert(notify) -class MultiLogView(gtk.HPaned): +class MultiLogView(Gtk.HPaned): def __init__(self, paths, extra_files): -gtk.HPaned.__init__(self) +GObject.GObject.__init__(self) self.paths = paths self.extra_files = extra_files @@ -73,20 +74,21 @@ class MultiLogView(gtk.HPaned): self._find_logs() def _build_treeview(self): -self._treeview = gtk.TreeView() +self._treeview = Gtk.TreeView() self._treeview.set_rules_hint(True) self._treeview.connect('cursor-changed', self._cursor_changed_cb) -self._treemodel = gtk.TreeStore(gobject.TYPE_STRING) +self._treemodel = Gtk.TreeStore(GObject.TYPE_STRING) -sorted = gtk.TreeModelSort(self._treemodel) -sorted.set_sort_column_id(0, gtk.SORT_ASCENDING) +# README: https://bugzilla.gnome.org/show_bug.cgi?id=680009 +sorted = self._treemodel.sort_new_with_model() +sorted.set_sort_column_id(0, Gtk.SortType.ASCENDING) sorted.set_sort_func(0, self._sort_logfile) self._treeview.set_model(sorted) -renderer = gtk.CellRendererText() -col = gtk.TreeViewColumn(_('Log Files'), renderer, text=0) +renderer = Gtk.CellRendererText() +col = Gtk.TreeViewColumn(_('Log Files'), renderer, text=0) self._treeview.append_column(col) self.path_iter = {} @@ -96,40 +98,40 @@ class MultiLogView(gtk.HPaned): if len(self.extra_files): self.extra_iter = self._treemodel.append(None, [_('Other')]) -scroll = gtk.ScrolledWindow() -scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) +scroll = Gtk.ScrolledWindow() +scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) scroll.add(self._treeview) -scroll.set_size_request(gtk.gdk.screen_width() * 30 / 100, -1) +scroll.set_size_request(Gdk.Screen.width() * 30 / 100, -1) self.add1(scroll) def _build_textview(self): -self._textview = gtk.TextView() -self._textview.set_wrap_mode(gtk.WRAP_NONE) +self._textview = Gtk.TextView() +self._textview.set_wrap_mode(Gtk.WrapMode.NONE) -pangoFont = pango.FontDescription('Mono') +pangoFont = Pango.FontDescription('Mono') self._textview.modify_font(pangoFont) -bgcolor = gtk.gdk.color_parse('#FF') -self._textview.modify_base(gtk.STATE_NORMAL, bgcolor) +bgcolor = Gdk.color_parse('#FF') +self._textview.modify_base(Gtk.StateType.NORMAL, bgcolor) self._textview.set_editable(False) -self._tagtable = gtk.TextTagTable() -hilite_tag = gtk.TextTag('search-hilite') +self._tagtable = Gtk.TextTagTable() +hilite_tag = Gtk.TextTag.new('search-hilite') hilite_tag.props.background = '#B0' self._tagtable.add
[Sugar-devel] [ASLO] Release Bulletin Board-2
Activity Homepage: http://activities.sugarlabs.org/addon/4588 Sugar Platform: 0.82 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/28158/bulletin_board-2.xo Release notes: 2 BUG FIX: * Fix problem with setting colors when no items are starred in the Journal 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 v2 Get Books] Drop libxml2 SL #3419
This module dependency is replaced by ElementTree from the Python's Standard Library Signed-off-by: Manuel Kaufmann --- GetIABooksActivity.py |1 - languagenames.py | 33 + 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/GetIABooksActivity.py b/GetIABooksActivity.py index f7943c9..3fb36b7 100644 --- a/GetIABooksActivity.py +++ b/GetIABooksActivity.py @@ -595,7 +595,6 @@ class GetIABooksActivity(activity.Activity): self.bt_catalogs.set_active(True) def can_close(self): -self._lang_code_handler.close() if self.queryresults is not None: self.queryresults.cancel() self.queryresults = None diff --git a/languagenames.py b/languagenames.py index 644af8f..06423c6 100644 --- a/languagenames.py +++ b/languagenames.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import libxml2 +from xml.etree import ElementTree import logging _ISO_639_XML_PATH = '/usr/share/xml/iso-codes/iso_639.xml' @@ -33,35 +33,20 @@ def singleton(object, instantiated=[]): class LanguageNames(object): def __init__(self): singleton(self) -try: -self._xmldoc = libxml2.parseFile(_ISO_639_XML_PATH) -self._cache = None -except libxml2.parserError: -self._xmldoc = None -return - -self._eroot = self._xmldoc.getRootElement() - -def close(self): -if self._xmldoc is not None: -self._xmldoc.freeDoc() +self._cache = None def get_full_language_name(self, code): if self._cache == None: self._cache = {} -for child in self._eroot.children: -if child.properties is not None: -lang_code = None -lang_name = None -for property in child.properties: -if property.get_name() == 'name': -lang_name = property.get_content() -elif property.get_name() == 'iso_639_1_code': -lang_code = property.get_content() +_xmldoc = ElementTree.parse(_ISO_639_XML_PATH) +_eroot = _xmldoc.getroot() + +for child in _eroot.getchildren(): +if child.attrib is not None: +lang_name = child.attrib.get('name', None) +lang_code = child.attrib.get('iso_639_1_code', None) if lang_code is not None and lang_name is not None: self._cache[lang_code] = lang_name -self._xmldoc.freeDoc() -self._xmldoc = None return self._cache[code] -- 1.7.10.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] What is the difference between 'buddy-joined' and 'buddy-joined-activity' signals, with-respect-to activity-collaboration ?
Hi all. Under what circumstances, is the "buddy-joined" signal used; and in what circumstances is the "buddy-joined-activity" signal used? I ask this, because a simple "grep" on the activities-code-directories, lists these two signals, which hint at the processing required for buddies-joining-activities. Just a simple explanation of the difference between the two signals will do; comprehending code will then be a lot easier :P Thanks and Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel