Re: [Sugar-devel] 32(+) XO-1's on Mesh Potato 2 as AP on XSCE
Perhaps the following links might be useful :: https://bugs.freedesktop.org/show_bug.cgi?id=51501 http://www.mail-archive.com/telepathy@lists.freedesktop.org/msg05699.html Also, I wrote a patch for Avahi, which allows to customize the TTL time, after which the disconnected buddy actually gets removed from Avahi's list :: http://people.sugarlabs.org/ajay/root/freedesktop_bug_51501/common-patch-for-f14-and-f17/customize-avahi-default-ttl-values.patch Thanks and Regards, Ajay On Thu, Apr 17, 2014 at 12:46 PM, James Cameron qu...@laptop.org wrote: As this is a question about Sugar, perhaps the Sugar developers should be involved. +CC sugar-devel@ Problem description: 32 XO-1 laptops are booted and registered to a school server, and all 32 icons are visible in neighbourhood, but the icons persist after any XO leaves. Sugar-0.96 (yes, really), on OLPC OS 12.1.0. Sorry, I don't know how the XO is being asked to leave; forced power off, shutdown request using power button, or shutdown using Sugar menu. This would be something to investigate. My experience is that a shutdown request using power button is similar in effect to typing shutdown -h now via sshd, and this leaves the SSH client stranded without the connection clearing down. Perhaps all that is required is time for the ejabberd connection to time out? Perhaps this is fixed in a later release of Sugar, and an upgrade or field change can be recommended? On Thu, Apr 17, 2014 at 06:58:40AM +, Tim Moody wrote: As far as I know the implementation of ejabberd on xsce was a straight port from xs 0.7, so I wouldn't have expected a bug to have been introduced, but it is speculation either way. All we know is that what Nathan observes was not previously reported as a bug. Still, it is an annoyance. So the question is, what is the event that causes sugar to remove an icon from the NN and how does it arise. If it is a poll of ejabberd then we should investigate, regardless of whether it is a new bug or an old one. Date: Thu, 17 Apr 2014 15:09:16 +1000 From: qu...@laptop.org To: support-g...@lists.laptop.org Subject: Re: [support-gang] 32(+) XO-1's on Mesh Potato 2 as AP on XSCE On Thu, Apr 17, 2014 at 12:54:30AM -0400, Nathan C. Riddle wrote: Hopefully, later XSCE (ejabberd) version has corrected issue of falsely persistent icons in neighborhood. Not AP model related (same on TP Link). We don't know that this is an ejabberd problem yet, it could be a problem with Sugar. It would require deeper investigation. Any comments by XSCE development team ? You can write to them at xsce-de...@googlegroups.com There's also server-de...@lists.laptop.org -- James Cameron http://quozl.linux.org.au/ ___ support-gang mailing list support-g...@lists.laptop.org http://lists.laptop.org/listinfo/support-gang ___ Server-devel mailing list server-de...@lists.laptop.org http://lists.laptop.org/listinfo/server-devel -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [FEATURE] Automatic activity updates
Daniel, what you say makes sense for small-but-critical patches (like it happens in the linux-kernel world, where there is rarely a patch more than 10 lines long. Moreover, the linux-kernel code is cleanly segregated into different modules, so there are rarely clashes in people's work, as far as touching the same code is concerned.) However, here in sugar, code is being modified on quite a military basis everyday (which is a good state to be in, during the development-process :-) ). This makes it very tedious to work :: * Externally on a patch (as it will be needed to be rebased everyday on the mainline branch, if not sooner). * Ensure that nothing breaks (in the new feature) in every iteration of the patch. Thus, I agree with James. If there is a feature that is rock-solid in its working, we must think of including in the mainline/master branch right away (of course, after ensuring that it does not mass-break things), *and then* make changes (if at all required). This serves the additional following purposes :: * This ensures that the code-change-and-then-commit cycle is always upto date with the latest mainline code. * This ensures that nothing breaks in every code-iteration (or if it does, have a log and state in git, where it worked fine). Of course, even an averagely smart developer will at least gauge the broad-level architecture of the newly written feature, just by skimming through the code. If that bigger picture architecture is good enough (in addition to the fact that the feature is rock-solid), I think it makes all the more sense to include the feature right away in mainline/master (of course, if it does not mass-break things), *and then* continue working on the minor tweaks (if at all necessary). My 2 cents :) On Thu, Jun 13, 2013 at 3:26 PM, Daniel Narvaez dwnarv...@gmail.com wrote: On 13 June 2013 07:56, James Cameron qu...@laptop.org wrote: On Thu, Jun 13, 2013 at 01:54:24AM -0300, Gonzalo Odiard wrote: Yes, but somebody should provide patches, and do any change needed when the maintainers do the review, to be sure we have the quality needed upstream. Maintainers could do this themselves if they wanted to. They could or they could have other priorities, which I suspect is the case here. I'd caution against change given the stability of the feature in the dextrose deployments. These patches needs to be reviewed, like any other patch that makes it into the sugar code base. Even assuming they are rock stable, it's not just matter of stability but also of code quality, how do they integrate with existing code etc. If reviewers feels like they are not able to review them in the form they have been submitted, someone needs to refactor them. No way around that. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Problems during git pull
Hi all. Whenever I am trying to pull from any repository, I am getting the message :: # [ajay@localhost sugar]$ git pull git.sugarlabs.org[0: 18.85.44.69]: errno=Connection refused fatal: unable to connect a socket (Connection refused # Any ideas what might be wrong? Everything seemed to work fine till yesterday. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problems during git pull
On Wed, Apr 24, 2013 at 4:10 PM, Manuel Quiñones ma...@laptop.org wrote: Already fixed, it seems? Yes, it is !! Thanks to the solver-who-prefers-to-be-hidden :) I can git pull. 2013/4/24 James Cameron qu...@laptop.org: I get the same. $ git pull fatal: unable to connect to git.sugarlabs.org: git.sugarlabs.org[0: 18.85.44.69]: errno=Connection refused $ git remote -v origin git://git.sugarlabs.org/sugar/mainline.git (fetch) origin git://git.sugarlabs.org/sugar/mainline.git (push) $ -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com On Wed, Apr 24, 2013 at 4:10 PM, Manuel Quiñones ma...@laptop.org wrote: Already fixed, it seems? I can git pull. 2013/4/24 James Cameron qu...@laptop.org: I get the same. $ git pull fatal: unable to connect to git.sugarlabs.org: git.sugarlabs.org[0: 18.85.44.69]: errno=Connection refused $ git remote -v origin git://git.sugarlabs.org/sugar/mainline.git (fetch) origin git://git.sugarlabs.org/sugar/mainline.git (push) $ -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [IAEP] FW: Sugar 0.100 status report - April 2
-- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar-artworkPATCH] Multi-Select icons; plus adding theme for insensitive UI (else the look is ghostly).
The patch is to be applied in mainline-repo, master-branch. gtk3/theme/gtk-widgets.css.em | 5 ++ icons/scalable/actions/Makefile.am | 2 + icons/scalable/actions/select-all.svg | 80 + icons/scalable/actions/select-none.svg | 72 ++ icons/scalable/emblems/Makefile.am | 4 +- icons/scalable/emblems/emblem-checked.svg | 38 ++ icons/scalable/emblems/emblem-unchecked.svg | 10 7 files changed, 210 insertions(+), 1 deletion(-) mode change 100644 = 100755 icons/scalable/actions/Makefile.am create mode 100644 icons/scalable/actions/select-all.svg create mode 100644 icons/scalable/actions/select-none.svg create mode 100644 icons/scalable/emblems/emblem-checked.svg create mode 100644 icons/scalable/emblems/emblem-unchecked.svg diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em index f911c5e..ae35ab4 100644 --- a/gtk3/theme/gtk-widgets.css.em +++ b/gtk3/theme/gtk-widgets.css.em @@ -269,6 +269,11 @@ GtkTreeView row:nth-child(odd) { color: @black; } +.view:insensitive { + background-color: @white; + color: @black; +} + .entry:selected, .entry:selected:focused, .view:selected:focused { diff --git a/icons/scalable/actions/Makefile.am b/icons/scalable/actions/Makefile.am old mode 100644 new mode 100755 index 5c2b666..f6e02a5 --- a/icons/scalable/actions/Makefile.am +++ b/icons/scalable/actions/Makefile.am @@ -69,6 +69,8 @@ icon_DATA = \ media-seek-forward.svg \ row-insert.svg \ row-remove.svg \ + select-all.svg \ + select-none.svg \ system-logout.svg \ system-restart.svg \ system-search.svg \ diff --git a/icons/scalable/actions/select-all.svg b/icons/scalable/actions/select-all.svg new file mode 100644 index 000..f1c29a9 --- /dev/null +++ b/icons/scalable/actions/select-all.svg @@ -0,0 +1,80 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +svg + xmlns:osb=http://www.openswatchbook.org/uri/2009/osb; + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; + xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg=http://www.w3.org/2000/svg; + xmlns=http://www.w3.org/2000/svg; + xmlns:sodipodi=http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; + xmlns:inkscape=http://www.inkscape.org/namespaces/inkscape; + enable-background=new 0 0 55 54.696 + height=54.696px + version=1.1 + viewBox=0 0 55 54.696 + width=55px + x=0px + xml:space=preserve + y=0px + id=svg2 + inkscape:version=0.48.1 r9760 + sodipodi:docname=select-all.svgmetadata + id=metadata13rdf:RDFcc:Work + rdf:about=dc:formatimage/svg+xml/dc:formatdc:type + rdf:resource=http://purl.org/dc/dcmitype/StillImage; /dc:title //cc:Work/rdf:RDF/metadatadefs + id=defs11linearGradient + id=linearGradient5208 + osb:paint=solidstop + style=stop-color:#00;stop-opacity:1; + offset=0 + id=stop5210 //linearGradientlinearGradient + id=linearGradient3758 + osb:paint=solidstop + style=stop-color:#00;stop-opacity:1; + offset=0 + id=stop3760 //linearGradient/defssodipodi:namedview + pagecolor=#ff + bordercolor=#66 + borderopacity=1 + objecttolerance=10 + gridtolerance=10 + guidetolerance=10 + inkscape:pageopacity=0 + inkscape:pageshadow=2 + inkscape:window-width=1366 + inkscape:window-height=693 + id=namedview9 + showgrid=false + inkscape:zoom=5.4300132 + inkscape:cx=21.684358 + inkscape:cy=27.348 + inkscape:window-x=0 + inkscape:window-y=25 + inkscape:window-maximized=1 + inkscape:current-layer=svg2 /rect + style=fill:none;stroke:#ff;stroke-width:3.0;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none + id=rect5214 + width=36.219181 + height=42.29937 + x=9.3664637 + y=6.4843678 /rect + style=fill:none;stroke:#ff;stroke-width:3.0;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none + id=rect5216 + width=9.9359331 + height=9.7244711 + x=14.04011 + y=13.671784 /rect + style=fill:none;stroke:#ff;stroke-width:3.0;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none + id=rect5216-4 + width=9.9359331 + height=9.7244711 + x=14.10379 + y=32.684673 /path + style=fill:none;stroke:#ff;stroke-width:3.0;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none + d=m 29.44008,18.968646 3.683233,3.683232 6.629818,-9.20808 + id=path5298 +
Re: [Sugar-devel] 0.100 release schedule
Hi all. I would request to include the following features for the next release cycle :: a) http://wiki.sugarlabs.org/go/Features/Multi_selection * The UI workflow was heavily reviewed by Gary, and all the changes incorporated. * The feature is completely GTK3-ported, and ready for inclusion. b) http://wiki.sugarlabs.org/go/Features/3G_Support/Database_Support * The feature is completely GTK3-ported, and ready for inclusion. Both of these were already the agreed part of http://wiki.sugarlabs.org/go/0.98/Feature_List :) On Wed, Mar 27, 2013 at 8:51 PM, Gonzalo Odiard gonz...@laptop.org wrote: The acceptance deadline used to be very near to freeze (one month earlier). But if we want to narrow the release focus, perhaps it's good to have this discussion as soon as possible... +1 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] 0.100 release schedule
On Wed, Mar 27, 2013 at 9:09 PM, Gonzalo Odiard gonz...@laptop.org wrote: Hi Ajay, Should be good you provide patches we can apply on actual sugar as soon as possible. Great !!! I will float the patch by this weekend (after duly testing it on sugar-build on F18). Honestly, I am worried about the Multiple Selection. Is a really big change. Yes, I agree. Thankfully, there hasn't been much change on this front (except the gtk3-porting part); the feature works the same it did in DX3 (when Gary et. al. tested it). Just one request :: = please include the patch ASAP if it works 90% of the time (although it is working 100% for me at this point :P ). If it is thought that some minor-change/bug-fix is needed, it can be done in the mainline. That would save a lot of maintenance costs in maintaining a singular, big patch. Gonzalo On Wed, Mar 27, 2013 at 12:31 PM, Ajay Garg a...@activitycentral.comwrote: Hi all. I would request to include the following features for the next release cycle :: a) http://wiki.sugarlabs.org/go/Features/Multi_selection * The UI workflow was heavily reviewed by Gary, and all the changes incorporated. * The feature is completely GTK3-ported, and ready for inclusion. b) http://wiki.sugarlabs.org/go/Features/3G_Support/Database_Support * The feature is completely GTK3-ported, and ready for inclusion. Both of these were already the agreed part of http://wiki.sugarlabs.org/go/0.98/Feature_List :) On Wed, Mar 27, 2013 at 8:51 PM, Gonzalo Odiard gonz...@laptop.orgwrote: The acceptance deadline used to be very near to freeze (one month earlier). But if we want to narrow the release focus, perhaps it's good to have this discussion as soon as possible... +1 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] 0.100 release schedule
On Wed, Mar 27, 2013 at 9:44 PM, Daniel Narvaez dwnarv...@gmail.com wrote: On 27 March 2013 16:31, Ajay Garg a...@activitycentral.com wrote: b) http://wiki.sugarlabs.org/go/Features/3G_Support/Database_Support * The feature is completely GTK3-ported, and ready for inclusion. Has it been ported to network manager 0.9? Yep :) The Benefit to Sugar section is a bit terse. It would be interesting to know which users this is going to benefit. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] 90% working patches (was Re: 0.100 release schedule)
On Wed, Mar 27, 2013 at 11:21 PM, Daniel Narvaez dwnarv...@gmail.comwrote: On 27 March 2013 17:39, Ajay Garg a...@activitycentral.com wrote: Just one request :: = please include the patch ASAP if it works 90% of the time (although it is working 100% for me at this point :P ). If it is thought that some minor-change/bug-fix is needed, it can be done in the mainline. That would save a lot of maintenance costs in maintaining a singular, big patch. Hi Ajay, I don't know the specific history of this patch but, as a rule, patches should be pushed to mainline when they are fully working, or at least they are thought to be. If the maintainers point out issues, they should be solved before committing. Often the remainning 10% is the one which takes more time to achieve. Yes, I understand that :) My 10% intended any minor UI-tweaks (string change, text-positioning, etc), that are often not workflow-critical, and very easy to fix. Obviously, anything that breaks any use-case is a reason enough to reject the patch straightaway (even if that is 1% of the case). It's in the maintainers right to pretend they fully like your contribution before they take responsibility for it. They are going to take over a lot of the maintenance costs you are complainig about after all :) If the patch is too big, it's often possible to split it up so that parts of it can be landed earlier. Hmm .. it is big .. but I don't really know if any functionality should be broken into several patches, especially if the entire patch is necessary to make the feature work at all. Anyways, decide upon yourself when I float the patch this weekend :) ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Fwd: Proposal on how to speed up patch reviews
On Tue, Mar 26, 2013 at 11:27 PM, Anish Mangal an...@sugarlabs.org wrote: I don't have a dog in the fight, but I can give my two cents (disclaimer: I'm sorry if I misunderstood facts or misquoted people): With dextrose, we had the same bottleneck problem, of patches getting stuck in the review queue, then the commit queue. One associated problem is that the longer a patch lingers on, the more it loses contextual value and the harder it is to remember/understand for everyone what the patch was for or what it did (even with good commit messages). What would happen many times is that once the patch finally reaches the maintainer, he has to make an effort to recall the relevance of the patch and spend time in reviewing it again. Gonzalo also raises pertinent points: * We don't have enough reviewers * We don't have enough maintainers In dextrose, addressed this problem this way: * There was one release manager * There were multiple people with the access and the authority to commit patches * There were dedicated testers * There were foul-ups initially, but this increased the pace of development by at least 2x. What could this mean in context of sugar/mainline: * Have one or two maintainers. Simon and Manuq are excellent. They are responsible for setting roadmaps, deadlines, and making releases. * Have multiple people with commit access authority. Daniel and Gonzalo perhaps? I don't know who else. * The criteria for committing could be as simple as: ** The patch has been reviewed by atleast one person from this group ** The patch has been *tested* by atleast one person from this group Normally, one wouldn't recommend this as it increases the chance of breakage, but I guess we're at the other end of the spectrum. If development pace needs to be ramped up, I'd recommend the above. Very well put - practical, and not too bothersome to anyone !! Cheers, Anish On Tue, Mar 26, 2013 at 7:26 AM, Simon Schampijer si...@schampijer.de wrote: On 03/26/2013 12:21 PM, Manuel Quiñones wrote: I would like to applaud the discussion. Yes, I think we are blocking too much, in regards to stuff that is out of bugfixing, and polishing the gtk3 port. This is indeed not good for the community. When I started in this project, my patches received reviews from many people, not only maintainers. Many discussions went by. I don't see that happening anymore. We also had periodic design meetings guiding features. Discussing design after the development is made isn't good, imho. It would be great if someone can stand up and become a maintainer. Maybe you, Daniel? You have demonstrated your skills with sugar-build, and helping on the gtk3 port. A reviewer with the authority described in this discussion is probably a good first start. I think that is what Daniel would be able to help us with. Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Anish | an...@sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Features: Background image in Home View
Hi Gonzalo. Thanks for this awesome feature !! Just one small issue : I tried it on sugar-build, and sugar failed to start, because BACKGROUND_IMAGE_PATH was None. Changing the method _update_background_image to def _update_background_image(self, *args): self._background_pixbuf = None if BACKGROUND_IMAGE_PATH is None: return if os.path.exists(BACKGROUND_IMAGE_PATH): try: self._background_pixbuf = GdkPixbuf.Pixbuf.new_from_file( BACKGROUND_IMAGE_PATH) self._favorites_eventbox.queue_draw() except: pass does the trick !!! On Sat, Mar 23, 2013 at 2:22 AM, Gonzalo Odiard gonz...@laptop.org wrote: Is the way the draw is done in gtk. The eventbox is not a Image where you load a image and then is draw when needed. Gonzalo On Fri, Mar 22, 2013 at 5:42 PM, James Cameron qu...@laptop.org wrote: Not a blocking question: but why wait until the draw callback of the eventbox before calling cairo? Can this not be done in the widget creation? Reviewed-by: James Cameron qu...@laptop.org -- James Cameron http://quozl.linux.org.au/ ___ 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 -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Network proxy, configuration
On Sat, Mar 16, 2013 at 12:26 AM, Anish Mangal an...@sugarlabs.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I believe this feature was requested to address the weird proxy configurations networks require in AU. We shouldn't normally expect users to have to do anything related to network configurations (why would you even require *them* to turn the radio off/on?). This proxy config panel was made part of network-cp just so that people can still access network in places information has to be * either manually entered * proxy autoconfig url For any other scenario the user-experience should remain unchanged. My knowledge of this feature is about a year old, so take this as the historical perspective. I have little idea of the current state of the feature or its implementation. The feature is the same :) , as per http://wiki.sugarlabs.org/go/Features/Proxy_Settings On Friday 15 March 2013 03:28 AM, Simon Schampijer wrote: For this Feature it would be good to have a look at the exact use case that originated this feature request. Activity Central worked on it, maybe they can give us details about the request from their client to know which exact case we are trying to solve. Simon Am 15.03.2013 um 04:29 schrieb Tony Anderson tony_ander...@usa.net: Hi, Does this mean we will need two signed images, one for the schoolserver and one for the stand-alone XO? Until now, the default configuration has assumed that proxy is provided by the schoolserver. Tony On 03/14/2013 11:17 PM, Gonzalo Odiard wrote: On Thu, Mar 14, 2013 at 6:19 PM, Tony Anderson tony_ander...@usa.net mailto:tony_ander...@usa.net wrote: Hi, This discussion is making me nervous. The standard model of the XO has been that they are connected to the internet via the school server. Is it proposed to set up this proxy-server as a requirement for all XOs and for the user (primary school children) to have to manage this even when no access to the internet is available or even when that access is provided by the school server? No. This configuration is only needed in environments where there are not school server, and is not possible a automatic configuration. Gonzalo Tony On 03/14/2013 04:35 PM, sugar-devel-request@lists.__sugarlabs.org mailto:sugar-devel-requ...@lists.sugarlabs.org wrote: In other words, I can't imagine every 6-12 year old student in a school going into the control panel and typing (without error) a load of proxy details. In my experience things like this are incredibly challenging especially because the users cannot relate to the task at hand (unless you want to teach them about computer networks first). _ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.__org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/__listinfo/sugar-devel 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 mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel - -- Anish Mangal Sugar Labs -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRQ27XAAoJEBoxUdDHDZVpawwH/1601Au4v1NS5fVUd1pBq2zq pxrtllW3xwJVwS1RVcmR5jN1ptaAmzfAGTZ7XX+9dosPCX2F7IiPigluA3ylcEoe WbWZO2QagWLbwkyhYbLbOb9isdxvWf0aTD/kMt5lpVSTLbHi34iDVKr+CeGqAd48 YNz71G/7SxxHa8o/AtZdu4Axmt/XgylYjG50oWrmc0tQyLfKeroiJXAMT4SGnoR3 arZeplCaYYh3Um/AwdPm2Us6wq5rCKwpkbPBT5I3uW4jzmOwmnHRt7V8w5im1BR3 BksePWfBnfxu7Cs1nWGGeVcZY3CApzcOOX3kML4aSB2EeAg/cpdO7GPdsGAgh90= =W52l -END PGP SIGNATURE- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [FEATURES][DESIGN] Network proxy configuration
Daniel, Your concerns are valid. All I can say that probably using an automated transparent proxy client-server setup is the answer, for getting the requirements met without bothering the kids. * The automatic mode can be set in the XO-images, via simple OOB scripts. * The automatic mode puts the responsibility on the network-administrator's shoulders, instead of the kids. * Having the proxy transparent, means that kids do not need to enter the credentials again and again while navigating a whitelisted network URL. So, even in current scenario, I think the above particular setup can be easily done, thus relieving the kids altogether from doing any configurations. On Thu, Mar 14, 2013 at 9:17 PM, Daniel Drake d...@laptop.org wrote: On Mon, Nov 21, 2011 at 2:27 PM, Anish Mangal an...@activitycentral.org wrote: I'd like to propose Network proxy configuration in Sugar http://wiki.sugarlabs.org/go/Features/Proxy_configuration I would say that this feature does not fit particularly nicely with some items of our guidelines: http://wiki.sugarlabs.org/go/Features/Policy#Things_you_should_consider_when_proposing_a_feature In other words, I can't imagine every 6-12 year old student in a school going into the control panel and typing (without error) a load of proxy details. In my experience things like this are incredibly challenging especially because the users cannot relate to the task at hand (unless you want to teach them about computer networks first). A more sensible model would be that this is somehow automated by the deployer or by the school infrastructure, such that the user is not distracted and does not have to care. I'm aware that such generalizations can't be applied to all cases and that this feature is probably driven by some users where this indeed can't be applied. So I'm not in opposition to this feature (even though it would be nice to have the more automated approach designed as well), but I think we need to consider the implications on our more regular target userbase. For example, what happens if a user who is on a proxy-free network types hello into the proxy configuration textbox? Does that break all networking? One problem that I have seen in various places, children untick the Radio enable checkbox in Sugar's control panel and then return their laptop for repair because they can't get online. I fear that proxy configuration could become support headache like this. Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Proxy Settings in Network Control Panel
Thanks a ton Manuel; I will test the patch on the weekend, and let you know :) On Thu, Mar 14, 2013 at 7:27 AM, Manuel Quiñones ma...@laptop.org wrote: Hi Ajay and other devs, Ajay, whlie reviewing your patch for the proxy feature, I decided to step in and work on the issues I've found by myself. I did this to speed up the process, instead of going through a long review/patch/review loop. I hope you understand. A (rather long, sorry) description of what I did follows. But first of all, I would be glad if you can test my last patch: https://bugs.sugarlabs.org/attachment/ticket/3070/0001-Add-proxy-configuration-support-to-Network-Control-P.patch The first thing I've found is that your patch does both GConf and GSettings. I decided to go just for GSettings because Browse and all underlayng GTK use it. Great !! If we are sure that no application carries the legacy Gconf proxy-settings/schema, we are done, (not to forget less lines of code to carry :P) In any case I think you should have added another mixin class for GSettings instead of adding code to GConfMixin class. Sasha's original patch had that quite separated to make adding another backend an easy task. So my first attempt was doing only GSettings and fixing the issues I've found in yours: https://bugs.sugarlabs.org/attachment/ticket/3070/proxy_gsettings.patch (note this is not my final patch, let's call this my a) patch) An issue with your patch: the UI does not always update when a setting is changed. TestCase: change a setting, quickly close the network section and open it again: you will see the original value. This is because the timeout that calls _commit has not finished yet. Sasha's patch had gconf client.notify_add() for this. In my a) patch I have added a callback to the 'changed' event of gsettings that does the same. I had fixed this, in the patch I had floated :) The self._section_view.perform_accept_actions() did the fix in my patch; now substituted by self._section_view.apply() in your patch. I had even mentioned that in point c) in the patch at http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041779.html :) Anyways, the end result is that, we HAVE TAKEN care of the racy-behaviour, as far as the persistence of values is concerned. https://developer.gnome.org/gio/stable/GSettings.html#GSettings-changed There are other differences between Sasha's patch and yours. For example you seem to forgot the try/finally clause in the _commit method that blocks the __changed_cb callback. I have added it back in my a) patch. I intentionally skipped $http_proxy environment variable (Sasha's patch 3/3): http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038804.html This could be added later if there is a reason. I don't see GNOME doing it. Which activities or parts of Sugar need it? Indeed this makes wget work with proxy by default but then why GNOME does not do it? Am I missing any conversation? Hmm.. One place where I know for confirmed it is used in webkitgtk3, thus making its use in Browse. But you said earlier that using ONLY GSettings (without setting the http_poxy variable), propogates the proxy-settings in Browse. If that is the case, I think setting http_proxy is not needed. For more details of the http_proxy interactions with GTK+, please see the source-code of webkit, in particular http://svn.webkit.org/repository/webkit/trunk/Tools/GtkLauncher/main.c So, now for my final patch. After having my a) patch working, I took another path using the convenient way GSettings provides to bind widgets and settings: https://developer.gnome.org/gio/stable/GSettings.html#g-settings-bind The adventages can be seen in the ~100 lines removed. There is... - no need for a mixin class, - no need for connecting callbacks to signals between widgets and settings in both directions - no need to implement get_value_for_gsettings / set_value_from_gsettings for each widget. Sasha's gconf implementation needed a big hierarchy of classes to archive this. - no need to test the key type to map the corresponding getter ('s' to use get_string(), for example, compare with my a) patch) These look good !!! So, I welcome testing in different proxy scenarios for my patch. Thanks a lot Ajay for your contributed work, which I took as basement. -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar PATCH] sl#3833: Now, the palettes appear fine in the bottom frame-tray.
On Mon, Mar 11, 2013 at 5:46 PM, Manuel Quiñones ma...@laptop.org wrote: Hi Ajay, thanks for keep working on this one. 2013/3/6 Ajay Garg a...@activitycentral.com: The solution has been build upon the no-caching solution provided by erikos at http://bugs.sugarlabs.org/ticket/4419#comment:4 Theerafter, the cause of http://bugs.sugarlabs.org/attachment/ticket/3833/Screenshot%20of%20_Journal_.png is not taking style.GRID_CELL_SIZE into account, when calucating the alignments for the palettes. I will have to thank manuq a great deal, for his comment http://bugs.sugarlabs.org/ticket/3833#comment:11, which helped me debug the real issue. In particular, his observation that the landscape-mode-obscurity occurs only in one of the erikos' solutions; while the portrait-mode-obscurity occurs only in both of erikos's solutions. Finally, this patch provides the no-obscurity solution for all cases :) I see issues with your patch: 1. I can't bring the palettes of device icons (the ones at the bottom right of the frame) with the screen rotated in portrait mode. 2. after rotation I see the shutdown/reboot palette (icon on the right side of the frame) wrongly placed in landscape mode. See screenshot: http://bugs.sugarlabs.org/attachment/ticket/3833/sc.png Hi Manuel; thanks for the testing. Which build are you testing this on? I will check it on the same build :) So it doesn't pass the TestCase: http://bugs.sugarlabs.org/ticket/3833#comment:1 -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar PATCH] sl#3833: Now, the palettes appear fine in the bottom frame-tray.
On Mon, Mar 11, 2013 at 6:11 PM, Manuel Quiñones ma...@laptop.org wrote: 2013/3/11 Manuel Quiñones ma...@laptop.org: Hi Ajay, thanks for keep working on this one. 2013/3/6 Ajay Garg a...@activitycentral.com: The solution has been build upon the no-caching solution provided by erikos at http://bugs.sugarlabs.org/ticket/4419#comment:4 Theerafter, the cause of http://bugs.sugarlabs.org/attachment/ticket/3833/Screenshot%20of%20_Journal_.png is not taking style.GRID_CELL_SIZE into account, when calucating the alignments for the palettes. I will have to thank manuq a great deal, for his comment http://bugs.sugarlabs.org/ticket/3833#comment:11, which helped me debug the real issue. In particular, his observation that the landscape-mode-obscurity occurs only in one of the erikos' solutions; while the portrait-mode-obscurity occurs only in both of erikos's solutions. Finally, this patch provides the no-obscurity solution for all cases :) I see issues with your patch: 1. I can't bring the palettes of device icons (the ones at the bottom right of the frame) with the screen rotated in portrait mode. 2. after rotation I see the shutdown/reboot palette (icon on the right side of the frame) wrongly placed in landscape mode. See screenshot: http://bugs.sugarlabs.org/attachment/ticket/3833/sc.png So it doesn't pass the TestCase: http://bugs.sugarlabs.org/ticket/3833#comment:1 Sorry, I was testing badly. Your patch does solve all the issues. Seems we both hit the Send button at the same time :) Thanks for the prompt clarification !! With the improvements Simon ask for (long lines + improved commit message), I'm +1 to push. Thanks! My pleasure :) -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar PATCH] sl#3833: Now, the palettes appear fine in the bottom frame-tray.
The solution has been build upon the no-caching solution provided by erikos at http://bugs.sugarlabs.org/ticket/4419#comment:4 Theerafter, the cause of http://bugs.sugarlabs.org/attachment/ticket/3833/Screenshot%20of%20_Journal_.png is not taking style.GRID_CELL_SIZE into account, when calucating the alignments for the palettes. I will have to thank manuq a great deal, for his comment http://bugs.sugarlabs.org/ticket/3833#comment:11, which helped me debug the real issue. In particular, his observation that the landscape-mode-obscurity occurs only in one of the erikos' solutions; while the portrait-mode-obscurity occurs only in both of erikos's solutions. Finally, this patch provides the no-obscurity solution for all cases :) src/sugar3/graphics/palettewindow.py | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py index c48ae55..e192a7c 100644 --- a/src/sugar3/graphics/palettewindow.py +++ b/src/sugar3/graphics/palettewindow.py @@ -777,8 +777,6 @@ class Invoker(GObject.GObject): self._screen_area = Gdk.Rectangle() self._screen_area.x = self._screen_area.y = 0 -self._screen_area.width = Gdk.Screen.width() -self._screen_area.height = Gdk.Screen.height() self._position_hint = self.ANCHORED self._cursor_x = -1 self._cursor_y = -1 @@ -841,8 +839,8 @@ class Invoker(GObject.GObject): def _in_screen(self, rect): return rect.x = self._screen_area.x and \ rect.y = self._screen_area.y and \ - rect.x + rect.width = self._screen_area.width and \ - rect.y + rect.height = self._screen_area.height + rect.x + rect.width = (Gdk.Screen.width() - style.GRID_CELL_SIZE) and \ + rect.y + rect.height = (Gdk.Screen.height() - style.GRID_CELL_SIZE) def _get_area_in_screen(self, rect): Return area of rectangle visible in the screen @@ -850,9 +848,9 @@ class Invoker(GObject.GObject): x1 = max(rect.x, self._screen_area.x) y1 = max(rect.y, self._screen_area.y) x2 = min(rect.x + rect.width, -self._screen_area.x + self._screen_area.width) +self._screen_area.x + Gdk.Screen.width() - style.GRID_CELL_SIZE) y2 = min(rect.y + rect.height, -self._screen_area.y + self._screen_area.height) +self._screen_area.y + Gdk.Screen.height() - style.GRID_CELL_SIZE) return (x2 - x1) * (y2 - y1) @@ -882,8 +880,8 @@ class Invoker(GObject.GObject): rect.x = max(0, rect.x) rect.y = max(0, rect.y) -rect.x = min(rect.x, self._screen_area.width - rect.width) -rect.y = min(rect.y, self._screen_area.height - rect.height) +rect.x = min(rect.x, Gdk.Screen.width() - style.GRID_CELL_SIZE - rect.width) +rect.y = min(rect.y, Gdk.Screen.height()- style.GRID_CELL_SIZE - rect.height) return rect @@ -913,7 +911,7 @@ class Invoker(GObject.GObject): if best_alignment in self.LEFT or best_alignment in self.RIGHT: dtop = rect.y - screen_area.y -dbottom = screen_area.y + screen_area.height - rect.y - rect.width +dbottom = screen_area.y + Gdk.Screen.height() - style.GRID_CELL_SIZE - rect.y - rect.width iv = 0 @@ -928,7 +926,7 @@ class Invoker(GObject.GObject): elif best_alignment in self.TOP or best_alignment in self.BOTTOM: dleft = rect.x - screen_area.x -dright = screen_area.x + screen_area.width - rect.x - rect.width +dright = screen_area.x + Gdk.Screen.width() - style.GRID_CELL_SIZE - rect.x - rect.width ih = 0 -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar PATCH] sl#3833: Now, the palettes appear fine in the bottom frame-tray.
A minor goofup :: this is a sugar-toolkit-gtk3 patch, and not a sugar patch. Sorry for being an idiot. On Wed, Mar 6, 2013 at 6:00 PM, Ajay Garg a...@activitycentral.com wrote: The solution has been build upon the no-caching solution provided by erikos at http://bugs.sugarlabs.org/ticket/4419#comment:4 Theerafter, the cause of http://bugs.sugarlabs.org/attachment/ticket/3833/Screenshot%20of%20_Journal_.png is not taking style.GRID_CELL_SIZE into account, when calucating the alignments for the palettes. I will have to thank manuq a great deal, for his comment http://bugs.sugarlabs.org/ticket/3833#comment:11, which helped me debug the real issue. In particular, his observation that the landscape-mode-obscurity occurs only in one of the erikos' solutions; while the portrait-mode-obscurity occurs only in both of erikos's solutions. Finally, this patch provides the no-obscurity solution for all cases :) src/sugar3/graphics/palettewindow.py | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py index c48ae55..e192a7c 100644 --- a/src/sugar3/graphics/palettewindow.py +++ b/src/sugar3/graphics/palettewindow.py @@ -777,8 +777,6 @@ class Invoker(GObject.GObject): self._screen_area = Gdk.Rectangle() self._screen_area.x = self._screen_area.y = 0 -self._screen_area.width = Gdk.Screen.width() -self._screen_area.height = Gdk.Screen.height() self._position_hint = self.ANCHORED self._cursor_x = -1 self._cursor_y = -1 @@ -841,8 +839,8 @@ class Invoker(GObject.GObject): def _in_screen(self, rect): return rect.x = self._screen_area.x and \ rect.y = self._screen_area.y and \ - rect.x + rect.width = self._screen_area.width and \ - rect.y + rect.height = self._screen_area.height + rect.x + rect.width = (Gdk.Screen.width() - style.GRID_CELL_SIZE) and \ + rect.y + rect.height = (Gdk.Screen.height() - style.GRID_CELL_SIZE) def _get_area_in_screen(self, rect): Return area of rectangle visible in the screen @@ -850,9 +848,9 @@ class Invoker(GObject.GObject): x1 = max(rect.x, self._screen_area.x) y1 = max(rect.y, self._screen_area.y) x2 = min(rect.x + rect.width, -self._screen_area.x + self._screen_area.width) +self._screen_area.x + Gdk.Screen.width() - style.GRID_CELL_SIZE) y2 = min(rect.y + rect.height, -self._screen_area.y + self._screen_area.height) +self._screen_area.y + Gdk.Screen.height() - style.GRID_CELL_SIZE) return (x2 - x1) * (y2 - y1) @@ -882,8 +880,8 @@ class Invoker(GObject.GObject): rect.x = max(0, rect.x) rect.y = max(0, rect.y) -rect.x = min(rect.x, self._screen_area.width - rect.width) -rect.y = min(rect.y, self._screen_area.height - rect.height) +rect.x = min(rect.x, Gdk.Screen.width() - style.GRID_CELL_SIZE - rect.width) +rect.y = min(rect.y, Gdk.Screen.height()- style.GRID_CELL_SIZE - rect.height) return rect @@ -913,7 +911,7 @@ class Invoker(GObject.GObject): if best_alignment in self.LEFT or best_alignment in self.RIGHT: dtop = rect.y - screen_area.y -dbottom = screen_area.y + screen_area.height - rect.y - rect.width +dbottom = screen_area.y + Gdk.Screen.height() - style.GRID_CELL_SIZE - rect.y - rect.width iv = 0 @@ -928,7 +926,7 @@ class Invoker(GObject.GObject): elif best_alignment in self.TOP or best_alignment in self.BOTTOM: dleft = rect.x - screen_area.x -dright = screen_area.x + screen_area.width - rect.x - rect.width +dright = screen_area.x + Gdk.Screen.width() - style.GRID_CELL_SIZE - rect.x - rect.width ih = 0 -- 1.7.11.7 -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [read PATCH] sdxo#4448: Revert back to the earlier behaviour, of re-computing filehash every time when needed.
This reverts commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e. Thankfully, we do not lose anything, as the commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e was just an optimisation-commit; we don't lose anything on the frontend/backend/anywhere :) readactivity.py| 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/readactivity.py b/readactivity.py index beed2b4..e0f0cf8 100644 --- a/readactivity.py +++ b/readactivity.py @@ -710,7 +710,6 @@ class ReadActivity(activity.Activity): self.metadata['Read_search'] = \ self._edit_toolbar._search_entry.props.text self.metadata['activity'] = self.get_bundle_id() -self.metadata['filehash'] = self.filehash os.link(self._tempfile, file_path) @@ -856,13 +855,8 @@ class ReadActivity(activity.Activity): self._view_toolbar.set_view(self._view) self._edit_toolbar.set_view(self._view) - -self.filehash = self.metadata.get('filehash', None) -if self.filehash is None: -self.filehash = get_md5(filepath) -logging.error('Calculate hash %s', self.filehash) - -self._bookmarkmanager = BookmarkManager(self.filehash) +filehash = get_md5(filepath) +self._bookmarkmanager = BookmarkManager(filehash) self._bookmarkmanager.connect('added_bookmark', self._added_bookmark_cb) self._bookmarkmanager.connect('removed_bookmark', -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [read PATCH] sdxo#4448: Revert back to the earlier behaviour, of re-computing filehash every time when needed.
Hi Gonzalo. 1) XO-A shares a document. 2) XO-B joins the activity. 3) Now, at XO-B, there is a call to write_file for the just-loaded document; however, the self.filehash being None, fails to save. There are also other issues with self.filehash as part of sharing-wokflows. On Thu, Feb 28, 2013 at 9:32 PM, Gonzalo Odiard gonz...@laptop.org wrote: Hmm, may be I misreaded. What is trying to solve this patch? Gonzalo On Thu, Feb 28, 2013 at 1:01 PM, Gonzalo Odiard gonz...@laptop.orgwrote: How is this related with collaboration? Gonzalo On Thu, Feb 28, 2013 at 12:23 PM, Ajay Garg a...@activitycentral.comwrote: This reverts commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e. Thankfully, we do not lose anything, as the commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e was just an optimisation-commit; we don't lose anything on the frontend/backend/anywhere :) readactivity.py| 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/readactivity.py b/readactivity.py index beed2b4..e0f0cf8 100644 --- a/readactivity.py +++ b/readactivity.py @@ -710,7 +710,6 @@ class ReadActivity(activity.Activity): self.metadata['Read_search'] = \ self._edit_toolbar._search_entry.props.text self.metadata['activity'] = self.get_bundle_id() -self.metadata['filehash'] = self.filehash os.link(self._tempfile, file_path) @@ -856,13 +855,8 @@ class ReadActivity(activity.Activity): self._view_toolbar.set_view(self._view) self._edit_toolbar.set_view(self._view) - -self.filehash = self.metadata.get('filehash', None) -if self.filehash is None: -self.filehash = get_md5(filepath) -logging.error('Calculate hash %s', self.filehash) - -self._bookmarkmanager = BookmarkManager(self.filehash) +filehash = get_md5(filepath) +self._bookmarkmanager = BookmarkManager(filehash) self._bookmarkmanager.connect('added_bookmark', self._added_bookmark_cb) self._bookmarkmanager.connect('removed_bookmark', -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [write PATCH] sl#4436: Making collaboration work again.
Well, I compared the logs, and they appeared to be same :) I re-tested on build 30, with the same setup :: Write-86.2 (after applying this patch) on * build 30 for XO-4 (as the inviter) * build 30 for XO-1.75 (as the joiner) and if one waits for about 5 seconds before starting to write/do-anything in either of the collaborated canvas, collaboration does work. Gonzalo, I will be grateful if you try once again :) Again, I am extremely sorry to Gonzalo to others, for the minor hiccup. On Wed, Feb 27, 2013 at 10:58 AM, Ajay Garg a...@activitycentral.comwrote: On Wed, Feb 27, 2013 at 5:05 AM, Gonzalo Odiard gonz...@laptop.orgwrote: Thanks Ajay. I have a doubt. Testing after applying the patch, can start the activity and join other instance, but can't see the changes from one xo in the other. Can you? a) I tested with bundle-86.2 (after applying this patch) on * build 30 for XO-4 (as the inviter) * build 30 for XO-1.75 (as the joiner) Collaboration didn't work :( b) I then re-tested with the SAME bundle, on * DX4 build 14 on XO-4 (as the inviter) * DX4 build 14 on XO-1.75 (as the joiner) Collaboration worked fine (I tested with sharing text, and image). There seem to be some platform-exceptions on build 30 in the failure cases, most probably as a result of http://bugs.sugarlabs.org/ticket/2955. I will try and confirm, and see if I can make collaboration work on the build 30. Gonzalo On Thu, Feb 21, 2013 at 8:53 AM, Ajay Garg a...@activitycentral.comwrote: This stopped working (for Write), since the time http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/70cee44717d46129419992cd6a7e15472dc1f568 was pushed. Signed-off-by: Ajay Garg a...@activitycentral.com --- AbiWordActivity.py | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/AbiWordActivity.py b/AbiWordActivity.py index 35b248c..e95718e 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -67,7 +67,6 @@ class AbiWordActivity(activity.Activity): # create our main abiword canvas self.abiword_canvas = DocumentView() -self._shared_activity = None self._new_instance = True toolbar_box = ToolbarBox() @@ -182,13 +181,13 @@ class AbiWordActivity(activity.Activity): self.connect('shared', self._shared_cb) -if self._shared_activity: +if self.shared_activity: # we are joining the activity logger.error('We are joining an activity') self.connect('joined', self._joined_cb) -self._shared_activity.connect('buddy-joined', +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) if self.get_shared(): ## oh, OK, we've already joined self._joined_cb() @@ -236,8 +235,8 @@ class AbiWordActivity(activity.Activity): logger.error('My Write activity was shared') self._sharing_setup() -self._shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) channel = self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES] logger.error('This is my activity: offering a tube...') @@ -247,13 +246,13 @@ class AbiWordActivity(activity.Activity): def _sharing_setup(self): logger.debug(_sharing_setup()) -if self._shared_activity is None: +if self.shared_activity is None: logger.error('Failed to share or join activity') return -self.conn = self._shared_activity.telepathy_conn -self.tubes_chan = self._shared_activity.telepathy_tubes_chan -self.text_chan = self._shared_activity.telepathy_text_chan +self.conn = self.shared_activity.telepathy_conn +self.tubes_chan = self.shared_activity.telepathy_tubes_chan +self.text_chan = self.shared_activity.telepathy_text_chan self.tube_id = None self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( 'NewTube', self._new_tube_cb) @@ -267,7 +266,7 @@ class AbiWordActivity(activity.Activity): def _joined_cb(self, activity): logger.error(_joined_cb()) -if not self._shared_activity: +if not self.shared_activity: return self.joined = True -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [write PATCH] sl#4436: Making collaboration work again.
On Wed, Feb 27, 2013 at 5:05 AM, Gonzalo Odiard gonz...@laptop.org wrote: Thanks Ajay. I have a doubt. Testing after applying the patch, can start the activity and join other instance, but can't see the changes from one xo in the other. Can you? a) I tested with bundle-86.2 (after applying this patch) on * build 30 for XO-4 (as the inviter) * build 30 for XO-1.75 (as the joiner) Collaboration didn't work :( b) I then re-tested with the SAME bundle, on * DX4 build 14 on XO-4 (as the inviter) * DX4 build 14 on XO-1.75 (as the joiner) Collaboration worked fine (I tested with sharing text, and image). There seem to be some platform-exceptions on build 30 in the failure cases, most probably as a result of http://bugs.sugarlabs.org/ticket/2955. I will try and confirm, and see if I can make collaboration work on the build 30. Gonzalo On Thu, Feb 21, 2013 at 8:53 AM, Ajay Garg a...@activitycentral.comwrote: This stopped working (for Write), since the time http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/70cee44717d46129419992cd6a7e15472dc1f568 was pushed. Signed-off-by: Ajay Garg a...@activitycentral.com --- AbiWordActivity.py | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/AbiWordActivity.py b/AbiWordActivity.py index 35b248c..e95718e 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -67,7 +67,6 @@ class AbiWordActivity(activity.Activity): # create our main abiword canvas self.abiword_canvas = DocumentView() -self._shared_activity = None self._new_instance = True toolbar_box = ToolbarBox() @@ -182,13 +181,13 @@ class AbiWordActivity(activity.Activity): self.connect('shared', self._shared_cb) -if self._shared_activity: +if self.shared_activity: # we are joining the activity logger.error('We are joining an activity') self.connect('joined', self._joined_cb) -self._shared_activity.connect('buddy-joined', +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) if self.get_shared(): ## oh, OK, we've already joined self._joined_cb() @@ -236,8 +235,8 @@ class AbiWordActivity(activity.Activity): logger.error('My Write activity was shared') self._sharing_setup() -self._shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) channel = self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES] logger.error('This is my activity: offering a tube...') @@ -247,13 +246,13 @@ class AbiWordActivity(activity.Activity): def _sharing_setup(self): logger.debug(_sharing_setup()) -if self._shared_activity is None: +if self.shared_activity is None: logger.error('Failed to share or join activity') return -self.conn = self._shared_activity.telepathy_conn -self.tubes_chan = self._shared_activity.telepathy_tubes_chan -self.text_chan = self._shared_activity.telepathy_text_chan +self.conn = self.shared_activity.telepathy_conn +self.tubes_chan = self.shared_activity.telepathy_tubes_chan +self.text_chan = self.shared_activity.telepathy_text_chan self.tube_id = None self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( 'NewTube', self._new_tube_cb) @@ -267,7 +266,7 @@ class AbiWordActivity(activity.Activity): def _joined_cb(self, activity): logger.error(_joined_cb()) -if not self._shared_activity: +if not self.shared_activity: return self.joined = True -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ANNOUNCE] git.sugarlabs.org has migrated
On Mon, Feb 25, 2013 at 11:18 AM, Aleksey Lim alsr...@sugarlabs.org wrote: On Mon, Feb 25, 2013 at 12:03:16AM +0530, Ajay Garg wrote: On Sun, Feb 24, 2013 at 11:49 PM, S. Daniel Francis fran...@sugarlabs.orgwrote: 2013/2/24 Aleksey Lim alsr...@sugarlabs.org On Sat, Feb 23, 2013 at 07:40:23PM +, Aleksey Lim wrote: Hi all! The git.sugarlab.org will be unavailable for an hour starting from 2013-02-24 06:00 UTC. It will migrate to new hardware and most recent Gitorious version. git.sugarlab.org was migrated to the most recent Gitorious release and new hardware. There are changes in different places. Hi, git:// read-only urls don't clone for me. The new http://src.sugarlabs.org/ cloning url seems to be working. Bingo at my end too Does git:// work for now? Yes, it does now !! If not what git outputs? -- Aleksey -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [record PATCH] sl#4442: Now, Copy-to-Clipboard works fine, after the recipient clicks on the thumbnail, and the complete-data is fetched.
Signed-off-by: Ajay Garg a...@activitycentral.com --- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/button.py b/button.py index 66cf80b..be32b60 100644 --- a/button.py +++ b/button.py @@ -28,7 +28,13 @@ class RecdButton(TrayButton): palette.menu.append(self._rem_menu_item) self._rem_menu_item.show() -self._add_copy_menu_item() +self._copy_menu_item_added = False + +def do_expose_event(self, event): +if not self._copy_menu_item_added: +self._add_copy_menu_item() + +TrayButton.do_expose_event(self, event) def _add_copy_menu_item( self ): if self._recd.buddy and not self._recd.downloadedFromBuddy: @@ -38,7 +44,9 @@ class RecdButton(TrayButton): self._copy_menu_item_handler = self._copy_menu_item.connect('activate', self._copy_clipboard_clicked) self.get_palette().menu.append(self._copy_menu_item) self._copy_menu_item.show() - + +self._copy_menu_item_added = True + def get_recd(self): return self._recd -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Query regarding Wikipedia(EN) activity
On Mon, Feb 25, 2013 at 5:11 PM, Gonzalo Odiard gonz...@laptop.org wrote: On Sat, Feb 23, 2013 at 3:36 PM, Jerry Vonau jvo...@shaw.ca wrote: On Sat, 2013-02-23 at 01:33 -0300, Gonzalo Odiard wrote: The WikipediaEn activity does not include the images due to space considerations. Are all the images stored on the same server? Is the collection of images available for download? The images can be downloaded and stored in the server, see: http://wiki.sugarlabs.org/go/Activities/Wikipedia/HowTo#Optimize_the_data_and_download_images Thanks Gonzalo. Has anyone tried bundling Wikipedia with all the images, so that the activity is completely usable in offline mode? If yes, how much did its size come to be? (I have got a 56KBPS connection; so don't want to start something which might take days to complete :P). In fact we can prepare a version with the images included if is needed. How large is the collection? Seems like this might be a good addition to a schoolserver, enabling users the ability to view images while not really connected to the internet with a little server dns trickery on the schoolserver. +1 Gonzalo Jerry Gonzalo On Fri, Feb 22, 2013 at 5:28 AM, Ajay Garg a...@activitycentral.com wrote: Hi all. It seems that Wikipedia activities are supposed to work well even in offline mode (i.e. when the user is not connected to internet). It mostly does; except that no images are loaded (all images-URLs seem to be remote ones). A bug? Does this defeat the intended purpose of having this set of activities at first place? Or is it intended (perhaps due to space considerations) ? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ 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 -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [write v2 PATCH] sl#4442: Now, Copy-to-Clipboard works fine, after the recipient clicks on the thumbnail, and the complete-data isfetched.
=== v1 - v2 :: == Added the explanation of the fix. === Initially, the bug was due to the fact that the thumbnail-palette was initiated just once (when the thumbnail was first created). Now, when the thumbnail is first created for a received thumbnail, initially no Copy to Clipboard option is shown. However, after the user clicks the thumbnail and the data is fetched, the option is shown. At code level, every time the user hovers over the thumbnail, the expose-event signal is emitted, thereby calling the do_expose_event method. As the fix, we override this method, first checking to see if the data has been fetched for the thumbnail. If yes, we add the Copy to Clipboard option in the palette, and mark a flag for the same, so that it is not re-added on subsequent expose-event signal. activity/activity.info | 2 +- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/button.py b/button.py index 66cf80b..be32b60 100644 --- a/button.py +++ b/button.py @@ -28,7 +28,13 @@ class RecdButton(TrayButton): palette.menu.append(self._rem_menu_item) self._rem_menu_item.show() -self._add_copy_menu_item() +self._copy_menu_item_added = False + +def do_expose_event(self, event): +if not self._copy_menu_item_added: +self._add_copy_menu_item() + +TrayButton.do_expose_event(self, event) def _add_copy_menu_item( self ): if self._recd.buddy and not self._recd.downloadedFromBuddy: @@ -38,7 +44,9 @@ class RecdButton(TrayButton): self._copy_menu_item_handler = self._copy_menu_item.connect('activate', self._copy_clipboard_clicked) self.get_palette().menu.append(self._copy_menu_item) self._copy_menu_item.show() - + +self._copy_menu_item_added = True + def get_recd(self): return self._recd -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [record v3 PATCH] sl#4442: Now, Copy-to-Clipboard works fine, after the recipient clicks on the thumbnail, and the complete-data isfetched.
=== v1 - v2 :: == Added the explanation of the fix. v2 - v3 :: Minor fix in the header. === Initially, the bug was due to the fact that the thumbnail-palette was initiated just once (when the thumbnail was first created). Now, when the thumbnail is first created for a received thumbnail, initially no Copy to Clipboard option is shown. However, after the user clicks the thumbnail and the data is fetched, the option is shown. At code level, every time the user hovers over the thumbnail, the expose-event signal is emitted, thereby calling the do_expose_event method. As the fix, we override this method, first checking to see if the data has been fetched for the thumbnail. If yes, we add the Copy to Clipboard option in the palette, and mark a flag for the same, so that it is not re-added on subsequent expose-event signal. activity/activity.info | 2 +- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/button.py b/button.py index 66cf80b..be32b60 100644 --- a/button.py +++ b/button.py @@ -28,7 +28,13 @@ class RecdButton(TrayButton): palette.menu.append(self._rem_menu_item) self._rem_menu_item.show() -self._add_copy_menu_item() +self._copy_menu_item_added = False + +def do_expose_event(self, event): +if not self._copy_menu_item_added: +self._add_copy_menu_item() + +TrayButton.do_expose_event(self, event) def _add_copy_menu_item( self ): if self._recd.buddy and not self._recd.downloadedFromBuddy: @@ -38,7 +44,9 @@ class RecdButton(TrayButton): self._copy_menu_item_handler = self._copy_menu_item.connect('activate', self._copy_clipboard_clicked) self.get_palette().menu.append(self._copy_menu_item) self._copy_menu_item.show() - + +self._copy_menu_item_added = True + def get_recd(self): return self._recd -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [record PATCH] sl#4442: Now, Copy-to-Clipboard works fine, after the recipient clicks on the thumbnail, and the complete-data is fetched.
Sent the update patch at http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041882.html Thanks !! On Mon, Feb 25, 2013 at 8:49 PM, Daniel Drake d...@laptop.org wrote: On Mon, Feb 25, 2013 at 5:56 AM, Ajay Garg a...@activitycentral.com wrote: Signed-off-by: Ajay Garg a...@activitycentral.com --- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Thanks for the patch. It would be nice to have a commit message describing the bug and the fix, without having to go and load the ticket. After reading the ticket I can't immediately see how/why this patch solves the issue. What does the expose event have to do with receiving the data from the remote end? This should be explained in the commit message. Thanks Daniel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [ANNOUNCE] git.sugarlabs.org has migrated
On Sun, Feb 24, 2013 at 11:49 PM, S. Daniel Francis fran...@sugarlabs.orgwrote: 2013/2/24 Aleksey Lim alsr...@sugarlabs.org On Sat, Feb 23, 2013 at 07:40:23PM +, Aleksey Lim wrote: Hi all! The git.sugarlab.org will be unavailable for an hour starting from 2013-02-24 06:00 UTC. It will migrate to new hardware and most recent Gitorious version. git.sugarlab.org was migrated to the most recent Gitorious release and new hardware. There are changes in different places. Hi, git:// read-only urls don't clone for me. The new http://src.sugarlabs.org/ cloning url seems to be working. Bingo at my end too Cheers, Daniel. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Some queries regarding the Maliit OSK
Hi all. In activities like FotoToon and Labyrinth, it is seen that the OSK does not appear in ebook-mode (whereas it appears fine in other activities, wherever it ought to be). My belief is that it is due to the incompatablity of FotoToon and Labyrinth widgets, as compared to the other activities. So, is there a way to have the maliit OSK come up in this cases too (perhaps through any configuration tweek in maliit)? I am sorry for such a vague question, but any pointers will be highly appreciated :) Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Some queries regarding the Maliit OSK
On Sat, Feb 23, 2013 at 7:24 PM, Walter Bender walter.ben...@gmail.comwrote: On Sat, Feb 23, 2013 at 7:26 AM, Ajay Garg ajaygargn...@gmail.com wrote: Hi all. In activities like FotoToon and Labyrinth, it is seen that the OSK does not appear in ebook-mode (whereas it appears fine in other activities, wherever it ought to be). My belief is that it is due to the incompatablity of FotoToon and Labyrinth widgets, as compared to the other activities. So, is there a way to have the maliit OSK come up in this cases too (perhaps through any configuration tweek in maliit)? I am sorry for such a vague question, but any pointers will be highly appreciated :) Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Your assumption is correct. The OSK is invoked from a textview widget. I have a version of Labyrinth working with textview (See [1]). Flavio is working on the GTK3 port. Note that [1] is a slight compromise from the way that Labyrinth currently works in that, for expediency, I am processing the text attributes for the entire thought as opposed to multiple attributes per thought. (This is really complex and convoluted in Labyrinth and, IMHO, I don't think it is worth the additional effort at this point). Regarding Fototoons, I plan on making a similar intervention (less complex) after coordinating with Gonzalo. (There are a number of cool Fototoon enhancements queued up from GCI.) Thanks for the reply !! It helps clarifiy the current situations. regards. -walter [1] http://git.sugarlabs.org/~walter/labyrinth/walters-gtk2-touch -- Walter Bender Sugar Labs http://www.sugarlabs.org Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Some queries regarding the Maliit OSK
Hi Walter. * I cloned the walters-gtk-touch repository, build the bundle, and deployed on my XO-4. The OSK appeared fine now :) First issue solved ! * However, any thought hidden by the OSK, cannot have the text added. * I then encapsulated the gtk.Fixed within a gtk.ScrolledWindow. Now, the window-resizing-upon-OSK-appearance solution worked, enabling the user to enter text in widgets even in the lower part of the window. Second issue solved !! * Now, we know that a textwidget is mainly subjected to four types of actions upon a click :: 1) If the click is left and inside the textwidget, text needs to be entered. 2) If the click is left and on the boundary of the textwidget, and the click held on, the textwidget needs to be resized. 3) If the click is right and on the boundary of the textwidget, and then the left-click-drag is done, the widget needs to be moved. 4) If the click is left and outside a textwidget, a new textwidget is spawned. As can be seeen, there are two issues with the above four scenarios in tablet-mode:: a) Cases [1], [2] and [4] are more easily segregated/differentiated using a mouse-pointer, but might be very hard to get bang on, when using a finger (in tablet-mode). b) Case [3] does not work at all in tablet-mode. Just makes me wonder whether an activity like Labyrinth is more suitable only in non-touch mode ??? On Sat, Feb 23, 2013 at 11:12 PM, Ajay Garg a...@activitycentral.comwrote: On Sat, Feb 23, 2013 at 7:24 PM, Walter Bender walter.ben...@gmail.comwrote: On Sat, Feb 23, 2013 at 7:26 AM, Ajay Garg ajaygargn...@gmail.com wrote: Hi all. In activities like FotoToon and Labyrinth, it is seen that the OSK does not appear in ebook-mode (whereas it appears fine in other activities, wherever it ought to be). My belief is that it is due to the incompatablity of FotoToon and Labyrinth widgets, as compared to the other activities. So, is there a way to have the maliit OSK come up in this cases too (perhaps through any configuration tweek in maliit)? I am sorry for such a vague question, but any pointers will be highly appreciated :) Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Your assumption is correct. The OSK is invoked from a textview widget. I have a version of Labyrinth working with textview (See [1]). Flavio is working on the GTK3 port. Note that [1] is a slight compromise from the way that Labyrinth currently works in that, for expediency, I am processing the text attributes for the entire thought as opposed to multiple attributes per thought. (This is really complex and convoluted in Labyrinth and, IMHO, I don't think it is worth the additional effort at this point). Regarding Fototoons, I plan on making a similar intervention (less complex) after coordinating with Gonzalo. (There are a number of cool Fototoon enhancements queued up from GCI.) Thanks for the reply !! It helps clarifiy the current situations. regards. -walter [1] http://git.sugarlabs.org/~walter/labyrinth/walters-gtk2-touch -- Walter Bender Sugar Labs http://www.sugarlabs.org Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Query regarding Wikipedia(EN) activity
Hi all. It seems that Wikipedia activities are supposed to work well even in offline mode (i.e. when the user is not connected to internet). It mostly does; except that no images are loaded (all images-URLs seem to be remote ones). A bug? Does this defeat the intended purpose of having this set of activities at first place? Or is it intended (perhaps due to space considerations) ? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [write PATCH] sl#4436: Making collaboration work again.
This stopped working (for Write), since the time http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/70cee44717d46129419992cd6a7e15472dc1f568 was pushed. Signed-off-by: Ajay Garg a...@activitycentral.com --- AbiWordActivity.py | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/AbiWordActivity.py b/AbiWordActivity.py index 35b248c..e95718e 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -67,7 +67,6 @@ class AbiWordActivity(activity.Activity): # create our main abiword canvas self.abiword_canvas = DocumentView() -self._shared_activity = None self._new_instance = True toolbar_box = ToolbarBox() @@ -182,13 +181,13 @@ class AbiWordActivity(activity.Activity): self.connect('shared', self._shared_cb) -if self._shared_activity: +if self.shared_activity: # we are joining the activity logger.error('We are joining an activity') self.connect('joined', self._joined_cb) -self._shared_activity.connect('buddy-joined', +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) if self.get_shared(): ## oh, OK, we've already joined self._joined_cb() @@ -236,8 +235,8 @@ class AbiWordActivity(activity.Activity): logger.error('My Write activity was shared') self._sharing_setup() -self._shared_activity.connect('buddy-joined', self._buddy_joined_cb) -self._shared_activity.connect('buddy-left', self._buddy_left_cb) +self.shared_activity.connect('buddy-joined', self._buddy_joined_cb) +self.shared_activity.connect('buddy-left', self._buddy_left_cb) channel = self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES] logger.error('This is my activity: offering a tube...') @@ -247,13 +246,13 @@ class AbiWordActivity(activity.Activity): def _sharing_setup(self): logger.debug(_sharing_setup()) -if self._shared_activity is None: +if self.shared_activity is None: logger.error('Failed to share or join activity') return -self.conn = self._shared_activity.telepathy_conn -self.tubes_chan = self._shared_activity.telepathy_tubes_chan -self.text_chan = self._shared_activity.telepathy_text_chan +self.conn = self.shared_activity.telepathy_conn +self.tubes_chan = self.shared_activity.telepathy_tubes_chan +self.text_chan = self.shared_activity.telepathy_text_chan self.tube_id = None self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal( 'NewTube', self._new_tube_cb) @@ -267,7 +266,7 @@ class AbiWordActivity(activity.Activity): def _joined_cb(self, activity): logger.error(_joined_cb()) -if not self._shared_activity: +if not self.shared_activity: return self.joined = True -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Query regarding xorg-x11-drv-dove package, on XO-4
Hi all. This is in relation to ticket http://bugs.sugarlabs.org/ticket/4438 Is there a way to know what are the changes between version-8 (on XO-4 build 30) and version-7 (on XO-4 build 21) for xorg-x11-drv-dove-0.3.5? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Query regarding xorg-x11-drv-dove package, on XO-4
Thanks Martin for the quick reply. Created the ticket at http://dev.laptop.org/ticket/12572 On Thu, Feb 21, 2013 at 10:59 PM, Martin Langhoff martin.langh...@gmail.com wrote: Thanks for the report! Jon Nettlelton is working on that particular driver, and there was a big overhaul that landed in OS29. Could you create a ticket on dev.laptop.org, against 13.1.0? This has nothing to do with Sugar itself... thanks! m On Thu, Feb 21, 2013 at 12:07 PM, Ajay Garg a...@activitycentral.com wrote: Hi all. This is in relation to ticket http://bugs.sugarlabs.org/ticket/4438 Is there a way to know what are the changes between version-8 (on XO-4 build 30) and version-7 (on XO-4 build 21) for xorg-x11-drv-dove-0.3.5? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Collaboration in Write not working in version-86
Hi all. I tested collaborating the version-86 http://activities.sugarlabs.org/en-US/sugar/addons/versions/4201#version-86, in between an XO-1.75 and XO-4, when both XOs are joined by a adhoc-network (channel 1). Following happens :: a) Share the activity on XO-1.75. The activity-icon appears in the Neighborhood-View of XO-4. b) Join the shared activity on XO-4. The activity launches fine. c) However, when a text is typed in either of canvas of XO-1.75 or XO-4, no sharing happens. The same happens if the roles of XO-1.75 and XO-4 are reversed. Is this a known issue? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings
On Tue, Feb 19, 2013 at 4:17 PM, Daniel Narvaez dwnarv...@gmail.com wrote: On 19 February 2013 11:30, Simon Schampijer si...@schampijer.de wrote: a) The proxy-settings are stored both in the gconf schema; and dconf schema. Can you elaborate why you have chosen to also store into dconf? At one point Sugar wants to switch to Gsettings. Would that help for that case? I guess we need to store them in dconf because that's where webkit looks. But do we actually need to store also in gconf? Another thing to be cleared :: storing in dconf IS THE SAME AS storing in gsettings . ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings
On Tue, Feb 19, 2013 at 8:15 PM, Daniel Drake d...@laptop.org wrote: On Tue, Feb 19, 2013 at 8:40 AM, Ajay Garg ajaygargn...@gmail.com wrote: Another thing to be cleared :: storing in dconf IS THE SAME AS storing in gsettings . Not exactly. gsettings has a choice of backends, dconf is just one of them. Ahh okk.. did not know that :) So, would using dconf suffice? (it at least works in DX4, for Browse). Daniel -- Regards, Ajay ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Is it possible to hack the rotate key?
Hi all. Is it possible to hack the rotate key in XO? I wish to have the following working :: * Press the rotate key. This will rotate the window. * Just after that, have a callback function being called in sugar (this of course being possible only if the rotate key could be hacked). I will be thankful for any pointers. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Browse activity proxy settings
On Mon, Feb 18, 2013 at 6:19 PM, Manuel Quiñones ma...@laptop.org wrote: 2013/2/17 Ajay Garg a...@activitycentral.com: Hi Manuel. Sent the patch at http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041779.html Excellent, I will review it. Thanks Manuel !! Please include the patch soon in the master branch, if it works fine from user-point of view. Code-tweaking (if any) may be carried out once the patch lands in the master branch. On Tue, Feb 5, 2013 at 2:17 PM, Ajay Garg a...@activitycentral.com wrote: Thanks Manuel ! On Wed, Feb 6, 2013 at 12:40 AM, Manuel Quiñones ma...@laptop.org wrote: 2013/2/5 Ajay Garg a...@activitycentral.com: Thanks Manuel. Just one more confirmation, on master sugar branch, right? Yes. -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Is it possible to hack the rotate key?
Thanks Gary and Paul. I tested Moon on build 28 on XO-4; and the rotation caused the canvas to be redrawn appropriately. Paul, I have two queries :: a) In Moon's code (as already told by Gary), the size-changed signal is used to call the callback that redraws the canvas. So, in this case, is the size-changed signal a result of the rotate-key-event (KEY_SWITCHVIDEOMODE), or size-changed signal is generated via some another mechanism? b) Is the behaviour of olpc-kbdshim the same for a XO-1.75 and a XO-4 (as far as that code is written to either run a command attached to the event (currently /usr/bin/olpc-rotate), or pass the event through, but not both is concerned)? On Mon, Feb 18, 2013 at 7:18 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Hi all. Is it possible to hack the rotate key in XO? I wish to have the following working :: * Press the rotate key. This will rotate the window. * Just after that, have a callback function being called in sugar (this of course being possible only if the rotate key could be hacked). as gary points out, the rotate key event (KEY_SWITCHVIDEOMODE) is caught by olpc-kbdshim. that code is written to either run a command attached to the event (currently /usr/bin/olpc-rotate), or pass the event through, but not both. if there were consensus that running the command _and_ passing the event was safe and reasonable, maybe we could do that, though it doesn't feel right to me. but i also think gary's on the right track by suggesting you look at other window events to learn of the rotation changes -- after all, rotation doesn't require a button press. it can be caused by manual xrandr invocation, or simply by someone typing olpc-rotate left. paul I will be thankful for any pointers. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com part 2 text/plain 129 ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Is it possible to hack the rotate key?
On Mon, Feb 18, 2013 at 7:58 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Thanks Gary and Paul. I tested Moon on build 28 on XO-4; and the rotation caused the canvas to be redrawn appropriately. okay. was that unexpected? No.. just wanted to state it explicitly that it worked :) Paul, I have two queries :: a) In Moon's code (as already told by Gary), the size-changed signal is used to call the callback that redraws the canvas. So, in this case, is the size-changed signal a result of the rotate-key-event (KEY_SWITCHVIDEOMODE), or size-changed signal is generated via some another mechanism? i don't know. ok :) b) Is the behaviour of olpc-kbdshim the same for a XO-1.75 and a XO-4 (as far as that code is written to either run a command attached to the event (currently /usr/bin/olpc-rotate), or pass the event through, but not both is concerned)? yes. and for XO-1 and XO-1.5 as well. Great.. thanks !!! paul On Mon, Feb 18, 2013 at 7:18 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Hi all. Is it possible to hack the rotate key in XO? I wish to have the following working :: * Press the rotate key. This will rotate the window. * Just after that, have a callback function being called in sugar (this of course being possible only if the rotate key could be hacked). as gary points out, the rotate key event (KEY_SWITCHVIDEOMODE) is caught by olpc-kbdshim. that code is written to either run a command attached to the event (currently /usr/bin/olpc-rotate), or pass the event through, but not both. if there were consensus that running the command _and_ passing the event was safe and reasonable, maybe we could do that, though it doesn't feel right to me. but i also think gary's on the right track by suggesting you look at other window events to learn of the rotation changes -- after all, rotation doesn't require a button press. it can be caused by manual xrandr invocation, or simply by someone typing olpc-rotate left. paul I will be thankful for any pointers. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com part 2 text/plain 129 ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Activating a XO-1.5
Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activating a XO-1.5
Hi Ignacio. But i need to boot the XO once at least, so as to obtain the developer key? On Mon, Feb 18, 2013 at 9:28 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: The xo is from Uruguay? .. Maybe you need a developer key.. See: http://wiki.laptop.org/go/Developer_key 2013/2/18, Ajay Garg a...@activitycentral.com: Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip ; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activating a XO-1.5
Thanks Ignacio :) When I visit the link, it accepts the Laptop-Serial as SHC, but doesn't accept anything for Laptop-UUID. Where can I find the laptop-UUID ? :P On Mon, Feb 18, 2013 at 10:27 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: No :P You can use: https://activation.laptop.org/devkey/post/ 2013/2/18, Ajay Garg a...@activitycentral.com: Hi Ignacio. But i need to boot the XO once at least, so as to obtain the developer key? On Mon, Feb 18, 2013 at 9:28 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: The xo is from Uruguay? .. Maybe you need a developer key.. See: http://wiki.laptop.org/go/Developer_key 2013/2/18, Ajay Garg a...@activitycentral.com: Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip ; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activating a XO-1.5
On Mon, Feb 18, 2013 at 10:43 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: Start the XO with the -- key (In the screen) pressed. Sorry Ignacio. I am unable to understand. Which key is this? 2013/2/18, Ajay Garg a...@activitycentral.com: Thanks Ignacio :) When I visit the link, it accepts the Laptop-Serial as SHC, but doesn't accept anything for Laptop-UUID. Where can I find the laptop-UUID ? :P On Mon, Feb 18, 2013 at 10:27 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: No :P You can use: https://activation.laptop.org/devkey/post/ 2013/2/18, Ajay Garg a...@activitycentral.com: Hi Ignacio. But i need to boot the XO once at least, so as to obtain the developer key? On Mon, Feb 18, 2013 at 9:28 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: The xo is from Uruguay? .. Maybe you need a developer key.. See: http://wiki.laptop.org/go/Developer_key 2013/2/18, Ajay Garg a...@activitycentral.com: Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip ; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activating a XO-1.5
Thanks a ton Ignacio !! :) :) :) Just one last query : A link has been generated, which says Your developer key will be ready in 23 hours, 55 minutes. Please check back later. So, I visit the same link after 24 hours, right? Thanks again !! On Mon, Feb 18, 2013 at 10:53 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: http://www.ceibal.edu.uy/Articulos/PublishingImages/bot.JPG key 2013/2/18, Ajay Garg a...@activitycentral.com: On Mon, Feb 18, 2013 at 10:43 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: Start the XO with the -- key (In the screen) pressed. Sorry Ignacio. I am unable to understand. Which key is this? 2013/2/18, Ajay Garg a...@activitycentral.com: Thanks Ignacio :) When I visit the link, it accepts the Laptop-Serial as SHC, but doesn't accept anything for Laptop-UUID. Where can I find the laptop-UUID ? :P On Mon, Feb 18, 2013 at 10:27 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: No :P You can use: https://activation.laptop.org/devkey/post/ 2013/2/18, Ajay Garg a...@activitycentral.com: Hi Ignacio. But i need to boot the XO once at least, so as to obtain the developer key? On Mon, Feb 18, 2013 at 9:28 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: The xo is from Uruguay? .. Maybe you need a developer key.. See: http://wiki.laptop.org/go/Developer_key 2013/2/18, Ajay Garg a...@activitycentral.com: Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip ; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activating a XO-1.5
On Mon, Feb 18, 2013 at 11:11 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: Yes.. 24 hours.. That's a long wait .. hehe.. I would have been wandering many days without you :) Thanks a ton again ! 2013/2/18, Ajay Garg a...@activitycentral.com: Thanks a ton Ignacio !! :) :) :) Just one last query : A link has been generated, which says Your developer key will be ready in 23 hours, 55 minutes. Please check back later. So, I visit the same link after 24 hours, right? Thanks again !! On Mon, Feb 18, 2013 at 10:53 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: http://www.ceibal.edu.uy/Articulos/PublishingImages/bot.JPG key 2013/2/18, Ajay Garg a...@activitycentral.com: On Mon, Feb 18, 2013 at 10:43 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: Start the XO with the -- key (In the screen) pressed. Sorry Ignacio. I am unable to understand. Which key is this? 2013/2/18, Ajay Garg a...@activitycentral.com: Thanks Ignacio :) When I visit the link, it accepts the Laptop-Serial as SHC, but doesn't accept anything for Laptop-UUID. Where can I find the laptop-UUID ? :P On Mon, Feb 18, 2013 at 10:27 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: No :P You can use: https://activation.laptop.org/devkey/post/ 2013/2/18, Ajay Garg a...@activitycentral.com: Hi Ignacio. But i need to boot the XO once at least, so as to obtain the developer key? On Mon, Feb 18, 2013 at 9:28 PM, Ignacio Rodríguez nachoe...@gmail.comwrote: The xo is from Uruguay? .. Maybe you need a developer key.. See: http://wiki.laptop.org/go/Developer_key 2013/2/18, Ajay Garg a...@activitycentral.com: Hi all. I have received a new XO-1.5. When I boot it, it shows activation lease not found. As per http://wiki.laptop.org/go/XO_1.5_B2, i tried the following steps :: a) Downloaded the signed-image http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd, and copied it to the root-directory on my USB-drive. b) Downloaded the corresponding http://download.laptop.org/xo-1.5/os/candidate/13.1.0-21/31021o1.zd.zsp.fs1.zip ; renamed it to fs.zip, and copied it to the root directory of my USB-drive. c) Inserted the USB-drive into the XO-1.5 d) Powered on the XO. e) Immediately, pressed the 4 game-keys. f) Upon seeing the message Release the game keys to continue, unpressed the keys. Image installed successfully. g) A firmware was flashed. h) Removed the USB-drive. i) Rebooted the XO. j) Again, the message Activation lease not found was seen; the image failed to boot into sugar :-( :-( What step have I done wrong? Looking forward to some help, as I need to get the XO-1.5 running :-\ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Saludos Juan Ignacio Rodríguez *CeibalJAM!* *Somos Azucar* -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
Hi all. Just wanted to know that whether the signals used in the Write activity 'size-allocate', 'request-clear-area', 'unset-clear-area', are usable anywhere else too? I can see that these signals are being listened by class DocumentView(Abi.Widget); however, the source of this signals is unknown (or at least inconspicuous). Is Abi.Widget the source of these signals? If yes, that would mean that these signals cannot be used anywhere else on a generic basis, right? On Tue, Jan 29, 2013 at 6:10 PM, Gonzalo Odiard gonz...@laptop.org wrote: On Tue, Jan 29, 2013 at 2:17 AM, Ajay Garg a...@activitycentral.comwrote: I agree with Gonzalo and Gary; this is just a makeshift solution for the time-being, so that activities like Speak, Chat, Terminal are not rendered completely unusable in ebook-mode. In my opinion, in this case, your hack, is exposed to the user, in a way that is worst than do not have a solution at all. In fact we spent a lot of time trying to do terminal work with osk (right now, if the cursor is behind the osk, the text area is resized and scrolled), but need more work. Be prepared to invest time to do it right, a quick hack will not be a good solution. Another problem using the terminal with the osk you will find, is the lack of auto-completion and a few keys useful in the terminal but not in normal use. May be Speak can be best solved, if you move the text input to the top of the canvas, like we did in Record activity. Chat is a little more difficult, you can move the input to the top, but the history will be hidden. (Btw, I don't know why all the chat interfaces show the history from bottom to top instead of top to bottom) Anyway, these are suggestions, should be better have a agreement with the Design Team, Gary Manuq. Gonzalo ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar PATCH] Proxy feature. Wiki page: http://wiki.sugarlabs.org/go/Features/Proxy_Settings
This patch is to be applied on the master-branch. Some details of this patch :: a) The proxy-settings are stored both in the gconf schema; and dconf schema. b) The package gnome-vfs2 is a pre-requisite for this patch to work, since the settings are (also) stored in the dconf schema. c) Also, a slightly unrelated change is the persistence of the values in the Network control-panel. Earlier, there was a timeout involved (of 3000 milliseconds), which would trigger the saving of the values (for eg., Collaboration Server field was persisted this way). Now, the values are persisted SYNCHRONOUSLY, when the tick toolbar-button is clicked (of course, all the changes are undone, if the user instead decides to Cancel changes). d) All the use-cases of the proxy, are working, as per the wiki page http://wiki.sugarlabs.org/go/Features/Proxy_Settings Signed-off-by: Ajay Garg a...@activitycentral.com --- extensions/cpsection/network/view.py | 695 +++-- src/jarabe/controlpanel/gui.py | 2 + src/jarabe/controlpanel/sectionview.py | 8 + src/jarabe/main.py | 36 ++ 4 files changed, 707 insertions(+), 34 deletions(-) diff --git a/extensions/cpsection/network/view.py b/extensions/cpsection/network/view.py index b360759..99b792b 100644 --- a/extensions/cpsection/network/view.py +++ b/extensions/cpsection/network/view.py @@ -16,10 +16,19 @@ from gi.repository import Gtk from gi.repository import Gdk +from gi.repository import GConf from gi.repository import GObject +from gi.repository import Gio +from gi.repository import Pango from gettext import gettext as _ +import os +import subprocess +import logging + from sugar3.graphics import style +from sugar3.graphics.alert import Alert +from sugar3.graphics.icon import Icon from jarabe.controlpanel.sectionview import SectionView from jarabe.controlpanel.inlinealert import InlineAlert @@ -31,6 +40,471 @@ TITLE = _('Network') _APPLY_TIMEOUT = 3000 +# Please refer :: +# http://developer.gnome.org/ProxyConfiguration/ + +GSETTINGS_PROXY = Gio.Settings.new('org.gnome.system.proxy') +GSETTINGS_PROXY_FTP = Gio.Settings.new('org.gnome.system.proxy.ftp') +GSETTINGS_PROXY_HTTP = Gio.Settings.new('org.gnome.system.proxy.http') +GSETTINGS_PROXY_HTTPS = Gio.Settings.new('org.gnome.system.proxy.https') +GSETTINGS_PROXY_SOCKS = Gio.Settings.new('org.gnome.system.proxy.socks') + + +client = GConf.Client.get_default() + + +class GConfMixin(object): +Mix-in class for GTK widgets backed by GConf +def __init__(self, gconf_key, gsettings_dconf, dconf_key, widget=None, signal='changed'): +self._gconf_key = gconf_key +self._gsettings_dconf = gsettings_dconf +self._dconf_key = dconf_key +self._notify_id = client.notify_add(gconf_key, self.__gconf_notify_cb, None) +initial_value = self._get_gconf_value() +self._undo_value = initial_value +self.set_value_from_gconf(initial_value) +widget = widget or self + +def undo(self): +Revert to original value if modified +if not self.changed: +return +logging.debug('Reverting %r to %r', self._gconf_key, self._undo_value) +self._set_gconf_value(self._undo_value) + +def get_value_for_gconf(self): + +Return the current value of the widget in a format suitable for GConf + +MUST be implemented by subclasses. + +raise NotImplementedError() + +def set_value_from_gconf(self, value): + +Set the current value of the widget based on a value from GConf +MUST be implemented by subclasses. + +raise NotImplementedError() + +def __gconf_notify_cb(self, client, transaction_id_, entry, user_data_): +new_value = _gconf_value_to_python(entry.value) +self.set_value_from_gconf(new_value) + +def _commit(self, widget): +new_value = self.get_value_for_gconf() +logging.debug('Setting %r to %r', self._gconf_key, new_value) + +self._set_gconf_value(new_value) + +def _set_gconf_value(self, new_value): +gconf_type = client.get(self._gconf_key).type +if gconf_type == GConf.ValueType.STRING: +client.set_string(self._gconf_key, new_value) +self._gsettings_dconf.set_string(self._dconf_key, new_value) +elif gconf_type == GConf.ValueType.INT: +client.set_int(self._gconf_key, new_value) +self._gsettings_dconf.set_int(self._dconf_key, new_value) +elif gconf_type == GConf.ValueType.FLOAT: +client.set_float(self._gconf_key, new_value) +self._gsettings_dconf.set_double(self._dconf_key, new_value) +elif gconf_type == GConf.ValueType.BOOL: +client.set_bool(self._gconf_key, new_value) +self._gsettings_dconf.set_boolean(self._dconf_key, new_value) +elif gconf_type == GConf.ValueType.LIST: +import
Re: [Sugar-devel] Browse activity proxy settings
Hi Manuel. Sent the patch at http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041779.html Please include the patch soon in the master branch, if it works fine from user-point of view. Code-tweaking (if any) may be carried out once the patch lands in the master branch. On Tue, Feb 5, 2013 at 2:17 PM, Ajay Garg a...@activitycentral.com wrote: Thanks Manuel ! On Wed, Feb 6, 2013 at 12:40 AM, Manuel Quiñones ma...@laptop.org wrote: 2013/2/5 Ajay Garg a...@activitycentral.com: Thanks Manuel. Just one more confirmation, on master sugar branch, right? Yes. -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Browse activity proxy settings
On Tue, Feb 5, 2013 at 10:51 PM, Manuel Quiñones ma...@laptop.org wrote: 2012/11/12 Ariel Calzada ariel.calz...@gmail.com: I've already tested with configuring proxy in gconf settings but browse ignored it :( i attach screenshot Please check how gnome does, using gsettings. Like for example: gsettings set org.gnome.system.proxy.socks host '192.168.1.1′ gsettings set org.gnome.system.proxy.socks port 8080 gsettings set org.gnome.system.proxy mode ‘manual' Then please adapt the feature request patch, confirm it works, and send it for review. Thanks. Manuel, you mean the My Settings - Network - Proxy patch, right? -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Browse activity proxy settings
Thanks Manuel ! On Wed, Feb 6, 2013 at 12:40 AM, Manuel Quiñones ma...@laptop.org wrote: 2013/2/5 Ajay Garg a...@activitycentral.com: Thanks Manuel. Just one more confirmation, on master sugar branch, right? Yes. -- .. manuq .. -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] New cycle, new feature(s) :D
Hi all. Just wish to confirm: I rebase the multi-select patch on sugar/mainline:master, right? (I ask this, because I see another branch by Daniel, sugar/mainline:html). Just want to confirm, before I start putting the efforts :) (Also, unlike the last time, this time the feature is fully GTK3-ported). On Fri, Jan 18, 2013 at 4:56 PM, Martin Abente martin.abente.lah...@gmail.com wrote: +1 :) On Tue, Jan 8, 2013 at 9:23 AM, Alan Jhonn Aguiar Schwyn alan...@hotmail.com wrote: +1 I continuously use Dextrose 3 (for the Uruguayan deploy) and it's a very important improve. Date: Tue, 8 Jan 2013 17:21:20 +1100 From: qu...@laptop.org To: a...@activitycentral.com CC: sugar-devel@lists.sugarlabs.org Subject: Re: [Sugar-devel] New cycle, new feature(s) :D I would like to see this feature implemented, as it will ease my own testing, and make use of the Journal more acceptable to expert users who already know about multiple section in other software. -- James Cameron http://quozl.linux.org.au/ ___ 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 Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
Hi all. A simple solution was found :) I hacked the KP_Prior and KP_Next keys, and now they are used for making-window-smaller and restoring-original-window-size respectively :) All thanks to * /usr/share/X11/xkb/keycodes/evdev * sugar/src/jarabe/view/keyhandler.py Just one thing I noticed when I tried to have the above keys take effect ONLY in ebook-mode (via the evtest --query test), that when I ran this again and again via the suprocess module, the XO-4 behaved very erratically. However, when I made the keys take effect irrespective of the test of ebook-mode, things worked cool. However, I will keep on looking into the reason. Thanks a ton to all :) On Thu, Jan 24, 2013 at 10:45 PM, Paul Fox p...@laptop.org wrote: gonzalo wrote: Write does not know what is the ebook switch state, that logic is in the osk. Looking in the wiki and sugar code, I could not find information about how read the switch, but in ticket http://dev.laptop.org/ticket/12326 found this: If you do: evtest --query /dev/input/event4 EV_SW SW_TABLET_MODE; echo $? If the xo is in ebook mode returns 10, if not, returns 0. There are any official doc about the switches I am missing? There are a way to catch a event when the switch is activated, using dbus or something similar? if you open the device and read it, you'll get a stream of struct input_event structures (/usr/include/linux/input.h) representing opening and closing of the SW_TABLET_MODE switch. here's a C code snippet from olpc-switchd (part of powerd): void ebook_event() { struct input_event ev[1]; if (read(ebk_fd, ev, sizeof(ev)) != sizeof(ev)) die(bad read from ebook switch); dbg(3, ebk: ev sec %d usec %d type %d code %d value %d, ev-time.tv_sec, ev-time.tv_usec, ev-type, ev-code, ev-value); if (ev-type == EV_SW ev-code == SW_TABLET_MODE) { if (ev-value) send_event(ebookclose, round_secs(ev), ebk_device); else send_event(ebookopen, round_secs(ev), ebk_device); } } perhaps there's an evdev to dbus gateway of some sort, but i don't know about it, if so. the evtest commandline example, above, uses an ioctl on the input device to determine current state. here's snippet from the evtest source: (full source: git://anongit.freedesktop.org/evtest) static int query_device(const char *device, const struct query_mode *query_mode { int fd; int r; unsigned long state[NBITS(query_mode-max)]; fd = open(device, O_RDONLY); if (fd 0) { perror(open); return EXIT_FAILURE; } memset(state, 0, sizeof(state)); r = ioctl(fd, query_mode-rq, state); close(fd); if (r == -1) { perror(ioctl); return EXIT_FAILURE; } if (test_bit(keycode, state)) return 10; /* different from EXIT_FAILURE */ else return 0; } paul Gonzalo On Thu, Jan 24, 2013 at 12:16 PM, Martin Langhoff martin.langh...@gmail.com wrote: On Thu, Jan 24, 2013 at 10:13 AM, Paul Fox p...@laptop.org wrote: i believe sugar already has code to detect the two modes, since that's how it knows whether to present the OSK or not. Yep. Ajay, I think Write shows you the way :-) m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Mon, Jan 28, 2013 at 11:01 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Hi all. A simple solution was found :) I hacked the KP_Prior and KP_Next keys, and now they are used for making-window-smaller and restoring-original-window-size respectively :) so sugar takes over those keys? aren't those keys used by activities? they're certainly useful in a terminal -- page up and page down. Hmm.. Well a simple grepping showed that the Read activity is the only activity that explicitly makes use of the KP_Home and KP_End keys; but none seemed to make use of KP_Prior and KP_Next. paul All thanks to * /usr/share/X11/xkb/keycodes/evdev * sugar/src/jarabe/view/keyhandler.py Just one thing I noticed when I tried to have the above keys take effect ONLY in ebook-mode (via the evtest --query test), that when I ran this again and again via the suprocess module, the XO-4 behaved very erratically. However, when I made the keys take effect irrespective of the test of ebook-mode, things worked cool. However, I will keep on looking into the reason. Thanks a ton to all :) On Thu, Jan 24, 2013 at 10:45 PM, Paul Fox p...@laptop.org wrote: gonzalo wrote: Write does not know what is the ebook switch state, that logic is in the osk. Looking in the wiki and sugar code, I could not find information about how read the switch, but in ticket http://dev.laptop.org/ticket/12326 found this: If you do: evtest --query /dev/input/event4 EV_SW SW_TABLET_MODE; echo $? If the xo is in ebook mode returns 10, if not, returns 0. There are any official doc about the switches I am missing? There are a way to catch a event when the switch is activated, using dbus or something similar? if you open the device and read it, you'll get a stream of struct input_event structures (/usr/include/linux/input.h) representing opening and closing of the SW_TABLET_MODE switch. here's a C code snippet from olpc-switchd (part of powerd): void ebook_event() { struct input_event ev[1]; if (read(ebk_fd, ev, sizeof(ev)) != sizeof(ev)) die(bad read from ebook switch); dbg(3, ebk: ev sec %d usec %d type %d code %d value %d, ev-time.tv_sec, ev-time.tv_usec, ev-type, ev-code, ev-value); if (ev-type == EV_SW ev-code == SW_TABLET_MODE) { if (ev-value) send_event(ebookclose, round_secs(ev), ebk_device); else send_event(ebookopen, round_secs(ev), ebk_device); } } perhaps there's an evdev to dbus gateway of some sort, but i don't know about it, if so. the evtest commandline example, above, uses an ioctl on the input device to determine current state. here's snippet from the evtest source: (full source: git://anongit.freedesktop.org/evtest) static int query_device(const char *device, const struct query_mode *query_mode { int fd; int r; unsigned long state[NBITS(query_mode-max)]; fd = open(device, O_RDONLY); if (fd 0) { perror(open); return EXIT_FAILURE; } memset(state, 0, sizeof(state)); r = ioctl(fd, query_mode-rq, state); close(fd); if (r == -1) { perror(ioctl); return EXIT_FAILURE; } if (test_bit(keycode, state)) return 10; /* different from EXIT_FAILURE */ else return 0; } paul Gonzalo On Thu, Jan 24, 2013 at 12:16 PM, Martin Langhoff martin.langh...@gmail.com wrote: On Thu, Jan 24, 2013 at 10:13 AM, Paul Fox p...@laptop.org wrote: i believe sugar already has code to detect the two modes, since that's how it knows whether to present the OSK or not. Yep. Ajay, I think Write shows you the way :-) m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
I agree with Gonzalo and Gary; this is just a makeshift solution for the time-being, so that activities like Speak, Chat, Terminal are not rendered completely unusable in ebook-mode. Ideally, the best solution would be to have the OSK-appearance-and window-shrinkage on automatic and tied-together basis (without needing any manual intervention). On Tue, Jan 29, 2013 at 9:17 AM, Gary Martin garycmar...@googlemail.comwrote: On 28 Jan 2013, at 18:33, Gonzalo Odiard gonz...@laptop.org wrote: On Mon, Jan 28, 2013 at 2:50 PM, Ajay Garg a...@activitycentral.com wrote: On Mon, Jan 28, 2013 at 11:01 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Hi all. A simple solution was found :) I hacked the KP_Prior and KP_Next keys, and now they are used for making-window-smaller and restoring-original-window-size respectively :) so sugar takes over those keys? aren't those keys used by activities? they're certainly useful in a terminal -- page up and page down. Hmm.. Well a simple grepping showed that the Read activity is the only activity that explicitly makes use of the KP_Home and KP_End keys; but none seemed to make use of KP_Prior and KP_Next. A simple grep is not good enough. Gtk already uses these keys, for example in a textview. I can't understand what you are trying to do. The user should press the key to enlarge/shrink the activity window? Does not look like a good solution. +1 OSK behaviour should be automatic, no user intervention (other than perhaps some manual view scrolling when there is no active focus to get into view). If we are missing cases (and we are currently), then these are bugs to be fixed and/or features to be landed (often GTK3 related upstream targets, but occasionally Sugar/Activity related patches). We made great progress in 13.1.0, hopefully we can finish off this effort ready for 13.2.0. Regards, --Gary Gonzalo paul All thanks to * /usr/share/X11/xkb/keycodes/evdev * sugar/src/jarabe/view/keyhandler.py Just one thing I noticed when I tried to have the above keys take effect ONLY in ebook-mode (via the evtest --query test), that when I ran this again and again via the suprocess module, the XO-4 behaved very erratically. However, when I made the keys take effect irrespective of the test of ebook-mode, things worked cool. However, I will keep on looking into the reason. Thanks a ton to all :) On Thu, Jan 24, 2013 at 10:45 PM, Paul Fox p...@laptop.org wrote: gonzalo wrote: Write does not know what is the ebook switch state, that logic is in the osk. Looking in the wiki and sugar code, I could not find information about how read the switch, but in ticket http://dev.laptop.org/ticket/12326 found this: If you do: evtest --query /dev/input/event4 EV_SW SW_TABLET_MODE; echo $? If the xo is in ebook mode returns 10, if not, returns 0. There are any official doc about the switches I am missing? There are a way to catch a event when the switch is activated, using dbus or something similar? if you open the device and read it, you'll get a stream of struct input_event structures (/usr/include/linux/input.h) representing opening and closing of the SW_TABLET_MODE switch. here's a C code snippet from olpc-switchd (part of powerd): void ebook_event() { struct input_event ev[1]; if (read(ebk_fd, ev, sizeof(ev)) != sizeof(ev)) die(bad read from ebook switch); dbg(3, ebk: ev sec %d usec %d type %d code %d value %d, ev-time.tv_sec, ev-time.tv_usec, ev-type, ev-code, ev-value); if (ev-type == EV_SW ev-code == SW_TABLET_MODE) { if (ev-value) send_event(ebookclose, round_secs(ev), ebk_device); else send_event(ebookopen, round_secs(ev), ebk_device); } } perhaps there's an evdev to dbus gateway of some sort, but i don't know about it, if so. the evtest commandline example, above, uses an ioctl on the input device to determine current state. here's snippet from the evtest source: (full source: git://anongit.freedesktop.org/evtest) static int query_device(const char *device, const struct query_mode *query_mode { int fd; int r; unsigned long state[NBITS(query_mode-max)]; fd = open(device, O_RDONLY); if (fd 0) { perror(open); return EXIT_FAILURE; } memset(state, 0, sizeof(state
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 5:50 PM, Walter Bender walter.ben...@gmail.comwrote: On Thu, Jan 24, 2013 at 3:22 AM, Ajay Garg a...@activitycentral.com wrote: Thanks Walter and Gary for your replies. Well, what I am trying to achieve is, is just a simple and consistent (fixed) behaviour across every activity - make the window-size smaller. This serves two advantages :: * Works everywhere :) * Is consistent across everywhere :) I applaud these goals. Thanks :) Please find attached a sample screenshot of the Speak activity; the window has been resized to 0.7 of the original size (the screenshot doesn't show a keyboard yet, as it was done on sugar-build). Question: Do all activities behave properly when the screen is scaled that way? (I don't know that all activities are paying attention to resizing events. One quick way to check is to look at what happens when activities are rotated.) I will be receiving my XO-4 Touch in a couple of days; will answer this question then, after testing it in real-time :) If the above seems ok, then all that is needed is a way to figure out instances when the OSK appears, and when it disappears, so that the window resizing can be done at those strategic points. ( P.S. :: I see that exporting GTK_IM_MODULE=Maliit is all that is required to start using the Maliit OSK, but I could not find any way to hack onto every appearence/disappearance of the OSK. ) On Wed, Jan 23, 2013 at 9:32 PM, Gary Martin garycmar...@googlemail.com wrote: On 23 Jan 2013, at 15:29, Walter Bender walter.ben...@gmail.com wrote: On Wed, Jan 23, 2013 at 1:20 AM, Ajay Garg a...@activitycentral.com wrote: Hi all. I wish to fix the bug, where some activities (Chat, Terminal, Speak for instance) are rendered unusable in the ebook-mode, due to the OSK covering the area of text-input. I have figured out a generic working solution for this - the idea is to minimize the activity windows when the OSK appears, and move back to the normal size when the OSK disappears. I thought we had a different approach under development: to scroll the window up in the case of the text view being occluded by the OSK? Yes, there are patches in GTK3 and Sugar for this, though with some issues still needing worked through. One activity that we managed to push hard to get polished was Write, it needed to be a special case as it doesn't use normal gtk widgets. My (rough) understanding of the implementation is that GTK first looks for a scrolled view and tries to scroll it so that the cursor/focus rect is kept in view [1], if no scrolled view is found it scrolls the canvas [2]. [1] the Write behaviour here is not ideal as the abiword widget implementation for the text area didn't allow for extra padding at the bottom of the view, so the text being edited is hard up next to the OSK rather than with some extra space so the text selection handles stay visible. [2] I think there were patches in GTK3 Sugar so that the activity canvas area was automatically placed in a scroll view, so the toolbars are guaranteed to stay in view, but not sure if this landed. This should be doable for activities that have scrolling windows, such as terminal and chat. Speak, which doesn't scroll could be refactored to put the textview on the top instead of the bottom of the screen. (I suspect that whatever solution we have will involve some intervention in some activities.) Yes some intervention in activities will still be needed, and the first thing to do if you want any of this auto scrolling support is make sure your activity is ported to GTK3! ;) FOr activities like Speak I'd posted mockup images to a previous mail list thread showing how moving the text input area to the top of the UI would work well (the eyes will just peek over the top of the keyboard and the OSK can be hidden when the text is submitted for speaking). I have tested the re-sizing the windows; however, to make the fix work everywhere, I was thinking of the following algorithm :: What does resizing the window do? What other activities have you tested it on? Some activities will become quite unusable if auto shrunk, scrolling I think is better, we're lucky if the original developer planned for landscape and portrait aspect ratios... Regards, --Gary a) Just before/after the OSK appears, make the current window smaller. b) Just after/before the OSK disappears, revert the current window to its original size (if not already). This requires a way to know when and how the appeareance/disappearance of the OSK is triggered. How can this be done? I am sure there must be some gobject-signal for this - I just can't seem to figure it out by manually
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 6:45 PM, Gonzalo Odiard gonz...@laptop.org wrote: Please find attached a sample screenshot of the Speak activity; the window has been resized to 0.7 of the original size (the screenshot doesn't show a keyboard yet, as it was done on sugar-build). Question: Do all activities behave properly when the screen is scaled that way? (I don't know that all activities are paying attention to resizing events. One quick way to check is to look at what happens when activities are rotated.) I will be receiving my XO-4 Touch in a couple of days; will answer this question then, after testing it in real-time :) XO-4 does not support rotate the screen yet. You should try with other models. Ok, thanks for the info :) Just figured out one thing via Nitika's XO-4-Touch (thanks to Nitika for bearing my brunt of the testing-questions !!), that pressing all 4 game-keys at once, does toggle the appearance of the OSK !! So, I guess, we DO have a point, wherein we can hack resizing of the window. So, now I have another question :: Where is the code for handling game keys handled (as far as appearance and disappearance of the OSK is concerned) ? In Firmware? In Sugar? Elsewhere? The keyboard appear because you pressed a key (you don't need press the 4 at once, any key will show it) Detecting osk show/hide. is more complicate than should be, in my point of view. Probably, because the idea behind this is the osk should appear and hide in a automatic way based in the widgets needs. I think you should check the class DocumentView in widgets.py in Write activity, to see how the signals are used. Carlos Garnacho worked on this. Ahh.. that's a nice pointer Gonzalo :) It seems that only size-allocate and request-clear-area are the signals to be considered (not sure though; again, can only verify after a couple of days). If these signals are in fact emitted when the OSK appears/disappears by pressing a game key, I think we should be done. We would have found a hack :) Keeping fingers crossed, and waiting eagerly for my XO-4-Touch to arrive. Gonzalo Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 7:04 PM, Ajay Garg a...@activitycentral.com wrote: On Thu, Jan 24, 2013 at 6:45 PM, Gonzalo Odiard gonz...@laptop.orgwrote: Please find attached a sample screenshot of the Speak activity; the window has been resized to 0.7 of the original size (the screenshot doesn't show a keyboard yet, as it was done on sugar-build). Question: Do all activities behave properly when the screen is scaled that way? (I don't know that all activities are paying attention to resizing events. One quick way to check is to look at what happens when activities are rotated.) I will be receiving my XO-4 Touch in a couple of days; will answer this question then, after testing it in real-time :) XO-4 does not support rotate the screen yet. You should try with other models. Ok, thanks for the info :) Just figured out one thing via Nitika's XO-4-Touch (thanks to Nitika for bearing my brunt of the testing-questions !!), that pressing all 4 game-keys at once, does toggle the appearance of the OSK !! So, I guess, we DO have a point, wherein we can hack resizing of the window. So, now I have another question :: Where is the code for handling game keys handled (as far as appearance and disappearance of the OSK is concerned) ? In Firmware? In Sugar? Elsewhere? The keyboard appear because you pressed a key (you don't need press the 4 at once, any key will show it) Detecting osk show/hide. is more complicate than should be, in my point of view. Probably, because the idea behind this is the osk should appear and hide in a automatic way based in the widgets needs. I think you should check the class DocumentView in widgets.py in Write activity, to see how the signals are used. Carlos Garnacho worked on this. Ahh.. that's a nice pointer Gonzalo :) It seems that only size-allocate and request-clear-area are the signals to be considered (not sure though; again, can only verify after a couple of days). If these signals are in fact emitted when the OSK appears/disappears by pressing a game key, I think we should be done. We would have found a hack :) Keeping fingers crossed, and waiting eagerly for my XO-4-Touch to arrive. Gonzalo, another thing Nitika and me found, are the following :: a) Ensure that the XO is in normal-mode, and no activity is turned on. b) Turn to ebook-mode. c) Open Speak activity. d) OSK appears automatically this time. e) Now, pressing the game-key does not cause the OSK to go away :-\ It is only when the keyboard key is pressed, does the OSK disappear. f) If the game-key is pressed again, the OSK appears. Gist :: Game-key works fine and consistently, when the OSK is required to be made appeared. BUT, it does NOT WORK, if the OSK has been launched automatically. So, it seems that just hacking onto the game-key won't help :( Gonzalo Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 7:36 PM, Gonzalo Odiard gonz...@laptop.org wrote: So, it seems that just hacking onto the game-key won't help :( No. Will not work, because the osk will appear if you touch over a input widget. The game keys are not the expected way to show the osk. Hmm.. which brings us back to square one :( Gonzalo -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 7:37 PM, Ajay Garg a...@activitycentral.com wrote: On Thu, Jan 24, 2013 at 7:36 PM, Gonzalo Odiard gonz...@laptop.orgwrote: So, it seems that just hacking onto the game-key won't help :( No. Will not work, because the osk will appear if you touch over a input widget. The game keys are not the expected way to show the osk. Hmm.. which brings us back to square one :( Let's try another way :P Is there a way, so that we may know whether we are in ebook-mode, or normal-mode? If yes, we can at least make the windows smaller for newly launched activity-windows. Gonzalo -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 8:20 PM, Jerry Vonau je...@laptop.org.au wrote: On 24 January 2013 08:11, Ajay Garg a...@activitycentral.com wrote: On Thu, Jan 24, 2013 at 7:37 PM, Ajay Garg a...@activitycentral.comwrote: On Thu, Jan 24, 2013 at 7:36 PM, Gonzalo Odiard gonz...@laptop.orgwrote: So, it seems that just hacking onto the game-key won't help :( No. Will not work, because the osk will appear if you touch over a input widget. The game keys are not the expected way to show the osk. Hmm.. which brings us back to square one :( Let's try another way :P Is there a way, so that we may know whether we are in ebook-mode, or normal-mode? Yes, there is a ebook switch event: Jan 24 01:14:28 xo-1e-89-0d kernel: OLPC XO-1.75 lid and ebook switches Jan 24 01:14:28 xo-1e-89-0d kernel: input: OLPC lid switch as /devices/virtual/input/input3 Jan 24 01:14:28 xo-1e-89-0d kernel: input: OLPC ebook switch as /devices/virtual/input/input4 Great !! Now a good weekend exercise, to bring this message from kernel to user space :) Jan 24 01:14:49 xo-1e-89-0d olpc-kbdshim-udev[484]: olpc-kbdshim-udev: starting olpc-kbdshim-udev version 29 Jan 24 01:14:49 xo-1e-89-0d olpc-kbdshim-udev[484]: olpc-kbdshim-udev: fd 4: found touchscreen (zForce touchscreen) /dev/input/event8 (18:00:00) Jan 24 01:14:49 xo-1e-89-0d olpc-kbdshim-udev[484]: olpc-kbdshim-udev: fd 6: found keyboard (AT Translated Set 2 keyboard) /dev/input/event5 (11:01:01) Jan 24 01:14:49 xo-1e-89-0d olpc-kbdshim-udev[484]: olpc-kbdshim-udev: fd 7: found touchpad (FSPPS/2 Sentelic FingerSensingPad) /dev/input/event9 (11:02:0f) Jan 24 01:14:49 xo-1e-89-0d olpc-kbdshim-udev[484]: olpc-kbdshim-udev: fd 8: found ebook switch Jerry ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Hacking onto the appearing and hiding of OSK
On Thu, Jan 24, 2013 at 8:46 PM, Martin Langhoff martin.langh...@gmail.comwrote: On Thu, Jan 24, 2013 at 10:13 AM, Paul Fox p...@laptop.org wrote: i believe sugar already has code to detect the two modes, since that's how it knows whether to present the OSK or not. Yep. Ajay, I think Write shows you the way :-) Great.. Thanks !!! So the candle lights again in my heart; again waiting eagerly for my XO-4-Touch to arrive in a couple of days :) m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Query regarding /usr/bin/sugar-activity
Hi all. What is the package, that contains the binary /usr/bin/sugar-activity? Very surprisingly, it is not a part of sugar :-\ Thanks in advance :) Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Query regarding /usr/bin/sugar-activity
Ahh... just figured it out - sugar-toolkit-gtk3 :D On Wed, Jan 23, 2013 at 4:34 PM, Ajay Garg a...@activitycentral.com wrote: Hi all. What is the package, that contains the binary /usr/bin/sugar-activity? Very surprisingly, it is not a part of sugar :-\ Thanks in advance :) Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Hacking onto the appearing and hiding of OSK
Hi all. I wish to fix the bug, where some activities (Chat, Terminal, Speak for instance) are rendered unusable in the ebook-mode, due to the OSK covering the area of text-input. I have figured out a generic working solution for this - the idea is to minimize the activity windows when the OSK appears, and move back to the normal size when the OSK disappears. I have tested the re-sizing the windows; however, to make the fix work everywhere, I was thinking of the following algorithm :: a) Just before/after the OSK appears, make the current window smaller. b) Just after/before the OSK disappears, revert the current window to its original size (if not already). This requires a way to know when and how the appeareance/disappearance of the OSK is triggered. How can this be done? I am sure there must be some gobject-signal for this - I just can't seem to figure it out by manually browsing the code, since I don't personally have a XO4-Touch with me :-( Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] SDXO#2620 Add ability to save unfinished games in Memorize.
On Thu, Jan 10, 2013 at 8:49 PM, Gonzalo Odiard gonz...@laptop.org wrote: Thanks Ajay and Ariel. I filled sl #4373 to follow this issue. Comments: * Now you save the game data and the game session data every time. There are small games, like aritmetic or letters, but can be big if have images or sounds attached. Should be good save the data only if is a custom game. Or may be ask the user (while exiting), that whether the user wishes to save the game? * I think is better use json to persist a structure like a list instead of str/eval. Hmm.. the current approach kind of copies the game-image, thus making it immune to any change in the game-state-image. Also, having it persisted in any other form will just make the code too bloatful and error-prone. I haven't tested this yet. Gonzalo On Thu, Jan 10, 2013 at 11:44 AM, Ariel Calzada ariel.calz...@gmail.comwrote: 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
Re: [Sugar-devel] [PATCH] SDXO#2620 Add ability to save unfinished games in Memorize.
On Thu, Jan 10, 2013 at 9:56 PM, Walter Bender walter.ben...@gmail.comwrote: On Thu, Jan 10, 2013 at 11:02 AM, Ajay Garg a...@activitycentral.com wrote: On Thu, Jan 10, 2013 at 8:49 PM, Gonzalo Odiard gonz...@laptop.org wrote: Thanks Ajay and Ariel. I filled sl #4373 to follow this issue. Comments: * Now you save the game data and the game session data every time. There are small games, like aritmetic or letters, but can be big if have images or sounds attached. Should be good save the data only if is a custom game. Or may be ask the user (while exiting), that whether the user wishes to save the game? Not a very Sugary approach. :D * I think is better use json to persist a structure like a list instead of str/eval. Hmm.. the current approach kind of copies the game-image, thus making it immune to any change in the game-state-image. Also, having it persisted in any other form will just make the code too bloatful and error-prone. Not sure how json makes things either more bloated or more error-prone. Hmmm.. I was just a bit sceptical, since we seem to be doing the byte_arrays=True and byte_arrays=False at different places. Having it as a string, will eliminate all such issues :) regards. -walter I haven't tested this yet. Gonzalo On Thu, Jan 10, 2013 at 11:44 AM, Ariel Calzada ariel.calz...@gmail.com wrote: 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
[Sugar-devel] New cycle, new feature(s) :D
Hi all. With the exciting news of the beginning of a new cycle, may I take this opportunity to revamp the efforts for introducing the much-needed feature http://wiki.sugarlabs.org/go/Features/Multi_selection ? The feature is already gtk3 ported (just needs some tweaking to format a patch out of it, to be applicable on the mainline). Does this time sound good? If yes, I will proceed towards generating the patch for this, and would expect that it is integrated soon into sugar-mainline, so as to prevent any backlogs. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Problem when building a module
Hi. I cloned the latest code for sugar-build architecture; and I then tried to (just) build sugar. I ran make build-sugar; however, I am getting the error :: ### [ajay@localhost sugar-build]$ make build-sugar Traceback (most recent call last): File /home/ajay/doosra/commands/build, line 17, in module if not build.build_one(args.module): NameError: name 'build' is not defined make: *** [build-sugar] Error 1 ### Any ideas how the issue may be solved? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problem when building a module
Ahhh.. never-mind... replacing from devbot import main by from devbot import main, build in commands/build did the trick !!! On Sat, Dec 29, 2012 at 4:49 PM, Ajay Garg a...@activitycentral.com wrote: Hi. I cloned the latest code for sugar-build architecture; and I then tried to (just) build sugar. I ran make build-sugar; however, I am getting the error :: ### [ajay@localhost sugar-build]$ make build-sugar Traceback (most recent call last): File /home/ajay/doosra/commands/build, line 17, in module if not build.build_one(args.module): NameError: name 'build' is not defined make: *** [build-sugar] Error 1 ### Any ideas how the issue may be solved? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problem when building a module
Thanks Daniel for the response. On Sat, Dec 29, 2012 at 5:30 PM, Daniel Narvaez dwnarv...@gmail.com wrote: Hey, thanks for looking into this. I'm away from my laptop for a few days... Could you please commit the fix (I added you as committer)? Perhaps use two separate lines instead of the comma, to match the style of the rest of the code. Commit done at http://git.sugarlabs.org/sugar-build/sugar-build/commit/39ac72f314dc408f4f7c878ccbf61d629f3cca0a after making the change to match the styling :) Btw, not sure what you are doing exactly but these days you don't normally need to build a specific module... Both make run and make build will figure out which modules are changed and build just those. I just happened to download the new, much-cleaner sugar-build today, and was just playing around :) On Saturday, 29 December 2012, Ajay Garg wrote: Ahhh.. never-mind... replacing from devbot import main by from devbot import main, build in commands/build did the trick !!! On Sat, Dec 29, 2012 at 4:49 PM, Ajay Garg a...@activitycentral.comwrote: Hi. I cloned the latest code for sugar-build architecture; and I then tried to (just) build sugar. I ran make build-sugar; however, I am getting the error :: ### [ajay@localhost sugar-build]$ make build-sugar Traceback (most recent call last): File /home/ajay/doosra/commands/build, line 17, in module if not build.build_one(args.module): NameError: name 'build' is not defined make: *** [build-sugar] Error 1 ### Any ideas how the issue may be solved? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] ping requires sudo to run on XO-1
Hi all. I tested the command ping www.google.com on build 18 on XO-1; I get :: ping: cap_set_proc: Operation not permitted However, running sudo ping www.google.com works fine :) Any reasons for this behaviour? Is this expected? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] ping requires sudo to run on XO-1
Also, apparently because of this, Software Update doesn't work. On Fri, Dec 28, 2012 at 4:58 PM, Ajay Garg a...@activitycentral.com wrote: Hi all. I tested the command ping www.google.com on build 18 on XO-1; I get :: ping: cap_set_proc: Operation not permitted However, running sudo ping www.google.com works fine :) Any reasons for this behaviour? Is this expected? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] ping requires sudo to run on XO-1
Thanks Gonzalo for the quick reply. I am grateful :) On Fri, Dec 28, 2012 at 5:59 PM, Gonzalo Odiard gonz...@laptop.org wrote: Reproduced in os20. I have filled https://dev.laptop.org/ticket/12427 with a link to upstream thread about a similar issue. Gonzalo On Fri, Dec 28, 2012 at 8:40 AM, Ajay Garg a...@activitycentral.comwrote: Also, apparently because of this, Software Update doesn't work. On Fri, Dec 28, 2012 at 4:58 PM, Ajay Garg a...@activitycentral.comwrote: Hi all. I tested the command ping www.google.com on build 18 on XO-1; I get :: ping: cap_set_proc: Operation not permitted However, running sudo ping www.google.com works fine :) Any reasons for this behaviour? Is this expected? Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Locations for bitfrost src-rpm packages
Thanks Paul, Jerry, Peter. All three of your answers provided me the maximum cumulative information possible. Thanks a ton !! :) On Thu, Dec 20, 2012 at 11:15 AM, Peter Robinson pbrobin...@gmail.comwrote: On Wed, Dec 19, 2012 at 10:48 PM, Jerry Vonau jvo...@shaw.ca wrote: On Thu, 2012-12-20 at 03:37 +0530, Ajay Garg wrote: Hi all. Where can I find the corresponding source-rpm packages, for :: * http://rpmdropbox.laptop.org/f18/bitfrost-1.0.18-1.fc18.armv7hl.rpm AND * http://rpmdropbox.laptop.org/f18/bitfrost-sugar-1.0.18-1.fc18.armv7hl.rpm These are in Fedora proper for i686 but looks like not in fedora's ARM repo. http://mirrors.kernel.org/fedora/updates/testing/18/SRPMS/bitfrost-1.0.18-1.fc18.src.rpm They are the same, there's no separation between ARM and i686 when it comes to the Fedora src.rpm Peter Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Locations for bitfrost src-rpm packages
Hi all. Where can I find the corresponding source-rpm packages, for :: * http://rpmdropbox.laptop.org/f18/bitfrost-1.0.18-1.fc18.armv7hl.rpm AND * http://rpmdropbox.laptop.org/f18/bitfrost-sugar-1.0.18-1.fc18.armv7hl.rpm Thanks in advance !! :) Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
Hi all. I will leave the choice of deciding upon the icon files directory to you guys :) My personal opinion :: I would refrain from using the /tmp directory, since it is, well, temporary mount-point, and I would not point to delve too much into shakeable territory. This is confirmed in Fedora-18, because as far as I know, in Fedora-14, we were using /tmp too, but never faced any problems then. However, now in Fedora-18, the problem is being faced, owing to special-ness of /tmp. On Tue, Dec 11, 2012 at 6:56 PM, Daniel Narvaez dwnarv...@gmail.com wrote: On 11 December 2012 14:19, Manuel Quiñones ma...@laptop.org wrote: 2012/12/11 Gonzalo Odiard gonz...@laptop.org: In the meantime, have the icons cached in a directory is no so bad. Maybe we can do it in /tmp/ to get it deleted at startup without need more Yes, I think using /tmp is the way to go. And the Journal is doing that for the same icon in the palette and details view already. Isn't this more or less a cache? If so we could use XDG_CACHE_DIR http://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-user-cache-dir ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v2 sugar] sl#4276: As part of sugar-toolkit patch for this bug-fix, remove the icon-files directory on every reboot, to prevent accumulation of any spurious files. New files will
Changes of version-2 over version-1 :: === Now using tabs throughtouts for spacing, so that the patch is properly formatted/laid-out. Thanks a ton to James Cameron (qu...@laptop.org) !!! bin/sugar-session | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bin/sugar-session b/bin/sugar-session index 3c86f3e..4069a1e 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -278,6 +278,13 @@ def main(): shutil.rmtree(data_dir, ignore_errors=True) os.makedirs(data_dir) cleanup_logs(env.get_logs_path()) + + # http://bugs.sugarlabs.org/ticket/4276 + # Remove the directory containing the icon-files. + # New files will be written by write-through mechanism, when first + # needed/accessed. + icon_files_dir = os.path.join(env.get_profile_path(), 'icon_files') + shutil.rmtree(icon_files_dir, ignore_errors=True) except OSError, e: # logs cleanup is not critical; it should not prevent sugar from # starting if (for example) the disk is full or read-only. -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
This issue happens, when .xo files need to be rendered in the listview in non-journal locations. In such cases, these files have no activity or bundle_id fields in their metadata. Thus, the current way to know the icon-file-name for such .xo files was to expand the zipped files, and write out the icon-files at pseudo-permanent storage, at /tmp. However, before the icon-file could be used by the listview to pick up the icon bytes, it was being garbage-collected. Thus, now as the solution, we write the icon-files (maximum of one file per activity) at ~/.sugar/default/icon_files. Now, the icons are rendered correctly then. src/sugar3/bundle/activitybundle.py | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/sugar3/bundle/activitybundle.py b/src/sugar3/bundle/activitybundle.py index 3895673..2c0894d 100644 --- a/src/sugar3/bundle/activitybundle.py +++ b/src/sugar3/bundle/activitybundle.py @@ -209,11 +209,22 @@ class ActivityBundle(Bundle): return os.path.join(self._path, icon_path) else: icon_data = self.get_file(icon_path).read() -temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, - suffix='.svg') -os.write(temp_file, icon_data) -os.close(temp_file) -return util.TempFilePath(temp_file_path) + +# First check to see if the directory exists. +icon_files_dir_path = env.get_profile_path('icon_files') +if not os.path.isdir(icon_files_dir_path): +os.makedirs(icon_files_dir_path, 0770) + +icon_file_path = os.path.join(icon_files_dir_path, + self._icon + '.svg') + +# Write the icon-data file, if not already existing. +if not os.path.exists(icon_file_path): +icon_file_pointer = open(icon_file_path, 'w') +icon_file_pointer.write(icon_data) +icon_file_pointer.close() + +return icon_file_path def get_activity_version(self): Get the activity version -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
Manuel, James :: In my current approach, a file in icon_files folder is not removed ever, once it is written. This solves the following two purposes :: a) Space optimization :: === No need to write multiple files for the same activity icon. Earlier, many icon-files (containing the same contents) existed, owing to different random names of each new file in /tmp folder. b) Time optimization :: === Once it is seen that an activity-icon file (pertaining to a particular activity) exists, it is not re-written. For eg, at my end, ls -l /home/ajay/.sugar/default/icon_files gives :: [ajay@localhost ~]$ ls -l ~/.sugar/default/icon_files/ total 56 -rw-rw-r--. 1 ajay ajay 1220 Dec 10 23:47 activity-imageviewer.svg -rw-rw-r--. 1 ajay ajay 1685 Dec 10 23:47 activity-maze.svg -rw-rw-r--. 1 ajay ajay 1666 Dec 10 23:47 activity-memorize.svg -rw-rw-r--. 1 ajay ajay 714 Dec 10 23:47 activity-ruler.svg -rw-rw-r--. 1 ajay ajay 3677 Dec 10 23:47 activity-scratch.svg -rw-rw-r--. 1 ajay ajay 836 Dec 10 23:47 activity-terminal.svg -rw-rw-r--. 1 ajay ajay 21378 Dec 10 23:47 gcompris.svg -rw-rw-r--. 1 ajay ajay 4110 Dec 10 23:47 icono2.svg I am open to any new approaches; we have done the important part of diagnosing :D On Tue, Dec 11, 2012 at 1:40 AM, James Cameron qu...@laptop.org wrote: How are the .svg files in /icon_files removed? -- James Cameron http://quozl.linux.org.au/ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
On Tue, Dec 11, 2012 at 2:07 AM, Manuel Quiñones ma...@laptop.org wrote: Hi Ajay, first, thanks for helping on this. My pleasure :) 2012/12/10 Ajay Garg a...@activitycentral.com: This issue happens, when .xo files need to be rendered in the listview in non-journal locations. In such cases, these files have no activity or bundle_id fields in their metadata. Thus, the current way to know the icon-file-name for such .xo files was to expand the zipped files, and write out the icon-files at pseudo-permanent storage, at /tmp. However, before the icon-file could be used by the listview to pick up the icon bytes, it was being garbage-collected. Are you sure about this assumption? How can you explain that the icons are visible in the palette and in the details view? I tested with a stick which has a .xo file inside. 1. ls /tmp - no svg files 2. open Journal - I can see this: http://bugs.sugarlabs.org/attachment/ticket/4276/test-wrong-icon.png 3. ls /tpm - now I can see two svg files So seems your assumption is wrong. I also noticed that some files are there in the /tmp directory; however when I tried finding the file by the name @return value of function in def get_icon(self), I could not find a file with that name in /tmp. Regarding the appearance in the right-click palette, I presumed that since doing a right-click generates a NEW palette everytime, so it works. But for the listview, the activity-icons are displayed via the file-name property in CellRendererActivityIcon (in src/jarabe/journal/listview.py). So, it could be that once that with scrolling in the list-view, re-rendering the icon using the non-refreshed file-name property, might be causing the bug. However, in any case, the space- and time-optimizations make me lean towards this one-time-icon-file-per-activity-writing approach. Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
Well, I can't think how to overcome this :D If this is indeed an issue, I can only begin to think the catastrophe that this could cause in the earlier implementation (writing multiple files. per-activity-per-rendering-in-listview). On Tue, Dec 11, 2012 at 2:09 AM, James Cameron qu...@laptop.org wrote: On Tue, Dec 11, 2012 at 01:47:36AM +0530, Ajay Garg wrote: In my current approach, a file in icon_files folder is not removed ever, once it is written. So I can attack a user (denial of service) by providing an .xo file with a very very large .svg file in it, and there is nothing the user can do ... in Sugar ... to escape from the situation. It is an added security vulnerability. So, Nak. As an example, http://dev.laptop.org/~quozl/denial-of-service.zip is an old activity of mine with the .svg file replaced by 1 GB of zero bytes, which compresses nicely. When this file is renamed to .xo and downloaded with Sugar is to result in 1 MB of download data, and in 2 GB of storage loss; 1 GB for the activity/*.svg files, and 1 GB for the /icon_files/ -- James Cameron http://quozl.linux.org.au/ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
On Tue, Dec 11, 2012 at 2:55 AM, James Cameron qu...@laptop.org wrote: On Tue, Dec 11, 2012 at 02:22:07AM +0530, Ajay Garg wrote: Well, I can't think how to overcome this :D When an .xo entry is removed from the journal, check for and delete a corresponding /icon_files/ directory entry. Seems a hard think (implementation-wise), as :: a) We would need to keep a count, as the same .xo file may be present at different locations (Journal/Documents/Pen-drives). b) The effect a) becomes more troublesome, if there are multiple .xo files of the same activity-icon type, carrying different file-names. If this is indeed an issue, I can only begin to think the catastrophe that this could cause in the earlier implementation (writing multiple files. per-activity-per-rendering-in-listview). Indeed, but let's not make it worse. ;-} -- James Cameron http://quozl.linux.org.au/ Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar PATCH] sl#4276: As part of sugar-toolkit patch for this bug-fix, remove the icon-files directory on every reboot, to prevent accumulation of any spurious files. New files will be
diff --git a/bin/sugar-session b/bin/sugar-session index 3c86f3e..a7e065b 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -278,6 +278,13 @@ def main(): shutil.rmtree(data_dir, ignore_errors=True) os.makedirs(data_dir) cleanup_logs(env.get_logs_path()) + + # http://bugs.sugarlabs.org/ticket/4276 + # Remove the directory containing the icon-files. + # New files will be written by write-through mechanism, when first + # needed/accessed. + icon_files_dir = os.path.join(env.get_profile_path(), 'icon_files') +shutil.rmtree(icon_files_dir, ignore_errors=True) except OSError, e: # logs cleanup is not critical; it should not prevent sugar from # starting if (for example) the disk is full or read-only. -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-toolkit-gtk3 PATCH] sl#4276: Writing the icon-files for .xo files on a permanent mount-point, and not /tmp. mount-point.
On Tue, Dec 11, 2012 at 10:22 AM, James Cameron qu...@laptop.org wrote: On Tue, Dec 11, 2012 at 08:41:06AM +0530, Ajay Garg wrote: Seems a hard think (implementation-wise), as :: I agree. Perhaps instead add a regular cleanup during Sugar startup. Done, via http://lists.sugarlabs.org/archive/sugar-devel/2012-December/041181.html -- James Cameron http://quozl.linux.org.au/ -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [Sugar PATCH] sl#3169, sl#4226: Process the 'PropertiesChanged' signal-callback, only if the buddy has been added into the sugar-model.
There will be cases when we receive the Properties changed signal from telepathy for a particular online buddy; we then call the __buddy_info_updated_cb to process the signal, trying to update the properties. However, if the buddy hasn't already been added to th sugar-model (via AliasesChanged signal == __aliases_changed_cb callback == buddy-updated signal == __buddy_updated_cb callback), there is no point processing the properties. At this point, it is ok letting go off the seemingly missed 'PropertiesChanged' signal, as the properties are added to the model, when the buddy is added to the model. Next time onwards (after the buddy has been added into the model), any further 'PropertiesChanged' signal will be suitably processed. src/jarabe/model/neighborhood.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py index a12ad2b..8ca576a 100644 --- a/src/jarabe/model/neighborhood.py +++ b/src/jarabe/model/neighborhood.py @@ -427,7 +427,8 @@ class _Account(GObject.GObject): def __buddy_info_updated_cb(self, handle, properties): logging.debug('_Account.__buddy_info_updated_cb %r', handle) -self.emit('buddy-updated', self._buddy_handles[handle], properties) +if handle in self._buddy_handles: +self.emit('buddy-updated', self._buddy_handles[handle], properties) def __current_activity_changed_cb(self, contact_handle, activity_id, room_handle): -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] About speak and other activities GTK3/HIG
On Tue, Dec 4, 2012 at 9:37 PM, Walter Bender walter.ben...@gmail.comwrote: On Tue, Dec 4, 2012 at 11:03 AM, Ariel Calzada ariel.calz...@gmail.com wrote: Hello! We’re working in the GTK3 porting and HIG adjustments of Speak and other activities we have observations in both fields. Thanks for working on this. 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. I thought the plan of record was (at the Sugar toolkit level) to have the activity window scroll up. I think that is a nice solution, catering to every potential problem-facing activity. It would be good to come up with a general solution in any case. 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. Hmm. I've been playing with GST 1 in Turtle and haven't notice a performance hit. 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 -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.
Thanks Manuel and Daniel for the fix and commit of the simplified/correct patch by Manuel.. 1) Proves I am bad at UI/GTK issues :-P 2) Saved my time of testing the 12.1.0 image :) Thanks again. On Mon, Dec 3, 2012 at 6:46 PM, Daniel Drake d...@laptop.org wrote: On Mon, Dec 3, 2012 at 1:44 AM, Ajay Garg a...@activitycentral.com wrote: I will be grateful if you could let me know the download link of the image where it worked. That will provide me the mental push to have a go-ahead on what surely would then be a regression. 12.1.0 from http://download.laptop.org/ Daniel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.
On Mon, Dec 3, 2012 at 10:41 PM, Manuel Quiñones ma...@laptop.org wrote: 2012/12/3 Ajay Garg a...@activitycentral.com: Thanks Manuel and Daniel for the fix and commit of the simplified/correct patch by Manuel.. You are welcome Ajay. The next time would be nice if you attach the traceback and a testcase so it is easier to reproduce and confirm the bug. Ok. Will take care. :) Thanks again. Thanks for the report, ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.
On Mon, Dec 3, 2012 at 2:38 AM, Daniel Drake d...@laptop.org wrote: On Fri, Nov 30, 2012 at 3:52 PM, Ajay Garg a...@activitycentral.com wrote: It would be good if it is known whether the Select/Deselect feature worked at all previously (I doubt it ever did). In the unlikely scenario that it worked before, I will be happy to delve in more into this. Yes, it worked fine before. Thanks Daniel. I will be grateful if you could let me know the download link of the image where it worked. That will provide me the mental push to have a go-ahead on what surely would then be a regression. Thanks Daniel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.
Daniel, I agree that the reason of applying this particular fix is not very well explained, but this was the best that worked, without breaking anything else. To put it logically, once the list is rendered, we do not need any not-updatable activity entries anyway; also the only next step after the rendering, is Refresh, wherein the entire process is followed again. Anyhow, as long as all the use-cases work as expected, we should be ok :) It would be good if it is known whether the Select/Deselect feature worked at all previously (I doubt it ever did). In the unlikely scenario that it worked before, I will be happy to delve in more into this. On Fri, Nov 30, 2012 at 10:47 PM, Daniel Drake d...@laptop.org wrote: Thanks for the patch. If you'd like to speed up the process and save me some time, please add a commit message explaining what was wrong and how/why this fixes it. It does not jump out at me from the patch. It also doesn't feel like the right place to be doing a spring cleaning of the activities model. On Tue, Nov 27, 2012 at 10:31 AM, Ajay Garg a...@activitycentral.com wrote: diff --git a/src/model.py b/src/model.py index 35896e2..533183b 100755 --- a/src/model.py +++ b/src/model.py @@ -229,7 +229,13 @@ class UpdateList(Gtk.ListStore): def toggle_select(self, path): Toggle whether the given update will be installed. -row = self[path] +# We first need to remove all the spurious activities existing +# in the model, for whom UPDATE_EXISTS is False. +for act in self: +if act[UPDATE_EXISTS] is False: +self.remove(act.iter) + +row = self[self.get_iter_from_string(path)] row[UPDATE_SELECTED] = not row[UPDATE_SELECTED] # don't touch the UI in refresh, it needs to be thread-safe. diff --git a/src/view.py b/src/view.py index 32cb580..9c8efdb 100755 --- a/src/view.py +++ b/src/view.py @@ -84,7 +84,6 @@ class ActivityListView(Gtk.ScrolledWindow): if self.activity_updater._in_sugar: crbool.set_property('indicator_size', style.zoom(26)) def toggled_cb(crbool, path, self): -path = self.ftreestore.convert_path_to_child_path(path) self.activity_updater.activity_list.toggle_select(path) self.activity_pane._refresh_update_size() crbool.connect('toggled', toggled_cb, self) -- 1.7.11.7 Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] XO-hang on 1.75-touch
Hi all. Testing http://build.laptop.org/13.1.0/os14/xo-1.75/31014o2.zd on a XO-1.75 touch, I note the following :: a) After the image is flashed, the XO works fine in general; more importantly, as long as all the work is being done via touchpad-pointer (and not through finger-touches), things work perfect. b) Working through finger-touches also work well, as long as c) does not happen. c) At some RANDOM point in time, doing Finger-touch on Home-View XO-icon == Finger-touch on My-Settings causes the settings-window to NOT open. Thereafter, all clicks (via finger-touch, and touchpad-window) stop working. Anybody hit by this spuriously? (I am being hit fairly regularly, to the extent of having the XO-1.75-touch unusable). Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] XO-hang on 1.75-touch
On Wed, Nov 28, 2012 at 6:18 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Please find attached the logs. probably better to record the data associated with bug reports in a trac ticket. Thanks. Done at http://bugs.sugarlabs.org/ticket/4278 paul Gonzalo ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com part 5 text/plain 153 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel =- paul fox, p...@laptop.org ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] XO-hang on 1.75-touch
Thanks Jerry. 1) I suspected that power-management could be an issue. However, the issue occurs irrespective of whether power-management is enabled or not. 2) I just realized that build-15 is also out, and there are some log-differences (at least in shell.log). So, better to download os15 image, and update with the tracing results on os15. WIll do that, and update accordingly. Thanks Jerry again. On Wed, Nov 28, 2012 at 8:08 PM, Jerry Vonau jvo...@shaw.ca wrote: On Wed, 2012-11-28 at 18:26 +0530, Ajay Garg wrote: On Wed, Nov 28, 2012 at 6:18 PM, Paul Fox p...@laptop.org wrote: ajay wrote: Please find attached the logs. probably better to record the data associated with bug reports in a trac ticket. Thanks. Done at http://bugs.sugarlabs.org/ticket/4278 Ajay, I can't recreate this, but your log does look a bit strange, there is no dcon feedback noted. Can you edit /sbin/powerd and change line 454 from # tracing=1 to tracing=1 That will create /var/log/powerd.trace with the full cycle of events for powerd. Please reboot and see if you can recreate this issue, when the hang occurs include powerd.tracing along with the other logs you posted the previous time. Thanks Jerry ___ Devel mailing list de...@lists.laptop.org http://lists.laptop.org/listinfo/devel Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.
diff --git a/src/model.py b/src/model.py index 35896e2..533183b 100755 --- a/src/model.py +++ b/src/model.py @@ -229,7 +229,13 @@ class UpdateList(Gtk.ListStore): def toggle_select(self, path): Toggle whether the given update will be installed. -row = self[path] +# We first need to remove all the spurious activities existing +# in the model, for whom UPDATE_EXISTS is False. +for act in self: +if act[UPDATE_EXISTS] is False: +self.remove(act.iter) + +row = self[self.get_iter_from_string(path)] row[UPDATE_SELECTED] = not row[UPDATE_SELECTED] # don't touch the UI in refresh, it needs to be thread-safe. diff --git a/src/view.py b/src/view.py index 32cb580..9c8efdb 100755 --- a/src/view.py +++ b/src/view.py @@ -84,7 +84,6 @@ class ActivityListView(Gtk.ScrolledWindow): if self.activity_updater._in_sugar: crbool.set_property('indicator_size', style.zoom(26)) def toggled_cb(crbool, path, self): -path = self.ftreestore.convert_path_to_child_path(path) self.activity_updater.activity_list.toggle_select(path) self.activity_pane._refresh_update_size() crbool.connect('toggled', toggled_cb, self) -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar-update-control PATCH 2/2] Now, adding/removing groups via Modifiy Activity Groups work.
diff --git a/src/view.py b/src/view.py index 9c8efdb..4adb618 100755 --- a/src/view.py +++ b/src/view.py @@ -251,7 +251,7 @@ class GroupListView(Gtk.VBox): self.groupview.connect(drag_drop, drag_drop) crtext = Gtk.CellRendererText() column = Gtk.TreeViewColumn('Name', crtext) -def group_name_markup(cell_layout, renderer, m, it): +def group_name_markup(cell_layout, renderer, m, it, data): renderer.set_property('markup', 'b%s/b\nsmall%s/small' % \ (_e(m.get_value(it, model.DESCRIPTION_BIG)), _e(m.get_value(it, model.UPDATE_URL -- 1.7.11.7 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel