Bug 72308 - Delayed update after switching sender/receiver
Summary: Delayed update after switching sender/receiver
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: new message list (show other bugs)
Version: 1.11.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Szymon Stefanek
URL:
Keywords:
: 81929 101323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-10 14:21 UTC by Thomas Zander
Modified: 2009-12-20 14:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2004-01-10 14:21:57 UTC
Version:           1.5.94 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.2 (Debian)
OS:          Linux (i686) release 2.6.0dell-optiplex

If I go to an (IMAP) folder and edit the Properties to change from 'Show' from Default to Receiver and I press OK nothing happens.
Only when I click one time in the headers view the GUI is updated and I see the correct names appear.
Comment 1 Tom Albers 2004-09-23 00:00:22 UTC
*** Bug 81929 has been marked as a duplicate of this bug. ***
Comment 2 Tom Albers 2005-03-14 19:21:25 UTC
*** Bug 101323 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Zander 2005-06-09 00:41:28 UTC
SVN commit 423585 by zander:

* Fix inconsitent use of QString:null and an empty string
* Fix the headers->reset() method to also update the sender/receiver header
  name properly
* Make sure the header view is refreshed after the user change the setting in
  the config dialog
BUG: 72308


 M  +9 -3      kmfolderdia.cpp  
 M  +4 -0      kmheaders.cpp  


--- trunk/KDE/kdepim/kmail/kmfolderdia.cpp #423584:423585
@@ -390,8 +390,8 @@
   QString whoField;
   if (mDlg->folder()) whoField = mDlg->folder()->userWhoField();
   if (whoField.isEmpty()) mShowSenderReceiverComboBox->setCurrentItem(0);
-  if (whoField == "From") mShowSenderReceiverComboBox->setCurrentItem(1);
-  if (whoField == "To") mShowSenderReceiverComboBox->setCurrentItem(2);
+  else if (whoField == "From") mShowSenderReceiverComboBox->setCurrentItem(1);
+  else if (whoField == "To") mShowSenderReceiverComboBox->setCurrentItem(2);
 
 
   // sender identity
@@ -554,13 +554,19 @@
 {
   KMFolder* folder = mDlg->folder();
   folder->setIdentity( mIdentityComboBox->currentIdentity() );
+  QString oldWhoField = folder->userWhoField();
   // set whoField
   if (mShowSenderReceiverComboBox->currentItem() == 1)
     folder->setUserWhoField("From");
   else if (mShowSenderReceiverComboBox->currentItem() == 2)
     folder->setUserWhoField("To");
   else
-    folder->setUserWhoField(QString::null);
+    folder->setUserWhoField("");
+  if( oldWhoField.compare(folder->userWhoField()) != 0 )
+  {
+    if(mDlg->folderTree()->mainWidget() && mDlg->folderTree()->mainWidget()->headers())
+      mDlg->folderTree()->mainWidget()->headers()->reset();
+  }
 
   folder->setIgnoreNewMail( !mNotifyOnNewMailCheckBox->isChecked() );
   folder->setPutRepliesInSameFolder( mKeepRepliesInSameFolderCheckBox->isChecked() );
--- trunk/KDE/kdepim/kmail/kmheaders.cpp #423584:423585
@@ -519,6 +519,10 @@
   int id = currentItemIndex();
   noRepaint = true;
   clear();
+  QString colText = i18n( "Sender" );
+  if ( mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver)
+    colText = i18n("Receiver");
+  setColumnText(mPaintInfo.senderCol, colText);
   noRepaint = false;
   mItems.resize(0);
   updateMessageList();
Comment 4 Marc Schiffbauer 2009-01-30 12:04:42 UTC
This bug is present in kmail 1.11.0 (in KDE 4.2 final)

Please re-open this bug.
Comment 5 Jaime Torres 2009-07-14 16:59:18 UTC
This works again in kmail 1.12.90 (and possibly in kmail 1.12.X from kde 4.3.X).
Comment 6 Bruno Bigras 2009-08-26 18:20:24 UTC
I was not able to replicate this bug with kmail 1.12.0 (KDE 4.3) and with
trunk.

When I switch from "Default" to "Receiver" and press "OK", the names change.

Anyone still having this problem with KDE 4.3 or trunk?