[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/kmail
From:       Giovanni Venturi <jumpyj () tiscali ! it>
Date:       2004-09-07 20:36:42
Message-ID: 20040907203642.7A6A5E61 () office ! kde ! org
[Download RAW message or body]

CVS commit by gianni: 

fix bug #78626, #82457 and #84430


  M +20 -0     kmfolderdia.cpp   1.162


--- kdepim/kmail/kmfolderdia.cpp  #1.161:1.162
@@ -1208,4 +1208,24 @@ void FolderDiaMailingListTab::fillMLFrom
     return;
 
+  // make sure that email addresses are prepended by "mailto:"
+  bool changed = false;
+  QStringList oldList = mEditList->items();
+  QStringList newList; // the correct string list
+  for ( QStringList::ConstIterator it = oldList.begin();
+        it != oldList.end(); ++it ) {
+    if ( !(*it).startsWith("http:") && !(*it).startsWith("https:") &&
+         !(*it).startsWith("mailto:") && ( (*it).find('@') != -1 ) ) {
+      changed = true;
+      newList << "mailto:" + *it;
+    }
+    else {
+      newList << *it;
+    }
+  }
+  if ( changed ) {
+    mEditList->clear();
+    mEditList->insertStringList( newList );
+  }
+
   //mMailingList.setHandler( static_cast<MailingList::Handler>( mMLHandlerCombo->currentItem() ) );
   switch ( mLastItem ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic