[scribus-dev] Fix for broken hyphenation language selection
Mikko Rasa
tdb+scribus at tdb.fi
Sun Oct 25 16:24:17 UTC 2015
On Sun, Oct 25, 2015 at 09:22:01AM -0500, Kunda Loves Scribus wrote:
> On Sun, Oct 25, 2015 at 7:29 AM, Mikko Rasa <tdb at tdb.fi> wrote:
>
> > I discovered a problem in Scribus 1.4.5 where the hyphenation language
> > from the document isn't used after the document is loaded. This is because
> > ScribusMainWindow::loadDoc calls doc->setGUI - which creates the hyphenator
> > - before the document is loaded. At that stage the language will default
> > to the global settings. Furthermore, FileLoader::postLoad resets the
> > hyphenator language to the document language *without reloading the dict*,
> > leaving the hyphenator in an inconsistent state.
> >
> > As for why my global setting was incorrect, I got a new computer a while
> > back and due to Debian's packaging didn't have the correct hyphen dicts
> > installed at first. I'm guessing the global setting has some kind of
> > fallback in case the stored language isn't found on application startup,
> > but I didn't delve into it.
> >
> > The attached patch fixes the document language problem by moving
> > hyphenator creation to a later stage, after the language has been set up.
> > I also took the liberty of removing the offending block of code in the
> > beginning of postLoad since it seems redundant now.
> >
> > --
> > Mikko
> >
>
> Thank you for the patch submission
> Does this patch address any of the hyphenation issues that are open on the
> bugtracker
> http://bugs.scribus.net/search.php?project_id=1&search=hyphenation&sticky_issues=on&sortby=last_updated&dir=DESC&hide_status_id=90&match_type=0
I do not think it directly addresses any of the existing issues. 11100 seems
loosely related; if the document-level hyphenation language setting is removed,
the problem I discovered would likely disappear.
> Also can you reproduce the behavior on 1.5 or 1.5.1 ?
It reproduces in 1.5.0. Attached is a revised patch for that version.
I can test with 1.5.1 as well if you can point me towards the source code. The
svn and git repositories on SourceForge do not appear to contain up-to-date
code, and I couldn't find any links on the website or wiki
--
Mikko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_hyphen_language_150.patch
Type: text/x-diff
Size: 2523 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20151025/d567780d/attachment.bin>
More information about the scribus-dev
mailing list