James Cameron | 1 Jun 2010 03:27
Favicon

[PATCH] fix trivial typo in extension loading exception

Discovered in shell logs of os240py, this exception was triggered due
to the yet to be merged touchpad control panel extension.  But the
exception used incorrect grammar.

Reverts part of a change by Tomeu in 77575b4 in 2008-10.
---
 src/jarabe/controlpanel/gui.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 51d9820..0ec70d3 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
 <at>  <at>  -259,7 +259,7  <at>  <at>  class ControlPanel(gtk.Window):
                             keywords.append(item)
                         options[item]['keywords'] = keywords
                     else:
-                        _logger.error('There is no CLASS constant specifieds ' \
+                        _logger.error('There is no CLASS constant specified ' \
                                           'in the view file \'%s\'.' % item)
                 except Exception:
                     logging.error('Exception while loading extension:\n' + \
--

-- 
1.7.1
Sridhar Dhanapalan | 1 Jun 2010 03:33
Picon
Gravatar

Re: File formats in Write

On 31 May 2010 19:58, Sascha Silbe <sascha-ml-ui-sugar-devel <at> silbe.org> wrote:
> Excerpts from Tomeu Vizoso's message of Mon May 31 09:11:39 +0000 2010:
>> This is a good point. It has been suggested before that we expose in
>> the journal the underlying format of each entry, when that's something
>> standardized.
> We already show the MIME type in the details view, but I suppose you're
> referring to presenting it more prominently. Did the suggestion have any
> details on how to achieve that?

Perhaps have the default presented at the top of the list in bold?

e.g.

  *OpenDocument Text (ODT)* - Default
  Plain Text
  Rich Text (RTF)
  Hypertext Markup Language (HTML)

Sridhar Dhanapalan
Technical Co-ordinator
One Laptop per Child (OLPC) Australia
p: +61 425 239 701
w: http://laptop.org.au
James Cameron | 1 Jun 2010 04:15
Favicon

Re: File formats in Write

On Tue, Jun 01, 2010 at 11:33:56AM +1000, Sridhar Dhanapalan wrote:
> Perhaps have the default presented at the top of the list in bold?

I wasn't able to figure out how to make it bold, but listing it is
certainly easy.

On XO-1.5 build os125, editing the
/home/olpc/Activities/Read.activity/toolbar.py file and changed
_EXPORT_FORMATS to add a new export format:

['application/vnd.oasis.opendocument.text', 'Open Document (ODT) - Default', 'ODT', ""],

Then I started the Write activity and was able to save as ODT, and got
an ODT file clearly identified in the journal.  file(1) said it was
"OpenDocument Text".

This may suffice for a workaround.

--

-- 
James Cameron
http://quozl.linux.org.au/
Gonzalo Odiard | 1 Jun 2010 05:47
Picon

Paint: how can use keys?

I am trying to use the keys with the circles with diferent sizes to change the size of the tool, but didn't see any event.
Can anybody help me?

[gonzalo <at> aronax tmp]$ diff -u  /home/gonzalo/sugar-devel/paint.git/Area.py Area.py
--- /home/gonzalo/sugar-devel/paint.git/Area.py    2010-05-31 00:54:19.000000000 -0300
+++ Area.py    2010-06-01 00:43:57.275948846 -0300
<at> <at> -1123,6 +1123,7 <at> <at>
             logging.debug('Unexpected error: %s', message)
 
     def key_press(self,widget,event):
+        print "code",event.keyval
         if event.keyval == gtk.keysyms.BackSpace:
             if self.selmove:
                 self.selmove = False
<at> <at> -1162,6 +1163,21 <at> <at>
             if self.tool['name'] == 'marquee-rectangular':
                 self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TCROSS))
             widget.queue_draw()
+        elif (event.keyval >= 65474) and (event.keyval <= 65477):
+            print "codigo",event.keyval
+            if self.tool['name'] in ['pencil','eraser','brush','rainbow']:
+                if event.keyval == 65474:
+                    self.tool['line size'] = self.tool['line size'] - 5
+                elif event.keyval == 65475:
+                    self.tool['line size'] = self.tool['line size'] - 1
+                elif event.keyval == 65476:
+                    self.tool['line size'] = self.tool['line size'] + 1
+                elif event.keyval == 65477:
+                    self.tool['line size'] = self.tool['line size'] + 5
+                widget.queue_draw()
+        else:
+            print "codigo no manejado",event.keyval
+
 
     def key_release(self,widget,event):
         pass

Gonzalo

_______________________________________________
Sugar-devel mailing list
Sugar-devel <at> lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
James Cameron | 1 Jun 2010 09:23
Favicon

Re: Paint: how can use keys?

On Tue, Jun 01, 2010 at 12:47:10AM -0300, Gonzalo Odiard wrote:
> I am trying to use the keys with the circles with diferent sizes to
> change the size of the tool, but didn't see any event.
> Can anybody help me?

I've tried what you tried, and found that there were no events logged
until focus was switched to the drawing area widget.

For example, start Paint, focus is on "Stroke Color".  Press right-arrow
key and focus moves to Pencil icon.  Press Tab once and focus will be on
the toolbar tabs.  Again, and focus will move to the Area
(gtk.DrawingArea) widget.

