Re: [Sugar-devel] wordgroupz ( A vocabulary building app) ported to sugar

2010-10-14 Thread Ratnadeep Debnath
ping

On Sun, Oct 10, 2010 at 8:04 PM, Ratnadeep Debnath rtn...@gmail.com wrote:
 On Sun, Oct 3, 2010 at 11:37 PM, Walter Bender walter.ben...@gmail.com 
 wrote:
 Well, Wordnet brings in lots of dependencies, including Tcl. I think
 you'd be better off bundling the dictionary with your activity. I also
 had to install the python bindings for espeak. And once I launched it,
 it didn't seem to have any data loaded...

 It will be good to have the wordnet dictionary db packaged separately
 from the wordnet application.
 Also, wordgroupz, initially is empty, even though it has got a
 dictionary. wordgroupz is basically like a
 notebook for noting down new words we come across. But, a dictionary
 view can also be added to it
 easily.

 /usr/share/pixmaps/wordgroupz.png was also missing from line 608 of game.py
 I'll fix this.

 And I needed some help to design an icon for wordgroupz for sugar. Any
 artwork person willing to help?

 Thanks,
 Regards,
 rtnpro

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar] Removed hardcoded server url (SL #1976)

2010-10-14 Thread Dipankar Patro
Glad I could clarify my modifications. :)
I will send the corrected e-mail as soon as possible.


On Thu, Oct 14, 2010 at 4:29 AM, James Cameron qu...@laptop.org wrote:

 On Wed, Oct 13, 2010 at 04:31:00PM +0530, Dipankar Patro wrote:
  Thanks for reviewing it, James.

 Sorry, it was late, and I misunderstood the code you had written ... I
 withdraw my comment You are effectively repeating the previous if
 statement but using the output ... seems a bit obscure.



Apart from the lack of text wrap in the commit message, I've no issues
 with the patch.

 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] [RELEASE] Etoys 4.1.2390

2010-10-14 Thread Bert Freudenberg
== Sources ==

http://download.sugarlabs.org/sources/sucrose/glucose/etoys/etoys-4.1.2390.tar.gz

== Changes ==

* updated translations: de, ta, es, kn
* use composition input for bn, gu, hi, kn, ml, mr, ta, te, sa
* fix error when switching to Vietnamese
* use pulseaudio driver if available
* fix soundReverb
* correct problem stopping sounds

- Bert - (for the Etoys team)

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Read: focus after launching

2010-10-14 Thread Sascha Silbe
Excerpts from Simon Schampijer's message of Wed Oct 13 12:45:09 +0200 2010:

 when working on the issue in Read that the dpad keys do not work 
 directly when in ebook mode [1], I postulated that Read when it comes up 
 should always grab the focus on the view so scrolling using the arrow 
 keys is directly possible.

+1
This is quite annoying (especially so since I usually scroll using the
cursor keys, not a pointing device). I consider it a bug, but haven't
bothered reporting it yet since there were more important ones (not
working at all on recent distros for a start).

Like Daniel I think that all activities (or all applications for that
matter - I have the same problem with non-Sugar applications as well)
should start with a sensible focus selected.

We should check where focus gets assigned by default in activities that
don't set it explicitly. Depending on the outcome (e.g. if it's in the
tool bar by default), setting the focus in
sugar.activity.activity.Activity.set_canvas() might be a good idea.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Test request time

2010-10-14 Thread Tabitha Roder
Hello world

It is late Thursday night here in NZ so it is the time of the week I start
looking for what we should download Friday and test in NZ on Saturday
morning.  Are there any test requests from anyone out there?

I am assuming we are starting with a Sugar 0.90 test of some sort...
I see some new releases - Sliderule-22, Physics-7, Turtle Blocks-100,
Jukebox-20 and Numbers-3. Should we test these and is there anything in
particular (other than the changes described in the release notes) you are
looking for feedback on? I was hoping that Wordgroupz would be ready for
testing but I haven't seen that yet.
We still have to try out creating our own images for Visual Match, and test
eToys on Sugar 0.90 too.
The Australians have a new XO-1.5 build they want tested...

Anything else?

Thanks world

Tabitha
olpc NZ volunteer
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Sascha Silbe
Excerpts from Gonzalo Odiard's message of Wed Oct 13 17:33:50 +0200 2010:

 bus.add_signal_receiver(my_func,
 dbus_interface=org.freedesktop.Hal.Device,
 signal_name=PropertyModified)

HAL has been deprecated [1] and will not be available anymore at some
point in the future, so I advise against relying on it.

I don't know what the best way to listen to an ebook switch is. acpid
might be worth a look:

 In addition to rule files, acpid also accepts connections on a UNIX
 domain socket (/var/run/acpid.socket by default). Any application may
 connect to this socket. Once connected, acpid will send the text of all
 ACPI events to the client. The client has the responsibility of
 filtering for messages about which it cares. acpid will not close the
 client socket except in the case of a SIGHUP or acpid exiting.

Asking for advice on devkit-devel [2] might be a good idea as well.
UPower already has a LidIsClosed property (and sends property change
notifications [4]) so it might be straightforward to add support for
ebook switches.

Sascha

[1] http://lists.freedesktop.org/archives/hal/2008-May/011560.html
[2] http://lists.freedesktop.org/mailman/listinfo/devkit-devel
[3] http://upower.freedesktop.org/docs/UPower.html#UPower:LidIsClosed
[4] http://upower.freedesktop.org/docs/UPower.html#UPower::Changed
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar-devel Digest, Vol 24, Issue 69

2010-10-14 Thread Yioryos Asprobounitis
--- On Thu, 10/14/10, sugar-devel-requ...@lists.sugarlabs.org 
sugar-devel-requ...@lists.sugarlabs.org wrote:

 From: sugar-devel-requ...@lists.sugarlabs.org 
 sugar-devel-requ...@lists.sugarlabs.org
 Subject: Sugar-devel Digest, Vol 24, Issue 69
 To: sugar-devel@lists.sugarlabs.org
 Date: Thursday, October 14, 2010, 5:20 AM
 Send Sugar-devel mailing list
 submissions to
     sugar-devel@lists.sugarlabs.org
 

 
 Message: 5
 Date: Wed, 13 Oct 2010 22:28:05 -0400
 From: Walter Bender walter.ben...@gmail.com
 To: Gonzalo Odiard gonz...@laptop.org
 Cc: Sugar-dev Devel sugar-devel@lists.sugarlabs.org
 Subject: Re: [Sugar-devel] Dangerous comments in
     activities.sugarlabs.org?
 Message-ID:
     aanlkti=wdng-ezo2mtb-wt0z5qztvnm0h2yebflk8...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1
 
 On Wed, Oct 13, 2010 at 10:22 PM, Gonzalo Odiard gonz...@laptop.org
 wrote:
  I don't know who can check this:
  http://activities.sugarlabs.org/es-ES/sugar/user/2394
 
 Thanks for the heads up. I think I got it taken care of.
 
 -walter
 

Just checked 30 of the http://activities.sugarlabs.org/es-ES/sugar/user/ (2360 
to 2389)
2360,2,3,4,6,7, 2371,2,3,6,7,8, 2380,1,4 (half!!!) have links to adult sites, 
real estate, infomercials and all kinds of spam and abuse.

Maybe links in sugar-users should be banned of flagged and checked?


  
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Peter Robinson
On Thu, Oct 14, 2010 at 9:27 AM, Sascha Silbe
sascha-ml-reply-to-201...@silbe.org wrote:
 Excerpts from Gonzalo Odiard's message of Wed Oct 13 17:33:50 +0200 2010:

 bus.add_signal_receiver(my_func,
                         dbus_interface=org.freedesktop.Hal.Device,
                         signal_name=PropertyModified)

 HAL has been deprecated [1] and will not be available anymore at some
 point in the future, so I advise against relying on it.

 I don't know what the best way to listen to an ebook switch is. acpid
 might be worth a look:

Most distros don't use acpid either

 In addition to rule files, acpid also accepts connections on a UNIX
 domain socket (/var/run/acpid.socket by default). Any application may
 connect to this socket. Once connected, acpid will send the text of all
 ACPI events to the client. The client has the responsibility of
 filtering for messages about which it cares. acpid will not close the
 client socket except in the case of a SIGHUP or acpid exiting.

 Asking for advice on devkit-devel [2] might be a good idea as well.
 UPower already has a LidIsClosed property (and sends property change
 notifications [4]) so it might be straightforward to add support for
 ebook switches.

I think this should be an input event, I think in most cases this is
how input from lid switches and the like are handled across most
things now.

Peter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCHv2] Title for 'Rectangualar Marquee' tool changed to 'Select Area'

2010-10-14 Thread Sascha Silbe
Excerpts from Ayush Goyal's message of Wed Oct 13 18:50:00 +0200 2010:

 The select tool is less than optimally discoverable in English because
 of the name 'Rectangular Marquee'.  The name is changed to 'Select
 Area'.
[...]

Please mention the name of the module (activity in this case) the patch
is aimed for as a tag in the subject line, e.g. [PATCH v2 FooActivity].
Even the diff chunk headers don't give a hint this time.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Testing] Test request time

2010-10-14 Thread Thomas C Gilliard

Tabitha:

It would be nice if we could incorporate your testing with what we have 
been trying to do here:
Any ideas your group may have to improve or change these tables would be 
appreciated.


(Feel free to enter anything you want on these pages, rearrange them add 
columns for new OS etc.)


Activities under various Hardware and OS's:

http://wiki.sugarlabs.org/go/Features/Soas_V4/ASLOxo_Activity_Test_Table#Activity_Test_Results

Also for installs CD boot and bugs etc.:

http://wiki.sugarlabs.org/go/Talk:Sugar_on_a_Stick_release_process#Test_Matrix

Cordially;

Tom Gilliard
satellit on #sugar freenode IRC

Tabitha Roder wrote:

Hello world

It is late Thursday night here in NZ so it is the time of the week I start
looking for what we should download Friday and test in NZ on Saturday
morning.  Are there any test requests from anyone out there?

I am assuming we are starting with a Sugar 0.90 test of some sort...
I see some new releases - Sliderule-22, Physics-7, Turtle Blocks-100,
Jukebox-20 and Numbers-3. Should we test these and is there anything in
particular (other than the changes described in the release notes) you are
looking for feedback on? I was hoping that Wordgroupz would be ready for
testing but I haven't seen that yet.
We still have to try out creating our own images for Visual Match, and test
eToys on Sugar 0.90 too.
The Australians have a new XO-1.5 build they want tested...

Anything else?

Thanks world

Tabitha
olpc NZ volunteer

  



___
Testing mailing list
test...@lists.laptop.org
http://lists.laptop.org/listinfo/testing
  
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Gonzalo Odiard
Thanks Sasha and Peter
Anybody know what software is sending the signal now?

Gonzalo


On Thu, Oct 14, 2010 at 6:38 AM, Peter Robinson pbrobin...@gmail.comwrote:

 On Thu, Oct 14, 2010 at 9:27 AM, Sascha Silbe
 sascha-ml-reply-to-201...@silbe.org wrote:
  Excerpts from Gonzalo Odiard's message of Wed Oct 13 17:33:50 +0200 2010:
 
  bus.add_signal_receiver(my_func,
  dbus_interface=org.freedesktop.Hal.Device,
  signal_name=PropertyModified)
 
  HAL has been deprecated [1] and will not be available anymore at some
  point in the future, so I advise against relying on it.
 
  I don't know what the best way to listen to an ebook switch is. acpid
  might be worth a look:

 Most distros don't use acpid either

  In addition to rule files, acpid also accepts connections on a UNIX
  domain socket (/var/run/acpid.socket by default). Any application may
  connect to this socket. Once connected, acpid will send the text of all
  ACPI events to the client. The client has the responsibility of
  filtering for messages about which it cares. acpid will not close the
  client socket except in the case of a SIGHUP or acpid exiting.
 
  Asking for advice on devkit-devel [2] might be a good idea as well.
  UPower already has a LidIsClosed property (and sends property change
  notifications [4]) so it might be straightforward to add support for
  ebook switches.

 I think this should be an input event, I think in most cases this is
 how input from lid switches and the like are handled across most
 things now.

 Peter
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Test request time

2010-10-14 Thread Simon Schampijer

On 10/14/2010 11:20 AM, Tabitha Roder wrote:

Hello world

It is late Thursday night here in NZ so it is the time of the week I start
looking for what we should download Friday and test in NZ on Saturday
morning.  Are there any test requests from anyone out there?

I am assuming we are starting with a Sugar 0.90 test of some sort...
I see some new releases - Sliderule-22, Physics-7, Turtle Blocks-100,
Jukebox-20 and Numbers-3. Should we test these and is there anything in
particular (other than the changes described in the release notes) you are
looking for feedback on? I was hoping that Wordgroupz would be ready for
testing but I haven't seen that yet.
We still have to try out creating our own images for Visual Match, and test
eToys on Sugar 0.90 too.
The Australians have a new XO-1.5 build they want tested...

Anything else?

Thanks world

Tabitha
olpc NZ volunteer


Hi Tabitha,

thanks very much for asking. Of course it would be great if you could 
give 0.90 another go. I am updating and uploading new images for testing 
on the XO-1 and XO-1.5 [1]. I would as well like to give you a list of 
fixes that went in the packages you could verify and of course I am 
looking for any other feedback you have.


We will do new Sugar tarballs today (then it takes some hours for the 
rpms, some for new builds...). Until when do you need the builds and the 
instructions?


Regards,
   Simon

[1] http://bugs.laptop.org/~erikos/F14_builds/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Test request time

2010-10-14 Thread Walter Bender
On Thu, Oct 14, 2010 at 5:20 AM, Tabitha Roder tabi...@tabitha.net.nz wrote:
 Hello world

 It is late Thursday night here in NZ so it is the time of the week I start
 looking for what we should download Friday and test in NZ on Saturday
 morning.  Are there any test requests from anyone out there?

 I am assuming we are starting with a Sugar 0.90 test of some sort...
 I see some new releases - Sliderule-22, Physics-7, Turtle Blocks-100,
 Jukebox-20 and Numbers-3. Should we test these and is there anything in
 particular (other than the changes described in the release notes) you are
 looking for feedback on? I was hoping that Wordgroupz would be ready for
 testing but I haven't seen that yet.
 We still have to try out creating our own images for Visual Match, and test
 eToys on Sugar 0.90 too.

I am working on a simpler way to create images for Visual Match, so
maybe hold off on that one for a week. Thanks.

-walter

 The Australians have a new XO-1.5 build they want tested...

 Anything else?

 Thanks world

 Tabitha
 olpc NZ volunteer

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel





-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] wordgroupz ( A vocabulary building app) ported to sugar

2010-10-14 Thread Gary Martin
Hi Ratnadeep,

On 14 Oct 2010, at 08:20, Ratnadeep Debnath rtn...@gmail.com wrote:

 ping
 
 On Sun, Oct 10, 2010 at 8:04 PM, Ratnadeep Debnath rtn...@gmail.com wrote:
 On Sun, Oct 3, 2010 at 11:37 PM, Walter Bender walter.ben...@gmail.com 
 wrote:
 Well, Wordnet brings in lots of dependencies, including Tcl. I think
 you'd be better off bundling the dictionary with your activity. I also
 had to install the python bindings for espeak. And once I launched it,
 it didn't seem to have any data loaded...
 
 It will be good to have the wordnet dictionary db packaged separately
 from the wordnet application.
 Also, wordgroupz, initially is empty, even though it has got a
 dictionary. wordgroupz is basically like a
 notebook for noting down new words we come across. But, a dictionary
 view can also be added to it
 easily.
 
 /usr/share/pixmaps/wordgroupz.png was also missing from line 608 of game.py
 I'll fix this.
 
 And I needed some help to design an icon for wordgroupz for sugar. Any
 artwork person willing to help?

I'll try and get you a quick svg activity icon, probably will be later tomorrow.

--Gary

 Thanks,
 Regards,
 rtnpro
 
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Paul Fox
gonzalo wrote:
  Thanks Sasha and Peter
  Anybody know what software is sending the signal now?

/dev/input/event4 on my XO-1.5.

paul

  
  Gonzalo
  
  
  On Thu, Oct 14, 2010 at 6:38 AM, Peter Robinson pbrobin...@gmail.comwrote:
  
   On Thu, Oct 14, 2010 at 9:27 AM, Sascha Silbe
   sascha-ml-reply-to-201...@silbe.org wrote:
Excerpts from Gonzalo Odiard's message of Wed Oct 13 17:33:50 +0200 2010:
   
bus.add_signal_receiver(my_func,
dbus_interface=org.freedesktop.Hal.Device,
signal_name=PropertyModified)
   
HAL has been deprecated [1] and will not be available anymore at some
point in the future, so I advise against relying on it.
   
I don't know what the best way to listen to an ebook switch is. acpid
might be worth a look:
  
   Most distros don't use acpid either
  
In addition to rule files, acpid also accepts connections on a UNIX
domain socket (/var/run/acpid.socket by default). Any application may
connect to this socket. Once connected, acpid will send the text of all
ACPI events to the client. The client has the responsibility of
filtering for messages about which it cares. acpid will not close the
client socket except in the case of a SIGHUP or acpid exiting.
   
Asking for advice on devkit-devel [2] might be a good idea as well.
UPower already has a LidIsClosed property (and sends property change
notifications [4]) so it might be straightforward to add support for
ebook switches.
  
   I think this should be an input event, I think in most cases this is
   how input from lid switches and the like are handled across most
   things now.
  
   Peter
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
  
  part 2 text/plain 153
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel

=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCHv2] Title for 'Rectangualar Marquee' tool changed to 'Select Area'

2010-10-14 Thread Gonzalo Odiard
In the first line of the header of the patch  you must put the ticket
associated.
We have two different trac instances, then we put SL in the tickets from
bugs.sugarlabs.org and OLPC in the tickets from dev.laptop.org
In this case, the first line will be anything like fix SL #2266 -
'Retangular Marquee' is not descriptive in English as a title for the
Selection area tool.
Then a blank line and your explanation.
Also you must send your patch with git send-mail or attach the patch,
because i can't commit the patch like is in your mail. git does not accept
it.
Many mail clients corrupt the patch created with git.
Try again :)
May be a little difficult the first time, but the later will be easier :)

Gonzalo


On Wed, Oct 13, 2010 at 1:50 PM, Ayush Goyal ay...@seeta.in wrote:

 The select tool is less than optimally discoverable in English because
 of the name 'Rectangular Marquee'.  The name is changed to 'Select
 Area'.

 Signed-off-by: Ayush Goyal ay...@seeta.in
 ---
  toolbox.py |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/toolbox.py b/toolbox.py
 index 90f664d..299181b 100644
 --- a/toolbox.py
 +++ b/toolbox.py
 @@ -434,7 +434,7 @@ class ToolsToolbar(gtk.Toolbar):

 

 -self._tool_marquee_rectangular =
 DrawToolButton('tool-marquee-rectangular',activity.tool_group,_('Rectangular
 Marquee'))
 +self._tool_marquee_rectangular =
 DrawToolButton('tool-marquee-rectangular',activity.tool_group,_('Select
 Area'))
 self.insert(self._tool_marquee_rectangular, -1)
 try:
 self._configure_palette(self._tool_marquee_rectangular,
 self._TOOL_MARQUEE_RECTANGULAR)
 --
 1.7.1




-- 
Gonzalo Odiard
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Daniel Drake
On 14 October 2010 10:38, Peter Robinson pbrobin...@gmail.com wrote:
 I think this should be an input event, I think in most cases this is
 how input from lid switches and the like are handled across most
 things now.

It already is an input event, but I suspect that diving down into
opening input devices is the wrong thing to do. Next sensible step
would be to look at how GNOME does it.

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Make sure the buddy palette is disposed after popdown #1742

2010-10-14 Thread Tomeu Vizoso
On Wed, Oct 13, 2010 at 18:29, Simon Schampijer si...@schampijer.de wrote:
 On 10/11/2010 11:35 AM, Tomeu Vizoso wrote:

 ---
  src/jarabe/view/buddyicon.py |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

 diff --git a/src/jarabe/view/buddyicon.py b/src/jarabe/view/buddyicon.py
 index 37b9167..15385bd 100644
 --- a/src/jarabe/view/buddyicon.py
 +++ b/src/jarabe/view/buddyicon.py
 @@ -28,6 +28,8 @@ class BuddyIcon(CanvasIcon):
          self._buddy.connect('notify::present',
 self.__buddy_notify_present_cb)
          self._buddy.connect('notify::color',
 self.__buddy_notify_color_cb)

 +        self.palette_invoker.transient = True
 +
          self._update_color()

      def create_palette(self):

 This does set it to transient for all the buddies palletes, as well the one
 from the owner. As the owner palette has no dynamic content I guess we don't
 need to.

It's no big deal, but I think we should stop caching as many palettes
as possible.

Regards,

Tomeu

 Regards,
   Simon
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCHv2] Title for 'Rectangualar Marquee' tool changed to 'Select Area'

2010-10-14 Thread Ayush Goyal

 Gonzalo,

Thanks for your recommendations. I have revised the patch, made the 
changes and resent it again using git send-mail. Please review it.


Regards,
Ayush

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] wordgroupz ( A vocabulary building app) ported to sugar

2010-10-14 Thread Ratnadeep Debnath
 I'll try and get you a quick svg activity icon, probably will be later 
 tomorrow.
Thanks Gary.

Regards,
rtnpro
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Peter Robinson
On Thu, Oct 14, 2010 at 4:59 PM, Daniel Drake d...@laptop.org wrote:
 On 14 October 2010 10:38, Peter Robinson pbrobin...@gmail.com wrote:
 I think this should be an input event, I think in most cases this is
 how input from lid switches and the like are handled across most
 things now.

 It already is an input event, but I suspect that diving down into
 opening input devices is the wrong thing to do. Next sensible step
 would be to look at how GNOME does it.

If its an input event it can then surely be dealt with like any other
special key within X or gnome. I presume its the rotate button
bottom right hand corner of the screen. I think there's an X button
for rotate on table computers, could it be mapped to that as its
similar functionality and would then also work on tablet computers as
well.

Peter
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCHv2 Paint Activity] Title for 'Rectangualar Marquee' tool changed to 'Select Area' (SL #2266)

2010-10-14 Thread Gonzalo Odiard
Thanks.
Change commited

Gonzalo

On Thu, Oct 14, 2010 at 12:05 PM, Ayush Goyal ay...@seeta.in wrote:

 In Paint Activity, the select tool is less than optimally discoverable in
 English because
 of the name 'Rectangular Marquee'.  The name is changed to 'Select
 Area'.

 Signed-off-by: Ayush Goyal ay...@seeta.in
 ---
  toolbox.py |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
  v1-v2: Changes in language files were reverted back
 diff --git a/toolbox.py b/toolbox.py
 index 90f664d..299181b 100644
 --- a/toolbox.py
 +++ b/toolbox.py
 @@ -434,7 +434,7 @@ class ToolsToolbar(gtk.Toolbar):

 

 -self._tool_marquee_rectangular =
 DrawToolButton('tool-marquee-rectangular',activity.tool_group,_('Rectangular
 Marquee'))
 +self._tool_marquee_rectangular =
 DrawToolButton('tool-marquee-rectangular',activity.tool_group,_('Select
 Area'))
 self.insert(self._tool_marquee_rectangular, -1)
 try:
 self._configure_palette(self._tool_marquee_rectangular,
 self._TOOL_MARQUEE_RECTANGULAR)
 --
 1.7.1




-- 
Gonzalo Odiard
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Make sure the buddy palette is disposed after popdown #1742

2010-10-14 Thread Tomeu Vizoso
---
 src/jarabe/view/buddyicon.py |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/view/buddyicon.py b/src/jarabe/view/buddyicon.py
index 37b9167..332c0c8 100644
--- a/src/jarabe/view/buddyicon.py
+++ b/src/jarabe/view/buddyicon.py
@@ -28,6 +28,8 @@ class BuddyIcon(CanvasIcon):
 self._buddy.connect('notify::present', self.__buddy_notify_present_cb)
 self._buddy.connect('notify::color', self.__buddy_notify_color_cb)
 
+self.palette_invoker.cache_palette = False
+
 self._update_color()
 
 def create_palette(self):
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Add 'cache-palette' property to Invoker #1742

2010-10-14 Thread Tomeu Vizoso
Meaning that the palette will be cached after it's created.
---
 src/sugar/graphics/palette.py   |1 +
 src/sugar/graphics/palettewindow.py |   23 ---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
index d4632eb..d4f844c 100644
--- a/src/sugar/graphics/palette.py
+++ b/src/sugar/graphics/palette.py
@@ -158,6 +158,7 @@ class Palette(PaletteWindow):
 self.popdown(immediate=True)
 # Break the reference cycle. It looks like the gc is not able to free
 # it, possibly because gtk.Menu memory handling is very special.
+self.menu.disconnect_by_func(self.__menu_item_inserted_cb)
 self.menu = None
 
 def __show_cb(self, widget):
diff --git a/src/sugar/graphics/palettewindow.py 
b/src/sugar/graphics/palettewindow.py
index 22131c2..f51c938 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -179,6 +179,7 @@ class PaletteWindow(gtk.Window):
 
 def __destroy_cb(self, palette):
 self.set_group_id(None)
+self._mouse_detector.disconnect_by_func(self._mouse_slow_cb)
 
 def set_invoker(self, invoker):
 for hid in self._invoker_hids[:]:
@@ -457,6 +458,7 @@ class Invoker(gobject.GObject):
 self._cursor_x = -1
 self._cursor_y = -1
 self._palette = None
+self._cache_palette = True
 
 def attach(self, parent):
 self.parent = parent
@@ -639,18 +641,33 @@ class Invoker(gobject.GObject):
 def set_palette(self, palette):
 if self._palette is not None:
 self._palette.popdown(immediate=True)
-
-if self._palette:
 self._palette.props.invoker = None
+self._palette.destroy()
 
 self._palette = palette
 
-if self._palette:
+if self._palette is not None:
 self._palette.props.invoker = self
+self._palette.connect('popdown', self.__palette_popdown_cb)
 
 palette = gobject.property(
 type=object, setter=set_palette, getter=get_palette)
 
+def get_cache_palette(self):
+return self._cache_palette
+
+def set_cache_palette(self, cache_palette):
+self._cache_palette = cache_palette
+
+cache_palette = gobject.property(type=object, setter=set_cache_palette,
+ getter=get_cache_palette)
+Whether the invoker will cache the palette after its creation. Defaults
+to True.
+
+
+def __palette_popdown_cb(self, palette):
+if not self.props.cache_palette:
+self.set_palette(None)
 
 class WidgetInvoker(Invoker):
 
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Paul Fox
peter wrote:
  On Thu, Oct 14, 2010 at 4:59 PM, Daniel Drake d...@laptop.org wrote:
   On 14 October 2010 10:38, Peter Robinson pbrobin...@gmail.com wrote:
   I think this should be an input event, I think in most cases this is
   how input from lid switches and the like are handled across most
   things now.
  
   It already is an input event, but I suspect that diving down into
   opening input devices is the wrong thing to do. Next sensible step
   would be to look at how GNOME does it.
  
  If its an input event it can then surely be dealt with like any other
  special key within X or gnome. I presume its the rotate button
  bottom right hand corner of the screen. I think there's an X button
  for rotate on table computers, could it be mapped to that as its
  similar functionality and would then also work on tablet computers as
  well.

the rotate key is already handled as a special key.  we're talking
about the ebook switch, which is an open or closed magnetic sensor
that can tell you when the screen is fully folded into the ebook
position.

paul
=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [RELEASE] sugar-0.90.3

2010-10-14 Thread Tomeu Vizoso
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar/sugar-0.90.3.tar.bz2

== News ==

* Make sure the buddy palette is disposed after popdown #1742 (Tomeu Vizoso)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [RELEASE] sugar-toolkit-0.90.2

2010-10-14 Thread Simon Schampijer
== Source ==

http://download.sugarlabs.org/sources/sucrose/glucose/sugar-toolkit/sugar-toolkit-0.90.2.tar.bz2

== News ==

* Release 0.90.2 (Simon Schampijer)
* Add 'cache-palette' property to Invoker #1742 (Tomeu Vizoso)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Sascha Silbe
Excerpts from Daniel Drake's message of Thu Oct 14 17:59:24 +0200 2010:

[ebook switch]
 It already is an input event, but I suspect that diving down into
 opening input devices is the wrong thing to do. Next sensible step
 would be to look at how GNOME does it.

Does Gnome support ebook switches at all? If so, where? I.e. what part
of the system resp. what application changes behaviour based on the
ebook switch?

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-14 Thread Mukul Gupta
The patch disables the Start and Start With menu items for files
which can't be opened by any installed activity and instead
replace it with a hover dropdown with a menu item 'No activity
installed to start entry'
---
 src/jarabe/journal/palettes.py |   99 +--
 1 files changed, 53 insertions(+), 46 deletions(-)

diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
index 7c3e5ff..56df595 100644
--- a/src/jarabe/journal/palettes.py
+++ b/src/jarabe/journal/palettes.py
@@ -62,51 +62,59 @@ class ObjectPalette(Palette):
 Palette.__init__(self, primary_text=title,
  icon=activity_icon)
 
-if metadata.get('activity_id', ''):
-resume_label = _('Resume')
-resume_with_label = _('Resume with')
-else:
-resume_label = _('Start')
-resume_with_label = _('Start with')
-menu_item = MenuItem(resume_label, 'activity-start')
-menu_item.connect('activate', self.__start_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
-
-menu_item = MenuItem(resume_with_label, 'activity-start')
-self.menu.append(menu_item)
-menu_item.show()
-start_with_menu = StartWithMenu(self._metadata)
-menu_item.set_submenu(start_with_menu)
-
-client = gconf.client_get_default()
-color = XoColor(client.get_string('/desktop/sugar/user/color'))
-menu_item = MenuItem(_('Copy'))
-icon = Icon(icon_name='edit-copy', xo_color=color,
-icon_size=gtk.ICON_SIZE_MENU)
-menu_item.set_image(icon)
-menu_item.connect('activate', self.__copy_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
-
-menu_item = MenuItem(_('Send to'), 'document-send')
-self.menu.append(menu_item)
-menu_item.show()
-
-friends_menu = FriendsMenu()
-friends_menu.connect('friend-selected', self.__friend_selected_cb)
-menu_item.set_submenu(friends_menu)
-
-if detail == True:
-menu_item = MenuItem(_('View Details'), 'go-right')
-menu_item.connect('activate', self.__detail_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
-
-menu_item = MenuItem(_('Erase'), 'list-remove')
-menu_item.connect('activate', self.__erase_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
+   if misc.get_activities(metadata):
+   if metadata.get('activity_id', ''):
+   resume_label = _('Resume')
+   resume_with_label = _('Resume with')
+   else:
+   resume_label = _('Start')
+   resume_with_label = _('Start with')
+   menu_item = MenuItem(resume_label, 'activity-start')
+   menu_item.connect('activate', self.__start_activate_cb)
+   self.menu.append(menu_item)
+   menu_item.show()
+   
+   menu_item = MenuItem(resume_with_label, 'activity-start')
+   self.menu.append(menu_item)
+   menu_item.show()
+   start_with_menu = StartWithMenu(self._metadata)
+   menu_item.set_submenu(start_with_menu)
+
+   else:
+   resume_label = _('No activity installed to start entry')
+   menu_item = MenuItem(resume_label)
+   menu_item.set_sensitive(False)
+   self.menu.append(menu_item)
+   menu_item.show()
+
+   client = gconf.client_get_default()
+   color = XoColor(client.get_string('/desktop/sugar/user/color'))
+   menu_item = MenuItem(_('Copy'))
+   icon = Icon(icon_name='edit-copy', xo_color=color,
+   icon_size=gtk.ICON_SIZE_MENU)
+   menu_item.set_image(icon)
+   menu_item.connect('activate', self.__copy_activate_cb)
+   self.menu.append(menu_item)
+   menu_item.show()
+
+   menu_item = MenuItem(_('Send to'), 'document-send')
+   self.menu.append(menu_item)
+   menu_item.show()
+
+   friends_menu = FriendsMenu()
+   friends_menu.connect('friend-selected', self.__friend_selected_cb)
+   menu_item.set_submenu(friends_menu)
+   
+   if detail == True:
+   menu_item = MenuItem(_('View Details'), 'go-right')
+   menu_item.connect('activate', self.__detail_activate_cb)
+   self.menu.append(menu_item)
+   menu_item.show()
+   
+   menu_item = MenuItem(_('Erase'), 'list-remove')
+   menu_item.connect('activate', self.__erase_activate_cb)
+   self.menu.append(menu_item)
+   menu_item.show()
 
 def __start_activate_cb(self, menu_item):
 misc.resume(self._metadata)
@@ -219,7 +227,6 @@ class StartWithMenu(gtk.Menu):
 mime_registry.set_default_activity(mime_type, service_name)
 misc.resume(self._metadata, service_name)
 
-
 class BuddyPalette(Palette):
 def __init__(self, buddy):
 self._buddy = buddy
-- 

Re: [Sugar-devel] [PATCH] Add 'cache-palette' property to Invoker #1742

2010-10-14 Thread Sascha Silbe
Excerpts from Tomeu Vizoso's message of Thu Oct 14 18:50:49 +0200 2010:

 Meaning that the palette will be cached after it's created.
 ---

Looks good AFAICT.

 +Whether the invoker will cache the palette after its creation. 
 Defaults
 +to True.
 +

This is OK, though what will cause the cached copy to be used and what
will cause a new copy to be created resp. when will the cached copy be
destroyed would be even better.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] fix SL #2001 - Write does not pass parent window xid to ObjectChooser

2010-10-14 Thread godiard
From: Gonzalo Odiard godi...@sugarlabs.org

This is a regresion, probably introduced when changed the toolbar.
May be pass self.abiword_canvas and self to ImageToolbar is not the smarter 
option.
---
 AbiWordActivity.py |2 +-
 toolbar.py |5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index f6c54fa..7deab8c 100644
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -110,7 +110,7 @@ class AbiWordActivity (activity.Activity):
 toolbar_box.toolbar.insert(list_toolbar, -1)
 
 insert_toolbar = ToolbarButton()
-insert_toolbar.props.page = InsertToolbar(self.abiword_canvas)
+insert_toolbar.props.page = InsertToolbar(self.abiword_canvas, self)
 insert_toolbar.props.icon_name = 'insert-table'
 insert_toolbar.props.label = _('Table')
 toolbar_box.toolbar.insert(insert_toolbar, -1)
diff --git a/toolbar.py b/toolbar.py
index 75243c7..a16803c 100644
--- a/toolbar.py
+++ b/toolbar.py
@@ -176,10 +176,11 @@ class EditToolbar(gtk.Toolbar):
 tool_item.show()
 
 class InsertToolbar(gtk.Toolbar):
-def __init__(self, abiword_canvas):
+def __init__(self, abiword_canvas, parent):
 gtk.Toolbar.__init__(self)
 
 self._abiword_canvas = abiword_canvas
+self._parent = parent
 
 self._table = abiword.TableCreator()
 self._table.set_labels(_('Table'), _('Cancel'))
@@ -234,7 +235,7 @@ class InsertToolbar(gtk.Toolbar):
 def cb(object):
 logging.debug('ObjectChooser: %r' % object)
 self._abiword_canvas.insert_image(object.file_path, True)
-chooser.pick(what=chooser.IMAGE, cb=cb)
+chooser.pick(parent=self._parent, what=chooser.IMAGE, cb=cb)
 
 def _table_cb(self, abi, rows, cols):
 self._abiword_canvas.insert_table(rows, cols)
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Change the logic used to determine the format used to save files.

2010-10-14 Thread godiard
From: Gonzalo Odiard godi...@sugarlabs.org

Fix the tickets OLPC #5291, OLPC #1925, SL #2127
---
 AbiWordActivity.py |   36 +++-
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index 7deab8c..3613ce5 100644
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -423,28 +423,38 @@ class AbiWordActivity (activity.Activity):
 
#self.abiword_canvas.invoke_cmd('com.abisource.abiword.abicollab.olpc.buddyLeft',
 self.participants[buddy.object_path()], 0, 0)
 
 def read_file(self, file_path):
-logging.debug('AbiWordActivity.read_file: %s, mimetype: %s', 
file_path, self.metadata['mime_type'])
-if 'source' in self.metadata and self.metadata['source'] == '1':
-logger.debug('Opening file in view source mode')
-self.abiword_canvas.load_file('file://' + file_path, 'text/plain') 
+logging.debug('AbiWordActivity.read_file: %s, mimetype: %s',
+file_path, self.metadata['mime_type'])
+if self.metadata['mime_type'] in ['text/plain', 'text/csv']:
+logging.debug('Opening file in text mode')
+self.abiword_canvas.load_file('file://' + file_path, 'text/plain')
 else:
 self.abiword_canvas.load_file('file://' + file_path, '') # we pass 
no mime/file type, let libabiword autodetect it, so we can handle multiple file 
formats
 
 def write_file(self, file_path):
 logging.debug('AbiWordActivity.write_file')
 
-# check if we have a default mimetype; if not, fall back to 
OpenDocument
-# also fallback if we know we cannot export in that format
-if 'mime_type' not in self.metadata or self.metadata['mime_type'] == 
'' or \
-self.metadata['mime_type'] == 'application/msword':
-self.metadata['mime_type'] = 
'application/vnd.oasis.opendocument.text'
-
-# if we were viewing the source of a file, 
-# then always save as plain text
+# if we were viewing a text file save as plain text
 actual_mimetype = self.metadata['mime_type']
-if 'source' in self.metadata and self.metadata['source'] == '1':
+if self.metadata['mime_type'] in ['text/plain', 'text/csv']:
 logger.debug('Writing file as type source (text/plain)')
 actual_mimetype = 'text/plain'
+else:
+# if not is a abiword file, fall back to OpenDocument
+if self.metadata['mime_type'] not in ['application/x-abiword',
+   'text/x-xml-abiword']:
+actual_mimetype = 'application/vnd.oasis.opendocument.text'
+# change the extension in the file name and the description
+self._change_file_ext(self.metadata['title'], '.odt')
+self._change_file_ext(self.metadata['description'], '.odt')
+
+self.metadata['mime_type'] = actual_mimetype
 
 self.metadata['fulltext'] = 
self.abiword_canvas.get_content(extension_or_mimetype=.txt)[:3000]
 self.abiword_canvas.save('file://' + file_path, actual_mimetype, '')
+
+def _change_file_ext(self, file_name, extension):
+last_point_posi = file_name.rfind('.')
+if last_point_posi  -1:
+file_name = file_name[0:last_point_posi] + extension
+return file_name
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Make sure the buddy palette is disposed after popdown #1742

2010-10-14 Thread Sascha Silbe
Excerpts from Tomeu Vizoso's message of Thu Oct 14 18:03:33 +0200 2010:

 It's no big deal, but I think we should stop caching as many palettes
 as possible.

+1 in general. Natural exceptions are palettes that are (potentially)
expensive to create - e.g. the ones in activity tool bars.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Gonzalo Odiard
I don't see Gnome doing anything with this event.
It's a very specific XO thing ...
I probably don't are explaining well what I need.
I am reading the event with dbus, it's working. I think it's the wright way
to do this today.
But it's strange it send a array with two boolean values (lid and ebook
switchs) but ever with the value in False.
I want to check if the software who emit the dbus signal is checking in the
wright place for the switch state.

Now I am testing in a XO-1, and don't have the dbus signal.
Also the devices are different:
in XO-1 cat /proc/bus/input/devices show the lid switch in event1 ant the
ebook switch in event2
in XO-1.5 cat /proc/bus/input/devices show the lid switch in event2 ant the
ebook switch in event4
in the XO-1 don't have the /proc/acpi directory
The two machines have a 852 img

Gonzalo


On Thu, Oct 14, 2010 at 12:59 PM, Daniel Drake d...@laptop.org wrote:

 On 14 October 2010 10:38, Peter Robinson pbrobin...@gmail.com wrote:
  I think this should be an input event, I think in most cases this is
  how input from lid switches and the like are handled across most
  things now.

 It already is an input event, but I suspect that diving down into
 opening input devices is the wrong thing to do. Next sensible step
 would be to look at how GNOME does it.

 Daniel
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Daniel Drake
On 14 October 2010 19:29, Gonzalo Odiard gonz...@laptop.org wrote:
 I don't see Gnome doing anything with this event.
 It's a very specific XO thing ...

Oops.
I meant to suggest that you look at how GNOME deals with the
lid-closed switch. Since, from the kernel point of view, its exactly
the same reporting mechanism (through an input device). Whatever
interface GNOME is using to listen for lid closes, its very likely
that you can listen for ebook mode the same way.

 I probably don't are explaining well what I need.
 I am reading the event with dbus, it's working. I think it's the wright way
 to do this today.
 But it's strange it send a array with two boolean values (lid and ebook
 switchs) but ever with the value in False.

Are you sure those 2 values are supposed to refer to the lid and ebook switches?

 I want to check if the software who emit the dbus signal is checking in the
 wright place for the switch state.

Then you need to look closely at HAL, if you're tracking down that HAL
message. I don't know anyone in the OLPC community who has instant
expertise here; you need to dive into the docs and code and figure it
out.

 Also the devices are different:
 in XO-1 cat /proc/bus/input/devices show the lid switch in event1 ant the
 ebook switch in event2
 in XO-1.5 cat /proc/bus/input/devices show the lid switch in event2 ant the
 ebook switch in event4
 in the XO-1 don't have the /proc/acpi directory

That's to be expected, the XO-1 doesn't use ACPI and the XO-1.5 does.
But the aim is of course for the events to appear similar enough that
you don't have to care at the activity level. There may well be kernel
issues to solve here.

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH PaintActivity] Paint - Rect. Marquee icon changes erratically(OLPC #5882)

2010-10-14 Thread anubhav
From: Anubhav Aggarwal anub...@seeta.in

Earlier the cursor shown on selcting using rectangular marquee, was either a
rectangle with a dashed border or a cross-hairs.Now a if condition has been
added .
---
 Area.py |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Area.py b/Area.py
index 2dca7da..5cbee4c 100644
--- a/Area.py
+++ b/Area.py
@@ -1131,6 +1131,8 @@ class Area(gtk.DrawingArea):
 filename = os.path.join('images', tool['name'] + '.png')
 pixbuf = gtk.gdk.pixbuf_new_from_file(filename)
 cursor = gtk.gdk.Cursor(display, pixbuf, 6, 21)
+if tool['name'] == 'marquee-rectangular':
+cursor = gtk.gdk.Cursor(gtk.gdk.TCROSS)
 except gobject.GError:
 cursor = None
 
-- 
1.7.0.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Enable save as PDF from Write. SL #1458

2010-10-14 Thread godiard
From: Gonzalo Odiard godi...@sugarlabs.org

This ticket have a patch writed by iwikiwi
---
 widgets.py |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/widgets.py b/widgets.py
index ecdaf19..1e09dcc 100644
--- a/widgets.py
+++ b/widgets.py
@@ -167,7 +167,12 @@ class ExportButton(ToolButton):
{'mime_type' : 'text/plain',
 'title' : _('Plain Text (TXT)'),
 'jpostfix'  : _('TXT'),
-'exp_props' : ''}]
+'exp_props' : ''},
+
+   {'mime_type': 'application/pdf',
+'title': _('Portable Document Format (PDF)'),
+'jpostfix' : _('PDF'),
+'exp_props': ''}]
 
 def __init__(self, activity, abi):
 ToolButton.__init__(self, 'document-save')
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Gonzalo Odiard
On Thu, Oct 14, 2010 at 4:20 PM, Daniel Drake d...@laptop.org wrote:

 On 14 October 2010 19:29, Gonzalo Odiard gonz...@laptop.org wrote:
  I don't see Gnome doing anything with this event.
  It's a very specific XO thing ...

 Oops.
 I meant to suggest that you look at how GNOME deals with the
 lid-closed switch. Since, from the kernel point of view, its exactly
 the same reporting mechanism (through an input device). Whatever
 interface GNOME is using to listen for lid closes, its very likely
 that you can listen for ebook mode the same way.

  I probably don't are explaining well what I need.
  I am reading the event with dbus, it's working. I think it's the wright
 way
  to do this today.
  But it's strange it send a array with two boolean values (lid and ebook
  switchs) but ever with the value in False.

 Are you sure those 2 values are supposed to refer to the lid and ebook
 switches?


No.


  I want to check if the software who emit the dbus signal is checking in
 the
  wright place for the switch state.

 Then you need to look closely at HAL, if you're tracking down that HAL
 message. I don't know anyone in the OLPC community who has instant
 expertise here; you need to dive into the docs and code and figure it
 out.

  Also the devices are different:
  in XO-1 cat /proc/bus/input/devices show the lid switch in event1 ant the
  ebook switch in event2
  in XO-1.5 cat /proc/bus/input/devices show the lid switch in event2 ant
 the
  ebook switch in event4
  in the XO-1 don't have the /proc/acpi directory

 That's to be expected, the XO-1 doesn't use ACPI and the XO-1.5 does.
 But the aim is of course for the events to appear similar enough that
 you don't have to care at the activity level. There may well be kernel
 issues to solve here.


Thanks.

Gonzalo
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Sascha Silbe
Excerpts from Gonzalo Odiard's message of Thu Oct 14 20:29:30 +0200 2010:

[ebook switch]
 It's a very specific XO thing ...

It isn't, but at least until recently it was rather unusual for devices
capable of running Gnome.

 I probably don't are explaining well what I need.

Looks like it. What I am missing is some background information:
What do you want to achieve?
Which components do you intend to modify?
Which systems (distro version etc.) do you target?

 I am reading the event with dbus, it's working. I think it's the wright way
 to do this today.

As you have shown yourself, it isn't working as you're getting incorrect
values. Whether trying to fix an obsolete piece of software is really
the right thing to do will depend on the answers to the questions above.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Change the logic used to determine the format used to save files.

2010-10-14 Thread Sascha Silbe
Excerpts from godiard's message of Thu Oct 14 20:10:14 +0200 2010:

 Fix the tickets OLPC #5291, OLPC #1925, SL #2127

Please provide some background information as part of the patch
description. What are you changing and why?

Please mention the module name as part of the patch summary, e.g.:

[PATCH Write] keep file type across load/save (SL #2127)

This
a) ensures maintainers notice patches for their modules and
b) enables reviewers to prioritise patches depending on how well they
   know the module.


[AbiWordActivity.py]
 @@ -423,28 +423,38 @@ class AbiWordActivity (activity.Activity):
  
 #self.abiword_canvas.invoke_cmd('com.abisource.abiword.abicollab.olpc.buddyLeft',
  self.participants[buddy.object_path()], 0, 0)
  
  def read_file(self, file_path):
 -logging.debug('AbiWordActivity.read_file: %s, mimetype: %s', 
 file_path, self.metadata['mime_type'])
 -if 'source' in self.metadata and self.metadata['source'] == '1':
 -logger.debug('Opening file in view source mode')
 -self.abiword_canvas.load_file('file://' + file_path, 
 'text/plain') 
 +logging.debug('AbiWordActivity.read_file: %s, mimetype: %s',
 +file_path, self.metadata['mime_type'])

Please don't mix style changes with bug fixes.


 +if self.metadata['mime_type'] in ['text/plain', 'text/csv']:
 +logging.debug('Opening file in text mode')
 +self.abiword_canvas.load_file('file://' + file_path, 
 'text/plain')
  else:
  self.abiword_canvas.load_file('file://' + file_path, '') # we 
 pass no mime/file type, let libabiword autodetect it, so we can handle 
 multiple file formats

I fail to see how this addresses (one of?) the tickets you mentioned.
Also it will cause the activity to break if the Journal entry doesn't
have a MIME type set.


[write_file()]

Same comments as for read_file().

 +# change the extension in the file name and the description
 +self._change_file_ext(self.metadata['title'], '.odt')
 +self._change_file_ext(self.metadata['description'], '.odt')

Randomly changing user-set metadata is a no-no.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Gonzalo Odiard
On Thu, Oct 14, 2010 at 4:43 PM, Sascha Silbe 
sascha-ml-reply-to-201...@silbe.org wrote:

 Excerpts from Gonzalo Odiard's message of Thu Oct 14 20:29:30 +0200 2010:

 [ebook switch]
  It's a very specific XO thing ...

 It isn't, but at least until recently it was rather unusual for devices
 capable of running Gnome.

  I probably don't are explaining well what I need.

 Looks like it. What I am missing is some background information:
 What do you want to achieve?


