Re: [Sugar-devel] Getting Journal entries off an XO at the end of a project?
Excerpts from Christoph Derndorfer's message of 2012-01-13 20:29:34 +0100: [Backup activity] Make a backup of the Journal entries... The process is make an .tar.gz of all entries and save in a folder into an usb: /backup/SN## (SN#... is the serial of the XO) Slight correction: JEBs ([1], the same format the XS uses) are zip files, not tar.gz files. The file name includes the user name (as used in Sugar), so it should be easy to figure out who each backup belongs to. PD: in ourt Uruguayan image.. Dextrosa.. The backup/restore are functions that appears in the Journal.. I think that is the same script that this activities had.. Nop, the format used by the Dextrose backup / restore feature is completely different. It tars up the on-disk data structures of sugar-datastore and dumps them to the same place, removing a special file to trigger reindexing. This happens to work for current versions of sugar-datastore, but is a bad idea in general. It wouldn't have worked with sugar-datastore 0.84 and doesn't work with gdatastore [2]. thanks for your suggestion. I had looked into the Backup Activity but according to the description on ASLO it only works with the data store from Sugar 0.84 onwards and these machines are still running on build 767 which shipped with Sugar 0.82 (though I hope to *finally* upgrade them to 11.3.0 next month). I found and fixed the source of your confusion. Seems I forgot to update the description after adding support for 0.82; sorry for that. While I have been rigorous in testing Backup and Restore with all combinations of a range of Sugar versions from 0.82 to 0.89 (0.90), the oldest OLPC OS build I have running is 801, so I'd recommend testing Backup with OLPC OS build 767 first before relying on it. If you do test it on 767, please let me know the results so I can mention them on a.sl.o. Doing a full backup is a good idea regardless of any cherry-picking you do. It allows you to go back and extract additional objects that you (or the kids) forgot during the first run. Sascha [1] http://wiki.laptop.org/go/Journal_entry_bundles [2] https://git.sugarlabs.org/gdatastore -- 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] Getting Journal entries off an XO at the end of a project?
On Tue, Jan 17, 2012 at 11:49 AM, Sascha Silbe si...@activitycentral.comwrote: Excerpts from Christoph Derndorfer's message of 2012-01-13 20:29:34 +0100: [Backup activity] Make a backup of the Journal entries... The process is make an .tar.gz of all entries and save in a folder into an usb: /backup/SN## (SN#... is the serial of the XO) Slight correction: JEBs ([1], the same format the XS uses) are zip files, not tar.gz files. The file name includes the user name (as used in Sugar), so it should be easy to figure out who each backup belongs to. That point about the file name including the user name is good to know. :-) PD: in ourt Uruguayan image.. Dextrosa.. The backup/restore are functions that appears in the Journal.. I think that is the same script that this activities had.. Nop, the format used by the Dextrose backup / restore feature is completely different. It tars up the on-disk data structures of sugar-datastore and dumps them to the same place, removing a special file to trigger reindexing. This happens to work for current versions of sugar-datastore, but is a bad idea in general. It wouldn't have worked with sugar-datastore 0.84 and doesn't work with gdatastore [2]. thanks for your suggestion. I had looked into the Backup Activity but according to the description on ASLO it only works with the data store from Sugar 0.84 onwards and these machines are still running on build 767 which shipped with Sugar 0.82 (though I hope to *finally* upgrade them to 11.3.0 next month). I found and fixed the source of your confusion. Seems I forgot to update the description after adding support for 0.82; sorry for that. While I have been rigorous in testing Backup and Restore with all combinations of a range of Sugar versions from 0.82 to 0.89 (0.90), the oldest OLPC OS build I have running is 801, so I'd recommend testing Backup with OLPC OS build 767 first before relying on it. If you do test it on 767, please let me know the results so I can mention them on a.sl.o. This is excellent information. I'll definitely keep you posted with my findings once I have some time to test things in late January / early April. :-) Doing a full backup is a good idea regardless of any cherry-picking you do. It allows you to go back and extract additional objects that you (or the kids) forgot during the first run. Yeah, good point! Thanks, Christoph Sascha [1] http://wiki.laptop.org/go/Journal_entry_bundles [2] https://git.sugarlabs.org/gdatastore -- http://sascha.silbe.org/ http://www.infra-silbe.de/ -- Christoph Derndorfer volunteer, OLPC (Austria) [www.olpc.at] editor, OLPC News [www.olpcnews.com] contributor, TechnikBasteln [www.technikbasteln.net] e-mail: christ...@derndorfer.eu ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Getting Journal entries off an XO at the end of a project?
Excerpts from Christoph Derndorfer's message of 2012-01-13 19:56:51 +0100: (a) Have the pupils copy relevant files they want to keep to USB drives via the Journal or the Sugar commander Activity (b) Ask them to favorite things they want to keep in the Journal and then run a script that copies all of these entries to a USB drive or possibly even a network share Given that you're still running Sugar 0.82, one of these is probably the best option (in addition to doing a full backup, as explained in my previous mail). Whether the data file is usable outside of Sugar (i.e. in a standard format) depends on each activity. Writing a script that dumps all data files of starred entries is pretty straightforward if you borrow some functions from jarabe.journal.model (= GPLv2+). You _will_ loose the metadata (description, tags, etc.) in any case: Even when using the UI to write the files, the metadata isn't in a format recognised by any other system. The script would look something like this: === snip === #!/usr/bin/env python # License: GPL version 3 import os import shutil from sugar import mime from sugar.datastore import datastore [copy get_file_name() and get_unique_file_name() from src/jarabe/journal/model.py] mount_point = '/media/CHERRY_TREE' for entry in datastore.find({'keep': '1'})[0]: title = entry.metadata.get('title') or 'Untitled' mime_type = entry.metadata.get('mime_type') target_name = get_unique_file_name(mount_point, get_file_name(title, mime_type)) target_path = os.path.join(mount_point, target_name) shutil.copyfile(entry.file_path, target_path) entry.destroy() === snip === Untested on Sugar 0.82. Backup/Restore access the data store directly via D-Bus rather than through sugar.datastore.datastore, so I don't know if the API changed in subtle ways; a quick check confirmed that all of the functions imported (not copied) above were available in Sugar 0.82.0. 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] Use empy from the distribution
Excerpts from Simon Schampijer's message of 2011-12-22 14:03:41 +0100: empy [1] has been packaged for distributions by now (see Fedora package name python-empy [2] or Debian package name python-empy [3]). Drop the local copy and add empy as a dependency. Thanks for the patch. Please reference SL#2454 [4] in the summary and mention the module name (sugar-artwoork) in the subject prefix. [gtk/theme/Makefile.am] @@ -1,9 +1,9 @@ sugar-72.gtkrc: gtkrc.em -$(srcdir)/em.py -p $$ -D scaling=\'72\' $(srcdir)/gtkrc.em \ +python $(pythondir)/em.py -p $$ -D scaling=\'72\' $(srcdir)/gtkrc.em \ $(top_builddir)/gtk/theme/sugar-72.gtkrc The above only works if empy is installed in the Python distribution. If we use python -m em instead, it will work as long as empy is installed anywhere in $PYTHONPATH. Sascha [4] https://bugs.sugarlabs.org/ticket/2454 -- 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] Add Write to Journal button to standard activity toolbar
On 12/01/12 18:27, Walter Bender wrote: From: Walter Benderwalter.ben...@gmail.com This patch adds a new button to the standard activity toolbar (between the activity title and the sharing button). The button involes a palette that contains a textview widget that lets the user make changes to metadata['description']. Additional dependencies introduced by this patch include a new icon, write-journal.svg, and the introduction of a new string for translation, _('Reflections'). Details regarding this patch can be found at [1]. Note that while this patch is independent of the Naming Alert, it makes that alert largely obsolete. [1] http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime --- src/sugar/activity/widgets.py | 60 + 1 files changed, 60 insertions(+), 0 deletions(-) Walter, this patch is against the gtk2 toolkit? Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [FEATURES][DESIGN] Network proxy configuration
On 21/11/11 21:27, Anish Mangal wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'd like to propose Network proxy configuration in Sugar http://wiki.sugarlabs.org/go/Features/Proxy_configuration - -- Anish Mangal Hi Anish, there have been discussions [1] on how this Feature works when used with the existing proxy configurations already used in the field. Can you bring some light into that? Regards, Simon [1] http://meeting.sugarlabs.org/sugar-meeting/meetings/2011-11-22T14:57:04#i_2705608 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [MINUTES] Development team meeting --- 17. Jan 2012 (15:00 UTC)
Hi, for those that could not attend, here the logs: Minutes: http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-01-17T15:03:37.html Log: http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-01-17T15:03:37 Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Chat] Enable palette over urls
Double click over a link is not a common usage. This was the previous behavior? Gonzalo Though, found another minor issue: double click (immediate and the one after getting primary palette) doesn't show secondary palette at once. -- Aleksey -- Gonzalo Odiard SugarLabs Argentina ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Chat] Enable palette over urls
On Tue, Jan 17, 2012 at 03:39:07PM -0300, Gonzalo Odiard wrote: Double click over a link is not a common usage. oops, sorry. I mean right click. This was the previous behavior? Gonzalo Though, found another minor issue: double click (immediate and the one after getting primary palette) doesn't show secondary palette at once. -- Aleksey -- Gonzalo Odiard SugarLabs Argentina -- Aleksey ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Getting Journal entries off an XO at the end of a project?
The issue i see here is backing up work so its accesible to all oses not just linux. Its definetly a fair point as most current edu projects are iOS based,sadly... but such is the state of the world. Guess well have to wait for android to make the visible change. On Jan 17, 2012 12:39 PM, Sascha Silbe si...@activitycentral.com wrote: Excerpts from Christoph Derndorfer's message of 2012-01-13 19:56:51 +0100: (a) Have the pupils copy relevant files they want to keep to USB drives via the Journal or the Sugar commander Activity (b) Ask them to favorite things they want to keep in the Journal and then run a script that copies all of these entries to a USB drive or possibly even a network share Given that you're still running Sugar 0.82, one of these is probably the best option (in addition to doing a full backup, as explained in my previous mail). Whether the data file is usable outside of Sugar (i.e. in a standard format) depends on each activity. Writing a script that dumps all data files of starred entries is pretty straightforward if you borrow some functions from jarabe.journal.model (= GPLv2+). You _will_ loose the metadata (description, tags, etc.) in any case: Even when using the UI to write the files, the metadata isn't in a format recognised by any other system. The script would look something like this: === snip === #!/usr/bin/env python # License: GPL version 3 import os import shutil from sugar import mime from sugar.datastore import datastore [copy get_file_name() and get_unique_file_name() from src/jarabe/journal/model.py] mount_point = '/media/CHERRY_TREE' for entry in datastore.find({'keep': '1'})[0]: title = entry.metadata.get('title') or 'Untitled' mime_type = entry.metadata.get('mime_type') target_name = get_unique_file_name(mount_point, get_file_name(title, mime_type)) target_path = os.path.join(mount_point, target_name) shutil.copyfile(entry.file_path, target_path) entry.destroy() === snip === Untested on Sugar 0.82. Backup/Restore access the data store directly via D-Bus rather than through sugar.datastore.datastore, so I don't know if the API changed in subtle ways; a quick check confirmed that all of the functions imported (not copied) above were available in Sugar 0.82.0. 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
Re: [Sugar-devel] Result of test activities on Sugar 0.94.1
On 15 Jan 2012, at 04:33, Alan Jhonn Aguiar Schwyn alan...@hotmail.com wrote: I have checked all my 31 published activities (there are 6 more undergoing final testing at the moment): on an XO 1 with 0.94.1 No problems. Have marked with a green rectangle on the spreadsheet as requested. Great! Now, the problem is update the SugarLabs page.. For now, the only way is upload new version to select the compatibility with 0.94... If we're talking about activities.sugarlabs.org, the developer (or any ASLO admin) can log in and edit the metadata for an already uploaded activity's Sugar compatibility. No need to bump the version and re-upload if there isn't a change to activity code. --Gary But you need change the activity.info with +1 and re-upload it... ___ 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] [PATCH sugar-datastore] Ensure we return valid internal / calculated properties
Excerpts from Simon Schampijer's message of 2012-01-10 14:19:59 +0100: It would be good to add here information what the patch does, that it adds the uid and filesize to the metadata but does not write it to disk etc. How about this additional paragraph: We now determine and fill in the 'filesize' and 'uid' properties in find() and get_properties(), instead of relying on the on-disk copy in .../metadata/{filesize,uid}. [_fill_internal_props()] +file_path = self._file_store.get_file_path(uid) +if os.path.exists(file_path): +stat = os.stat(file_path) +metadata['filesize'] = str(stat.st_size) +else: +metadata['filesize'] = '0' Why do you make the filesize a string here? In all the other cases in the code it is an int e.g.: Because in the other cases we store it on disk afterwards, converting it to a string on the way. (Binary) strings are the only type supported by sugar-datastore = 0.84, everything else gets converted somewhere. 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
[Sugar-devel] [ASLO] Release Maze-15
Activity Homepage: http://activities.sugarlabs.org/addon/4071 Sugar Platform: 0.82 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/27824/maze-15.xo Release notes: *Adds support for touchpad input. By adding this, touchscreen input is also supported. The functionality is to use touchpad gestures instead of pressing the arrow keys. The mouse button must be pressed for the gesture to be interpreted, so jumpy touchpads won't affect play. by John Watlington w...@laptop.org 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 sugar] Journal detail view: don't choke on invalid 'keep' property
Excerpts from Simon Schampijer's message of 2012-01-10 14:26:46 +0100: There is another place in the code where we retrieve the 'keep' property, I would suggest something like: [...] @@ -419,7 +419,8 @@ class ExpandedEntry(hippo.CanvasBox): self._update_title_sid = None def get_keep(self): -return int(self._metadata.get('keep', 0)) == 1 +# We can not rely on the keep metadata to be int, SL 1591 +return str(self._metadata.get('keep', 0)) == '1' Good catch. I didn't trigger this one because I didn't try marking a corrupted entry as favourite. The breakage isn't as bad either; instead of failing to show the details view, it just won't mark a corrupted entry as favourite (might even be a good thing to do on purpose ;) ). Afaik, this patch is not needed to fix [1]. It doesn't break the entire Journal, but it's triggered by the same corrupted data store. Referencing the real-world case gives useful background; I don't claim to fix the cited ticket. I think it would be better to note [2][3] as tickets it fixes. Interesting, so we even had a patch [4] to fix this already (though it may have been incomplete). Added SL#1591 [2] to the summary. My patch doesn't fix SL#1561 [3] as I haven't done an exhaustive search of all metadata users. While it would be useful, I don't consider it worth the enormous effort. A better approach would be to construct a data store with various variants of bad data. That would be automatically testable, rather than requiring a regular code audit. [1] https://dev.laptop.org/ticket/11372 [2] http://bugs.sugarlabs.org/ticket/1591 [3] http://bugs.sugarlabs.org/ticket/1561 Sascha [4] https://bugs.sugarlabs.org/attachment/ticket/1591/keep.patch -- 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
[Sugar-devel] [PATCH sugar v2] Journal detail view: don't choke on invalid 'keep' property (fixes SL#1591)
Properties of data store entries can get corrupted, e.g. due to low level crashes or running out of battery (see OLPC#11372 [1] for a real-life example). In addition any activity can - accidentally or on purpose - write data store entries with arbitrary metadata. By comparing the 'keep' property as a string we can avoid the ValueError that might happen when trying to convert the property value to an integer. [1] https://dev.laptop.org/ticket/11372 Reported-by: Gary Martin garycmar...@googlemail.com Signed-off-by: Sascha Silbe si...@activitycentral.com --- v1-v2: fix get_keep() as well; mark SL#1591 as fixed src/jarabe/journal/expandedentry.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py index 4e99dc2..20ffe58 100644 --- a/src/jarabe/journal/expandedentry.py +++ b/src/jarabe/journal/expandedentry.py @@ -144,7 +144,7 @@ class ExpandedEntry(hippo.CanvasBox): return self._metadata = metadata -self._keep_icon.keep = (int(metadata.get('keep', 0)) == 1) +self._keep_icon.keep = (str(metadata.get('keep', 0)) == '1') self._icon = self._create_icon() self._icon_box.clear() @@ -419,7 +419,7 @@ class ExpandedEntry(hippo.CanvasBox): self._update_title_sid = None def get_keep(self): -return int(self._metadata.get('keep', 0)) == 1 +return (str(metadata.get('keep', 0)) == '1') def _keep_icon_activated_cb(self, keep_icon): if self.get_keep(): -- 1.7.7.3 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [FEATURE] Global Text to Speech
Hi Gonzalo, thanks for the patch! Here are a few notes: - when you have a text selected and want it to be spoken out a clipboard entry is created (I guess you need to have a look at why the clipboard tray reacts to that selection) I only see this problem with the Write activity, not with Read, Browse or Wikipedia- May be Write is doing anything different with the clipboard? - you specify gconf keys, those would need to be added to the schema as well Added. - when you select a long text for reading there is no way to pause/stop it, might be worth having that option as well It's true. I have added controls to pause/stop in the palette. I have tried with two options (please see http://wiki.sugarlabs.org/go/Talk:Features/Global_Text_To_Speech) One option with menu items and the other with buttons. The option with menu items looks better, but when the item is activated, the palette close, then if you want pause/play more than one time is annoying. The option with buttons is better for usability, because the palette is not closed, but is uglier (the separator does not take all the palette width). Advice is welcomed. The code is commented in the patch then is easy test the two options (SpeechPalette __init__ and _set_buttons_state) I don't know what to do with the hot key. Pause if the user press when a text is being played? - the shortcut is a bit long, maybe 'alt+s' is enough? (see above, maybe there is a shortcut as well for stopping? or hitting it again does stop the current playing one?) Ok, changed. To stop we use Ctrl + q - it would be great to write in the Feature page a bit more about the what the Feature does and what it does not do, after discussing with you the other day: it is available in the Shell+Activities for any text you select, it does not allow you to do activity specific operations like reading a chapter in Read, or a whole book or a wikipedia activity in Browse nor does it is a primary tool for Accessibility (no criticism intended just to note what it does and what not) Formal: - there are a few items that do not need to be public e.g. 'self.pipeline' in 'AudioGrabGst' I have changed them. Now I have two variables is_playing, is paused visible from outside, then added properties to access them readonly. - the copyright in the files is a bit all over the place Ok. Changed. Thanks by the review, the patch is sent to sugar-devel. Regards, Simon __**_ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.**org Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/**listinfo/sugar-develhttp://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [Sugar] Implement text to speech in Sugar feature - v2
From: Gonzalo Odiard godi...@gmail.com Added controls to pause/stop and addressed suggestions in the review process. --- data/sugar.schemas.in | 28 extensions/deviceicon/Makefile.am |1 + extensions/deviceicon/speech.py | 204 extensions/globalkey/Makefile.am |1 + extensions/globalkey/speech.py| 24 src/jarabe/model/Makefile.am |1 + src/jarabe/model/speech.py| 266 + src/jarabe/view/keyhandler.py | 29 + 8 files changed, 526 insertions(+), 28 deletions(-) create mode 100644 extensions/deviceicon/speech.py create mode 100644 extensions/globalkey/speech.py create mode 100644 src/jarabe/model/speech.py diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in index 8b3e1ad..66d3391 100644 --- a/data/sugar.schemas.in +++ b/data/sugar.schemas.in @@ -368,5 +368,33 @@ /locale /schema +schema + key/schemas/desktop/sugar/speech/pitch/key + applyto/desktop/sugar/speech/pitch/applyto + ownersugar/owner + typeint/type + default50/default + locale name=C +shortDefault pitch to the speech sugar service/short +longPitch value used by the speech service in Sugar, +can be changed by the user, with controls in a icon +in the frame/long + /locale +/schema + +schema + key/schemas/desktop/sugar/speech/rate/key + applyto/desktop/sugar/speech/rate/applyto + ownersugar/owner + typeint/type + default170/default + locale name=C +shortDefault rate to the speech sugar service/short +longRate value used by the speech service in Sugar, +can be changed by the user, with controls in a icon +in the frame/long + /locale +/schema + /schemalist /gconfschemafile diff --git a/extensions/deviceicon/Makefile.am b/extensions/deviceicon/Makefile.am index 118d866..7ed1f77 100644 --- a/extensions/deviceicon/Makefile.am +++ b/extensions/deviceicon/Makefile.am @@ -5,5 +5,6 @@ sugar_PYTHON = \ battery.py \ network.py \ speaker.py \ + speech.py \ touchpad.py \ volume.py diff --git a/extensions/deviceicon/speech.py b/extensions/deviceicon/speech.py new file mode 100644 index 000..4528e98 --- /dev/null +++ b/extensions/deviceicon/speech.py @@ -0,0 +1,204 @@ +# Copyright (C) 2011 One Laptop Per Child +# Copyright (C) 2011 Gonzalo Odiard +# +# 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 gconf + +import glib +import gtk + +from sugar.graphics.icon import Icon +from sugar.graphics.menuitem import MenuItem +from sugar.graphics.tray import TrayIcon +from sugar.graphics.palette import Palette +from sugar.graphics.xocolor import XoColor +from sugar.graphics.toolbutton import ToolButton + +from jarabe.frame.frameinvoker import FrameWidgetInvoker +from jarabe.model import speech + + +_ICON_NAME = 'microphone' + + +class SpeechDeviceView(TrayIcon): + +FRAME_POSITION_RELATIVE = 105 + +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.set_palette_invoker(FrameWidgetInvoker(self)) + +self._manager = speech.get_speech_manager() + +self.connect('expose-event', self.__expose_event_cb) + +self._icon_widget.connect('button-release-event', + self.__button_release_event_cb) + +def create_palette(self): +label = glib.markup_escape_text(_('Speech')) +palette = SpeechPalette(label, manager=self._manager) +palette.set_group_id('frame') +return palette + +def __button_release_event_cb(self, widget, event): +if event.button != 1: +return False + +self.palette_invoker.notify_right_click() +return True + +def __expose_event_cb(self, *args): +self._update_info() + + +class SpeechPalette(Palette): + +def __init__(self, primary_text, manager): +Palette.__init__(self, label=primary_text) + + + +self._manager = manager +
Re: [Sugar-devel] [FEATURES][DESIGN] Network proxy configuration
On Tue, 2012-01-17 at 16:52 +0100, Simon Schampijer wrote: On 21/11/11 21:27, Anish Mangal wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'd like to propose Network proxy configuration in Sugar http://wiki.sugarlabs.org/go/Features/Proxy_configuration - -- Anish Mangal Hi Anish, there have been discussions [1] on how this Feature works when used with the existing proxy configurations already used in the field. Can you bring some light into that? Regards, Simon I'm a little confused by the question, this sugar-UI tool stores it's settings in the same gconf keys that gnome-network-properties uses, that is all. You still need to have $http_proxy set for sugar's environment and is solved by reading the gconf key then exporting the variable in sugar-session. Jerry ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release ClassRoomBroadcast-6
Activity Homepage: http://activities.sugarlabs.org/addon/4507 Sugar Platform: 0.82 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/27825/classroombroadcast-6.xo Release notes: * Enabling share features on toolbar. 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] Result of test activities on Sugar 0.94.1
At 06:06 AM 18/01/2012, Gary Martin wrote: On 15 Jan 2012, at 04:33, Alan Jhonn Aguiar Schwyn mailto:alan...@hotmail.comalan...@hotmail.com wrote: I have checked all my 31 published activities (there are 6 more undergoing final testing at the moment): on an XO 1 with 0.94.1 No problems. Have marked with a green rectangle on the spreadsheet as requested. Great! Now, the problem is update the SugarLabs page.. For now, the only way is upload new version to select the compatibility with 0.94... If we're talking about http://activities.sugarlabs.orgactivities.sugarlabs.org, the developer (or any ASLO admin) can log in and edit the metadata for an already uploaded activity's Sugar compatibility. No need to bump the version and re-upload if there isn't a change to activity code. --Gary I checked every area on my Activity Developer Hub and could not find a place to make this alteration. But I stress that even if I did, this is a rather tedious process to have to go through every time a new version of Sugar is released. I've submitted an enhancement request that a global facility be made available. Peter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add Write to Journal button to standard activity toolbar
On Tue, Jan 17, 2012 at 9:54 AM, Simon Schampijer si...@schampijer.de wrote: On 12/01/12 18:27, Walter Bender wrote: From: Walter Benderwalter.ben...@gmail.com This patch adds a new button to the standard activity toolbar (between the activity title and the sharing button). The button involes a palette that contains a textview widget that lets the user make changes to metadata['description']. Additional dependencies introduced by this patch include a new icon, write-journal.svg, and the introduction of a new string for translation, _('Reflections'). Details regarding this patch can be found at [1]. Note that while this patch is independent of the Naming Alert, it makes that alert largely obsolete. [1] http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime --- src/sugar/activity/widgets.py | 60 + 1 files changed, 60 insertions(+), 0 deletions(-) Walter, this patch is against the gtk2 toolkit? Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel It was against mainline (I suppose that is gtk-2). I suppose I need to make a gtk-3 version :P -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Result of test activities on Sugar 0.94.1
I checked every area on my Activity Developer Hub and could not find a place to make this alteration. But I stress that even if I did, this is a rather tedious process to have to go through every time a new version of Sugar is released. I've submitted an enhancement request that a global facility be made available. After some years.. I find it!!! Go to an activity.. select 'Edit Add-on'... In the left of the page, go to Versions and files... Click in the version of you want to change... And down to Compatible applications.. And change the version... Regards! Alan ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Result of test activities on Sugar 0.94.1
On Wed, Jan 18, 2012 at 04:45:41AM +, Alan Jhonn Aguiar Schwyn wrote: After some years.. I find it!!! Go to an activity.. select 'Edit Add-on'... In the left of the page, go to Versions and files... Click in the version of you want to change... And down to Compatible applications.. And change the version... Ah, so complex. No wonder it isn't maintained. I'd prefer a compatibility field in the activity.info file that is parsed. ;-) -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Result of test activities on Sugar 0.94.1
Ah, so complex. No wonder it isn't maintained. I'd prefer a compatibility field in the activity.info file that is parsed. ;-) Another field? Only to evite make manual modifications of the versions? No... Sugar would check the versions with the Sugar version that run.. but, you canhave an activity that says: I run since 0.82 to 0.92.. and really, can run on 0.82 to0.94, for example... Only a idea... Regards! Alan ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release SimCom-26
Activity Homepage: http://activities.sugarlabs.org/addon/4472 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27826/simcom-26.xo Release notes: Fixes layout error on widescreen monitors. Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel