[Sugar-devel] [PATCH] sdxo #310, #2769 adds ability to set a custom start/home page in Browse
sdxo #310, #2769 this patch adds the ability to set a custom start/home page in Browse --- browser.py | 26 +- hometoolbar.py | 45 ++ icons/browse-change-homepage.svg | 11 ++ icons/browse-go-homepage.svg | 11 ++ webactivity.py | 13 +-- webtoolbar.py| 14 +--- 6 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 hometoolbar.py create mode 100644 icons/browse-change-homepage.svg create mode 100644 icons/browse-go-homepage.svg diff --git a/browser.py b/browser.py index 7419d2d..47be4c6 100644 --- a/browser.py +++ b/browser.py @@ -340,14 +340,38 @@ class TabbedView(BrowserNotebook): def load_homepage(self): browser = self.current_browser -if os.path.isfile(_LIBRARY_PATH): +if os.path.isfile(activity.get_bundle_path() + /data/homepage.conf): +confFile = os.path.join(activity.get_bundle_path(),data/homepage.conf) +f = open(confFile,r) +contents = f.read().strip() +f.close() + +if contents != : +default_page = contents +else: +default_page = os.path.join(activity.get_bundle_path(),data/index.html) + +browser.load_uri(default_page) +elif os.path.isfile(_LIBRARY_PATH): browser.load_uri('file://' + _LIBRARY_PATH) else: default_page = os.path.join(activity.get_bundle_path(), data/index.html) browser.load_uri('file://' + default_page) + browser.grab_focus() +def change_homepage(self): + Change data/homepage.conf with current URL + +confFile = os.path.join(activity.get_bundle_path(),data/homepage.conf) +index = self.get_current_page() +ui_uri = self.get_nth_page(index).browser.get_uri() + +f = open ( confFile,w) +f.write(ui_uri) +f.close() + def _get_current_browser(self): if self.get_n_pages(): return self.get_nth_page(self.get_current_page()).browser diff --git a/hometoolbar.py b/hometoolbar.py new file mode 100644 index 000..3d5e6a6 --- /dev/null +++ b/hometoolbar.py @@ -0,0 +1,45 @@ +# Copyright (C) 2007, One Laptop Per Child +# Copyright (C) 2012, Ariel Calzada +# +# 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 _ +from gi.repository import Gtk +from sugar3.graphics.toolbutton import ToolButton + +class HomeToolbar(Gtk.Toolbar): +def __init__(self, activity): +Gtk.Toolbar.__init__(self) + +self._activity = activity + +self.gohome = ToolButton('browse-go-homepage') +self.gohome.set_tooltip(_('Go to home page')) +self.gohome.connect('clicked', self.__gohome_clicked_cb) +self.insert(self.gohome, -1) +self.gohome.show() + +self.changehome = ToolButton('browse-change-homepage') +self.changehome.set_tooltip(_('Set current page as home page')) +self.changehome.connect('clicked', self.__changehome_clicked_cb) +self.insert(self.changehome, -1) +self.changehome.show() + +def __changehome_clicked_cb(self, button): +self._activity._change_home_button_cb(button) + +def __gohome_clicked_cb(self, button): +self._activity._go_home_button_cb(button) + diff --git a/icons/browse-change-homepage.svg b/icons/browse-change-homepage.svg new file mode 100644 index 000..c79c6d9 --- /dev/null +++ b/icons/browse-change-homepage.svg @@ -0,0 +1,11 @@ +?xml version=1.0 encoding=UTF-8? +!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; [ + !ENTITY fill_color #FF + !ENTITY stroke_color #010101 +] +svg xmlns=http://www.w3.org/2000/svg; width=55 height=55 + g id=go-home +path d=M 27.5 15.96256 L 8.48131 32.4005 L 8.55256 48.0374 L 17 48.0052 L 17 30.9243 L 26 30.9243 L 26 48.0052 L 47.59 48.0052 L 47.4221 32.2792 Z M 31.5 30.9243 l 8 0 l 0 8 l -8 0 Z stroke=none fill=fill_color; stroke-linecap=round stroke-width=3.5 / +path d=M 5.48131 27.4005 L 27.5 8.96256 L 38.8997 18.0775 L 38.8637 9.26122 L 42.8936 9.27163 L
[Sugar-devel] [PATCH] SDXO#2620 Add ability to save unfinished games in Memorize.
From: Ajay Garg a...@activitycentral.com The approach followed has been simply to save the current-game image when closing the game. The game resumes from that image next time onwards. Tests conducted :: a) (i) User exits, without finishing the current game. (ii) When she next starts, she will proceed from the same game, from the same stage. b) (i) User exits, without finishing the current game. (ii) She then transfers the journal-entry to another XO. (iii) Tries to resume the game, from the (transferred) journal entry. (iv) Game resumes, from the same stage. Signed-off-by: Ajay Garg a...@activitycentral.com --- activity.py| 16 ++-- cardlist.py| 3 ++- game.py| 14 -- memorizetoolbar.py | 2 +- model.py | 12 +++- 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/activity.py b/activity.py index 8bfd758..8bc679d 100644 --- a/activity.py +++ b/activity.py @@ -107,7 +107,7 @@ class MemorizeActivity(Activity): # Play game mode self.table = cardtable.CardTable() self.scoreboard = scoreboard.Scoreboard() -self.cardlist = cardlist.CardList() +self.cardlist = cardlist.CardList(self) self.createcardpanel = createcardpanel.CreateCardPanel() self.cardlist.connect('pair-selected', self.createcardpanel.pair_selected) @@ -127,7 +127,7 @@ class MemorizeActivity(Activity): self._memorizeToolbarBuilder.reset) self._createToolbarBuilder.connect('create_equal_pairs', self.change_equal_pairs) -self.game = game.MemorizeGame() +self.game = game.MemorizeGame(self) self._edit_button.connect('toggled', self._change_mode_bt) @@ -232,11 +232,16 @@ class MemorizeActivity(Activity): def write_file(self, file_path): logging.debug('WRITE_FILE is_demo %s', self.game.model.is_demo) + +# We want to save the game-image for demo games too !!! + if self.game.model.is_demo: # if is a demo game only want keep the metadata self._jobject.set_file_path(None) raise NotImplementedError return + + if self.cardlist.pair_list_modified: self.cardlist.update_model(self.game.model) @@ -285,6 +290,13 @@ class MemorizeActivity(Activity): game_zip.close() self.metadata['mime_type'] = 'application/x-memorize-project' +# Store the game image as a string - that is simpler instead of +# having to deal with the dbus-converted list. +# When reading back, we use eval to convert the string into +# the correct type (list in this case). +self.metadata['saved_game_data_image'] = str(self.game.model.grid) +self.metadata['size'] = int(self.game.model.data['size']) + def _complete_close(self): self._remove_temp_files() Activity._complete_close(self) diff --git a/cardlist.py b/cardlist.py index 6bc781c..65e44f1 100644 --- a/cardlist.py +++ b/cardlist.py @@ -40,8 +40,9 @@ class CardList(gtk.EventBox): 'update-create-toolbar': (SIGNAL_RUN_FIRST, None, 3 * [TYPE_PYOBJECT]), } -def __init__(self): +def __init__(self, activity_instance): gtk.EventBox.__init__(self) +self._activity_instance = activity_instance self.pairs = [] self.current_pair = None self.current_game_key = None diff --git a/game.py b/game.py index c5e54d1..9d21b4b 100644 --- a/game.py +++ b/game.py @@ -57,7 +57,7 @@ class MemorizeGame(GObject): 'change-turn': (SIGNAL_RUN_FIRST, None, [TYPE_PYOBJECT]), } -def __init__(self): +def __init__(self, activity_instance): gobject.GObject.__init__(self) self.myself = None self.players_score = {} @@ -70,7 +70,7 @@ class MemorizeGame(GObject): self.messenger = None self.sentitive = True -self.model = Model() +self.model = Model(activity_instance=activity_instance) self.flip_block = False self._flop_cards = None @@ -109,6 +109,16 @@ class MemorizeGame(GObject): self.change_turn() self.model.data['running'] = 'False' +# Card 'state' is an aawesome field. +# Its takes on the following values :: +# +# 0 ==for flopped cards. +# +# 1 ==for flipped unmatched cards +# (can be a maximum of 1 such card). +# +# stroke_color, fill_color ==for flipped matched cards + for card in self.model.grid: if card['state'] == '1': self.emit('flip-card', self.model.grid.index(card), False) diff --git a/memorizetoolbar.py b/memorizetoolbar.py index 1a06da7..07ceecf 100644 --- a/memorizetoolbar.py +++
Re: [Sugar-devel] [PATCH 1/3] Added proxy network support
I've already tested in sugar-build and it works fine without the patch. 2013/1/8 Daniel Narvaez dwnarv...@gmail.com On 4 January 2013 22:56, Manuel Quiñones ma...@laptop.org wrote: 2013/1/3 Ariel Calzada ariel.calz...@gmail.com: --- webactivity.py |5 + webactivity.py.orig | 669 Seems that you added a file by mistake. Can you explain the reasoning behind this patch? There is no commit message. In particular, how this differs from: http://wiki.sugarlabs.org/go/Features/Proxy_Settings And until we have a UI you can use gsettings to configure proxies, which seems as good as an environment variable but it doesn't add more complexity to Browse and it allows to setup all kind of proxies (same as GNOME control-center). It seems like it doesn't work in dextrose but I think it's a system level problem. It appears to work fine for me in debian wheezy + sugar-build. -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] More new stuff in Make Your Own Sugar Activities1
Thanks a lot I will eat it :) 2013/1/7 James Cameron qu...@laptop.org Thanks Ignacio! (and James!) -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH 1/3] Added proxy network support
Hi Manuel! Browse by default doesn't support http_proxy variable, that's why we made this patch. I would like to know if there are plans for supporting PAC with user/password ? Regards, ARIEL On 01/04/2013 04:56 PM, Manuel Quiñones wrote: 2013/1/3 Ariel Calzadaariel.calz...@gmail.com: --- webactivity.py |5 + webactivity.py.orig | 669 Seems that you added a file by mistake. Can you explain the reasoning behind this patch? There is no commit message. In particular, how this differs from: http://wiki.sugarlabs.org/go/Features/Proxy_Settings I would like to see that feature pushed. Seems almost complete. +++ 2 files changed, 674 insertions(+) create mode 100644 webactivity.py.orig diff --git a/webactivity.py b/webactivity.py index 3c0d337..c5f13c1 100644 --- a/webactivity.py +++ b/webactivity.py @@ -159,6 +159,11 @@ class WebActivity(activity.Activity): session.set_property('ssl-use-system-ca-file', True) session.set_property('ssl-strict', False) +# Honor the http_proxy variable +if os.environ.get('http_proxy') is not None: +proxy_uri = Soup.URI.new(os.environ['http_proxy']) +session.set_property(proxy-uri,proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: diff --git a/webactivity.py.orig b/webactivity.py.orig new file mode 100644 index 000..3c0d337 --- /dev/null +++ b/webactivity.py.orig @@ -0,0 +1,669 @@ +# Copyright (C) 2006, Red Hat, Inc. +# Copyright (C) 2009 Martin Langhoff, Simon Schampijer, Daniel Drake, +#Tomeu Vizoso +# +# 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 + +import logging +from gettext import gettext as _ +from gettext import ngettext +import os + +from gi.repository import GObject +GObject.threads_init() + +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import WebKit +from gi.repository import Soup +from gi.repository import SoupGNOME + +import base64 +import time +import shutil +import sqlite3 +import json +from gi.repository import GConf +import locale +import cairo +import StringIO +from hashlib import sha1 + +from sugar3.activity import activity +from sugar3.graphics import style +import telepathy +import telepathy.client +from sugar3.presence import presenceservice +from sugar3.graphics.tray import HTray +from sugar3 import profile +from sugar3.graphics.alert import Alert +from sugar3.graphics.icon import Icon +from sugar3 import mime + +from sugar3.graphics.toolbarbox import ToolbarButton + +PROFILE_VERSION = 2 + +_profile_version = 0 +_profile_path = os.path.join(activity.get_activity_root(), 'data/gecko') +_version_file = os.path.join(_profile_path, 'version') +_cookies_db_path = os.path.join(_profile_path, 'cookies.sqlite') + +if os.path.exists(_version_file): +f = open(_version_file) +_profile_version = int(f.read()) +f.close() + +if _profile_version PROFILE_VERSION: +if not os.path.exists(_profile_path): +os.mkdir(_profile_path) + +shutil.copy('cert8.db', _profile_path) +os.chmod(os.path.join(_profile_path, 'cert8.db'), 0660) + +f = open(_version_file, 'w') +f.write(str(PROFILE_VERSION)) +f.close() + + +def _seed_xs_cookie(cookie_jar): +Create a HTTP Cookie to authenticate with the Schoolserver. + +Do nothing if the laptop is not registered with Schoolserver, or +if the cookie already exists. + + +client = GConf.Client.get_default() +backup_url = client.get_string('/desktop/sugar/backup_url') +if backup_url == '': +_logger.debug('seed_xs_cookie: Not registered with Schoolserver') +return + +jabber_server = client.get_string( +'/desktop/sugar/collaboration/jabber_server') + +soup_uri = Soup.URI() +soup_uri.set_scheme('xmpp') +soup_uri.set_host(jabber_server) +soup_uri.set_path('/') +xs_cookie = cookie_jar.get_cookies(soup_uri, for_http=False) +if xs_cookie is not None: +_logger.debug('seed_xs_cookie: Cookie exists already') +return + +pubkey = profile.get_profile().pubkey +cookie_data = {'color':
Re: [Sugar-devel] [PATCH 3/3] sdxo#2316: Browse don't remember the last zoom used. In the read_file and write_file method self.model.data['current_zoom_level'] is restored/written
Done it http://bugs.sugarlabs.org/attachment/ticket/4368/ On 01/04/2013 05:00 PM, Manuel Quiñones wrote: Looks like a nice enhacement. Can you add a ticket with type enhacement in our sugarlabs tracker, so we can track it? 2013/1/3 Ariel Calzadaariel.calz...@gmail.com: --- webactivity.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/webactivity.py b/webactivity.py index fc60069..a94c7fa 100644 --- a/webactivity.py +++ b/webactivity.py @@ -426,6 +426,13 @@ class WebActivity(activity.Activity): tab_page.browser.grab_focus() self._tabbed_view.set_current_page(self.model.data['current_tab']) + +# zoom level +if 'current_zoom_level' in self.model.data: + self._tabbed_view.props.current_browser.set_zoom_level(self.model.data['current_zoom_level']) +else: + self._tabbed_view.props.current_browser.set_zoom_level(ZOOM_ORIGINAL) + elif self.metadata['mime_type'] == 'text/uri-list': data = self._get_data_from_file_path(file_path) uris = mime.split_uri_list(data) @@ -447,6 +454,9 @@ class WebActivity(activity.Activity): browser = self._tabbed_view.current_browser +# zoom level +self.model.data['current_zoom_level'] = browser.get_zoom_level() + if not self._jobject.metadata['title_set_by_user'] == '1': if browser.props.title is None: self.metadata['title'] = _('Untitled') -- 1.7.10.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH 2/3] sdxo#2572: Add 'Load_URI' signal-handler in 'Browse' activity. When this signal is received (with the 'uri' as the argument), this 'uri' is reloaded in the 'Browse' instance
--- webactivity.py |7 +++ webactivity.py.orig |5 + 2 files changed, 12 insertions(+) diff --git a/webactivity.py b/webactivity.py index c5f13c1..fc60069 100644 --- a/webactivity.py +++ b/webactivity.py @@ -20,6 +20,7 @@ import logging from gettext import gettext as _ from gettext import ngettext import os +import dbus from gi.repository import GObject GObject.threads_init() @@ -252,6 +253,12 @@ class WebActivity(activity.Activity): # http://bugs.sugarlabs.org/ticket/3973 self._cleanup_temp_files() +dbus.SessionBus().add_signal_receiver(self._load_uri, 'Load_URI', + IFACE) + +def _load_uri(self, uri): +self._link_clicked_cb(None, uri) + def _cleanup_temp_files(self): Removes temporary files generated by Download Manager that were cancelled by the user or failed for any reason. diff --git a/webactivity.py.orig b/webactivity.py.orig index 3c0d337..c5f13c1 100644 --- a/webactivity.py.orig +++ b/webactivity.py.orig @@ -159,6 +159,11 @@ class WebActivity(activity.Activity): session.set_property('ssl-use-system-ca-file', True) session.set_property('ssl-strict', False) +# Honor the http_proxy variable +if os.environ.get('http_proxy') is not None: +proxy_uri = Soup.URI.new(os.environ['http_proxy']) +session.set_property(proxy-uri,proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: -- 1.7.10.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH 3/3] sdxo#2316: Browse don't remember the last zoom used. In the read_file and write_file method self.model.data['current_zoom_level'] is restored/written
--- webactivity.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/webactivity.py b/webactivity.py index fc60069..a94c7fa 100644 --- a/webactivity.py +++ b/webactivity.py @@ -426,6 +426,13 @@ class WebActivity(activity.Activity): tab_page.browser.grab_focus() self._tabbed_view.set_current_page(self.model.data['current_tab']) + +# zoom level +if 'current_zoom_level' in self.model.data: + self._tabbed_view.props.current_browser.set_zoom_level(self.model.data['current_zoom_level']) +else: + self._tabbed_view.props.current_browser.set_zoom_level(ZOOM_ORIGINAL) + elif self.metadata['mime_type'] == 'text/uri-list': data = self._get_data_from_file_path(file_path) uris = mime.split_uri_list(data) @@ -447,6 +454,9 @@ class WebActivity(activity.Activity): browser = self._tabbed_view.current_browser +# zoom level +self.model.data['current_zoom_level'] = browser.get_zoom_level() + if not self._jobject.metadata['title_set_by_user'] == '1': if browser.props.title is None: self.metadata['title'] = _('Untitled') -- 1.7.10.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH 1/3] Added proxy network support
--- webactivity.py |5 + webactivity.py.orig | 669 +++ 2 files changed, 674 insertions(+) create mode 100644 webactivity.py.orig diff --git a/webactivity.py b/webactivity.py index 3c0d337..c5f13c1 100644 --- a/webactivity.py +++ b/webactivity.py @@ -159,6 +159,11 @@ class WebActivity(activity.Activity): session.set_property('ssl-use-system-ca-file', True) session.set_property('ssl-strict', False) +# Honor the http_proxy variable +if os.environ.get('http_proxy') is not None: +proxy_uri = Soup.URI.new(os.environ['http_proxy']) +session.set_property(proxy-uri,proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: diff --git a/webactivity.py.orig b/webactivity.py.orig new file mode 100644 index 000..3c0d337 --- /dev/null +++ b/webactivity.py.orig @@ -0,0 +1,669 @@ +# Copyright (C) 2006, Red Hat, Inc. +# Copyright (C) 2009 Martin Langhoff, Simon Schampijer, Daniel Drake, +#Tomeu Vizoso +# +# 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 + +import logging +from gettext import gettext as _ +from gettext import ngettext +import os + +from gi.repository import GObject +GObject.threads_init() + +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import WebKit +from gi.repository import Soup +from gi.repository import SoupGNOME + +import base64 +import time +import shutil +import sqlite3 +import json +from gi.repository import GConf +import locale +import cairo +import StringIO +from hashlib import sha1 + +from sugar3.activity import activity +from sugar3.graphics import style +import telepathy +import telepathy.client +from sugar3.presence import presenceservice +from sugar3.graphics.tray import HTray +from sugar3 import profile +from sugar3.graphics.alert import Alert +from sugar3.graphics.icon import Icon +from sugar3 import mime + +from sugar3.graphics.toolbarbox import ToolbarButton + +PROFILE_VERSION = 2 + +_profile_version = 0 +_profile_path = os.path.join(activity.get_activity_root(), 'data/gecko') +_version_file = os.path.join(_profile_path, 'version') +_cookies_db_path = os.path.join(_profile_path, 'cookies.sqlite') + +if os.path.exists(_version_file): +f = open(_version_file) +_profile_version = int(f.read()) +f.close() + +if _profile_version PROFILE_VERSION: +if not os.path.exists(_profile_path): +os.mkdir(_profile_path) + +shutil.copy('cert8.db', _profile_path) +os.chmod(os.path.join(_profile_path, 'cert8.db'), 0660) + +f = open(_version_file, 'w') +f.write(str(PROFILE_VERSION)) +f.close() + + +def _seed_xs_cookie(cookie_jar): +Create a HTTP Cookie to authenticate with the Schoolserver. + +Do nothing if the laptop is not registered with Schoolserver, or +if the cookie already exists. + + +client = GConf.Client.get_default() +backup_url = client.get_string('/desktop/sugar/backup_url') +if backup_url == '': +_logger.debug('seed_xs_cookie: Not registered with Schoolserver') +return + +jabber_server = client.get_string( +'/desktop/sugar/collaboration/jabber_server') + +soup_uri = Soup.URI() +soup_uri.set_scheme('xmpp') +soup_uri.set_host(jabber_server) +soup_uri.set_path('/') +xs_cookie = cookie_jar.get_cookies(soup_uri, for_http=False) +if xs_cookie is not None: +_logger.debug('seed_xs_cookie: Cookie exists already') +return + +pubkey = profile.get_profile().pubkey +cookie_data = {'color': profile.get_color().to_string(), + 'pkey_hash': sha1(pubkey).hexdigest()} + +expire = int(time.time()) + 10 * 365 * 24 * 60 * 60 + +xs_cookie = Soup.Cookie() +xs_cookie.set_name('xoid') +xs_cookie.set_value(json.dumps(cookie_data)) +xs_cookie.set_domain(jabber_server) +xs_cookie.set_path('/') +xs_cookie.set_max_age(expire) +cookie_jar.add_cookie(xs_cookie) +_logger.debug('seed_xs_cookie: Updated cookie successfully') + + +def _set_char_preference(name, value): +cls = components.classes[@mozilla.org/preferences-service;1] +
[Sugar-devel] [PATCH] Browse added proxy support with http_proxy variable
From: Ariel Calzada aricalso@000PaRaDoX000.(none) This patch adds support for proxy in the Browse activity. Honors the variable http_proxy --- webactivity.py |5 + 1 file changed, 5 insertions(+) diff --git a/webactivity.py b/webactivity.py index d140128..5ae0358 100644 --- a/webactivity.py +++ b/webactivity.py @@ -157,6 +157,11 @@ class WebActivity(activity.Activity): session = WebKit.get_default_session() session.set_property('accept-language-auto', True) +# Honor the http_proxy variable +if os.environ.get('http_proxy') is not None: +proxy_uri = Soup.URI.new(os.environ['http_proxy']) +session.set_property(proxy-uri,proxy_uri) + # By default, cookies are not stored persistently, we have to # add a cookie jar so that they get saved to disk. We use one # with a SQlite database: -- 1.7.10.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] About browse
Hi! I'm testing Browse Version 149 http://git.sugarlabs.org/browse and see a different behaviour in XO and in my laptop with sugar-build: * I open a page for example http://www.google.com * Close the activity * Open the activity again and the activity opens: *** In the XO opens file:///home/olpc/library_pages/index.html *** In my laptop with sugar-build opens http://www.google.com Regards, -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] About browse
After making these changes i can see the same behaviour in the XO and in sugar-build http://git.sugarlabs.org/browse/browse-all-downstream/commit/40215fa274b74a54da9cfdaa5f4733952395fddb Regards and Happy New year 2012/12/31 Gonzalo Odiard gonz...@laptop.org Are you opening a new instance of the activity or re-opening the last instance? The difference you see is because in your xo, you have the file file:///home/olpc/library_pages/index.html If you create the file in your user, in your laptop, will open it. See: http://git.sugarlabs.org/browse/mainline/blobs/master/browser.py#line343 Gonzalo On Mon, Dec 31, 2012 at 11:51 AM, Ariel Calzada ar...@activitycentral.com wrote: Hi! I'm testing Browse Version 149 http://git.sugarlabs.org/browse and see a different behaviour in XO and in my laptop with sugar-build: * I open a page for example http://www.google.com * Close the activity * Open the activity again and the activity opens: *** In the XO opens file:///home/olpc/library_pages/index.html *** In my laptop with sugar-build opens http://www.google.com Regards, -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release Screencast-8
Added thnx 2012/12/6 Alan Jhonn Aguiar Schwyn alan...@hotmail.com Good! One more: the activity icon.. Two possibilities.. Regards! Alan -- Date: Thu, 6 Dec 2012 22:02:42 -0500 Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8 From: ar...@activitycentral.com To: alan...@hotmail.com Thanks i included the image. feel free to comment anything Regards, Ariel 2012/12/6 Alan Jhonn Aguiar Schwyn alan...@hotmail.com Would be good put a capture of the activity on ASLO.. See the attached.. maybe screen1.png it's good... If you don't have time, I can upload it.. Regards! Alan To: sugar-devel@lists.sugarlabs.org Date: Thu, 6 Dec 2012 21:06:25 -0500 From: activit...@sugarlabs.org Subject: [Sugar-devel] [ASLO] Release Screencast-8 Activity Homepage: http://activities.sugarlabs.org/addon/4447 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo Release notes: Migration from recordmydesktop to gstreamer and performance improvements Ariel Calzada - ar...@activitycentral.com Flavio Danesse - fdane...@activitycentral.com Rafael Ortíz - raf...@activitycentral.com 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 -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release Screencast-8
Done :) 2012/12/6 Alan Jhonn Aguiar Schwyn alan...@hotmail.com Maybe this it's better.. The countour it's more visible.. -- Date: Thu, 6 Dec 2012 22:19:08 -0500 Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8 From: ar...@activitycentral.com To: alan...@hotmail.com CC: sugar-devel@lists.sugarlabs.org Added thnx 2012/12/6 Alan Jhonn Aguiar Schwyn alan...@hotmail.com Good! One more: the activity icon.. Two possibilities.. Regards! Alan -- Date: Thu, 6 Dec 2012 22:02:42 -0500 Subject: Re: [Sugar-devel] [ASLO] Release Screencast-8 From: ar...@activitycentral.com To: alan...@hotmail.com Thanks i included the image. feel free to comment anything Regards, Ariel 2012/12/6 Alan Jhonn Aguiar Schwyn alan...@hotmail.com Would be good put a capture of the activity on ASLO.. See the attached.. maybe screen1.png it's good... If you don't have time, I can upload it.. Regards! Alan To: sugar-devel@lists.sugarlabs.org Date: Thu, 6 Dec 2012 21:06:25 -0500 From: activit...@sugarlabs.org Subject: [Sugar-devel] [ASLO] Release Screencast-8 Activity Homepage: http://activities.sugarlabs.org/addon/4447 Sugar Platform: 0.82 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28384/screencast-8.xo Release notes: Migration from recordmydesktop to gstreamer and performance improvements Ariel Calzada - ar...@activitycentral.com Flavio Danesse - fdane...@activitycentral.com Rafael Ortíz - raf...@activitycentral.com 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 -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] How to detect touch of ebook mode?
Hi! I'm sorry if this has been asked before but I woud like to know how to catch touch events or e-book mode programmatically? Regards, -- Ariel Calzada Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] (no subject)
*Hello! We’re working in the GTK3 porting and HIG adjustments of Speak and other activities we have observations in both fields. HIG/Touchscreen The main concern is that the OSK hides the interface and doesn’t let the textbox be visible for the user. We think that a possible solution should be making OSK has an inputbox above that which displays the inserted text, and thus the speak interface should be shrinked. But this has to be analyzed because should be fixed upstream. As this is transversal to all the activities that could have input text. GTK3 We have been working in a GTK3 porting of Speak which basically implies usage of Gstreamer 1.0 We already have a release version of this porting but it has many issues. One of them is that the activity runs very very slow and the eyes don’t move correctly when the mouse is moved. So we have to analyse code performance in light of gstreamer and cairo. We would like to get some ideas of what’s happening and if gstreamer 1.0 is failing in XO with other activities. * * * *Regards,* * * -- Ariel Calzada and Rafael Ortíz Activity Central: http://www.activitycentral.com Facebook: https://activitycentral.com/facebook Google+: https://activitycentral.com/googleplus Twitter: https://activitycentral.com/twitter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] About speak and other activities GTK3/HIG
*Hello! We’re working in the GTK3 porting and HIG adjustments of Speak and other activities we have observations in both fields. HIG/Touchscreen The main concern is that the OSK hides the interface and doesn’t let the textbox be visible for the user. We think that a possible solution should be making OSK has an inputbox above that which displays the inserted text, and thus the speak interface should be shrinked. But this has to be analyzed because should be fixed upstream. As this is transversal to all the activities that could have input text. GTK3 We have been working in a GTK3 porting of Speak which basically implies usage of Gstreamer 1.0 We already have a release version of this porting but it has many issues. One of them is that the activity runs very very slow and the eyes don’t move correctly when the mouse is moved. So we have to analyse code performance in light of gstreamer and cairo. We would like to get some ideas of what’s happening and if gstreamer 1.0 is failing in XO with other activities. * * * *Regards,* -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Browse activity proxy settings
After that, Browse will just get the settings from the system. means from GCONF or HTTP_PROXY envvar? 2012/11/12 Manuel Quiñones ma...@laptop.org 2012/11/11 Ariel Calzada ar...@activitycentral.com: Hi! I would like to know if there's a way to make Browse activity use PROXY SETTINGS. I tried configuring proxy settings in My settings/Network with no luck. The feature was about to be done for the previous cycle, but was abandoned. http://wiki.sugarlabs.org/go/Features/Proxy_Settings After that, Browse will just get the settings from the system. -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Browse activity proxy settings
Hi! I would like to know if there's a way to make Browse activity use PROXY SETTINGS. I tried configuring proxy settings in My settings/Network with no luck. Regards, Ariel Calzada Activity Central http://www.activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] List of codecs supported by Sugar
You can give you an idea looking the http://build.laptop.org/13.1.0/os8/xo-1.75/31008o2.packages.txt that come with every image. Regards, Ariel 2012/11/2 Gonzalo Odiard gonz...@laptop.org Like I said, does not depends on sugar but on the gstreamer libraries of the system where sugar runs. May be you can explain what you need check? Gonzalo On Fri, Nov 2, 2012 at 12:32 PM, Christopher Lindgren chris.lindg...@my.ndsu.edu wrote: Thank you, Gonzalo! Is there a way to do it without access to Sugar? I currently do not have quick access to a system, and I'm frankly bogged down with other work to make a build of Sugar and then run this script. Best, Chris Lindgren -- *From:* godi...@gmail.com [godi...@gmail.com] on behalf of Gonzalo Odiard [gonz...@laptop.org] *Sent:* Thursday, November 01, 2012 4:14 PM *To:* Christopher Lindgren *Cc:* Sugar-dev Devel [sugar-devel@lists.sugarlabs.org] *Subject:* Re: [Sugar-devel] List of codecs supported by Sugar If you are asking for media files supported, Sugar use gstreamer, then depends on what gstreamer plugins are installed. You can use this script [1] to get a list of mime types supported by gstreamer in your system. Gonzalo [1] http://git.sugarlabs.org/many-tests/mainline/blobs/master/get_gstremer_supported_mime_types.py On Thu, Nov 1, 2012 at 5:51 PM, Christopher Lindgren chris.lindg...@my.ndsu.edu wrote: Hello everyone, Does anyone know if there is a list of codecs supported by Sugar? Any help or general list will be useful. Best, Chris Lindgren ___ 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 -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Problem playing videos in jukebox
Hi! I'm working in an activity (screencast) which generate an ogg video. This video is saved as a journal entry. I can't play the video in the XO player ( jukebox ) but i can play it in my laptop if i copy the file to the usb. Also i tried to play this video http://upload.wikimedia.org/wikipedia/commons/5/5a/F-18A_Active_Aeroelastic_Wing_flight_test.ogg downloading it to the Documents directory and opening in the jukebox with the same resultl. Any help will be apreciated. Regards, Ariel Calzada Activity Central http://www.acitvitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problem playing videos in jukebox
Image: http://build.laptop.org/13.1.0/os8/xo-1.75/ Jukebox Activity Version: 28 Regards, Ariel 2012/11/1 Gonzalo Odiard gonz...@laptop.org Jukebox version? Image used? Gonzalo On Thu, Nov 1, 2012 at 4:12 PM, Ariel Calzada ar...@activitycentral.comwrote: Hi! I'm working in an activity (screencast) which generate an ogg video. This video is saved as a journal entry. I can't play the video in the XO player ( jukebox ) but i can play it in my laptop if i copy the file to the usb. Also i tried to play this video http://upload.wikimedia.org/wikipedia/commons/5/5a/F-18A_Active_Aeroelastic_Wing_flight_test.ogg downloading it to the Documents directory and opening in the jukebox with the same resultl. Any help will be apreciated. Regards, Ariel Calzada Activity Central http://www.acitvitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- La Salvaje Esperanza Éramos dioses y nos volvieron esclavos. Éramos hijos del sol y nos consolaron con medallas de lata. Éramos poetas y nos pusieron a recitar oraciones pordioseras. Éramos felices y nos civilizaron. Quién refrescará la memoria de la tribu. Quién revivirá nuestros dioses. Que la salvaje esperanza siempre sea tuya, querida alma inamansable. -Gonzalo Arango- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] MEMORIZE patch for saving game state after exit and restoring last game state when the game is opened.
From: Ariel Calzada ar...@activitycentral.com --- activity.py| 88 +--- activity/activity.info |2 +- cardlist.py|3 +- createtoolbar.py |3 +- game.py| 13 +-- memorizetoolbar.py |5 +-- model.py | 12 ++- 7 files changed, 105 insertions(+), 21 deletions(-) diff --git a/activity.py b/activity.py index 1fdf8ac..f967976 100644 --- a/activity.py +++ b/activity.py @@ -35,9 +35,17 @@ import gtk import telepathy import telepathy.client -from sugar.activity.widgets import ActivityToolbarButton -from sugar.activity.widgets import StopButton -from sugar.graphics.toolbarbox import ToolbarBox +# Toolbars +try: +from sugar.graphics.toolbarbox import ToolbarBox +_have_toolbox = True +except ImportError: +_have_toolbox = False + +if _have_toolbox: +from sugar.activity.widgets import ActivityToolbarButton +from sugar.activity.widgets import StopButton + from sugar.graphics.toggletoolbutton import ToggleToolButton from sugar.activity.activity import Activity from sugar.presence import presenceservice @@ -53,6 +61,7 @@ import createtoolbar import cardlist import createcardpanel import face +import time SERVICE = 'org.laptop.Memorize' IFACE = SERVICE @@ -79,8 +88,33 @@ class MemorizeActivity(Activity): toolbar_box = ToolbarBox() self.set_toolbar_box(toolbar_box) -self.activity_button = ActivityToolbarButton(self) -toolbar_box.toolbar.insert(self.activity_button, -1) +if _have_toolbox: +toolbar_box = ToolbarBox() + +# Activity toolbar +activity_button = ActivityToolbarButton(self) +toolbar_box.toolbar.insert(activity_button, 0) +activity_button.show() + +self.set_toolbar_box(toolbar_box) +toolbar_box.show() + +# Save toolbar as attribute +self._toolbar = toolbar_box.toolbar + +else: +# Use pre-0.86 toolbar design +games_toolbar = gtk.Toolbar() +toolbar_box = activity.ActivityToolbox(self) + +self.set_toolbox(toolbar_box) +toolbar_box.add_toolbar(_('Game'), games_toolbar) +toolbar_box.show() + +toolbar_box.set_current_toolbar(1) + +# Save toolbar as attribute +self._toolbar = games_toolbar self._memorizeToolbarBuilder = \ memorizetoolbar.MemorizeToolbarBuilder(self) @@ -95,18 +129,19 @@ class MemorizeActivity(Activity): self._createToolbarBuilder = \ createtoolbar.CreateToolbarBuilder(self) -separator = gtk.SeparatorToolItem() -separator.set_expand(True) -separator.set_draw(False) -separator.set_size_request(0, -1) -toolbar_box.toolbar.insert(separator, -1) +if _have_toolbox: +separator = gtk.SeparatorToolItem() +separator.set_expand(True) +separator.set_draw(False) +separator.set_size_request(0, -1) +self._toolbar.insert(separator, -1) -toolbar_box.toolbar.insert(StopButton(self), -1) +self._toolbar.insert(StopButton(self), -1) # Play game mode self.table = cardtable.CardTable() self.scoreboard = scoreboard.Scoreboard() -self.cardlist = cardlist.CardList() +self.cardlist = cardlist.CardList(self) self.createcardpanel = createcardpanel.CreateCardPanel() self.cardlist.connect('pair-selected', self.createcardpanel.pair_selected) @@ -124,7 +159,7 @@ class MemorizeActivity(Activity): self.createcardpanel.clean) self._createToolbarBuilder.connect('create_equal_pairs', self.change_equal_pairs) -self.game = game.MemorizeGame() +self.game = game.MemorizeGame(self) self._edit_button.connect('toggled', self._change_mode_bt) @@ -207,6 +242,7 @@ class MemorizeActivity(Activity): self.game.add_buddy(self.owner) else: self.game.add_buddy(self.owner) + self.show_all() def _change_mode_bt(self, button): @@ -228,12 +264,17 @@ class MemorizeActivity(Activity): self.metadata['title'], color) def write_file(self, file_path): +# Wait for graphics events finish +self.flush_events() logging.debug('WRITE_FILE is_demo %s', self.game.model.is_demo) +# We want to save the game-image for demo games too !!! + if self.game.model.is_demo: # if is a demo game only want keep the metadata self._jobject.set_file_path(None) raise NotImplementedError return + if self.cardlist.pair_list_modified: self.cardlist.update_model(self.game.model) @@ -282,6 +323,13 @@ class
Re: [Sugar-devel] Dr.Geo on XO 1
How to regenerate Dr Geo image for pharo 1.3?. If i regenerate it for pharo 1.3 this should work?? Regards, ARIEL On 05/20/2012 10:24 AM, Hilaire Fernandes wrote: On 20/05/2012 13:46, Bert Freudenberg wrote: YES! That reproduces the crash on XO-1.5. Good thinking! :) I could also reproduce it in a virtual Ubuntu 12 with 768 MB RAM (!) but no swap. Top reports: Mem:766204k total, 601588k used, 164616k free,45624k buffers Swap:0k total,0k used,0k free, 277024k cached but DrGeo still crashes. OTOH, Etoys runs fine using the same Squeak VM on the same system (and on XO-1). So I wonder what the new DrGeo does differently ... The problem appear with Pharo 1.4. So is the problem memory related? It is not clear to me Hilaire ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Dr.Geo on XO 1
Hi! I downloaded it pharo image from http://www.pharo-project.org/pharo-download/release-1-4, and got the same error message. Is there any other test that i can do in order to fix the error?. Regards, Ariel Calzada Activity Central 2012/5/19 Hilaire Fernandes hilaire.fernan...@edu.ge.ch This VM was used with previous version of DrGeo. Is the problem related to the latest stable Sugar and the VM and XO-1? I tested DrGeo 11.08 and it worked with this identical set up. So It could be related to the Pharo image I used, or all related together. It is not easy to track the exact problem and it may take time. One things to do could be to test latest, virgin, Pharo image 1.4 with this same image., so it could clarify the problem Hilaire On 19/05/2012 20:10, Ariel Calzada wrote: Hi! We have made the following tests for XO 1.0: -- Run squeak binary strace ./squeak drgeo.image ( Attachment: strace-binary.txt ) -- Run squeak compiled strace ./squeak drgeo.image ( Attachment: strace-src.txt ) Both tests were not successful we got segmentation fault errors, we had review the strace logs but we haven't found why this happen. I hope this helps. Regards, Ariel Calzada Activity Central 2012/5/16 Hilaire Fernandes hilaire.fernan...@edu.ge.ch It looks like the SqueakVM I compiled for DrGeo does not work with X0-1 last Sugar system, but ok with XO-1.5 last Sugar system. It will cost me too much to prepare a new VM, I am busy with tablet versions of DrGeo. I invite other group interested to see DrGeo on Sugar, to compiled and test a SqueakVM with the latest Sugar version. Idealy one should use the COG Squeak VM coming with JITer and extend it to support the --sugar application flags. The Squeak VM coming with Sugar is an antiquity and slow horse anyway. Hilaire -- Dr. Geo -- http://www.drgeo.eu ___ 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] Dr.Geo on XO 1
Hi! I tested with PharoCore 1.3 from http://www.pharo-project.org/pharo-download/release-1-3 and it worked. My question now is how to make drgeo.image work? how to generate this image? Regards, Ariel Calzada Activity Central On 05/19/2012 03:11 PM, Hilaire Fernandes wrote: Please test with a Pharo 1.3 image then. I suspect it may work. Thanks Hilaire On 19/05/2012 21:47, Ariel Calzada wrote: Hi! I downloaded it pharo image from http://www.pharo-project.org/pharo-download/release-1-4, and got the same error message. Is there any other test that i can do in order to fix the error?. Regards, Ariel Calzada Activity Central 2012/5/19 Hilaire Fernandeshilaire.fernan...@edu.ge.ch This VM was used with previous version of DrGeo. Is the problem related to the latest stable Sugar and the VM and XO-1? I tested DrGeo 11.08 and it worked with this identical set up. So It could be related to the Pharo image I used, or all related together. It is not easy to track the exact problem and it may take time. One things to do could be to test latest, virgin, Pharo image 1.4 with this same image., so it could clarify the problem Hilaire On 19/05/2012 20:10, Ariel Calzada wrote: Hi! We have made the following tests for XO 1.0: -- Run squeak binary strace ./squeak drgeo.image ( Attachment: strace-binary.txt ) -- Run squeak compiled strace ./squeak drgeo.image ( Attachment: strace-src.txt ) Both tests were not successful we got segmentation fault errors, we had review the strace logs but we haven't found why this happen. I hope this helps. Regards, Ariel Calzada Activity Central 2012/5/16 Hilaire Fernandeshilaire.fernan...@edu.ge.ch It looks like the SqueakVM I compiled for DrGeo does not work with X0-1 last Sugar system, but ok with XO-1.5 last Sugar system. It will cost me too much to prepare a new VM, I am busy with tablet versions of DrGeo. I invite other group interested to see DrGeo on Sugar, to compiled and test a SqueakVM with the latest Sugar version. Idealy one should use the COG Squeak VM coming with JITer and extend it to support the --sugar application flags. The Squeak VM coming with Sugar is an antiquity and slow horse anyway. Hilaire -- Dr. Geo -- http://www.drgeo.eu ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] PATCH for Words Activity that fix https://dev.laptop.org.au/issues/1078 Speak option says the word twice in words activity.
PATCH for Words Activity that fix https://dev.laptop.org.au/issues/1078 Speak option says the word twice in words activity. --- wordsactivity.py |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/wordsactivity.py b/wordsactivity.py index 5c241f7..cfb8794 100644 --- a/wordsactivity.py +++ b/wordsactivity.py @@ -201,20 +201,15 @@ class WordsActivity(activity.Activity): # No Portuguese accent yet. if lang == portuguese: lang = spanish -tmpfile = /tmp/something.wav -subprocess.call([espeak, text, -w, tmpfile, -v, lang]) -subprocess.call([aplay, tmpfile]) -os.unlink(tmpfile) - #AU costumization -if lang == english: +elif lang == english: lang = english_rp + tmpfile = /tmp/something.wav subprocess.call([espeak, text, -w, tmpfile, -v, lang]) subprocess.call([aplay, tmpfile]) os.unlink(tmpfile) - def lang1combo_cb(self, combo): pass -- 1.7.5.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] PATCH for Words Activity that fix https://dev.laptop.org.au/issues/1078 Speak option says the word twice in words activity.
On 04/17/2012 10:31 AM, Ariel Calzada wrote: PATCH for Words Activity that fix https://dev.laptop.org.au/issues/1078 Speak option says the word twice in words activity. --- wordsactivity.py |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/wordsactivity.py b/wordsactivity.py index 5c241f7..cfb8794 100644 --- a/wordsactivity.py +++ b/wordsactivity.py @@ -201,20 +201,15 @@ class WordsActivity(activity.Activity): # No Portuguese accent yet. if lang == portuguese: lang = spanish -tmpfile = /tmp/something.wav -subprocess.call([espeak, text, -w, tmpfile, -v, lang]) -subprocess.call([aplay, tmpfile]) -os.unlink(tmpfile) - #AU costumization -if lang == english: +elif lang == english: lang = english_rp + tmpfile = /tmp/something.wav subprocess.call([espeak, text, -w, tmpfile, -v, lang]) subprocess.call([aplay, tmpfile]) os.unlink(tmpfile) - def lang1combo_cb(self, combo): pass ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] new-patch
From b330bc11f58b82eaecbbd41224077da381e62408 Mon Sep 17 00:00:00 2001 From: Ariel Calzada ar...@acivitycentral.com Date: Mon, 16 Apr 2012 11:02:19 -0500 Subject: [PATCH] =?UTF-8?q?Added=20decode=20utf-8=20and=20normalize=20string?= =?UTF-8?q?=20for=20fixing=20bug=20in=20nick=20that=20don't=20display=20well?= =?UTF-8?q?=20the=20nicknames=20that=20have=20accents=20like=20=C3=A1,=C3=A9?= =?UTF-8?q?,=C3=AD,=C3=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- player.py | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/player.py b/player.py index 5e9e8db..a6636dc 100644 --- a/player.py +++ b/player.py @@ -8,17 +8,17 @@ # # Copyright (C) 2007 Joshua Minor # This file is part of Maze.activity -# +# # Maze.activity 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 3 of the License, or # (at your option) any later version. -# +# # Maze.activity 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 Maze.activity. If not, see http://www.gnu.org/licenses/. @@ -29,14 +29,16 @@ from sugar.graphics.xocolor import XoColor import pygame import re import os +import unicodedata class Player: def __init__(self, buddy, shape='circle'): self.buddy = buddy -self.nick = buddy.props.nick.decode(utf-8) +name = buddy.props.nick.decode('utf-8') +self.nick = unicodedata.normalize('NFC',name) colors = buddy.props.color.split(,) - + def string2Color(str): return (int(str[1:3], 16), int(str[3:5], 16), int(str[5:7], 16)) self.colors = map(string2Color, colors) @@ -70,7 +72,7 @@ class Player: self.position = (1, 1) self.previous = (1, 1) self.elapsed = None - + def animate(self, maze): # if the player finished the maze, then don't move if maze.map[self.position[0]][self.position[1]] == maze.GOAL: @@ -83,7 +85,7 @@ class Player: else: self.direction = (0, 0) return self.position - + def move(self, direction, maze): Move the player in a given direction (deltax,deltay) newposition = (self.position[0] + direction[0], self.position[1] + direction[1]) @@ -111,7 +113,7 @@ class Player: directions.remove(d) # is there only one possible direction? if len(directions) == 1: - self.direction = directions[0] +self.direction = directions[0] else: self.direction = (0, 0) -- 1.7.5.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] This patch fix the bug, accent nicknames are not displayed well
This patch is for fixing the bug in the display of nicknames with accents like áéíóúñ --- player.py | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/player.py b/player.py index 5e9e8db..a6636dc 100644 --- a/player.py +++ b/player.py @@ -8,17 +8,17 @@ # # Copyright (C) 2007 Joshua Minor # This file is part of Maze.activity -# +# # Maze.activity 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 3 of the License, or # (at your option) any later version. -# +# # Maze.activity 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 Maze.activity. If not, see http://www.gnu.org/licenses/. @@ -29,14 +29,16 @@ from sugar.graphics.xocolor import XoColor import pygame import re import os +import unicodedata class Player: def __init__(self, buddy, shape='circle'): self.buddy = buddy -self.nick = buddy.props.nick.decode(utf-8) +name = buddy.props.nick.decode('utf-8') +self.nick = unicodedata.normalize('NFC',name) colors = buddy.props.color.split(,) - + def string2Color(str): return (int(str[1:3], 16), int(str[3:5], 16), int(str[5:7], 16)) self.colors = map(string2Color, colors) @@ -70,7 +72,7 @@ class Player: self.position = (1, 1) self.previous = (1, 1) self.elapsed = None - + def animate(self, maze): # if the player finished the maze, then don't move if maze.map[self.position[0]][self.position[1]] == maze.GOAL: @@ -83,7 +85,7 @@ class Player: else: self.direction = (0, 0) return self.position - + def move(self, direction, maze): Move the player in a given direction (deltax,deltay) newposition = (self.position[0] + direction[0], self.position[1] + direction[1]) @@ -111,7 +113,7 @@ class Player: directions.remove(d) # is there only one possible direction? if len(directions) == 1: - self.direction = directions[0] +self.direction = directions[0] else: self.direction = (0, 0) -- 1.7.5.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] This patch fix the bug, accent nicknames are not displayed well
This patch is for fixing the bug in the display of nicknames with accents like áéíóúñ in maze activity --- player.py | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/player.py b/player.py index 5e9e8db..a6636dc 100644 --- a/player.py +++ b/player.py @@ -8,17 +8,17 @@ # # Copyright (C) 2007 Joshua Minor # This file is part of Maze.activity -# +# # Maze.activity 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 3 of the License, or # (at your option) any later version. -# +# # Maze.activity 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 Maze.activity. If not, see http://www.gnu.org/licenses/. @@ -29,14 +29,16 @@ from sugar.graphics.xocolor import XoColor import pygame import re import os +import unicodedata class Player: def __init__(self, buddy, shape='circle'): self.buddy = buddy -self.nick = buddy.props.nick.decode(utf-8) +name = buddy.props.nick.decode('utf-8') +self.nick = unicodedata.normalize('NFC',name) colors = buddy.props.color.split(,) - + def string2Color(str): return (int(str[1:3], 16), int(str[3:5], 16), int(str[5:7], 16)) self.colors = map(string2Color, colors) @@ -70,7 +72,7 @@ class Player: self.position = (1, 1) self.previous = (1, 1) self.elapsed = None - + def animate(self, maze): # if the player finished the maze, then don't move if maze.map[self.position[0]][self.position[1]] == maze.GOAL: @@ -83,7 +85,7 @@ class Player: else: self.direction = (0, 0) return self.position - + def move(self, direction, maze): Move the player in a given direction (deltax,deltay) newposition = (self.position[0] + direction[0], self.position[1] + direction[1]) @@ -111,7 +113,7 @@ class Player: directions.remove(d) # is there only one possible direction? if len(directions) == 1: - self.direction = directions[0] +self.direction = directions[0] else: self.direction = (0, 0) -- 1.7.5.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Colors in XO 1.75
Hi! I'm working in making this activity COLORS ( http://activities.sugarlabs.org/en-US/sugar/downloads/file/25972/colors-15.xo) works in XO 1.75 ( ARM PROCESSOR ). This is a nice activity for drawing. First i had to recompile a C++ module named colorsc which uses swig for wrapping the code and using it in the python code. I compiled this module without problem. So now i start the acitivity and it works ok. There's only one problem: PALETTE. The palette is a part of the acivity which let us choose color,size and opacity of the brush. This pallete is displayed as an overlay of the canvas where user can draw. The palette seems not to respond to the mouse events ( for example CLICK ). Any suggestion will be welcome. Regards, Ariel Calzada Activity Central ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] New Icon for Deducto
Hi! We needed to change Deducto icon because the svg had an image embedded, so SUGAR couldn't colorish it when user clicked in it. We remade the icon. Also we have to modify activity.info because it had an old syntax style that don't let create the new .xo file. I attach both files Hola! Nosotros tuvimos la necesidad de cambiar el icono de la actividad Deducto, ya que este tenía incrustada una imágen en el svg, lo cual no permitía a SUGAR coloriarlo cuando el porgrama era utilizado. Lo que se hizo fue reconstruirlo. Por otro lado para construir de nuevo archivo .xo hubo necesidad de moficiar un poco activiy.info ya que contenia una sintáxis inválida para el sugar actual. Adjunto ambos archivos Regards, ARIEL CALZADA Activity Central attachment: activity-Deducto.svg activity.info Description: application/info ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] how to screenshare to a class
ClassroomBroadcast and ClassroomViewer are a good solution. We're working in ClassroomKit which integrates both activities and let teachers control the students sound and also make an aproach of sharing features. ClassroomBroadcast and ClassroomViewer use VNC protocol and the students have to write the teacher's IP ( classroombroadcast IP ). Please try it and report back Regards, ARIEL On 02/19/2012 09:01 AM, Walter Bender wrote: On Sun, Feb 19, 2012 at 8:06 AM, Alexandro Coloradoacolor...@gmail.com wrote: I find this a bit more on the user space than the devel space, but someone suggest me this was the better list for my question. Yesterday we ran our first sugar pilot and generate questions regarding showing activities to the class. Normally we would use a projector for such things, but I wonder if we can use the 'activity sharing' tool to show such things to the class. This will allow us to kill the 'dark room' projections, instead each student can view the material on their own display. Unfortunately we weren't able to get some basic sharing of some activities like Chat. Or at least not the way we were hoping to get. I haven't tried it yet, but in theory, classroom broadcast [1], will do the trick. I guess it is using VNCserver based on [2]. Not sure how well it scales, but please try it and report back. [1] http://activities.sugarlabs.org/en-US/sugar/addon/4507 [2] http://wiki.sugarlabs.org/go/Activities/Classroom_Broadcast regards. -walter -- Alexandro Colorado OpenOffice.org Español http://es.openoffice.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
[Sugar-devel] How to update all .po files
Hi i had to update some locale strings in an activity, so i made this simple script. I hope you like it sweets genpot for file in *.po do msgmerge -vU $file Calendario.pot done rm -Rf *~ Regards, ARIEL ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ASLO] Release ClassRoomViewer-4
Permissions assigned On 01/24/2012 03:43 PM, Rafael Ortiz wrote: On Tue, Jan 24, 2012 at 1:49 PM, Chris Leonard cjlhomeaddr...@gmail.com mailto:cjlhomeaddr...@gmail.com wrote: So if this is the ClassRoom Broadcast client. Is it set up for i18n / L10n also? Yes, although Ariel (CCed) needs to give pootle commit permissions. Cheers. cjl On Tue, Jan 24, 2012 at 12:28 PM, Sugar Labs Activities activit...@sugarlabs.org mailto:activit...@sugarlabs.org wrote: Activity Homepage: http://activities.sugarlabs.org/addon/4527 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27833/classroomviewer-4.xo Release notes: *Enhancing command to get IPs (Ariel calzada ar...@activitycentral.com mailto:ar...@activitycentral.com). Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] Patch that let users set current page as homepage
--- This patch has been requested by teachers. They want to set school homepage as the browse's homepage browser.py | 21 +++-- webactivity.py | 14 -- webtoolbar.py | 12 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/browser.py b/browser.py index e1d8990..24553f5 100644 --- a/browser.py +++ b/browser.py @@ -277,11 +277,28 @@ class TabbedView(BrowserNotebook): if os.path.isfile(_LIBRARY_PATH): browser.load_uri('file://' + _LIBRARY_PATH) +elif os.path.isfile(activity.get_bundle_path() + /homepage.conf): +f = open(activity.get_bundle_path() + /homepage.conf,r) +contents = f.read().strip() +f.close() + +if contents != : +default_page = contents +else: +default_page = os.path.join(activity.get_bundle_path(),data/index.html) + +browser.load_uri(default_page) else: -default_page = os.path.join(activity.get_bundle_path(), -data/index.html) +default_page = os.path.join(activity.get_bundle_path(),data/index.html) browser.load_uri(default_page) +def change_homepage(self): +browser = self.current_browser +ui_uri = browser.get_url_from_nsiuri(browser.progress.location) +f = open ( activity.get_bundle_path() + /homepage.conf,w) +f.write(ui_uri) +f.close() + def _get_current_browser(self): return self.get_nth_page(self.get_current_page()) diff --git a/webactivity.py b/webactivity.py index eefb169..0a65cb0 100644 --- a/webactivity.py +++ b/webactivity.py @@ -174,6 +174,8 @@ from browser import TabbedView from webtoolbar import PrimaryToolbar from edittoolbar import EditToolbar from viewtoolbar import ViewToolbar +from hometoolbar import HomeToolbar + import downloadmanager # TODO: make the registration clearer SL #3087 @@ -237,11 +239,10 @@ class WebActivity(activity.Activity): self._primary_toolbar = PrimaryToolbar(self._tabbed_view, self) self._edit_toolbar = EditToolbar(self) self._view_toolbar = ViewToolbar(self) +self._home_toolbar = HomeToolbar(self) self._primary_toolbar.connect('add-link', self._link_add_button_cb) -self._primary_toolbar.connect('go-home', self._go_home_button_cb) - if NEW_TOOLBARS: logging.debug('Using new toolbars') @@ -257,6 +258,12 @@ class WebActivity(activity.Activity): self._primary_toolbar.toolbar.insert( view_toolbar_button, 2) +home_toolbar_button = ToolbarButton( +page=self._home_toolbar, +icon_name='go-home') +self._primary_toolbar.toolbar.insert( +home_toolbar_button, 3) + self._primary_toolbar.show_all() self.set_toolbar_box(self._primary_toolbar) else: @@ -508,6 +515,9 @@ class WebActivity(activity.Activity): def _go_home_button_cb(self, button): self._tabbed_view.load_homepage() +def _change_home_button_cb(self, button): +self._tabbed_view.change_homepage() + def _key_press_cb(self, widget, event): key_name = gtk.gdk.keyval_name(event.keyval) browser = self._tabbed_view.props.current_browser diff --git a/webtoolbar.py b/webtoolbar.py index a4623be..bae4636 100644 --- a/webtoolbar.py +++ b/webtoolbar.py @@ -228,9 +228,6 @@ class PrimaryToolbar(ToolbarBase): 'add-link': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])), -'go-home': (gobject.SIGNAL_RUN_FIRST, - gobject.TYPE_NONE, - ([])), } def __init__(self, tabbed_view, act): @@ -249,12 +246,6 @@ class PrimaryToolbar(ToolbarBase): else: toolbar = self -self._go_home = ToolButton('go-home') -self._go_home.set_tooltip(_('Home page')) -self._go_home.connect('clicked', self._go_home_cb) -toolbar.insert(self._go_home, -1) -self._go_home.show() - self.entry = WebEntry() self.entry.set_icon_from_name(iconentry.ICON_ENTRY_SECONDARY, 'browse-dialog-cancel') @@ -406,9 +397,6 @@ class PrimaryToolbar(ToolbarBase): browser.load_uri(entry.props.text) browser.grab_focus() -def _go_home_cb(self, button): -self.emit('go-home') - def _go_back_cb(self, button): browser = self._tabbed_view.props.current_browser browser.web_navigation.goBack() -- 1.7.5.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Happy Holidays fruitful break
+1 Enviado desde un dispositivo BlackBerry® de Tigo -Original Message- From: Sameer Verma sve...@sfsu.edu Sender: sugar-devel-boun...@lists.sugarlabs.org Date: Sat, 24 Dec 2011 11:46:21 To: Martin Langhoffmar...@laptop.org Cc: OLPC Develde...@lists.laptop.org; sugar-develsugar-devel@lists.sugarlabs.org Subject: Re: [Sugar-devel] Happy Holidays fruitful break On Sat, Dec 24, 2011 at 11:19 AM, Martin Langhoff mar...@laptop.org wrote: Hope everyone in the Sugar and OLPC world is enjoying a happy holiday, in peace, safety and good company. If you are hiding away from the family with your laptop, I wish you a very fruitful time too. A number of people in the OLPC world are working hard at this time of the year, in deployments, in software development and in so many other areas. Some things have a demanding rhythm that never stops. My toast is to this beautiful group of mad people. Find a way to stop and relax. Recharge that battery. Hug someone close to you; put the laptop aside and let yourself be hugged. cheers, m { Martin Langhoff - one laptop per child } ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel +1, and don't forget to drink to good health and happiness :-) Sameer ___ 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] Hello
Sorry for not mentioned about my work. I'm from Colombia and i'm working for Activity Central, developing activities. Regards, Ariel Calazada On Tue, Nov 29, 2011 at 10:41 AM, Martin Abente martin.abente.lah...@gmail.com wrote: Welcome Ariel! PS: Are you related to the OLPC project in Colombia? On Tue, Nov 29, 2011 at 12:35 PM, Ariel Calzada ariel.calz...@gmail.com wrote: Hi i'm new on this list. I hope to enjoy the work. Have fun Regards, Ariel Calzada Colombia ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Sólo hay una guerra que puede permitirse el ser humano: la guerra contra su extinción. Isaac Asimov ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel