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 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        #    self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)****
>
> 136        labels_box.pack_start(self._label, True, True, 0)****
>
> 137****
>
> 138        self._secondary_label = Gtk.Label()****
>
> 139        self._secondary_label.set_alignment(0, 0.5)****
>
> 140****
>
> 141        #if text_maxlen > 0:****
>
> 142        #    self._secondary_label.set_max_width_chars(text_maxlen)****
>
> 143        #
> self._secondary_label.set_ellipsize(Pango.EllipsizeMode.END)****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *De :* Lionel Laské [mailto:lionel.la...@gmail.com] *De la part de*
> lio...@olpc-france.org
> *Envoyé :* dimanche 9 juin 2013 09:47
> *À :* sugar-devel@lists.sugarlabs.org
> *Objet :* EllipsizeMode error trying to port an activity to Gtk3****
>
> ** **
>
> ** **
>
> 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.****
>
> ** **
>
> ** **
>
> ** **
>
> /usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning:
> g_boxed_type_register_static: assertion `g_type_from_name (name) == 0'
> failed****
>
>   import gobject._gobject****
>
> Traceback (most recent call last):****
>
>   File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",
> line 161, in <module>****
>
>     main()****
>
>   File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",
> line 156, in main****
>
>     instance = create_activity_instance(activity_constructor,
> activity_handle)****
>
>   File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",
> line 42, in create_activity_instance****
>
>    activity = constructor(handle)****
>
>   File "/home/fedora/Activities/Roots.activity/activity.py", line 73, in
> __init__****
>
>     activity_button = ActivityToolbarButton(self)****
>
>   File
> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",
> line 74, in __init__****
>
>     toolbar = ActivityToolbar(activity, orientation_left=True)****
>
>   File
> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",
> line 333, in __init__****
>
>     description_item = DescriptionItem(activity)****
>
>   File
> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",
> line 233, in __init__****
>
>     self.set_tooltip(_('Description'))****
>
>   File
> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/toolbutton.py",
> line 93, in set_tooltip****
>
>     self.palette = Palette(tooltip)****
>
>   File
> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/palette.py",
> line 135, in __init__****
>
>     self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)****
>
> AttributeError: type object 'EllipsizeMode' has no attribute 'MIDDLE'****
>
> Exited with status 1, pid 17010 data (None, <open file '<fdopen>', mode
> 'w' at 0x2438030>,
> dbus.ByteArray('2a46048ae724acdfc03e3b0b26e3e3ebacf4f38b', variant_level=1))
> ****
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


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

Reply via email to