It's simple and it's explained in http://dev.laptop.org/ticket/10396
If you use the Read activity and put your XO in ebook position, if the focus
is in any other widget than the viewer, you can't navigate using the dpad.
One first approach suggested by Simon was put the focus in the viewer when
the activity start.
The another change I am proposing is catch the ebook switch event and put
the focus in the viewer.
 The proposed patch works, but I need to read the switch state after the
event is catched.
I don't know if there are a better way.


 Which components do you intend to modify?


The Read activity.


 Which systems (distro version etc.) do you target?


Sugar 0.84 and 0.90 in XO-1.5



  I am reading the event with dbus, it's working. I think it's the wright
 way
  to do this today.

 As you have shown yourself, it isn't working as you're getting incorrect
 values. Whether trying to fix an obsolete piece of software is really
 the right thing to do will depend on the answers to the questions above.


Yes. I agree.

Gonzalo



Sascha

 --
 http://sascha.silbe.org/
 http://www.infra-silbe.de/

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Change the logic used to determine the format used to save files.

2010-10-14 Thread Gonzalo Odiard
On Thu, Oct 14, 2010 at 5:08 PM, Sascha Silbe 
sascha-ml-reply-to-201...@silbe.org wrote:

 Excerpts from godiard's message of Thu Oct 14 20:10:14 +0200 2010:

  Fix the tickets OLPC #5291, OLPC #1925, SL #2127

 Please provide some background information as part of the patch
 description. What are you changing and why?

 Please mention the module name as part of the patch summary, e.g.:

 [PATCH Write] keep file type across load/save (SL #2127)


The subject is created by git send-email. I can change the first line from
the patch, but no how you say.



 This
 a) ensures maintainers notice patches for their modules and
 b) enables reviewers to prioritise patches depending on how well they
   know the module.


 [AbiWordActivity.py]
  @@ -423,28 +423,38 @@ class AbiWordActivity (activity.Activity):
 
  
 #self.abiword_canvas.invoke_cmd('com.abisource.abiword.abicollab.olpc.buddyLeft',
 self.participants[buddy.object_path()], 0, 0)
 
   def read_file(self, file_path):
  -logging.debug('AbiWordActivity.read_file: %s, mimetype: %s',
 file_path, self.metadata['mime_type'])
  -if 'source' in self.metadata and self.metadata['source'] == '1':
  -logger.debug('Opening file in view source mode')
  -self.abiword_canvas.load_file('file://' + file_path,
 'text/plain')
  +logging.debug('AbiWordActivity.read_file: %s, mimetype: %s',
  +file_path, self.metadata['mime_type'])

 Please don't mix style changes with bug fixes.




  +if self.metadata['mime_type'] in ['text/plain', 'text/csv']:
  +logging.debug('Opening file in text mode')
  +self.abiword_canvas.load_file('file://' + file_path,
 'text/plain')
   else:
   self.abiword_canvas.load_file('file://' + file_path, '') #
 we pass no mime/file type, let libabiword autodetect it, so we can handle
 multiple file formats

 I fail to see how this addresses (one of?) the tickets you mentioned.
 Also it will cause the activity to break if the Journal entry doesn't
 have a MIME type set.


