[Pango] Nautilus: new line in filenames with dot and underscores...



Hi,
I'm trying to solve this[1] nautilus bug, a pretty example of the bug is
this screenshot[2] where you see nautilus wraps long filenames at
whitespace and hyphens but not for dots or underscores.

Well, I thought I would locate the code that wraps the hyphen and just
extended to also wrap with dot and underscores, but I have failed to
locate that code, this is what I have so far:

Nautilus sets the wrap through pango in these calls:
pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR);
eel_editable_label_set_line_wrap_mode (EEL_EDITABLE_LABEL
(details->rename_widget), PANGO_WRAP_WORD_CHAR);

But in Pango I have done a quick look at pango-layout.c (the only place
where PANGO_WRAP_WORD_CHAR is used) and break.c (where the breaking/wrap
code is concentrated) but I haven't found the exact bits where the
hyphen character is used... I've also look at utf8 glib functions and
found a G_UNICODE_BREAK_HYPHEN const but is only declare in *.h files
and not used in the code...

So I'm a bit lost and don't know where in pango|glib source is the code
that wraps a word based on the hyphen character, so maybe someone can
point me to the right source or tell me this is more complicated that
what I imagine.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=310638
[2] http://img309.imageshack.us/img309/4409/nautilus3jv.jpg

Thanks, :-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]