Bug 369832

Summary: PartStatusWidget hides additional lines of text
Product: [Applications] trojita Reporter: Jan Kundrát <jkt>
Component: Desktop GUIAssignee: Trojita default assignee <trojita-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Kundrát 2016-10-03 20:08:58 UTC
Thomas, could you please take a look at this?

1) ensure that gpg-agent is not running or make it forget passwords (`echo RELOADAGENT | gpg-connect-agent` or a SIGHUP should help)
2) open an encrypted e-mail, wait until a password prompt appears
3) cancel the password prompt
4) click "Show Details" to see just one line of text (no information about the intended recipients)
5) resize the message widget so that its width becomes "small enough"
6) watch the new line appear
7) make that widget slightly wider
8) watch the line disappear once again

The long status should either be shown completely (when the status widget is expanded), or not at all (when hidden by that button). Showing just one line of text is wrong.
Comment 1 Thomas Lübking 2016-10-03 22:16:29 UTC
The alignment (see commit 0e4e1837f0c2fae9aac66c32e10f753b09f334ce) gets reset/overridden (ie. something post-alters the chain somewhere)

The "fixes" it for me by updating the alignment once more.

diff --git a/src/Gui/PartWidget.cpp b/src/Gui/PartWidget.cpp
index 3c6785c..f6b7d56 100644
--- a/src/Gui/PartWidget.cpp
+++ b/src/Gui/PartWidget.cpp
@@ -219,6 +219,7 @@ void PartStatusWidget::showDetails()
         m_seperator->hide();
         m_detailButton->setText(tr("Show Details"));
     } else {
+        static_cast<QGridLayout*>(layout())->setAlignment(m_details, 0);
         m_details->show();
         m_seperator->show();
         m_detailButton->setText(tr("Hide Details"));
Comment 2 Jan Kundrát 2016-10-03 23:02:30 UTC
No joy (breeze on plasma from git, about a week old master, Qt 5.7 from 
about a week old git).
Comment 3 Jan Kundrát 2016-10-11 11:50:29 UTC
Git commit 654188c2806c376a4c2b9cdf44e48172c2255a18 by Jan Kundrát.
Committed on 03/10/2016 at 20:09.
Pushed by gerrit into branch 'master'.

GUI: Prevent excessive newlines in the PartStatusWidget crypto messages

Previously, there were extra newlines in certain scenarios. The long
text should never begin with a stray newline.

This might make it easier to see the linked bug.

Change-Id: I72188b08f1562b6cdd30849f9958fdcc9f0504b7

M  +44   -21   src/Cryptography/GpgMe++.cpp

http://commits.kde.org/trojita/654188c2806c376a4c2b9cdf44e48172c2255a18
Comment 4 Christoph Cullmann 2024-09-23 18:51:09 UTC
Trojitá is no longer maintained, please switch to a maintained alternative like https://apps.kde.org/kmail2/

Sorry for the inconveniences.