Summary: | unable to remove "recipient line" | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Edwin Schepers <yez> |
Component: | composer | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | oded |
Priority: | NOR | ||
Version: | 1.7.92 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Edwin Schepers
2005-02-09 22:49:28 UTC
CVS commit by tilladam: Disable the "remove recipients line" button when there is only one line. It can not be removed then.` BUGS: 98973 M +20 -2 recipientseditor.cpp 1.40 M +2 -0 recipientseditor.h 1.22 --- kdepim/kmail/recipientseditor.cpp #1.39:1.40 @@ -339,4 +339,10 @@ RecipientLine *RecipientsView::addLine() mLines.append( line ); + // If there is only one line, removing it makes no sense + if ( mLines.count() == 1 ) { + mLines.first()->setRemoveLineButtonEnabled( false ); + } else { + mLines.first()->setRemoveLineButtonEnabled( true ); + } line->setComboWidth( mFirstColumnWidth ); @@ -355,4 +361,13 @@ RecipientLine *RecipientsView::addLine() } + +void RecipientLine::setRemoveLineButtonEnabled( bool b ) +{ + mRemoveButton->setEnabled( b ); +} + + +// ------------ RecipientsView --------------------- + void RecipientsView::calculateTotal() { @@ -428,4 +443,7 @@ void RecipientsView::slotDeleteLine() moveChild( line, childX( line ), childY( line ) - mLineHeight ); } + // only one left, can't remove that one + if ( mLines.count() == 1 ) + mLines.first()->setRemoveLineButtonEnabled( false ); calculateTotal(); --- kdepim/kmail/recipientseditor.h #1.21:1.22 @@ -126,4 +126,6 @@ class RecipientLine : public QWidget int recipientsCount(); + void setRemoveLineButtonEnabled( bool b ); + signals: void returnPressed( RecipientLine * ); Hi, I am still unable to delete the last one, although the button is not disabled. This is not an issue with current kmail, although for the last recipient line the button is not disabled unless its the only recipient line. I think this is incorrect. Also - might be related - if I have several recipients and the click the "remove recipient" button on the last empty line, the "type" selector (To,CC,BCC) is changed to match that of the previous recipient line, regardless of what is was set before I clicked "remove". I'm not sure if this is correct or not, but its weird and it won't matter anyway if the "remove recipient" button will actually be disabled for the last line. Can you please try again with KMail 1.9.7? Removing the last recipient should work fine there. No response, assuming fixed. If not, reopen. |