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

List:       kde-commits
Subject:    [PATCH] Re: kdenetwork/kmail
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2002-03-09 18:44:28
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 09 March 2002 16:56, Stephan Kulow wrote:
<snip>
> Modified Files:
>          configuredialog.cpp
> Log Message:
> always init the variable
> -    if ( mIdentities.count() == 1 )
> -      mSecondIdentity = true;
> +    mSecondIdentity = ( mIdentities.count() == 1 );

Sorry, wrong fix :-(
(What do you think would happen if I'd add a third identitiy? Suddenly I 
heven't got a second identity anymore :-)

Right fix attached.
(the second part of the first hunk just renames a local variable. 
mShowHeaders isn't a member.)

Marc

- -- 
Marc Mutz <mutz@kde.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8ilgM3oWD+L2/6DgRApzoAKDDXdeVyniDBXZv1vwHMnvILhXgtACfZl4x
VV9U1KGx7hLDPbbXHqBF6L8=
=l4b2
-----END PGP SIGNATURE-----

["configuredialog-remove-bogus-variable.diff" (text/x-diff)]

Index: configuredialog.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/configuredialog.cpp,v
retrieving revision 1.217
diff -u -3 -p -r1.217 configuredialog.cpp
--- configuredialog.cpp	2002/03/09 15:56:00	1.217
+++ configuredialog.cpp	2002/03/09 18:41:13
@@ -553,11 +553,13 @@ void IdentityPage::apply() {
   saveActiveIdentity(); // Copy from textfields into list
   mIdentities.exportData();
 
-  if( mSecondIdentity ) {
+  if( mIdentities.count() > 1 ) {
+    // have more than one identity, so better show the combo in the
+    // composer now:
     KConfigGroup composer( kapp->config(), "Composer" );
-    int mShowHeaders = composer.readNumEntry( "headers", HDR_STANDARD );
-    mShowHeaders |= HDR_IDENTITY;
-    composer.writeEntry( "headers", mShowHeaders );
+    int showHeaders = composer.readNumEntry( "headers", HDR_STANDARD );
+    showHeaders |= HDR_IDENTITY;
+    composer.writeEntry( "headers", showHeaders );
   }
 
 }
@@ -722,8 +724,6 @@ void IdentityPage::slotNewIdentity()
     QString identityName = dialog.identityName().stripWhiteSpace();
     assert( !identityName.isEmpty() );
 
-    mSecondIdentity = ( mIdentities.count() == 1 );
-    
     //
     // Construct a new IdentityEntry:
     //
Index: configuredialog_p.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/configuredialog_p.h,v
retrieving revision 1.12
diff -u -3 -p -r1.12 configuredialog_p.h
--- configuredialog_p.h	2002/02/28 12:02:25	1.12
+++ configuredialog_p.h	2002/03/09 18:41:14
@@ -340,7 +340,6 @@ protected: // methods
 protected: // data members
   QString        mActiveIdentity;
   IdentityList   mIdentities;
-  bool           mSecondIdentity;
 
   // Widgets:
   // outside tabwidget:


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

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