<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>98973</bug_id>
          
          <creation_ts>2005-02-09 22:49:28 +0000</creation_ts>
          <short_desc>unable to remove &quot;recipient line&quot;</short_desc>
          <delta_ts>2007-12-01 22:20:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>composer</component>
          <version>1.7.92</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Edwin Schepers">yez</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>oded</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>312043</commentid>
    <comment_count>0</comment_count>
    <who name="Edwin Schepers">yez</who>
    <bug_when>2005-02-09 22:49:28 +0000</bug_when>
    <thetext>Version:           1.7.92 (using KDE 3.3.92 (beta2), compiled sources)
Compiler:          gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
OS:                Linux (i686) release 2.4.22-1.2115.nptl

Hi,
If I have multiple recipient lines (in the composer), I&apos;m unable to delete the last one. (If I have one, I also can&apos;t delete that one)
If this is intented, the button &quot;Remove recipient line&quot; should be disabled.

Regards,
Edwin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>313444</commentid>
    <comment_count>1</comment_count>
    <who name="Till Adam">adam</who>
    <bug_when>2005-02-13 11:47:17 +0000</bug_when>
    <thetext>CVS commit by tilladam: 

Disable the &quot;remove recipients line&quot; 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()-&gt;setRemoveLineButtonEnabled( false );
+  } else {
+    mLines.first()-&gt;setRemoveLineButtonEnabled( true );
+  }
 
   line-&gt;setComboWidth( mFirstColumnWidth );
@@ -355,4 +361,13 @@ RecipientLine *RecipientsView::addLine()
 }
 
+
+void RecipientLine::setRemoveLineButtonEnabled( bool b )
+{
+  mRemoveButton-&gt;setEnabled( b );
+}
+
+
+// ------------ RecipientsView ---------------------
+
 void RecipientsView::calculateTotal()
 {
@@ -428,4 +443,7 @@ void RecipientsView::slotDeleteLine()
     moveChild( line, childX( line ), childY( line ) - mLineHeight );
   }
+  // only one left, can&apos;t remove that one
+  if ( mLines.count() == 1 )
+    mLines.first()-&gt;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 * );


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>331129</commentid>
    <comment_count>2</comment_count>
    <who name="Edwin Schepers">yez</who>
    <bug_when>2005-04-02 23:03:25 +0000</bug_when>
    <thetext>Hi,
I am still unable to delete the last one, although the button is not disabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>363698</commentid>
    <comment_count>3</comment_count>
    <who name="Oded Arbel">oded</who>
    <bug_when>2005-08-08 10:06:23 +0000</bug_when>
    <thetext>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 &quot;remove recipient&quot; button on the last empty line, the &quot;type&quot; selector (To,CC,BCC) is changed to match that of the previous recipient line, regardless of what is was set before I clicked &quot;remove&quot;. I&apos;m not sure if this is correct or not, but its weird and it won&apos;t matter anyway if the &quot;remove recipient&quot; button will actually be disabled for the last line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>535512</commentid>
    <comment_count>4</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-07-09 17:39:02 +0000</bug_when>
    <thetext>Can you please try again with KMail 1.9.7?
Removing the last recipient should work fine there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>559454</commentid>
    <comment_count>5</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-12-01 22:20:00 +0000</bug_when>
    <thetext>No response, assuming fixed.
If not, reopen.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>