[Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread lionel
Hi all, I’m trying to port an activity to Gtk3 on the latest sugar-build. I’ve imported all sugar3.*. I’ve substituted all gtk to gi.repository import gtk. BTW I’m stick on a strange error on EllipsizeMode in Pango (see below). Does I miss something? Lionel.

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread lionel
Inspired by http://bugs.sugarlabs.org/ticket/3744, I’ve temporarily solved the issue myself by commenting following lines in sugar3/graphics/palette.py Lionel. 133#if text_maxlen 0: 134#self._label.set_max_width_chars(text_maxlen) 135#

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread Daniel Narvaez
Please push your port somewhere. It appear to work fine with existing activities. Something to be careful about is that you are not loading any old gobject stuff (not in gi.*), you can't mix them. On 9 June 2013 10:31, lio...@olpc-france.org wrote: ** ** Inspired by

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread Walter Bender
yes. I had a similar error with activities that inadvertently had some mixed code between gtk2 and gtk3. -walter On Sun, Jun 9, 2013 at 5:44 AM, Daniel Narvaez dwnarv...@gmail.com wrote: Please push your port somewhere. It appear to work fine with existing activities. Something to be careful

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread Daniel Narvaez
If it turns out to be that please close the ticket. On 9 June 2013 13:17, Walter Bender walter.ben...@gmail.com wrote: yes. I had a similar error with activities that inadvertently had some mixed code between gtk2 and gtk3. -walter On Sun, Jun 9, 2013 at 5:44 AM, Daniel Narvaez

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread lionel
Finally solved my issue with a big review of my imports. Thanks. I’ve got a last issue on Pango, no way to found some Pango constants (ALIGN_CENTER and WRAP_WORD – view my calls below). Any idea where I can found it? Lionel.

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread Daniel Narvaez
Try dir(Pango) in a python console. It's Pango.WrapMode... I'm sure there is a logic to go from C api to python too, but I don't know it :) On 9 June 2013 16:22, lio...@olpc-france.org wrote: ** ** Finally solved my issue with a big review of my imports. Thanks. ** ** I’ve got a last

Re: [Sugar-devel] EllipsizeMode error trying to port an activity to Gtk3

2013-06-09 Thread lionel
Yes, you got it ! Thanks for the tip. Here my missing constants: layout.set_alignment(Pango.Alignment.CENTER) layout.set_wrap(Pango.WrapMode.WORD) Lionel De : Daniel Narvaez [mailto:dwnarv...@gmail.com] Envoyé : dimanche 9 juin 2013 16:25 À :