<div dir="ltr">If it turns out to be that please close the ticket.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 June 2013 13:17, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">yes. I had a similar error with activities that inadvertently had some<br>
mixed code between gtk2 and gtk3.<br>
<br>
-walter<br>
<div class="HOEnZb"><div class="h5"><br>
On Sun, Jun 9, 2013 at 5:44 AM, Daniel Narvaez <<a href="mailto:dwnarvaez@gmail.com">dwnarvaez@gmail.com</a>> wrote:<br>
> Please push your port somewhere. It appear to work fine with existing<br>
> activities. Something to be careful about is that you are not loading any<br>
> old gobject stuff (not in gi.*), you can't mix them.<br>
><br>
><br>
> On 9 June 2013 10:31, <<a href="mailto:lionel@olpc-france.org">lionel@olpc-france.org</a>> wrote:<br>
>><br>
>><br>
>><br>
>> Inspired by <a href="http://bugs.sugarlabs.org/ticket/3744" target="_blank">http://bugs.sugarlabs.org/ticket/3744</a>, I’ve temporarily solved<br>
>> the issue myself by commenting following lines in sugar3/graphics/palette.py<br>
>><br>
>><br>
>><br>
>> Lionel.<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> 133 #if text_maxlen > 0:<br>
>><br>
>> 134 # self._label.set_max_width_chars(text_maxlen)<br>
>><br>
>> 135 # self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)<br>
>><br>
>> 136 labels_box.pack_start(self._label, True, True, 0)<br>
>><br>
>> 137<br>
>><br>
>> 138 self._secondary_label = Gtk.Label()<br>
>><br>
>> 139 self._secondary_label.set_alignment(0, 0.5)<br>
>><br>
>> 140<br>
>><br>
>> 141 #if text_maxlen > 0:<br>
>><br>
>> 142 # self._secondary_label.set_max_width_chars(text_maxlen)<br>
>><br>
>> 143 #<br>
>> self._secondary_label.set_ellipsize(Pango.EllipsizeMode.END)<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> De : Lionel Laské [mailto:<a href="mailto:lionel.laske@gmail.com">lionel.laske@gmail.com</a>] De la part de<br>
>> <a href="mailto:lionel@olpc-france.org">lionel@olpc-france.org</a><br>
>> Envoyé : dimanche 9 juin 2013 09:47<br>
>> À : <a href="mailto:sugar-devel@lists.sugarlabs.org">sugar-devel@lists.sugarlabs.org</a><br>
>> Objet : EllipsizeMode error trying to port an activity to Gtk3<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> Hi all,<br>
>><br>
>><br>
>><br>
>> I’m trying to port an activity to Gtk3 on the latest sugar-build.<br>
>><br>
>> I’ve imported all sugar3.*.<br>
>><br>
>> I’ve substituted all gtk to gi.repository import gtk.<br>
>><br>
>> BTW I’m stick on a strange error on EllipsizeMode in Pango (see below).<br>
>><br>
>> Does I miss something?<br>
>><br>
>><br>
>><br>
>> Lionel.<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> /usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning:<br>
>> g_boxed_type_register_static: assertion `g_type_from_name (name) == 0'<br>
>> failed<br>
>><br>
>> import gobject._gobject<br>
>><br>
>> Traceback (most recent call last):<br>
>><br>
>> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",<br>
>> line 161, in <module><br>
>><br>
>> main()<br>
>><br>
>> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",<br>
>> line 156, in main<br>
>><br>
>> instance = create_activity_instance(activity_constructor,<br>
>> activity_handle)<br>
>><br>
>> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity",<br>
>> line 42, in create_activity_instance<br>
>><br>
>> activity = constructor(handle)<br>
>><br>
>> File "/home/fedora/Activities/Roots.activity/activity.py", line 73, in<br>
>> __init__<br>
>><br>
>> activity_button = ActivityToolbarButton(self)<br>
>><br>
>> File<br>
>> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",<br>
>> line 74, in __init__<br>
>><br>
>> toolbar = ActivityToolbar(activity, orientation_left=True)<br>
>><br>
>> File<br>
>> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",<br>
>> line 333, in __init__<br>
>><br>
>> description_item = DescriptionItem(activity)<br>
>><br>
>> File<br>
>> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py",<br>
>> line 233, in __init__<br>
>><br>
>> self.set_tooltip(_('Description'))<br>
>><br>
>> File<br>
>> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/toolbutton.py",<br>
>> line 93, in set_tooltip<br>
>><br>
>> self.palette = Palette(tooltip)<br>
>><br>
>> File<br>
>> "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/palette.py",<br>
>> line 135, in __init__<br>
>><br>
>> self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)<br>
>><br>
>> AttributeError: type object 'EllipsizeMode' has no attribute 'MIDDLE'<br>
>><br>
>> Exited with status 1, pid 17010 data (None, <open file '<fdopen>', mode<br>
>> 'w' at 0x2438030>,<br>
>> dbus.ByteArray('2a46048ae724acdfc03e3b0b26e3e3ebacf4f38b', variant_level=1))<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Sugar-devel mailing list<br>
>> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Daniel Narvaez<br>
><br>
> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
<br>
<br>
<br>
--<br>
</div></div><span class="HOEnZb"><font color="#888888">Walter Bender<br>
Sugar Labs<br>
<a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div>