Bug 31975 - can't turn off recent addresses when using ctrl-T
Summary: can't turn off recent addresses when using ctrl-T
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.3.1
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-01 23:48 UTC by Unknown
Modified: 2007-09-14 12:17 UTC (History)
0 users

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 tc 2001-09-01 23:40:29 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kmail
Version:           1.3.1 (using KDE 2.2.0 )
Severity:          wishlist
Installed from:    Red Hat Linux 7.1.93
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-96)
OS:                Linux (i686) release 2.4.5-ac8
OS/Compiler notes: 

Moving from the 2.2 beta to
the real 2.2 kmail now adds
recently used addresses to what it looks up when you do a Ctrl-T to complete an address.  Previously I knew
that if I typed "mcm-Ctrl-T"
I'd get "mcmaster@samsix.com" and I wouldn't have to move my hand from the keyboard.
Now it adds all recently used
addresses and I either have to move my hand to the mouse or the arrow keys which slows me down a lot.
I know that when you hit the "..." button to the right of the "To:" field there's a check box for whether that panel includes recently used addresses but that check box doesn't seem to affect Ctrl-T.  Nor should it probably.  There needs to be another configuration option.
All this really slows me down and is very annoying.  And
the Completion Mode pulldown choices don't seem to affect this at all.
Please?

BTW - I'm just amazed at the quality of KDE it is such a joy to use.  Not only that but I'm flabbergasted at the pace of development and improvement.  It's just amazing.  I love it!

Thanks.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Carsten Pfeiffer 2001-09-04 21:18:22 UTC
On Sat Sep 01 2001 at 11:40:29PM -0000 tc@clark.net wrote:

> the real 2.2 kmail now adds
> recently used addresses to what it looks up when you do a Ctrl-T to complete an address.  Previously I knew
> that if I typed "mcm-Ctrl-T"
> I'd get "mcmaster@samsix.com" and I wouldn't have to move my hand from the keyboard.
> Now it adds all recently used
> addresses and I either have to move my hand to the mouse or the arrow keys which slows me down a lot.
> I know that when you hit the "..." button to the right of the "To:" field there's a check box for whether that panel includes recently used addresses but that check box doesn't seem to affect Ctrl-T.  Nor should it probably.  There needs to be another configuration option.
> All this really slows me down and is very annoying.  And
> the Completion Mode pulldown choices don't seem to affect this at all.
> Please?

Please what? Do you have any suggestion how to improve it? What about typing mcmas-Ctrl-T?
If all fails you could add 

[General]
Maximum Recent Addresses=0

to your kmailrc. Then you won't get any recent addresses at all.

Cheer
Carsten Pfeiffer
Comment 2 tc 2001-09-05 14:33:09 UTC
On Tuesday September 04 2001 05:18 pm you wrote:
> On Sat Sep 01 2001 at 11:40:29PM -0000 tc@clark.net wrote:
> > the real 2.2 kmail now adds
> > recently used addresses to what it looks up when you do a Ctrl-T to
> > complete an address.  Previously I knew that if I typed "mcm-Ctrl-T"
> > I'd get "mcmaster@samsix.com" and I wouldn't have to move my hand from
> > the keyboard. Now it adds all recently used
> > addresses and I either have to move my hand to the mouse or the arrow
> > keys which slows me down a lot. I know that when you hit the "..."
> > button to the right of the "To:" field there's a check box for whether
> > that panel includes recently used addresses but that check box doesn't
> > seem to affect Ctrl-T.  Nor should it probably.  There needs to be
> > another configuration option. All this really slows me down and is very
> > annoying.  And
> > the Completion Mode pulldown choices don't seem to affect this at all.
> > Please?
>
> Please what? Do you have any suggestion how to improve it? What about
> typing mcmas-Ctrl-T? If all fails you could add
>
> [General]
> Maximum Recent Addresses=0
>
> to your kmailrc. Then you won't get any recent addresses at all.
>
Thanks that's great.   I'm perfectly happy but I suspect that other people 
might want to control the recent addresses in the Ctrl-T pulldown separtely 
from the recent addresses in the "..." popup.   I know I would.  But I'm 
perfectly happy this way thanks.

-tc
> Cheer
> Carsten Pfeiffer
Comment 3 Stephan Kulow 2004-05-19 10:42:13 UTC
Replaced tc@clark.net with null@kde.org due to bounces by reporter
Comment 4 Matt Douhan 2005-05-21 22:19:24 UTC
We are working ona  config option to allow recent addresses to not be used in the completion order, that should solve this issue if I understand it correctly
Comment 5 Matt Douhan 2005-05-22 12:22:39 UTC
SVN commit 416703 by mdouhan:

Add a new option to not use recent addresses in the composer
autocompletion.

Fix a bug in the recetn addresses handling where the displayname
was not quoted if neccessary.

BUG:79147
BUG:105889
BUG:31975
BUG:97654



 M  +7 -0      trunk/KDE/kdepim/kmail/configuredialog.cpp  
 M  +1 -0      trunk/KDE/kdepim/kmail/configuredialog_p.h  
 M  +5 -0      trunk/KDE/kdepim/kmail/kmail.kcfg  
 M  +13 -11    trunk/KDE/kdepim/kmail/kmcomposewin.cpp  


--- trunk/KDE/kdepim/kmail/configuredialog.cpp #416702:416703
@@ -2509,6 +2509,13 @@
   connect( mAutoRequestMDNCheck, SIGNAL( stateChanged(int) ),
            this, SLOT( slotEmitChanged( void ) ) );
 
+  mShowRecentAddressesInComposer = new QCheckBox(
+           GlobalSettings::self()->showRecentAddressesInComposerItem()->label(),
+           this, "kcfg_ShowRecentAddressesInComposer" );
+  vlay->addWidget( mShowRecentAddressesInComposer );
+  connect( mShowRecentAddressesInComposer, SIGNAL( stateChanged(int) ),
+           this, SLOT( slotEmitChanged( void ) ) );
+
   // a checkbox for "word wrap" and a spinbox for the column in
   // which to wrap:
   hlay = new QHBoxLayout( vlay ); // inherits spacing
--- trunk/KDE/kdepim/kmail/configuredialog_p.h #416702:416703
@@ -590,6 +590,7 @@
   QCheckBox     *mAutoAppSignFileCheck;
   QCheckBox     *mSmartQuoteCheck;
   QCheckBox     *mAutoRequestMDNCheck;
+  QCheckBox	*mShowRecentAddressesInComposer;
   QCheckBox     *mWordWrapCheck;
   KIntSpinBox   *mWrapColumnSpin;
   KIntSpinBox   *mAutoSave;
--- trunk/KDE/kdepim/kmail/kmail.kcfg #416702:416703
@@ -266,6 +266,11 @@
         <whatsthis>&lt;qt&gt;&lt;p&gt;Enable this option if you want KMail to request Message Disposition Notifications (MDNs) for each of your outgoing messages.&lt;/p&gt;&lt;p&gt;This option only affects the default; you can still enable or disable MDN requesting on a per-message basis in the composer, menu item &lt;em&gt;Options&lt;/em&gt;-&gt;&lt;em&gt;Request Disposition Notification&lt;/em&gt;.&lt;/p&gt;&lt;/qt&gt;</whatsthis>
         <default>false</default>
       </entry>
+      <entry name="ShowRecentAddressesInComposer" type="Bool" key="showRecentAddressesInComposer">
+        <label>Use recent addresses for autocompletion</label>
+        <whatsthis>Disable this option if you do not want recently used addresses to appear in the autocompletion list in the composer's address fields.</whatsthis>
+        <default>true</default>
+      </entry>
       <entry name="Headers" type="Int" key="headers">
 			  <default>HDR_STANDARD</default>
       </entry>
--- trunk/KDE/kdepim/kmail/kmcomposewin.cpp #416702:416703
@@ -4955,17 +4955,19 @@
   // was: KABC::AddressLineEdit::loadAddresses()
   AddresseeLineEdit::loadContacts();
 
-  if ( KMKernel::self() ) {
-    QStringList recent =
-      RecentAddresses::self( KMKernel::config() )->addresses();
-    QStringList::Iterator it = recent.begin();
-    QString name, email;
-    for ( ; it != recent.end(); ++it ) {
-      KABC::Addressee addr;
-      KPIM::getNameAndMail(*it, name, email);
-      addr.setNameFromString( name );
-      addr.insertEmail( email, true );
-      addContact( addr, 120 ); // more weight than kabc entries and more than ldap results
+  if ( GlobalSettings::showRecentAddressesInComposer() ){
+    if ( KMKernel::self() ) {
+      QStringList recent =
+        RecentAddresses::self( KMKernel::config() )->addresses();
+      QStringList::Iterator it = recent.begin();
+      QString name, email;
+      for ( ; it != recent.end(); ++it ) {
+        KABC::Addressee addr;
+        KPIM::getNameAndMail(*it, name, email);
+        addr.setNameFromString( KPIM::quoteNameIfNecessary( name ));
+        addr.insertEmail( email, true );
+        addContact( addr, 120 ); // more weight than kabc entries and more than ldap results
+      }
     }
   }
 }