diff options
Diffstat (limited to 'kshowmail/tdewalletaccess.cpp')
-rw-r--r-- | kshowmail/tdewalletaccess.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kshowmail/tdewalletaccess.cpp b/kshowmail/tdewalletaccess.cpp index 1f48e1c..4aaf5a8 100644 --- a/kshowmail/tdewalletaccess.cpp +++ b/kshowmail/tdewalletaccess.cpp @@ -9,40 +9,40 @@ #include "tdewalletaccess.h" -bool KWalletAccess::savePassword( const TQString & account, const TQString & password ) +bool TDEWalletAccess::savePassword( const TQString & account, const TQString & password ) { - //check for enabled KWallet - if( !KWallet::Wallet::isEnabled() ) + //check for enabled TDEWallet + if( !TDEWallet::Wallet::isEnabled() ) { - KMessageBox::error( NULL, i18n( "KWallet is not available." ) ); + KMessageBox::error( NULL, i18n( "TDEWallet is not available." ) ); return false; } //get wallet name for network data - TQString name = KWallet::Wallet::NetworkWallet(); + TQString name = TDEWallet::Wallet::NetworkWallet(); if( name == "" || name == TQString::null ) { - KMessageBox::error( NULL, i18n( "Could not get wallet name for network datas from KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not get wallet name for network datas from TDEWallet." ) ); return false; } //open wallet //we want to create a connection object just at first call of this function - static KWallet::Wallet* wallet; + static TDEWallet::Wallet* wallet; if( wallet == NULL ) { - wallet = KWallet::Wallet::openWallet( name ); + wallet = TDEWallet::Wallet::openWallet( name ); } else if( !wallet->isOpen() ) { delete wallet; - wallet = KWallet::Wallet::openWallet( name ); + wallet = TDEWallet::Wallet::openWallet( name ); } if( wallet == NULL ) { - KMessageBox::error( NULL, i18n( "Could not open KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not open TDEWallet." ) ); return false; } @@ -53,7 +53,7 @@ bool KWalletAccess::savePassword( const TQString & account, const TQString & pas if( !createFolderSuccess ) { - KMessageBox::error( NULL, i18n( "Could not create folder for KShowmail in KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not create folder for KShowmail in TDEWallet." ) ); return false; } } @@ -62,7 +62,7 @@ bool KWalletAccess::savePassword( const TQString & account, const TQString & pas bool setFolderSuccess = wallet->setFolder( "KShowmail" ); if( !setFolderSuccess ) { - KMessageBox::error( NULL, i18n( "Could not open folder for KShowmail in KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not open folder for KShowmail in TDEWallet." ) ); return false; } @@ -70,7 +70,7 @@ bool KWalletAccess::savePassword( const TQString & account, const TQString & pas int writePasswordSuccess = wallet->writePassword( account, password ); if( writePasswordSuccess != 0 ) { - KMessageBox::error( NULL, i18n( "Could not save password in KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not save password in TDEWallet." ) ); return false; } @@ -78,40 +78,40 @@ bool KWalletAccess::savePassword( const TQString & account, const TQString & pas return true; } -TQString KWalletAccess::getPassword( const TQString & account ) +TQString TDEWalletAccess::getPassword( const TQString & account ) { - //check for enabled KWallet - if( !KWallet::Wallet::isEnabled() ) + //check for enabled TDEWallet + if( !TDEWallet::Wallet::isEnabled() ) { - KMessageBox::error( NULL, i18n( "KWallet is not available." ) ); + KMessageBox::error( NULL, i18n( "TDEWallet is not available." ) ); return TQString::null; } //get wallet name for network data - TQString name = KWallet::Wallet::NetworkWallet(); + TQString name = TDEWallet::Wallet::NetworkWallet(); if( name == "" || name == TQString::null ) { - KMessageBox::error( NULL, i18n( "Could not get wallet name for network datas from KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not get wallet name for network datas from TDEWallet." ) ); return TQString::null; } //open wallet //we want to create a connection object just at first call of this function - static KWallet::Wallet* wallet; + static TDEWallet::Wallet* wallet; if( wallet == NULL ) { - wallet = KWallet::Wallet::openWallet( name ); + wallet = TDEWallet::Wallet::openWallet( name ); } else if( !wallet->isOpen() ) { delete wallet; - wallet = KWallet::Wallet::openWallet( name ); + wallet = TDEWallet::Wallet::openWallet( name ); } if( wallet == NULL ) { - KMessageBox::error( NULL, i18n( "Could not open KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not open TDEWallet." ) ); return TQString::null; } @@ -119,7 +119,7 @@ TQString KWalletAccess::getPassword( const TQString & account ) bool setFolderSuccess = wallet->setFolder( "KShowmail" ); if( !setFolderSuccess ) { - KMessageBox::error( NULL, i18n( "Could not open folder for KShowmail in KWallet." ) ); + KMessageBox::error( NULL, i18n( "Could not open folder for KShowmail in TDEWallet." ) ); return TQString::null; } @@ -129,7 +129,7 @@ TQString KWalletAccess::getPassword( const TQString & account ) int readPasswordSuccess = wallet->readPassword( account, password ); if( readPasswordSuccess != 0 ) { - KMessageBox::error( NULL, i18n( "Could not get password of account %1 from KWallet." ).arg( account) ); + KMessageBox::error( NULL, i18n( "Could not get password of account %1 from TDEWallet." ).arg( account) ); return TQString::null; } |