[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-28 6:11:30
Message-ID: 200502280711.30881.matt () fruitsalad ! org
[Download RAW message or body]
On Sun February 27 2005 22:49, Ingo Klöcker wrote:
> On Sunday 27 February 2005 21:20, Matt Douhan wrote:
> > + if ( !changedIdents.isEmpty() ) {
> > + QString changedIdentsString = changedIdents.join( ", " );
> > + QString information;
> > + int commaCount = changedIdentsString.contains( ',' );
>
> Use changedIdents.count() instead of counting commas.
Fixed in this new patch, and much neater with this solution, no need to
convert stuff back and forwards.
>
> typo: "This identity _has_ been changed ..."
Fixed
>
> > + QString infoMsg( "<qt><p><b>" + changedIdentsString +
> > + "</b></p><p>" + information +
> > + "</p></qt>" );
> > + KMessageBox::information( this, infoMsg, i18n("Identitychanges")
> > ); + }
>
> I propose to use
> KMessageBox::informationList( this, information, changedIdents );
Aha, a msgbox that takes a stringlist directly, way neater, fixed also in this
patch.
I just found out about kde:kmessagebox in the minicli, that will be useful for
these kind of things later on.
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 28 Feb 2005 06:08:38 -0000
@@ -854,12 +854,31 @@ 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 information;
+ if ( changedIdents.count() > 1 ) {
+ information = i18n( "These identitites have been changed to use the default transport" );
+ } else {
+ information = i18n( "This identity has been changed to use the default transport" );
+ }
+ KMessageBox::informationList( this, information, changedIdents );
+ }
+
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