Summary: | annoying spelling window positioning | ||
---|---|---|---|
Product: | [Unmaintained] kbabel | Reporter: | Robert Gomułka <robertg.123> |
Component: | general | Assignee: | Stanislav Visnovsky <visnovsky> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ana, nicolasg, nive |
Priority: | NOR | ||
Version: | 1.10.2 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Bug occurence
patch to remove automatic positionning |
Description
Robert Gomułka
2005-11-22 21:21:45 UTC
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; } |