Version: 1.10.2 (using KDE KDE 3.4.2) Installed from: Debian testing/unstable Packages OS: Linux When one opens spellchecker in kbabel (ctrl-i) (tools->spelling->check spelling), the dialog box appears always in the same place (left side of the screen) covering the most important part of the application (msgid and msgstr). Moreover, after moving it and going to next spelling error (via ignore, correct or other) this dialog box goes back to previous position. Changing its size works, but the position is always the same. Expected behaviour - this dialog box should remember its position. This bug can be very annoying for KDE translators.
Created attachment 13600 [details] Bug occurence The dialog box is always in the same position.
I am not KDE/QT programmer, but I have searched through kbabel sources and found nothing wrong. I have also compared code with kate spelling (which works correctly) and found that kbabel uses KSpell::checkList(), while Kate uses KSpell::check(). I have also performed an experiment and replaced in kbabelview.cpp: //spell.kspell->checkList(&spell.wordList); spell.kspell->check(spell.wordList.join(" ")); and found, that spellchecker dialog is positioned ok (and remembers its position). Yes, I know this piece of code is wrong, I did it only for testing purposes. After that and a quick look into kspell code I guess that something is wrong with KSpell::checkList() method.
Still exists on KDE 3.5.
The problem comes from the kbabel's code itself, the spellchecker position is force to a "fixe" position. The following code should be remove since it does the contrary of what the comment says. Thanks. --- KDE/kdesdk/kbabel/kbabel/kbabelview.cpp (révision 532798) +++ KDE/kdesdk/kbabel/kbabel/kbabelview.cpp (copie de travail) @@ -4190,15 +4190,6 @@ "the problem) by using Help->Report Bug...")); } - // Move dialog out of the way of the msgstr - if(textOk) - { - // remap to the top of the main window (parent of this) - int posY = mapFromGlobal( - msgstrEdit->mapToGlobal( QPoint(0,0) ) ).y()-spell.kspell->heightDlg(); - spell.kspell->moveDlg(width()-spell.kspell->widthDlg(), posY-10); - } - return textOk; }
It is still there. SuSE 9.3, KDE 3.5.3
Actually no changes were made to kbabelview.cpp in Subversion - it is still 3 months old (from March).
To comment #4: could you attach the patch to the bug report, please? (As the patch was not attached, it is corrupted and difficult to extract for use.)
Created attachment 16776 [details] patch to remove automatic positionning
SVN commit 554567 by goutte: Do not try to be smarter than the KSpell dialog on where it should be created. BUG:116906 (Foreward port of revision 554565; might not compile.) (Sorry for the wrong bug number for the revision 554565.) M +0 -9 kbabelview.cpp --- trunk/KDE/kdesdk/kbabel/kbabel/kbabelview.cpp #554566:554567 @@ -4190,15 +4190,6 @@ "the problem) by using Help->Report Bug...")); } - // Move dialog out of the way of the msgstr - if(textOk) - { - // remap to the top of the main window (parent of this) - int posY = mapFromGlobal( - msgstrEdit->mapToGlobal( QPoint(0,0) ) ).y()-spell.kspell->heightDlg(); - spell.kspell->moveDlg(width()-spell.kspell->widthDlg(), posY-10); - } - return textOk; }