<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Inspired by <a href="http://bugs.sugarlabs.org/ticket/3744">http://bugs.sugarlabs.org/ticket/3744</a>, I’ve temporarily solved the issue myself by commenting following lines in sugar3/graphics/palette.py<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> Lionel.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>133 #if text_maxlen > 0:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>134 # self._label.set_max_width_chars(text_maxlen)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>135 # self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>136 labels_box.pack_start(self._label, True, True, 0)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>137<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>138 self._secondary_label = Gtk.Label()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>139 self._secondary_label.set_alignment(0, 0.5)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>140<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>141 #if text_maxlen > 0:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>142 # self._secondary_label.set_max_width_chars(text_maxlen)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>143 # self._secondary_label.set_ellipsize(Pango.EllipsizeMode.END)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:FR'>De :</span></b><span lang=EN-US style='mso-fareast-language:FR'> Lionel Laské [mailto:lionel.laske@gmail.c</span><span style='mso-fareast-language:FR'>om] <b>De la part de</b> lionel@olpc-france.org<br><b>Envoyé :</b> dimanche 9 juin 2013 09:47<br><b>À :</b> sugar-devel@lists.sugarlabs.org<br><b>Objet :</b> EllipsizeMode error trying to port an activity to Gtk3<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>I’m trying to port an activity to Gtk3 on the latest sugar-build.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I’ve imported all sugar3.*. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I’ve substituted all gtk to gi.repository import gtk.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>BTW I’m stick on a strange error on EllipsizeMode in Pango (see below).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Does I miss something?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> Lionel.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> import gobject._gobject<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Traceback (most recent call last):<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity", line 161, in <module><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> main()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity", line 156, in main<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> instance = create_activity_instance(activity_constructor, activity_handle)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/bin/sugar-activity", line 42, in create_activity_instance<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> activity = constructor(handle)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/Activities/Roots.activity/activity.py", line 73, in __init__<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> activity_button = ActivityToolbarButton(self)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py", line 74, in __init__<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> toolbar = ActivityToolbar(activity, orientation_left=True)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py", line 333, in __init__<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> </span>description_item = DescriptionItem(activity)<o:p></o:p></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/activity/widgets.py", line 233, in __init__<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> self.set_tooltip(_('Description'))<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/toolbutton.py", line 93, in set_tooltip<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> self.palette = Palette(tooltip)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> File "/home/fedora/sugar-build/build/out/install/lib/python2.7/site-packages/sugar3/graphics/palette.py", line 135, in __init__<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>AttributeError: type object 'EllipsizeMode' has no attribute 'MIDDLE'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Exited with status 1, pid 17010 data (None, <open file '<fdopen>', mode 'w' at 0x2438030>, dbus.ByteArray('2a46048ae724acdfc03e3b0b26e3e3ebacf4f38b', variant_level=1))<o:p></o:p></span></p></div></body></html>