The code correct http://bugs.sugarlabs.org/ticket/2127 where .csv files are
opened and saved like odt files.
That is because canvas.load_file must be called with the mime type (and
specifically 'text/plain')



 [write_file()]

 Same comments as for read_file().

  +# change the extension in the file name and the
 description
  +self._change_file_ext(self.metadata['title'], '.odt')
  +self._change_file_ext(self.metadata['description'],
 '.odt')

 Randomly changing user-set metadata is a no-no.


Not randomly. Write save the files like OpenDocument but don't change the
metadata.
If you copy the file from the journal to a pen drive or look at the file in
the datastore can see it.
It's difficult to see the actual behavior in the patch, but I have tested it
a long time.



 Sascha

 --
 http://sascha.silbe.org/
 http://www.infra-silbe.de/

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Sascha Silbe
Excerpts from Gonzalo Odiard's message of Thu Oct 14 22:09:09 +0200 2010:

 It's simple and it's explained in http://dev.laptop.org/ticket/10396

At least in Read (and in most if not all activities), the dpad should
work the same regardless of whether the keyboard is available (non-ebook
mode) or not (ebook mode).

Thus there's no reason to query the ebook mode switch in the first
place.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Enable save as PDF from Write. SL #1458

2010-10-14 Thread Sascha Silbe
Excerpts from godiard's message of Thu Oct 14 21:27:31 +0200 2010:

 From: Gonzalo Odiard godi...@sugarlabs.org
 
 This ticket have a patch writed by iwikiwi

If Vamsi authored the patch, he should appear in From:.
You can add yourself in Signed-Off-By: (after the patch description,
like for the Reviewed-By: tag).

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-14 Thread Aleksey Lim
On Thu, Oct 14, 2010 at 11:32:34PM +0530, Mukul Gupta wrote:
 The patch disables the Start and Start With menu items for files
 which can't be opened by any installed activity and instead
 replace it with a hover dropdown with a menu item 'No activity
 installed to start entry'

You need to pass your code through pylint and pep8 (the rest of sugar
code might not confirm pylint/pep8 but you need to leave it as is,
it will be fixed by separate patch later).

 ---
  src/jarabe/journal/palettes.py |   99 +--
  1 files changed, 53 insertions(+), 46 deletions(-)
 
 diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
 index 7c3e5ff..56df595 100644
 --- a/src/jarabe/journal/palettes.py
 +++ b/src/jarabe/journal/palettes.py
 @@ -62,51 +62,59 @@ class ObjectPalette(Palette):
  Palette.__init__(self, primary_text=title,
   icon=activity_icon)
  
 -if metadata.get('activity_id', ''):
 -resume_label = _('Resume')
 -resume_with_label = _('Resume with')
 -else:
 -resume_label = _('Start')
 -resume_with_label = _('Start with')
 -menu_item = MenuItem(resume_label, 'activity-start')
 -menu_item.connect('activate', self.__start_activate_cb)
 -self.menu.append(menu_item)
 -menu_item.show()
 -
 -menu_item = MenuItem(resume_with_label, 'activity-start')
 -self.menu.append(menu_item)
 -menu_item.show()
 -start_with_menu = StartWithMenu(self._metadata)
 -menu_item.set_submenu(start_with_menu)
 -
 -client = gconf.client_get_default()
 -color = XoColor(client.get_string('/desktop/sugar/user/color'))
 -menu_item = MenuItem(_('Copy'))
 -icon = Icon(icon_name='edit-copy', xo_color=color,
 -icon_size=gtk.ICON_SIZE_MENU)
 -menu_item.set_image(icon)
 -menu_item.connect('activate', self.__copy_activate_cb)
 -self.menu.append(menu_item)
 -menu_item.show()
 -
 -menu_item = MenuItem(_('Send to'), 'document-send')
 -self.menu.append(menu_item)
 -menu_item.show()
 -
 -friends_menu = FriendsMenu()
 -friends_menu.connect('friend-selected', self.__friend_selected_cb)
 -menu_item.set_submenu(friends_menu)
 -
 -if detail == True:
 -menu_item = MenuItem(_('View Details'), 'go-right')
 -menu_item.connect('activate', self.__detail_activate_cb)
 -self.menu.append(menu_item)
 -menu_item.show()
 -
 -menu_item = MenuItem(_('Erase'), 'list-remove')
 -menu_item.connect('activate', self.__erase_activate_cb)
 -self.menu.append(menu_item)
 -menu_item.show()
 + if misc.get_activities(metadata):
 + if metadata.get('activity_id', ''):
 + resume_label = _('Resume')
 + resume_with_label = _('Resume with')
 + else:
 + resume_label = _('Start')
 + resume_with_label = _('Start with')
 + menu_item = MenuItem(resume_label, 'activity-start')
 + menu_item.connect('activate', self.__start_activate_cb)
 + self.menu.append(menu_item)
 + menu_item.show()
 + 

 + menu_item = MenuItem(resume_with_label, 'activity-start')
 + self.menu.append(menu_item)
 + menu_item.show()
it seems redundant

 + start_with_menu = StartWithMenu(self._metadata)
 + menu_item.set_submenu(start_with_menu)
 +
 + else:
 + resume_label = _('No activity installed to start entry')
 + menu_item = MenuItem(resume_label)
 + menu_item.set_sensitive(False)
 + self.menu.append(menu_item)
 + menu_item.show()
 +
 + client = gconf.client_get_default()
 + color = XoColor(client.get_string('/desktop/sugar/user/color'))
 + menu_item = MenuItem(_('Copy'))
 + icon = Icon(icon_name='edit-copy', xo_color=color,
 + icon_size=gtk.ICON_SIZE_MENU)
 + menu_item.set_image(icon)
 + menu_item.connect('activate', self.__copy_activate_cb)
 + self.menu.append(menu_item)
 + menu_item.show()
 +
 + menu_item = MenuItem(_('Send to'), 'document-send')
 + self.menu.append(menu_item)
 + menu_item.show()
 +
 + friends_menu = FriendsMenu()
 + friends_menu.connect('friend-selected', self.__friend_selected_cb)
 + menu_item.set_submenu(friends_menu)
 + 
 + if detail == True:
 + menu_item = MenuItem(_('View Details'), 'go-right')
 + menu_item.connect('activate', self.__detail_activate_cb)
 + self.menu.append(menu_item)
 + menu_item.show()
 + 
 + menu_item = MenuItem(_('Erase'), 'list-remove')
 + menu_item.connect('activate', self.__erase_activate_cb)
 + self.menu.append(menu_item)
 + menu_item.show()
  
  def __start_activate_cb(self, menu_item):
  

Re: [Sugar-devel] Dbus signal when ebook switch is activated

2010-10-14 Thread Paul Fox
sascha wrote:
  Excerpts from Gonzalo Odiard's message of Thu Oct 14 22:09:09 +0200 2010:
  
   It's simple and it's explained in http://dev.laptop.org/ticket/10396
  
  At least in Read (and in most if not all activities), the dpad should
  work the same regardless of whether the keyboard is available (non-ebook
  mode) or not (ebook mode).
  
  Thus there's no reason to query the ebook mode switch in the first
  place.

i suspect the point is that in normal mode it's okay for the
focus to be elsewhere, since there's a touchpad with which to
change the focus.  in ebook mode, that's not the case -- if focus
isn't on the text area, then you're stuck, and have to open the
laptop to click.

paul
=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [RELEASE] Browse-119

2010-10-14 Thread Lucian Branescu Mihaila
== Source ==

http://download.sugarlabs.org/sources/sucrose/fructose/Browse/Browse-119.tar.bz2

== News ==

This is a bugfix release.

* Release 119 (Lucian Branescu Mihaila)
* generate preview image for downloaded images (SL#1106) (Gonzalo Odiard)
* Fix history on resume. The code is a bit hacky because of xulrunner 
limitations. I plan to make this code nicer when we move to webkit. (Lucian 
Branescu Mihaila)
* Simon Schampijer's patch to fix autocomplete functionality for the address. 
(Lucian Branescu Mihaila)
* fix #8857 - Browse fails to download some files with non-ascii characters 
(Gonzalo Odiard)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Home button in browse - toolbar images

2010-10-14 Thread Lucian Branescu
On 14 October 2010 19:47, Gary Martin garycmar...@googlemail.com wrote:
 Hi Gonzalo,

 On 5 Oct 2010, at 20:32, Gonzalo Odiard wrote:

 Gary:
 Here are the screenshots.
 I comented a check of cairo version to add the tabs button.

 toolbar-browse-0.90.png and  toolbar-browse-0.84.png are with the emulator 
 at 1200x900

 browse-90-in-sugar-emulator.png and browse-90-in-emulator-without-tabs.png 
 are the worst case, sugar-emulator by default.
 I don't know if is a real case.

 I've tinkered with Browse on an XO-1 to fake the extra home and tab button so 
 we are looking at our most likely common usage environment (as XO-1/1.5 folks 
 upgrade Sugar). The stop button does not fall off the end in this case, 
 though the search field is much smaller than I'd like to be honest. As an 
 emergency stop gap before we can code the reload/stop icon to move into the 
 URL input location (as per the clear icon in Sugar search fields), it is at 
 least a feasible option.

 FWIW under Simon's 0.90 F14 XO-1 builds the add new tab icon is auto disabled 
 (due to some other tab/api bug avoidance), so there is a at least little more 
 space for the location field.

 What is the target deployment you have in mind? One of the Dextrose builds?

 Note: I think Lucian mentioned he might be considering making the add new tab 
  icon into a sub toolbar reveal, so that he has space for the add, remove, 
 next, last tab features (see Terminal for the example tab control use case). 
 If he is really considering this soon ;) then it might be better to move the 
 add new tab icon over to where I have placed the go-home icon, and move the 
 go-home icon over to where the add tab icon is placed (so the primary toolbar 
 icons with sub-toolbars are all together on the left).

I'd swap them anyway, Home makes sense to be next to Back/Forward.
However, I'm really not satisfied with the amount of space left for
the URL bar. I could maybe add reload and home in a toolbar, or add a
small stop/reload button inside the URL bar (but I'm not sure such
useful features should be hidden so well).
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Read: focus after launching

2010-10-14 Thread Lucian Branescu
On 14 October 2010 09:38, Sascha Silbe
sascha-ml-reply-to-201...@silbe.org wrote:
 Excerpts from Simon Schampijer's message of Wed Oct 13 12:45:09 +0200 2010:

 when working on the issue in Read that the dpad keys do not work
 directly when in ebook mode [1], I postulated that Read when it comes up
 should always grab the focus on the view so scrolling using the arrow
 keys is directly possible.

 +1
 This is quite annoying (especially so since I usually scroll using the
 cursor keys, not a pointing device). I consider it a bug, but haven't
 bothered reporting it yet since there were more important ones (not
 working at all on recent distros for a start).

 Like Daniel I think that all activities (or all applications for that
 matter - I have the same problem with non-Sugar applications as well)
 should start with a sensible focus selected.

 We should check where focus gets assigned by default in activities that
 don't set it explicitly. Depending on the outcome (e.g. if it's in the
 tool bar by default), setting the focus in
 sugar.activity.activity.Activity.set_canvas() might be a good idea.

+1 on adding this to Read, don't know about other activities.

I'll do it as soon as I get time to fix Read.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Disable Start menu item for entries that can't be opened(Bug#328)

2010-10-14 Thread James Cameron
On Thu, Oct 14, 2010 at 11:32:34PM +0530, Mukul Gupta wrote:
 The patch disables the Start and Start With menu items for files
 which can't be opened by any installed activity and instead
 replace it with a hover dropdown with a menu item 'No activity
 installed to start entry'

The patch added four trailing whitespace errors, according to git am
... which is where there are space or tab characters at the end of the
line.  I use an editor which shows them.

The patch also changed spaces to tabs, for the affected area.  Once I
removed them and regenerated the diff, I understood the change better.

diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
index 7c3e5ff..14024fd 100644
--- a/src/jarabe/journal/palettes.py
+++ b/src/jarabe/journal/palettes.py
@@ -62,22 +62,30 @@ class ObjectPalette(Palette):
 Palette.__init__(self, primary_text=title,
  icon=activity_icon)
 
-if metadata.get('activity_id', ''):
-resume_label = _('Resume')
-resume_with_label = _('Resume with')
-else:
-resume_label = _('Start')
-resume_with_label = _('Start with')
-menu_item = MenuItem(resume_label, 'activity-start')
-menu_item.connect('activate', self.__start_activate_cb)
-self.menu.append(menu_item)
-menu_item.show()
+if misc.get_activities(metadata):
+if metadata.get('activity_id', ''):
+resume_label = _('Resume')
+resume_with_label = _('Resume with')
+else:
+resume_label = _('Start')
+resume_with_label = _('Start with')
+menu_item = MenuItem(resume_label, 'activity-start')
+menu_item.connect('activate', self.__start_activate_cb)
+self.menu.append(menu_item)
+menu_item.show()
 
-menu_item = MenuItem(resume_with_label, 'activity-start')
-self.menu.append(menu_item)
-menu_item.show()
-start_with_menu = StartWithMenu(self._metadata)
-menu_item.set_submenu(start_with_menu)
+menu_item = MenuItem(resume_with_label, 'activity-start')
+self.menu.append(menu_item)
+menu_item.show()
+start_with_menu = StartWithMenu(self._metadata)
+menu_item.set_submenu(start_with_menu)
+
+else:
+resume_label = _('No activity installed to start entry')
+menu_item = MenuItem(resume_label)
+menu_item.set_sensitive(False)
+self.menu.append(menu_item)
+menu_item.show()
 
 client = gconf.client_get_default()
 color = XoColor(client.get_string('/desktop/sugar/user/color'))
-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel