Bug 391593 - Multiple OK buttons after importing key
Summary: Multiple OK buttons after importing key
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: 3.0.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal (vote)
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 03:40 UTC by chrstphrchvz
Modified: 2018-03-09 06:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
2 OK buttons after importing 1 key (17.68 KB, image/png)
2018-03-09 03:40 UTC, chrstphrchvz
Details
3 OK buttons after importing 2 keys (19.31 KB, image/png)
2018-03-09 03:40 UTC, chrstphrchvz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chrstphrchvz 2018-03-09 03:40:18 UTC
Created attachment 111271 [details]
2 OK buttons after importing 1 key

(Also applies to 3.0.2)

When verifying a signature from a key that has not yet been imported, the user is prompted to import or search for the key. If the search option (server lookup) is selected, and the key is found and imported, the signature is verified again. However a redundant "OK" button is shown. If multiple keys are imported during this process, then however many keys imported is how many redundant "OK" buttons appear.

See screenshots for 2 "OK" buttons after importing 1 key, then 3 "OK" buttons after importing 2 keys. Example used is from https://files.gpg4win.org/gpg4win-3.0.2.exe.sig

Regardless of which OK button is clicked, the prompt is dismissed.
Comment 1 chrstphrchvz 2018-03-09 03:40:57 UTC
Created attachment 111272 [details]
3 OK buttons after importing 2 keys
Comment 2 Andre Heinecke 2018-03-09 06:10:55 UTC
Thanks!
Several people reported to my already that they "Sometimes" saw multiple Ok buttons but could never tell me how to reproduce this.

I'll look into it.
Comment 3 Andre Heinecke 2018-03-09 06:24:57 UTC
Git commit 668ea9b703dbfb97443c641a2be46f49e68a2804 by Andre Heinecke.
Committed on 09/03/2018 at 06:24.
Pushed by aheinecke into branch 'master'.

Reset OK / Close Buttons when tasks are restarted

When we import a key in decryptverifyfilesdialog the task
collection is restarted. In that case the Button Box needs
a close button again instead of an OK button.
This also fixes the case that multiple OK buttons would
be added when restarting.

M  +6    -0    src/crypto/gui/decryptverifyfilesdialog.cpp

https://commits.kde.org/kleopatra/668ea9b703dbfb97443c641a2be46f49e68a2804
Comment 4 Andre Heinecke 2018-03-09 06:26:24 UTC
There was a logic error that the buttons were not reset on restart after importing. The Ok button should have been exchanged for a close button and then readded as OK button once the operation is complete again.

Will be fixed in the next 3.1.0 beta.