Only with focus there are events seen by key_press.

If you need activity global events, consider accelerators.

--

-- 
James Cameron
http://quozl.linux.org.au/
Sascha Silbe | 1 Jun 2010 10:17

Re: [PATCH] fix trivial typo in extension loading exception

Excerpts from James Cameron's message of Tue Jun 01 01:27:02 +0000 2010:

> diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
> index 51d9820..0ec70d3 100644
> --- a/src/jarabe/controlpanel/gui.py
> +++ b/src/jarabe/controlpanel/gui.py
>  <at>  <at>  -259,7 +259,7  <at>  <at>  class ControlPanel(gtk.Window):
>                              keywords.append(item)
>                          options[item]['keywords'] = keywords
>                      else:
> -                        _logger.error('There is no CLASS constant specifieds ' \
> +                        _logger.error('There is no CLASS constant specified ' \
>                                            'in the view file \'%s\'.' % item)
While you're at it, can you avoid the escaping by using different quotes
and replace "%" with "," (for consistency with our style guidelines - it
doesn't really make a difference in this particular case), please?

With or without that change:
Reviewed-By: Sascha Silbe <sascha-pgp <at> silbe.org>

Sascha
--

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
_______________________________________________
Sugar-devel mailing list
Sugar-devel <at> lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
Tomeu Vizoso | 1 Jun 2010 10:18
Favicon
Gravatar

Re: Paint: how can use keys?

On Tue, Jun 1, 2010 at 09:23, James Cameron <quozl <at> laptop.org> wrote:
> On Tue, Jun 01, 2010 at 12:47:10AM -0300, Gonzalo Odiard wrote:
>> I am trying to use the keys with the circles with diferent sizes to
>> change the size of the tool, but didn't see any event.
>> Can anybody help me?
>
> I've tried what you tried, and found that there were no events logged
> until focus was switched to the drawing area widget.
>
> For example, start Paint, focus is on "Stroke Color".  Press right-arrow
> key and focus moves to Pencil icon.  Press Tab once and focus will be on
> the toolbar tabs.  Again, and focus will move to the Area
> (gtk.DrawingArea) widget.
>
> Only with focus there are events seen by key_press.
>
> If you need activity global events, consider accelerators.

What about listening for those events on the top level window
(Activity class) instead of the canvas? I think the journal is doing
that, and I guess other activities as well.

Regards,

Tomeu

> --
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel <at> lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
Sascha Silbe | 1 Jun 2010 10:41

Re: Paint: how can use keys?

Excerpts from Tomeu Vizoso's message of Tue Jun 01 08:18:52 +0000 2010:
> On Tue, Jun 1, 2010 at 09:23, James Cameron <quozl <at> laptop.org> wrote:
> > If you need activity global events, consider accelerators.
> What about listening for those events on the top level window
> (Activity class) instead of the canvas? I think the journal is doing
> that, and I guess other activities as well.

Whatever you end up doing, please report back to the list. Terminal
has a similary issue (shortcuts not working while the VTE widget has
the focus).

Sascha
--

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
_______________________________________________
Sugar-devel mailing list
Sugar-devel <at> lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
John Samuel | 1 Jun 2010 12:01
Picon
Favicon

Browse activity not working

This is John here, I recently installed Sugar 0.88 Xephyr. I used the following code to install :

sudo add-apt-repository ppa:alsroot/trisquel-edu-3.5
sudo apt-get update
sudo apt-get install sugar-platform

But when I try to run the Browse activity, I get the following error :

Browse failed to start.

I tried to run the Browse activity from the terminal and got the following error :


root <at> labadmin-desktop:/usr/share/sugar/activities/Browse.activity# python browser.py
Traceback (most recent call last):
  File "browser.py", line 26, in <module>
    import hulahop
  File "/usr/lib/pymodules/python2.6/hulahop/__init__.py", line 29, in <module>
    from hulahop._hulahop import shutdown
ImportError: libxul.so: cannot open shared object file: No such file or directory
root <at> labadmin-desktop:/usr/share/sugar/activities/Browse.activity#


Kindly help

John Samuel

_______________________________________________
Sugar-devel mailing list
Sugar-devel <at> lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
Tim McNamara | 1 Jun 2010 12:52
Picon
Gravatar

Please review code (was Re: Speak answering maths questions)

Hi Chris, et al.

ref http://pastebin.com/2XNCHGiy

I am most of the way there, as you can see from lines 91 - 143. The function is attempting to return something that can be read out loud back to a child if they ask the Speak robot a mathematical question.

My biggest question is the best way to import the functionality from the Calculate activity. As per silbe's comments on IRC, I'm leaning towards duplicating the two modules inside of the Speak activity.

I guess I could implement my own parser, I thought about using the ast module. Then I realised that I would just make a poor replication of the parser & evaluator that's already been created.

Thoughts/comments welcome.

Tim



On 30 May 2010 05:34, Chris Ball <cjb <at> laptop.org> wrote:
Hi Tim,

I'd suggest looking at the parsing logic in the Calculate activity --
it deals with the same problems.

- Chris.
--
Chris Ball   <cjb <at> laptop.org>
One Laptop Per Child

_______________________________________________
Sugar-devel mailing list
Sugar-devel <at> lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Gmane