Re: [Sugar-devel] [PATCH jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
On Tue, Jun 7, 2011 at 7:16 AM, Gonzalo Odiard wrote: > Kushal, my user in git is godiard Done , thanks for the help :) Kushal -- http://fedoraproject.org http://kushaldas.in ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] heads up re proposed View Source changes
On Mon, Jun 6, 2011 at 10:47 PM, Christian Marc Schmidt < christianm...@gmail.com> wrote: > Hi Walter--it may be best to discuss this during an IRC session since > I'm having difficulty understanding the functionality... :) Maybe we > could schedule a review for this Sunday? > Sure. I will be tied up in the AM Sunday -- doing a charity bike ride, but will try to get on line as soon as I can. -walter > > Christian > > > On Mon, Jun 6, 2011 at 11:40 AM, Walter Bender > wrote: > > Please see: > > > http://wiki.sugarlabs.org/go/Design_Team/Proposals/Toolbars/View-Source_Enhancements > > > > There are a series of patches I sent today to sugar-devel you could apply > if > > you are interested in trying it. > > > > My outstanding questions (above and beyond the ones you may have): > > > > * The graphical overlay I use for indicating that an activity is a copy > is > > not as clear as I'd like; > > * I don't include a mechanism for copying Sugar source since I am not > sure > > how best to deal with error recovery (I could copy site_packages to ~ and > > set the Python sys.path to look in ~ before looking in /usr/lib/python, > but > > if the user makes a mess of their Sugar environment, how should they > > recover? In the case of Activities, they have the original and the copy.) > > * I didn't include /usr/share/sugar in the Sugar view source but should > > probably include at least some of the subdirectories there. > > > > regards. > > > > -walter > > > > -- > > Walter Bender > > Sugar Labs > > http://www.sugarlabs.org > > > > > > > > -- > anyth...@christianmarcschmidt.com > 917/ 575 0013 > > http://www.christianmarcschmidt.com > http://www.facebook.com/christianmarcschmidt > http://www.linkedin.com/in/christianmarcschmidt > http://twitter.com/cms_ > Skype: christianmarcschmidt > ___ > 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
Re: [Sugar-devel] heads up re proposed View Source changes
Hi Walter--it may be best to discuss this during an IRC session since I'm having difficulty understanding the functionality... :) Maybe we could schedule a review for this Sunday? Christian On Mon, Jun 6, 2011 at 11:40 AM, Walter Bender wrote: > Please see: > http://wiki.sugarlabs.org/go/Design_Team/Proposals/Toolbars/View-Source_Enhancements > > There are a series of patches I sent today to sugar-devel you could apply if > you are interested in trying it. > > My outstanding questions (above and beyond the ones you may have): > > * The graphical overlay I use for indicating that an activity is a copy is > not as clear as I'd like; > * I don't include a mechanism for copying Sugar source since I am not sure > how best to deal with error recovery (I could copy site_packages to ~ and > set the Python sys.path to look in ~ before looking in /usr/lib/python, but > if the user makes a mess of their Sugar environment, how should they > recover? In the case of Activities, they have the original and the copy.) > * I didn't include /usr/share/sugar in the Sugar view source but should > probably include at least some of the subdirectories there. > > regards. > > -walter > > -- > Walter Bender > Sugar Labs > http://www.sugarlabs.org > > -- anyth...@christianmarcschmidt.com 917/ 575 0013 http://www.christianmarcschmidt.com http://www.facebook.com/christianmarcschmidt http://www.linkedin.com/in/christianmarcschmidt http://twitter.com/cms_ Skype: christianmarcschmidt ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
Kushal, my user in git is godiard Gonzalo On Mon, Jun 6, 2011 at 10:14 PM, Gonzalo Odiard wrote: > Yes, I think there are one or two pending patches. > If you give me commit access, I can help you with reviews and releases. > > Gonzalo > > > > On Mon, Jun 6, 2011 at 6:48 PM, Daniel Drake wrote: > >> On 6 June 2011 19:28, Kushal Das wrote: >> > Thanks for the patch. >> > Do you have free time to co-maintain Jukebox ? I am not being able to >> > spend enough time with it and need help to maintain it. >> >> Gonzalo Odiard could probably help out with basic maintenance. Would that >> be OK? >> >> Thanks >> Daniel >> ___ >> 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 jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
Yes, I think there are one or two pending patches. If you give me commit access, I can help you with reviews and releases. Gonzalo On Mon, Jun 6, 2011 at 6:48 PM, Daniel Drake wrote: > On 6 June 2011 19:28, Kushal Das wrote: > > Thanks for the patch. > > Do you have free time to co-maintain Jukebox ? I am not being able to > > spend enough time with it and need help to maintain it. > > Gonzalo Odiard could probably help out with basic maintenance. Would that > be OK? > > Thanks > Daniel > ___ > 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] Adjusted some owners in trac
> -Original Message- > From: sugar-devel-boun...@lists.sugarlabs.org [mailto:sugar-devel- > boun...@lists.sugarlabs.org] On Behalf Of Simon Schampijer > Sent: Monday, June 06, 2011 6:51 AM > To: Sugar Devel > Subject: [Sugar-devel] Adjusted some owners in trac > > Hi, > > I adjusted those two component owners in trac. In both cases Gonzalo have been > doing work and bug fixes and maintainership has been given over. +1. Gonzalo has been doing great work. He brings three important skills to the game: 1. The technical ability to solve issues 2. The engineering ability to assess what issues are important and what issues are not important. 3. The social ability to work effectively in an open source community from within a OLPC Nice work and nice decision :) david > Read: Sayamindu---> Gonzalo Odiard > > Write: uwog ---> Gonzalo Odiard > > Regards, > Simon > ___ > 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] Sugar Digest 2011-06-06
==Sugar Digest== 1. I was in Brussels last week to attend TedxKids@Brussels [ http://www.tedxkids.be/]. I have to admit that I was not very anxious to make yet another trip across the Atlantic Ocean, but I had made a commitment to run a workshop for roughly 50 ten-year-old children, whose parents would be attending the Tedx lectures. (My former colleague at MIT, Dan Ariely has done some nice studies on “time discounting” that explain why is it easy to make such commitments far in advance while dreading them when the actual event is just around the corner.) While I was not at all surprised that I would enjoy working with the children—we spent an intense 45 minutes exploring Turtle Blocks—I was very pleasantly surprised at the quality of the program overall. One speaker after another demonstrated some tangible aspect of Constructionist learning (although few actually referred to Papert et al.). The children built sensors, did 3-D printing, build robots, programmed, wrote music, and generally had a blast. Here are a couple of examples of what the kids did: http://wiki.sugarlabs.org/go/File:TB-Brussels-1.png http://wiki.sugarlabs.org/go/File:TB-Brussels-2.png While I was impressed by how far the children got in such a short time, I continue to struggle with how to make the experience of debugging paramount. Too often I have seen children using graphical programming environments just pushing around blocks in a rote manner to achieve some visual effect but with little understanding of how things work such that they can make systemic changes. I was inspired to write a simple Turtle Blocks example that incorporates sensor input in a way that requires little if any calibration, hence it is readily accessible to newbie programmers and gives them lots of places in the code in which they can made meaningful interventions. [[0, ["start", 2.0], 766, 0, [null, 1]], [1, "forever", 766, 42, [0, 26, null]], [2, "repeat", 827, 270, [9, 3, 24, null]], [3, ["number", 80], 877, 270, [2, null]], [4, ["vspace", 0], 891, 456, [20, 5]], [5, "forward", 891, 498, [4, 8, 6]], [6, "right", 891, 540, [5, 7, 11]], [7, ["number", 91], 949, 540, [6, null]], [8, "box1", 961, 498, [5, null]], [9, "storeinbox1", 827, 228, [21, 10, 2]], [10, ["number", 10], 945, 228, [9, null]], [11, "storeinbox1", 891, 582, [6, 14, null]], [12, ["number", 10], 1063, 624, [14, null]], [13, "box1", 1063, 582, [14, null]], [14, ["plus2", 0], 1009, 582, [11, 13, 12]], [15, ["division2", 0], 996, 414, [20, 19, 18]], [16, "setcolor", 891, 372, [24, 17, 20]], [17, "heading", 969, 372, [16, null]], [18, ["number", 100], 1074, 456, [15, null]], [19, "volume", 1050, 414, [15, null]], [20, "setpensize", 891, 414, [16, 15, 4]], [21, ["fillscreen", 0], 827, 144, [26, 22, 23, 9]], [22, ["number", 60], 913, 144, [21, null]], [23, ["number", 80], 913, 186, [21, null]], [24, "wait", 891, 330, [2, 25, 16]], [25, ["number", 0.25], 949, 330, [24, null]], [26, ["setxy2", 0], 827, 60, [1, 27, 28, 21]], [27, ["number", 0], 885, 60, [26, null]], [28, ["number", 0], 885, 102, [26, null]]] I also wrote a simple sample program [ http://git.sugarlabs.org/turtleart/mainline/blobs/master/samples/scratch.ta] (including in Turtle Blocks Version 108) that emulates some basic Scratch functionality in Turtle Blocks: animating a character sprite across a background image. The idea is to reveal the underlying mechanics of a typical Scratch experience. My hope is that it will make less opaque some of the black-box-like operators so popular in Scratch. I still struggle with the question of how to entice teachers and students to embrace programming through simple modifications to the programs they are using, which brings me to the next topic. 2. I cleaned up my patches to the Sugar View-source mechanism [[ http://wiki.sugarlabs.org/go/Design_Team/Proposals/Toolbars/View-Source_Enhancements]]: (1) Sugar platform source code can be viewed through the same mechanism as Sugar activity code; and (2) the source code can be copied to create an end-user modifiable version of any Sugar activity. The Sugar source code simply appears along side the activity source code, under a second radio button on the View Source toolbar. The copy function is invoked through a secondary menu available under the activity radio button on the View Source toolbar. At the suggestion of Ana Cichero and with help from Manuel Quiñones I modify the icon of the local copy of an activity so that it is readily apparent which version is the one to be modified by the end user. I am still a bit up in the air regarding how to best enable the actual modifications. I am considering adding a file chooser to the Edit activity in order to facilitate writeable access to the source directly from Sugar (without having to open the Terminal activity). My bigger conundrum is in regard to modifying the Sugar platform source. While it is as easy to modify as activity code, the consequences of making a mistake can be dire: Sugar could brea
Re: [Sugar-devel] [PATCH jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
On 6 June 2011 19:28, Kushal Das wrote: > Thanks for the patch. > Do you have free time to co-maintain Jukebox ? I am not being able to > spend enough time with it and need help to maintain it. Gonzalo Odiard could probably help out with basic maintenance. Would that be OK? Thanks Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] removing imports that prevented launching
On Mon, Jun 6, 2011 at 3:05 PM, Rafael Ortiz wrote: > Hi. > > On Mon, Jun 6, 2011 at 8:27 AM, Gonzalo Odiard wrote: > >> Hmmm, sorry, I can't remove BeautifulSoup from epubview.py neither :) >> It's used to do text to speach in epub files. >> >> Gonzalo >> >> >> I'm failing to find the BeautifulSoup module on > mainline, maybe it was deleted a long the way ? > > > Just talked with gonzalo, this seems like python-BeautifulSoup, dependency lacking at distro level. > On Mon, Jun 6, 2011 at 10:14 AM, Gonzalo Odiard wrote: >> >>> Hi Rafael, >>> I can remove the use of BeautifulSoup in epubview.py, >>> but in jobs.py is used to search. >>> It's strange you can't use it in sugar 0.88, because the import is in the >>> initial >>> commit from Sayamindu when he added epub suppport, two years ago. >>> >>> git show 9760c4c9 >>> >>> commit 9760c4c9acdf0ea1cf4c57ded8c65eb4390ca171 >>> Author: Sayamindu Dasgupta >>> Date: Tue Jul 21 01:14:46 2009 +0530 >>> >>> Added epubview from upstream >>> >>> BeautifulSoup is used in GetBooks too. >>> >>> Gonzalo >>> >>> >>> >>> On Sat, Jun 4, 2011 at 7:22 PM, Rafael Ortiz >> > wrote: >>> removing BeautifulSoup imports that prevented launch, this regression can affect epubview. --- epubview/epubview.py |1 - epubview/jobs.py |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/epubview/epubview.py b/epubview/epubview.py index 432c332..cec56c5 100644 --- a/epubview/epubview.py +++ b/epubview/epubview.py @@ -22,7 +22,6 @@ import widgets import os.path import math import shutil -import BeautifulSoup from epub import _Epub from jobs import _JobPaginator as _Paginator diff --git a/epubview/jobs.py b/epubview/jobs.py index a0b6771..779b69c 100644 --- a/epubview/jobs.py +++ b/epubview/jobs.py @@ -23,7 +23,6 @@ import cairo import math import os.path -import BeautifulSoup import epub -- 1.7.4.1 ___ 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] Browse: Set and restore index in the history - Fix OLPC #10779
From: Gonzalo Odiard If the user go back, or select any page in the history and close the activity, need restore at the next start, the history, and the index in the history too. --- browser.py |6 ++ webactivity.py | 24 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/browser.py b/browser.py index b9c1f69..9bb7a1b 100644 --- a/browser.py +++ b/browser.py @@ -351,6 +351,12 @@ class Browser(WebView): interfaces.nsIMarkupDocumentViewer) markupDocumentViewer.fullZoom -= _ZOOM_AMOUNT +def get_history_index(self): +return self.web_navigation.sessionHistory.index + +def set_history_index(self, index): +self.web_navigation.gotoIndex(index) + class PopupDialog(gtk.Window): def __init__(self): diff --git a/webactivity.py b/webactivity.py index 48cb3ed..8619144 100644 --- a/webactivity.py +++ b/webactivity.py @@ -458,6 +458,12 @@ class WebActivity(activity.Activity): link['owner'], -1, link['hash']) logging.debug('## reading %s', data) self._tabbed_view.set_session(self.model.data['history']) +tab_number = 0 +for current in self.model.data['currents']: +browser = self._tabbed_view.get_nth_page(tab_number) +browser.set_history_index(current['index']) +tab_number = tab_number + 1 + self._tabbed_view.set_current_page(self.model.data['current_tab']) elif self.metadata['mime_type'] == 'text/uri-list': data = self._get_data_from_file_path(file_path) @@ -469,19 +475,6 @@ class WebActivity(activity.Activity): 'list of multiple uris by now.') else: self._tabbed_view.props.current_browser.load_uri(file_path) -self._load_urls() - -def _load_urls(self): -if self.model.data['currents'] != None: -first = True -for current_tab in self.model.data['currents']: -if first: -browser = self._tabbed_view.current_browser -first = False -else: -browser = Browser() -self._tabbed_view._append_tab(browser) -browser.load_uri(current_tab['url']) def write_file(self, file_path): if not self.metadata['mime_type']: @@ -505,7 +498,10 @@ class WebActivity(activity.Activity): if n_browser != None: nsiuri = browser.progress.location ui_uri = browser.get_url_from_nsiuri(nsiuri) -info = {'title': browser.props.title, 'url': ui_uri} +index = browser.get_history_index() +info = {'title': browser.props.title, 'url': ui_uri, +'index': index} + self.model.data['currents'].append(info) f = open(file_path, 'w') -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] removing imports that prevented launching
Hi. On Mon, Jun 6, 2011 at 8:27 AM, Gonzalo Odiard wrote: > Hmmm, sorry, I can't remove BeautifulSoup from epubview.py neither :) > It's used to do text to speach in epub files. > > Gonzalo > > > I'm failing to find the BeautifulSoup module on mainline, maybe it was deleted a long the way ? On Mon, Jun 6, 2011 at 10:14 AM, Gonzalo Odiard wrote: > >> Hi Rafael, >> I can remove the use of BeautifulSoup in epubview.py, >> but in jobs.py is used to search. >> It's strange you can't use it in sugar 0.88, because the import is in the >> initial >> commit from Sayamindu when he added epub suppport, two years ago. >> >> git show 9760c4c9 >> >> commit 9760c4c9acdf0ea1cf4c57ded8c65eb4390ca171 >> Author: Sayamindu Dasgupta >> Date: Tue Jul 21 01:14:46 2009 +0530 >> >> Added epubview from upstream >> >> BeautifulSoup is used in GetBooks too. >> >> Gonzalo >> >> >> >> On Sat, Jun 4, 2011 at 7:22 PM, Rafael Ortiz >> wrote: >> >>> removing BeautifulSoup imports that prevented launch, >>> this regression can affect epubview. >>> --- >>> epubview/epubview.py |1 - >>> epubview/jobs.py |1 - >>> 2 files changed, 0 insertions(+), 2 deletions(-) >>> >>> diff --git a/epubview/epubview.py b/epubview/epubview.py >>> index 432c332..cec56c5 100644 >>> --- a/epubview/epubview.py >>> +++ b/epubview/epubview.py >>> @@ -22,7 +22,6 @@ import widgets >>> import os.path >>> import math >>> import shutil >>> -import BeautifulSoup >>> >>> from epub import _Epub >>> from jobs import _JobPaginator as _Paginator >>> diff --git a/epubview/jobs.py b/epubview/jobs.py >>> index a0b6771..779b69c 100644 >>> --- a/epubview/jobs.py >>> +++ b/epubview/jobs.py >>> @@ -23,7 +23,6 @@ import cairo >>> >>> import math >>> import os.path >>> -import BeautifulSoup >>> >>> import epub >>> >>> -- >>> 1.7.4.1 >>> >>> ___ >>> 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] customize icon patch
On Mon, Jun 6, 2011 at 1:31 PM, Walter Bender wrote: > Alas, git send-email would accept this patch. Please see the attach patch > (and icon). This icon is used by the new View Source copy bundle code. > > regards. > > In these cases you can use the --no-validate flag. hth. -walter > > -- > Walter Bender > Sugar Labs > http://www.sugarlabs.org > > > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] heads up re proposed View Source changes
Please see: http://wiki.sugarlabs.org/go/Design_Team/Proposals/Toolbars/View-Source_Enhancements There are a series of patches I sent today to sugar-devel you could apply if you are interested in trying it. My outstanding questions (above and beyond the ones you may have): * The graphical overlay I use for indicating that an activity is a copy is not as clear as I'd like; * I don't include a mechanism for copying Sugar source since I am not sure how best to deal with error recovery (I could copy site_packages to ~ and set the Python sys.path to look in ~ before looking in /usr/lib/python, but if the user makes a mess of their Sugar environment, how should they recover? In the case of Activities, they have the original and the copy.) * I didn't include /usr/share/sugar in the Sugar view source but should probably include at least some of the subdirectories there. regards. -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] customize icon patch
Alas, git send-email would accept this patch. Please see the attach patch (and icon). This icon is used by the new View Source copy bundle code. regards. -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org 0001-adding-new-customize-icon-used-when-copying-bundle-s.patch Description: Binary data <>___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
On Mon, Jun 6, 2011 at 10:28 PM, Daniel Drake wrote: > As noted at http://bugs.sugarlabs.org/ticket/2853 > Jukebox often crashes when loading content or shows its content in the > wrong window. > > This is because it is calling into GTK+ from the gstreamer thread, > without taking the appropriate locks. Thanks for the patch. Do you have free time to co-maintain Jukebox ? I am not being able to spend enough time with it and need help to maintain it. Kushal -- http://fedoraproject.org http://kushaldas.in ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] account for exec in subpath
From: Walter Bender --- src/jarabe/view/viewsource.py |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index 661ad61..0b851a6 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -132,8 +132,9 @@ class ViewSource(gtk.Window): activity_bundle = ActivityBundle(bundle_path) command = activity_bundle.get_command() if len(command.split(' ')) > 1: -name = command.split(' ')[1].split('.')[0] -file_name = name + '.py' +name = command.split(' ')[1].split('.')[-1] +tmp_path = command.split(' ')[1].replace('.', '/') +file_name = tmppath[0:-(len(name) + 1)] + '.py' path = os.path.join(activity_bundle.get_path(), file_name) self._selected_file = path -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] consistent use of _logger.debug
From: Walter Bender --- src/jarabe/view/viewsource.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index 6f0a36c..661ad61 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -96,7 +96,7 @@ class ViewSource(gtk.Window): def __init__(self, window_xid, bundle_path, document_path, title): gtk.Window.__init__(self) -logging.debug('ViewSource paths: %r %r', bundle_path, document_path) +_logger.debug('ViewSource paths: %r %r', bundle_path, document_path) self.set_decorated(False) self.set_position(gtk.WIN_POS_CENTER_ALWAYS) -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] prevent view source display of .pyo, .pyc, .so files (#2854)
From: Walter Bender --- src/jarabe/view/viewsource.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index a1c0be3..c7e6247 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -388,8 +388,7 @@ class FileViewer(gtk.ScrolledWindow): def _add_dir_to_model(self, dir_path, parent=None): model = self._tree_view.get_model() for f in os.listdir(dir_path): -if not f.endswith('.pyc'): +if not f.endswith(('.pyc', '.pyo', '.so', '~')): full_path = os.path.join(dir_path, f) if os.path.isdir(full_path): new_iter = model.append(parent, [f, full_path]) -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] don't return if HandleViewSource service available
From: Walter Bender --- src/jarabe/view/viewsource.py |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index c7e6247..6f0a36c 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -48,7 +48,6 @@ def setup_view_source(activity): if service is not None: try: service.HandleViewSource() -return except dbus.DBusException, e: expected_exceptions = ['org.freedesktop.DBus.Error.UnknownMethod', 'org.freedesktop.DBus.Python.NotImplementedError'] -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] adding sugar source radio button to view source toolbar
From: Walter Bender --- src/jarabe/view/viewsource.py | 115 1 files changed, 92 insertions(+), 23 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index c1d8f30..5cf4870 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -1,5 +1,6 @@ # Copyright (C) 2008 One Laptop Per Child # Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer +# Copyright (C) 2011 Walter Bender # # 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 @@ -16,6 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os +import sys import subprocess import logging from gettext import gettext as _ @@ -86,8 +88,16 @@ def setup_view_source(activity): _logger.debug('Activity with neither a bundle_path nor a document_path') return +sugar_source_paths = [None] +for path in sys.path: +if path.endswith('site-packages'): +sugar_source_paths = [os.path.join(path, 'jarabe'), + os.path.join(path, 'sugar')] +# Should we add /usr/share/sugar as well? +break + view_source = ViewSource(window_xid, bundle_path, document_path, - activity.get_title()) + sugar_source_paths, activity.get_title()) map_activity_to_window[window_xid] = view_source view_source.show() @@ -95,7 +105,8 @@ def setup_view_source(activity): class ViewSource(gtk.Window): __gtype_name__ = 'SugarViewSource' -def __init__(self, window_xid, bundle_path, document_path, title): +def __init__(self, window_xid, bundle_path, document_path, + sugar_source_paths, title): gtk.Window.__init__(self) _logger.debug('ViewSource paths: %r %r', bundle_path, document_path) @@ -118,7 +129,7 @@ class ViewSource(gtk.Window): self.add(vbox) vbox.show() -toolbar = Toolbar(title, bundle_path, document_path) +toolbar = Toolbar(title, bundle_path, document_path, sugar_source_paths) vbox.pack_start(toolbar, expand=False) toolbar.connect('stop-clicked', self.__stop_clicked_cb) toolbar.connect('source-selected', self.__source_selected_cb) @@ -128,7 +139,8 @@ class ViewSource(gtk.Window): vbox.pack_start(pane) pane.show() -self._selected_file = None +self._selected_bundle_file = None +self._selected_sugar_file = None file_name = '' activity_bundle = ActivityBundle(bundle_path) @@ -138,17 +150,31 @@ class ViewSource(gtk.Window): tmppath = command.split(' ')[1].replace('.', '/') file_name = tmppath[0:-(len(name) + 1)] + '.py' path = os.path.join(activity_bundle.get_path(), file_name) -self._selected_file = path +self._selected_bundle_file = path + +# Split the tree pane into two vertical panes, one of which +# will be hidden +tree_panes = gtk.VPaned() +tree_panes.show() + +self._bundle_source_viewer = FileViewer(bundle_path, file_name) +self._bundle_source_viewer.connect('file-selected', + self.__file_selected_cb) +tree_panes.add1(self._bundle_source_viewer) +self._bundle_source_viewer.show() -self._file_viewer = FileViewer(bundle_path, file_name) -self._file_viewer.connect('file-selected', self.__file_selected_cb) -pane.add1(self._file_viewer) -self._file_viewer.show() +self._sugar_source_viewer = FileViewer(sugar_source_paths, None) +self._sugar_source_viewer.connect('file-selected', + self.__file_selected_cb) +tree_panes.add2(self._sugar_source_viewer) +self._sugar_source_viewer.hide() + +pane.add1(tree_panes) self._source_display = SourceDisplay() pane.add2(self._source_display) self._source_display.show() -self._source_display.file_path = self._selected_file +self._source_display.file_path = self._selected_bundle_file if document_path is not None: self._select_source(document_path) @@ -175,12 +201,21 @@ class ViewSource(gtk.Window): def _select_source(self, path): if os.path.isfile(path): +_logger.debug('_select_source called with file: %r', path) self._source_display.file_path = path -self._file_viewer.hide() -else: -self._file_viewer.set_path(path) -self._source_display.file_path = self._selected_file -self._file_viewer.show() +self._bundle_source_viewer.hide() +self._sugar_source_viewer.hide() +elif os.path.isdir(path): +_logger.de
[Sugar-devel] [PATCH] cleaned up grammar of debug message
From: Walter Bender --- src/jarabe/view/viewsource.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py index 0b851a6..a9f6e12 100644 --- a/src/jarabe/view/viewsource.py +++ b/src/jarabe/view/viewsource.py @@ -81,7 +81,7 @@ def setup_view_source(activity): logging.exception('Exception occured in GetDocumentPath():') if bundle_path is None and document_path is None: -_logger.debug('Activity without bundle_path nor document_path') +_logger.debug('Activity with neither a bundle_path nor a document_path') return view_source = ViewSource(window_xid, bundle_path, document_path, -- 1.7.4.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] adding copy submenu to viewsource
From: Walter Bender --- src/jarabe/view/Makefile.am |1 + src/jarabe/view/custombundle.py | 169 +++ src/jarabe/view/viewsource.py | 37 +++-- 3 files changed, 200 insertions(+), 7 deletions(-) create mode 100644 src/jarabe/view/custombundle.py diff --git a/src/jarabe/view/Makefile.am b/src/jarabe/view/Makefile.am index 1abea6d..b38b382 100644 --- a/src/jarabe/view/Makefile.am +++ b/src/jarabe/view/Makefile.am @@ -3,6 +3,7 @@ sugar_PYTHON = \ __init__.py \ buddyicon.py\ buddymenu.py\ + custombundle.py \ keyhandler.py \ launcher.py \ palettes.py \ diff --git a/src/jarabe/view/custombundle.py b/src/jarabe/view/custombundle.py new file mode 100644 index 000..e61a030 --- /dev/null +++ b/src/jarabe/view/custombundle.py @@ -0,0 +1,169 @@ +# Copyright (C) 2011 Walter Bender +# +# 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 os +import subprocess +import gtk + +import logging +_logger = logging.getLogger('ViewSource') + +CUSTOMICON = 'customize.svg' +RESCALE = ' \n' + + +def customize_bundle(home_activities, new_bundle_name): +''' Modify bundle_id in new activity.info file. ''' +fd_old = open(os.path.join(home_activities, new_bundle_name, + 'activity', 'activity.info'), 'r') +fd_new = open(os.path.join(home_activities, new_bundle_name, + 'activity', 'new_activity.info'), 'w') +for line in fd_old: +tokens = line.split('=') + if tokens[0].rstrip() == 'bundle_id': +new_bundle_id = tokens[1].strip() + '_my_copy' + fd_new.write('%s = %s\n' % (tokens[0].rstrip(), new_bundle_id)) + elif tokens[0].rstrip() == 'icon': +old_icon_name = tokens[1].strip() + new_icon_name = 'My' + old_icon_name + fd_new.write('%s = %s\n' % (tokens[0].rstrip(), new_icon_name)) + else: +fd_new.write(line) +fd_old.close +fd_new.close +command_line = ['mv', os.path.join(home_activities, new_bundle_name, + 'activity', 'new_activity.info'), + os.path.join(home_activities, new_bundle_name, +'activity', 'activity.info')] +_logger.debug(subprocess.call(command_line)) + +_custom_icon(home_activities, new_bundle_name, old_icon_name, +new_icon_name) + + +def _custom_icon(home_activities, new_bundle_name, old_icon_name, + new_icon_name): +''' Modify new activity icon by overlaying custom icon. ''' + +# First, find customize.svg, which will be used as an overlay. +for path in gtk.icon_theme_get_default().get_search_path(): +if os.path.exists(os.path.join(path, 'sugar', 'scalable', 'actions', + CUSTOMICON)): +break +else: +path = None + +if path == None: +_logger.debug('customize.svg not found') +command_line = ['mv', os.path.join(home_activities, new_bundle_name, + 'activity', old_icon_name + '.svg'), +os.path.join(home_activities, new_bundle_name, + 'activity', new_icon_name + '.svg')] +_logger.debug(subprocess.call(command_line)) +return + +# Extract custom_svg, i.e., the 'payload' from the svg file. +fd_custom = open(os.path.join(path, 'sugar', 'scalable', 'actions', +CUSTOMICON), 'r') + +custom_svg = '' +found_begin_svg_tag = False +found_close_tag = False +found_end_svg_tag = False + +for line in fd_custom: +if not found_begin_svg_tag: +if line.count(' 0: +found_begin_svg_tag = True +partials = line.split('', '', None) +else: +pass +elif not found_close_tag: +found_close_tag, temp_string = _find_and_split( +line, '>', '', None) +temp_string = '' +elif not found_end_svg_tag: +custom_sv
[Sugar-devel] view source patch series
I have done an overhaul of viewsource in order to fix a few bugs and to add two major enhancements: (1) an option to copy bundle_source into a new activity; and (2) the ability to view Sugar source. The minor bug fixes include: * Accounting for a bundle exec path that is not in the root directory (#2846) * Cleaning up the grammar of debug message * Making consistent use of _logger.debug * Not returning if HandleViewSource service available (#2862) * Preventing view source display of .pyo, .pyc, .so, .mo and ~ files (#2854) The two enhancements are: * Add copy submenu to viewsource (#2859) * Add view Sugar source to viewsource Note that an additional patch (sent in a separate email) adds a new icon used as an overlay when copying the bundle. This is at the suggestion of Ana Cichero with help from Manuel Quiñones. -walter ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [DESIGN] NetworkManager / Neighborhood design changes
On 5 Jun 2011, at 15:14, Sascha Silbe wrote: > Porting Sugar to the NetworkManager 0.9 API and enabling new use cases > (including connecting to networks with hidden SSIDs) requires some design > changes in both the Neighborhood and the Frame. To get everyone on the same > page, I will first give an overview of the NetworkManager API and list the > (new) requirements. The suggested design changes and open questions will be > discussed in detail during the upcoming Design Team meeting. > > NM 0.9 API > > Types of objects: > > • Devices: Wired, Wireless, Modem, Bluetooth (DUN/PAN), OlpcMesh, WiMax > • Access Points (Wireless), NSPs (WiMax) > • Settings > • Active Connections > • VPN Connections > • VPN Plugins > Activating a connection requires: > > • a connection (setting?) > • a device (except for VPN) > • for wifi: access point (can be chosen automatically) > • for VPN: path of active connection ("base" connection) > Global states: > > • unknown > • no connectivity (asleep, disconnected, disconnecting) > • local, site, global connectivity > Devices can be disconnected; no further automatic connection activation will > happen for this specific device. > > VPN connections can be disconnected, regular connections can be deactivated. > > Wifi connections can be restricted to a single BSSID (expose in key dialog?) > > Networking can be globally en/disabled both totally and for classes of > hardware (wifi, wwan=GSM/3G, wimax). > > Requirements > > • Ability to activate a specific connection if multiple connections are > available for a device / access point > • Ability to prevent automatic reconnections for a device (either via > using the Disconnect() call for the device or disabling the entire hardware > class); preferably happens by default > • Easy access to powering down a device class > • Ability to restrict a connection to a single AP (BSSID) > Nice to have > > • Ability to add a new connection for a device / AP that already has a > configured connection > Suggested design changes > > • AP palette (Neighborhood): > • If there's more than one connection, list all of them. > Selecting the connection activates it. > • If there's at least one connection, show option "Add another > connection" > • Wireless device palette (Frame): > • New option "Connect to hidden network". Once the connection > has been successfully configured, the AP should turn up as usual in the > Neighborhood whenever it is in range (AFAIK at least). > • New option "Disable all wireless devices" resp. "Enable > wireless devices" (wording could do with some improvement). If there is more > than one wireless device, all of them will show the option and all of them > will be powered down / up when the option is selected. > • "GSM" = Modem device palette (Frame): > • Behave like the new AP palette: list of connections, "Add > another connection" > • New option to disable / enable WWAN devices, like for the > wireless device palette > • Wired device palette (Frame): > • Analogous to GSM device, but no way to en/disable all wired > devices (not supported by NM) > Potential additions > > If we have enough time to implement these, we could add support for: > > • Bluetooth (DUN/PAN) > • probably similar to modems ("GSM") > • WiMax > • probably similar to wireless > • VPN Connections > • would appear in the palette for any device that currently has > an active connection > • no support for adding new VPN connections yet > Open questions > > • Should we continue to show the "Connect" option for APs if there's at > most one connection configured or should we always show a list of > connections? Rename "Add another connection" to "Add connection" if there's > no connection configured yet? > • How do we distinguish the different connections in the list? > User-chosen name? Add a way to change the name later? > • How do we let the user configure the connection? The current globally > modal keyphrase dialog is a major usability disaster. > • Differentiated connectivity indicators (need to investigate work done > by Peter Robinson and review previous design discussion) I just wanted to follow up with a link to some discussion I had with Sascha on Sunday trying to clarify some of his points and goals regarding his NetworkManager efforts, the design meeting logs are at: http://meeting.sugarlabs.org/sugar-meeting/meetings/2011-06-05T16:17:34 A quick summary of what was covered is not so easy, other than that there were no solid design decisions made (it was only Sascha and myself at the meeting). This work will be a rather major undertaking to get right – I don't want to see th
[Sugar-devel] [PATCH jukebox] Don't call into GTK+ when setting video sink from gstreamer thread
As noted at http://bugs.sugarlabs.org/ticket/2853 Jukebox often crashes when loading content or shows its content in the wrong window. This is because it is calling into GTK+ from the gstreamer thread, without taking the appropriate locks. Fix this by following the suggestion of the gstreamer documentation, where the xid is queried earlier from the correct thread: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html --- jukeboxactivity.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/jukeboxactivity.py b/jukeboxactivity.py index fc20f2b..9366fb5 100644 --- a/jukeboxactivity.py +++ b/jukeboxactivity.py @@ -423,7 +423,9 @@ class GstPlayer(gobject.GObject): self.player.set_property('vis-plugin', vis_plug) self.overlay = None +videowidget.realize() self.videowidget = videowidget +self.videowidget_xid = videowidget.window.xid self._init_video_sink() bus = self.player.get_bus() @@ -439,7 +441,7 @@ class GstPlayer(gobject.GObject): if message.structure is None: return if message.structure.get_name() == 'prepare-xwindow-id': -self.videowidget.set_sink(message.src) +self.videowidget.set_sink(message.src, self.videowidget_xid) message.src.set_property('force-aspect-ratio', True) def on_message(self, bus, message): @@ -581,10 +583,9 @@ class VideoWidget(gtk.DrawingArea): else: return True -def set_sink(self, sink): -assert self.window.xid +def set_sink(self, sink, xid): self.imagesink = sink -self.imagesink.set_xwindow_id(self.window.xid) +self.imagesink.set_xwindow_id(xid) -- 1.7.5.2 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Record-92
Activity Homepage: http://activities.sugarlabs.org/addon/4081 Sugar Platform: 0.90 - 0.92 Download Now: http://activities.sugarlabs.org/downloads/file/27398/record-92.xo Release notes: 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] [DESIGN] copy-to-option in Journal (part of removing the keep button)
Hi Walter, On 6 Jun 2011, at 14:55, Walter Bender wrote: > On Mon, Jun 6, 2011 at 7:27 AM, Simon Schampijer wrote: > On 05/25/2011 12:49 AM, Simon Schampijer wrote: > I have now implemented everything like described below (4-7). The only > thing I need is an icon for the clipboard option. Some icon ideas: the > pin from the Physics activity, a paper clip (or is that too much Windows > Word :). Patches, mockups...welcome! Go designers go! > > Regards, > Simon > > In the design meeting it has been argued that the 'copy-to-Journal' [1] might > be misleading. And instead make it a separate function in the palette [2]. > Walter people in the meeting wanted your opinion on that? > > Was there a log of the meeting? I would be curious as to the reasoning. Yes, here's the logs: http://meeting.sugarlabs.org/sugar-meeting/2011-05-29 The previous meeting you missed ;) > I think copy-to whereever is a pretty straight foward concept; We use copy > to in the view source toolbar, so we'd be consistent with that. Personally I didn't find the concept of copying an object already in the Journal, to the Journal, a very obvious/discoverable metaphor for creating an object duplicate. We obviously need a nice icon for the duplicate option, as well as something better for clipboard. I'll try and send a couple of suggestions to this thread later. --Gary > > > I still need the icon for the clipboard. Any news on those? > > Maybe a mini-document icon superimposed on the left side of the frame icon? > > -walter > > Regards, > Simon > > [1] http://dev.laptop.org/~erikos/copy/4_copy-to.png > [2] http://dev.laptop.org/~erikos/copy/duplicate.png > > > > > > -- > Walter Bender > Sugar Labs > http://www.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] [DESIGN] copy-to-option in Journal (part of removing the keep button)
On Mon, Jun 6, 2011 at 7:27 AM, Simon Schampijer wrote: > On 05/25/2011 12:49 AM, Simon Schampijer wrote: > >> I have now implemented everything like described below (4-7). The only >> thing I need is an icon for the clipboard option. Some icon ideas: the >> pin from the Physics activity, a paper clip (or is that too much Windows >> Word :). Patches, mockups...welcome! Go designers go! >> >> Regards, >> Simon >> > > In the design meeting it has been argued that the 'copy-to-Journal' [1] > might be misleading. And instead make it a separate function in the palette > [2]. Walter people in the meeting wanted your opinion on that? > Was there a log of the meeting? I would be curious as to the reasoning. I think copy-to whereever is a pretty straight foward concept; We use copy to in the view source toolbar, so we'd be consistent with that. > I still need the icon for the clipboard. Any news on those? > Maybe a mini-document icon superimposed on the left side of the frame icon? -walter > > Regards, > Simon > > [1] http://dev.laptop.org/~erikos/copy/4_copy-to.png > [2] http://dev.laptop.org/~erikos/copy/duplicate.png > > > -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] removing imports that prevented launching
Hmmm, sorry, I can't remove BeautifulSoup from epubview.py neither :) It's used to do text to speach in epub files. Gonzalo On Mon, Jun 6, 2011 at 10:14 AM, Gonzalo Odiard wrote: > Hi Rafael, > I can remove the use of BeautifulSoup in epubview.py, > but in jobs.py is used to search. > It's strange you can't use it in sugar 0.88, because the import is in the > initial > commit from Sayamindu when he added epub suppport, two years ago. > > git show 9760c4c9 > > commit 9760c4c9acdf0ea1cf4c57ded8c65eb4390ca171 > Author: Sayamindu Dasgupta > Date: Tue Jul 21 01:14:46 2009 +0530 > > Added epubview from upstream > > BeautifulSoup is used in GetBooks too. > > Gonzalo > > > > On Sat, Jun 4, 2011 at 7:22 PM, Rafael Ortiz > wrote: > >> removing BeautifulSoup imports that prevented launch, >> this regression can affect epubview. >> --- >> epubview/epubview.py |1 - >> epubview/jobs.py |1 - >> 2 files changed, 0 insertions(+), 2 deletions(-) >> >> diff --git a/epubview/epubview.py b/epubview/epubview.py >> index 432c332..cec56c5 100644 >> --- a/epubview/epubview.py >> +++ b/epubview/epubview.py >> @@ -22,7 +22,6 @@ import widgets >> import os.path >> import math >> import shutil >> -import BeautifulSoup >> >> from epub import _Epub >> from jobs import _JobPaginator as _Paginator >> diff --git a/epubview/jobs.py b/epubview/jobs.py >> index a0b6771..779b69c 100644 >> --- a/epubview/jobs.py >> +++ b/epubview/jobs.py >> @@ -23,7 +23,6 @@ import cairo >> >> import math >> import os.path >> -import BeautifulSoup >> >> import epub >> >> -- >> 1.7.4.1 >> >> ___ >> 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] removing imports that prevented launching
Hi Rafael, I can remove the use of BeautifulSoup in epubview.py, but in jobs.py is used to search. It's strange you can't use it in sugar 0.88, because the import is in the initial commit from Sayamindu when he added epub suppport, two years ago. git show 9760c4c9 commit 9760c4c9acdf0ea1cf4c57ded8c65eb4390ca171 Author: Sayamindu Dasgupta Date: Tue Jul 21 01:14:46 2009 +0530 Added epubview from upstream BeautifulSoup is used in GetBooks too. Gonzalo On Sat, Jun 4, 2011 at 7:22 PM, Rafael Ortiz wrote: > removing BeautifulSoup imports that prevented launch, > this regression can affect epubview. > --- > epubview/epubview.py |1 - > epubview/jobs.py |1 - > 2 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/epubview/epubview.py b/epubview/epubview.py > index 432c332..cec56c5 100644 > --- a/epubview/epubview.py > +++ b/epubview/epubview.py > @@ -22,7 +22,6 @@ import widgets > import os.path > import math > import shutil > -import BeautifulSoup > > from epub import _Epub > from jobs import _JobPaginator as _Paginator > diff --git a/epubview/jobs.py b/epubview/jobs.py > index a0b6771..779b69c 100644 > --- a/epubview/jobs.py > +++ b/epubview/jobs.py > @@ -23,7 +23,6 @@ import cairo > > import math > import os.path > -import BeautifulSoup > > import epub > > -- > 1.7.4.1 > > ___ > 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] [DESIGN] copy-to-option in Journal (part of removing the keep button)
On 05/25/2011 12:49 AM, Simon Schampijer wrote: I have now implemented everything like described below (4-7). The only thing I need is an icon for the clipboard option. Some icon ideas: the pin from the Physics activity, a paper clip (or is that too much Windows Word :). Patches, mockups...welcome! Go designers go! Regards, Simon In the design meeting it has been argued that the 'copy-to-Journal' [1] might be misleading. And instead make it a separate function in the palette [2]. Walter people in the meeting wanted your opinion on that? I still need the icon for the clipboard. Any news on those? Regards, Simon [1] http://dev.laptop.org/~erikos/copy/4_copy-to.png [2] http://dev.laptop.org/~erikos/copy/duplicate.png ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Adjusted some owners in trac
Hi, I adjusted those two component owners in trac. In both cases Gonzalo have been doing work and bug fixes and maintainership has been given over. Read: Sayamindu---> Gonzalo Odiard Write: uwog ---> Gonzalo Odiard Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar] Use the same wording for the filesize of an entry without a file SL #2880
The change has no impact on existing translations, since we use as well util.format_size when no filesize is specified. --- src/jarabe/journal/listmodel.py |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jarabe/journal/listmodel.py b/src/jarabe/journal/listmodel.py index 3902eba..417ff61 100644 --- a/src/jarabe/journal/listmodel.py +++ b/src/jarabe/journal/listmodel.py @@ -163,9 +163,8 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource): try: size = int(metadata.get('filesize')) except (TypeError, ValueError): -self._cached_row.append(_('Unknown')) -else: -self._cached_row.append(util.format_size(size)) +size = None +self._cached_row.append(util.format_size(size)) try: progress = int(float(metadata.get('progress', 100))) -- 1.7.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Zoom in and out in Terminal
2011/6/4 Rafael Ortiz : > 2011/6/4 Gonzalo Odiard >> >> May be this can be a good addition to Chat, Infoslicer, Pippy and Words ;) >> > +1, we can work on adding this feature to those activities as well. +1 Next step for me is to save the zoom level of each tab between activity sessions (terminalrc file). One thing to note: the zoom step is a little arbitrary. It works for me but it may be changed, is the first time I work with pango units. Oh, and the idea came from Gonzalo, I just implemented it, based on my eye's needs :) Cheers, -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel