[Sugar-devel] [PATCH gst-plugins-espeak] Setup the plugin metadata
Work around https://bugzilla.gnome.org/show_bug.cgi?id=684765 --- src/gstespeak.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gstespeak.c b/src/gstespeak.c index b7603eb..e884457 100644 --- a/src/gstespeak.c +++ b/src/gstespeak.c @@ -128,6 +128,12 @@ static void gst_espeak_class_init (GstEspeakClass * klass) { gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (src_factory)); + +gst_element_class_set_static_metadata (element_class, +Espeak, +Source, +Uses eSpeak library as a sound source for GStreamer, +Aleksey S. Lim alsr...@member.fsf.org); } /* initialize the new element -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Gst crash in sugar-build
I have to take that back, it's not fixed yet. Opened a bug about it https://bugzilla.gnome.org/show_bug.cgi?id=684765 It's triggered by our espeak plugin, so I sent a patch to work it around until upstream get it fixed and released. On 24 September 2012 20:47, Daniel Narvaez dwnarv...@gmail.com wrote: This was a bug in gst-plugins-good which has been fixed recently. I updated gstreamer to 1.0.0 which fixes the crash for me. On 24 September 2012 18:57, Daniel Narvaez dwnarv...@gmail.com wrote: Hi Gonzalo, as a temporary workaround you can use alsasink instead of autoaudiosink. I will see if I can figure out why the auto sink doesnt work. On 21 September 2012 15:21, Gonzalo Odiard gonz...@laptop.org wrote: A simple test-case http://dev.laptop.org/~gonzalo/simple_tts3.py Works out of sugar-build, but crash if run in a terminal after doing make shell or in the sugar terminal. Gonzalo On Fri, Sep 21, 2012 at 9:29 AM, Gonzalo Odiard gonz...@laptop.org wrote: There are a problem with actual sugar-build when try to create a gst audiosink. If you try to use text to speech, sugar crash (bt here [1]) In Read is not crashing, but the activity does not start with a epub or text file because try to init the tts code) I am looking at Read code, because is a little convoluted, but probably there are a error at a lower level. Any idea is welcomed. Gonzalo [1] http://dev.laptop.org/~gonzalo/speech_bt.txt -- Daniel Narvaez -- Daniel Narvaez -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar] Gio.content_type_guess now returns a dict instead of a str
Thanks! Pushed with a slight modification in displaying all the returns: http://git.sugarlabs.org/sugar/mainline/commit/bcb2da9259164402bbf2bbdfbe4f0cf3ef2279d2 On 09/21/2012 11:02 PM, godi...@sugarlabs.org wrote: From: Gonzalo Odiard godi...@gmail.com This is a change in the api. The second element in the dict is the certainly [1]. We only need the first element. Errors connected with this change can be seen when trying to access the Documents folder in the Journal. [1] http://developer.gnome.org/gio/stable/gio-GContentType.html#g-content-type-guess Signed-off-by: Gonzalo Odiard gonz...@laptop.org --- src/jarabe/journal/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py index fb73db7..53e11f0 100644 --- a/src/jarabe/journal/model.py +++ b/src/jarabe/journal/model.py @@ -394,7 +394,8 @@ class InplaceResultSet(BaseResultSet): return if self._mime_types: -mime_type = Gio.content_type_guess(filename=full_path, data=None) +mime_type = \ +Gio.content_type_guess(filename=full_path, data=None)[0] if mime_type not in self._mime_types: return @@ -440,7 +441,7 @@ def _get_file_metadata(path, stat, fetch_preview=True): 'title': os.path.basename(path), 'timestamp': stat.st_mtime, 'filesize': stat.st_size, -'mime_type': Gio.content_type_guess(filename=path, data=None), +'mime_type': Gio.content_type_guess(filename=path, data=None)[0], 'activity': '', 'activity_id': '', 'icon-color': '#00,#ff', ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH shell 1/2] Fix layout of Language and Modem sections in the Control Panel - SL #3902
Excellent work! Pushed and closed ticket. http://git.sugarlabs.org/sugar/mainline/commit/374679c2fd7e6227a0440f85bed6d2232f42f684 On 09/25/2012 02:26 AM, Manuel Quiñones wrote: - Use hide() instead of hide_all() which doesn't exist in pygobject. - Remove the set_width_chars(100) of the explanation label. Forcing the width to this arbitrary number seemed to work in gtk2/pygtk, but now the top level window is being resized to fit that width. Removing this line makes the text flow without provoking a resize in the window. Signed-off-by: Manuel Quiñones ma...@laptop.org --- extensions/cpsection/language/view.py | 3 +-- extensions/cpsection/modemconfiguration/view.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/cpsection/language/view.py b/extensions/cpsection/language/view.py index e88e383..95066f8 100644 --- a/extensions/cpsection/language/view.py +++ b/extensions/cpsection/language/view.py @@ -58,7 +58,6 @@ class Language(SectionView): ' If a translation is not available,' ' the next in the list will be used.') self._text = Gtk.Label(label=explanation) -self._text.set_width_chars(100) self._text.set_line_wrap(True) self._text.set_alignment(0, 0) self.pack_start(self._text, False, False, 0) @@ -135,7 +134,7 @@ class Language(SectionView): if self._selected_lang_count 1: previous_add_removes = self._add_remove_boxes[-2] -previous_add_removes.hide_all() +previous_add_removes.hide() self._determine_add_remove_visibility() diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py index 7257679..d5aa399 100644 --- a/extensions/cpsection/modemconfiguration/view.py +++ b/extensions/cpsection/modemconfiguration/view.py @@ -69,7 +69,6 @@ class ModemConfiguration(SectionView): ' to set up a mobile broadband connection to a' ' cellular (3G) network.') self._text = Gtk.Label(label=explanation) -self._text.set_width_chars(100) self._text.set_line_wrap(True) self._text.set_alignment(0, 0) self.pack_start(self._text, False, False, 0) ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH shell 2/2] Get back text visibility in Network section of the Control Panel
Works, pushed as http://git.sugarlabs.org/sugar/mainline/commit/9ba0a8b04d5cbb43f6bea7061221993873dbbf2f Thanks, Simon On 09/25/2012 02:26 AM, Manuel Quiñones wrote: Properly doing show() after packing the 'scrolled' and 'workspace' containers in this section makes the text visible again. Signed-off-by: Manuel Quiñones ma...@laptop.org --- extensions/cpsection/network/view.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/cpsection/network/view.py b/extensions/cpsection/network/view.py index f3a1b6b..9b89375 100644 --- a/extensions/cpsection/network/view.py +++ b/extensions/cpsection/network/view.py @@ -52,7 +52,13 @@ class Network(SectionView): self._radio_alert_box = Gtk.HBox(spacing=style.DEFAULT_SPACING) self._jabber_alert_box = Gtk.HBox(spacing=style.DEFAULT_SPACING) +scrolled = Gtk.ScrolledWindow() +scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) +self.add(scrolled) +scrolled.show() + workspace = Gtk.VBox() +scrolled.add_with_viewport(workspace) workspace.show() separator_wireless = Gtk.HSeparator() @@ -172,12 +178,6 @@ class Network(SectionView): workspace.pack_start(box_mesh, False, True, 0) box_mesh.show() -scrolled = Gtk.ScrolledWindow() -scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) -scrolled.add_with_viewport(workspace) -scrolled.show() -self.add(scrolled) - self.setup() def setup(self): ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH shell 3/3] Fix layout of Clear search button in Journal and Activity List - SL #3809
Great, works as expected: http://git.sugarlabs.org/sugar/mainline/commit/42fc93826f0d28c9cd43194df16c1fa47f930b2f Simon On 09/25/2012 04:31 AM, Manuel Quiñones wrote: To do it, add the button to a ButtonBox with layout Gtk.ButtonBoxStyle.CENTER. Signed-off-by: Manuel Quiñones ma...@laptop.org --- src/jarabe/desktop/activitieslist.py | 7 ++- src/jarabe/journal/listview.py | 7 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index b64..b830526 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -333,11 +333,16 @@ class ClearMessageBox(Gtk.EventBox): box.pack_start(label, expand=True, fill=False, padding=0) label.show() +button_box = Gtk.HButtonBox() +button_box.set_layout(Gtk.ButtonBoxStyle.CENTER) +box.pack_start(button_box, False, True, 0) +button_box.show() + button = Gtk.Button(label=_('Clear search')) button.connect('clicked', button_callback) button.props.image = Icon(icon_name='dialog-cancel', icon_size=Gtk.IconSize.BUTTON) -box.pack_start(button, expand=True, fill=False, padding=0) +button_box.pack_start(button, expand=True, fill=False, padding=0) button.show() diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py index 46c3440..917beb0 100644 --- a/src/jarabe/journal/listview.py +++ b/src/jarabe/journal/listview.py @@ -403,11 +403,16 @@ class BaseListView(Gtk.Bin): box.pack_start(label, expand=True, fill=False, padding=0) if show_clear_query: +button_box = Gtk.HButtonBox() +button_box.set_layout(Gtk.ButtonBoxStyle.CENTER) +box.pack_start(button_box, False, True, 0) +button_box.show() + button = Gtk.Button(label=_('Clear search')) button.connect('clicked', self.__clear_button_clicked_cb) button.props.image = Icon(icon_name='dialog-cancel', icon_size=Gtk.IconSize.BUTTON) -box.pack_start(button, expand=True, fill=False, padding=0) +button_box.pack_start(button, expand=True, fill=False, padding=0) background_box.show_all() ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Add translation of summary info to pootle potgenerator
Hi Aleksey, Attached is a patch to add summary field in activity.info to the strings to be translated in the pot file generated by pogenerator.py I have tried modify the code as little as possible, then created another method _get_summary_name() and the activity.info file is readed two times. This is not optimum, then if you prefer, I can modify the _get_activity_name and return a dict. If you have other comment tell me. Gonzalo 0001-Add-summary-in-activity.info-to-the-generated-pot.patch Description: Binary data ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Call to Activities Maintainers! Summary info
Hi Activities maintainers, In the next Sugar version, a summary will be displayed in the activities list, instead of the installation time. Something like [1] but in the xo looks better because we have more space. I have requested help to the Learning Team, to propose a summary for activities, thinking in have a pedagogical view, and Melissa and Claudia prepared a proposal for us. Now we have the help of activity maintainers. You only need add a summary filed in the activity.info file and release a new version of the activity. Is important do it as soon as possible, to allow translators to work on this, and then we can do a new release including translations in 2 or 3 weeks. The list of proposed summaries is here [2] I know we all have a lot of tasks this cycle, I hope you can help to have the activities list complete! Thank you! Gonzalo Acttivities Team [1] http://dev.laptop.org/~gonzalo/images/Summary_in_listview.png [2] http://wiki.laptop.org/go/User:Godiard/12.1.0/ActivitiesSummary ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Call to Activities Maintainers! Summary info
Just If is not obvious, the field is named summary Example: [Activity] name = Finance activity_version = 9 host_version = 1 bundle_id = org.laptop.community.Finance icon = Finance-activity exec = sugar-activity finance.Finance summary = Want to wisely manage money? Learn financial planning basics and track your family's finance, make your own budget and learn how to make every penny count! Try to keep the summary no much bigger than 100 chars. Gonzalo On Tue, Sep 25, 2012 at 11:41 AM, Gonzalo Odiard gonz...@laptop.org wrote: Hi Activities maintainers, In the next Sugar version, a summary will be displayed in the activities list, instead of the installation time. Something like [1] but in the xo looks better because we have more space. I have requested help to the Learning Team, to propose a summary for activities, thinking in have a pedagogical view, and Melissa and Claudia prepared a proposal for us. Now we have the help of activity maintainers. You only need add a summary filed in the activity.info file and release a new version of the activity. Is important do it as soon as possible, to allow translators to work on this, and then we can do a new release including translations in 2 or 3 weeks. The list of proposed summaries is here [2] I know we all have a lot of tasks this cycle, I hope you can help to have the activities list complete! Thank you! Gonzalo Acttivities Team [1] http://dev.laptop.org/~gonzalo/images/Summary_in_listview.png [2] http://wiki.laptop.org/go/User:Godiard/12.1.0/ActivitiesSummary ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Turtle Blocks-160
Activity Homepage: http://activities.sugarlabs.org/addon/4027 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28228/turtle_art-160.xo Release notes: 160 ENHANCEMENTS: * Add gray as argument to fill screen block * Added new summary field * New sample projects for journal analysis * New translations 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 Memorize-43
Activity Homepage: http://activities.sugarlabs.org/addon/4063 Sugar Platform: 0.86 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28229/memorize-43.xo Release notes: Add summary info Fix error in the use of menus to change game and size - SL #3959 Replace cjson by json due to deprecation - SL #3951 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 Browse] Error page SL #3500
On Fri, Sep 21, 2012 at 8:32 PM, Martin Langhoff martin.langh...@gmail.com wrote: So just put img src=file:///path/to/file . That saves a some of pointless CPU cycles, some RAM. This old man doesn't like inefficient code, even in small details. I agree with you in this point but I would like to mention that this feature (reading from file:// uri) has to be enabled because it is not enabled by default[1] and this is because it was marked as a security issue[2]. ** Message: console message: @0: Not allowed to load local resource: file:///home/humitos/src/browse/browse.png What do you think? Should I go for the file:// approach anyway? [1] http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebSettings.html#WebKitWebSettings--enable-file-access-from-file-uris [2] http://en.wikipedia.org/wiki/File_URI_scheme -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Browse] Error page SL #3500
The API description is not very clear and I didn't read the code. But I guess it would allow remote web pages (http) to access local files? If so you don't want to enable it :) On 25 September 2012 18:43, Manuel Kaufmann humi...@gmail.com wrote: On Fri, Sep 21, 2012 at 8:32 PM, Martin Langhoff martin.langh...@gmail.com wrote: So just put img src=file:///path/to/file . That saves a some of pointless CPU cycles, some RAM. This old man doesn't like inefficient code, even in small details. I agree with you in this point but I would like to mention that this feature (reading from file:// uri) has to be enabled because it is not enabled by default[1] and this is because it was marked as a security issue[2]. ** Message: console message: @0: Not allowed to load local resource: file:///home/humitos/src/browse/browse.png What do you think? Should I go for the file:// approach anyway? [1] http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebSettings.html#WebKitWebSettings--enable-file-access-from-file-uris [2] http://en.wikipedia.org/wiki/File_URI_scheme -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Browse] Error page SL #3500
2012/9/25 Daniel Narvaez dwnarv...@gmail.com: The API description is not very clear and I didn't read the code. But I guess it would allow remote web pages (http) to access local files? If so you don't want to enable it :) Right, is a security issue and I think is good webkit doesn't allow it. -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Fix external media mounting (#3911)
The GVolumeMonitor used for mounting devices must not drop out of scope, otherwise it will be destroyed, and no signals will be receieved. Move it into global scope. Update mount and unmount calls for introspection. Remove dead code from volumestoolbar. --- extensions/deviceicon/volume.py | 10 ++ src/jarabe/journal/volumestoolbar.py | 7 --- src/jarabe/view/palettes.py | 8 +--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py index ec7b2e2..fe9e0e3 100644 --- a/extensions/deviceicon/volume.py +++ b/extensions/deviceicon/volume.py @@ -34,6 +34,7 @@ from jarabe.frame.frameinvoker import FrameWidgetInvoker _icons = {} +volume_monitor = None class DeviceView(TrayIcon): @@ -100,6 +101,7 @@ def setup(tray): def _setup_volumes(tray): +global volume_monitor volume_monitor = Gio.VolumeMonitor.get() for volume in volume_monitor.get_volumes(): @@ -121,17 +123,17 @@ def _mount(volume, tray): # Follow Nautilus behaviour here # since it has the same issue with removable device # and it would be good to not invent our own workflow -if hasattr(volume, 'should_automount') and not volume.should_automount(): +if not volume.should_automount(): return #TODO: should be done by some other process, like gvfs-hal-volume-monitor -#TODO: use volume.should_automount() when it gets into pygtk if volume.get_mount() is None and volume.can_mount(): #TODO: pass None as mount_operation, or better, SugarMountOperation -volume.mount(Gtk.MountOperation(tray.get_toplevel()), _mount_cb) +volume.mount(0, Gtk.MountOperation(parent=tray.get_toplevel()), None, + _mount_cb, None) -def _mount_cb(volume, result): +def _mount_cb(volume, result, user_data): logging.debug('_mount_cb %r %r', volume, result) volume.mount_finish(result) diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py index 8f4692d..1fc368e 100644 --- a/src/jarabe/journal/volumestoolbar.py +++ b/src/jarabe/journal/volumestoolbar.py @@ -251,13 +251,6 @@ class VolumesToolbar(Gtk.Toolbar): if button.props.active: self.emit('volume-changed', button.mount_point) -def _unmount_activated_cb(self, menu_item, mount): -logging.debug('VolumesToolbar._unmount_activated_cb: %r', mount) -mount.unmount(self.__unmount_cb) - -def __unmount_cb(self, source, result): -logging.debug('__unmount_cb %r %r', source, result) - def _get_button_for_mount(self, mount): mount_point = mount.get_root().get_path() for button in self.get_children(): diff --git a/src/jarabe/view/palettes.py b/src/jarabe/view/palettes.py index 35475d0..89d47db 100644 --- a/src/jarabe/view/palettes.py +++ b/src/jarabe/view/palettes.py @@ -246,11 +246,13 @@ class VolumePalette(Palette): self.connect('popup', self.__popup_cb) def __unmount_activate_cb(self, menu_item): -self._mount.unmount(self.__unmount_cb) +mount_op = Gtk.MountOperation(parent=self.content_box.get_toplevel()) +self._mount.unmount_with_operation(0, mount_op, None, + self.__unmount_cb, None) -def __unmount_cb(self, mount, result): +def __unmount_cb(self, mount, result, user_data): logging.debug('__unmount_cb %r %r', mount, result) -mount.unmount_finish(result) +mount.unmount_with_operation_finish(result) def __popup_cb(self, palette): mount_point = self._mount.get_root().get_path() -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Browse] Error page SL #3500
On Tue, Sep 25, 2012 at 12:43 PM, Manuel Kaufmann humi...@gmail.com wrote: ** Message: console message: @0: Not allowed to load local resource: file:///home/humitos/src/browse/browse.png What do you think? Should I go for the file:// approach anyway? Hmmm, security, tiny performance tweak, what should I choose? ;-) Good catch. I didn' t know it had been locked down this way. 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] [PATCH v2 sugar] Finish port of palettes in network device icon
Started in aaa963cf with the port of wireless. The pending one was GsmPalette. WiredPalette doesn't need to be changed, it doesn't pack MenuItems, just sets the content with set_content, is all informational. And device type OLPC mesh uses the same palette as wireless, already ported. - use PaletteMenuItem instead of MenuItem - fixed the calls to set_label of the menu item - use update_state instead of unexistent set_state This needs to be properly tested with a modem connection. Signed-off-by: Manuel Quiñones ma...@laptop.org --- extensions/deviceicon/network.py | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index b4a5393..bc929ee 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -210,13 +210,13 @@ class GsmPalette(Palette): self._current_state = None self._failed_connection = False -self._toggle_state_item = MenuItem('') +self.info_box = Gtk.VBox() + +self._toggle_state_item = PaletteMenuItem('') self._toggle_state_item.connect('activate', self.__toggle_state_cb) -self.menu.append(self._toggle_state_item) +self.info_box.pack_start(self._toggle_state_item, True, True, 0) self._toggle_state_item.show() -self.info_box = Gtk.VBox() - self.error_title_label = Gtk.Label(label=) self.error_title_label.set_alignment(0, 0.5) self.error_title_label.set_line_wrap(True) @@ -253,7 +253,7 @@ class GsmPalette(Palette): self.info_box.show() self.set_content(self.info_box) -self.set_state(_GSM_STATE_NOT_READY) +self.update_state(_GSM_STATE_NOT_READY) def _add_widget_with_padding(self, child, xalign=0, yalign=0.5): alignment = Gtk.Alignment.new(xalign=xalign, yalign=yalign, @@ -271,13 +271,13 @@ class GsmPalette(Palette): def _update_label_and_text(self, reason=0): if self._current_state == _GSM_STATE_NOT_READY: -self._toggle_state_item.get_child().set_label('...') +self._toggle_state_item.set_label('...') label = glib.markup_escape_text(_('Please wait...')) self.props.secondary_text = label elif self._current_state == _GSM_STATE_DISCONNECTED: if not self._failed_connection: -self._toggle_state_item.get_child().set_label(_('Connect')) +self._toggle_state_item.set_label(_('Connect')) label = glib.markup_escape_text(_('Disconnected')) self.props.secondary_text = label icon = Icon(icon_name='dialog-ok', \ @@ -285,7 +285,7 @@ class GsmPalette(Palette): self._toggle_state_item.set_image(icon) elif self._current_state == _GSM_STATE_CONNECTING: -self._toggle_state_item.get_child().set_label(_('Cancel')) +self._toggle_state_item.set_label(_('Cancel')) label = glib.markup_escape_text(_('Connecting...')) self.props.secondary_text = label icon = Icon(icon_name='dialog-cancel', \ @@ -294,7 +294,7 @@ class GsmPalette(Palette): elif self._current_state == _GSM_STATE_CONNECTED: self._failed_connection = False -self._toggle_state_item.get_child().set_label(_('Disconnect')) +self._toggle_state_item.set_label(_('Disconnect')) self.update_connection_time() icon = Icon(icon_name='media-eject', \ icon_size=Gtk.IconSize.MENU) @@ -325,7 +325,7 @@ class GsmPalette(Palette): def add_alert(self, error, suggestion): self._failed_connection = True action = _('Try connection again') -self._toggle_state_item.get_child().set_label(action) +self._toggle_state_item.set_label(action) title = _('Error: %s') % error self.error_title_label.set_markup('b%s/b' % title) @@ -730,6 +730,7 @@ class GsmDeviceView(TrayIcon): def __init__(self, device): self._connection_time_handler = None + self._connection_timestamp = 0 client = GConf.Client.get_default() -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH v2 sugar] Finish port of palettes in network device icon
What I did to test without a modem (proper testing encuraged): --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -1052,19 +1052,8 @@ class NetworkManagerObserver(object): nm_device = self._bus.get_object(network.NM_SERVICE, device_op) props = dbus.Interface(nm_device, dbus.PROPERTIES_IFACE) -device_type = props.Get(network.NM_DEVICE_IFACE, 'DeviceType') -if device_type == network.NM_DEVICE_TYPE_ETHERNET: -device = WiredDeviceObserver(nm_device, self._tray) -self._devices[device_op] = device -elif device_type == network.NM_DEVICE_TYPE_WIFI: -device = WirelessDeviceObserver(nm_device, self._tray) -self._devices[device_op] = device -elif device_type == network.NM_DEVICE_TYPE_OLPC_MESH: -device = MeshDeviceObserver(nm_device, self._tray) -self._devices[device_op] = device -elif device_type == network.NM_DEVICE_TYPE_MODEM: -device = GsmDeviceObserver(nm_device, self._tray) -self._devices[device_op] = device +device = GsmDeviceObserver(nm_device, self._tray) +self._devices[device_op] = device def __device_added_cb(self, device_op): self._check_device(device_op) 2012/9/25 Manuel Quiñones ma...@laptop.org: Started in aaa963cf with the port of wireless. The pending one was GsmPalette. WiredPalette doesn't need to be changed, it doesn't pack MenuItems, just sets the content with set_content, is all informational. And device type OLPC mesh uses the same palette as wireless, already ported. - use PaletteMenuItem instead of MenuItem - fixed the calls to set_label of the menu item - use update_state instead of unexistent set_state This needs to be properly tested with a modem connection. Signed-off-by: Manuel Quiñones ma...@laptop.org --- extensions/deviceicon/network.py | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index b4a5393..bc929ee 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -210,13 +210,13 @@ class GsmPalette(Palette): self._current_state = None self._failed_connection = False -self._toggle_state_item = MenuItem('') +self.info_box = Gtk.VBox() + +self._toggle_state_item = PaletteMenuItem('') self._toggle_state_item.connect('activate', self.__toggle_state_cb) -self.menu.append(self._toggle_state_item) +self.info_box.pack_start(self._toggle_state_item, True, True, 0) self._toggle_state_item.show() -self.info_box = Gtk.VBox() - self.error_title_label = Gtk.Label(label=) self.error_title_label.set_alignment(0, 0.5) self.error_title_label.set_line_wrap(True) @@ -253,7 +253,7 @@ class GsmPalette(Palette): self.info_box.show() self.set_content(self.info_box) -self.set_state(_GSM_STATE_NOT_READY) +self.update_state(_GSM_STATE_NOT_READY) def _add_widget_with_padding(self, child, xalign=0, yalign=0.5): alignment = Gtk.Alignment.new(xalign=xalign, yalign=yalign, @@ -271,13 +271,13 @@ class GsmPalette(Palette): def _update_label_and_text(self, reason=0): if self._current_state == _GSM_STATE_NOT_READY: -self._toggle_state_item.get_child().set_label('...') +self._toggle_state_item.set_label('...') label = glib.markup_escape_text(_('Please wait...')) self.props.secondary_text = label elif self._current_state == _GSM_STATE_DISCONNECTED: if not self._failed_connection: -self._toggle_state_item.get_child().set_label(_('Connect')) +self._toggle_state_item.set_label(_('Connect')) label = glib.markup_escape_text(_('Disconnected')) self.props.secondary_text = label icon = Icon(icon_name='dialog-ok', \ @@ -285,7 +285,7 @@ class GsmPalette(Palette): self._toggle_state_item.set_image(icon) elif self._current_state == _GSM_STATE_CONNECTING: -self._toggle_state_item.get_child().set_label(_('Cancel')) +self._toggle_state_item.set_label(_('Cancel')) label = glib.markup_escape_text(_('Connecting...')) self.props.secondary_text = label icon = Icon(icon_name='dialog-cancel', \ @@ -294,7 +294,7 @@ class GsmPalette(Palette): elif self._current_state == _GSM_STATE_CONNECTED: self._failed_connection = False -self._toggle_state_item.get_child().set_label(_('Disconnect')) +self._toggle_state_item.set_label(_('Disconnect')) self.update_connection_time() icon = Icon(icon_name='media-eject', \
Re: [Sugar-devel] Call to Activities Maintainers! Summary info
The field in the activity.info is optional? Or required? If an activity no have summary field, what happens? Regards! Alan Date: Tue, 25 Sep 2012 11:41:06 -0300 From: gonz...@laptop.org To: sugar-devel@lists.sugarlabs.org; dir...@gmail.com; walter.ben...@gmail.com; alsr...@activitycentral.org; ma...@laptop.org; b...@freudenbergs.de Subject: [Sugar-devel] Call to Activities Maintainers! Summary info Hi Activities maintainers,In the next Sugar version, a summary will be displayed in the activities list,instead of the installation time. Something like [1] but in the xo looks better because we have more space. I have requested help to the Learning Team, to propose a summary for activities,thinking in have a pedagogical view, and Melissa and Claudia prepared a proposal for us. Now we have the help of activity maintainers. You only need add a summary filed in the activity.info file and release a new version of the activity.Is important do it as soon as possible, to allow translators to work on this, and then we can do a new release including translations in 2 or 3 weeks. The list of proposed summaries is here [2] I know we all have a lot of tasks this cycle, I hope you can help to have the activities list complete! Thank you! GonzaloActtivities Team [1] http://dev.laptop.org/~gonzalo/images/Summary_in_listview.png [2] http://wiki.laptop.org/go/User:Godiard/12.1.0/ActivitiesSummary ___ 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] A simple way for teachers to review children works
Hi all, One of the main feedback from teachers in our small XO deployment at Saint-Denis (a poor suburb of Paris) is related to children works review. The teacher would like a way to control and review works of children. Generally they ask to children to write a text or something else and they want a way to check if children have completed the work. They try to use an USB key but its too long (about fifteen minutes at least). More, because weve got only 25 XO for 50 children, two children share the same XO and there is a risk that a child delete the work of the previous one (it already happens). I dont know if it could help here but we dont have a XS server installed. BTW to be honest, Im afraid than if we have one teachers dont have knowledge to use it. Because each XO has an Internet connection, we are thinking to develop a small activity to allow children to upload their works to a web server where teachers could retrieve it. - Do you know how other deployments handle teachers review ? - Does the XS could be a solution to this problem ? - Is there any existing activity matching the idea to upload content to a web server ? Any advice is welcome. Best regards from France. Lionel. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Call to Activities Maintainers! Summary info
Is optional. If the activities does not have the field, will not dhow the text in the activities list view. Gonzalo On Tue, Sep 25, 2012 at 4:05 PM, Alan Jhonn Aguiar Schwyn alan...@hotmail.com wrote: The field in the activity.info is optional? Or required? If an activity no have summary field, what happens? Regards! Alan -- Date: Tue, 25 Sep 2012 11:41:06 -0300 From: gonz...@laptop.org To: sugar-devel@lists.sugarlabs.org; dir...@gmail.com; walter.ben...@gmail.com; alsr...@activitycentral.org; ma...@laptop.org; b...@freudenbergs.de Subject: [Sugar-devel] Call to Activities Maintainers! Summary info Hi Activities maintainers, In the next Sugar version, a summary will be displayed in the activities list, instead of the installation time. Something like [1] but in the xo looks better because we have more space. I have requested help to the Learning Team, to propose a summary for activities, thinking in have a pedagogical view, and Melissa and Claudia prepared a proposal for us. Now we have the help of activity maintainers. You only need add a summary filed in the activity.info file and release a new version of the activity. Is important do it as soon as possible, to allow translators to work on this, and then we can do a new release including translations in 2 or 3 weeks. The list of proposed summaries is here [2] I know we all have a lot of tasks this cycle, I hope you can help to have the activities list complete! Thank you! Gonzalo Acttivities Team [1] http://dev.laptop.org/~gonzalo/images/Summary_in_listview.png [2] http://wiki.laptop.org/go/User:Godiard/12.1.0/ActivitiesSummary ___ 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] [ASLO] Release Abacus-36
Activity Homepage: http://activities.sugarlabs.org/addon/4293 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28230/abacus-36.xo Release notes: 36 ENHANCEMENT * New translations * summary string in activity.info 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 v2 sugar] Finish port of palettes in network device icon
Thanks Manuel. On 09/25/2012 08:42 PM, Manuel Quiñones wrote: Started in aaa963cf with the port of wireless. The pending one was GsmPalette. WiredPalette doesn't need to be changed, it doesn't pack MenuItems, just sets the content with set_content, is all informational. And device type OLPC mesh uses the same palette as wireless, already ported. Excellent, thanks for checking all the different cases. - use PaletteMenuItem instead of MenuItem - fixed the calls to set_label of the menu item - use update_state instead of unexistent set_state This needs to be properly tested with a modem connection. Please push, and thanks for your extra test case. I am sure we get more testing once it is landed. Simon Signed-off-by: Manuel Quiñones ma...@laptop.org --- extensions/deviceicon/network.py | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index b4a5393..bc929ee 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -210,13 +210,13 @@ class GsmPalette(Palette): self._current_state = None self._failed_connection = False -self._toggle_state_item = MenuItem('') +self.info_box = Gtk.VBox() + +self._toggle_state_item = PaletteMenuItem('') self._toggle_state_item.connect('activate', self.__toggle_state_cb) -self.menu.append(self._toggle_state_item) +self.info_box.pack_start(self._toggle_state_item, True, True, 0) self._toggle_state_item.show() -self.info_box = Gtk.VBox() - self.error_title_label = Gtk.Label(label=) self.error_title_label.set_alignment(0, 0.5) self.error_title_label.set_line_wrap(True) @@ -253,7 +253,7 @@ class GsmPalette(Palette): self.info_box.show() self.set_content(self.info_box) -self.set_state(_GSM_STATE_NOT_READY) +self.update_state(_GSM_STATE_NOT_READY) def _add_widget_with_padding(self, child, xalign=0, yalign=0.5): alignment = Gtk.Alignment.new(xalign=xalign, yalign=yalign, @@ -271,13 +271,13 @@ class GsmPalette(Palette): def _update_label_and_text(self, reason=0): if self._current_state == _GSM_STATE_NOT_READY: -self._toggle_state_item.get_child().set_label('...') +self._toggle_state_item.set_label('...') label = glib.markup_escape_text(_('Please wait...')) self.props.secondary_text = label elif self._current_state == _GSM_STATE_DISCONNECTED: if not self._failed_connection: -self._toggle_state_item.get_child().set_label(_('Connect')) +self._toggle_state_item.set_label(_('Connect')) label = glib.markup_escape_text(_('Disconnected')) self.props.secondary_text = label icon = Icon(icon_name='dialog-ok', \ @@ -285,7 +285,7 @@ class GsmPalette(Palette): self._toggle_state_item.set_image(icon) elif self._current_state == _GSM_STATE_CONNECTING: -self._toggle_state_item.get_child().set_label(_('Cancel')) +self._toggle_state_item.set_label(_('Cancel')) label = glib.markup_escape_text(_('Connecting...')) self.props.secondary_text = label icon = Icon(icon_name='dialog-cancel', \ @@ -294,7 +294,7 @@ class GsmPalette(Palette): elif self._current_state == _GSM_STATE_CONNECTED: self._failed_connection = False -self._toggle_state_item.get_child().set_label(_('Disconnect')) +self._toggle_state_item.set_label(_('Disconnect')) self.update_connection_time() icon = Icon(icon_name='media-eject', \ icon_size=Gtk.IconSize.MENU) @@ -325,7 +325,7 @@ class GsmPalette(Palette): def add_alert(self, error, suggestion): self._failed_connection = True action = _('Try connection again') -self._toggle_state_item.get_child().set_label(action) +self._toggle_state_item.set_label(action) title = _('Error: %s') % error self.error_title_label.set_markup('b%s/b' % title) @@ -730,6 +730,7 @@ class GsmDeviceView(TrayIcon): def __init__(self, device): self._connection_time_handler = None + self._connection_timestamp = 0 client = GConf.Client.get_default() ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Finance-10
Activity Homepage: http://activities.sugarlabs.org/addon/4040 Sugar Platform: 0.98 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28231/finance-10.xo Release notes: Replace the help top bar by a HelpButton Add summary information 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] A simple way for teachers to review children works
Hi Lionel I recommend you look at XS or at least look at using Moodle. Students can submit their work in assignments on moodle, for example. Lots of people / places use Moodle so getting help is easy, there are public forums on moodle.org and there are Moodle partners. Tabitha (sent from phone) On Sep 26, 2012 7:53 AM, lio...@olpc-france.org wrote: Hi all, ** ** One of the main feedback from teachers in our small XO deployment at Saint-Denis (a poor suburb of Paris) is related to children works review.* *** The teacher would like a way to control and review works of children. ** ** Generally they ask to children to write a text or something else and they want a way to check if children have completed the work. They try to use an USB key but it’s too long (about fifteen minutes at least). More, because we’ve got only 25 XO for 50 children, two children share the same XO and there is a risk that a child delete the work of the previous one (it already happens). I don’t know if it could help here but we don’t have a XS server installed. BTW to be honest, I’m afraid than if we have one teachers don’t have knowledge to use it. ** ** Because each XO has an Internet connection, we are thinking to develop a small activity to allow children to upload their works to a web server where teachers could retrieve it. **- **Do you know how other deployments handle teachers review ?* *** **- **Does the XS could be a solution to this problem ? **- **Is there any existing activity matching the idea to upload content to a web server ? ** ** Any advice is welcome. ** ** Best regards from France. ** ** Lionel. ** ** ___ 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] [ASLO] Release Read-101
Any chance of tarballs ;-) On Thu, Sep 13, 2012 at 6:33 PM, Sugar Labs Activities activit...@sugarlabs.org wrote: Activity Homepage: http://activities.sugarlabs.org/addon/4028 Sugar Platform: 0.98 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28216/read-101.xo Release notes: Improve display of text files Use a scrollbar to navigate the entire book in txt books. Add touch event management to text files backend Implement kindle like change page in epub backend Page number should be zero based, fix epub backend - SL #3864 Keep the text position in the epub files - SL #3861 Enable the use of arrow keys in the page number entry - SL #3863 Fix index management in epub files - SL #3853 Enable touch kindle like interaction in pdf backend Disable code to read index in pdf files 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 mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release Abacus-36
Hi Walter, I'm seeing issues building this as an rpm, there are the logs http://kojipkgs.fedoraproject.org//work/tasks/6308/4526308/build.log Peter On Tue, Sep 25, 2012 at 10:07 PM, Sugar Labs Activities activit...@sugarlabs.org wrote: Activity Homepage: http://activities.sugarlabs.org/addon/4293 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28230/abacus-36.xo Release notes: 36 ENHANCEMENT * New translations * summary string in activity.info 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 mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release Get Books-13
Can I get some tar balls please? peter On Fri, Sep 14, 2012 at 11:21 PM, Sugar Labs Activities activit...@sugarlabs.org wrote: Activity Homepage: http://activities.sugarlabs.org/addon/4304 Sugar Platform: 0.98 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28217/get_books-13.xo Release notes: Update FeedBook catalogs Revert Avoid error using the activity in spanish due to accents in translation - SL #3763 Do not request random catalog when navigating catalog tree Read Internet Archive catalogs (Daniel Castelo) Updated translations 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 mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH v2 sugar] Finish port of palettes in network device icon
2012/9/25 Simon Schampijer si...@schampijer.de: Thanks Manuel. On 09/25/2012 08:42 PM, Manuel Quiñones wrote: Started in aaa963cf with the port of wireless. The pending one was GsmPalette. WiredPalette doesn't need to be changed, it doesn't pack MenuItems, just sets the content with set_content, is all informational. And device type OLPC mesh uses the same palette as wireless, already ported. Excellent, thanks for checking all the different cases. - use PaletteMenuItem instead of MenuItem - fixed the calls to set_label of the menu item - use update_state instead of unexistent set_state This needs to be properly tested with a modem connection. Please push, and thanks for your extra test case. I am sure we get more testing once it is landed. Yes I hope. Pushed as aec34420 . Thanks. -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release Abacus-36
On Tue, Sep 25, 2012 at 7:05 PM, Peter Robinson pbrobin...@gmail.com wrote: Hi Walter, I'm seeing issues building this as an rpm, there are the logs http://kojipkgs.fedoraproject.org//work/tasks/6308/4526308/build.log Strange. Seems to be related somehow to ./setup.py build but I have no problems running that script. Will investigate tomorrow. No problem with TA 160? -walter Peter On Tue, Sep 25, 2012 at 10:07 PM, Sugar Labs Activities activit...@sugarlabs.org wrote: Activity Homepage: http://activities.sugarlabs.org/addon/4293 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28230/abacus-36.xo Release notes: 36 ENHANCEMENT * New translations * summary string in activity.info 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 mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel