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

List:       kde-commits
Subject:    KDE_3_4_BRANCH: kdepim/korn
From:       Mart Kelder <mart.kde () hccnet ! nl>
Date:       2005-04-01 6:51:32
Message-ID: 20050401065132.CC669490 () office ! kde ! org
[Download RAW message or body]

CVS commit by mkelder: 

Backport: this fixes various bugs in the run-command part.

* It executes the command only if new mails arrives instead if the number of mails change
* It writes the configuration to the right entry point in the config file
* It doesn't always override the box settings any more.

BUGS:102468


  M +10 -5     accountmanager.cpp   1.2.2.1
  M +2 -2      kornaccountcfgimpl.cpp   1.1.2.2
  M +2 -2      kornboxcfgimpl.cpp   1.3.2.1
  M +1 -3      maildrop.cpp   1.17.2.1


--- kdepim/korn/accountmanager.cpp  #1.2:1.2.2.1
@@ -215,12 +215,17 @@ void AccountManager::slotChanged( int co
         Dropinfo *info = _dropInfo->find( mailDrop ).data();
         info->newMessages = count > info->msgnr || ( count == info->msgnr && info->newMessages );
-        info->msgnr = count;
-        if( info->msgnr - info->reset < 0 )
-                info->reset = 0;
 
+        if( count > info->msgnr )
+        {
         if( !mailDrop->soundFile().isEmpty() )
                 playSound( mailDrop->soundFile() );
         if( !mailDrop->newMailCmd().isEmpty() )
                 runCommand( mailDrop->newMailCmd() );
+        }
+        
+        info->msgnr = count;    
+        if( info->msgnr - info->reset < 0 )
+                info->reset = 0;
+
         setCount( totalMessages(), hasNewMessages() && totalMessages() > 0 );
         setTooltip( getTooltip() );

--- kdepim/korn/kornaccountcfgimpl.cpp  #1.1.2.1:1.1.2.2
@@ -90,5 +90,5 @@ void KornAccountCfgImpl::readConfig( KCo
         
         this->chUseBox->setChecked( _config->readBoolEntry( "boxsettings", true ) );
-        this->edRunCommand->setURL( _config->readEntry( "command", "" ) );
+        this->edRunCommand->setURL( _config->readEntry( "newcommand", "" ) );
         this->edPlaySound->setURL( _config->readEntry( "sound", "" ) );
         this->chPassivePopup->setChecked( _config->readBoolEntry( "passivepopup", false ) );
@@ -140,5 +140,5 @@ void KornAccountCfgImpl::writeConfig()
 
         _config->writeEntry( "boxsettings", this->chUseBox->isChecked() );
-        _config->writeEntry( "command", this->edRunCommand->url() );
+        _config->writeEntry( "newcommand", this->edRunCommand->url() );
         _config->writeEntry( "sound", this->edPlaySound->url() );
         _config->writeEntry( "passivepopup", this->chPassivePopup->isChecked() );

--- kdepim/korn/kornboxcfgimpl.cpp  #1.3:1.3.2.1
@@ -137,5 +137,5 @@ void KornBoxCfgImpl::readEventConfig()
         
         this->edNewRun->setURL( _config->readEntry( "newcommand", "" ) );
-        this->edNewRun->setURL( _config->readEntry( "sound", "" ) );
+        this->edPlaySound->setURL( _config->readEntry( "sound", "" ) );
         this->chShowPassive->setChecked( _config->readBoolEntry( "passivepopup", false ) );
         this->chPassiveDate->setChecked( _config->readBoolEntry( "passivedate", false ) );
@@ -208,5 +208,5 @@ void KornBoxCfgImpl::writeEventConfig( K
         
         config->writeEntry( "newcommand", this->edNewRun->url() );
-        config->writeEntry( "sound", this->edNewRun->url() );
+        config->writeEntry( "sound", this->edPlaySound->url() );
         config->writeEntry( "passivepopup", this->chShowPassive->isChecked() );
         config->writeEntry( "passivedate", this->chPassiveDate->isChecked() );

--- kdepim/korn/maildrop.cpp  #1.17:1.17.2.1
@@ -87,6 +87,4 @@ bool KMailDrop::readConfigGroup(const KC
   _caption    = c.readEntry(fu(CaptionConfigKey));
   _clickCmd   = c.readPathEntry(fu(ClickConfigKey));
-  _nMailCmd   = c.readPathEntry(fu(NewMailConfigKey));
-  _soundFile  = c.readPathEntry(fu(SoundFileConfigKey));
   _style      = Style(c.readUnsignedNumEntry(fu(DisplayStyleConfigKey), Plain));
   _bgColour   = c.readColorEntry(fu(BgColourConfigKey), &QApplication::palette().active().background());


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

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