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

List:       kmail-devel
Subject:    Re: Patch for BUG:88367
From:       Matt Douhan <matt () fruitsalad ! org>
Date:       2005-02-27 20:20:03
Message-ID: 200502272120.04565.matt () fruitsalad ! org
[Download RAW message or body]

On Sat February 26 2005 13:14, Ingo Klöcker wrote:
>
> I don't think it makes sense to tell the user that he can't delete a
> transport before he has changed all affected identities. It's KMail's
> job to change the affected identities. Therefore KMail should do what I
> wrote above. Additionally, we should inform the user in case some
> identities have been changed so that he can check them.

I have made it so in this patch, it resets the affected idents to use the 
default transport.

And it tells the user which idents were changed.

rgds

Matt

-- 
Matt Douhan
www.fruitsalad.org
kolab2 + kontact == success

["patch_configuredialog_cpp" (text/x-diff)]

Index: configuredialog.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/configuredialog.cpp,v
retrieving revision 1.521
diff -u -3 -p -r1.521 configuredialog.cpp
--- configuredialog.cpp	20 Feb 2005 20:15:55 -0000	1.521
+++ configuredialog.cpp	27 Feb 2005 20:17:43 -0000
@@ -854,12 +854,36 @@ void AccountsPage::SendingTab::slotModif
   emit changed( true );
 }
 
-
 void AccountsPage::SendingTab::slotRemoveSelectedTransport()
 {
   QListViewItem *item = mTransportList->selectedItem();
   if ( !item ) return;
 
+  QStringList changedIdents;
+  KPIM::IdentityManager * im = kmkernel->identityManager();
+  for ( KPIM::IdentityManager::Iterator it = im->modifyBegin(); it != im->modifyEnd(); ++it ) {
+    if ( item->text( 0 ) == (*it).transport() ) {
+      (*it).setTransport( QString::null );
+      changedIdents += (*it).identityName();
+    }
+  }
+
+  // this part cannot be backported to BRANCH since it holds new strings
+  if ( !changedIdents.isEmpty() ) {
+    QString changedIdentsString = changedIdents.join( ", " );
+    QString information;
+    int commaCount = changedIdentsString.contains( ',' );
+    if ( commaCount > 0 ) {
+      information = i18n( "These identitites have been changed to use the default transport" );
+    } else {
+      information = i18n( "This identity have been changed to use the default transport" );
+    }
+    QString infoMsg( "<qt><p><b>" + changedIdentsString +
+                     "</b></p><p>" + information +
+                     "</p></qt>" );
+    KMessageBox::information( this, infoMsg, i18n("Identitychanges") );
+  }
+
   QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
   for ( it.toFirst() ; it.current() ; ++it )
     if ( (*it)->name == item->text(0) ) break;


_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


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

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